@versaur/react 1.0.8 → 1.0.10

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/blocks.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { AppLayout as AppLayout_2 } from '@versaur/core/blocks';
2
1
  import { AttributeList as AttributeList_2 } from '@versaur/core/blocks';
3
2
  import { AvatarGroup as AvatarGroup_2 } from '@versaur/core/blocks';
4
3
  import { AvatarGroupAlign } from '@versaur/core/blocks';
@@ -27,6 +26,7 @@ import { default as default_2 } from 'react';
27
26
  import { DialogHTMLAttributes } from 'react';
28
27
  import { Drawer as Drawer_2 } from '@versaur/core/blocks';
29
28
  import { ElementType } from 'react';
29
+ import { FormHTMLAttributes } from 'react';
30
30
  import { ForwardRefExoticComponent } from 'react';
31
31
  import { HTMLAttributes } from 'react';
32
32
  import { Menu as Menu_2 } from '@versaur/core/blocks';
@@ -74,38 +74,27 @@ export declare interface AccordionSummaryProps extends HTMLAttributes<HTMLElemen
74
74
  export declare const AppLayout: AppLayoutType;
75
75
 
76
76
  declare interface AppLayoutBodyProps {
77
+ /** Constrains Main content to max-width and centers it */
78
+ centered?: boolean;
77
79
  className?: string;
78
80
  children?: ReactNode;
79
81
  }
80
82
 
81
- declare interface AppLayoutMainProps extends AppLayoutRegionProps {
82
- /**
83
- * Controls content width constraint and alignment.
84
- * - 'full-width': Content uses the entire main area width
85
- * - 'centred': Content is constrained to max-width and centered
86
- * @default 'full-width'
87
- */
88
- placement?: AppLayout_2.Placement;
89
- }
90
-
91
83
  export declare interface AppLayoutRegionProps {
92
84
  className?: string;
93
85
  children?: ReactNode;
94
86
  }
95
87
 
96
88
  export declare interface AppLayoutRootProps {
97
- variant?: AppLayout_2.Variant;
98
- hideHeader?: boolean;
99
- hideBottom?: boolean;
100
89
  className?: string;
101
90
  children?: ReactNode;
102
91
  }
103
92
 
104
93
  declare interface AppLayoutType extends ForwardRefExoticComponent<AppLayoutRootProps & RefAttributes<HTMLDivElement>> {
105
94
  Body: ForwardRefExoticComponent<AppLayoutBodyProps & RefAttributes<HTMLDivElement>>;
106
- Bottom: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
95
+ Footer: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
107
96
  Header: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
108
- Main: ForwardRefExoticComponent<AppLayoutMainProps & RefAttributes<HTMLElement>>;
97
+ Main: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
109
98
  SideLeft: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
110
99
  SideRight: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
111
100
  }
@@ -115,9 +104,7 @@ declare interface AsProp<C extends ElementType = ElementType> {
115
104
  }
116
105
 
117
106
  export declare namespace AttributeList {
118
- export type Columns = AttributeList_2.Columns;
119
- export type ColumnSpan = AttributeList_2.ColumnSpan;
120
- export type ContentLineClamp = AttributeList_2.ContentLineClamp;
107
+ export type Layout = AttributeList_2.Layout;
121
108
  export type Props = AttributeListProps;
122
109
  export type ItemProps = AttributeListItemProps;
123
110
  }
@@ -133,7 +120,7 @@ declare interface AttributeListComponent extends default_2.ForwardRefExoticCompo
133
120
  *
134
121
  * @example
135
122
  * ```tsx
136
- * <AttributeList.Item columnSpan="2" title="Email">
123
+ * <AttributeList.Item area="span 2" title="Email">
137
124
  * john.doe@example.com
138
125
  * </AttributeList.Item>
139
126
  * ```
@@ -146,15 +133,9 @@ export declare interface AttributeListItemProps extends HTMLAttributes<HTMLDivEl
146
133
  */
147
134
  title: string;
148
135
  /**
149
- * Number of columns to span in the grid (1-6, auto-clamped to columns count)
150
- * @default '1'
151
- */
152
- columnSpan?: AttributeList_2.ColumnSpan;
153
- /**
154
- * Number of lines to display before truncating with ellipsis (1-5)
155
- * @default '2'
136
+ * CSS grid-column: e.g. "span 3", "1 / 4"
156
137
  */
157
- contentLineClamp?: AttributeList_2.ContentLineClamp;
138
+ area?: string;
158
139
  /**
159
140
  * The value content (can be text, links, badges, etc.)
160
141
  */
@@ -163,10 +144,20 @@ export declare interface AttributeListItemProps extends HTMLAttributes<HTMLDivEl
163
144
 
164
145
  export declare interface AttributeListProps extends HTMLAttributes<HTMLDListElement> {
165
146
  /**
166
- * Number of columns for the grid layout
167
- * @default '3'
147
+ * Layout mode: stacked (default) or tabular
148
+ * @default 'stacked'
168
149
  */
169
- columns?: AttributeList_2.Columns;
150
+ layout?: AttributeList_2.Layout;
151
+ /**
152
+ * CSS grid-template-columns: e.g. "1fr 1fr 1fr", "200px 1fr"
153
+ * @default 'repeat(3, 1fr)'
154
+ */
155
+ columns?: string;
156
+ /**
157
+ * Gap between items: number (in px) or CSS string value
158
+ * @default spacing-3 (12px)
159
+ */
160
+ gap?: number | string;
170
161
  /**
171
162
  * AttributeList.Item components
172
163
  */
@@ -546,6 +537,74 @@ export declare interface DrawerRootProps extends Omit<DialogHTMLAttributes<HTMLD
546
537
  children?: ReactNode;
547
538
  }
548
539
 
540
+ export declare namespace Features {
541
+ export type Props = FeaturesProps;
542
+ export type ItemProps = FeaturesItemProps;
543
+ export type Direction = FeaturesDirection;
544
+ }
545
+
546
+ export declare const Features: FeaturesComponent;
547
+
548
+ declare interface FeaturesComponent extends default_2.ForwardRefExoticComponent<FeaturesProps & default_2.RefAttributes<HTMLUListElement>> {
549
+ Item: typeof FeaturesItem;
550
+ }
551
+
552
+ export declare type FeaturesDirection = "row" | "column";
553
+
554
+ declare const FeaturesItem: ForwardRefExoticComponent<FeaturesItemProps & RefAttributes<HTMLLIElement>>;
555
+
556
+ export declare interface FeaturesItemProps extends HTMLAttributes<HTMLLIElement> {
557
+ /** Icon node rendered on the left side of the item content */
558
+ icon?: ReactNode;
559
+ children?: ReactNode;
560
+ /**
561
+ * Native accessible label for the item.
562
+ * When provided, also renders a Tooltip on hover showing this text.
563
+ */
564
+ "aria-label"?: string;
565
+ }
566
+
567
+ export declare interface FeaturesProps extends HTMLAttributes<HTMLUListElement> {
568
+ /** Flex direction of the feature list. Default: "column" */
569
+ direction?: FeaturesDirection;
570
+ children?: ReactNode;
571
+ }
572
+
573
+ export declare const FormGroup: FormGroupComponent;
574
+
575
+ /**
576
+ * FormGroup Compound Component
577
+ */
578
+ declare interface FormGroupComponent extends React.ForwardRefExoticComponent<FormGroupProps & React.RefAttributes<HTMLFormElement>> {
579
+ Field: typeof FormGroupField;
580
+ Separator: typeof FormGroupSeparator;
581
+ }
582
+
583
+ /**
584
+ * FormGroup.Field - A grid item container for form controls
585
+ */
586
+ declare const FormGroupField: ForwardRefExoticComponent<FormGroupFieldProps & RefAttributes<HTMLDivElement>>;
587
+
588
+ export declare interface FormGroupFieldProps extends HTMLAttributes<HTMLDivElement> {
589
+ /** CSS grid-column value, e.g. "span 2", "1 / 4" */
590
+ area?: string;
591
+ children?: ReactNode;
592
+ }
593
+
594
+ export declare interface FormGroupProps extends FormHTMLAttributes<HTMLFormElement> {
595
+ /** CSS grid-template-columns value, e.g. "repeat(3, 1fr)". Default: "1fr" */
596
+ columns?: string;
597
+ children?: ReactNode;
598
+ }
599
+
600
+ /**
601
+ * FormGroup.Separator - A full-width horizontal separator
602
+ */
603
+ declare const FormGroupSeparator: ForwardRefExoticComponent<FormGroupSeparatorProps & RefAttributes<HTMLHRElement>>;
604
+
605
+ export declare interface FormGroupSeparatorProps extends HTMLAttributes<HTMLHRElement> {
606
+ }
607
+
549
608
  /**
550
609
  * Helper function to get attributes for tabpanel elements
551
610
  *