@factorialco/f0-react 1.279.2 → 1.281.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];
@@ -1746,6 +1754,56 @@ export declare const defaultTranslations: {
1746
1754
  readonly greaterThan: "It should be greater than {{min}}";
1747
1755
  readonly lessThan: "It should be less than {{max}}";
1748
1756
  };
1757
+ readonly coCreationForm: {
1758
+ readonly actions: {
1759
+ readonly actions: "Actions";
1760
+ readonly duplicateQuestion: "Duplicate question";
1761
+ readonly deleteQuestion: "Delete question";
1762
+ readonly duplicateSection: "Duplicate section";
1763
+ readonly deleteSection: "Delete section";
1764
+ };
1765
+ readonly questionTypes: {
1766
+ readonly section: "Section";
1767
+ readonly rating: "Rating";
1768
+ readonly multipleChoice: "Multiple choice";
1769
+ readonly singleChoice: "Single choice";
1770
+ readonly text: "Text";
1771
+ readonly longText: "Long text";
1772
+ readonly numeric: "Numeric";
1773
+ readonly link: "Link";
1774
+ readonly date: "Date";
1775
+ };
1776
+ readonly selectQuestion: {
1777
+ readonly addOption: "Add option";
1778
+ readonly newOption: "New option {{number}}";
1779
+ readonly markAsCorrect: "Mark as correct";
1780
+ readonly remove: "Remove";
1781
+ readonly correct: "Correct";
1782
+ readonly optionPlaceholder: "Type anything you want here...";
1783
+ };
1784
+ readonly answer: {
1785
+ readonly label: "Answer";
1786
+ readonly placeholder: "Respondent's answer";
1787
+ };
1788
+ readonly labels: {
1789
+ readonly endOfSection: "End of section";
1790
+ readonly title: "Title";
1791
+ readonly titlePlaceholder: "Question title";
1792
+ readonly description: "Description";
1793
+ readonly questionDescriptionPlaceholder: "Describe the question in a few words";
1794
+ readonly sectionDescriptionPlaceholder: "Describe the section in a few words";
1795
+ readonly required: "Required";
1796
+ readonly questionType: "Question type";
1797
+ readonly questionOptions: "Question options";
1798
+ readonly actions: "Actions";
1799
+ readonly sectionTitlePlaceholder: "Section title";
1800
+ };
1801
+ readonly defaults: {
1802
+ readonly newSection: "New Section";
1803
+ readonly newQuestion: "New Question";
1804
+ readonly newQuestionDescription: "New question description";
1805
+ };
1806
+ };
1749
1807
  };
1750
1808
 
1751
1809
  /**
@@ -2229,6 +2287,13 @@ export declare interface F0GridStackRef {
2229
2287
  removeAll: () => void;
2230
2288
  }
2231
2289
 
2290
+ export declare const F0Heading: ForwardRefExoticComponent<Omit<F0HeadingProps, "ref"> & RefAttributes<HTMLElement>>;
2291
+
2292
+ export declare type F0HeadingProps = Omit<TextProps, "className" | "variant" | "as"> & {
2293
+ variant?: (typeof _allowedVariants)[number];
2294
+ as?: HeadingTags;
2295
+ };
2296
+
2232
2297
  export declare const F0Icon: ForwardRefExoticComponent<Omit<Omit<F0IconProps_2, "ref"> & RefAttributes<SVGSVGElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
2233
2298
 
2234
2299
  export declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
@@ -2285,6 +2350,14 @@ export declare const F0TagStatus: ForwardRefExoticComponent<TagStatusProps & Ref
2285
2350
 
2286
2351
  export declare const F0TagTeam: ForwardRefExoticComponent<TagTeamProps & RefAttributes<HTMLDivElement>>;
2287
2352
 
2353
+ export declare const F0Text: ForwardRefExoticComponent<Omit<F0TextProps, "ref"> & RefAttributes<HTMLElement>>;
2354
+
2355
+ export declare type F0TextProps = Omit<TextProps, "className" | "variant" | "as"> & {
2356
+ variant?: (typeof _allowedVariants_2)[number];
2357
+ as?: TextTags;
2358
+ markdown?: boolean;
2359
+ };
2360
+
2288
2361
  export declare type FileAvatarVariant = Extract<AvatarVariant, {
2289
2362
  type: "file";
2290
2363
  }>;
@@ -2552,6 +2625,10 @@ export declare type GroupRecord<RecordType> = {
2552
2625
  records: RecordType[];
2553
2626
  };
2554
2627
 
2628
+ declare type HeadingTags = (typeof headingTags)[number];
2629
+
2630
+ declare const headingTags: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
2631
+
2555
2632
  export declare const HomeLayout: ForwardRefExoticComponent<Omit<{
2556
2633
  widgets?: ReactNode[];
2557
2634
  children?: ReactNode;
@@ -3776,6 +3853,70 @@ export declare type TeamAvatarVariant = Extract<AvatarVariant, {
3776
3853
 
3777
3854
  declare type TeamTagProps = ComponentProps<typeof F0TagTeam>;
3778
3855
 
3856
+ declare interface TextProps extends Omit<default_2.HTMLAttributes<HTMLElement>, "className">, default_2.RefAttributes<HTMLElement> {
3857
+ /**
3858
+ * Content to be rendered
3859
+ */
3860
+ content: string;
3861
+ /**
3862
+ * The text variant to render. Determines styling and default semantic element.
3863
+ */
3864
+ variant?: TextVariant;
3865
+ /**
3866
+ * Text alignment
3867
+ * @default left
3868
+ */
3869
+ align?: NonNullable<TextVariants["align"]>;
3870
+ /**
3871
+ * Additional classes to apply
3872
+ * @private
3873
+ */
3874
+ className?: string;
3875
+ /**
3876
+ * HTML tag name to use for rendered element.
3877
+ * If not provided, uses semantic default based on variant.
3878
+ * @default varies by variant
3879
+ */
3880
+ as?: AsAllowedList;
3881
+ /**
3882
+ * Enable text ellipsis with optional line configuration
3883
+ * - `true`: Single line ellipsis (lines = 1)
3884
+ * - `number`: Multi-line ellipsis with specified line count
3885
+ * - `undefined`: No ellipsis
3886
+ */
3887
+ ellipsis?: boolean | number;
3888
+ /**
3889
+ * Disable tooltip when text is truncated
3890
+ * Only applies when ellipsis is enabled
3891
+ * @default false
3892
+ */
3893
+ noEllipsisTooltip?: boolean;
3894
+ /**
3895
+ * Enable markdown parsing for content
3896
+ * @default false
3897
+ */
3898
+ markdown?: boolean;
3899
+ }
3900
+
3901
+ declare type TextTags = (typeof textTags)[number];
3902
+
3903
+ declare const textTags: readonly ["p", "span", "div", "label", "code"];
3904
+
3905
+ declare type TextVariant = NonNullable<TextVariants["variant"]>;
3906
+
3907
+ declare type TextVariants = VariantProps<typeof textVariants>;
3908
+
3909
+ declare const textVariants: (props?: ({
3910
+ 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;
3911
+ align?: "center" | "left" | "right" | undefined;
3912
+ } & ({
3913
+ class?: ClassValue;
3914
+ className?: never;
3915
+ } | {
3916
+ class?: never;
3917
+ className?: ClassValue;
3918
+ })) | undefined) => string;
3919
+
3779
3920
  declare type TranslationKey = Join<PathsToStringProps<typeof defaultTranslations>, ".">;
3780
3921
 
3781
3922
  declare type TranslationShape<T> = {
@@ -4256,6 +4397,11 @@ declare module "@tiptap/core" {
4256
4397
  }
4257
4398
 
4258
4399
 
4400
+ declare namespace Calendar {
4401
+ var displayName: string;
4402
+ }
4403
+
4404
+
4259
4405
  declare module "@tiptap/core" {
4260
4406
  interface Commands<ReturnType> {
4261
4407
  moodTracker: {
@@ -4263,8 +4409,3 @@ declare module "@tiptap/core" {
4263
4409
  };
4264
4410
  }
4265
4411
  }
4266
-
4267
-
4268
- declare namespace Calendar {
4269
- var displayName: string;
4270
- }