@nubase/frontend 0.1.17 → 0.1.19
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/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +224 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +223 -44
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5230,9 +5230,40 @@ FormControl.displayName = "FormControl";
|
|
|
5230
5230
|
|
|
5231
5231
|
// src/components/form-controls/controls/Checkbox/Checkbox.tsx
|
|
5232
5232
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
5233
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
5233
5234
|
import { CheckIcon } from "lucide-react";
|
|
5234
5235
|
import * as React from "react";
|
|
5235
5236
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
5237
|
+
var checkboxVariants = cva4([
|
|
5238
|
+
// Layout & Sizing
|
|
5239
|
+
"peer size-4 shrink-0",
|
|
5240
|
+
// Border & Shape
|
|
5241
|
+
"border border-input rounded-[4px]",
|
|
5242
|
+
// Background
|
|
5243
|
+
"dark:bg-input/30",
|
|
5244
|
+
// Visual Effects
|
|
5245
|
+
"shadow-xs outline-none",
|
|
5246
|
+
"transition-shadow",
|
|
5247
|
+
// Checked State
|
|
5248
|
+
"data-[state=checked]:bg-primary",
|
|
5249
|
+
"data-[state=checked]:text-primary-foreground",
|
|
5250
|
+
"data-[state=checked]:border-primary",
|
|
5251
|
+
"dark:data-[state=checked]:bg-primary",
|
|
5252
|
+
// Focus State
|
|
5253
|
+
"focus-visible:border-ring",
|
|
5254
|
+
"focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
5255
|
+
// Disabled State
|
|
5256
|
+
"disabled:cursor-not-allowed",
|
|
5257
|
+
"disabled:opacity-50"
|
|
5258
|
+
]);
|
|
5259
|
+
var checkboxIndicatorVariants = cva4([
|
|
5260
|
+
// Layout
|
|
5261
|
+
"flex items-center justify-center",
|
|
5262
|
+
// Text
|
|
5263
|
+
"text-current",
|
|
5264
|
+
// Animation
|
|
5265
|
+
"transition-none"
|
|
5266
|
+
]);
|
|
5236
5267
|
var Checkbox = React.forwardRef(({ className, hasError, ...props }, ref) => {
|
|
5237
5268
|
return /* @__PURE__ */ jsx13(
|
|
5238
5269
|
CheckboxPrimitive.Root,
|
|
@@ -5240,8 +5271,14 @@ var Checkbox = React.forwardRef(({ className, hasError, ...props }, ref) => {
|
|
|
5240
5271
|
ref,
|
|
5241
5272
|
"data-slot": "checkbox",
|
|
5242
5273
|
className: cn(
|
|
5243
|
-
|
|
5244
|
-
hasError &&
|
|
5274
|
+
checkboxVariants(),
|
|
5275
|
+
hasError && [
|
|
5276
|
+
"border-destructive",
|
|
5277
|
+
"ring-destructive/20",
|
|
5278
|
+
"aria-invalid:border-destructive",
|
|
5279
|
+
"aria-invalid:ring-destructive/20",
|
|
5280
|
+
"dark:aria-invalid:ring-destructive/40"
|
|
5281
|
+
],
|
|
5245
5282
|
className
|
|
5246
5283
|
),
|
|
5247
5284
|
"aria-invalid": hasError,
|
|
@@ -5250,7 +5287,7 @@ var Checkbox = React.forwardRef(({ className, hasError, ...props }, ref) => {
|
|
|
5250
5287
|
CheckboxPrimitive.Indicator,
|
|
5251
5288
|
{
|
|
5252
5289
|
"data-slot": "checkbox-indicator",
|
|
5253
|
-
className:
|
|
5290
|
+
className: checkboxIndicatorVariants(),
|
|
5254
5291
|
children: /* @__PURE__ */ jsx13(CheckIcon, { className: "size-3.5" })
|
|
5255
5292
|
}
|
|
5256
5293
|
)
|
|
@@ -5280,9 +5317,9 @@ var BooleanEditFieldRenderer = ({
|
|
|
5280
5317
|
};
|
|
5281
5318
|
|
|
5282
5319
|
// src/components/form/renderers/ViewFieldWrapper.tsx
|
|
5283
|
-
import { cva as
|
|
5320
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
5284
5321
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
5285
|
-
var viewFieldWrapperVariants =
|
|
5322
|
+
var viewFieldWrapperVariants = cva5(
|
|
5286
5323
|
[
|
|
5287
5324
|
// Base styles shared by all view field renderers
|
|
5288
5325
|
"w-full min-w-0 px-3 py-1 rounded-md",
|
|
@@ -5334,18 +5371,62 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
5334
5371
|
import { useCallback as useCallback3, useRef as useRef2 } from "react";
|
|
5335
5372
|
|
|
5336
5373
|
// src/components/form-controls/controls/LookupSelect/LookupSelect.tsx
|
|
5337
|
-
import { cva as
|
|
5374
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
5338
5375
|
import { useCombobox } from "downshift";
|
|
5339
5376
|
import { forwardRef as forwardRef6, useEffect as useEffect3, useState as useState3 } from "react";
|
|
5340
5377
|
import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
5341
|
-
var lookupSelectVariants =
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
"
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
"
|
|
5378
|
+
var lookupSelectVariants = cva6([
|
|
5379
|
+
// Layout & Sizing
|
|
5380
|
+
"flex h-9 w-full min-w-0",
|
|
5381
|
+
// Spacing & Borders
|
|
5382
|
+
"px-3 py-1 rounded-md border border-input",
|
|
5383
|
+
// Background & Text
|
|
5384
|
+
"bg-transparent text-base",
|
|
5385
|
+
"dark:bg-input/30",
|
|
5386
|
+
// Visual Effects
|
|
5387
|
+
"shadow-xs outline-none",
|
|
5388
|
+
"transition-[color,box-shadow]",
|
|
5389
|
+
// Placeholder & Selection
|
|
5390
|
+
"placeholder:text-muted-foreground",
|
|
5391
|
+
"selection:bg-primary selection:text-primary-foreground",
|
|
5392
|
+
// File Input Styling
|
|
5393
|
+
"file:text-foreground file:inline-flex file:h-7",
|
|
5394
|
+
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
5395
|
+
// Focus State
|
|
5396
|
+
"focus-visible:border-ring",
|
|
5397
|
+
"focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
5398
|
+
// Invalid State
|
|
5399
|
+
"aria-invalid:border-destructive",
|
|
5400
|
+
"aria-invalid:ring-destructive/20",
|
|
5401
|
+
"dark:aria-invalid:ring-destructive/40",
|
|
5402
|
+
// Disabled State
|
|
5403
|
+
"disabled:pointer-events-none",
|
|
5404
|
+
"disabled:cursor-not-allowed",
|
|
5405
|
+
"disabled:opacity-50"
|
|
5406
|
+
]);
|
|
5407
|
+
var menuVariants = cva6([
|
|
5408
|
+
// Positioning
|
|
5409
|
+
"absolute z-50 w-full mt-1",
|
|
5410
|
+
// Background & Border
|
|
5411
|
+
"bg-background border border-border rounded-md",
|
|
5412
|
+
// Visual Effects
|
|
5413
|
+
"shadow-lg",
|
|
5414
|
+
// Sizing & Overflow
|
|
5415
|
+
"max-h-60 overflow-auto",
|
|
5416
|
+
// Text
|
|
5417
|
+
"text-sm"
|
|
5418
|
+
]);
|
|
5419
|
+
var optionVariants = cva6(
|
|
5420
|
+
[
|
|
5421
|
+
// Layout
|
|
5422
|
+
"relative",
|
|
5423
|
+
// Spacing
|
|
5424
|
+
"px-3 py-2",
|
|
5425
|
+
// Interaction
|
|
5426
|
+
"cursor-pointer select-none",
|
|
5427
|
+
// Visual Effects
|
|
5428
|
+
"transition-colors"
|
|
5429
|
+
],
|
|
5349
5430
|
{
|
|
5350
5431
|
variants: {
|
|
5351
5432
|
isHighlighted: {
|
|
@@ -5813,10 +5894,10 @@ var LookupViewFieldRenderer = ({
|
|
|
5813
5894
|
import { useLayoutEffect, useRef as useRef3 } from "react";
|
|
5814
5895
|
|
|
5815
5896
|
// src/components/form-controls/controls/TextInput/TextInput.tsx
|
|
5816
|
-
import { cva as
|
|
5897
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
5817
5898
|
import { forwardRef as forwardRef7 } from "react";
|
|
5818
5899
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
5819
|
-
var textInputVariants =
|
|
5900
|
+
var textInputVariants = cva7([
|
|
5820
5901
|
// Layout & Sizing
|
|
5821
5902
|
"flex h-9 w-full min-w-0",
|
|
5822
5903
|
// Spacing & Borders
|
|
@@ -6574,10 +6655,10 @@ var SchemaFormBody = ({
|
|
|
6574
6655
|
};
|
|
6575
6656
|
|
|
6576
6657
|
// src/components/buttons/ButtonBar/ButtonBar.tsx
|
|
6577
|
-
import { cva as
|
|
6658
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
6578
6659
|
import { forwardRef as forwardRef8 } from "react";
|
|
6579
6660
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
6580
|
-
var buttonBarVariants =
|
|
6661
|
+
var buttonBarVariants = cva8("flex gap-3 p-3", {
|
|
6581
6662
|
variants: {
|
|
6582
6663
|
alignment: {
|
|
6583
6664
|
left: "justify-start",
|
|
@@ -6651,9 +6732,9 @@ var SchemaFormButtonBar = ({
|
|
|
6651
6732
|
};
|
|
6652
6733
|
|
|
6653
6734
|
// src/components/callout/Callout.tsx
|
|
6654
|
-
import { cva as
|
|
6735
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
6655
6736
|
import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6656
|
-
var calloutVariants =
|
|
6737
|
+
var calloutVariants = cva9(
|
|
6657
6738
|
"rounded-md px-4 py-3 text-sm flex items-start gap-3",
|
|
6658
6739
|
{
|
|
6659
6740
|
variants: {
|
|
@@ -6925,13 +7006,39 @@ import {
|
|
|
6925
7006
|
} from "react";
|
|
6926
7007
|
|
|
6927
7008
|
// src/components/form-controls/controls/SearchTextInput/SearchTextInput.tsx
|
|
6928
|
-
import { cva as
|
|
7009
|
+
import { cva as cva10 } from "class-variance-authority";
|
|
6929
7010
|
import { Search } from "lucide-react";
|
|
6930
7011
|
import { forwardRef as forwardRef9 } from "react";
|
|
6931
7012
|
import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6932
|
-
var searchTextInputVariants =
|
|
6933
|
-
|
|
6934
|
-
|
|
7013
|
+
var searchTextInputVariants = cva10([
|
|
7014
|
+
// Layout & Sizing
|
|
7015
|
+
"flex h-9 w-full min-w-0",
|
|
7016
|
+
// Spacing & Borders (pl-10 for search icon)
|
|
7017
|
+
"pl-10 pr-3 py-1 rounded-md border border-input",
|
|
7018
|
+
// Background & Text
|
|
7019
|
+
"bg-transparent text-base",
|
|
7020
|
+
"dark:bg-input/30",
|
|
7021
|
+
// Visual Effects
|
|
7022
|
+
"shadow-xs outline-none",
|
|
7023
|
+
"transition-[color,box-shadow]",
|
|
7024
|
+
// Placeholder & Selection
|
|
7025
|
+
"placeholder:text-muted-foreground",
|
|
7026
|
+
"selection:bg-primary selection:text-primary-foreground",
|
|
7027
|
+
// File Input Styling
|
|
7028
|
+
"file:text-foreground file:inline-flex file:h-7",
|
|
7029
|
+
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
7030
|
+
// Focus State
|
|
7031
|
+
"focus-visible:border-ring",
|
|
7032
|
+
"focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
7033
|
+
// Invalid State
|
|
7034
|
+
"aria-invalid:border-destructive",
|
|
7035
|
+
"aria-invalid:ring-destructive/20",
|
|
7036
|
+
"dark:aria-invalid:ring-destructive/40",
|
|
7037
|
+
// Disabled State
|
|
7038
|
+
"disabled:pointer-events-none",
|
|
7039
|
+
"disabled:cursor-not-allowed",
|
|
7040
|
+
"disabled:opacity-50"
|
|
7041
|
+
]);
|
|
6935
7042
|
var SearchTextInput = forwardRef9(
|
|
6936
7043
|
({ className, type = "search", hasError, ...props }, ref) => {
|
|
6937
7044
|
return /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
@@ -7177,8 +7284,10 @@ var TreeNavigatorComponent = ({
|
|
|
7177
7284
|
event.preventDefault();
|
|
7178
7285
|
if (currentItem?.hasChildren) {
|
|
7179
7286
|
toggleExpanded(currentItem.id);
|
|
7287
|
+
} else if (currentItem?.onExecute) {
|
|
7288
|
+
currentItem.onExecute();
|
|
7180
7289
|
} else {
|
|
7181
|
-
|
|
7290
|
+
itemRefs.current[selectedIndex]?.click();
|
|
7182
7291
|
}
|
|
7183
7292
|
}
|
|
7184
7293
|
}
|
|
@@ -8574,18 +8683,60 @@ function ActionCellRendererGroup(_props) {
|
|
|
8574
8683
|
}
|
|
8575
8684
|
|
|
8576
8685
|
// src/components/form-controls/controls/Select/Select.tsx
|
|
8577
|
-
import { cva as
|
|
8686
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
8578
8687
|
import { useCombobox as useCombobox2, useSelect } from "downshift";
|
|
8579
8688
|
import { forwardRef as forwardRef11, useMemo as useMemo4, useState as useState11 } from "react";
|
|
8580
8689
|
import { jsx as jsx51, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8581
|
-
var selectVariants =
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
"
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
"
|
|
8690
|
+
var selectVariants = cva11([
|
|
8691
|
+
// Layout & Sizing
|
|
8692
|
+
"flex h-9 w-full min-w-0",
|
|
8693
|
+
// Spacing & Borders
|
|
8694
|
+
"px-3 py-1 rounded-md border border-input",
|
|
8695
|
+
// Background & Text
|
|
8696
|
+
"bg-transparent text-base",
|
|
8697
|
+
"dark:bg-input/30",
|
|
8698
|
+
// Visual Effects
|
|
8699
|
+
"shadow-xs outline-none",
|
|
8700
|
+
"transition-[color,box-shadow]",
|
|
8701
|
+
// Placeholder & Selection
|
|
8702
|
+
"placeholder:text-muted-foreground",
|
|
8703
|
+
"selection:bg-primary selection:text-primary-foreground",
|
|
8704
|
+
// File Input Styling
|
|
8705
|
+
"file:text-foreground file:inline-flex file:h-7",
|
|
8706
|
+
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
8707
|
+
// Focus State
|
|
8708
|
+
"focus-visible:border-ring",
|
|
8709
|
+
"focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
8710
|
+
// Invalid State
|
|
8711
|
+
"aria-invalid:border-destructive",
|
|
8712
|
+
"aria-invalid:ring-destructive/20",
|
|
8713
|
+
"dark:aria-invalid:ring-destructive/40",
|
|
8714
|
+
// Disabled State
|
|
8715
|
+
"disabled:pointer-events-none",
|
|
8716
|
+
"disabled:cursor-not-allowed",
|
|
8717
|
+
"disabled:opacity-50"
|
|
8718
|
+
]);
|
|
8719
|
+
var menuVariants2 = cva11([
|
|
8720
|
+
// Positioning
|
|
8721
|
+
"absolute z-50 w-full mt-1",
|
|
8722
|
+
// Background & Border
|
|
8723
|
+
"bg-background border border-border rounded-md",
|
|
8724
|
+
// Visual Effects
|
|
8725
|
+
"shadow-lg",
|
|
8726
|
+
// Sizing & Overflow
|
|
8727
|
+
"max-h-60 overflow-auto",
|
|
8728
|
+
// Text
|
|
8729
|
+
"text-sm"
|
|
8730
|
+
]);
|
|
8731
|
+
var optionVariants2 = cva11(
|
|
8732
|
+
[
|
|
8733
|
+
// Spacing
|
|
8734
|
+
"px-4 py-2",
|
|
8735
|
+
// Interaction
|
|
8736
|
+
"cursor-pointer select-none",
|
|
8737
|
+
// Visual Effects
|
|
8738
|
+
"transition-colors"
|
|
8739
|
+
],
|
|
8589
8740
|
{
|
|
8590
8741
|
variants: {
|
|
8591
8742
|
isHighlighted: {
|
|
@@ -11974,10 +12125,10 @@ __export(definitions_exports, {
|
|
|
11974
12125
|
});
|
|
11975
12126
|
|
|
11976
12127
|
// src/components/buttons/ActionBar/ActionBar.tsx
|
|
11977
|
-
import { cva as
|
|
12128
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
11978
12129
|
import { forwardRef as forwardRef12 } from "react";
|
|
11979
12130
|
import { jsx as jsx74, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
11980
|
-
var actionBarVariants =
|
|
12131
|
+
var actionBarVariants = cva12("flex items-center gap-1 text-sm font-medium", {
|
|
11981
12132
|
variants: {
|
|
11982
12133
|
variant: {
|
|
11983
12134
|
default: ""
|
|
@@ -11987,7 +12138,7 @@ var actionBarVariants = cva11("flex items-center gap-1 text-sm font-medium", {
|
|
|
11987
12138
|
variant: "default"
|
|
11988
12139
|
}
|
|
11989
12140
|
});
|
|
11990
|
-
var actionVariants =
|
|
12141
|
+
var actionVariants = cva12(
|
|
11991
12142
|
"inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] px-2 py-1.5 text-sm cursor-pointer hover:bg-accent hover:text-accent-foreground",
|
|
11992
12143
|
{
|
|
11993
12144
|
variants: {
|
|
@@ -12001,7 +12152,7 @@ var actionVariants = cva11(
|
|
|
12001
12152
|
}
|
|
12002
12153
|
}
|
|
12003
12154
|
);
|
|
12004
|
-
var separatorVariants =
|
|
12155
|
+
var separatorVariants = cva12("bg-border w-[1px] h-6 mx-2 opacity-60");
|
|
12005
12156
|
var ActionBar = forwardRef12(
|
|
12006
12157
|
({ className, variant, actions, ...props }, ref) => {
|
|
12007
12158
|
const { executeAction: executeAction2 } = useActionExecutor();
|
|
@@ -12057,10 +12208,10 @@ var ActionBar = forwardRef12(
|
|
|
12057
12208
|
ActionBar.displayName = "ActionBar";
|
|
12058
12209
|
|
|
12059
12210
|
// src/components/buttons/ActionBar/ActionBarContainer.tsx
|
|
12060
|
-
import { cva as
|
|
12211
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
12061
12212
|
import { forwardRef as forwardRef13 } from "react";
|
|
12062
12213
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
12063
|
-
var actionBarContainerVariants =
|
|
12214
|
+
var actionBarContainerVariants = cva13(
|
|
12064
12215
|
"bg-card border-border rounded-lg border p-3",
|
|
12065
12216
|
{
|
|
12066
12217
|
variants: {
|
|
@@ -14412,7 +14563,7 @@ var MainNav = forwardRef19(
|
|
|
14412
14563
|
MainNav.displayName = "MainNav";
|
|
14413
14564
|
|
|
14414
14565
|
// src/components/navigation/main-nav/NavItemComponent.tsx
|
|
14415
|
-
import { cva as
|
|
14566
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
14416
14567
|
|
|
14417
14568
|
// src/components/navigation/main-nav/SafeLink.tsx
|
|
14418
14569
|
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
@@ -14434,7 +14585,7 @@ var SafeLink = ({ to, className, onClick, children }) => {
|
|
|
14434
14585
|
|
|
14435
14586
|
// src/components/navigation/main-nav/NavItemComponent.tsx
|
|
14436
14587
|
import { Fragment as Fragment10, jsx as jsx102, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
14437
|
-
var navItemVariants =
|
|
14588
|
+
var navItemVariants = cva14(
|
|
14438
14589
|
"flex items-center gap-3 px-3 py-2 text-sm font-medium transition-all duration-200 rounded-md group",
|
|
14439
14590
|
{
|
|
14440
14591
|
variants: {
|
|
@@ -15588,7 +15739,8 @@ function SignInScreen() {
|
|
|
15588
15739
|
{
|
|
15589
15740
|
name: "email",
|
|
15590
15741
|
validators: {
|
|
15591
|
-
onBlur: ({ value }) => !value ? "Email is required" : void 0
|
|
15742
|
+
onBlur: ({ value }) => !value ? "Email is required" : void 0,
|
|
15743
|
+
onChange: ({ value }) => !value ? "Email is required" : void 0
|
|
15592
15744
|
},
|
|
15593
15745
|
children: (field) => /* @__PURE__ */ jsx113(FormControl, { label: "Email", required: true, field, children: /* @__PURE__ */ jsx113(
|
|
15594
15746
|
TextInput,
|
|
@@ -15598,6 +15750,7 @@ function SignInScreen() {
|
|
|
15598
15750
|
placeholder: "Enter your email",
|
|
15599
15751
|
value: field.state.value,
|
|
15600
15752
|
onChange: (e) => field.handleChange(e.target.value),
|
|
15753
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15601
15754
|
onBlur: field.handleBlur,
|
|
15602
15755
|
autoComplete: "email",
|
|
15603
15756
|
disabled: isLoading,
|
|
@@ -15611,7 +15764,8 @@ function SignInScreen() {
|
|
|
15611
15764
|
{
|
|
15612
15765
|
name: "password",
|
|
15613
15766
|
validators: {
|
|
15614
|
-
onBlur: ({ value }) => !value ? "Password is required" : void 0
|
|
15767
|
+
onBlur: ({ value }) => !value ? "Password is required" : void 0,
|
|
15768
|
+
onChange: ({ value }) => !value ? "Password is required" : void 0
|
|
15615
15769
|
},
|
|
15616
15770
|
children: (field) => /* @__PURE__ */ jsx113(FormControl, { label: "Password", required: true, field, children: /* @__PURE__ */ jsx113(
|
|
15617
15771
|
TextInput,
|
|
@@ -15621,6 +15775,7 @@ function SignInScreen() {
|
|
|
15621
15775
|
placeholder: "Enter your password",
|
|
15622
15776
|
value: field.state.value,
|
|
15623
15777
|
onChange: (e) => field.handleChange(e.target.value),
|
|
15778
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15624
15779
|
onBlur: field.handleBlur,
|
|
15625
15780
|
autoComplete: "current-password",
|
|
15626
15781
|
disabled: isLoading,
|
|
@@ -15794,6 +15949,13 @@ function SignUpScreen() {
|
|
|
15794
15949
|
return "Please enter a valid email address";
|
|
15795
15950
|
}
|
|
15796
15951
|
return void 0;
|
|
15952
|
+
},
|
|
15953
|
+
onChange: ({ value }) => {
|
|
15954
|
+
if (!value) return "Email is required";
|
|
15955
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
15956
|
+
return "Please enter a valid email address";
|
|
15957
|
+
}
|
|
15958
|
+
return void 0;
|
|
15797
15959
|
}
|
|
15798
15960
|
},
|
|
15799
15961
|
children: (field) => /* @__PURE__ */ jsx114(FormControl, { label: "Email", required: true, field, children: /* @__PURE__ */ jsx114(
|
|
@@ -15804,6 +15966,7 @@ function SignUpScreen() {
|
|
|
15804
15966
|
placeholder: "Enter your email",
|
|
15805
15967
|
value: field.state.value,
|
|
15806
15968
|
onChange: (e) => field.handleChange(e.target.value),
|
|
15969
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15807
15970
|
onBlur: field.handleBlur,
|
|
15808
15971
|
autoComplete: "email",
|
|
15809
15972
|
disabled: isLoading,
|
|
@@ -15846,6 +16009,13 @@ function SignUpScreen() {
|
|
|
15846
16009
|
return "Password must be at least 8 characters";
|
|
15847
16010
|
}
|
|
15848
16011
|
return void 0;
|
|
16012
|
+
},
|
|
16013
|
+
onChange: ({ value }) => {
|
|
16014
|
+
if (!value) return "Password is required";
|
|
16015
|
+
if (value.length < 8) {
|
|
16016
|
+
return "Password must be at least 8 characters";
|
|
16017
|
+
}
|
|
16018
|
+
return void 0;
|
|
15849
16019
|
}
|
|
15850
16020
|
},
|
|
15851
16021
|
children: (field) => /* @__PURE__ */ jsx114(FormControl, { label: "Password", required: true, field, children: /* @__PURE__ */ jsx114(
|
|
@@ -15856,6 +16026,7 @@ function SignUpScreen() {
|
|
|
15856
16026
|
placeholder: "Enter your password",
|
|
15857
16027
|
value: field.state.value,
|
|
15858
16028
|
onChange: (e) => field.handleChange(e.target.value),
|
|
16029
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15859
16030
|
onBlur: field.handleBlur,
|
|
15860
16031
|
autoComplete: "new-password",
|
|
15861
16032
|
disabled: isLoading,
|
|
@@ -15874,6 +16045,12 @@ function SignUpScreen() {
|
|
|
15874
16045
|
if (!value) return "Please confirm your password";
|
|
15875
16046
|
if (value !== password) return "Passwords do not match";
|
|
15876
16047
|
return void 0;
|
|
16048
|
+
},
|
|
16049
|
+
onChange: ({ value, fieldApi }) => {
|
|
16050
|
+
const password = fieldApi.form.getFieldValue("password");
|
|
16051
|
+
if (!value) return "Please confirm your password";
|
|
16052
|
+
if (value !== password) return "Passwords do not match";
|
|
16053
|
+
return void 0;
|
|
15877
16054
|
}
|
|
15878
16055
|
},
|
|
15879
16056
|
children: (field) => /* @__PURE__ */ jsx114(FormControl, { label: "Confirm Password", required: true, field, children: /* @__PURE__ */ jsx114(
|
|
@@ -15884,6 +16061,7 @@ function SignUpScreen() {
|
|
|
15884
16061
|
placeholder: "Confirm your password",
|
|
15885
16062
|
value: field.state.value,
|
|
15886
16063
|
onChange: (e) => field.handleChange(e.target.value),
|
|
16064
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15887
16065
|
onBlur: field.handleBlur,
|
|
15888
16066
|
autoComplete: "new-password",
|
|
15889
16067
|
disabled: isLoading,
|
|
@@ -18962,6 +19140,7 @@ export {
|
|
|
18962
19140
|
Widget,
|
|
18963
19141
|
boldCommand,
|
|
18964
19142
|
checkListCommand,
|
|
19143
|
+
checkboxVariants,
|
|
18965
19144
|
cleanupKeybindings,
|
|
18966
19145
|
codeBlockCommand,
|
|
18967
19146
|
codeCommand,
|