@nubase/frontend 0.1.17 → 0.1.18

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.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
- "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
5244
- hasError && "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive border-destructive ring-destructive/20",
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: "flex items-center justify-center text-current transition-none",
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 cva4 } from "class-variance-authority";
5320
+ import { cva as cva5 } from "class-variance-authority";
5284
5321
  import { jsx as jsx15 } from "react/jsx-runtime";
5285
- var viewFieldWrapperVariants = cva4(
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 cva5 } from "class-variance-authority";
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 = cva5(
5342
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
5343
- );
5344
- var menuVariants = cva5(
5345
- "absolute z-50 w-full mt-1 bg-background border border-border rounded-md shadow-lg max-h-60 overflow-auto text-sm"
5346
- );
5347
- var optionVariants = cva5(
5348
- "px-3 py-2 cursor-pointer transition-colors select-none relative",
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 cva6 } from "class-variance-authority";
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 = cva6([
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 cva7 } from "class-variance-authority";
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 = cva7("flex gap-3 p-3", {
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 cva8 } from "class-variance-authority";
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 = cva8(
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 cva9 } from "class-variance-authority";
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 = cva9(
6933
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent pl-10 pr-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
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
- currentItem?.onExecute?.();
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 cva10 } from "class-variance-authority";
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 = cva10(
8582
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
8583
- );
8584
- var menuVariants2 = cva10(
8585
- "absolute z-50 w-full mt-1 bg-background border border-border rounded-md shadow-lg max-h-60 overflow-auto text-sm"
8586
- );
8587
- var optionVariants2 = cva10(
8588
- "px-4 py-2 cursor-pointer transition-colors select-none",
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 cva11 } from "class-variance-authority";
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 = cva11("flex items-center gap-1 text-sm font-medium", {
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 = cva11(
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 = cva11("bg-border w-[1px] h-6 mx-2 opacity-60");
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 cva12 } from "class-variance-authority";
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 = cva12(
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 cva13 } from "class-variance-authority";
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 = cva13(
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: {
@@ -18962,6 +19113,7 @@ export {
18962
19113
  Widget,
18963
19114
  boldCommand,
18964
19115
  checkListCommand,
19116
+ checkboxVariants,
18965
19117
  cleanupKeybindings,
18966
19118
  codeBlockCommand,
18967
19119
  codeCommand,