@spaethtech/svelte-ui 0.4.1-dev.18.08f6e25 → 0.4.1-dev.20.b3f6fb8
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.
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
// Base classes - height is always h-8 (32px), width is h-8 for icon-only
|
|
78
78
|
const baseClasses =
|
|
79
|
-
"inline-flex items-center justify-center [border-radius:var(--ui-border-radius)] font-medium transition-colors no-underline cursor-pointer border focus-visible:[outline:2px_solid_color-mix(in_srgb,var(--ui-color-text)_70%,transparent)] focus-visible:[outline-offset:0px]";
|
|
79
|
+
"inline-flex shrink-0 items-center justify-center [border-radius:var(--ui-border-radius)] font-medium transition-colors no-underline cursor-pointer border focus-visible:[outline:2px_solid_color-mix(in_srgb,var(--ui-color-text)_70%,transparent)] focus-visible:[outline-offset:0px]";
|
|
80
80
|
|
|
81
81
|
// Additional classes for disabled state (only applies to buttons)
|
|
82
82
|
const disabledClasses = href ? "" : "disabled:opacity-50 disabled:cursor-not-allowed";
|
|
@@ -148,8 +148,9 @@
|
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
150
|
|
|
151
|
-
// Enforce
|
|
152
|
-
|
|
151
|
+
// Enforce a sane floor (never 0/negative) and handle maxRows auto-sizing. Floor is 1 so a
|
|
152
|
+
// single-row TextArea is possible (e.g. a chat/compose box that grows from one line).
|
|
153
|
+
const effectiveMinRows = $derived(Math.max(minRows, 1));
|
|
153
154
|
const effectiveMaxRows = $derived(maxRows ?? Infinity);
|
|
154
155
|
// disabled overrides readonly + the copy mode. `button` shows the button; `none` also blocks selection.
|
|
155
156
|
const effectiveReadonly = $derived(disabled ? true : readonly);
|