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.
- package/dist/cjs/components/chat/multimodal-input.js +2 -2
- package/dist/cjs/components/dashboard/FilterBar.js +5 -3
- package/dist/cjs/components/datagrid/DataGrid.js +3 -3
- package/dist/cjs/components/datagrid/rows/FilterRow.js +1 -1
- package/dist/cjs/components/draft/DraftModal.js +1 -1
- package/dist/cjs/components/forms/date-picker/DateTimePicker.js +1 -1
- package/dist/cjs/components/forms/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/forms/file-attachment/FileAttachment.js +1 -1
- package/dist/cjs/components/forms/remark-input/RemarkInput.js +3 -3
- package/dist/cjs/components/layout/mobile-menu-sheet.js +1 -1
- package/dist/cjs/components/layout/top-header.js +1 -1
- package/dist/cjs/components/messaging/conversation-list.js +1 -1
- package/dist/cjs/components/messaging/create-conversation-modal.js +1 -1
- package/dist/cjs/components/messaging/message-input.js +1 -1
- package/dist/cjs/components/modals/ImageModal.js +1 -1
- package/dist/cjs/components/modals/Modal.js +1 -1
- package/dist/cjs/components/ui/buttons/button.js +1 -1
- package/dist/cjs/components/ui/form-toggle.js +1 -1
- package/dist/cjs/components/ui/forms/input.js +4 -4
- package/dist/cjs/components/ui/navigation/tabs.js +2 -2
- package/dist/cjs/styles/tokens.css +3 -0
- package/dist/components/chat/multimodal-input.d.ts +11 -1
- package/dist/components/chat/multimodal-input.js +2 -2
- package/dist/components/dashboard/FilterBar.js +5 -3
- package/dist/components/datagrid/DataGrid.js +3 -3
- package/dist/components/datagrid/rows/FilterRow.js +1 -1
- package/dist/components/draft/DraftModal.js +1 -1
- package/dist/components/forms/date-picker/DateTimePicker.js +1 -1
- package/dist/components/forms/dropdown/Dropdown.d.ts +1 -1
- package/dist/components/forms/dropdown/Dropdown.js +1 -1
- package/dist/components/forms/file-attachment/FileAttachment.js +1 -1
- package/dist/components/forms/remark-input/RemarkInput.js +3 -3
- package/dist/components/layout/mobile-menu-sheet.js +1 -1
- package/dist/components/layout/top-header.js +1 -1
- package/dist/components/messaging/conversation-list.js +1 -1
- package/dist/components/messaging/create-conversation-modal.js +1 -1
- package/dist/components/messaging/message-input.js +1 -1
- package/dist/components/modals/ImageModal.js +1 -1
- package/dist/components/modals/Modal.js +1 -1
- package/dist/components/ui/buttons/button.js +1 -1
- package/dist/components/ui/form-toggle.js +1 -1
- package/dist/components/ui/forms/input.js +4 -4
- package/dist/components/ui/navigation/tabs.js +2 -2
- package/dist/styles/tokens.css +3 -0
- 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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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);
|
package/dist/styles/tokens.css
CHANGED
|
@@ -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.
|
|
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",
|