florixui 1.6.0 → 1.7.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.
@@ -1289,6 +1299,24 @@ A label/value definition row for detail cards. Stack several in a divide-y conta
1289
1299
  </div>
1290
1300
  ```
1291
1301
 
1302
+ ### MapMarkerPin
1303
+
1304
+ 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.
1305
+
1306
+ ```tsx
1307
+ // Inside a <MapMarker longitude={...} latitude={...}>:
1308
+ <MapMarkerPin icon={<NavigationIcon />} color="bg-green" />
1309
+
1310
+ // Active = pulsing halo + scale-up + label, with a rotated icon:
1311
+ <MapMarkerPin
1312
+ icon={<NavigationIcon />}
1313
+ color="bg-primary"
1314
+ rotate={45}
1315
+ active
1316
+ label="LH-105 · A. Singh"
1317
+ />
1318
+ ```
1319
+
1292
1320
  ### QuickStat
1293
1321
 
1294
1322
  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,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,6 +16,7 @@ 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';