florixui 1.7.0 → 1.8.0
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 +10 -0
- package/dist/components/custom/date-time-picker.d.ts +30 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +169 -164
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -526,6 +526,16 @@ const columns: DataTableColumn<Section>[] = [
|
|
|
526
526
|
/>
|
|
527
527
|
```
|
|
528
528
|
|
|
529
|
+
### Date Time Picker
|
|
530
|
+
|
|
531
|
+
A single date-and-time selector — a trigger that opens a calendar with an H:M:S time row. Controlled via an ISO string. This is the same field the Date Time Range Picker uses for its custom from/to inputs.
|
|
532
|
+
|
|
533
|
+
```tsx
|
|
534
|
+
const [value, setValue] = useState(new Date().toISOString())
|
|
535
|
+
|
|
536
|
+
<DateTimePicker value={value} onChange={setValue} label="Starts at" />
|
|
537
|
+
```
|
|
538
|
+
|
|
529
539
|
### Date Time Range Picker
|
|
530
540
|
|
|
531
541
|
A time-range picker with quick presets (hour/day/week/month) and a custom From/To selector — each a calendar plus a precise hour:minute:second time row. Timezone-aware, controlled via ISO strings.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface DateTimePickerProps {
|
|
3
|
+
/** Selected value as an ISO 8601 string (empty for none). Controlled. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Called with the new ISO string when the date or time changes. */
|
|
6
|
+
onChange: (iso: string) => void;
|
|
7
|
+
/** Optional label rendered above the trigger. */
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
/** Trigger text when no value is selected. */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Hide the time row to pick a date only. */
|
|
12
|
+
showTime?: boolean;
|
|
13
|
+
/** IANA timezone for display + emitted ISO. Defaults to `UTC`. */
|
|
14
|
+
timezone?: string;
|
|
15
|
+
/** Disable days before this date (ISO/date string). */
|
|
16
|
+
minDate?: string;
|
|
17
|
+
/** Disable days after this date (ISO/date string). */
|
|
18
|
+
maxDate?: string;
|
|
19
|
+
/** Disable the field. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Class for the wrapper. */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A single date-and-time selector: a trigger that opens a calendar with an
|
|
26
|
+
* H:M:S time row in a popover. Controlled via `value` (ISO string) /`onChange`.
|
|
27
|
+
* Set `showTime={false}` for date-only. This is the same field the
|
|
28
|
+
* `DateTimeRangePicker` uses for its custom from/to inputs.
|
|
29
|
+
*/
|
|
30
|
+
export declare function DateTimePicker({ value, onChange, label, placeholder, showTime, timezone, minDate, maxDate, disabled, className, }: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './components/custom/sensor-card';
|
|
|
23
23
|
export * from './components/custom/side-sheet';
|
|
24
24
|
export * from './components/custom/stat-card';
|
|
25
25
|
export * from './components/custom/status-list';
|
|
26
|
+
export * from './components/custom/date-time-picker';
|
|
26
27
|
export * from './components/custom/date-time-range-picker';
|
|
27
28
|
export { presetToRange, navigateRange, } from './components/custom/date-time-range-picker-utils';
|
|
28
29
|
export * from './components/ui/alert';
|