@factorialco/f0-react 1.279.2 → 1.280.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/dist/f0.d.ts CHANGED
@@ -224,6 +224,10 @@ declare const alertAvatarVariants: (props?: ({
224
224
 
225
225
  declare type AlertTagProps = ComponentProps<typeof F0TagAlert>;
226
226
 
227
+ declare const _allowedVariants: readonly ["heading", "heading-large"];
228
+
229
+ declare const _allowedVariants_2: readonly ["body", "description", "small", "inverse", "code", "label"];
230
+
227
231
  export declare type AllSelectionStatus = {
228
232
  checked: boolean;
229
233
  indeterminate: boolean;
@@ -231,6 +235,8 @@ export declare type AllSelectionStatus = {
231
235
  unselectedCount: number;
232
236
  };
233
237
 
238
+ declare const allTags: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "p", "span", "div", "label", "code"];
239
+
234
240
  declare type AnimationVariantsOptions = {
235
241
  delay?: number;
236
242
  duration?: number;
@@ -244,6 +250,8 @@ canBeBlurred?: boolean;
244
250
  blurArea?: "l" | "r" | "lr";
245
251
  } & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
246
252
 
253
+ declare type AsAllowedList = (typeof allTags)[number];
254
+
247
255
  declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & {
248
256
  size?: (typeof internalAvatarSizes)[number];
249
257
  type?: (typeof internalAvatarTypes)[number];
@@ -2229,6 +2237,13 @@ export declare interface F0GridStackRef {
2229
2237
  removeAll: () => void;
2230
2238
  }
2231
2239
 
2240
+ export declare const F0Heading: ForwardRefExoticComponent<Omit<F0HeadingProps, "ref"> & RefAttributes<HTMLElement>>;
2241
+
2242
+ export declare type F0HeadingProps = Omit<TextProps, "className" | "variant" | "as"> & {
2243
+ variant?: (typeof _allowedVariants)[number];
2244
+ as?: HeadingTags;
2245
+ };
2246
+
2232
2247
  export declare const F0Icon: ForwardRefExoticComponent<Omit<Omit<F0IconProps_2, "ref"> & RefAttributes<SVGSVGElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
2233
2248
 
2234
2249
  export declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
@@ -2285,6 +2300,14 @@ export declare const F0TagStatus: ForwardRefExoticComponent<TagStatusProps & Ref
2285
2300
 
2286
2301
  export declare const F0TagTeam: ForwardRefExoticComponent<TagTeamProps & RefAttributes<HTMLDivElement>>;
2287
2302
 
2303
+ export declare const F0Text: ForwardRefExoticComponent<Omit<F0TextProps, "ref"> & RefAttributes<HTMLElement>>;
2304
+
2305
+ export declare type F0TextProps = Omit<TextProps, "className" | "variant" | "as"> & {
2306
+ variant?: (typeof _allowedVariants_2)[number];
2307
+ as?: TextTags;
2308
+ markdown?: boolean;
2309
+ };
2310
+
2288
2311
  export declare type FileAvatarVariant = Extract<AvatarVariant, {
2289
2312
  type: "file";
2290
2313
  }>;
@@ -2552,6 +2575,10 @@ export declare type GroupRecord<RecordType> = {
2552
2575
  records: RecordType[];
2553
2576
  };
2554
2577
 
2578
+ declare type HeadingTags = (typeof headingTags)[number];
2579
+
2580
+ declare const headingTags: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
2581
+
2555
2582
  export declare const HomeLayout: ForwardRefExoticComponent<Omit<{
2556
2583
  widgets?: ReactNode[];
2557
2584
  children?: ReactNode;
@@ -3776,6 +3803,70 @@ export declare type TeamAvatarVariant = Extract<AvatarVariant, {
3776
3803
 
3777
3804
  declare type TeamTagProps = ComponentProps<typeof F0TagTeam>;
3778
3805
 
3806
+ declare interface TextProps extends Omit<default_2.HTMLAttributes<HTMLElement>, "className">, default_2.RefAttributes<HTMLElement> {
3807
+ /**
3808
+ * Content to be rendered
3809
+ */
3810
+ content: string;
3811
+ /**
3812
+ * The text variant to render. Determines styling and default semantic element.
3813
+ */
3814
+ variant?: TextVariant;
3815
+ /**
3816
+ * Text alignment
3817
+ * @default left
3818
+ */
3819
+ align?: NonNullable<TextVariants["align"]>;
3820
+ /**
3821
+ * Additional classes to apply
3822
+ * @private
3823
+ */
3824
+ className?: string;
3825
+ /**
3826
+ * HTML tag name to use for rendered element.
3827
+ * If not provided, uses semantic default based on variant.
3828
+ * @default varies by variant
3829
+ */
3830
+ as?: AsAllowedList;
3831
+ /**
3832
+ * Enable text ellipsis with optional line configuration
3833
+ * - `true`: Single line ellipsis (lines = 1)
3834
+ * - `number`: Multi-line ellipsis with specified line count
3835
+ * - `undefined`: No ellipsis
3836
+ */
3837
+ ellipsis?: boolean | number;
3838
+ /**
3839
+ * Disable tooltip when text is truncated
3840
+ * Only applies when ellipsis is enabled
3841
+ * @default false
3842
+ */
3843
+ noEllipsisTooltip?: boolean;
3844
+ /**
3845
+ * Enable markdown parsing for content
3846
+ * @default false
3847
+ */
3848
+ markdown?: boolean;
3849
+ }
3850
+
3851
+ declare type TextTags = (typeof textTags)[number];
3852
+
3853
+ declare const textTags: readonly ["p", "span", "div", "label", "code"];
3854
+
3855
+ declare type TextVariant = NonNullable<TextVariants["variant"]>;
3856
+
3857
+ declare type TextVariants = VariantProps<typeof textVariants>;
3858
+
3859
+ declare const textVariants: (props?: ({
3860
+ variant?: "info" | "small" | "body" | "code" | "label" | "description" | "selected" | "heading" | "positive" | "inverse" | "critical" | "warning" | "heading-large" | "label-input" | "warning-strong" | "critical-strong" | "positive-strong" | "info-strong" | undefined;
3861
+ align?: "center" | "left" | "right" | undefined;
3862
+ } & ({
3863
+ class?: ClassValue;
3864
+ className?: never;
3865
+ } | {
3866
+ class?: never;
3867
+ className?: ClassValue;
3868
+ })) | undefined) => string;
3869
+
3779
3870
  declare type TranslationKey = Join<PathsToStringProps<typeof defaultTranslations>, ".">;
3780
3871
 
3781
3872
  declare type TranslationShape<T> = {
@@ -4204,31 +4295,6 @@ declare global {
4204
4295
  }
4205
4296
 
4206
4297
 
4207
- declare module "gridstack" {
4208
- interface GridStackWidget {
4209
- id?: string;
4210
- allowedSizes?: Array<{
4211
- w: number;
4212
- h: number;
4213
- }>;
4214
- renderFn?: () => React.ReactElement | null;
4215
- meta?: Record<string, unknown>;
4216
- }
4217
- interface GridStackNode {
4218
- id?: string;
4219
- w?: number;
4220
- h?: number;
4221
- x?: number;
4222
- y?: number;
4223
- allowedSizes?: Array<{
4224
- w: number;
4225
- h: number;
4226
- }>;
4227
- renderFn?: () => React.ReactElement | null;
4228
- }
4229
- }
4230
-
4231
-
4232
4298
  declare module "@tiptap/core" {
4233
4299
  interface Commands<ReturnType> {
4234
4300
  aiBlock: {
@@ -4256,6 +4322,31 @@ declare module "@tiptap/core" {
4256
4322
  }
4257
4323
 
4258
4324
 
4325
+ declare module "gridstack" {
4326
+ interface GridStackWidget {
4327
+ id?: string;
4328
+ allowedSizes?: Array<{
4329
+ w: number;
4330
+ h: number;
4331
+ }>;
4332
+ renderFn?: () => React.ReactElement | null;
4333
+ meta?: Record<string, unknown>;
4334
+ }
4335
+ interface GridStackNode {
4336
+ id?: string;
4337
+ w?: number;
4338
+ h?: number;
4339
+ x?: number;
4340
+ y?: number;
4341
+ allowedSizes?: Array<{
4342
+ w: number;
4343
+ h: number;
4344
+ }>;
4345
+ renderFn?: () => React.ReactElement | null;
4346
+ }
4347
+ }
4348
+
4349
+
4259
4350
  declare module "@tiptap/core" {
4260
4351
  interface Commands<ReturnType> {
4261
4352
  moodTracker: {