@rovula/ui 0.1.33 → 0.1.35

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.
@@ -31,6 +31,11 @@ export type FormDialogProps = {
31
31
  extraAction?: FormDialogAction;
32
32
  scrollable?: boolean;
33
33
  className?: string;
34
+ headerClassName?: string;
35
+ titleClassName?: string;
36
+ descriptionClassName?: string;
37
+ bodyClassName?: string;
38
+ footerClassName?: string;
34
39
  /**
35
40
  * When provided, the confirm button becomes type="submit" and is linked to this form id.
36
41
  * Use together with a <Form id={formId} .../> inside children.
@@ -20,6 +20,11 @@ declare const meta: {
20
20
  extraAction?: import("./FormDialog").FormDialogAction | undefined;
21
21
  scrollable?: boolean | undefined;
22
22
  className?: string | undefined;
23
+ headerClassName?: string | undefined;
24
+ titleClassName?: string | undefined;
25
+ descriptionClassName?: string | undefined;
26
+ bodyClassName?: string | undefined;
27
+ footerClassName?: string | undefined;
23
28
  formId?: string | undefined;
24
29
  testId?: string | undefined;
25
30
  }>) => import("react/jsx-runtime").JSX.Element)[];
@@ -18,7 +18,7 @@ const Popover = PopoverPrimitive.Root;
18
18
  const PopoverTrigger = PopoverPrimitive.Trigger;
19
19
  const PopoverContent = React.forwardRef((_a, ref) => {
20
20
  var { className, align = "center", sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
21
- return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, Object.assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 min-w-72 rounded-md border bg-modal-surface border-bg-stroke3 overflow-hidden p-0 text-text-g-contrast-medium shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
21
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, Object.assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 min-w-72 rounded-md border bg-modal-surface border-bg-stroke3 overflow-hidden p-0 text-text-contrast-max shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
22
22
  });
23
23
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
24
24
  export { Popover, PopoverTrigger, PopoverContent };
@@ -25,11 +25,7 @@ export const TextInput = forwardRef((_a, ref) => {
25
25
  const hasLeftSectionIcon = !!startIcon || !!renderStartIcon;
26
26
  const hasRightSectionIcon = !!endIcon || !!renderEndIcon;
27
27
  const feedbackStatus = status ||
28
- (error || !!errorMessage
29
- ? "error"
30
- : warning || !!warningMessage
31
- ? "warning"
32
- : "default");
28
+ (error ? "error" : warning || !!warningMessage ? "warning" : "default");
33
29
  const isError = feedbackStatus === "error";
34
30
  const isWarning = feedbackStatus === "warning";
35
31
  const feedbackMessage = feedbackStatus === "error"
@@ -35,7 +35,7 @@ export const Default = {
35
35
  * Pair with `required={false}` + `hasClearIcon={false}` when mimicking inline fields.
36
36
  */
37
37
  export const NonFloatingLabel = {
38
- render: () => (_jsxs("div", { className: "flex w-full max-w-4xl flex-col gap-8", children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("h4", { className: "typography-subtitle4 text-text-g-contrast-medium", children: ["Placeholder only \u2014 empty ", _jsx("code", { className: "typography-small2", children: "label" }), " ", "(no floating label, no label node)"] }), _jsx("p", { className: "typography-small2 text-text-g-contrast-low max-w-2xl", children: "Tab order follows DOM, like native inputs in a row." }), _jsxs("div", { className: "flex flex-row flex-wrap items-end gap-4", children: [_jsx(TextInput, { id: "nf-cell-lg", size: "lg", isFloatingLabel: false, label: "", required: false, hasClearIcon: false, keepFooterSpace: false, placeholder: "Column name", fullwidth: false, "aria-label": "Column name" }), _jsx(TextInput, { id: "nf-cell-md", size: "md", isFloatingLabel: false, label: "", required: false, hasClearIcon: false, keepFooterSpace: false, placeholder: "Column name", fullwidth: false, "aria-label": "Column name" }), _jsx(TextInput, { id: "nf-cell-sm", size: "sm", isFloatingLabel: false, label: "", required: false, hasClearIcon: false, keepFooterSpace: false, placeholder: "Column name", fullwidth: false, "aria-label": "Column name" })] })] }), _jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("h4", { className: "typography-subtitle4 text-text-g-contrast-medium", children: "Static label inside field (non-floating layout)" }), _jsx("div", { className: "flex flex-row flex-wrap gap-4", children: _jsx(TextInput, { id: "nf-static-md", size: "md", isFloatingLabel: false, label: "Department", required: false, hasClearIcon: true, keepFooterSpace: true, placeholder: "e.g. Engineering", helperText: "Shown as fixed label + real placeholder.", fullwidth: false, className: "min-w-[240px]" }) })] })] })),
38
+ render: () => (_jsxs("div", { className: "flex w-full max-w-4xl flex-col gap-8", children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("h4", { className: "typography-subtitle4 text-text-g-contrast-medium", children: ["Placeholder only \u2014 empty", " ", _jsx("code", { className: "typography-small2", children: "label" }), " (no floating label, no label node)"] }), _jsx("p", { className: "typography-small2 text-text-g-contrast-low max-w-2xl", children: "Tab order follows DOM, like native inputs in a row." }), _jsxs("div", { className: "flex flex-row flex-wrap items-end gap-4", children: [_jsx(TextInput, { id: "nf-cell-lg", size: "lg", isFloatingLabel: false, label: "", required: false, hasClearIcon: false, keepFooterSpace: false, placeholder: "Column name", fullwidth: false, "aria-label": "Column name" }), _jsx(TextInput, { id: "nf-cell-md", size: "md", isFloatingLabel: false, label: "", required: false, hasClearIcon: false, keepFooterSpace: false, placeholder: "Column name", fullwidth: false, "aria-label": "Column name" }), _jsx(TextInput, { id: "nf-cell-sm", size: "sm", isFloatingLabel: false, label: "", required: false, hasClearIcon: false, keepFooterSpace: false, placeholder: "Column name", fullwidth: false, "aria-label": "Column name" })] })] }), _jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("h4", { className: "typography-subtitle4 text-text-g-contrast-medium", children: "Static label inside field (non-floating layout)" }), _jsx("div", { className: "flex flex-row flex-wrap gap-4", children: _jsx(TextInput, { id: "nf-static-md", size: "md", isFloatingLabel: false, label: "Department", required: false, hasClearIcon: true, keepFooterSpace: true, placeholder: "e.g. Engineering", helperText: "Shown as fixed label + real placeholder.", fullwidth: false, className: "min-w-[240px]" }) })] })] })),
39
39
  };
40
40
  const InputWithRef = (props) => {
41
41
  const inputRef = useRef(null);
@@ -125,7 +125,7 @@ export const Format = {
125
125
  };
126
126
  const TrimOnCommitDemo = () => {
127
127
  const [value, setValue] = useState("");
128
- return (_jsxs("div", { className: "flex flex-col gap-6 w-full max-w-md", children: [_jsxs("p", { className: "text-sm text-text-g-contrast-low", children: [_jsx("code", { children: "trimOnCommit" }), " trims leading and trailing whitespace when the user blurs the input or presses Enter. Try typing", " ", _jsx("code", { children: "\"hello \"" }), " then click outside or press Enter."] }), _jsx(TextInput, { id: "trim-commit-demo", label: "Name", size: "lg", keepFooterSpace: true, helperText: `Stored value: "${value}"`, value: value, trimOnCommit: true, onChange: (e) => setValue(e.target.value) })] }));
128
+ return (_jsxs("div", { className: "flex flex-col gap-6 w-full max-w-md", children: [_jsxs("p", { className: "text-sm text-text-g-contrast-low", children: [_jsx("code", { children: "trimOnCommit" }), " trims leading and trailing whitespace when the user blurs the input or presses Enter. Try typing ", _jsx("code", { children: "\"hello \"" }), " ", "then click outside or press Enter."] }), _jsx(TextInput, { id: "trim-commit-demo", label: "Name", size: "lg", keepFooterSpace: true, helperText: `Stored value: "${value}"`, value: value, trimOnCommit: true, onChange: (e) => setValue(e.target.value) })] }));
129
129
  };
130
130
  export const TrimOnCommit = {
131
131
  render: () => _jsx(TrimOnCommitDemo, {}),