@hybridcore/ui 1.6.16 → 1.6.18

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.
Files changed (28) hide show
  1. package/CATALOG.md +1 -0
  2. package/dist/IconCircle-HcgE1lHy.js +11 -0
  3. package/dist/IconMinus-B6OPYVyo.js +11 -0
  4. package/dist/IconPlus-7KPPhzOb.js +11 -0
  5. package/dist/IconTrendingUp-CW4SFYmc.js +27 -0
  6. package/dist/components/charts/_common/utils.js +21 -11
  7. package/dist/components/charts/column-line-mix/logic.js +59 -59
  8. package/dist/components/charts/line/logic.js +55 -55
  9. package/dist/components/charts/logaritmic-scale/logic.js +27 -27
  10. package/dist/components/charts/multiple-value-axes/logic.js +70 -70
  11. package/dist/components/charts/xy-chart/logic.js +31 -31
  12. package/dist/components/color-picker/index.js +1393 -1399
  13. package/dist/components/data-map/components/controls/index.js +7 -6
  14. package/dist/components/heat-map/components/controls/index.js +7 -6
  15. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8738 -8753
  16. package/dist/components/metric-card/logic.js +57 -77
  17. package/dist/components/prr-map/components/controls/index.js +7 -6
  18. package/dist/components/range-selector/components/enum-range/index.js +66 -0
  19. package/dist/components/range-selector/index.js +40 -30
  20. package/dist/components/range-selector/styled.js +11 -11
  21. package/dist/components/raster-grid-map/components/controls/index.js +7 -6
  22. package/dist/components/status-indicator/index.js +44 -0
  23. package/dist/components/status-indicator/logic.js +105 -0
  24. package/dist/components/status-indicator/styled.js +114 -0
  25. package/dist/main.d.ts +92 -0
  26. package/dist/main.js +65 -63
  27. package/package.json +1 -1
  28. package/dist/IconPlus-yPkff_Vj.js +0 -19
@@ -0,0 +1,114 @@
1
+ import { styled as a, Typography as i, alpha as l } from "@mui/material";
2
+ import { resolvePaletteColor as r } from "../metric-card/helpers.js";
3
+ import { Widget as d } from "../widget/styled.js";
4
+ const s = {
5
+ shouldForwardProp: (t) => t !== "ownerState"
6
+ }, C = a(d.Root, {
7
+ name: "HCStatusIndicator",
8
+ slot: "Root",
9
+ ...s
10
+ })(({ theme: t, ownerState: o }) => {
11
+ const n = {
12
+ padding: t.spacing(2),
13
+ display: "flex",
14
+ gap: t.spacing(0.5)
15
+ };
16
+ return o.variant === "prominent" ? {
17
+ ...n,
18
+ flexDirection: "column",
19
+ alignItems: "center",
20
+ justifyContent: "center",
21
+ textAlign: "center"
22
+ } : o.variant === "split" ? {
23
+ ...n,
24
+ flexDirection: "row",
25
+ alignItems: "center",
26
+ gap: t.spacing(2)
27
+ } : {
28
+ ...n,
29
+ flexDirection: "column",
30
+ alignItems: "flex-start",
31
+ justifyContent: "center"
32
+ };
33
+ }), f = a(i, {
34
+ name: "HCStatusIndicator",
35
+ slot: "Label"
36
+ })(({ theme: t }) => ({
37
+ color: t.palette.text.secondary,
38
+ fontWeight: 500
39
+ })), I = a("div", {
40
+ name: "HCStatusIndicator",
41
+ slot: "IconContainer",
42
+ ...s
43
+ })(({ theme: t, ownerState: o }) => {
44
+ const n = r(t, o.resolvedColor) ?? t.palette.text.primary, e = {
45
+ display: "flex",
46
+ alignItems: "center",
47
+ justifyContent: "center",
48
+ color: n
49
+ };
50
+ if (o.variant === "split") {
51
+ const c = r(t, o.resolvedBackgroundColor) ?? l(n, 0.12);
52
+ return {
53
+ ...e,
54
+ flexShrink: 0,
55
+ width: 56,
56
+ height: 56,
57
+ borderRadius: t.shape.borderRadius * 2,
58
+ backgroundColor: c
59
+ };
60
+ }
61
+ return e;
62
+ }), x = a("div", {
63
+ name: "HCStatusIndicator",
64
+ slot: "Content"
65
+ })(() => ({
66
+ display: "flex",
67
+ flexDirection: "column",
68
+ minWidth: 0,
69
+ flex: 1
70
+ })), m = a(i, {
71
+ name: "HCStatusIndicator",
72
+ slot: "Value",
73
+ ...s
74
+ })(({ theme: t, ownerState: o }) => ({
75
+ fontWeight: 600,
76
+ lineHeight: 1.2,
77
+ color: r(t, o.resolvedColor) ?? t.palette.text.primary
78
+ })), y = a("div", {
79
+ name: "HCStatusIndicator",
80
+ slot: "Badge",
81
+ ...s
82
+ })(({ theme: t, ownerState: o }) => {
83
+ const n = r(t, o.resolvedColor) ?? t.palette.text.primary, e = r(t, o.resolvedBackgroundColor) ?? l(n, 0.12);
84
+ return {
85
+ display: "inline-flex",
86
+ alignItems: "center",
87
+ gap: t.spacing(0.75),
88
+ padding: t.spacing(0.5, 1.25),
89
+ borderRadius: 999,
90
+ backgroundColor: e,
91
+ color: n,
92
+ fontWeight: 600
93
+ };
94
+ }), S = a(i, {
95
+ name: "HCStatusIndicator",
96
+ slot: "Caption"
97
+ })(({ theme: t }) => ({
98
+ color: t.palette.text.secondary
99
+ })), v = a(i, {
100
+ name: "HCStatusIndicator",
101
+ slot: "Description"
102
+ })(({ theme: t }) => ({
103
+ color: t.palette.text.secondary
104
+ }));
105
+ export {
106
+ y as StatusIndicatorBadge,
107
+ S as StatusIndicatorCaption,
108
+ x as StatusIndicatorContent,
109
+ v as StatusIndicatorDescription,
110
+ I as StatusIndicatorIconContainer,
111
+ f as StatusIndicatorLabel,
112
+ C as StatusIndicatorRoot,
113
+ m as StatusIndicatorValue
114
+ };
package/dist/main.d.ts CHANGED
@@ -727,6 +727,13 @@ export declare interface EditableTextProps extends TypographyProps {
727
727
  onChange?(text: string | null): void;
728
728
  }
729
729
 
730
+ export declare interface EnumRangeProps {
731
+ value: SIMULATION.RandomInfoString;
732
+ options: string[];
733
+ variant?: RangeSelectorVariant;
734
+ onChange(value: SIMULATION.RandomInfoString): void;
735
+ }
736
+
730
737
  export declare const FlexCol: StyledComponent<BoxOwnProps<Theme> & Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
731
738
  ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
732
739
  }, keyof BoxOwnProps<Theme>> & MUIStyledCommonProps<Theme>, {}, {}>;
@@ -1662,6 +1669,7 @@ export declare type RangeSelectorAcceptedType =
1662
1669
  | "long"
1663
1670
  | "string"
1664
1671
  | "text"
1672
+ | "enum"
1665
1673
  | "date"
1666
1674
  | "geometry"
1667
1675
  | "composite-list";
@@ -1686,6 +1694,14 @@ export declare type RangeSelectorProps =
1686
1694
  sx?: SxProps<Theme>;
1687
1695
  onChange(value: SIMULATION.RandomInfoString): void;
1688
1696
  }
1697
+ | {
1698
+ type: "enum";
1699
+ value?: SIMULATION.RandomInfoString;
1700
+ enumValues: string[];
1701
+ mapboxAccessToken: string;
1702
+ sx?: SxProps<Theme>;
1703
+ onChange(value: SIMULATION.RandomInfoString): void;
1704
+ }
1689
1705
  | {
1690
1706
  type: "date";
1691
1707
  value?: SIMULATION.RandomInfoDate;
@@ -1936,6 +1952,58 @@ export declare interface StatsBoxProps extends BoxProps {
1936
1952
  icon?: default_2.ReactNode;
1937
1953
  }
1938
1954
 
1955
+ export declare type StatusIconName =
1956
+ | "trending-up"
1957
+ | "trending-down"
1958
+ | "arrow-right"
1959
+ | "arrow-up"
1960
+ | "arrow-down"
1961
+ | "caret-up"
1962
+ | "caret-down"
1963
+ | "minus"
1964
+ | "ban"
1965
+ | "help"
1966
+ | "check"
1967
+ | "alert"
1968
+ | "circle";
1969
+
1970
+ export declare const StatusIndicator: (props: StatusIndicatorProps) => JSX_2.Element;
1971
+
1972
+ export declare type StatusIndicatorComponentOverride<Theme = unknown> = {
1973
+ defaultProps?: StatusIndicatorProps;
1974
+ styleOverrides?: ComponentsOverrides_2<Theme>["HCStatusIndicator"];
1975
+ };
1976
+
1977
+ export declare interface StatusIndicatorProps {
1978
+ // The current categorical value, e.g. "DOWN". Bound at runtime from an ontology
1979
+ // instance's enum variable (response.variables.enum.priceDirection).
1980
+ value?: string;
1981
+ // Heading shown above the state (e.g. "Gold Price Direction").
1982
+ label?: string;
1983
+ // Optional subtitle beneath the state.
1984
+ description?: string;
1985
+ // Small supporting line (e.g. the forecast date).
1986
+ caption?: string;
1987
+ // The state map — which value renders which label/color/icon.
1988
+ states?: StatusState[];
1989
+ variant?: StatusIndicatorVariant;
1990
+ showIcon?: boolean;
1991
+ // Text rendered when `value` matches no configured state.
1992
+ emptyLabel?: string;
1993
+ loading?: boolean;
1994
+ sx?: SxProps<Theme>;
1995
+ }
1996
+
1997
+ export declare type StatusIndicatorVariant = "prominent" | "badge" | "split";
1998
+
1999
+ export declare interface StatusState {
2000
+ value: string;
2001
+ label?: string;
2002
+ color?: string;
2003
+ backgroundColor?: string;
2004
+ icon?: StatusIconName;
2005
+ }
2006
+
1939
2007
  export declare interface StringRangeProps {
1940
2008
  value: SIMULATION.RandomInfoString;
1941
2009
  variant?: RangeSelectorVariant;
@@ -3549,6 +3617,30 @@ declare module "@mui/material/styles" {
3549
3617
 
3550
3618
 
3551
3619
 
3620
+ declare module "@mui/material/styles" {
3621
+ interface ComponentNameToClassKey {
3622
+ HCStatusIndicator:
3623
+ | "root"
3624
+ | "label"
3625
+ | "iconContainer"
3626
+ | "content"
3627
+ | "value"
3628
+ | "badge"
3629
+ | "caption"
3630
+ | "description";
3631
+ }
3632
+
3633
+ interface ComponentsPropsList {
3634
+ HCStatusIndicator: StatusIndicatorProps;
3635
+ }
3636
+
3637
+ interface Components<Theme = unknown> {
3638
+ HCStatusIndicator?: StatusIndicatorComponentOverride<Theme>;
3639
+ }
3640
+ }
3641
+
3642
+
3643
+
3552
3644
  declare module "@mui/material/styles" {
3553
3645
  interface ComponentNameToClassKey {
3554
3646
  HCPlaceholder: "root";
package/dist/main.js CHANGED
@@ -6,7 +6,7 @@ import { h as n } from "./helpers-D4uXfBfO.js";
6
6
  import { Card as s } from "./components/card/index.js";
7
7
  import { CardAlternate as C } from "./components/card-alternate/index.js";
8
8
  import { ChartWrapper as T } from "./components/charts/chart-wrapper/index.js";
9
- import { CandlestickChart as u } from "./components/charts/candlestick/index.js";
9
+ import { CandlestickChart as h } from "./components/charts/candlestick/index.js";
10
10
  import { ForecastConeChart as L } from "./components/charts/forecast-cone/index.js";
11
11
  import { ColumnLineMix as I } from "./components/charts/column-line-mix/index.js";
12
12
  import { DonutChart as y } from "./components/charts/donut-chart/index.js";
@@ -31,7 +31,7 @@ import { CollapsibleCard as ir } from "./components/collapsible-card/index.js";
31
31
  import { ConditionalWrapper as nr } from "./components/conditional-wrapper/index.js";
32
32
  import { alert as sr, confirm as dr } from "./components/confirm/index.js";
33
33
  import { HCNotificationProvider as Pr } from "./components/notification/index.js";
34
- import { Container as hr } from "./components/container/index.js";
34
+ import { Container as ur } from "./components/container/index.js";
35
35
  import { ContextMenu as Dr } from "./components/context-menu/index.js";
36
36
  import { DataGrid as Sr } from "./components/data-grid/index.js";
37
37
  import { DataMap as gr } from "./components/data-map/index.js";
@@ -58,42 +58,43 @@ import { LinearIndicator as lo } from "./components/linear-indicator/index.js";
58
58
  import { Loading as co } from "./components/loading/index.js";
59
59
  import { Map as Co } from "./components/map/index.js";
60
60
  import { MetricCard as To } from "./components/metric-card/index.js";
61
- import { ObjectProfileCard as uo } from "./components/object-profile-card/index.js";
61
+ import { ObjectProfileCard as ho } from "./components/object-profile-card/index.js";
62
62
  import { PaginatedList as Lo } from "./components/paginated-list/index.js";
63
- import { PhoneInput as Io } from "./components/phone-input/index.js";
64
- import { Placeholder as yo } from "./components/placeholder/index.js";
65
- import { PositionalTooltip as bo } from "./components/positional-tooltip/index.js";
66
- import { PrrMap as Vo } from "./components/prr-map/index.js";
67
- import { RangeSelector as vo } from "./components/range-selector/index.js";
68
- import { RasterGridMap as Ro } from "./components/raster-grid-map/index.js";
69
- import { SearchInput as Eo } from "./components/search-input/index.js";
70
- import { ScrollDrag as Ho } from "./components/scroll-drag/index.js";
71
- import { SimplePivotTable as Wo } from "./components/simple-pivot-table/index.js";
72
- import { SortableList as Oo } from "./components/sortable-list/index.js";
73
- import { StatsBox as No } from "./components/stats-box/index.js";
74
- import { StaticText as zo } from "./components/static-text/index.js";
75
- import { Tabs as Yo } from "./components/tabs/index.js";
76
- import { TextOverflow as Jo } from "./components/text-overflow/index.js";
77
- import { TemplateFilters as Qo } from "./components/template-filters/index.js";
78
- import { TemplateForm as $o } from "./components/template-form/index.js";
79
- import { TemplatePropertyFilters as oe } from "./components/template-property-filters/index.js";
80
- import { Property as te } from "./components/template-property-filters/property.js";
81
- import { TimelineWidget as me } from "./components/timeline/index.js";
82
- import { ToggleViewButton as xe } from "./components/toggle-view-button/index.js";
83
- import { TreeSelect as ie } from "./components/tree-select/index.js";
84
- import { TreeViewFilter as ne } from "./components/treeview-filter/index.js";
85
- import { Uploader as se } from "./components/uploader/index.js";
86
- import { VisuallyHiddenInput as Ce } from "./components/visually-hidden-input/styled.js";
87
- import { Widget as Te } from "./components/widget/styled.js";
88
- import { FlexCol as ue } from "./components/flex-col/index.js";
89
- import { FlexRow as Le } from "./components/flex-row/index.js";
90
- import { notify as Ie, removeNotification as ge } from "./components/notification/store.js";
63
+ import { StatusIndicator as Io } from "./components/status-indicator/index.js";
64
+ import { PhoneInput as yo } from "./components/phone-input/index.js";
65
+ import { Placeholder as bo } from "./components/placeholder/index.js";
66
+ import { PositionalTooltip as Vo } from "./components/positional-tooltip/index.js";
67
+ import { PrrMap as vo } from "./components/prr-map/index.js";
68
+ import { RangeSelector as Ro } from "./components/range-selector/index.js";
69
+ import { RasterGridMap as Eo } from "./components/raster-grid-map/index.js";
70
+ import { SearchInput as Ho } from "./components/search-input/index.js";
71
+ import { ScrollDrag as Wo } from "./components/scroll-drag/index.js";
72
+ import { SimplePivotTable as Oo } from "./components/simple-pivot-table/index.js";
73
+ import { SortableList as No } from "./components/sortable-list/index.js";
74
+ import { StatsBox as zo } from "./components/stats-box/index.js";
75
+ import { StaticText as Yo } from "./components/static-text/index.js";
76
+ import { Tabs as Jo } from "./components/tabs/index.js";
77
+ import { TextOverflow as Qo } from "./components/text-overflow/index.js";
78
+ import { TemplateFilters as $o } from "./components/template-filters/index.js";
79
+ import { TemplateForm as oe } from "./components/template-form/index.js";
80
+ import { TemplatePropertyFilters as te } from "./components/template-property-filters/index.js";
81
+ import { Property as me } from "./components/template-property-filters/property.js";
82
+ import { TimelineWidget as xe } from "./components/timeline/index.js";
83
+ import { ToggleViewButton as ie } from "./components/toggle-view-button/index.js";
84
+ import { TreeSelect as ne } from "./components/tree-select/index.js";
85
+ import { TreeViewFilter as se } from "./components/treeview-filter/index.js";
86
+ import { Uploader as Ce } from "./components/uploader/index.js";
87
+ import { VisuallyHiddenInput as Te } from "./components/visually-hidden-input/styled.js";
88
+ import { Widget as he } from "./components/widget/styled.js";
89
+ import { FlexCol as Le } from "./components/flex-col/index.js";
90
+ import { FlexRow as Ie } from "./components/flex-row/index.js";
91
+ import { notify as ye, removeNotification as Fe } from "./components/notification/store.js";
91
92
  export {
92
93
  i as Access,
93
94
  n as AccessUtils,
94
95
  x as AdapterDayjs,
95
96
  mr as Button,
96
- u as CandlestickChart,
97
+ h as CandlestickChart,
97
98
  s as Card,
98
99
  C as CardAlternate,
99
100
  T as ChartWrapper,
@@ -101,7 +102,7 @@ export {
101
102
  xr as ColorPicker,
102
103
  I as ColumnLineMix,
103
104
  nr as ConditionalWrapper,
104
- hr as Container,
105
+ ur as Container,
105
106
  Dr as ContextMenu,
106
107
  Mr as DEFAULT_RELATIVE_PRESET_LABELS,
107
108
  tr as DEFAULT_VIRIDIS_COOL,
@@ -118,8 +119,8 @@ export {
118
119
  V as DrillDownVoronoiTreemap,
119
120
  Ur as DurationSelect,
120
121
  jr as EditableText,
121
- ue as FlexCol,
122
- Le as FlexRow,
122
+ Le as FlexCol,
123
+ Ie as FlexRow,
123
124
  L as ForecastConeChart,
124
125
  qr as GeometryDraw,
125
126
  Kr as GeometryParser,
@@ -142,46 +143,47 @@ export {
142
143
  To as MetricCard,
143
144
  W as MultipleValueAxes,
144
145
  O as NestedPie,
145
- uo as ObjectProfileCard,
146
+ ho as ObjectProfileCard,
146
147
  N as PackedCircles,
147
148
  Lo as PaginatedList,
148
- Io as PhoneInput,
149
+ yo as PhoneInput,
149
150
  z as PieChart,
150
- yo as Placeholder,
151
- bo as PositionalTooltip,
152
- te as PropertyFilterInput,
153
- Vo as PrrMap,
154
- vo as RangeSelector,
155
- Ro as RasterGridMap,
156
- Ho as ScrollDrag,
157
- Eo as SearchInput,
151
+ bo as Placeholder,
152
+ Vo as PositionalTooltip,
153
+ me as PropertyFilterInput,
154
+ vo as PrrMap,
155
+ Ro as RangeSelector,
156
+ Eo as RasterGridMap,
157
+ Wo as ScrollDrag,
158
+ Ho as SearchInput,
158
159
  Ar as SecurityLevel,
159
- Wo as SimplePivotTable,
160
- Oo as SortableList,
160
+ Oo as SimplePivotTable,
161
+ No as SortableList,
161
162
  Y as StackedAreaRadar,
162
163
  J as StackedColumnChart,
163
- zo as StaticText,
164
- No as StatsBox,
165
- Yo as Tabs,
166
- Qo as TemplateFilters,
167
- $o as TemplateForm,
168
- oe as TemplatePropertyFilters,
169
- Jo as TextOverflow,
164
+ Yo as StaticText,
165
+ zo as StatsBox,
166
+ Io as StatusIndicator,
167
+ Jo as Tabs,
168
+ $o as TemplateFilters,
169
+ oe as TemplateForm,
170
+ te as TemplatePropertyFilters,
171
+ Qo as TextOverflow,
170
172
  e as ThemeProvider,
171
- me as TimelineWidget,
172
- xe as ToggleViewButton,
173
- ie as TreeSelect,
174
- ne as TreeViewFilter,
175
- se as Uploader,
176
- Ce as VisuallyHiddenInput,
177
- Te as Widget,
173
+ xe as TimelineWidget,
174
+ ie as ToggleViewButton,
175
+ ne as TreeSelect,
176
+ se as TreeViewFilter,
177
+ Ce as Uploader,
178
+ Te as VisuallyHiddenInput,
179
+ he as Widget,
178
180
  Q as XYChart,
179
181
  sr as alert,
180
182
  dr as confirm,
181
183
  t as createTheme,
182
184
  $ as formatValue,
183
185
  rr as humanizeLabel,
184
- Ie as notify,
185
- ge as removeNotification,
186
+ ye as notify,
187
+ Fe as removeNotification,
186
188
  or as resolveConditionalStyle
187
189
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.6.16",
4
+ "version": "1.6.18",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -1,19 +0,0 @@
1
- import { c as o } from "./createReactComponent-C7L-DMHj.js";
2
- /**
3
- * @license @tabler/icons-react v3.44.0 - MIT
4
- *
5
- * This source code is licensed under the MIT license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const s = [["path", { d: "M5 12l14 0", key: "svg-0" }]], e = o("outline", "minus", "Minus", s);
9
- /**
10
- * @license @tabler/icons-react v3.44.0 - MIT
11
- *
12
- * This source code is licensed under the MIT license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */
15
- const n = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M5 12l14 0", key: "svg-1" }]], c = o("outline", "plus", "Plus", n);
16
- export {
17
- c as I,
18
- e as a
19
- };