@yomologic/react-ui 0.5.11 → 0.6.2
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/base.css +36 -0
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -15
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +67 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/base.css
CHANGED
|
@@ -69,6 +69,10 @@
|
|
|
69
69
|
--font-medium: 500;
|
|
70
70
|
--font-semibold: 600;
|
|
71
71
|
--font-bold: 700;
|
|
72
|
+
|
|
73
|
+
/* Font Families - Users can override these */
|
|
74
|
+
--font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
75
|
+
--font-family-input: var(--font-family-base);
|
|
72
76
|
|
|
73
77
|
/* Component: Button */
|
|
74
78
|
--button-padding-xs-x: 0.5rem;
|
|
@@ -304,6 +308,38 @@
|
|
|
304
308
|
--star-size: 1.5rem;
|
|
305
309
|
}
|
|
306
310
|
|
|
311
|
+
/* Apply font-family to form inputs */
|
|
312
|
+
input,
|
|
313
|
+
textarea,
|
|
314
|
+
select {
|
|
315
|
+
font-family: var(--font-family-input);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Custom scrollbar for textarea with primary color */
|
|
319
|
+
textarea::-webkit-scrollbar {
|
|
320
|
+
width: 8px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
textarea::-webkit-scrollbar-track {
|
|
324
|
+
background: var(--color-surface);
|
|
325
|
+
border-radius: 4px;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
textarea::-webkit-scrollbar-thumb {
|
|
329
|
+
background: var(--color-primary);
|
|
330
|
+
border-radius: 4px;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
textarea::-webkit-scrollbar-thumb:hover {
|
|
334
|
+
background: var(--color-primary-hover);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* Firefox scrollbar */
|
|
338
|
+
textarea {
|
|
339
|
+
scrollbar-width: thin;
|
|
340
|
+
scrollbar-color: var(--color-primary) var(--color-surface);
|
|
341
|
+
}
|
|
342
|
+
|
|
307
343
|
/* Responsive Typography - Desktop Overrides */
|
|
308
344
|
@media (min-width: 1024px) {
|
|
309
345
|
:root {
|
package/dist/index.js
CHANGED
|
@@ -676,7 +676,7 @@ function FormControl({
|
|
|
676
676
|
{
|
|
677
677
|
className: cn(
|
|
678
678
|
"text-small",
|
|
679
|
-
currentError ? "text-error" : "text-(--color-muted-foreground)"
|
|
679
|
+
currentError ? "text-(--color-error)" : "text-(--color-muted-foreground)"
|
|
680
680
|
),
|
|
681
681
|
id: `${fieldId}-message`,
|
|
682
682
|
role: currentError ? "alert" : void 0,
|
|
@@ -748,7 +748,7 @@ function FormHelperText({
|
|
|
748
748
|
{
|
|
749
749
|
className: cn(
|
|
750
750
|
"text-small",
|
|
751
|
-
isError ? "text-error" : "text-(--color-muted-foreground)",
|
|
751
|
+
isError ? "text-(--color-error)" : "text-(--color-muted-foreground)",
|
|
752
752
|
className
|
|
753
753
|
),
|
|
754
754
|
role: isError ? "alert" : void 0,
|
|
@@ -1063,10 +1063,10 @@ var Input = import_react5.default.forwardRef(
|
|
|
1063
1063
|
"aria-describedby": inputError ? `${fieldId}-error` : helperText ? `${fieldId}-helper` : void 0,
|
|
1064
1064
|
className: cn(
|
|
1065
1065
|
"w-full px-3 py-2 border rounded-md transition-colors",
|
|
1066
|
-
"text-(--color-
|
|
1066
|
+
"text-(--color-foreground) placeholder-gray-400",
|
|
1067
1067
|
"focus:outline-none",
|
|
1068
1068
|
"disabled:bg-(--color-muted) disabled:cursor-not-allowed disabled:text-(--color-muted-foreground)",
|
|
1069
|
-
inputError ? "border-error focus:ring-2 focus:ring-error focus:border-error active:border-error" : "border-(--color-border) focus:ring-2 focus:ring-(--color-primary)/30 focus:border-(--color-primary) active:border-(--color-primary)",
|
|
1069
|
+
inputError ? "border-(--color-error) focus:ring-2 focus:ring-(--color-error) focus:border-(--color-error) active:border-(--color-error)" : "border-(--color-border) focus:ring-2 focus:ring-(--color-primary)/30 focus:border-(--color-primary) active:border-(--color-primary)",
|
|
1070
1070
|
leftIcon && "pl-10",
|
|
1071
1071
|
rightIcon && "pr-10",
|
|
1072
1072
|
className
|
|
@@ -1080,7 +1080,7 @@ var Input = import_react5.default.forwardRef(
|
|
|
1080
1080
|
shouldRenderError && inputError && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1081
1081
|
"p",
|
|
1082
1082
|
{
|
|
1083
|
-
className: "text-small text-error",
|
|
1083
|
+
className: "text-small text-(--color-error)",
|
|
1084
1084
|
id: `${fieldId}-error`,
|
|
1085
1085
|
role: "alert",
|
|
1086
1086
|
children: inputError
|
|
@@ -1307,10 +1307,10 @@ var Textarea = import_react6.default.forwardRef(
|
|
|
1307
1307
|
"aria-describedby": textareaError ? `${textareaId}-error` : helperText ? `${textareaId}-helper` : void 0,
|
|
1308
1308
|
className: cn(
|
|
1309
1309
|
"w-full px-3 py-2 border rounded-md transition-colors",
|
|
1310
|
-
"text-(--color-
|
|
1310
|
+
"text-(--color-foreground) placeholder-gray-400",
|
|
1311
1311
|
"focus:outline-none",
|
|
1312
1312
|
"disabled:bg-(--color-muted) disabled:cursor-not-allowed disabled:text-(--color-muted-foreground)",
|
|
1313
|
-
textareaError ? "border-error focus:ring-2 focus:ring-error focus:border-error active:border-error" : "border-(--color-border) focus:ring-2 focus:ring-(--color-primary)/30 focus:border-(--color-primary) active:border-(--color-primary)",
|
|
1313
|
+
textareaError ? "border-(--color-error) focus:ring-2 focus:ring-(--color-error) focus:border-(--color-error) active:border-(--color-error)" : "border-(--color-border) focus:ring-2 focus:ring-(--color-primary)/30 focus:border-(--color-primary) active:border-(--color-primary)",
|
|
1314
1314
|
resizeClasses[resize],
|
|
1315
1315
|
autoResize && "overflow-hidden",
|
|
1316
1316
|
!autoResize && "overflow-auto",
|
|
@@ -1789,7 +1789,7 @@ function Checkbox({
|
|
|
1789
1789
|
}
|
|
1790
1790
|
)
|
|
1791
1791
|
] }),
|
|
1792
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-5 mt-1.5", children: displayError && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-small text-error", role: "alert", children: displayError }) })
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-5 mt-1.5", children: displayError && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-small text-(--color-error)", role: "alert", children: displayError }) })
|
|
1793
1793
|
] });
|
|
1794
1794
|
}
|
|
1795
1795
|
function CheckboxGroup({
|
|
@@ -1939,7 +1939,7 @@ function CheckboxGroup({
|
|
|
1939
1939
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-5 mt-1.5", children: (error || helperText) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1940
1940
|
"p",
|
|
1941
1941
|
{
|
|
1942
|
-
className: `text-small ${error ? "text-error" : "text-(--color-muted-foreground)"}`,
|
|
1942
|
+
className: `text-small ${error ? "text-(--color-error)" : "text-(--color-muted-foreground)"}`,
|
|
1943
1943
|
role: error ? "alert" : void 0,
|
|
1944
1944
|
children: error || helperText
|
|
1945
1945
|
}
|
|
@@ -2118,7 +2118,7 @@ function RadioGroup({
|
|
|
2118
2118
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-5 mt-1.5", children: (displayError || helperText) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2119
2119
|
"p",
|
|
2120
2120
|
{
|
|
2121
|
-
className: `text-small ${displayError ? "text-error" : "text-(--color-muted-foreground)"}`,
|
|
2121
|
+
className: `text-small ${displayError ? "text-(--color-error)" : "text-(--color-muted-foreground)"}`,
|
|
2122
2122
|
role: displayError ? "alert" : void 0,
|
|
2123
2123
|
children: displayError || helperText
|
|
2124
2124
|
}
|
|
@@ -2347,7 +2347,7 @@ function Select({
|
|
|
2347
2347
|
flex items-center justify-between
|
|
2348
2348
|
transition-all duration-200
|
|
2349
2349
|
outline-none
|
|
2350
|
-
${displayError ? "border-error focus:ring-2 focus:ring-error focus:border-error focus-visible:ring-2 focus-visible:ring-error focus-visible:border-error" : "border-(--color-border) focus:ring-2 focus:ring-(--color-primary)/30 focus:border-(--color-primary) focus-visible:ring-2 focus-visible:ring-(--color-primary)/30 focus-visible:border-(--color-primary)"}
|
|
2350
|
+
${displayError ? "border-(--color-error) focus:ring-2 focus:ring-(--color-error) focus:border-(--color-error) focus-visible:ring-2 focus-visible:ring-(--color-error) focus-visible:border-(--color-error)" : "border-(--color-border) focus:ring-2 focus:ring-(--color-primary)/30 focus:border-(--color-primary) focus-visible:ring-2 focus-visible:ring-(--color-primary)/30 focus-visible:border-(--color-primary)"}
|
|
2351
2351
|
${disabled ? "bg-(--color-muted) cursor-not-allowed opacity-60" : "hover:border-(--color-primary)"}
|
|
2352
2352
|
${!value ? "text-(--color-placeholder)" : "text-(--color-foreground)"}
|
|
2353
2353
|
`,
|
|
@@ -2436,7 +2436,7 @@ function Select({
|
|
|
2436
2436
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-5 mt-1.5", children: (helperText || displayError) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2437
2437
|
"p",
|
|
2438
2438
|
{
|
|
2439
|
-
className: `text-small ${displayError ? "text-error" : "text-(--color-muted-foreground)"}`,
|
|
2439
|
+
className: `text-small ${displayError ? "text-(--color-error)" : "text-(--color-muted-foreground)"}`,
|
|
2440
2440
|
children: displayError || helperText
|
|
2441
2441
|
}
|
|
2442
2442
|
) })
|
|
@@ -2515,7 +2515,7 @@ function NativeSelect({
|
|
|
2515
2515
|
style: { color: "var(--color-muted-foreground)" },
|
|
2516
2516
|
children: [
|
|
2517
2517
|
label,
|
|
2518
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ml-1 text-error", children: "*" })
|
|
2518
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ml-1 text-(--color-error)", children: "*" })
|
|
2519
2519
|
]
|
|
2520
2520
|
}
|
|
2521
2521
|
),
|
|
@@ -2535,7 +2535,7 @@ function NativeSelect({
|
|
|
2535
2535
|
appearance-none
|
|
2536
2536
|
cursor-pointer
|
|
2537
2537
|
outline-none
|
|
2538
|
-
${displayError ? "border-error focus:border-error active:border-error" : "border-(--color-border) focus:border-(--color-primary) active:border-(--color-primary)"}
|
|
2538
|
+
${displayError ? "border-(--color-error) focus:border-(--color-error) active:border-(--color-error)" : "border-(--color-border) focus:border-(--color-primary) active:border-(--color-primary)"}
|
|
2539
2539
|
${disabled ? "bg-(--color-muted) cursor-not-allowed opacity-60" : "hover:border-(--color-primary)"}
|
|
2540
2540
|
${!value ? "text-(--color-placeholder)" : "text-(--color-foreground)"}
|
|
2541
2541
|
pr-10
|
|
@@ -2551,7 +2551,7 @@ function NativeSelect({
|
|
|
2551
2551
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-5 mt-1.5", children: (helperText || displayError) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2552
2552
|
"p",
|
|
2553
2553
|
{
|
|
2554
|
-
className: `text-small ${displayError ? "text-error" : "text-(--color-muted-foreground)"}`,
|
|
2554
|
+
className: `text-small ${displayError ? "text-(--color-error)" : "text-(--color-muted-foreground)"}`,
|
|
2555
2555
|
children: displayError || helperText
|
|
2556
2556
|
}
|
|
2557
2557
|
) })
|