@fluidattacks/design 11.3.0 → 11.6.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.
Files changed (34) hide show
  1. package/dist/components/button/index.js +60 -60
  2. package/dist/components/button/index.stories.d.ts +2 -1
  3. package/dist/components/button/index.test.d.ts +1 -0
  4. package/dist/components/charts/data-legend/index.d.ts +4 -0
  5. package/dist/components/charts/data-legend/index.js +82 -0
  6. package/dist/components/charts/data-legend/index.stories.d.ts +9 -0
  7. package/dist/components/charts/data-legend/index.test.d.ts +1 -0
  8. package/dist/components/charts/data-legend/styles.d.ts +5 -0
  9. package/dist/components/charts/data-legend/styles.js +11 -0
  10. package/dist/components/charts/data-legend/types.d.ts +32 -0
  11. package/dist/components/charts/data-number/index.d.ts +4 -0
  12. package/dist/components/charts/data-number/index.js +75 -0
  13. package/dist/components/charts/data-number/index.stories.d.ts +10 -0
  14. package/dist/components/charts/data-number/index.test.d.ts +1 -0
  15. package/dist/components/charts/data-number/types.d.ts +32 -0
  16. package/dist/components/charts/grouped-data-number/index.d.ts +4 -0
  17. package/dist/components/charts/grouped-data-number/index.js +9 -0
  18. package/dist/components/charts/grouped-data-number/index.stories.d.ts +7 -0
  19. package/dist/components/charts/grouped-data-number/index.test.d.ts +1 -0
  20. package/dist/components/charts/grouped-data-number/styles.d.ts +6 -0
  21. package/dist/components/charts/grouped-data-number/styles.js +20 -0
  22. package/dist/components/charts/grouped-data-number/types.d.ts +17 -0
  23. package/dist/components/charts/index.d.ts +7 -0
  24. package/dist/components/charts/index.js +8 -0
  25. package/dist/components/charts/utils.d.ts +2 -0
  26. package/dist/components/charts/utils.js +4 -0
  27. package/dist/components/stepper/index.d.ts +1 -1
  28. package/dist/components/stepper/index.js +16 -15
  29. package/dist/components/stepper/styles.d.ts +5 -1
  30. package/dist/components/stepper/styles.js +6 -0
  31. package/dist/components/stepper/types.d.ts +2 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.js +310 -304
  34. package/package.json +1 -1
@@ -1,87 +1,87 @@
1
1
  import { jsxs as R, jsx as o } from "react/jsx-runtime";
2
2
  import { forwardRef as S, useCallback as U } from "react";
3
3
  import { StyledButton as q } from "./styles.js";
4
- import { Icon as g } from "../icon/index.js";
5
- import { NotificationSign as h } from "../notification-sign/index.js";
4
+ import { Icon as h } from "../icon/index.js";
5
+ import { NotificationSign as k } from "../notification-sign/index.js";
6
6
  import { Tag as A } from "../tag/index.js";
7
7
  import { Tooltip as D } from "../tooltip/index.js";
8
8
  import { openUrl as E } from "../../utils/open-url.js";
9
- const V = S(function({
10
- children: k,
9
+ const W = S(function({
10
+ children: T,
11
11
  disabled: t = !1,
12
12
  external: a = !1,
13
- href: i,
14
- id: m,
15
- icon: l,
16
- iconColor: T,
13
+ href: r,
14
+ id: e,
15
+ icon: n,
16
+ iconColor: b,
17
17
  iconSize: p = "lg",
18
- iconType: b,
19
- name: y,
18
+ iconType: y,
19
+ name: B,
20
20
  dotNotification: C,
21
- notification: e,
21
+ notification: m,
22
22
  onClick: w,
23
- rightIcon: f,
24
- tag: s,
25
- type: B = "button",
26
- tooltip: d,
27
- tooltipPlace: j = "bottom",
28
- underline: x = !1,
29
- value: I,
30
- variant: r = "primary",
31
- width: c,
32
- ...L
33
- }, N) {
34
- const n = d !== void 0, u = `${m}-tooltip`, $ = U(() => {
35
- i && E(i, a);
36
- }, [a, i]), v = /* @__PURE__ */ R(
23
+ rightIcon: s,
24
+ tag: f,
25
+ type: j = "button",
26
+ tooltip: c,
27
+ tooltipPlace: x = "bottom",
28
+ underline: I = !1,
29
+ value: L,
30
+ variant: i = "primary",
31
+ width: d,
32
+ ...N
33
+ }, $) {
34
+ const l = c !== void 0, u = `${e}-tooltip`, v = i === "link" && !!r, H = U(() => {
35
+ r && E(r, a);
36
+ }, [a, r]), g = /* @__PURE__ */ R(
37
37
  q,
38
38
  {
39
- $variant: r,
39
+ $variant: i,
40
40
  "aria-disabled": t,
41
- className: x ? "underline" : void 0,
41
+ className: I ? "underline" : void 0,
42
42
  disabled: t,
43
- id: m,
44
- name: y,
45
- onClick: r === "link" ? $ : w,
46
- ref: N,
47
- type: B,
48
- value: I,
49
- width: c,
50
- ...n ? { "data-tooltip-id": u } : {},
51
- ...L,
43
+ id: e,
44
+ name: B,
45
+ onClick: v ? H : w,
46
+ ref: $,
47
+ type: j,
48
+ value: L,
49
+ width: d,
50
+ ...l ? { "data-tooltip-id": u } : {},
51
+ ...N,
52
52
  children: [
53
- C && r === "ghost" && !t ? /* @__PURE__ */ o(
54
- h,
53
+ C && i === "ghost" && !t ? /* @__PURE__ */ o(
54
+ k,
55
55
  {
56
- left: l !== void 0 ? "13%" : "1%",
56
+ left: n !== void 0 ? "13%" : "1%",
57
57
  show: !0,
58
58
  top: "20%",
59
59
  variant: "error"
60
60
  }
61
61
  ) : void 0,
62
- l !== void 0 && /* @__PURE__ */ o(
63
- g,
62
+ n !== void 0 && /* @__PURE__ */ o(
63
+ h,
64
64
  {
65
- icon: l,
66
- iconColor: T ?? void 0,
65
+ icon: n,
66
+ iconColor: b ?? void 0,
67
67
  iconSize: p,
68
- iconType: b ?? "fa-light"
68
+ iconType: y ?? "fa-light"
69
69
  }
70
70
  ),
71
- k,
72
- f || r === "link" ? /* @__PURE__ */ o(
73
- g,
71
+ T,
72
+ s || v ? /* @__PURE__ */ o(
73
+ h,
74
74
  {
75
- icon: f ?? "arrow-right",
75
+ icon: s ?? "arrow-right",
76
76
  iconSize: p,
77
77
  iconType: "fa-light"
78
78
  }
79
79
  ) : void 0,
80
- s === void 0 || t ? null : /* @__PURE__ */ o(A, { tagLabel: s, variant: "default" }),
81
- e !== void 0 && r === "ghost" && !t ? /* @__PURE__ */ o(
82
- h,
80
+ f === void 0 || t ? null : /* @__PURE__ */ o(A, { tagLabel: f, variant: "default" }),
81
+ m !== void 0 && i === "ghost" && !t ? /* @__PURE__ */ o(
82
+ k,
83
83
  {
84
- numberIndicator: e,
84
+ numberIndicator: m,
85
85
  show: !0,
86
86
  variant: "error"
87
87
  }
@@ -89,18 +89,18 @@ const V = S(function({
89
89
  ]
90
90
  }
91
91
  );
92
- return n ? /* @__PURE__ */ o(
92
+ return l ? /* @__PURE__ */ o(
93
93
  D,
94
94
  {
95
- disabled: !n,
95
+ disabled: !l,
96
96
  id: u,
97
- place: j,
98
- tip: d,
99
- width: c,
100
- children: v
97
+ place: x,
98
+ tip: c,
99
+ width: d,
100
+ children: g
101
101
  }
102
- ) : v;
102
+ ) : g;
103
103
  });
104
104
  export {
105
- V as Button
105
+ W as Button
106
106
  };
@@ -13,5 +13,6 @@ declare const Secondary: import('storybook/internal/csf').AnnotatedStoryFn<impor
13
13
  declare const Tertiary: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonStoryProps>>;
14
14
  declare const Ghost: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonStoryProps>>;
15
15
  declare const TextLink: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonStoryProps>>;
16
- export { Default, Secondary, Tertiary, Ghost, TextLink };
16
+ declare const Link: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonStoryProps>>;
17
+ export { Default, Secondary, Tertiary, Ghost, Link, TextLink };
17
18
  export default config;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { IDataLegendItemProps, IDataLegendProps } from './types';
2
+ declare const DataLegend: ({ items, tag, }: Readonly<IDataLegendProps>) => JSX.Element;
3
+ export type { IDataLegendItemProps, IDataLegendProps };
4
+ export { DataLegend };
@@ -0,0 +1,82 @@
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import { l as f } from "../../../_virtual/lodash.js";
3
+ import { useId as h } from "react";
4
+ import { useNumberFormatter as x } from "../../../node_modules/react-aria/dist/private/i18n/useNumberFormatter.js";
5
+ import { useTheme as b } from "styled-components";
6
+ import { StyledMarker as u } from "./styles.js";
7
+ import { isSingleCssColor as $ } from "../utils.js";
8
+ import { Container as i } from "../../container/index.js";
9
+ import { Link as v } from "../../link/index.js";
10
+ import { Tag as I } from "../../tag/index.js";
11
+ import { Tooltip as L } from "../../tooltip/index.js";
12
+ import "../../typography/heading/index.js";
13
+ import { Span as T } from "../../typography/span/index.js";
14
+ import { Text as w } from "../../typography/text/index.js";
15
+ import { safeUrl as C } from "../../../utils/url.js";
16
+ const H = ({
17
+ items: d,
18
+ tag: t
19
+ }) => {
20
+ const o = b(), c = h(), g = x();
21
+ return /* @__PURE__ */ e(i, { alignItems: "center", display: "flex", gap: 0.75, wrap: "wrap", children: [
22
+ d.map(
23
+ ({ color: m, href: a, label: p, tooltip: l, value: y }, n) => {
24
+ const s = /* @__PURE__ */ e(
25
+ w,
26
+ {
27
+ color: o.palette.gray[700],
28
+ display: "inline",
29
+ size: "sm",
30
+ children: [
31
+ /* @__PURE__ */ r(
32
+ T,
33
+ {
34
+ color: o.palette.gray[700],
35
+ fontWeight: "bold",
36
+ size: "sm",
37
+ children: g.format(y)
38
+ }
39
+ ),
40
+ " ",
41
+ p
42
+ ]
43
+ }
44
+ );
45
+ return /* @__PURE__ */ e(
46
+ i,
47
+ {
48
+ alignItems: "center",
49
+ display: "flex",
50
+ gap: 0.5,
51
+ children: [
52
+ /* @__PURE__ */ r(
53
+ u,
54
+ {
55
+ $color: $(m) ? m : o.palette.gray[300]
56
+ }
57
+ ),
58
+ /* @__PURE__ */ e(i, { alignItems: "center", display: "flex", gap: 0.25, children: [
59
+ a === void 0 ? s : /* @__PURE__ */ r(v, { color: o.palette.gray[700], href: C(a), children: s }),
60
+ f.isEmpty(l) ? void 0 : /* @__PURE__ */ r(
61
+ L,
62
+ {
63
+ display: "flex",
64
+ icon: "circle-info",
65
+ id: `${c}-${n}`,
66
+ place: "top",
67
+ tip: l
68
+ }
69
+ )
70
+ ] })
71
+ ]
72
+ },
73
+ `${p}-${n}`
74
+ );
75
+ }
76
+ ),
77
+ t === void 0 || f.isEmpty(t) ? void 0 : /* @__PURE__ */ r(I, { priority: "low", tagLabel: t, variant: "info" })
78
+ ] });
79
+ };
80
+ export {
81
+ H as DataLegend
82
+ };
@@ -0,0 +1,9 @@
1
+ import { Meta } from '@storybook/react-vite';
2
+ import { IDataLegendProps } from './types';
3
+ declare const config: Meta<IDataLegendProps>;
4
+ declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataLegendProps>;
5
+ declare const WithoutTag: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataLegendProps>;
6
+ declare const OneItem: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataLegendProps>;
7
+ declare const EightItems: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataLegendProps>;
8
+ export { Default, EightItems, OneItem, WithoutTag };
9
+ export default config;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ interface IStyledMarkerProps {
2
+ $color: string;
3
+ }
4
+ declare const StyledMarker: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "$color"> & IStyledMarkerProps, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "$color"> & IStyledMarkerProps, never>>> & string;
5
+ export { StyledMarker };
@@ -0,0 +1,11 @@
1
+ import { styled as o } from "styled-components";
2
+ const t = o.span`
3
+ background-color: ${({ $color: r }) => r};
4
+ border-radius: 100px;
5
+ flex-shrink: 0;
6
+ height: 8px;
7
+ width: 4px;
8
+ `;
9
+ export {
10
+ t as StyledMarker
11
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Data legend item props.
3
+ * @interface IDataLegendItemProps
4
+ * @property { string } color - Color of the marker: a hex code, a color name,
5
+ * or an rgb()/hsl() value. Anything else falls back to gray 300.
6
+ * @property { string } [href] - Destination of the value and the label. Only
7
+ * internal paths and http(s) URLs are kept; anything else becomes "#".
8
+ * @property { string } label - Text that describes the value.
9
+ * @property { string } [tooltip] - Text of the info tooltip. The info icon
10
+ * shows only when it has text.
11
+ * @property { number } value - Number shown in the locale format.
12
+ */
13
+ interface IDataLegendItemProps {
14
+ color: string;
15
+ href?: string;
16
+ label: string;
17
+ tooltip?: string;
18
+ value: number;
19
+ }
20
+ /**
21
+ * Data legend component props.
22
+ * @interface IDataLegendProps
23
+ * @property { IDataLegendItemProps[] } items - Items in the order to show;
24
+ * the component does not sort them.
25
+ * @property { string } [tag] - Text of a tag after the last item. The tag
26
+ * shows only when it has text.
27
+ */
28
+ interface IDataLegendProps {
29
+ items: readonly IDataLegendItemProps[];
30
+ tag?: string;
31
+ }
32
+ export type { IDataLegendItemProps, IDataLegendProps };
@@ -0,0 +1,4 @@
1
+ import { IDataNumberProps, TDataNumberLayout } from './types';
2
+ declare const DataNumber: ({ href, isLink, label, layout, linkLabel, showTooltip, tooltip, value, valueColor, }: Readonly<IDataNumberProps>) => JSX.Element;
3
+ export type { IDataNumberProps, TDataNumberLayout };
4
+ export { DataNumber };
@@ -0,0 +1,75 @@
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { l as g } from "../../../_virtual/lodash.js";
3
+ import { useId as b } from "react";
4
+ import { useNumberFormatter as y } from "../../../node_modules/react-aria/dist/private/i18n/useNumberFormatter.js";
5
+ import { useTheme as u } from "styled-components";
6
+ import { isSingleCssColor as w } from "../utils.js";
7
+ import { Container as p } from "../../container/index.js";
8
+ import { Link as k } from "../../link/index.js";
9
+ import { Tooltip as E } from "../../tooltip/index.js";
10
+ import { Heading as I } from "../../typography/heading/index.js";
11
+ import "../../typography/span/index.js";
12
+ import { Text as T } from "../../typography/text/index.js";
13
+ import { safeUrl as v } from "../../../utils/url.js";
14
+ const $ = "—", M = ({
15
+ href: e,
16
+ isLink: d = !1,
17
+ label: l,
18
+ layout: f = "inline",
19
+ linkLabel: t,
20
+ showTooltip: c = !1,
21
+ tooltip: m,
22
+ value: s,
23
+ valueColor: o
24
+ }) => {
25
+ const n = u(), h = b(), x = y(), i = f === "stacked";
26
+ return /* @__PURE__ */ a(
27
+ p,
28
+ {
29
+ alignItems: i ? "start" : "center",
30
+ display: "flex",
31
+ flexDirection: i ? "column" : "row",
32
+ gap: i ? 0.125 : 0.5,
33
+ minWidth: "0",
34
+ children: [
35
+ /* @__PURE__ */ r(
36
+ I,
37
+ {
38
+ color: o !== void 0 && w(o) ? o : n.palette.gray[700],
39
+ display: "inline",
40
+ fontWeight: "bold",
41
+ size: "sm",
42
+ wordBreak: "break-word",
43
+ children: s === void 0 ? $ : x.format(s)
44
+ }
45
+ ),
46
+ /* @__PURE__ */ a(
47
+ p,
48
+ {
49
+ alignItems: "center",
50
+ display: "flex",
51
+ gap: 0.25,
52
+ wrap: "wrap",
53
+ children: [
54
+ /* @__PURE__ */ r(T, { color: n.palette.gray[700], display: "inline", size: "md", children: l }),
55
+ d && e !== void 0 && t !== void 0 ? /* @__PURE__ */ r(k, { href: v(e), children: t }) : void 0,
56
+ c && !g.isEmpty(m) ? /* @__PURE__ */ r(
57
+ E,
58
+ {
59
+ display: "flex",
60
+ icon: "circle-info",
61
+ id: h,
62
+ place: "top",
63
+ tip: m
64
+ }
65
+ ) : void 0
66
+ ]
67
+ }
68
+ )
69
+ ]
70
+ }
71
+ );
72
+ };
73
+ export {
74
+ M as DataNumber
75
+ };
@@ -0,0 +1,10 @@
1
+ import { Meta } from '@storybook/react-vite';
2
+ import { IDataNumberProps } from './types';
3
+ declare const config: Meta<IDataNumberProps>;
4
+ declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataNumberProps>;
5
+ declare const WithoutLink: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataNumberProps>;
6
+ declare const WithoutTooltip: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataNumberProps>;
7
+ declare const Stacked: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataNumberProps>;
8
+ declare const Empty: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IDataNumberProps>;
9
+ export { Default, Empty, Stacked, WithoutLink, WithoutTooltip };
10
+ export default config;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ type TDataNumberLayout = "inline" | "stacked";
2
+ /**
3
+ * Data number component props.
4
+ * @interface IDataNumberProps
5
+ * @property { string } [href] - Destination of the link. Only internal paths
6
+ * and http(s) URLs are kept; anything else becomes "#".
7
+ * @property { boolean } [isLink] - Show the link after the label. It shows
8
+ * only when `href` and `linkLabel` are also given.
9
+ * @property { string } label - Text that describes the value.
10
+ * @property { TDataNumberLayout } [layout] - "inline" puts the value and the
11
+ * label on one line; "stacked" puts the value above the label.
12
+ * @property { string } [linkLabel] - Text of the link.
13
+ * @property { boolean } [showTooltip] - Show the info icon. It shows only when
14
+ * `tooltip` has text.
15
+ * @property { string } [tooltip] - Text of the info tooltip.
16
+ * @property { number } [value] - Number shown in the locale format. Without it,
17
+ * an em dash shows that there is no data.
18
+ * @property { string } [valueColor] - Color of the value: a hex code, a color
19
+ * name, or an rgb()/hsl() value. Anything else falls back to gray 700.
20
+ */
21
+ interface IDataNumberProps {
22
+ href?: string;
23
+ isLink?: boolean;
24
+ label: string;
25
+ layout?: TDataNumberLayout;
26
+ linkLabel?: string;
27
+ showTooltip?: boolean;
28
+ tooltip?: string;
29
+ value?: number;
30
+ valueColor?: string;
31
+ }
32
+ export type { IDataNumberProps, TDataNumberLayout };
@@ -0,0 +1,4 @@
1
+ import { IGroupedDataNumberProps, TGroupedDataNumberItem } from './types';
2
+ declare const GroupedDataNumber: ({ items, }: Readonly<IGroupedDataNumberProps>) => JSX.Element;
3
+ export type { IGroupedDataNumberProps, TGroupedDataNumberItem };
4
+ export { GroupedDataNumber };
@@ -0,0 +1,9 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { StyledGroup as l, StyledItem as m } from "./styles.js";
3
+ import { DataNumber as a } from "../data-number/index.js";
4
+ const c = ({
5
+ items: o
6
+ }) => /* @__PURE__ */ r(l, { $columns: o.length, children: o.map((t, e) => /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(a, { ...t, layout: "stacked" }) }, `${t.label}-${e}`)) });
7
+ export {
8
+ c as GroupedDataNumber
9
+ };
@@ -0,0 +1,7 @@
1
+ import { Meta } from '@storybook/react-vite';
2
+ import { IGroupedDataNumberProps } from './types';
3
+ declare const config: Meta<IGroupedDataNumberProps>;
4
+ declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IGroupedDataNumberProps>;
5
+ declare const Empty: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IGroupedDataNumberProps>;
6
+ export { Default, Empty };
7
+ export default config;
@@ -0,0 +1,6 @@
1
+ interface IStyledGroupProps {
2
+ $columns: number;
3
+ }
4
+ declare const StyledGroup: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$columns"> & IStyledGroupProps, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$columns"> & IStyledGroupProps, never>>> & string;
5
+ declare const StyledItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
6
+ export { StyledGroup, StyledItem };
@@ -0,0 +1,20 @@
1
+ import { styled as d } from "styled-components";
2
+ const p = d.div`
3
+ ${({ $columns: t, theme: e }) => `
4
+ display: grid;
5
+ gap: ${e.spacing[0.5]};
6
+ grid-template-columns: repeat(${t}, minmax(0, 1fr));
7
+ width: 100%;
8
+ `}
9
+ `, r = d.div`
10
+ ${({ theme: t }) => `
11
+ & + & {
12
+ border-left: 1px solid ${t.palette.gray[200]};
13
+ padding-left: ${t.spacing[0.5]};
14
+ }
15
+ `}
16
+ `;
17
+ export {
18
+ p as StyledGroup,
19
+ r as StyledItem
20
+ };
@@ -0,0 +1,17 @@
1
+ import { IDataNumberProps } from '../data-number/types';
2
+ type TGroupedDataNumberItem = Omit<IDataNumberProps, "layout">;
3
+ /**
4
+ * Grouped data number component props.
5
+ * @interface IGroupedDataNumberProps
6
+ * @property { TGroupedDataNumberItem[] } items - One to three data numbers,
7
+ * shown stacked in equal columns, in the given order. Each item keeps its own
8
+ * link and tooltip configuration.
9
+ */
10
+ interface IGroupedDataNumberProps {
11
+ items: readonly [
12
+ TGroupedDataNumberItem,
13
+ TGroupedDataNumberItem,
14
+ TGroupedDataNumberItem
15
+ ] | readonly [TGroupedDataNumberItem, TGroupedDataNumberItem] | readonly [TGroupedDataNumberItem];
16
+ }
17
+ export type { IGroupedDataNumberProps, TGroupedDataNumberItem };
@@ -0,0 +1,7 @@
1
+ import { DataLegend } from './data-legend';
2
+ import { IDataLegendItemProps, IDataLegendProps } from './data-legend/types';
3
+ import { DataNumber } from './data-number';
4
+ import { IDataNumberProps, TDataNumberLayout } from './data-number/types';
5
+ import { GroupedDataNumber } from './grouped-data-number';
6
+ import { IGroupedDataNumberProps, TGroupedDataNumberItem } from './grouped-data-number/types';
7
+ export { DataLegend, DataNumber, GroupedDataNumber, type IDataLegendItemProps, type IDataLegendProps, type IDataNumberProps, type IGroupedDataNumberProps, type TDataNumberLayout, type TGroupedDataNumberItem, };
@@ -0,0 +1,8 @@
1
+ import { DataLegend as o } from "./data-legend/index.js";
2
+ import { DataNumber as t } from "./data-number/index.js";
3
+ import { GroupedDataNumber as p } from "./grouped-data-number/index.js";
4
+ export {
5
+ o as DataLegend,
6
+ t as DataNumber,
7
+ p as GroupedDataNumber
8
+ };
@@ -0,0 +1,2 @@
1
+ declare const isSingleCssColor: (value: string) => boolean;
2
+ export { isSingleCssColor };
@@ -0,0 +1,4 @@
1
+ const o = /^(?:#[0-9a-f]{3,8}|[a-z]+|(?:rgb|hsl)a?\([\d\s.,%/]+\))$/iu, t = (s) => o.test(s);
2
+ export {
3
+ t as isSingleCssColor
4
+ };
@@ -1,4 +1,4 @@
1
1
  import { IStepperProps, IStepperStep } from './types';
2
- declare const Stepper: ({ completedLabel, currentStep, steps, }: Readonly<IStepperProps>) => JSX.Element;
2
+ declare const Stepper: ({ completedLabel, currentStep, fixedHeader, steps, }: Readonly<IStepperProps>) => JSX.Element;
3
3
  export { Stepper };
4
4
  export type { IStepperProps, IStepperStep };
@@ -1,29 +1,30 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { Fragment as a } from "react";
3
- import { VisuallyHidden as d } from "../../node_modules/react-aria/dist/private/visually-hidden/VisuallyHidden.js";
4
- import { useTheme as s } from "styled-components";
5
- import { StyledStepRow as h, StyledStepItem as u, StyledStepIndicator as f, StyledStepConnector as g } from "./styles.js";
6
- import { Icon as y } from "../icon/index.js";
3
+ import { VisuallyHidden as s } from "../../node_modules/react-aria/dist/private/visually-hidden/VisuallyHidden.js";
4
+ import { useTheme as h } from "styled-components";
5
+ import { StyledStepRow as u, StyledStepItem as f, StyledStepIndicator as g, StyledStepConnector as y } from "./styles.js";
6
+ import { Icon as S } from "../icon/index.js";
7
7
  import "../typography/heading/index.js";
8
8
  import "../typography/span/index.js";
9
- import { Text as S } from "../typography/text/index.js";
10
- const $ = (n, t) => n < t ? "completed" : n === t ? "current" : "upcoming", C = ({
9
+ import { Text as $ } from "../typography/text/index.js";
10
+ const T = (n, t) => n < t ? "completed" : n === t ? "current" : "upcoming", F = ({
11
11
  completedLabel: n = "completed",
12
12
  currentStep: t,
13
+ fixedHeader: d = !0,
13
14
  steps: m
14
15
  }) => {
15
- const l = s();
16
+ const l = h();
16
17
  return /* @__PURE__ */ c(a, { children: [
17
- /* @__PURE__ */ e(h, { children: m.map((r, o) => {
18
- const i = $(o, t), p = i === "upcoming";
18
+ /* @__PURE__ */ e(u, { $fixed: d, children: m.map((r, o) => {
19
+ const i = T(o, t), p = i === "upcoming";
19
20
  return /* @__PURE__ */ c(
20
- u,
21
+ f,
21
22
  {
22
23
  "aria-current": i === "current" ? "step" : void 0,
23
24
  children: [
24
- /* @__PURE__ */ e(f, { $status: i, children: i === "completed" ? /* @__PURE__ */ e(y, { icon: "check", iconSize: "sm", iconType: "fa-solid" }) : o + 1 }),
25
+ /* @__PURE__ */ e(g, { $status: i, children: i === "completed" ? /* @__PURE__ */ e(S, { icon: "check", iconSize: "sm", iconType: "fa-solid" }) : o + 1 }),
25
26
  /* @__PURE__ */ c(
26
- S,
27
+ $,
27
28
  {
28
29
  color: p ? l.palette.gray[400] : l.palette.gray[800],
29
30
  display: "inline",
@@ -32,11 +33,11 @@ const $ = (n, t) => n < t ? "completed" : n === t ? "current" : "upcoming", C =
32
33
  whiteSpace: "nowrap",
33
34
  children: [
34
35
  r.title,
35
- i === "completed" && /* @__PURE__ */ e(d, { elementType: "span", children: ` (${n})` })
36
+ i === "completed" && /* @__PURE__ */ e(s, { elementType: "span", children: ` (${n})` })
36
37
  ]
37
38
  }
38
39
  ),
39
- o < m.length - 1 && /* @__PURE__ */ e(g, { "aria-hidden": !0 })
40
+ o < m.length - 1 && /* @__PURE__ */ e(y, { "aria-hidden": !0 })
40
41
  ]
41
42
  },
42
43
  r.title
@@ -46,5 +47,5 @@ const $ = (n, t) => n < t ? "completed" : n === t ? "current" : "upcoming", C =
46
47
  ] });
47
48
  };
48
49
  export {
49
- C as Stepper
50
+ F as Stepper
50
51
  };