@alto-avios/alto-ui 4.0.0 → 4.2.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 (90) hide show
  1. package/dist/TabPanel-DNAQ5FkE.js +49 -0
  2. package/dist/TabPanel-DNAQ5FkE.js.map +1 -0
  3. package/dist/assets/AviosCurrency.css +1 -1
  4. package/dist/assets/AviosCurrencyBadge.css +1 -1
  5. package/dist/assets/CalloutBanner.css +1 -1
  6. package/dist/assets/CarouselButton.css +1 -1
  7. package/dist/assets/Currency.css +1 -0
  8. package/dist/assets/ErrorSummary.css +1 -1
  9. package/dist/assets/PasswordField.css +1 -1
  10. package/dist/assets/SelectCard.css +1 -1
  11. package/dist/assets/SelectNative.css +1 -1
  12. package/dist/assets/TabPanel.css +1 -0
  13. package/dist/assets/ToggleButton.css +1 -1
  14. package/dist/assets/ToggleIconButton.css +1 -1
  15. package/dist/components/Accordion/Accordion.d.ts +1 -1
  16. package/dist/components/Accordion/Accordion.js +10 -5
  17. package/dist/components/Accordion/Accordion.js.map +1 -1
  18. package/dist/components/AviosCurrency/AviosCurrency.js +25 -69
  19. package/dist/components/AviosCurrency/AviosCurrency.js.map +1 -1
  20. package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js +13 -13
  21. package/dist/components/Box/Box.d.ts +6 -1
  22. package/dist/components/Box/Box.js +1 -0
  23. package/dist/components/Box/Box.js.map +1 -1
  24. package/dist/components/CalloutBanner/CalloutBanner.d.ts +27 -3
  25. package/dist/components/CalloutBanner/CalloutBanner.js +72 -40
  26. package/dist/components/CalloutBanner/CalloutBanner.js.map +1 -1
  27. package/dist/components/Carousel/CarouselButton/CarouselButton.d.ts +12 -1
  28. package/dist/components/Carousel/CarouselButton/CarouselButton.js +112 -39
  29. package/dist/components/Carousel/CarouselButton/CarouselButton.js.map +1 -1
  30. package/dist/components/Currency/Currency.d.ts +51 -0
  31. package/dist/components/Currency/Currency.js +110 -0
  32. package/dist/components/Currency/Currency.js.map +1 -0
  33. package/dist/components/Currency/index.d.ts +2 -0
  34. package/dist/components/Currency/index.js +5 -0
  35. package/dist/components/Currency/index.js.map +1 -0
  36. package/dist/components/DetailsDisclosure/DetailsDisclosure.d.ts +11 -1
  37. package/dist/components/DetailsDisclosure/DetailsDisclosure.js +11 -4
  38. package/dist/components/DetailsDisclosure/DetailsDisclosure.js.map +1 -1
  39. package/dist/components/DetailsDisclosure/index.js +2 -2
  40. package/dist/components/ErrorSummary/ErrorSummary.d.ts +5 -2
  41. package/dist/components/ErrorSummary/ErrorSummary.js +9 -11
  42. package/dist/components/ErrorSummary/ErrorSummary.js.map +1 -1
  43. package/dist/components/FieldError/FieldError.js +2 -2
  44. package/dist/components/FieldHeader/FieldHeader.d.ts +3 -1
  45. package/dist/components/FieldHeader/FieldHeader.js +4 -2
  46. package/dist/components/FieldHeader/FieldHeader.js.map +1 -1
  47. package/dist/components/PasswordField/PasswordField.d.ts +14 -0
  48. package/dist/components/PasswordField/PasswordField.js +54 -39
  49. package/dist/components/PasswordField/PasswordField.js.map +1 -1
  50. package/dist/components/PhoneNumberField/PhoneNumberField.d.ts +1 -1
  51. package/dist/components/PhoneNumberField/PhoneNumberField.js +5 -4
  52. package/dist/components/PhoneNumberField/PhoneNumberField.js.map +1 -1
  53. package/dist/components/SelectCard/SelectCard.d.ts +16 -2
  54. package/dist/components/SelectCard/SelectCard.js +22 -17
  55. package/dist/components/SelectCard/SelectCard.js.map +1 -1
  56. package/dist/components/SelectNative/SelectNative.js +8 -3
  57. package/dist/components/SelectNative/SelectNative.js.map +1 -1
  58. package/dist/components/Slider/Slider.d.ts +75 -0
  59. package/dist/components/Spacer/Spacer.js +1 -1
  60. package/dist/components/Tabs/Tab.d.ts +19 -0
  61. package/dist/components/Tabs/Tab.js +12 -0
  62. package/dist/components/Tabs/Tab.js.map +1 -0
  63. package/dist/components/Tabs/TabList.d.ts +16 -0
  64. package/dist/components/Tabs/TabList.js +12 -0
  65. package/dist/components/Tabs/TabList.js.map +1 -0
  66. package/dist/components/Tabs/TabPanel.d.ts +14 -0
  67. package/dist/components/Tabs/TabPanel.js +8 -0
  68. package/dist/components/Tabs/TabPanel.js.map +1 -0
  69. package/dist/components/Tabs/Tabs.d.ts +48 -0
  70. package/dist/components/Tabs/Tabs.js +302 -0
  71. package/dist/components/Tabs/Tabs.js.map +1 -0
  72. package/dist/components/Tabs/index.d.ts +9 -0
  73. package/dist/components/Tabs/index.js +10 -0
  74. package/dist/components/Tabs/index.js.map +1 -0
  75. package/dist/components/ToggleButton/ToggleButton.d.ts +1 -0
  76. package/dist/components/ToggleButton/ToggleButton.js +8 -5
  77. package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
  78. package/dist/components/ToggleIconButton/ToggleIconButton.js +8 -5
  79. package/dist/components/ToggleIconButton/ToggleIconButton.js.map +1 -1
  80. package/dist/components/_base/Field/Field.d.ts +9 -0
  81. package/dist/components/_base/Field/Field.js +1 -1
  82. package/dist/components/index.d.ts +4 -0
  83. package/dist/components/index.js +28 -19
  84. package/dist/components/index.js.map +1 -1
  85. package/dist/index.js +28 -19
  86. package/dist/index.js.map +1 -1
  87. package/dist/utils/phoneNumber/phoneNumber.d.ts +1 -0
  88. package/dist/utils/phoneNumber/phoneNumber.js +8 -1
  89. package/dist/utils/phoneNumber/phoneNumber.js.map +1 -1
  90. package/package.json +3 -3
@@ -2,26 +2,27 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import React__default, { createContext, useContext } from "react";
3
3
  import { Paragraph } from "../Paragraph/Paragraph.js";
4
4
  import { Checkbox, Radio } from "react-aria-components";
5
- import '../../assets/SelectCard.css';const checkboxSvgWrapper = "_checkboxSvgWrapper_dir9q_104";
6
- const svg = "_svg_dir9q_118";
5
+ import '../../assets/SelectCard.css';const checkboxSvgWrapper = "_checkboxSvgWrapper_1xxiy_53";
6
+ const svg = "_svg_1xxiy_138";
7
7
  const styles = {
8
- "select-card": "_select-card_dir9q_1",
9
- "select-card__header": "_select-card__header_dir9q_30",
10
- "select-card__start-slot": "_select-card__start-slot_dir9q_38",
11
- "select-card__label-title": "_select-card__label-title_dir9q_43",
12
- "select-card__label": "_select-card__label_dir9q_43",
13
- "select-card__end-slot": "_select-card__end-slot_dir9q_67",
14
- "select-card__body": "_select-card__body_dir9q_79",
15
- "select-card__details": "_select-card__details_dir9q_90",
16
- "select-card__checkbox": "_select-card__checkbox_dir9q_104",
8
+ "select-card": "_select-card_1xxiy_1",
9
+ "select-card__header": "_select-card__header_1xxiy_46",
17
10
  checkboxSvgWrapper,
11
+ "select-card__start-slot": "_select-card__start-slot_1xxiy_58",
12
+ "select-card__label-title": "_select-card__label-title_1xxiy_63",
13
+ "select-card__label": "_select-card__label_1xxiy_63",
14
+ "select-card__end-slot": "_select-card__end-slot_1xxiy_87",
15
+ "select-card__body": "_select-card__body_1xxiy_99",
16
+ "select-card__details": "_select-card__details_1xxiy_110",
17
+ "select-card__checkbox": "_select-card__checkbox_1xxiy_124",
18
18
  svg,
19
- "select-card__radio": "_select-card__radio_dir9q_183"
19
+ "select-card__radio": "_select-card__radio_1xxiy_208"
20
20
  };
21
21
  const SelectCardContext = createContext({});
22
22
  const SelectCard = ({
23
23
  children,
24
24
  type = "checkbox",
25
+ hasSelectControl = true,
25
26
  ...contextProps
26
27
  }) => {
27
28
  const labelId = React__default.useId();
@@ -29,20 +30,22 @@ const SelectCard = ({
29
30
  return /* @__PURE__ */ jsx(SelectCardContext.Provider, { value: {
30
31
  type,
31
32
  "aria-labelledby": labelId,
33
+ hasSelectControl,
32
34
  ...contextProps
33
- }, children: /* @__PURE__ */ jsx(Checkbox, { className: `${styles["select-card"]} ${styles["select-card__checkbox"]}`, ...contextProps, "aria-labelledby": labelId, children }) });
35
+ }, children: /* @__PURE__ */ jsx(Checkbox, { className: `${styles["select-card"]} ${styles["select-card__checkbox"]}`, ...contextProps, "aria-labelledby": labelId, "data-select-control": hasSelectControl, children }) });
34
36
  }
35
37
  return /* @__PURE__ */ jsx(SelectCardContext.Provider, { value: {
36
38
  "aria-labelledby": labelId,
39
+ hasSelectControl,
37
40
  ...contextProps
38
- }, children: /* @__PURE__ */ jsx(Radio, { className: `${styles["select-card"]} ${styles["select-card__radio"]}`, ...contextProps, "aria-labelledby": labelId, children }) });
41
+ }, children: /* @__PURE__ */ jsx(Radio, { className: `${styles["select-card"]} ${styles["select-card__radio"]}`, ...contextProps, isDisabled: contextProps.isDisabled, "aria-labelledby": labelId, "data-select-control": hasSelectControl, children }) });
39
42
  };
40
43
  const Header = ({
41
44
  children
42
45
  }) => {
43
46
  const state = useContext(SelectCardContext);
44
47
  if ((state == null ? void 0 : state.type) === "checkbox") {
45
- return /* @__PURE__ */ jsxs("div", { className: styles["select-card__header"], children: [
48
+ return /* @__PURE__ */ jsxs("div", { className: styles["select-card__header"], "data-select-control": state == null ? void 0 : state.hasSelectControl, children: [
46
49
  /* @__PURE__ */ jsx("div", { className: `${styles.checkboxSvgWrapper}`, "data-disabled": state == null ? void 0 : state.isDisabled, children: /* @__PURE__ */ jsx("svg", { className: styles.svg, viewBox: "0 0 18 18", "aria-hidden": "true", children: (state == null ? void 0 : state.isIndeterminate) ? /* @__PURE__ */ jsx("rect", { x: 1, y: 7.5, width: 15, height: 3 }) : /* @__PURE__ */ jsx("polyline", { points: "1 9 7 14 15 4" }) }) }),
47
50
  children
48
51
  ] });
@@ -57,11 +60,13 @@ const EndSlot = ({
57
60
  }) => /* @__PURE__ */ jsx("div", { className: styles["select-card__end-slot"], children });
58
61
  const Label = ({
59
62
  title,
60
- description
63
+ description,
64
+ headingLevel
61
65
  }) => {
62
66
  const state = useContext(SelectCardContext);
67
+ const HeadingLabel = headingLevel || "h3";
63
68
  return /* @__PURE__ */ jsxs("div", { className: styles["select-card__label"], children: [
64
- /* @__PURE__ */ jsx("div", { className: styles["select-card__label-title"], id: state == null ? void 0 : state["aria-labelledby"], children: title }),
69
+ /* @__PURE__ */ jsx(HeadingLabel, { className: styles["select-card__label-title"], id: state == null ? void 0 : state["aria-labelledby"], children: title }),
65
70
  /* @__PURE__ */ jsx(Paragraph, { size: "sm", foregroundColor: (state == null ? void 0 : state.isDisabled) ? "disabledOnSubtle" : "default", children: description })
66
71
  ] });
67
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SelectCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SelectCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,8 +2,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { TextField } from "react-aria-components";
3
3
  import { useId } from "react";
4
4
  import { FieldHeader } from "../FieldHeader/FieldHeader.js";
5
- import '../../assets/SelectNative.css';const select = "_select_2fygw_1";
6
- const selectInput = "_selectInput_2fygw_10";
5
+ import { useFocusRing } from "@react-aria/focus";
6
+ import '../../assets/SelectNative.css';const select = "_select_16vwh_1";
7
+ const selectInput = "_selectInput_16vwh_10";
7
8
  const styles = {
8
9
  select,
9
10
  selectInput
@@ -24,6 +25,10 @@ const SelectNative = ({
24
25
  ...props
25
26
  }) => {
26
27
  const uniqueId = useId();
28
+ const {
29
+ isFocusVisible,
30
+ focusProps
31
+ } = useFocusRing();
27
32
  const id = providedId || `select-${uniqueId}`;
28
33
  const showPlaceholder = !defaultValue && !value;
29
34
  const handleChange = (event) => {
@@ -33,7 +38,7 @@ const SelectNative = ({
33
38
  };
34
39
  return /* @__PURE__ */ jsxs(TextField, { className: styles.select, defaultValue, value, isDisabled, isInvalid, ...props, children: [
35
40
  label && /* @__PURE__ */ jsx(FieldHeader, { label, description, isInvalid, isRequired, errorMessage, labelFor: id }),
36
- /* @__PURE__ */ jsxs("select", { id, className: styles.selectInput, defaultValue, value, disabled: isDisabled, required: isRequired, "aria-invalid": isInvalid, onChange: handleChange, children: [
41
+ /* @__PURE__ */ jsxs("select", { id, className: styles.selectInput, defaultValue, value, disabled: isDisabled, required: isRequired, "aria-invalid": isInvalid, onChange: handleChange, "data-focus-visible": isFocusVisible ? true : void 0, ...focusProps, children: [
37
42
  showPlaceholder && placeholder && /* @__PURE__ */ jsx("option", { value: "", disabled: true, hidden: true, children: placeholder }),
38
43
  options.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: option.label }, option.value))
39
44
  ] })
@@ -1 +1 @@
1
- {"version":3,"file":"SelectNative.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SelectNative.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,39 +6,114 @@ export interface CurrencyFormatOptions extends Omit<Intl.NumberFormatOptions, 's
6
6
  }
7
7
  export type FormatOptions = Intl.NumberFormatOptions | ((value: number, maxValue?: number) => string);
8
8
  export type BaseSliderProps = {
9
+ /**
10
+ * The label for the slider.
11
+ */
9
12
  label?: string;
13
+ /**
14
+ * The description for the slider.
15
+ */
10
16
  description?: string;
17
+ /**
18
+ * Whether the slider is disabled.
19
+ */
11
20
  isDisabled?: boolean;
21
+ /**
22
+ * Whether the slider is a range slider.
23
+ */
12
24
  isRange?: boolean;
25
+ /**
26
+ * The minimum value for the slider.
27
+ */
13
28
  minValue?: number;
29
+ /**
30
+ * The maximum value for the slider.
31
+ */
14
32
  maxValue?: number;
33
+ /**
34
+ * The step value for the slider.
35
+ */
15
36
  step?: number;
37
+ /**
38
+ * The format options for the slider.
39
+ */
16
40
  formatOptions?: FormatOptions;
41
+ /**
42
+ * The id for the slider.
43
+ */
17
44
  id?: string;
45
+ /**
46
+ * Whether to show the tooltip.
47
+ */
18
48
  showTooltip?: boolean;
19
49
  };
20
50
  export type SingleSliderProps = BaseSliderProps & {
21
51
  isRange?: false;
52
+ /**
53
+ * The default value for the single slider.
54
+ */
22
55
  defaultValue?: number;
56
+ /**
57
+ * The value for the single slider.
58
+ */
23
59
  value?: number;
60
+ /**
61
+ * The onChange handler for the single slider.
62
+ */
24
63
  onChange?: (value: number) => void;
25
64
  };
26
65
  export type RangeSliderProps = BaseSliderProps & {
27
66
  isRange: true;
67
+ /**
68
+ * The default value for the range slider.
69
+ */
28
70
  defaultValue?: [number, number];
71
+ /**
72
+ * The value for the range slider.
73
+ */
29
74
  value?: [number, number];
75
+ /**
76
+ * The onChange handler for the range slider.
77
+ */
30
78
  onChange?: (value: [number, number]) => void;
31
79
  };
32
80
  export type SliderProps = SingleSliderProps | RangeSliderProps;
33
81
  export interface CustomThumbProps {
82
+ /**
83
+ * The index of the thumb.
84
+ */
34
85
  index: number;
86
+ /**
87
+ * The state of the slider.
88
+ */
35
89
  state: SliderRenderProps['state'];
90
+ /**
91
+ * The format value for the slider.
92
+ */
36
93
  formatValue: (val: number) => string;
94
+ /**
95
+ * Whether the slider is disabled.
96
+ */
37
97
  isDisabled?: boolean;
98
+ /**
99
+ * Whether to show the tooltip.
100
+ */
38
101
  showTooltip?: boolean;
102
+ /**
103
+ * The label for the slider.
104
+ */
39
105
  label: string;
106
+ /**
107
+ * The minimum value for the slider.
108
+ */
40
109
  minValue: number;
110
+ /**
111
+ * The maximum value for the slider.
112
+ */
41
113
  maxValue: number;
114
+ /**
115
+ * Whether the slider is a range slider.
116
+ */
42
117
  isRange?: boolean;
43
118
  }
44
119
  export declare const Slider: ({ label, description, isDisabled, isRange, minValue, maxValue, step, formatOptions, defaultValue, value, id: providedId, onChange, showTooltip, }: SliderProps) => import("react/jsx-runtime").JSX.Element;
@@ -83,7 +83,7 @@ const Spacer = ({
83
83
  debugVisible: debugVisible2,
84
84
  ...props
85
85
  }) => {
86
- return /* @__PURE__ */ jsx("span", { className: `${spacerVariants(props)} ${debugVisible2 ? styles.debugVisible : ""}` });
86
+ return /* @__PURE__ */ jsx("span", { className: `${spacerVariants(props)} ${debugVisible2 ? styles.debugVisible : ""}`, "aria-hidden": "true", role: "presentation" });
87
87
  };
88
88
  export {
89
89
  Spacer,
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ export interface TabProps {
3
+ /** Unique identifier for the tab */
4
+ id: string;
5
+ /** Tab label content */
6
+ children: React.ReactNode;
7
+ /** Icon name to display in the tab */
8
+ iconName?: string;
9
+ /** URL to navigate to when tab is clicked (for link tabs) */
10
+ href?: string;
11
+ /** Whether the tab is disabled */
12
+ isDisabled?: boolean;
13
+ /** Additional CSS class names
14
+ * @ignore
15
+ * */
16
+ className?: string;
17
+ }
18
+ export declare const Tab: React.FC<TabProps>;
19
+ export default Tab;
@@ -0,0 +1,12 @@
1
+ import "react/jsx-runtime";
2
+ import "react-aria-components";
3
+ import "../Heading/Heading.js";
4
+ import "../Icon/Icon.js";
5
+ import { Tab, Tab as Tab2 } from "./Tabs.js";
6
+ import "../../utils/focus/focusStyles.js";
7
+ import "../../TabPanel-DNAQ5FkE.js";
8
+ export {
9
+ Tab,
10
+ Tab2 as default
11
+ };
12
+ //# sourceMappingURL=Tab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tab.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const tabList: (props?: ({
4
+ fillContainer?: boolean | null | undefined;
5
+ hasScrollButtons?: boolean | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface TabListProps extends Omit<VariantProps<typeof tabList>, 'hasScrollButtons'> {
8
+ /** Tab components to render */
9
+ children: React.ReactNode;
10
+ /** Additional CSS class names
11
+ * @ignore
12
+ */
13
+ className?: string;
14
+ }
15
+ export declare const TabList: React.FC<TabListProps>;
16
+ export default TabList;
@@ -0,0 +1,12 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "react-aria-components";
4
+ import "../../index-DdUYounA.js";
5
+ import "../Carousel/CarouselButton/CarouselButton.js";
6
+ import { TabList, TabList as TabList2 } from "./Tabs.js";
7
+ import "../../TabPanel-DNAQ5FkE.js";
8
+ export {
9
+ TabList,
10
+ TabList2 as default
11
+ };
12
+ //# sourceMappingURL=TabList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabList.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { Key } from 'react-aria-components';
3
+ export interface TabPanelProps {
4
+ /** Unique identifier that matches a Tab id */
5
+ id: Key;
6
+ /** Panel content to display when tab is selected */
7
+ children: React.ReactNode;
8
+ /** Additional CSS class names
9
+ * @ignore
10
+ * */
11
+ className?: string;
12
+ }
13
+ export declare const TabPanel: React.FC<TabPanelProps>;
14
+ export default TabPanel;
@@ -0,0 +1,8 @@
1
+ import "react/jsx-runtime";
2
+ import "react-aria-components";
3
+ import { T, T as T2 } from "../../TabPanel-DNAQ5FkE.js";
4
+ export {
5
+ T as TabPanel,
6
+ T2 as default
7
+ };
8
+ //# sourceMappingURL=TabPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabPanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,48 @@
1
+ import { default as React } from 'react';
2
+ import { Key } from 'react-aria-components';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ declare const tabs: (props?: ({
5
+ styleVariant?: "heading" | "line" | "pill" | "contained" | null | undefined;
6
+ align?: "center" | "start" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export interface TabsProps extends VariantProps<typeof tabs> {
9
+ /** Tab components and panels OR routes content */
10
+ children?: React.ReactNode;
11
+ /** Visual style variant of the tabs */
12
+ styleVariant?: 'line' | 'pill' | 'contained' | 'heading';
13
+ /** Horizontal alignment of tab list */
14
+ align?: 'start' | 'center';
15
+ /** Whether tabs should fill the available width */
16
+ fillContainer?: boolean;
17
+ /** Focus outline color style for accessibility */
18
+ focusStyle?: 'default' | 'white';
19
+ /** Heading level for heading variant tabs */
20
+ headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
21
+ /** Currently selected tab key for controlled component */
22
+ selectedKey?: Key;
23
+ /** Default selected tab key for uncontrolled component */
24
+ defaultSelectedKey?: Key;
25
+ /** Array of tab keys that should be disabled */
26
+ disabledKeys?: Key[];
27
+ /** Callback fired when a tab is selected */
28
+ onSelectionChange?: (key: Key) => void;
29
+ /**
30
+ * Route content to display when using tabs as navigation links
31
+ * When provided, replaces individual TabPanel children with a single routing container
32
+ * Typically used with React Router or similar routing solutions
33
+ */
34
+ routes?: React.ReactNode;
35
+ }
36
+ export interface TabsContextValue {
37
+ styleVariant: 'line' | 'pill' | 'contained' | 'heading';
38
+ align: 'start' | 'center';
39
+ fillContainer: boolean;
40
+ focusStyle: 'default' | 'white';
41
+ headingLevel: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
42
+ }
43
+ export declare const useTabsContext: () => TabsContextValue;
44
+ export declare const Tabs: React.FC<TabsProps>;
45
+ export { TabList } from './TabList';
46
+ export { Tab } from './Tab';
47
+ export { TabPanel } from './TabPanel';
48
+ export default Tabs;