beesoft-components 0.2.9 → 0.2.13

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/README.md CHANGED
@@ -23,6 +23,7 @@ This is the main component in the library currently; it has the ability to selec
23
23
  | **label** | `string` | Sets the label for the component. |
24
24
  | **useDefaultDateValue** | `boolean` | If set to true then the current date will be populated in the selection box. |
25
25
  | **locale** | `string` | Allows the locale settings to be overridden, if this is not set then the users locale settings will be used. |
26
+ | **className** | `string` | Allows css modifications to be made to the default input box of the component. |
26
27
  | **dateSelection** | `DateSelectionType` | Allows the component to be set in 4 modes DateTime, Date Only, Time Only and Date Range (`default Date/Time`). |
27
28
  | **dateFormat** | `DateFormatType` | Allows for the date to be formatted in short, medium or long formats. |
28
29
  | **timeConstraints** | `TimeConstraints` | Allows the time selection component to determine how the increment/decrement the values (currently only minute works). |
@@ -61,9 +62,9 @@ These are the properties passed to the calendar template.
61
62
  | **selectedEndDate** | **false** | `Date` | The current end date of a date range selection this is only set when the component is in date range mode. |
62
63
  | **selectionMode** | **false** | `CalendarSelectionMode` | Contains the values `Normal` and `Range`; selected range puts the calendar into range selection mode. |
63
64
  | **locale** | **false** | `Locale` | The Locale object comes from the date-fns library and contains information about the users locale date settings. |
64
- | **onDateSelected** | **false** | `function(date: Date, options?: Record<string, any>) => void` | Used to tell the component when a date has been selected. |
65
- | **selectableDate** | **false** | `function(currentDate: Date) => boolean` | Determines if a date is allowed to be selected...if false is returned then the date will be disabled. |
66
- | **isValidDate** | **false** | `function(selectedDate: Date) => boolean` | Determines if the passed date is a valid selectable date...if false is returned then the selection isn't made. |
65
+ | **onDateSelected** | **false** | `(date: Date, options?: Record<string, any>) => void` | Used to tell the component when a date has been selected. |
66
+ | **selectableDate** | **false** | `(currentDate: Date) => boolean` | Determines if a date is allowed to be selected...if false is returned then the date will be disabled. |
67
+ | **isValidDate** | **false** | `(selectedDate: Date) => boolean` | Determines if the passed date is a valid selectable date...if false is returned then the selection isn't made. |
67
68
  | **dispatcher** | **false** | `React.Dispatch<DateTimeReducerAction>` | Used to set values within the component like the selected and current view date. |
68
69
 
69
70
  #### Input Template Properties
@@ -74,19 +75,19 @@ These are the properties passed to the input template.
74
75
  | ----------- | -------- | ---------- | ----------- |
75
76
  | **label** | **false** | `string` | The label to display for the input; if undefined then no label is set. |
76
77
  | **readOnly** | **true** | `boolean` | Determines if the input should be read only or not. |
77
- | **getValue** | **true** | `function() => string` | Returns the currently selected value(s) as a string to be displayed. |
78
- | **onFocus** | **true** | `function(event: React.FocusEvent) => void` | Should be assigned to the input component so it will be called when it's focused. |
79
- | **onInput** | **true** | `function(event: React.FormEvent) => void` | Should be assigned to the input component so it will be called when the user types into the input. |
78
+ | **getValue** | **true** | `() => string` | Returns the currently selected value(s) as a string to be displayed. |
79
+ | **onFocus** | **true** | `(event: FocusEvent) => void` | Should be assigned to the input component so it will be called when it's focused. |
80
+ | **onInput** | **true** | `(event: FormEvent) => void` | Should be assigned to the input component so it will be called when the user types into the input. |
80
81
  | **iconPosition** | **true** | `CalendarIconPosition` | Determines if the icon is supposed to be on the right or left. |
81
82
  | **iconElement** | **false** | `JSX.Element` | The icon that is supposed to be clicked to show the calendar. |
82
83
  | **iconElementClassName** | **false** | `string` | The classes to use for the icon element wrapper. |
83
- | **onElementClick** | **false** | `function(event: React.MouseEvent) => void` | The function to call when the icon element is clicked. |
84
+ | **onElementClick** | **false** | `(event: MouseEvent) => void` | The function to call when the icon element is clicked. |
84
85
 
85
86
  ### Dark Mode
86
87
 
87
88
  Dark mode is a common feature for many web applications. Beehive components support dark mode, to turn it on add a `dark` class to the body tag. In React you can use to following line:
88
89
 
89
- > document.body.className = 'dark';
90
+ > document.body.className = 'bsc-dark';
90
91
 
91
92
  ### Date Range
92
93