@rovula/ui 0.1.32 → 0.1.34

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.
@@ -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-bg-bg1 border-none overflow-hidden p-0 text-common-black 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, {}),
@@ -1766,9 +1766,6 @@ input[type=number] {
1766
1766
  .border-solid{
1767
1767
  border-style: solid;
1768
1768
  }
1769
- .border-none{
1770
- border-style: none;
1771
- }
1772
1769
  .\!border-action-button-solid-active-hover{
1773
1770
  --tw-border-opacity: 1 !important;
1774
1771
  border-color: color-mix(in srgb, var(--action-button-solid-active-hover-border) calc(100% * var(--tw-border-opacity, 1)), transparent) !important;