@luscii-healthtech/web-ui 54.7.2 → 55.0.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.
@@ -1,9 +1,30 @@
1
1
  import type { FC, ReactNode } from "react";
2
2
  import type { BreadcrumbProps } from "../Breadcrumbs";
3
3
  import { type NotificationBannerColor } from "../NotificationBanner/NotificationBanner";
4
- import type { TabbarProps } from "../Tabbar/Tabbar";
5
4
  import { type IconProps } from "../Icons/types/IconProps.type";
6
5
  type Nil = null | undefined;
6
+ /**
7
+ * A single tab in the page header's navigation bar.
8
+ */
9
+ export interface PageHeaderNavigationTab<T extends object = Record<string, unknown>> {
10
+ title: string | JSX.Element;
11
+ badgeCount?: number;
12
+ isLoading?: boolean;
13
+ dataTestId?: string;
14
+ extra?: T;
15
+ }
16
+ /**
17
+ * Tabbed navigation rendered at the bottom of the page header.
18
+ */
19
+ export interface PageHeaderNavigation<T extends object = Record<string, unknown>> {
20
+ tabs?: PageHeaderNavigationTab<T>[];
21
+ selectedIndex?: number;
22
+ onSelect?: (params: {
23
+ index: number;
24
+ selectedTab: PageHeaderNavigationTab<T>;
25
+ }) => void;
26
+ className?: string;
27
+ }
7
28
  type WithPageHeaderBanner = {
8
29
  banner?: Nil | {
9
30
  title?: string;
@@ -32,10 +53,10 @@ type WithBreadcrumbProps = {
32
53
  }>;
33
54
  export type PageHeaderProps = {
34
55
  /**
35
- * These are props passed to the `Tabbar` component. The name
56
+ * Tabbed navigation rendered at the bottom of the page header. The name
36
57
  * `navigation` does not convey this well.
37
58
  */
38
- navigation?: Omit<TabbarProps, "withoutPadding">;
59
+ navigation?: PageHeaderNavigation;
39
60
  dataTestId?: string;
40
61
  title: string | ReactNode;
41
62
  isPolling?: boolean;
@@ -1,9 +1,30 @@
1
1
  import type { FC, ReactNode } from "react";
2
2
  import type { BreadcrumbProps } from "../Breadcrumbs";
3
3
  import { type NotificationBannerColor } from "../NotificationBanner/NotificationBanner";
4
- import type { TabbarProps } from "../Tabbar/Tabbar";
5
4
  import { type IconProps } from "../Icons/types/IconProps.type";
6
5
  type Nil = null | undefined;
6
+ /**
7
+ * A single tab in the page header's navigation bar.
8
+ */
9
+ export interface PageHeaderNavigationTab<T extends object = Record<string, unknown>> {
10
+ title: string | JSX.Element;
11
+ badgeCount?: number;
12
+ isLoading?: boolean;
13
+ dataTestId?: string;
14
+ extra?: T;
15
+ }
16
+ /**
17
+ * Tabbed navigation rendered at the bottom of the page header.
18
+ */
19
+ export interface PageHeaderNavigation<T extends object = Record<string, unknown>> {
20
+ tabs?: PageHeaderNavigationTab<T>[];
21
+ selectedIndex?: number;
22
+ onSelect?: (params: {
23
+ index: number;
24
+ selectedTab: PageHeaderNavigationTab<T>;
25
+ }) => void;
26
+ className?: string;
27
+ }
7
28
  type WithPageHeaderBanner = {
8
29
  banner?: Nil | {
9
30
  title?: string;
@@ -32,10 +53,10 @@ type WithBreadcrumbProps = {
32
53
  }>;
33
54
  export type PageHeaderProps = {
34
55
  /**
35
- * These are props passed to the `Tabbar` component. The name
56
+ * Tabbed navigation rendered at the bottom of the page header. The name
36
57
  * `navigation` does not convey this well.
37
58
  */
38
- navigation?: Omit<TabbarProps, "withoutPadding">;
59
+ navigation?: PageHeaderNavigation;
39
60
  dataTestId?: string;
40
61
  title: string | ReactNode;
41
62
  isPolling?: boolean;
@@ -90,7 +90,6 @@ export { default as Image } from "./components/Image/Image";
90
90
  export { MediaPicker, type TargetProps, } from "./components/MediaPicker/MediaPicker";
91
91
  export { Stack } from "./components/Stack/Stack";
92
92
  export { Box } from "./components/Box/Box";
93
- export { default as Tabbar, type TabbarProps, type TabItemDetails, } from "./components/Tabbar/Tabbar";
94
93
  export { Breadcrumbs, type BreadcrumbProps } from "./components/Breadcrumbs";
95
94
  export { PageHeader, type PageHeaderProps } from "./components/PageHeader";
96
95
  export { Tag } from "./components/Tag/Tag";
@@ -90,7 +90,6 @@ export { default as Image } from "./components/Image/Image";
90
90
  export { MediaPicker, type TargetProps, } from "./components/MediaPicker/MediaPicker";
91
91
  export { Stack } from "./components/Stack/Stack";
92
92
  export { Box } from "./components/Box/Box";
93
- export { default as Tabbar, type TabbarProps, type TabItemDetails, } from "./components/Tabbar/Tabbar";
94
93
  export { Breadcrumbs, type BreadcrumbProps } from "./components/Breadcrumbs";
95
94
  export { PageHeader, type PageHeaderProps } from "./components/PageHeader";
96
95
  export { Tag } from "./components/Tag/Tag";
@@ -45,42 +45,34 @@ export declare const Base: Story;
45
45
  export declare const WithDisabledTab: Story;
46
46
  export declare const Controlled: Story;
47
47
  /**
48
- * Legacy `TabItemDetails.badgeCount` parity. `Tabbar` rendered a
49
- * counter badge next to the label when `badgeCount > 0`. With `Tabs`
50
- * the consumer composes a `<Badge>` inside `Tabs.Trigger`.
48
+ * Compose a counter `<Badge>` inside `Tabs.Trigger`. Render the badge
49
+ * only when there is a value to show.
51
50
  */
52
51
  export declare const WithBadge: Story;
53
52
  /**
54
- * Legacy `TabItemDetails.isLoading` parity. `Tabbar` rendered a small
55
- * spinner next to the label when `isLoading` was true. With `Tabs` the
56
- * consumer composes a `<LoadingIndicator>` inside `Tabs.Trigger`.
53
+ * Compose a `<LoadingIndicator>` inside `Tabs.Trigger` to show a small
54
+ * inline spinner next to the label while that tab's data loads.
57
55
  */
58
56
  export declare const WithLoadingIndicator: Story;
59
57
  /**
60
- * Legacy `TabItemDetails.title` parity when `title` was a `JSX.Element`
61
- * rather than a string. In `Tabbar` the rich node replaced the default
62
- * `<Text>` label. In `Tabs` the trigger simply accepts any ReactNode as
63
- * children — `Tabs.LabelText` is optional.
58
+ * `Tabs.Trigger` accepts any ReactNode as children, so a trigger can
59
+ * render rich content an icon, a colored indicator, etc.
60
+ * alongside or instead of `Tabs.LabelText`.
64
61
  */
65
62
  export declare const TitleAsJsxElement: Story;
66
63
  /**
67
- * Legacy `TabItemDetails.dataTestId` parity. `Tabbar` set a
68
- * `data-test-id` attribute on the tab button. With `Tabs.Trigger` the
69
- * same attribute can be passed directly — Radix forwards unknown props
70
- * to the underlying button.
64
+ * `Tabs.Trigger` forwards unknown props to the underlying `<button>`,
65
+ * so attributes such as `data-test-id` can be passed directly.
71
66
  */
72
67
  export declare const WithDataTestId: Story;
73
68
  /**
74
- * Legacy `TabItemDetails.extra<T>` parity. `Tabbar` attached a typed
75
- * `extra` payload to each tab and returned it in `onSelect`. `Tabs`
76
- * does not own that data — the consumer keeps its own mapping keyed by
77
- * the tab `value` and resolves it on `onValueChange`.
69
+ * `Tabs` does not carry arbitrary metadata on the component itself.
70
+ * Keep your own mapping keyed by the tab `value` and resolve it on
71
+ * `onValueChange`.
78
72
  */
79
73
  export declare const WithExtraMetadata: Story;
80
74
  /**
81
- * Legacy behavior where `selectedIndex` was set to a value outside the
82
- * tab array (e.g. `selectedIndex: 8` with four tabs) — no tab was
83
- * active on mount. `Tabs` matches that behavior when `defaultValue` /
84
- * `value` does not match any trigger.
75
+ * When `defaultValue` (or `value`) does not match any `Tabs.Trigger`,
76
+ * no tab is active on mount.
85
77
  */
86
78
  export declare const NoDefaultSelected: Story;
@@ -2803,18 +2803,12 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
2803
2803
  .ui\:border-b-border-neutral-secondary-default {
2804
2804
  border-bottom-color: var(--ui-primitive-color-grey-500);
2805
2805
  }
2806
- .ui\:border-b-primary {
2807
- border-bottom-color: var(--ui-color-blue-800);
2808
- }
2809
2806
  .ui\:border-b-slate-100 {
2810
2807
  border-bottom-color: var(--ui-color-slate-100);
2811
2808
  }
2812
2809
  .ui\:border-b-slate-200 {
2813
2810
  border-bottom-color: var(--ui-color-slate-200);
2814
2811
  }
2815
- .ui\:border-b-transparent {
2816
- border-bottom-color: transparent;
2817
- }
2818
2812
  .ui\:bg-amber-50 {
2819
2813
  background-color: var(--ui-color-amber-50);
2820
2814
  }