@lucasvu/scope-ui 0.0.1 → 0.0.2
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 +84 -15
- package/dist/index.cjs +497 -6
- package/dist/index.d.cts +107 -5
- package/dist/index.d.ts +107 -5
- package/dist/index.js +489 -7
- package/dist/styles.css +2 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties, SVGProps, ButtonHTMLAttributes, InputHTMLAttributes, HTMLAttributes, FormHTMLAttributes, LabelHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, RefObject, ElementType } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, SVGProps, ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, FormHTMLAttributes, LabelHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, RefObject, ElementType } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -81,6 +81,7 @@ type ButtonSize$1 = 'sm' | 'md' | 'lg' | 'icon';
|
|
|
81
81
|
interface ButtonProps$1 extends Omit<SharedComponentProps, 'size'>, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'className'> {
|
|
82
82
|
variant?: ButtonVariant$1;
|
|
83
83
|
size?: ButtonSize$1;
|
|
84
|
+
block?: boolean;
|
|
84
85
|
startIcon?: ReactNode;
|
|
85
86
|
endIcon?: ReactNode;
|
|
86
87
|
children?: ReactNode;
|
|
@@ -134,6 +135,19 @@ interface NumericInputProps extends Omit<InputProps$1, 'type' | 'inputMode' | 'v
|
|
|
134
135
|
}
|
|
135
136
|
declare const NumericInput: react.ForwardRefExoticComponent<NumericInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
136
137
|
|
|
138
|
+
declare const textareaVariants: (props?: ({
|
|
139
|
+
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
140
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
141
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
142
|
+
type TextareaVariant = VariantProps<typeof textareaVariants>['variant'];
|
|
143
|
+
interface TextareaProps extends SharedComponentProps, Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className'> {
|
|
144
|
+
variant?: TextareaVariant;
|
|
145
|
+
textareaClassName?: string;
|
|
146
|
+
onValueChange?: (value: string) => void;
|
|
147
|
+
suffix?: ReactNode;
|
|
148
|
+
}
|
|
149
|
+
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
150
|
+
|
|
137
151
|
declare function Card$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
138
152
|
declare function CardHeader$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
139
153
|
declare function CardTitle$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
@@ -219,6 +233,11 @@ declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & re
|
|
|
219
233
|
declare function Form({ className, ...props }: FormHTMLAttributes<HTMLFormElement>): react_jsx_runtime.JSX.Element;
|
|
220
234
|
interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
221
235
|
children: ReactNode;
|
|
236
|
+
label?: ReactNode;
|
|
237
|
+
helperText?: ReactNode;
|
|
238
|
+
errorMessage?: ReactNode;
|
|
239
|
+
required?: boolean;
|
|
240
|
+
htmlFor?: string;
|
|
222
241
|
}
|
|
223
242
|
/**
|
|
224
243
|
* Grid-aligned form field wrapper for label/control/description clusters.
|
|
@@ -245,22 +264,23 @@ declare const FormDescription: react.ForwardRefExoticComponent<HTMLAttributes<HT
|
|
|
245
264
|
*/
|
|
246
265
|
declare const FormMessage: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
247
266
|
|
|
248
|
-
type
|
|
267
|
+
type SelectOption = {
|
|
249
268
|
label: ReactNode;
|
|
250
269
|
value: string | number;
|
|
251
270
|
disabled?: boolean;
|
|
252
271
|
};
|
|
272
|
+
type Option = SelectOption;
|
|
253
273
|
declare const triggerVariants$1: (props?: ({
|
|
254
274
|
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
255
275
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
256
276
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
257
277
|
type SelectVariant$1 = VariantProps<typeof triggerVariants$1>['variant'];
|
|
258
278
|
interface SelectProps extends SharedComponentProps, Omit<SelectPrimitive.SelectProps, 'defaultValue' | 'value' | 'children' | 'onValueChange'> {
|
|
259
|
-
options:
|
|
279
|
+
options: SelectOption[];
|
|
260
280
|
value?: string | number;
|
|
261
281
|
defaultValue?: string | number;
|
|
262
282
|
placeholder?: string;
|
|
263
|
-
onChange?: (value:
|
|
283
|
+
onChange?: (value: SelectOption['value']) => void;
|
|
264
284
|
variant?: SelectVariant$1;
|
|
265
285
|
}
|
|
266
286
|
/**
|
|
@@ -836,7 +856,89 @@ declare namespace index {
|
|
|
836
856
|
export { index_ArgonSidebar as ArgonSidebar, index_Badge as Badge, type index_BadgeProps as BadgeProps, index_Button as Button, type index_ButtonProps as ButtonProps, index_Card as Card, index_CardAction as CardAction, index_CardContent as CardContent, index_CardDescription as CardDescription, index_CardFooter as CardFooter, index_CardHeader as CardHeader, index_CardTitle as CardTitle, index_Combobox as Combobox, type index_ComboboxAsyncConfig as ComboboxAsyncConfig, type index_ComboboxOption as ComboboxOption, type index_ComboboxProps as ComboboxProps, index_DataTable as DataTable, type index_DataTableAlign as DataTableAlign, type index_DataTableColumn as DataTableColumn, type index_DataTablePagination as DataTablePagination, type index_DataTableProps as DataTableProps, type index_DataTableRowSelection as DataTableRowSelection, type index_DataTableSortDirection as DataTableSortDirection, type index_DataTableSortState as DataTableSortState, index_DateRangePicker as DateRangePicker, type index_DateRangePickerProps as DateRangePickerProps, index_DateTimePicker as DateTimePicker, type index_DateTimePickerProps as DateTimePickerProps, index_Input as Input, type index_InputProps as InputProps, type index_MultiTabItem as MultiTabItem, index_MultiTabs as MultiTabs, type index_MultiTabsProps as MultiTabsProps, index_PageTitle as PageTitle, index_RemoteLoading as RemoteLoading, type index_RemoteLoadingProps as RemoteLoadingProps, index_SectionTitle as SectionTitle, index_StatCard as StatCard, type index_StatusAction as StatusAction, type index_StatusOption as StatusOption, type index_StatusPresentation as StatusPresentation, index_Switch as Switch, type index_SwitchProps as SwitchProps, index_Table as Table, index_TableBody as TableBody, index_TableCell as TableCell, index_TableHeader as TableHeader, index_TableRow as TableRow, index_getStatusPresentation as getStatusPresentation };
|
|
837
857
|
}
|
|
838
858
|
|
|
859
|
+
type UiAiComponentProp = {
|
|
860
|
+
name: string;
|
|
861
|
+
type: string;
|
|
862
|
+
required?: boolean;
|
|
863
|
+
description: string;
|
|
864
|
+
};
|
|
865
|
+
type UiAiComponentDescriptor = {
|
|
866
|
+
name: string;
|
|
867
|
+
importName: string;
|
|
868
|
+
purpose: string;
|
|
869
|
+
useWhen: string[];
|
|
870
|
+
avoidWhen?: string[];
|
|
871
|
+
props: UiAiComponentProp[];
|
|
872
|
+
example: string;
|
|
873
|
+
related?: string[];
|
|
874
|
+
};
|
|
875
|
+
declare const uiAiManifest: {
|
|
876
|
+
readonly packageName: "@lucasvu/scope-ui";
|
|
877
|
+
readonly styleImport: "@lucasvu/scope-ui/styles.css";
|
|
878
|
+
readonly rules: readonly ["Import the stylesheet once at the app entry before rendering any component.", "Prefer the canonical component for each intent instead of mixing legacy MainFe components.", "Use Input/Textarea/Select label props directly for simple fields; use Field only to wrap custom controls or grouped content.", "Use Select for small fixed option lists, SearchableSelect for larger local lists, Combobox for type-and-pick flows, and AsyncCombobox for remote search.", "Always provide a stable rowKey to DataTable and use sortMode=\"server\" when sorting happens on the backend.", "Prefer Card as the outer layout section and keep alerts, stats, and tables inside CardContent when building dashboards or forms.", "Do not import MainFe components unless the target explicitly asks for legacy main-fe styling."];
|
|
879
|
+
readonly components: ({
|
|
880
|
+
name: string;
|
|
881
|
+
importName: string;
|
|
882
|
+
purpose: string;
|
|
883
|
+
useWhen: string[];
|
|
884
|
+
avoidWhen: string[];
|
|
885
|
+
props: {
|
|
886
|
+
name: string;
|
|
887
|
+
type: string;
|
|
888
|
+
description: string;
|
|
889
|
+
}[];
|
|
890
|
+
example: string;
|
|
891
|
+
related: string[];
|
|
892
|
+
} | {
|
|
893
|
+
name: string;
|
|
894
|
+
importName: string;
|
|
895
|
+
purpose: string;
|
|
896
|
+
useWhen: string[];
|
|
897
|
+
props: ({
|
|
898
|
+
name: string;
|
|
899
|
+
type: string;
|
|
900
|
+
required: true;
|
|
901
|
+
description: string;
|
|
902
|
+
} | {
|
|
903
|
+
name: string;
|
|
904
|
+
type: string;
|
|
905
|
+
description: string;
|
|
906
|
+
required?: undefined;
|
|
907
|
+
})[];
|
|
908
|
+
example: string;
|
|
909
|
+
related: string[];
|
|
910
|
+
avoidWhen?: undefined;
|
|
911
|
+
})[];
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
type UiThemeToken = {
|
|
915
|
+
name: string;
|
|
916
|
+
description: string;
|
|
917
|
+
defaultLight: string;
|
|
918
|
+
defaultDark: string;
|
|
919
|
+
usedBy: string[];
|
|
920
|
+
};
|
|
921
|
+
declare const uiThemeContract: {
|
|
922
|
+
readonly packageName: "@lucasvu/scope-ui";
|
|
923
|
+
readonly importOrder: readonly ["import '@lucasvu/scope-ui/styles.css'", "import './styles/ui-theme.css'"];
|
|
924
|
+
readonly selectors: {
|
|
925
|
+
readonly light: readonly [":root", "[data-ui-theme='light']"];
|
|
926
|
+
readonly dark: readonly [".dark", "[data-ui-theme='dark']"];
|
|
927
|
+
};
|
|
928
|
+
readonly overrideFile: "src/styles/ui-theme.css";
|
|
929
|
+
readonly rules: readonly ["Import the package stylesheet before your project theme override stylesheet.", "Override tokens in one shared theme file instead of scattering colors across components.", "Use :root for the default light theme and .dark or [data-ui-theme='dark'] for dark theme.", "Only override tokens declared here. Do not patch component internals unless you are extending the library.", "For AI-generated screens, choose one theme source of truth and keep component code token-driven."];
|
|
930
|
+
readonly tokens: {
|
|
931
|
+
name: string;
|
|
932
|
+
description: string;
|
|
933
|
+
defaultLight: string;
|
|
934
|
+
defaultDark: string;
|
|
935
|
+
usedBy: string[];
|
|
936
|
+
}[];
|
|
937
|
+
readonly exampleCss: ":root {\n --tw-primary: 12 88% 56%;\n --tw-accent: 24 95% 52%;\n --primary-grad-from: 24 95% 52%;\n --primary-grad-to: 12 88% 56%;\n --surface: rgba(255, 248, 240, 0.92);\n}\n\n.dark {\n --tw-primary: 18 100% 62%;\n --tw-accent: 35 100% 58%;\n --surface: rgba(24, 24, 27, 0.82);\n}";
|
|
938
|
+
};
|
|
939
|
+
declare const uiProjectAiRules: readonly ["Use @lucasvu/scope-ui as the default UI library.", "Import @lucasvu/scope-ui/styles.css once at the app entry.", "Import the project override theme file after the package stylesheet.", "Read uiAiManifest to choose the correct component by intent before coding.", "Read uiThemeContract before changing colors, shadows, or theme behavior.", "Prefer root exports and avoid MainFe unless the task explicitly targets a legacy screen."];
|
|
940
|
+
|
|
839
941
|
type ClassValue = string | false | null | undefined;
|
|
840
942
|
declare function cn(...values: ClassValue[]): string;
|
|
841
943
|
|
|
842
|
-
export { Alert, type AlertProps, ArgonSidebar, AsyncCombobox, type AsyncComboboxProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, Button$1 as Button, type ButtonProps$1 as ButtonProps, Card$1 as Card, CardAction$1 as CardAction, CardContent$1 as CardContent, CardDescription$1 as CardDescription, CardFooter$1 as CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle, Combobox$1 as Combobox, type ComboboxOption$2 as ComboboxOption, DataTable$1 as DataTable, type DataTableAlign$1 as DataTableAlign, type DataTableColumn$1 as DataTableColumn, type DataTablePagination$1 as DataTablePagination, type DataTableProps$1 as DataTableProps, type DataTableRowSelection$1 as DataTableRowSelection, type DataTableSortDirection$1 as DataTableSortDirection, type DataTableSortState$1 as DataTableSortState, FormField as Field, Form, FormControl, FormDescription, FormField, type FormFieldProps, FormItem, FormLabel, FormMessage, Input$1 as Input, type InputProps$1 as InputProps, LineClampTooltip, type LineClampTooltipProps, Loading, type LoadingProps, index as MainFe, MultiSelect, type MultiSelectOption, NumericInput, type NumericInputProps, type Option, OverflowTooltip, type OverflowTooltipProps, PageTitle$1 as PageTitle, Pagination, type PaginationInfo, type PaginationProps, type PermissionChecker, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, SectionTitle$1 as SectionTitle, Select, type SelectProps, Sidebar, SidebarItem, type SidebarProps, Stat, type StatProps, type TabItem, Table$1 as Table, TableBody$1 as TableBody, TableCell$1 as TableCell, TableHeader$1 as TableHeader, TableRow$1 as TableRow, Tabs, type TabsProps, Tooltip, type Trend, TruncatedText, type TruncatedTextProps, cn, defaultPermissionChecker, filterSidebarItems, hasActiveDescendant };
|
|
944
|
+
export { Alert, type AlertProps, ArgonSidebar, AsyncCombobox, type AsyncComboboxProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, Button$1 as Button, type ButtonProps$1 as ButtonProps, Card$1 as Card, CardAction$1 as CardAction, CardContent$1 as CardContent, CardDescription$1 as CardDescription, CardFooter$1 as CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle, Combobox$1 as Combobox, type ComboboxOption$2 as ComboboxOption, FormControl as Control, DataTable$1 as DataTable, type DataTableAlign$1 as DataTableAlign, type DataTableColumn$1 as DataTableColumn, type DataTablePagination$1 as DataTablePagination, type DataTableProps$1 as DataTableProps, type DataTableRowSelection$1 as DataTableRowSelection, type DataTableSortDirection$1 as DataTableSortDirection, type DataTableSortState$1 as DataTableSortState, FormDescription as Description, FormField as Field, Form, FormControl, FormDescription, FormField, type FormFieldProps, FormItem, FormLabel, FormMessage, Input$1 as Input, type InputProps$1 as InputProps, FormItem as Item, FormLabel as Label, LineClampTooltip, type LineClampTooltipProps, Loading, type LoadingProps, index as MainFe, FormMessage as Message, MultiSelect, type MultiSelectOption, NumericInput, type NumericInputProps, type Option, OverflowTooltip, type OverflowTooltipProps, PageTitle$1 as PageTitle, Pagination, type PaginationInfo, type PaginationProps, type PermissionChecker, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, SectionTitle$1 as SectionTitle, Select, type SelectOption, type SelectProps, Sidebar, SidebarItem, type SidebarProps, Stat, type StatProps, type TabItem, Table$1 as Table, TableBody$1 as TableBody, TableCell$1 as TableCell, TableHeader$1 as TableHeader, TableRow$1 as TableRow, Tabs, type TabsProps, Textarea, type TextareaProps, Tooltip, type Trend, TruncatedText, type TruncatedTextProps, type UiAiComponentDescriptor, type UiAiComponentProp, type UiThemeToken, cn, defaultPermissionChecker, filterSidebarItems, hasActiveDescendant, uiAiManifest, uiProjectAiRules, uiThemeContract };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties, SVGProps, ButtonHTMLAttributes, InputHTMLAttributes, HTMLAttributes, FormHTMLAttributes, LabelHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, RefObject, ElementType } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, SVGProps, ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, FormHTMLAttributes, LabelHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, RefObject, ElementType } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -81,6 +81,7 @@ type ButtonSize$1 = 'sm' | 'md' | 'lg' | 'icon';
|
|
|
81
81
|
interface ButtonProps$1 extends Omit<SharedComponentProps, 'size'>, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'className'> {
|
|
82
82
|
variant?: ButtonVariant$1;
|
|
83
83
|
size?: ButtonSize$1;
|
|
84
|
+
block?: boolean;
|
|
84
85
|
startIcon?: ReactNode;
|
|
85
86
|
endIcon?: ReactNode;
|
|
86
87
|
children?: ReactNode;
|
|
@@ -134,6 +135,19 @@ interface NumericInputProps extends Omit<InputProps$1, 'type' | 'inputMode' | 'v
|
|
|
134
135
|
}
|
|
135
136
|
declare const NumericInput: react.ForwardRefExoticComponent<NumericInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
136
137
|
|
|
138
|
+
declare const textareaVariants: (props?: ({
|
|
139
|
+
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
140
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
141
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
142
|
+
type TextareaVariant = VariantProps<typeof textareaVariants>['variant'];
|
|
143
|
+
interface TextareaProps extends SharedComponentProps, Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className'> {
|
|
144
|
+
variant?: TextareaVariant;
|
|
145
|
+
textareaClassName?: string;
|
|
146
|
+
onValueChange?: (value: string) => void;
|
|
147
|
+
suffix?: ReactNode;
|
|
148
|
+
}
|
|
149
|
+
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
150
|
+
|
|
137
151
|
declare function Card$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
138
152
|
declare function CardHeader$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
139
153
|
declare function CardTitle$1({ className, ...props }: react.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
@@ -219,6 +233,11 @@ declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & re
|
|
|
219
233
|
declare function Form({ className, ...props }: FormHTMLAttributes<HTMLFormElement>): react_jsx_runtime.JSX.Element;
|
|
220
234
|
interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
221
235
|
children: ReactNode;
|
|
236
|
+
label?: ReactNode;
|
|
237
|
+
helperText?: ReactNode;
|
|
238
|
+
errorMessage?: ReactNode;
|
|
239
|
+
required?: boolean;
|
|
240
|
+
htmlFor?: string;
|
|
222
241
|
}
|
|
223
242
|
/**
|
|
224
243
|
* Grid-aligned form field wrapper for label/control/description clusters.
|
|
@@ -245,22 +264,23 @@ declare const FormDescription: react.ForwardRefExoticComponent<HTMLAttributes<HT
|
|
|
245
264
|
*/
|
|
246
265
|
declare const FormMessage: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
247
266
|
|
|
248
|
-
type
|
|
267
|
+
type SelectOption = {
|
|
249
268
|
label: ReactNode;
|
|
250
269
|
value: string | number;
|
|
251
270
|
disabled?: boolean;
|
|
252
271
|
};
|
|
272
|
+
type Option = SelectOption;
|
|
253
273
|
declare const triggerVariants$1: (props?: ({
|
|
254
274
|
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
255
275
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
256
276
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
257
277
|
type SelectVariant$1 = VariantProps<typeof triggerVariants$1>['variant'];
|
|
258
278
|
interface SelectProps extends SharedComponentProps, Omit<SelectPrimitive.SelectProps, 'defaultValue' | 'value' | 'children' | 'onValueChange'> {
|
|
259
|
-
options:
|
|
279
|
+
options: SelectOption[];
|
|
260
280
|
value?: string | number;
|
|
261
281
|
defaultValue?: string | number;
|
|
262
282
|
placeholder?: string;
|
|
263
|
-
onChange?: (value:
|
|
283
|
+
onChange?: (value: SelectOption['value']) => void;
|
|
264
284
|
variant?: SelectVariant$1;
|
|
265
285
|
}
|
|
266
286
|
/**
|
|
@@ -836,7 +856,89 @@ declare namespace index {
|
|
|
836
856
|
export { index_ArgonSidebar as ArgonSidebar, index_Badge as Badge, type index_BadgeProps as BadgeProps, index_Button as Button, type index_ButtonProps as ButtonProps, index_Card as Card, index_CardAction as CardAction, index_CardContent as CardContent, index_CardDescription as CardDescription, index_CardFooter as CardFooter, index_CardHeader as CardHeader, index_CardTitle as CardTitle, index_Combobox as Combobox, type index_ComboboxAsyncConfig as ComboboxAsyncConfig, type index_ComboboxOption as ComboboxOption, type index_ComboboxProps as ComboboxProps, index_DataTable as DataTable, type index_DataTableAlign as DataTableAlign, type index_DataTableColumn as DataTableColumn, type index_DataTablePagination as DataTablePagination, type index_DataTableProps as DataTableProps, type index_DataTableRowSelection as DataTableRowSelection, type index_DataTableSortDirection as DataTableSortDirection, type index_DataTableSortState as DataTableSortState, index_DateRangePicker as DateRangePicker, type index_DateRangePickerProps as DateRangePickerProps, index_DateTimePicker as DateTimePicker, type index_DateTimePickerProps as DateTimePickerProps, index_Input as Input, type index_InputProps as InputProps, type index_MultiTabItem as MultiTabItem, index_MultiTabs as MultiTabs, type index_MultiTabsProps as MultiTabsProps, index_PageTitle as PageTitle, index_RemoteLoading as RemoteLoading, type index_RemoteLoadingProps as RemoteLoadingProps, index_SectionTitle as SectionTitle, index_StatCard as StatCard, type index_StatusAction as StatusAction, type index_StatusOption as StatusOption, type index_StatusPresentation as StatusPresentation, index_Switch as Switch, type index_SwitchProps as SwitchProps, index_Table as Table, index_TableBody as TableBody, index_TableCell as TableCell, index_TableHeader as TableHeader, index_TableRow as TableRow, index_getStatusPresentation as getStatusPresentation };
|
|
837
857
|
}
|
|
838
858
|
|
|
859
|
+
type UiAiComponentProp = {
|
|
860
|
+
name: string;
|
|
861
|
+
type: string;
|
|
862
|
+
required?: boolean;
|
|
863
|
+
description: string;
|
|
864
|
+
};
|
|
865
|
+
type UiAiComponentDescriptor = {
|
|
866
|
+
name: string;
|
|
867
|
+
importName: string;
|
|
868
|
+
purpose: string;
|
|
869
|
+
useWhen: string[];
|
|
870
|
+
avoidWhen?: string[];
|
|
871
|
+
props: UiAiComponentProp[];
|
|
872
|
+
example: string;
|
|
873
|
+
related?: string[];
|
|
874
|
+
};
|
|
875
|
+
declare const uiAiManifest: {
|
|
876
|
+
readonly packageName: "@lucasvu/scope-ui";
|
|
877
|
+
readonly styleImport: "@lucasvu/scope-ui/styles.css";
|
|
878
|
+
readonly rules: readonly ["Import the stylesheet once at the app entry before rendering any component.", "Prefer the canonical component for each intent instead of mixing legacy MainFe components.", "Use Input/Textarea/Select label props directly for simple fields; use Field only to wrap custom controls or grouped content.", "Use Select for small fixed option lists, SearchableSelect for larger local lists, Combobox for type-and-pick flows, and AsyncCombobox for remote search.", "Always provide a stable rowKey to DataTable and use sortMode=\"server\" when sorting happens on the backend.", "Prefer Card as the outer layout section and keep alerts, stats, and tables inside CardContent when building dashboards or forms.", "Do not import MainFe components unless the target explicitly asks for legacy main-fe styling."];
|
|
879
|
+
readonly components: ({
|
|
880
|
+
name: string;
|
|
881
|
+
importName: string;
|
|
882
|
+
purpose: string;
|
|
883
|
+
useWhen: string[];
|
|
884
|
+
avoidWhen: string[];
|
|
885
|
+
props: {
|
|
886
|
+
name: string;
|
|
887
|
+
type: string;
|
|
888
|
+
description: string;
|
|
889
|
+
}[];
|
|
890
|
+
example: string;
|
|
891
|
+
related: string[];
|
|
892
|
+
} | {
|
|
893
|
+
name: string;
|
|
894
|
+
importName: string;
|
|
895
|
+
purpose: string;
|
|
896
|
+
useWhen: string[];
|
|
897
|
+
props: ({
|
|
898
|
+
name: string;
|
|
899
|
+
type: string;
|
|
900
|
+
required: true;
|
|
901
|
+
description: string;
|
|
902
|
+
} | {
|
|
903
|
+
name: string;
|
|
904
|
+
type: string;
|
|
905
|
+
description: string;
|
|
906
|
+
required?: undefined;
|
|
907
|
+
})[];
|
|
908
|
+
example: string;
|
|
909
|
+
related: string[];
|
|
910
|
+
avoidWhen?: undefined;
|
|
911
|
+
})[];
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
type UiThemeToken = {
|
|
915
|
+
name: string;
|
|
916
|
+
description: string;
|
|
917
|
+
defaultLight: string;
|
|
918
|
+
defaultDark: string;
|
|
919
|
+
usedBy: string[];
|
|
920
|
+
};
|
|
921
|
+
declare const uiThemeContract: {
|
|
922
|
+
readonly packageName: "@lucasvu/scope-ui";
|
|
923
|
+
readonly importOrder: readonly ["import '@lucasvu/scope-ui/styles.css'", "import './styles/ui-theme.css'"];
|
|
924
|
+
readonly selectors: {
|
|
925
|
+
readonly light: readonly [":root", "[data-ui-theme='light']"];
|
|
926
|
+
readonly dark: readonly [".dark", "[data-ui-theme='dark']"];
|
|
927
|
+
};
|
|
928
|
+
readonly overrideFile: "src/styles/ui-theme.css";
|
|
929
|
+
readonly rules: readonly ["Import the package stylesheet before your project theme override stylesheet.", "Override tokens in one shared theme file instead of scattering colors across components.", "Use :root for the default light theme and .dark or [data-ui-theme='dark'] for dark theme.", "Only override tokens declared here. Do not patch component internals unless you are extending the library.", "For AI-generated screens, choose one theme source of truth and keep component code token-driven."];
|
|
930
|
+
readonly tokens: {
|
|
931
|
+
name: string;
|
|
932
|
+
description: string;
|
|
933
|
+
defaultLight: string;
|
|
934
|
+
defaultDark: string;
|
|
935
|
+
usedBy: string[];
|
|
936
|
+
}[];
|
|
937
|
+
readonly exampleCss: ":root {\n --tw-primary: 12 88% 56%;\n --tw-accent: 24 95% 52%;\n --primary-grad-from: 24 95% 52%;\n --primary-grad-to: 12 88% 56%;\n --surface: rgba(255, 248, 240, 0.92);\n}\n\n.dark {\n --tw-primary: 18 100% 62%;\n --tw-accent: 35 100% 58%;\n --surface: rgba(24, 24, 27, 0.82);\n}";
|
|
938
|
+
};
|
|
939
|
+
declare const uiProjectAiRules: readonly ["Use @lucasvu/scope-ui as the default UI library.", "Import @lucasvu/scope-ui/styles.css once at the app entry.", "Import the project override theme file after the package stylesheet.", "Read uiAiManifest to choose the correct component by intent before coding.", "Read uiThemeContract before changing colors, shadows, or theme behavior.", "Prefer root exports and avoid MainFe unless the task explicitly targets a legacy screen."];
|
|
940
|
+
|
|
839
941
|
type ClassValue = string | false | null | undefined;
|
|
840
942
|
declare function cn(...values: ClassValue[]): string;
|
|
841
943
|
|
|
842
|
-
export { Alert, type AlertProps, ArgonSidebar, AsyncCombobox, type AsyncComboboxProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, Button$1 as Button, type ButtonProps$1 as ButtonProps, Card$1 as Card, CardAction$1 as CardAction, CardContent$1 as CardContent, CardDescription$1 as CardDescription, CardFooter$1 as CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle, Combobox$1 as Combobox, type ComboboxOption$2 as ComboboxOption, DataTable$1 as DataTable, type DataTableAlign$1 as DataTableAlign, type DataTableColumn$1 as DataTableColumn, type DataTablePagination$1 as DataTablePagination, type DataTableProps$1 as DataTableProps, type DataTableRowSelection$1 as DataTableRowSelection, type DataTableSortDirection$1 as DataTableSortDirection, type DataTableSortState$1 as DataTableSortState, FormField as Field, Form, FormControl, FormDescription, FormField, type FormFieldProps, FormItem, FormLabel, FormMessage, Input$1 as Input, type InputProps$1 as InputProps, LineClampTooltip, type LineClampTooltipProps, Loading, type LoadingProps, index as MainFe, MultiSelect, type MultiSelectOption, NumericInput, type NumericInputProps, type Option, OverflowTooltip, type OverflowTooltipProps, PageTitle$1 as PageTitle, Pagination, type PaginationInfo, type PaginationProps, type PermissionChecker, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, SectionTitle$1 as SectionTitle, Select, type SelectProps, Sidebar, SidebarItem, type SidebarProps, Stat, type StatProps, type TabItem, Table$1 as Table, TableBody$1 as TableBody, TableCell$1 as TableCell, TableHeader$1 as TableHeader, TableRow$1 as TableRow, Tabs, type TabsProps, Tooltip, type Trend, TruncatedText, type TruncatedTextProps, cn, defaultPermissionChecker, filterSidebarItems, hasActiveDescendant };
|
|
944
|
+
export { Alert, type AlertProps, ArgonSidebar, AsyncCombobox, type AsyncComboboxProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, Button$1 as Button, type ButtonProps$1 as ButtonProps, Card$1 as Card, CardAction$1 as CardAction, CardContent$1 as CardContent, CardDescription$1 as CardDescription, CardFooter$1 as CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle, Combobox$1 as Combobox, type ComboboxOption$2 as ComboboxOption, FormControl as Control, DataTable$1 as DataTable, type DataTableAlign$1 as DataTableAlign, type DataTableColumn$1 as DataTableColumn, type DataTablePagination$1 as DataTablePagination, type DataTableProps$1 as DataTableProps, type DataTableRowSelection$1 as DataTableRowSelection, type DataTableSortDirection$1 as DataTableSortDirection, type DataTableSortState$1 as DataTableSortState, FormDescription as Description, FormField as Field, Form, FormControl, FormDescription, FormField, type FormFieldProps, FormItem, FormLabel, FormMessage, Input$1 as Input, type InputProps$1 as InputProps, FormItem as Item, FormLabel as Label, LineClampTooltip, type LineClampTooltipProps, Loading, type LoadingProps, index as MainFe, FormMessage as Message, MultiSelect, type MultiSelectOption, NumericInput, type NumericInputProps, type Option, OverflowTooltip, type OverflowTooltipProps, PageTitle$1 as PageTitle, Pagination, type PaginationInfo, type PaginationProps, type PermissionChecker, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, SectionTitle$1 as SectionTitle, Select, type SelectOption, type SelectProps, Sidebar, SidebarItem, type SidebarProps, Stat, type StatProps, type TabItem, Table$1 as Table, TableBody$1 as TableBody, TableCell$1 as TableCell, TableHeader$1 as TableHeader, TableRow$1 as TableRow, Tabs, type TabsProps, Textarea, type TextareaProps, Tooltip, type Trend, TruncatedText, type TruncatedTextProps, type UiAiComponentDescriptor, type UiAiComponentProp, type UiThemeToken, cn, defaultPermissionChecker, filterSidebarItems, hasActiveDescendant, uiAiManifest, uiProjectAiRules, uiThemeContract };
|