indas-ui 0.1.9 → 0.1.11

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.
Files changed (45) hide show
  1. package/dist/cjs/components/chat/multimodal-input.js +2 -2
  2. package/dist/cjs/components/dashboard/FilterBar.js +5 -3
  3. package/dist/cjs/components/datagrid/DataGrid.js +3 -3
  4. package/dist/cjs/components/datagrid/rows/FilterRow.js +1 -1
  5. package/dist/cjs/components/draft/DraftModal.js +1 -1
  6. package/dist/cjs/components/forms/date-picker/DateTimePicker.js +1 -1
  7. package/dist/cjs/components/forms/dropdown/Dropdown.js +1 -1
  8. package/dist/cjs/components/forms/file-attachment/FileAttachment.js +1 -1
  9. package/dist/cjs/components/forms/remark-input/RemarkInput.js +3 -3
  10. package/dist/cjs/components/layout/mobile-menu-sheet.js +1 -1
  11. package/dist/cjs/components/layout/top-header.js +1 -1
  12. package/dist/cjs/components/messaging/conversation-list.js +1 -1
  13. package/dist/cjs/components/messaging/create-conversation-modal.js +1 -1
  14. package/dist/cjs/components/messaging/message-input.js +1 -1
  15. package/dist/cjs/components/modals/ImageModal.js +1 -1
  16. package/dist/cjs/components/modals/Modal.js +1 -1
  17. package/dist/cjs/components/ui/buttons/button.js +1 -1
  18. package/dist/cjs/components/ui/form-toggle.js +1 -1
  19. package/dist/cjs/components/ui/forms/input.js +4 -4
  20. package/dist/cjs/components/ui/navigation/tabs.js +2 -2
  21. package/dist/cjs/styles/tokens.css +3 -0
  22. package/dist/components/chat/multimodal-input.d.ts +11 -1
  23. package/dist/components/chat/multimodal-input.js +2 -2
  24. package/dist/components/dashboard/FilterBar.js +5 -3
  25. package/dist/components/datagrid/DataGrid.js +3 -3
  26. package/dist/components/datagrid/rows/FilterRow.js +1 -1
  27. package/dist/components/draft/DraftModal.js +1 -1
  28. package/dist/components/forms/date-picker/DateTimePicker.js +1 -1
  29. package/dist/components/forms/dropdown/Dropdown.d.ts +1 -1
  30. package/dist/components/forms/dropdown/Dropdown.js +1 -1
  31. package/dist/components/forms/file-attachment/FileAttachment.js +1 -1
  32. package/dist/components/forms/remark-input/RemarkInput.js +3 -3
  33. package/dist/components/layout/mobile-menu-sheet.js +1 -1
  34. package/dist/components/layout/top-header.js +1 -1
  35. package/dist/components/messaging/conversation-list.js +1 -1
  36. package/dist/components/messaging/create-conversation-modal.js +1 -1
  37. package/dist/components/messaging/message-input.js +1 -1
  38. package/dist/components/modals/ImageModal.js +1 -1
  39. package/dist/components/modals/Modal.js +1 -1
  40. package/dist/components/ui/buttons/button.js +1 -1
  41. package/dist/components/ui/form-toggle.js +1 -1
  42. package/dist/components/ui/forms/input.js +4 -4
  43. package/dist/components/ui/navigation/tabs.js +2 -2
  44. package/dist/styles/tokens.css +3 -0
  45. package/package.json +1 -1
@@ -48,7 +48,7 @@ const Input = React.forwardRef(({ className, type = "text", label, error, helper
48
48
  };
49
49
  // Compact mode - just return the input without wrapper
50
50
  if (compact) {
51
- return (_jsx("input", { id: inputId, name: inputName, type: type, className: cn("flex h-10 w-full border px-3 py-2 text-xs", "bg-[rgb(var(--bg-surface))] text-[rgb(var(--fg-default))] placeholder:text-[rgb(var(--fg-subtle))]", "focus:outline-none focus:ring-2 focus:ring-[rgb(var(--color-primary))]/10", "disabled:cursor-not-allowed disabled:opacity-50", "transition-all duration-200", type === "number" && "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
51
+ return (_jsx("input", { id: inputId, name: inputName, type: type, className: cn("flex h-10 w-full border px-3 py-2 text-xs", "bg-[rgb(var(--bg-surface))] text-[rgb(var(--fg-default))] placeholder:text-[rgb(var(--fg-subtle))]", "focus:outline-none focus:ring-2 focus:ring-[rgb(var(--color-focus))]/10", "disabled:cursor-not-allowed disabled:opacity-50", "transition-all duration-200", type === "number" && "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
52
52
  // Joined group styling
53
53
  position === 'first' && "rounded-l border-r-0", position === 'middle' && "border-r-0", position === 'last' && "rounded-r", position === 'only' && "rounded", !position && "rounded",
54
54
  // Edited field highlighting
@@ -58,10 +58,10 @@ const Input = React.forwardRef(({ className, type = "text", label, error, helper
58
58
  ? "border-[rgb(var(--color-danger))] focus:border-[rgb(var(--color-danger))]"
59
59
  : isEdited
60
60
  ? "border-[rgb(var(--color-warning))] focus:border-[rgb(var(--color-warning))] focus:ring-[rgb(var(--color-warning))]/20 focus:z-10"
61
- : "border-[rgb(var(--bd-default))] focus:border-[rgb(var(--color-primary))] focus:z-10", className), ref: ref, onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, min: type === 'number' ? 0 : undefined, ...props }));
61
+ : "border-[rgb(var(--bd-default))] focus:border-[rgb(var(--color-focus))] focus:z-10", className), ref: ref, onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, min: type === 'number' ? 0 : undefined, ...props }));
62
62
  }
63
63
  // Standard mode with wrapper
64
- return (_jsxs("div", { className: "w-full", children: [label && (_jsx("label", { htmlFor: inputId, className: "block text-xs font-medium text-[rgb(var(--fg-default))] mb-1.5", suppressHydrationWarning: true, children: label })), _jsxs("div", { className: "relative", children: [LeftIcon && (_jsx("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2", children: _jsx(LeftIcon, { className: "h-4 w-4 text-[rgb(var(--fg-muted))]" }) })), _jsx("input", { id: inputId, name: inputName, type: type, className: cn("flex h-10 w-full rounded-md border px-3 py-2 text-xs", "bg-[rgb(var(--bg-surface))] text-[rgb(var(--fg-default))] placeholder:text-[rgb(var(--fg-subtle))]", "focus:outline-none focus:ring-2 focus:ring-[rgb(var(--color-primary))]/10", "disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-[rgb(var(--bg-subtle))]", "transition-all duration-200", type === "number" && "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none", LeftIcon && "pl-10", RightIcon && "pr-10",
64
+ return (_jsxs("div", { className: "w-full", children: [label && (_jsx("label", { htmlFor: inputId, className: "block text-xs font-medium text-[rgb(var(--fg-default))] mb-1.5", suppressHydrationWarning: true, children: label })), _jsxs("div", { className: "relative", children: [LeftIcon && (_jsx("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2", children: _jsx(LeftIcon, { className: "h-4 w-4 text-[rgb(var(--fg-muted))]" }) })), _jsx("input", { id: inputId, name: inputName, type: type, className: cn("flex h-10 w-full rounded-md border px-3 py-2 text-xs", "bg-[rgb(var(--bg-surface))] text-[rgb(var(--fg-default))] placeholder:text-[rgb(var(--fg-subtle))]", "focus:outline-none focus:ring-2 focus:ring-[rgb(var(--color-focus))]/10", "disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-[rgb(var(--bg-subtle))]", "transition-all duration-200", type === "number" && "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none", LeftIcon && "pl-10", RightIcon && "pr-10",
65
65
  // Edited field highlighting
66
66
  isEdited && !props.disabled && "bg-[rgb(var(--color-warning-subtle))] border-[rgb(var(--color-warning))]",
67
67
  // Border color
@@ -69,7 +69,7 @@ const Input = React.forwardRef(({ className, type = "text", label, error, helper
69
69
  ? "border-[rgb(var(--color-danger))] focus:border-[rgb(var(--color-danger))]"
70
70
  : isEdited
71
71
  ? "border-[rgb(var(--color-warning))] focus:border-[rgb(var(--color-warning))] focus:ring-[rgb(var(--color-warning))]/20"
72
- : "border-[rgb(var(--bd-default))] focus:border-[rgb(var(--color-primary))]", className), ref: ref, suppressHydrationWarning: label ? true : false, onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, min: type === 'number' ? 0 : undefined, ...props }), RightIcon && (_jsx("div", { className: cn("absolute right-3 top-1/2 transform -translate-y-1/2", onRightIconClick && !props.disabled && "cursor-pointer", props.disabled && "opacity-50 cursor-not-allowed"), onClick: props.disabled ? undefined : onRightIconClick, children: _jsx(RightIcon, { className: "h-4 w-4 text-[rgb(var(--fg-muted))]" }) }))] }), error && typeof error === 'string' && (_jsx("p", { className: "mt-1 text-sm text-[rgb(var(--color-danger))]", children: error })), helper && !error && (_jsx("p", { className: "mt-1 text-sm text-[rgb(var(--fg-muted))]", children: helper }))] }));
72
+ : "border-[rgb(var(--bd-default))] focus:border-[rgb(var(--color-focus))]", className), ref: ref, suppressHydrationWarning: label ? true : false, onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, min: type === 'number' ? 0 : undefined, ...props }), RightIcon && (_jsx("div", { className: cn("absolute right-3 top-1/2 transform -translate-y-1/2", onRightIconClick && !props.disabled && "cursor-pointer", props.disabled && "opacity-50 cursor-not-allowed"), onClick: props.disabled ? undefined : onRightIconClick, children: _jsx(RightIcon, { className: "h-4 w-4 text-[rgb(var(--fg-muted))]" }) }))] }), error && typeof error === 'string' && (_jsx("p", { className: "mt-1 text-sm text-[rgb(var(--color-danger))]", children: error })), helper && !error && (_jsx("p", { className: "mt-1 text-sm text-[rgb(var(--fg-muted))]", children: helper }))] }));
73
73
  });
74
74
  Input.displayName = "Input";
75
75
  export { Input };
@@ -10,9 +10,9 @@ import { Dropdown } from '../../forms/dropdown/index.js';
10
10
  const TabsRoot = TabsPrimitive.Root;
11
11
  const TabsList = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn('inline-flex h-10 items-center justify-center rounded-md bg-[rgb(var(--bg-subtle))] p-1 text-[rgb(var(--fg-muted))]', className), ...props })));
12
12
  TabsList.displayName = TabsPrimitive.List.displayName;
13
- const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn('inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-[rgb(var(--bg-surface))] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[rgb(var(--color-primary))] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-[rgb(var(--bg-surface))] data-[state=active]:text-[rgb(var(--fg-default))] data-[state=active]:shadow-sm', className), suppressHydrationWarning: true, ...props })));
13
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn('inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-[rgb(var(--bg-surface))] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[rgb(var(--color-focus))] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-[rgb(var(--bg-surface))] data-[state=active]:text-[rgb(var(--fg-default))] data-[state=active]:shadow-sm', className), suppressHydrationWarning: true, ...props })));
14
14
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
15
- const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn('mt-2 ring-offset-[rgb(var(--bg-surface))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[rgb(var(--color-primary))] focus-visible:ring-offset-2', className), suppressHydrationWarning: true, ...props })));
15
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn('mt-2 ring-offset-[rgb(var(--bg-surface))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[rgb(var(--color-focus))] focus-visible:ring-offset-2', className), suppressHydrationWarning: true, ...props })));
16
16
  TabsContent.displayName = TabsPrimitive.Content.displayName;
17
17
  export function Tabs({ tabs, activeTab, onTabChange, fullWidth = false, className = '', variant = 'pill', size = 'md', dropdownValues, onDropdownChange }) {
18
18
  const containerClasses = cn('inline-flex items-center max-w-full overflow-x-auto scrollbar-hide [-webkit-overflow-scrolling:touch]', variant === 'pill' && 'bg-[rgb(var(--bg-subtle))] rounded-full border border-[rgb(var(--bd-default))] p-px gap-0.5', variant === 'rounded' && 'rounded-lg border border-[rgb(var(--bd-default))] bg-[rgb(var(--bg-surface))] p-0.5', fullWidth && 'w-full', className);
@@ -22,6 +22,9 @@
22
22
 
23
23
  /* Primary Color System (Main brand/accent) - Default #003366 */
24
24
  --color-primary: 0 51 102; /* Primary brand color #003366 */
25
+ /* What a focused field or button is outlined in. The brand colour unless the app says
26
+ otherwise: an app that keeps its brand colour for primary actions sets a neutral here. */
27
+ --color-focus: var(--color-primary);
25
28
  --color-primary-hover: 0 40 82; /* Primary hover state - darker #003366 */
26
29
  --color-primary-subtle: 250 251 252; /* Very light primary backgrounds (0.02 opacity equivalent) */
27
30
  --color-primary-muted: 102 153 204; /* Muted primary */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indas-ui",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Indas UI — React component library for business apps: Tailwind design tokens, Radix primitives, Lucide icons, DataGrid, dashboards and charts.",
5
5
  "license": "MIT",
6
6
  "author": "Indas Analytics Pvt Ltd",