@agilant/toga-blox 1.0.46 → 1.0.48

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.
@@ -9,7 +9,7 @@ const Dropdown = ({ options, selectedOption, onOptionSelect, optionClasses = "fl
9
9
  }, selectedOptionBgColor = "bg-gray-50", optionHoverBgColor = "hover:bg-gray-50", }) => {
10
10
  const [showMenu, setShowMenu] = useState(false);
11
11
  const toggleMenu = () => setShowMenu(!showMenu);
12
- return (_jsxs("div", { className: `flex items-center justify-between relative min-w-32 border-2 ${dropdownClasses}`, children: [_jsxs("div", { onClick: toggleMenu, className: `flex cursor-pointer items-center group h-full `, children: [_jsx("div", { className: `font-bold ${optionClasses}`, children: selectedOption }), _jsx("div", { className: `transform transition-transform duration-200 mx-1 px-1 rounded-full relative ${icon.iconClasses} ${showMenu ? "rotate-180" : "rotate-0"}`, children: _jsx("span", { children: getFontAwesomeIcon(icon.name) }) })] }), showMenu && (_jsx(AnimatePresence, { children: showMenu && (_jsx(motion.div, { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, className: `absolute top-0 z-10 right-0 left-0 ${menuClasses}`, children: _jsx("ul", { children: options.map((action) => (_jsxs("li", { className: `text-left px-4 py-2 cursor-pointer border-b ${action === selectedOption
12
+ return (_jsxs("div", { className: `flex items-center justify-between relative min-w-32 ${dropdownClasses}`, children: [_jsxs("div", { onClick: toggleMenu, className: `flex cursor-pointer items-center group h-full `, children: [_jsx("div", { className: `font-bold ${optionClasses}`, children: selectedOption }), _jsx("div", { className: `transform transition-transform duration-200 mx-1 px-1 rounded-full relative ${icon.iconClasses} ${showMenu ? "rotate-180" : "rotate-0"}`, "data-testid": "dropdown-icon", children: getFontAwesomeIcon(icon.name) })] }), showMenu && (_jsx(AnimatePresence, { children: showMenu && (_jsx(motion.div, { initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, className: `absolute top-0 z-10 right-0 left-0 ${menuClasses}`, children: _jsx("ul", { children: options.map((action) => (_jsxs("li", { className: `text-left px-4 py-2 cursor-pointer border-b ${action === selectedOption
13
13
  ? `{${selectedOptionBgColor} font-semibold}`
14
14
  : `${optionHoverBgColor} text-black`}`, onClick: () => {
15
15
  onOptionSelect(action);
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { UseFormRegister } from "react-hook-form";
2
3
  interface InputFieldProps {
3
4
  label?: string;
4
5
  value?: string | number;
@@ -25,6 +26,7 @@ interface InputFieldProps {
25
26
  labelClasses?: string;
26
27
  disabled?: boolean;
27
28
  hasAutoFocus?: boolean;
29
+ register?: UseFormRegister<any>;
28
30
  focusRingColor?: string;
29
31
  }
30
32
  declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<unknown>>;
@@ -2,9 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
2
2
  import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";
3
3
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
4
  import { useState, forwardRef } from "react";
5
- const InputField = forwardRef(({ label, placeholder, required = false, checked, id, name, type = "text", firstIcon, secondIcon, iconPosition = "before", iconColor = "primary", isValid = true, isReadOnly = false, onChange, value, readOnlyInfo = "", toolTipText = "", hasToolTip = false, additionalClasses = "", labelClasses = "", hasAutoFocus, onIconClick, onKeyDown, disabled,
6
- // register,
7
- focusRingColor = "focus:ring-transparent", }) => {
5
+ const InputField = forwardRef(({ label, placeholder, required = false, checked, id, name, type = "text", firstIcon, secondIcon, iconPosition = "before", iconColor = "primary", isValid = true, isReadOnly = false, onChange, value, readOnlyInfo = "", toolTipText = "", hasToolTip = false, additionalClasses = "", labelClasses = "", hasAutoFocus, onIconClick, onKeyDown, disabled, register, focusRingColor = "focus:ring-transparent", }) => {
8
6
  const [isFocused, setIsFocused] = useState(false);
9
7
  const hasValue = value != null && !!value.toString().trim(); // Check if input value has at least one non-space character
10
8
  const isNumberInput = type === "number";
@@ -47,17 +45,15 @@ focusRingColor = "focus:ring-transparent", }) => {
47
45
  return null;
48
46
  }
49
47
  };
50
- // const registerProps = register
51
- // ? register(name || "", { required })
52
- // : {};
48
+ const registerProps = register
49
+ ? register(name || "", { required })
50
+ : {};
53
51
  return isReadOnly ? (_jsxs("div", { className: "input-wrapper relative", children: [renderIcons(), _jsxs("label", { htmlFor: id, className: `block font-light text-left mb-1 ${labelClasses} `, children: [label, hasToolTip && (_jsxs("span", { className: "pl-4 group", children: [_jsx(FontAwesomeIcon, { icon: faCircleInfo, className: "text-primary group-hover:text-blue-600" }), _jsx("span", { className: "opacity-0 group-hover:opacity-100 bg-gray-800 text-white text-sm rounded-md px-2 py-1 absolute top-[-14px]", children: toolTipText })] }))] }), _jsx("div", { className: `
54
52
  text-left focus:outline-none focus:ring-2 block w-full py-2 px-2 rounded-lg shadow-input outline outline-0 outline-barelyPrimary focus:outline-4 md:w-full lg:w-full xl:w-full
55
53
  ${firstIcon ? "pl-10" : ""}
56
54
  ${secondIcon ? "pr-10" : ""}
57
55
  ${additionalClasses}
58
- `, children: readOnlyInfo }), iconPosition === "after" && renderSecondIcon()] })) : (_jsxs(_Fragment, { children: [label && (_jsxs("label", { htmlFor: id, className: ` block font-light text-left mb-1 ${labelClasses}`, children: [label, hasToolTip && (_jsxs("span", { className: "pl-4 group", children: [_jsx(FontAwesomeIcon, { icon: faCircleInfo, className: "text-primary group-hover:text-blue-600" }), _jsx("span", { className: "opacity-0 group-hover:opacity-100 bg-gray-800 text-white text-sm rounded-md px-2 py-1 absolute top-[-14px]", children: toolTipText })] }))] })), _jsxs("div", { className: " input-wrapper relative", children: [renderIcons(), _jsx("input", { autoComplete: "",
59
- // {...registerProps}
60
- className: `rounded-md focused:ring-0 ${focusRingColor} focus:ring-1
56
+ `, children: readOnlyInfo }), iconPosition === "after" && renderSecondIcon()] })) : (_jsxs(_Fragment, { children: [label && (_jsxs("label", { htmlFor: id, className: ` block font-light text-left mb-1 ${labelClasses}`, children: [label, hasToolTip && (_jsxs("span", { className: "pl-4 group", children: [_jsx(FontAwesomeIcon, { icon: faCircleInfo, className: "text-primary group-hover:text-blue-600" }), _jsx("span", { className: "opacity-0 group-hover:opacity-100 bg-gray-800 text-white text-sm rounded-md px-2 py-1 absolute top-[-14px]", children: toolTipText })] }))] })), _jsxs("div", { className: " input-wrapper relative", children: [renderIcons(), _jsx("input", { autoComplete: "", ...registerProps, className: `rounded-md focused:ring-0 ${focusRingColor} focus:ring-1
61
57
  focus:outline-none
62
58
  ${disabled
63
59
  ? "border-gray-500 focus:ring-gray-500"
@@ -53,6 +53,6 @@ const MagnifyingIcon = forwardRef(({ columnIndex, editingHeader, setEditingHeade
53
53
  };
54
54
  return (_jsx("div", { ref: ref, "data-testid": "magnifying-icon-test-id", className: `flex items-center cursor-pointer size-[18px] rounded relative ml-1 ${iconColor} ${showActiveStyles
55
55
  ? `${iconActiveBackgroundColor} hover:bg-blue-500 still-active`
56
- : "hover:bg-white"}`, onClick: handleClick, children: _jsx("div", { className: `text-xs w-full ${additionalIconClasses} ${showActiveStyles ? "text-white" : iconActiveColor}`, children: getFontAwesomeIcon("magnifyingGlass", "solid") }) }));
56
+ : "hover:bg-white"}`, onClick: handleClick, children: _jsx("div", { className: `text-xs w-full ${additionalIconClasses} `, children: getFontAwesomeIcon("magnifyingGlass", "solid") }) }));
57
57
  });
58
58
  export default MagnifyingIcon;
@@ -44,6 +44,7 @@ export const WithActiveClass = {
44
44
  args: {
45
45
  ...Default.args,
46
46
  isActive: true,
47
+ additionalIconClasses: "text-green-500",
47
48
  },
48
49
  };
49
50
  export const WithClickAlert = {
@@ -11,6 +11,7 @@ interface SearchDropdownInputProps {
11
11
  bgColor?: string;
12
12
  textHighlight?: string;
13
13
  [key: string]: any;
14
+ handleFilter?: () => void;
14
15
  }
15
16
  /**
16
17
  * A wrapper around MultiSelectInput that appends a special "__footer__" option
@@ -5,7 +5,7 @@ import "./SearchDrowpdown.scss";
5
5
  * A wrapper around MultiSelectInput that appends a special "__footer__" option
6
6
  * and uses a custom item renderer to display "Clear" and "Filter" buttons.
7
7
  */
8
- const SearchDropdownInput = ({ options = [], selectedValue = [], onChange, placeholder = "Select...", disabled = false, hasSelectAll = true, bgColor, textHighlight, ...rest }) => {
8
+ const SearchDropdownInput = ({ options = [], selectedValue = [], onChange, placeholder = "Select", disabled = false, hasSelectAll = true, bgColor, textHighlight, handleFilter, ...rest }) => {
9
9
  const footerOption = [{ name: "", value: "__footer__" }];
10
10
  const extendedOptions = [...options, ...footerOption];
11
11
  const itemRenderer = ({ option, checked, disabled, onClick }) => {
@@ -16,8 +16,7 @@ const SearchDropdownInput = ({ options = [], selectedValue = [], onChange, place
16
16
  onChange([]); // Clear all selections
17
17
  }, children: "Clear" }), _jsx("button", { type: "button", className: `${bgColor} text-white px-3 py-1 rounded`, onClick: (e) => {
18
18
  e.stopPropagation();
19
- console.log("Filter clicked!", selectedValue);
20
- // ...your custom filter logic
19
+ handleFilter();
21
20
  }, children: "Filter" })] }));
22
21
  }
23
22
  else if (option.label === "Select All") {
@@ -1,3 +1,3 @@
1
1
  import { SearchInputProps } from "./SearchInput.types";
2
- declare const SearchInput: <T extends object>({ closeOutSearch, setResetSearch, setEditingHeader, bgColor, textHighlight, column, inputType, dropdownIconProp, dropdownOptions, selectedDropdownOption, onDropdownOptionSelect, searchItems, setSearchItems, toggleStatus, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, control, valueKey, dynamicDefaultValue, onChange, selectedValue, }: SearchInputProps<T>) => import("react/jsx-runtime").JSX.Element;
2
+ declare const SearchInput: <T extends object>({ bgColor, textHighlight, inputType, dropdownIconProp, dropdownOptions, selectedDropdownOption, onDropdownOptionSelect, searchItems, setSearchItems, toggleStatus, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, onChange, selectedValue, selectedDate, onDateSelect, selectedStartDate, onStartDateSelect, selectedEndDate, onEndDateSelect, handleFilter, }: SearchInputProps<T>) => import("react/jsx-runtime").JSX.Element;
3
3
  export default SearchInput;
@@ -1,71 +1,29 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from "react";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
3
3
  import SearchTextInput from "./SearchTextInput";
4
4
  import SearchNumberInput from "./SearchNumberInput";
5
- import { Controller } from "react-hook-form";
6
5
  import SearchDropdownInput from "./SearchDropdownInput";
7
- // A simple helper function for default values
8
- function getDefaultValue(dynamicDefaultValue, valueKey) {
9
- if (typeof dynamicDefaultValue !== "undefined") {
10
- return dynamicDefaultValue;
11
- }
12
- return "";
13
- }
14
- const SearchInput = ({ closeOutSearch, setResetSearch, setEditingHeader, bgColor = "bg-sky-500", textHighlight = "text-sky-500", column, inputType = "text", dropdownIconProp = {
6
+ import SearchDatePickerInput from "./SearchInputDatePicker";
7
+ const SearchInput = ({ bgColor = "bg-sky-500", textHighlight = "text-sky-500", inputType = "text", dropdownIconProp = {
15
8
  name: "chevronDown",
16
9
  weight: "bold",
17
10
  iconClasses: "text-black",
18
- }, dropdownOptions = [], selectedDropdownOption = "", onDropdownOptionSelect, searchItems = [], setSearchItems, toggleStatus = false, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, control, valueKey, dynamicDefaultValue, onChange, selectedValue, }) => {
11
+ }, dropdownOptions = [], selectedDropdownOption = "", onDropdownOptionSelect, searchItems = [], setSearchItems, toggleStatus = false, setToggleStatus, minValue, setMinValue, maxValue, setMaxValue, onChange, selectedValue, selectedDate, onDateSelect, selectedStartDate, onStartDateSelect, selectedEndDate, onEndDateSelect, handleFilter, }) => {
19
12
  const containerRef = useRef(null);
20
- const [localSearchText, setLocalSearchText] = useState("");
21
13
  const inputRef = useRef(null);
22
14
  useEffect(() => {
23
15
  inputRef.current?.focus();
24
16
  }, []);
25
- const handleInputChange = (event) => {
26
- setLocalSearchText(event.target.value);
27
- };
28
- const handleSubmitClick = () => {
29
- const trimmedSearchText = localSearchText.trim();
30
- let safeHeader;
31
- if (typeof column.Header === "string") {
32
- safeHeader = column.Header;
33
- }
34
- else {
35
- safeHeader = column.accessor || "Unnamed Column";
36
- }
37
- if (trimmedSearchText === "") {
38
- // Remove criterion if text is empty
39
- }
40
- else {
41
- // Update or add criterion
42
- }
43
- setEditingHeader(null);
44
- };
45
17
  return (_jsx("div", { ref: containerRef, className: "", children: (() => {
46
18
  switch (inputType) {
47
19
  case "text":
48
- return (_jsx(SearchTextInput, { closeOutSearch: () => { }, setResetSearch: () => { }, setEditingHeader: () => { }, column: undefined, dropdownIconProp: dropdownIconProp, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, searchItems: searchItems, setSearchItems: setSearchItems }));
20
+ return (_jsx(SearchTextInput, { dropdownIconProp: dropdownIconProp, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, searchItems: searchItems, setSearchItems: setSearchItems, handleFilter: handleFilter }));
49
21
  case "number":
50
- return (_jsx(SearchNumberInput, { closeOutSearch: () => { }, setResetSearch: () => { }, setEditingHeader: () => { }, column: undefined, dropdownIconProp: dropdownIconProp, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, toggleStatus: toggleStatus, setToggleStatus: setToggleStatus, minValue: minValue, maxValue: maxValue, setMinValue: setMinValue, setMaxValue: setMaxValue }));
22
+ return (_jsx(SearchNumberInput, { dropdownIconProp: dropdownIconProp, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, toggleStatus: toggleStatus, setToggleStatus: setToggleStatus, minValue: minValue, maxValue: maxValue, setMinValue: setMinValue, setMaxValue: setMaxValue, handleFilter: handleFilter }));
51
23
  case "multiSelect":
52
- {
53
- console.log(dropdownOptions, "dropdownOptions");
54
- }
55
- return (_jsx(SearchDropdownInput, { options: dropdownOptions, isSearchable: true, placeholder: "Search", isMulti: true, hideSelectedOptions: true, closeMenuOnSelect: false, inputWidth: "w-full", inputTextSize: "text-sm", additionalClasses: "", customClassNames: {}, onChange: onChange, value: [], selectedValue: selectedValue, bgColor: bgColor, textHighlight: textHighlight }));
56
- case "boolean":
24
+ return (_jsx(SearchDropdownInput, { options: dropdownOptions, isSearchable: true, placeholder: "Search", isMulti: true, hideSelectedOptions: true, closeMenuOnSelect: false, inputWidth: "w-full", inputTextSize: "text-sm", additionalClasses: "", customClassNames: {}, onChange: onChange, value: [], selectedValue: selectedValue, bgColor: bgColor, textHighlight: textHighlight, handleFilter: handleFilter }));
57
25
  case "date":
58
- // Make sure control & valueKey exist before using them
59
- if (!control || !valueKey) {
60
- return (_jsxs("div", { className: "text-red-500", children: ["Missing ", _jsx("code", { children: "control" }), " or", " ", _jsx("code", { children: "valueKey" }), " prop for React Hook Form"] }));
61
- }
62
- return (_jsx(Controller, { name: valueKey, control: control, defaultValue: getDefaultValue(dynamicDefaultValue, valueKey), render: ({ field }) => (_jsx("div", { className: "inline-flex items-center", children: _jsxs("label", { className: "flex items-center cursor-pointer relative", children: [_jsx("input", { type: "checkbox", className: "peer h-5 w-5 cursor-pointer transition-all appearance-none rounded border border-stroke", id: valueKey, checked: !!field.value, onChange: (e) => {
63
- // You can log the value here:
64
- console.log("Checkbox changed to:", e.target.checked);
65
- field.onChange(e.target.checked);
66
- } }), _jsx("span", { className: "absolute text-white opacity-0 peer-checked:opacity-100 top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-3.5 w-3.5", viewBox: "0 0 20 20", fill: "currentColor", stroke: "currentColor", strokeWidth: "1", children: _jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) })] }) })) }));
67
- default:
68
- return null;
26
+ return (_jsx(SearchDatePickerInput, { textHighlight: textHighlight, dropdownOptions: dropdownOptions, selectedDropdownOption: selectedDropdownOption, onDropdownOptionSelect: onDropdownOptionSelect, toggleStatus: toggleStatus, setToggleStatus: setToggleStatus, selectedDate: selectedDate, onDateSelect: onDateSelect, selectedStartDate: selectedStartDate, onStartDateSelect: onStartDateSelect, selectedEndDate: selectedEndDate, onEndDateSelect: onEndDateSelect, handleFilter: handleFilter }));
69
27
  }
70
28
  })() }));
71
29
  };
@@ -6,4 +6,4 @@ export declare const TextInput: any;
6
6
  export declare const NumberInput: any;
7
7
  export declare const DropdownInput: any;
8
8
  export declare const BooleanInput: any;
9
- export declare const DisabledInput: any;
9
+ export declare const DatePickerInput: any;
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import SearchInput from "./SearchInput";
3
- import { getFontAwesomeIcon } from "../../utils/getFontAwesomeIcon";
4
3
  import { useState } from "react";
5
4
  export default {
6
5
  title: "Components/SearchInput",
@@ -13,10 +12,6 @@ export default {
13
12
  options: ["text", "number", "boolean", "date", "multiSelect"],
14
13
  },
15
14
  },
16
- closeOutSearch: { control: "none", table: { disable: true } },
17
- setResetSearch: { control: "none", table: { disable: true } },
18
- column: { control: "none", table: { disable: true } },
19
- setEditingHeader: { control: "none", table: { disable: true } },
20
15
  dropdownIconProp: {
21
16
  control: "object",
22
17
  description: "Icon configuration for dropdown",
@@ -56,6 +51,10 @@ const Template = (args) => {
56
51
  const [minValue, setMinValue] = useState();
57
52
  const [maxValue, setMaxValue] = useState();
58
53
  const [selectedValue, setSelectedValue] = useState(args.selectedValue || []);
54
+ // NEW: State for date control
55
+ const [selectedDate, setSelectedDate] = useState(args.selectedDate);
56
+ const [selectedStartDate, setSelectedStartDate] = useState(args.selectedStartDate);
57
+ const [selectedEndDate, setSelectedEndDate] = useState(args.selectedEndDate);
59
58
  // Handle onChange from the multi-select
60
59
  const handleOnChange = (newSelected) => {
61
60
  setSelectedValue(newSelected);
@@ -63,23 +62,25 @@ const Template = (args) => {
63
62
  args.onChange?.(newSelected);
64
63
  console.log("Selected items:", newSelected);
65
64
  };
66
- return (_jsx(SearchInput, { ...args, selectedDropdownOption: selectedOption, onDropdownOptionSelect: (option) => setSelectedOption(option), searchItems: searchItems, setSearchItems: setSearchItems, toggleStatus: toggleStatus, setToggleStatus: setToggleStatus, minValue: minValue, maxValue: maxValue, setMinValue: setMinValue, setMaxValue: setMaxValue, onChange: handleOnChange, selectedValue: selectedValue }));
65
+ return (_jsx(SearchInput, { ...args, selectedDropdownOption: selectedOption, onDropdownOptionSelect: (option) => setSelectedOption(option), searchItems: searchItems, setSearchItems: setSearchItems, toggleStatus: toggleStatus, setToggleStatus: setToggleStatus, minValue: minValue, maxValue: maxValue, setMinValue: setMinValue, setMaxValue: setMaxValue, onChange: handleOnChange, selectedValue: selectedValue, selectedDate: selectedDate, onDateSelect: setSelectedDate, selectedStartDate: selectedStartDate, onStartDateSelect: setSelectedStartDate, selectedEndDate: selectedEndDate, onEndDateSelect: setSelectedEndDate }));
67
66
  };
68
67
  export const Default = Template.bind({});
69
68
  Default.args = {
70
69
  inputType: "text",
71
- column: mockColumn,
72
- closeOutSearch: (value) => console.log(`Search cleared: ${value}`),
73
- setResetSearch: () => console.log("Reset search triggered"),
74
- setEditingHeader: (value) => console.log(`Editing header: ${value}`),
70
+ handleFilter: () => console.log(`Filter applied`),
71
+ dropdownOptions: [
72
+ "Starts with",
73
+ "Ends with",
74
+ "Exactly",
75
+ "Includes",
76
+ "Excludes",
77
+ ],
78
+ selectedDropdownOption: "Starts with",
75
79
  };
76
80
  export const TextInput = Template.bind({});
77
81
  TextInput.args = {
78
82
  inputType: "text",
79
- column: mockColumn,
80
- closeOutSearch: (value) => console.log(`Search cleared: ${value}`),
81
- setResetSearch: () => console.log("Reset search triggered"),
82
- setEditingHeader: (value) => console.log(`Editing header: ${value}`),
83
+ handleFilter: () => console.log(`Filter applied`),
83
84
  pillColor: "bg-sky-500",
84
85
  textHighlight: "text-sky-500",
85
86
  dropdownIconProp: {
@@ -99,10 +100,7 @@ TextInput.args = {
99
100
  export const NumberInput = Template.bind({});
100
101
  NumberInput.args = {
101
102
  inputType: "number",
102
- column: mockColumn,
103
- closeOutSearch: (value) => console.log(`Search cleared: ${value}`),
104
- setResetSearch: () => console.log("Reset search triggered"),
105
- setEditingHeader: (value) => console.log(`Editing header: ${value}`),
103
+ handleFilter: () => console.log(`Filter applied`),
106
104
  dropdownIconProp: {
107
105
  iconClasses: "text-sky-500",
108
106
  name: "chevronDown",
@@ -114,67 +112,48 @@ NumberInput.args = {
114
112
  export const DropdownInput = Template.bind({});
115
113
  DropdownInput.args = {
116
114
  inputType: "multiSelect",
117
- column: mockColumn,
118
- closeOutSearch: (value) => console.log(`Search cleared: ${value}`),
119
- setResetSearch: () => console.log("Reset search triggered"),
120
- setEditingHeader: (value) => console.log(`Editing header: ${value}`),
115
+ handleFilter: () => console.log(`Filter applied`),
121
116
  placeholder: "Search",
122
117
  dropdownOptions: [
123
118
  { uuid: "1", name: "Option 1", value: "option1" },
124
119
  { uuid: "2", name: "Option 2", value: "option2" },
125
120
  { uuid: "3", name: "Option 3", value: "option3" },
126
121
  ],
127
- /** For multi-select, `value` is typically an array */
128
122
  selectedValue: [],
129
- // onChange: (selected: OptionType[]) => {
130
- // console.log("Selected items:", selected);
131
- // },
132
- /** Additional props you might want to set */
133
123
  isSearchable: true,
134
124
  hasSelectAll: true,
135
125
  disabled: false,
136
126
  isLoading: false,
137
127
  type: "multiSelect",
138
- // etc...
139
128
  };
140
129
  export const BooleanInput = Template.bind({});
141
130
  BooleanInput.args = {
142
131
  inputType: "multiSelect",
143
- column: mockColumn,
144
- closeOutSearch: (value) => console.log(`Search cleared: ${value}`),
145
- setResetSearch: () => console.log("Reset search triggered"),
146
- setEditingHeader: (value) => console.log(`Editing header: ${value}`),
132
+ handleFilter: () => console.log(`Filter applied`),
147
133
  placeholder: "Search",
148
134
  dropdownOptions: [
149
135
  { uuid: "1", name: "True", value: "true" },
150
136
  { uuid: "2", name: "False", value: "false" },
151
137
  ],
152
138
  selectedValue: [],
153
- // onChange: (selected: OptionType[]) => {
154
- // console.log("Selected items:", selected);
155
- // },
156
139
  isSearchable: true,
157
140
  hasSelectAll: true,
158
141
  disabled: false,
159
142
  isLoading: false,
160
143
  type: "multiSelect",
161
- // etc...
162
144
  };
163
- export const DisabledInput = Template.bind({});
164
- DisabledInput.args = {
165
- inputType: "text",
166
- inputName: "disabledInput",
167
- hasPlaceholder: true,
168
- placeholder: "Disabled...",
169
- inputTextSize: "text-sm",
170
- inputShape: "rounded",
171
- backgroundColor: "bg-gray-200",
172
- inputWidth: "w-72",
173
- inputBorderClasses: "border border-gray-400 cursor-not-allowed",
174
- buttonText: _jsx("span", { children: "Disabled" }),
175
- buttonClasses: "bg-gray-500 text-gray-300 px-4 py-2 rounded",
176
- buttonIcon: getFontAwesomeIcon("ban"),
177
- buttonIconClasses: "text-gray-400",
178
- containerClasses: "flex items-center",
179
- onButtonClick: () => alert("Button is disabled."),
145
+ export const DatePickerInput = Template.bind({});
146
+ DatePickerInput.args = {
147
+ inputType: "date",
148
+ handleFilter: () => console.log(`Filter applied`),
149
+ textHighlight: "text-sky-500",
150
+ dropdownOptions: ["Exactly", "Before", "After"],
151
+ selectedDropdownOption: "Exactly",
152
+ onDropdownOptionSelect: (option) => console.log(`Option selected: ${option}`),
153
+ searchItems: [],
154
+ setSearchItems: () => { },
155
+ toggleStatus: false,
156
+ setToggleStatus: () => { },
157
+ themeBgColor: "bg-sky-500",
158
+ lightThemeBg: "bg-sky-100",
180
159
  };
@@ -0,0 +1 @@
1
+ export {};