florixui 1.6.1 → 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 CHANGED
@@ -423,6 +423,16 @@ A control that lets the user toggle a single option on or off, or select multipl
423
423
  </div>
424
424
  ```
425
425
 
426
+ ### Color Picker
427
+
428
+ A simple color picker: predefined swatches over a color-code input (with a native color field). Controlled via value/onChange; shown as a swatch box or a hex input field.
429
+
430
+ ```tsx
431
+ const [color, setColor] = useState('#9fff5b')
432
+
433
+ <ColorPicker value={color} onChange={setColor} />
434
+ ```
435
+
426
436
  ### Colors
427
437
 
428
438
  Global semantic accent colors — red, orange, blue, green — each with a foreground pairing and distinct light/dark shades. Independent of the active theme.
@@ -516,6 +526,16 @@ const columns: DataTableColumn<Section>[] = [
516
526
  />
517
527
  ```
518
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
+
519
539
  ### Date Time Range Picker
520
540
 
521
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.
@@ -1289,6 +1309,24 @@ A label/value definition row for detail cards. Stack several in a divide-y conta
1289
1309
  </div>
1290
1310
  ```
1291
1311
 
1312
+ ### MapMarkerPin
1313
+
1314
+ A reusable map-marker visual: a colored pin with an icon, an optional pulsing halo + scale when active, and an optional label. Pass icon, color, and active state. Drop inside a MapMarker.
1315
+
1316
+ ```tsx
1317
+ // Inside a <MapMarker longitude={...} latitude={...}>:
1318
+ <MapMarkerPin icon={<NavigationIcon />} color="bg-green" />
1319
+
1320
+ // Active = pulsing halo + scale-up + label, with a rotated icon:
1321
+ <MapMarkerPin
1322
+ icon={<NavigationIcon />}
1323
+ color="bg-primary"
1324
+ rotate={45}
1325
+ active
1326
+ label="LH-105 · A. Singh"
1327
+ />
1328
+ ```
1329
+
1292
1330
  ### QuickStat
1293
1331
 
1294
1332
  A compact inline stat — icon, value, and an optional muted label. Line several up with vertical separators.
@@ -0,0 +1,24 @@
1
+ export interface ColorPickerProps {
2
+ /** Current color (hex). Controlled. */
3
+ value: string;
4
+ /** Called with the new color. */
5
+ onChange: (value: string) => void;
6
+ /** Preset color swatches shown above the input. */
7
+ swatches?: string[];
8
+ /**
9
+ * Trigger appearance:
10
+ * - `swatch` (default): a rounded color box.
11
+ * - `input`: a field showing the hex code with a leading swatch.
12
+ */
13
+ trigger?: "swatch" | "input";
14
+ /** Placeholder for the `input` trigger when no value. */
15
+ placeholder?: string;
16
+ disabled?: boolean;
17
+ className?: string;
18
+ }
19
+ /**
20
+ * A simple color picker: predefined swatches over a color-code input (with a
21
+ * native color field). Controlled via `value`/`onChange`. Show it as a `swatch`
22
+ * box or an `input` field via the `trigger` prop.
23
+ */
24
+ export declare function ColorPicker({ value, onChange, swatches, trigger, placeholder, disabled, className, }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
@@ -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;
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ export interface MapMarkerPinProps extends React.ComponentProps<"span"> {
3
+ /** Icon rendered inside the pin. */
4
+ icon?: React.ReactNode;
5
+ /**
6
+ * Background color of the pin — a Tailwind bg utility (e.g. `bg-primary`,
7
+ * `bg-green`, `bg-red`) or a CSS color via `style`. Defaults to `bg-primary`.
8
+ */
9
+ color?: string;
10
+ /** Pin diameter in px. Default `28`. */
11
+ size?: number;
12
+ /** Rotate the icon (e.g. a vehicle heading), in degrees. */
13
+ rotate?: number;
14
+ /** Active/selected — adds a pulsing halo, scales up, and shows the label. */
15
+ active?: boolean;
16
+ /** Optional label shown beneath the pin (always when set, or only when active). */
17
+ label?: React.ReactNode;
18
+ /** Only show the label while `active`. Default `true`. */
19
+ labelOnActive?: boolean;
20
+ }
21
+ /**
22
+ * A reusable map-marker visual: a colored circular pin with an icon, an optional
23
+ * pulsing halo + scale-up when `active`, and an optional `label` tooltip beneath
24
+ * it. Drop it inside a `MapMarker` (or any positioned container). `color` is a
25
+ * Tailwind bg utility so it tracks theme tokens.
26
+ */
27
+ export declare function MapMarkerPin({ icon, color, size, rotate, active, label, labelOnActive, className, ...props }: MapMarkerPinProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export * from './components/custom/advanced-select';
8
8
  export * from './components/custom/data-table';
9
9
  export * from './components/custom/form-dialog';
10
10
  export * from './components/custom/card-radio-group';
11
+ export * from './components/custom/color-picker';
11
12
  export * from './components/custom/confirm-prompt';
12
13
  export * from './components/custom/custom-tabs';
13
14
  export * from './components/custom/data-cell';
@@ -15,12 +16,14 @@ export * from './components/custom/def-row';
15
16
  export * from './components/custom/empty-state';
16
17
  export * from './components/custom/faceted-filter';
17
18
  export * from './components/custom/list-card';
19
+ export * from './components/custom/map-marker-pin';
18
20
  export * from './components/custom/not-found';
19
21
  export * from './components/custom/quick-stat';
20
22
  export * from './components/custom/sensor-card';
21
23
  export * from './components/custom/side-sheet';
22
24
  export * from './components/custom/stat-card';
23
25
  export * from './components/custom/status-list';
26
+ export * from './components/custom/date-time-picker';
24
27
  export * from './components/custom/date-time-range-picker';
25
28
  export { presetToRange, navigateRange, } from './components/custom/date-time-range-picker-utils';
26
29
  export * from './components/ui/alert';