@diwauhris/ui 1.4.2 → 1.4.4

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/lib/index.cjs CHANGED
@@ -4762,6 +4762,52 @@ function Statistic({ label, value, helper, icon: Icon, trend, trendLabel, varian
4762
4762
  });
4763
4763
  }
4764
4764
  //#endregion
4765
+ //#region src/ui-library/gallery/status-dot/StatusDot.tsx
4766
+ var DOT_STYLES = {
4767
+ active: {
4768
+ bg: "#10b981",
4769
+ shadow: "0 0 0 3px rgba(16,185,129,0.18)"
4770
+ },
4771
+ locked: {
4772
+ bg: "#ef4444",
4773
+ shadow: "0 0 0 3px rgba(239,68,68,0.18)"
4774
+ },
4775
+ inactive: {
4776
+ bg: "#f59e0b",
4777
+ shadow: "0 0 0 3px rgba(245,158,11,0.18)"
4778
+ },
4779
+ pending: {
4780
+ bg: "#eab308",
4781
+ shadow: "0 0 0 3px rgba(234,179,8,0.18)"
4782
+ }
4783
+ };
4784
+ function StatusDot({ status, label, className = "" }) {
4785
+ const dot = DOT_STYLES[status];
4786
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4787
+ style: {
4788
+ display: "inline-flex",
4789
+ alignItems: "center",
4790
+ gap: 8,
4791
+ fontWeight: 600,
4792
+ fontSize: "0.8125rem",
4793
+ color: "#334155"
4794
+ },
4795
+ className,
4796
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4797
+ "aria-hidden": "true",
4798
+ style: {
4799
+ display: "inline-block",
4800
+ width: 8,
4801
+ height: 8,
4802
+ borderRadius: "50%",
4803
+ flexShrink: 0,
4804
+ backgroundColor: dot.bg,
4805
+ boxShadow: dot.shadow
4806
+ }
4807
+ }), label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
4808
+ });
4809
+ }
4810
+ //#endregion
4765
4811
  //#region src/ui-library/gallery/status-actions/statusActions.ts
4766
4812
  /**
4767
4813
  * statusActions — Gallery-native lifecycle transition utilities.
@@ -5016,6 +5062,7 @@ exports.SkeletonText = SkeletonText;
5016
5062
  exports.Spinner = Spinner;
5017
5063
  exports.Statistic = Statistic;
5018
5064
  exports.StatusBadge = StatusBadge;
5065
+ exports.StatusDot = StatusDot;
5019
5066
  exports.Stepper = Stepper;
5020
5067
  exports.Switch = Switch;
5021
5068
  exports.Tab = Tab;
package/lib/index.mjs CHANGED
@@ -4739,6 +4739,52 @@ function Statistic({ label, value, helper, icon: Icon, trend, trendLabel, varian
4739
4739
  });
4740
4740
  }
4741
4741
  //#endregion
4742
+ //#region src/ui-library/gallery/status-dot/StatusDot.tsx
4743
+ var DOT_STYLES = {
4744
+ active: {
4745
+ bg: "#10b981",
4746
+ shadow: "0 0 0 3px rgba(16,185,129,0.18)"
4747
+ },
4748
+ locked: {
4749
+ bg: "#ef4444",
4750
+ shadow: "0 0 0 3px rgba(239,68,68,0.18)"
4751
+ },
4752
+ inactive: {
4753
+ bg: "#f59e0b",
4754
+ shadow: "0 0 0 3px rgba(245,158,11,0.18)"
4755
+ },
4756
+ pending: {
4757
+ bg: "#eab308",
4758
+ shadow: "0 0 0 3px rgba(234,179,8,0.18)"
4759
+ }
4760
+ };
4761
+ function StatusDot({ status, label, className = "" }) {
4762
+ const dot = DOT_STYLES[status];
4763
+ return /* @__PURE__ */ jsxs("div", {
4764
+ style: {
4765
+ display: "inline-flex",
4766
+ alignItems: "center",
4767
+ gap: 8,
4768
+ fontWeight: 600,
4769
+ fontSize: "0.8125rem",
4770
+ color: "#334155"
4771
+ },
4772
+ className,
4773
+ children: [/* @__PURE__ */ jsx("span", {
4774
+ "aria-hidden": "true",
4775
+ style: {
4776
+ display: "inline-block",
4777
+ width: 8,
4778
+ height: 8,
4779
+ borderRadius: "50%",
4780
+ flexShrink: 0,
4781
+ backgroundColor: dot.bg,
4782
+ boxShadow: dot.shadow
4783
+ }
4784
+ }), label && /* @__PURE__ */ jsx("span", { children: label })]
4785
+ });
4786
+ }
4787
+ //#endregion
4742
4788
  //#region src/ui-library/gallery/status-actions/statusActions.ts
4743
4789
  /**
4744
4790
  * statusActions — Gallery-native lifecycle transition utilities.
@@ -4922,4 +4968,4 @@ var shadow = {
4922
4968
  overlay: "shadow-xl"
4923
4969
  };
4924
4970
  //#endregion
4925
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, Alert, ApprovalTimeline, Avatar, Badge, BarChart, Breadcrumb, Button, Calendar, Card, CardContent, CardFooter, CardHeader, Checkbox, Combobox, CommandPalette, ConfirmAction, ConfirmDialog, DatePicker, DescriptionItem, DescriptionList, Dialog, DialogBody, DialogFooter, Divider, Drawer, Dropdown, EmployeeCard, EmptyState, ErrorBanner, Field, FieldContext, FieldInput, FileUpload, FilterChip, Heatmap, IconButton, Input, Kanban, LineChart, Menu, Modal, OtpInput, PageHeader, Pagination, PermissionMatrix, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioItem, Section, SegmentedControl, Select, SidebarGroup, SidebarItem, SidebarNav, SidebarSection, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonTableRow, SkeletonText, Spinner, Statistic, StatusBadge, Stepper, Switch, Tab, TabList, TabPanel, TabPanels, Tabs, Textarea, Timeline, TimelineEmptyState, TimelineFooter, TimelineItem, TimelineValueCard, Toaster, Toolbar, Tooltip, TreeView, ValidationSummary, colors_exports as colors, dimension_exports as dimension, radius_exports as radius, shadow_exports as shadow, statusMenuItems, toast, typography_exports as typography, useFieldContext };
4971
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, Alert, ApprovalTimeline, Avatar, Badge, BarChart, Breadcrumb, Button, Calendar, Card, CardContent, CardFooter, CardHeader, Checkbox, Combobox, CommandPalette, ConfirmAction, ConfirmDialog, DatePicker, DescriptionItem, DescriptionList, Dialog, DialogBody, DialogFooter, Divider, Drawer, Dropdown, EmployeeCard, EmptyState, ErrorBanner, Field, FieldContext, FieldInput, FileUpload, FilterChip, Heatmap, IconButton, Input, Kanban, LineChart, Menu, Modal, OtpInput, PageHeader, Pagination, PermissionMatrix, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioItem, Section, SegmentedControl, Select, SidebarGroup, SidebarItem, SidebarNav, SidebarSection, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonTableRow, SkeletonText, Spinner, Statistic, StatusBadge, StatusDot, Stepper, Switch, Tab, TabList, TabPanel, TabPanels, Tabs, Textarea, Timeline, TimelineEmptyState, TimelineFooter, TimelineItem, TimelineValueCard, Toaster, Toolbar, Tooltip, TreeView, ValidationSummary, colors_exports as colors, dimension_exports as dimension, radius_exports as radius, shadow_exports as shadow, statusMenuItems, toast, typography_exports as typography, useFieldContext };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * StatusDot — Design System Component
3
+ *
4
+ * A coloured glowing dot paired with a label. Used in tables to indicate
5
+ * account or entity status at a glance.
6
+ *
7
+ * Self-contained: uses inline styles so it works without any external CSS.
8
+ *
9
+ * Usage:
10
+ * <StatusDot status="active" label="Active" />
11
+ * <StatusDot status="locked" label="Locked" />
12
+ */
13
+ export type StatusDotStatus = 'active' | 'locked' | 'inactive' | 'pending';
14
+ export interface StatusDotProps {
15
+ status: StatusDotStatus;
16
+ label?: string;
17
+ className?: string;
18
+ }
19
+ export declare function StatusDot({ status, label, className }: StatusDotProps): import("react").JSX.Element;
@@ -122,6 +122,8 @@ export { Heatmap } from './gallery/heatmap/Heatmap';
122
122
  export type { HeatmapProps, HeatmapDataPoint, HeatmapScale } from './gallery/heatmap/Heatmap';
123
123
  export { Statistic } from './gallery/stat-card/Statistic';
124
124
  export type { StatisticProps, StatisticTrend, StatisticVariant } from './gallery/stat-card/Statistic';
125
+ export { StatusDot } from './gallery/status-dot/StatusDot';
126
+ export type { StatusDotProps, StatusDotStatus } from './gallery/status-dot/StatusDot';
125
127
  export { Toaster, toast } from 'sonner';
126
128
  export { statusMenuItems } from './gallery/status-actions/statusActions';
127
129
  export type { ActionMenuItem, Lifecycle, StatusTransitionRequest, StatusMenuOptions } from './gallery/status-actions/statusActions';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@diwauhris/ui",
3
3
  "private": false,
4
- "version": "1.4.2",
4
+ "version": "1.4.4",
5
5
  "type": "module",
6
6
  "description": "DIWA UHRIS UI component library — React + Tailwind CSS",
7
7
  "keywords": [