@alto-avios/alto-ui 3.1.0 → 3.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.
- package/dist/assets/Accordion.css +1 -0
- package/dist/assets/AviosBadge.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/CalloutBanner.css +1 -0
- package/dist/assets/ErrorSummary.css +1 -0
- package/dist/assets/FieldHeader.css +1 -1
- package/dist/assets/FieldLabel.css +1 -1
- package/dist/assets/Menu.css +1 -0
- package/dist/assets/PhoneNumberField.css +1 -1
- package/dist/assets/SelectCard.css +1 -0
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/flex.css +1 -1
- package/dist/assets/position.css +1 -0
- package/dist/components/Accordion/Accordion.d.ts +35 -0
- package/dist/components/Accordion/Accordion.js +140 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +5 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/AviosBadge/AviosBadge.d.ts +34 -0
- package/dist/components/AviosBadge/AviosBadge.js +58 -0
- package/dist/components/AviosBadge/AviosBadge.js.map +1 -0
- package/dist/components/AviosBadge/index.d.ts +1 -0
- package/dist/components/AviosBadge/index.js +5 -0
- package/dist/components/AviosBadge/index.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +7 -2
- package/dist/components/Badge/Badge.js +2 -1
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Box/Box.d.ts +4 -4
- package/dist/components/Box/Box.js +6 -3
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Button/Button.js +31 -31
- package/dist/components/CalloutBanner/CalloutBanner.d.ts +21 -0
- package/dist/components/CalloutBanner/CalloutBanner.js +96 -0
- package/dist/components/CalloutBanner/CalloutBanner.js.map +1 -0
- package/dist/components/CalloutBanner/index.d.ts +1 -0
- package/dist/components/CalloutBanner/index.js +5 -0
- package/dist/components/CalloutBanner/index.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/CreditCardNumberField/CreditCardNumberField.d.ts +2 -2
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js +4 -3
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js.map +1 -1
- package/dist/components/DateField/DateField.d.ts +22 -3
- package/dist/components/DateField/DateField.js +856 -2
- package/dist/components/DateField/DateField.js.map +1 -1
- package/dist/components/ErrorSummary/ErrorSummary.d.ts +7 -0
- package/dist/components/ErrorSummary/ErrorSummary.js +44 -0
- package/dist/components/ErrorSummary/ErrorSummary.js.map +1 -0
- package/dist/components/ErrorSummary/index.d.ts +1 -0
- package/dist/components/ErrorSummary/index.js +5 -0
- package/dist/components/ErrorSummary/index.js.map +1 -0
- package/dist/components/FieldHeader/FieldHeader.js +6 -6
- package/dist/components/FieldLabel/FieldLabel.js +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +75 -0
- package/dist/components/Menu/Menu.js +356 -0
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.js +5 -0
- package/dist/components/Menu/index.js.map +1 -0
- package/dist/components/Paragraph/Paragraph.d.ts +1 -1
- package/dist/components/PhoneNumberField/PhoneNumberField.d.ts +1 -1
- package/dist/components/PhoneNumberField/PhoneNumberField.js +13 -8
- package/dist/components/PhoneNumberField/PhoneNumberField.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +36 -4
- package/dist/components/Popover/Popover.js +21 -24
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/SelectCard/SelectCard.d.ts +51 -0
- package/dist/components/SelectCard/SelectCard.js +85 -0
- package/dist/components/SelectCard/SelectCard.js.map +1 -0
- package/dist/components/SelectCard/index.d.ts +1 -0
- package/dist/components/SelectCard/index.js +5 -0
- package/dist/components/SelectCard/index.js.map +1 -0
- package/dist/components/SubHeading/SubHeading.d.ts +1 -1
- package/dist/components/Tag/Tag.js +4 -4
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +16 -4
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/border/border.d.ts +2 -2
- package/dist/utils/flex/flex.d.ts +10 -5
- package/dist/utils/flex/flex.js +383 -51
- package/dist/utils/flex/flex.js.map +1 -1
- package/dist/utils/flex/flex.test.d.ts +1 -0
- package/dist/utils/focus/focusStyles.d.ts +1 -1
- package/dist/utils/foregroundColour/foregroundColor.d.ts +1 -1
- package/dist/utils/position/position.d.ts +8 -0
- package/dist/utils/position/position.js +57 -0
- package/dist/utils/position/position.js.map +1 -0
- package/dist/utils/position/position.test.d.ts +1 -0
- package/dist/utils/stories/iconPropsArgTypes.js +49 -49
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberField.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PhoneNumberField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,16 +1,48 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { OverlayTriggerState } from 'react-stately';
|
|
3
|
+
type PlacementType = 'top' | 'top start' | 'top end' | 'right' | 'right top' | 'right bottom' | 'bottom' | 'bottom start' | 'bottom end' | 'left' | 'left top' | 'left bottom';
|
|
4
|
+
type ArrowDirectionType = 'top' | 'right' | 'bottom' | 'left';
|
|
5
|
+
interface InternalPopoverProps {
|
|
6
|
+
/**
|
|
7
|
+
* @private Internal use only - placement of the popover
|
|
8
|
+
* This prop should only be used by internal components like Menu
|
|
9
|
+
*/
|
|
10
|
+
placement?: PlacementType;
|
|
11
|
+
/**
|
|
12
|
+
* @private Internal use only - whether the popover should flip to fit in the viewport
|
|
13
|
+
* This prop should only be used by internal components like Menu
|
|
14
|
+
*/
|
|
15
|
+
shouldFlip?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @private Internal use only - whether to allow elements outside the popover may be interacted with
|
|
18
|
+
* This prop should only be used by internal components like Menu
|
|
19
|
+
*/
|
|
20
|
+
isNonModal?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @private Internal use only - whether to allow tabbing out of the popover
|
|
23
|
+
* This prop should only be used by internal components like Menu
|
|
24
|
+
*/
|
|
25
|
+
allowTabOut?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @private Internal use only - whether to auto-focus elements within the popover
|
|
28
|
+
* This prop should only be used by internal components like Menu
|
|
29
|
+
*/
|
|
30
|
+
autoFocus?: boolean;
|
|
31
|
+
}
|
|
3
32
|
export interface PopoverProps {
|
|
4
33
|
/** Content to be rendered inside the popover */
|
|
5
34
|
children: React.ReactNode;
|
|
6
35
|
/** State object controlling the overlay's open/closed status */
|
|
7
36
|
state: OverlayTriggerState;
|
|
8
|
-
/** Direction of the
|
|
9
|
-
arrowDirection?:
|
|
37
|
+
/** Direction of the arrow that points to the trigger element */
|
|
38
|
+
arrowDirection?: ArrowDirectionType;
|
|
10
39
|
/** Reference to the trigger element that opens the popover */
|
|
11
|
-
triggerRef: React.RefObject<HTMLButtonElement
|
|
40
|
+
triggerRef: React.RefObject<HTMLButtonElement> | {
|
|
41
|
+
current: HTMLElement;
|
|
42
|
+
};
|
|
12
43
|
/** Whether to show the directional arrow on the popover */
|
|
13
44
|
hasArrow?: boolean;
|
|
14
45
|
}
|
|
15
|
-
|
|
46
|
+
type CombinedPopoverProps = PopoverProps & InternalPopoverProps;
|
|
47
|
+
export declare const Popover: ({ children, state, arrowDirection, triggerRef, hasArrow, placement, shouldFlip, isNonModal, allowTabOut, autoFocus, }: CombinedPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
48
|
export default Popover;
|
|
@@ -2,7 +2,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useRef, useEffect } from "react";
|
|
3
3
|
import { usePopover, Overlay, DismissButton } from "@react-aria/overlays";
|
|
4
4
|
import { FocusScope } from "@react-aria/focus";
|
|
5
|
-
import { mergeProps } from "@react-aria/utils";
|
|
6
5
|
import '../../assets/Popover.css';const popoverWrapper = "_popoverWrapper_qrzbw_1";
|
|
7
6
|
const popover = "_popover_qrzbw_1";
|
|
8
7
|
const arrow = "_arrow_qrzbw_16";
|
|
@@ -11,54 +10,52 @@ const styles = {
|
|
|
11
10
|
popover,
|
|
12
11
|
arrow
|
|
13
12
|
};
|
|
13
|
+
const arrowDirectionToPlacement = {
|
|
14
|
+
top: "top",
|
|
15
|
+
right: "right",
|
|
16
|
+
bottom: "bottom",
|
|
17
|
+
left: "left"
|
|
18
|
+
};
|
|
14
19
|
const Popover = ({
|
|
15
20
|
children,
|
|
16
21
|
state,
|
|
17
22
|
arrowDirection = "bottom",
|
|
18
23
|
triggerRef,
|
|
19
|
-
hasArrow = true
|
|
24
|
+
hasArrow = true,
|
|
25
|
+
placement,
|
|
26
|
+
shouldFlip = true,
|
|
27
|
+
isNonModal = false,
|
|
28
|
+
allowTabOut = false,
|
|
29
|
+
autoFocus = false
|
|
20
30
|
}) => {
|
|
21
31
|
const popoverRef = useRef(null);
|
|
22
|
-
const
|
|
32
|
+
const initialPlacement = placement || arrowDirectionToPlacement[arrowDirection];
|
|
33
|
+
const [optimalPlacement, setOptimalPlacement] = React.useState(initialPlacement);
|
|
23
34
|
useEffect(() => {
|
|
24
35
|
const updatePlacement = () => {
|
|
25
36
|
if (!popoverRef.current || !triggerRef.current) return;
|
|
26
|
-
|
|
27
|
-
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
28
|
-
const viewportHeight = window.innerHeight;
|
|
29
|
-
const viewportWidth = window.innerWidth;
|
|
30
|
-
let newPlacement = arrowDirection;
|
|
31
|
-
if (arrowDirection === "bottom" && triggerRect.bottom + popoverRect.height > viewportHeight) {
|
|
32
|
-
newPlacement = "top";
|
|
33
|
-
} else if (arrowDirection === "top" && triggerRect.top - popoverRect.height < 0) {
|
|
34
|
-
newPlacement = "bottom";
|
|
35
|
-
}
|
|
36
|
-
if (arrowDirection === "right" && triggerRect.right + popoverRect.width > viewportWidth) {
|
|
37
|
-
newPlacement = "left";
|
|
38
|
-
} else if (arrowDirection === "left" && triggerRect.left - popoverRect.width < 0) {
|
|
39
|
-
newPlacement = "right";
|
|
40
|
-
}
|
|
41
|
-
setOptimalPlacement(newPlacement);
|
|
37
|
+
setOptimalPlacement(initialPlacement);
|
|
42
38
|
};
|
|
43
39
|
updatePlacement();
|
|
44
40
|
window.addEventListener("resize", updatePlacement);
|
|
45
41
|
return () => window.removeEventListener("resize", updatePlacement);
|
|
46
|
-
}, [
|
|
42
|
+
}, [initialPlacement, popoverRef.current]);
|
|
47
43
|
const {
|
|
48
44
|
popoverProps,
|
|
49
45
|
arrowProps,
|
|
50
|
-
placement
|
|
46
|
+
placement: finalPlacement
|
|
51
47
|
} = usePopover({
|
|
52
48
|
popoverRef,
|
|
53
49
|
triggerRef,
|
|
54
50
|
offset: 12,
|
|
55
51
|
placement: optimalPlacement,
|
|
56
|
-
shouldFlip
|
|
52
|
+
shouldFlip,
|
|
53
|
+
isNonModal
|
|
57
54
|
}, state);
|
|
58
|
-
return /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx("div", { className: styles.popoverWrapper, children: /* @__PURE__ */ jsx(FocusScope, { restoreFocus: true, contain:
|
|
55
|
+
return /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx("div", { className: styles.popoverWrapper, children: /* @__PURE__ */ jsx(FocusScope, { restoreFocus: true, contain: !allowTabOut, autoFocus, children: /* @__PURE__ */ jsxs("div", { ...popoverProps, ref: popoverRef, className: styles.popover, children: [
|
|
59
56
|
/* @__PURE__ */ jsx(DismissButton, { onDismiss: state.close }),
|
|
60
57
|
children,
|
|
61
|
-
hasArrow && /* @__PURE__ */ jsx("div", { ...arrowProps, className: styles.arrow, "data-placement":
|
|
58
|
+
hasArrow && /* @__PURE__ */ jsx("div", { ...arrowProps, className: styles.arrow, "data-placement": finalPlacement })
|
|
62
59
|
] }) }) }) });
|
|
63
60
|
};
|
|
64
61
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CheckboxProps } from 'react-aria-components';
|
|
3
|
+
import { RadioProps } from '../Radio';
|
|
4
|
+
type SelectCardContextType = {
|
|
5
|
+
/**
|
|
6
|
+
* The input type of the select card.
|
|
7
|
+
* @default 'checkbox'
|
|
8
|
+
*/
|
|
9
|
+
type?: 'checkbox' | 'radio';
|
|
10
|
+
/**
|
|
11
|
+
* The ID of the title for a11y labelling.
|
|
12
|
+
* @default useId()
|
|
13
|
+
*/
|
|
14
|
+
'aria-labelledby'?: string;
|
|
15
|
+
} & (({
|
|
16
|
+
type?: 'checkbox';
|
|
17
|
+
} & Omit<CheckboxProps, 'children' | 'focusStyle'>) | ({
|
|
18
|
+
type: 'radio';
|
|
19
|
+
} & Omit<RadioProps, 'children' | 'focusStyle'>));
|
|
20
|
+
type SelectCardProps = SelectCardContextType & {
|
|
21
|
+
/**
|
|
22
|
+
* The compounds components of the SelectCard:
|
|
23
|
+
* - SelectCard.Header
|
|
24
|
+
* - SelectCard.StartSlot
|
|
25
|
+
* - SelectCard.EndSlot
|
|
26
|
+
* - SelectCard.Label
|
|
27
|
+
* - SelectCard.Body
|
|
28
|
+
* - SelectCard.Details
|
|
29
|
+
*/
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
declare const SelectCard: {
|
|
33
|
+
({ children, type, ...contextProps }: SelectCardProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
Header: ({ children }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
StartSlot: ({ children }: SlotProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
EndSlot: ({ children }: SlotProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
Label: ({ title, description }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
Body: ({ children }: SlotProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
Details: ({ children }: SlotProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
};
|
|
41
|
+
interface HeaderProps {
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
interface SlotProps {
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
}
|
|
47
|
+
interface LabelProps {
|
|
48
|
+
title: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
}
|
|
51
|
+
export default SelectCard;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { createContext, useContext } from "react";
|
|
3
|
+
import { Paragraph } from "../Paragraph/Paragraph.js";
|
|
4
|
+
import { Checkbox, Radio } from "react-aria-components";
|
|
5
|
+
import '../../assets/SelectCard.css';const checkboxSvgWrapper = "_checkboxSvgWrapper_dir9q_104";
|
|
6
|
+
const svg = "_svg_dir9q_118";
|
|
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",
|
|
17
|
+
checkboxSvgWrapper,
|
|
18
|
+
svg,
|
|
19
|
+
"select-card__radio": "_select-card__radio_dir9q_183"
|
|
20
|
+
};
|
|
21
|
+
const SelectCardContext = createContext({});
|
|
22
|
+
const SelectCard = ({
|
|
23
|
+
children,
|
|
24
|
+
type = "checkbox",
|
|
25
|
+
...contextProps
|
|
26
|
+
}) => {
|
|
27
|
+
const labelId = React.useId();
|
|
28
|
+
if (type === "checkbox") {
|
|
29
|
+
return /* @__PURE__ */ jsx(SelectCardContext.Provider, { value: {
|
|
30
|
+
type,
|
|
31
|
+
"aria-labelledby": labelId,
|
|
32
|
+
...contextProps
|
|
33
|
+
}, children: /* @__PURE__ */ jsx(Checkbox, { className: `${styles["select-card"]} ${styles["select-card__checkbox"]}`, ...contextProps, "aria-labelledby": labelId, children }) });
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ jsx(SelectCardContext.Provider, { value: {
|
|
36
|
+
"aria-labelledby": labelId,
|
|
37
|
+
...contextProps
|
|
38
|
+
}, children: /* @__PURE__ */ jsx(Radio, { className: `${styles["select-card"]} ${styles["select-card__radio"]}`, ...contextProps, "aria-labelledby": labelId, children }) });
|
|
39
|
+
};
|
|
40
|
+
const Header = ({
|
|
41
|
+
children
|
|
42
|
+
}) => {
|
|
43
|
+
const state = useContext(SelectCardContext);
|
|
44
|
+
if ((state == null ? void 0 : state.type) === "checkbox") {
|
|
45
|
+
return /* @__PURE__ */ jsxs("div", { className: styles["select-card__header"], children: [
|
|
46
|
+
/* @__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
|
+
children
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */ jsx("div", { className: styles["select-card__header"], children });
|
|
51
|
+
};
|
|
52
|
+
const StartSlot = ({
|
|
53
|
+
children
|
|
54
|
+
}) => /* @__PURE__ */ jsx("div", { className: styles["select-card__start-slot"], children });
|
|
55
|
+
const EndSlot = ({
|
|
56
|
+
children
|
|
57
|
+
}) => /* @__PURE__ */ jsx("div", { className: styles["select-card__end-slot"], children });
|
|
58
|
+
const Label = ({
|
|
59
|
+
title,
|
|
60
|
+
description
|
|
61
|
+
}) => {
|
|
62
|
+
const state = useContext(SelectCardContext);
|
|
63
|
+
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 }),
|
|
65
|
+
/* @__PURE__ */ jsx(Paragraph, { size: "sm", foregroundColor: (state == null ? void 0 : state.isDisabled) ? "disabledOnSubtle" : "default", children: description })
|
|
66
|
+
] });
|
|
67
|
+
};
|
|
68
|
+
const Body = ({
|
|
69
|
+
children
|
|
70
|
+
}) => /* @__PURE__ */ jsx("div", { className: styles["select-card__body"], children });
|
|
71
|
+
const Details = ({
|
|
72
|
+
children
|
|
73
|
+
}) => {
|
|
74
|
+
return /* @__PURE__ */ jsx("div", { className: styles["select-card__details"], children });
|
|
75
|
+
};
|
|
76
|
+
SelectCard.Header = Header;
|
|
77
|
+
SelectCard.StartSlot = StartSlot;
|
|
78
|
+
SelectCard.EndSlot = EndSlot;
|
|
79
|
+
SelectCard.Label = Label;
|
|
80
|
+
SelectCard.Body = Body;
|
|
81
|
+
SelectCard.Details = Details;
|
|
82
|
+
export {
|
|
83
|
+
SelectCard as default
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=SelectCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SelectCard';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import { ForegroundVariants } from '../../utils/foregroundColour/foregroundColor';
|
|
4
4
|
declare const subHeading: (props?: ({
|
|
5
5
|
size?: "sm" | "xs" | null | undefined;
|
|
6
|
-
textAlign?: "
|
|
6
|
+
textAlign?: "center" | "end" | "start" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
type HeadingVariants = VariantProps<typeof subHeading>;
|
|
9
9
|
type SubHeadingLevel = 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
@@ -3,9 +3,9 @@ import { Tag as Tag$1 } from "react-aria-components";
|
|
|
3
3
|
import { Icon } from "../Icon/Icon.js";
|
|
4
4
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
5
5
|
import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
|
|
6
|
-
import '../../assets/Tag.css';const tag = "
|
|
7
|
-
const isRemovable = "
|
|
8
|
-
const iconWrapper = "
|
|
6
|
+
import '../../assets/Tag.css';const tag = "_tag_1jz2y_1";
|
|
7
|
+
const isRemovable = "_isRemovable_1jz2y_21";
|
|
8
|
+
const iconWrapper = "_iconWrapper_1jz2y_123";
|
|
9
9
|
const styles = {
|
|
10
10
|
tag,
|
|
11
11
|
isRemovable,
|
|
@@ -24,7 +24,7 @@ const Tag = ({
|
|
|
24
24
|
return /* @__PURE__ */ jsxs(Tag$1, { className: `${styles.tag} ${isRemovable2 ? styles.isRemovable : ""} ${focusStyleVariants({
|
|
25
25
|
focusStyle
|
|
26
26
|
})}`, isDisabled, id: id == null ? void 0 : id.toString(), textValue, ...props, children: [
|
|
27
|
-
leadingIconProps ? /* @__PURE__ */ jsx("span", { className: styles.iconWrapper, children: /* @__PURE__ */ jsx(Icon, { ...leadingIconProps }) }) : null,
|
|
27
|
+
leadingIconProps ? /* @__PURE__ */ jsx("span", { className: styles.iconWrapper, children: /* @__PURE__ */ jsx(Icon, { ...leadingIconProps, iconSize: "0.75x", padding: "square" }) }) : null,
|
|
28
28
|
children,
|
|
29
29
|
isRemovable2 && /* @__PURE__ */ jsx(IconButton, { slot: "remove", size: "sm", iconProps: {
|
|
30
30
|
iconName: "close"
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export { default as Accordion } from './Accordion';
|
|
2
|
+
export { default as AviosBadge } from './AviosBadge';
|
|
1
3
|
export { default as AviosCurrencySymbol } from './AviosCurrencySymbol';
|
|
2
4
|
export { default as Badge } from './Badge';
|
|
3
5
|
export { default as Box } from './Box';
|
|
4
6
|
export { default as Button } from './Button';
|
|
5
7
|
export { default as ButtonGroup } from './ButtonGroup';
|
|
8
|
+
export { default as CalloutBanner } from './CalloutBanner';
|
|
6
9
|
export { default as CardSection } from './CardSection';
|
|
7
10
|
export { default as Checkbox } from './Checkbox';
|
|
8
11
|
export { default as CheckboxGroup } from './CheckboxGroup';
|
|
@@ -11,6 +14,7 @@ export { default as DateField } from './DateField';
|
|
|
11
14
|
export { default as DestinationHeading } from './DestinationHeading';
|
|
12
15
|
export { default as DetailsDisclosure } from './DetailsDisclosure';
|
|
13
16
|
export { default as Dialog } from './Dialog';
|
|
17
|
+
export { default as ErrorSummary } from './ErrorSummary';
|
|
14
18
|
export { default as Eyebrow } from './Eyebrow';
|
|
15
19
|
export { default as FieldDescription } from './FieldDescription';
|
|
16
20
|
export { default as FieldError } from './FieldError';
|
|
@@ -27,6 +31,7 @@ export { default as IconButton } from './IconButton';
|
|
|
27
31
|
export { default as Image } from './Image';
|
|
28
32
|
export { default as Link } from './Link';
|
|
29
33
|
export { default as LoadingSpinner } from './LoadingSpinner';
|
|
34
|
+
export { default as Menu } from './Menu';
|
|
30
35
|
export { default as NumberField } from './NumberField';
|
|
31
36
|
export { default as Paragraph } from './Paragraph';
|
|
32
37
|
export { default as PhoneNumberField } from './PhoneNumberField';
|
|
@@ -36,6 +41,7 @@ export { default as Radio } from './Radio';
|
|
|
36
41
|
export { default as RadioGroup } from './RadioGroup';
|
|
37
42
|
export { default as Section } from './Section';
|
|
38
43
|
export { default as Select } from './SelectNative';
|
|
44
|
+
export { default as SelectCard } from './SelectCard';
|
|
39
45
|
export { default as SelectNative } from './SelectNative';
|
|
40
46
|
export { default as SubHeading } from './SubHeading';
|
|
41
47
|
export { default as Switch } from './Switch';
|
package/dist/components/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import '../assets/global.css';/* empty css */
|
|
2
|
+
import { Accordion } from "./Accordion/Accordion.js";
|
|
3
|
+
import { AviosBadge } from "./AviosBadge/AviosBadge.js";
|
|
2
4
|
import { AviosCurrencySymbol } from "./AviosCurrencySymbol/AviosCurrencySymbol.js";
|
|
3
5
|
import { Badge } from "./Badge/Badge.js";
|
|
4
6
|
import { Box } from "./Box/Box.js";
|
|
5
7
|
import { Button } from "./Button/Button.js";
|
|
6
8
|
import { ButtonGroup } from "./ButtonGroup/ButtonGroup.js";
|
|
9
|
+
import { CalloutBanner } from "./CalloutBanner/CalloutBanner.js";
|
|
7
10
|
import { default as default2 } from "./CardSection/CardSection.js";
|
|
8
11
|
import { Checkbox } from "./Checkbox/Checkbox.js";
|
|
9
12
|
import { CheckboxGroup } from "./CheckboxGroup/CheckboxGroup.js";
|
|
@@ -12,6 +15,7 @@ import { DateField } from "./DateField/DateField.js";
|
|
|
12
15
|
import { DestinationHeading } from "./DestinationHeading/DestinationHeading.js";
|
|
13
16
|
import { default as default3 } from "./DetailsDisclosure/DetailsDisclosure.js";
|
|
14
17
|
import { Dialog } from "./Dialog/Dialog.js";
|
|
18
|
+
import { ErrorSummary } from "./ErrorSummary/ErrorSummary.js";
|
|
15
19
|
import { Eyebrow } from "./Eyebrow/Eyebrow.js";
|
|
16
20
|
import { default as default4 } from "./FieldDescription/FieldDescription.js";
|
|
17
21
|
import { FieldError } from "./FieldError/FieldError.js";
|
|
@@ -28,6 +32,7 @@ import { IconButton } from "./IconButton/IconButton.js";
|
|
|
28
32
|
import { Image } from "./Image/Image.js";
|
|
29
33
|
import { default as default6 } from "./Link/Link.js";
|
|
30
34
|
import { default as default7 } from "./LoadingSpinner/LoadingSpinner.js";
|
|
35
|
+
import { Menu } from "./Menu/Menu.js";
|
|
31
36
|
import { NumberField } from "./NumberField/NumberField.js";
|
|
32
37
|
import { Paragraph } from "./Paragraph/Paragraph.js";
|
|
33
38
|
import { PhoneNumberField } from "./PhoneNumberField/PhoneNumberField.js";
|
|
@@ -37,21 +42,25 @@ import { Radio } from "./Radio/Radio.js";
|
|
|
37
42
|
import { RadioGroup } from "./RadioGroup/RadioGroup.js";
|
|
38
43
|
import { default as default8 } from "./Section/Section.js";
|
|
39
44
|
import { SelectNative, SelectNative as SelectNative2 } from "./SelectNative/SelectNative.js";
|
|
45
|
+
import { default as default9 } from "./SelectCard/SelectCard.js";
|
|
40
46
|
import { SubHeading } from "./SubHeading/SubHeading.js";
|
|
41
47
|
import { Switch } from "./Switch/Switch.js";
|
|
42
48
|
import { Tag } from "./Tag/Tag.js";
|
|
43
49
|
import { TagGroup } from "./TagGroup/TagGroup.js";
|
|
44
50
|
import { TextField } from "./TextField/TextField.js";
|
|
45
51
|
import { TextAreaField } from "./TextAreaField/TextAreaField.js";
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
52
|
+
import { default as default10 } from "./ToggleButton/ToggleButton.js";
|
|
53
|
+
import { default as default11 } from "./ToggleIconButton/ToggleIconButton.js";
|
|
48
54
|
import { Tooltip } from "./Tooltip/Tooltip.js";
|
|
49
55
|
export {
|
|
56
|
+
Accordion,
|
|
57
|
+
AviosBadge,
|
|
50
58
|
AviosCurrencySymbol,
|
|
51
59
|
Badge,
|
|
52
60
|
Box,
|
|
53
61
|
Button,
|
|
54
62
|
ButtonGroup,
|
|
63
|
+
CalloutBanner,
|
|
55
64
|
default2 as CardSection,
|
|
56
65
|
Checkbox,
|
|
57
66
|
CheckboxGroup,
|
|
@@ -60,6 +69,7 @@ export {
|
|
|
60
69
|
DestinationHeading,
|
|
61
70
|
default3 as DetailsDisclosure,
|
|
62
71
|
Dialog,
|
|
72
|
+
ErrorSummary,
|
|
63
73
|
Eyebrow,
|
|
64
74
|
default4 as FieldDescription,
|
|
65
75
|
FieldError,
|
|
@@ -76,6 +86,7 @@ export {
|
|
|
76
86
|
Image,
|
|
77
87
|
default6 as Link,
|
|
78
88
|
default7 as LoadingSpinner,
|
|
89
|
+
Menu,
|
|
79
90
|
NumberField,
|
|
80
91
|
Paragraph,
|
|
81
92
|
PasswordField,
|
|
@@ -85,6 +96,7 @@ export {
|
|
|
85
96
|
RadioGroup,
|
|
86
97
|
default8 as Section,
|
|
87
98
|
SelectNative as Select,
|
|
99
|
+
default9 as SelectCard,
|
|
88
100
|
SelectNative2 as SelectNative,
|
|
89
101
|
SubHeading,
|
|
90
102
|
Switch,
|
|
@@ -92,8 +104,8 @@ export {
|
|
|
92
104
|
TagGroup,
|
|
93
105
|
TextAreaField,
|
|
94
106
|
TextField,
|
|
95
|
-
|
|
96
|
-
|
|
107
|
+
default10 as ToggleButton,
|
|
108
|
+
default11 as ToggleIconButton,
|
|
97
109
|
Tooltip
|
|
98
110
|
};
|
|
99
111
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import './assets/global.css';/* empty css */
|
|
2
|
+
import { Accordion } from "./components/Accordion/Accordion.js";
|
|
3
|
+
import { AviosBadge } from "./components/AviosBadge/AviosBadge.js";
|
|
2
4
|
import { AviosCurrencySymbol } from "./components/AviosCurrencySymbol/AviosCurrencySymbol.js";
|
|
3
5
|
import { Badge } from "./components/Badge/Badge.js";
|
|
4
6
|
import { Box } from "./components/Box/Box.js";
|
|
5
7
|
import { Button } from "./components/Button/Button.js";
|
|
6
8
|
import { ButtonGroup } from "./components/ButtonGroup/ButtonGroup.js";
|
|
9
|
+
import { CalloutBanner } from "./components/CalloutBanner/CalloutBanner.js";
|
|
7
10
|
import { default as default2 } from "./components/CardSection/CardSection.js";
|
|
8
11
|
import { Checkbox } from "./components/Checkbox/Checkbox.js";
|
|
9
12
|
import { CheckboxGroup } from "./components/CheckboxGroup/CheckboxGroup.js";
|
|
@@ -12,6 +15,7 @@ import { DateField } from "./components/DateField/DateField.js";
|
|
|
12
15
|
import { DestinationHeading } from "./components/DestinationHeading/DestinationHeading.js";
|
|
13
16
|
import { default as default3 } from "./components/DetailsDisclosure/DetailsDisclosure.js";
|
|
14
17
|
import { Dialog } from "./components/Dialog/Dialog.js";
|
|
18
|
+
import { ErrorSummary } from "./components/ErrorSummary/ErrorSummary.js";
|
|
15
19
|
import { Eyebrow } from "./components/Eyebrow/Eyebrow.js";
|
|
16
20
|
import { default as default4 } from "./components/FieldDescription/FieldDescription.js";
|
|
17
21
|
import { FieldError } from "./components/FieldError/FieldError.js";
|
|
@@ -28,6 +32,7 @@ import { IconButton } from "./components/IconButton/IconButton.js";
|
|
|
28
32
|
import { Image } from "./components/Image/Image.js";
|
|
29
33
|
import { default as default6 } from "./components/Link/Link.js";
|
|
30
34
|
import { default as default7 } from "./components/LoadingSpinner/LoadingSpinner.js";
|
|
35
|
+
import { Menu } from "./components/Menu/Menu.js";
|
|
31
36
|
import { NumberField } from "./components/NumberField/NumberField.js";
|
|
32
37
|
import { Paragraph } from "./components/Paragraph/Paragraph.js";
|
|
33
38
|
import { PhoneNumberField } from "./components/PhoneNumberField/PhoneNumberField.js";
|
|
@@ -37,21 +42,25 @@ import { Radio } from "./components/Radio/Radio.js";
|
|
|
37
42
|
import { RadioGroup } from "./components/RadioGroup/RadioGroup.js";
|
|
38
43
|
import { default as default8 } from "./components/Section/Section.js";
|
|
39
44
|
import { SelectNative, SelectNative as SelectNative2 } from "./components/SelectNative/SelectNative.js";
|
|
45
|
+
import { default as default9 } from "./components/SelectCard/SelectCard.js";
|
|
40
46
|
import { SubHeading } from "./components/SubHeading/SubHeading.js";
|
|
41
47
|
import { Switch } from "./components/Switch/Switch.js";
|
|
42
48
|
import { Tag } from "./components/Tag/Tag.js";
|
|
43
49
|
import { TagGroup } from "./components/TagGroup/TagGroup.js";
|
|
44
50
|
import { TextField } from "./components/TextField/TextField.js";
|
|
45
51
|
import { TextAreaField } from "./components/TextAreaField/TextAreaField.js";
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
52
|
+
import { default as default10 } from "./components/ToggleButton/ToggleButton.js";
|
|
53
|
+
import { default as default11 } from "./components/ToggleIconButton/ToggleIconButton.js";
|
|
48
54
|
import { Tooltip } from "./components/Tooltip/Tooltip.js";
|
|
49
55
|
export {
|
|
56
|
+
Accordion,
|
|
57
|
+
AviosBadge,
|
|
50
58
|
AviosCurrencySymbol,
|
|
51
59
|
Badge,
|
|
52
60
|
Box,
|
|
53
61
|
Button,
|
|
54
62
|
ButtonGroup,
|
|
63
|
+
CalloutBanner,
|
|
55
64
|
default2 as CardSection,
|
|
56
65
|
Checkbox,
|
|
57
66
|
CheckboxGroup,
|
|
@@ -60,6 +69,7 @@ export {
|
|
|
60
69
|
DestinationHeading,
|
|
61
70
|
default3 as DetailsDisclosure,
|
|
62
71
|
Dialog,
|
|
72
|
+
ErrorSummary,
|
|
63
73
|
Eyebrow,
|
|
64
74
|
default4 as FieldDescription,
|
|
65
75
|
FieldError,
|
|
@@ -76,6 +86,7 @@ export {
|
|
|
76
86
|
Image,
|
|
77
87
|
default6 as Link,
|
|
78
88
|
default7 as LoadingSpinner,
|
|
89
|
+
Menu,
|
|
79
90
|
NumberField,
|
|
80
91
|
Paragraph,
|
|
81
92
|
PasswordField,
|
|
@@ -85,6 +96,7 @@ export {
|
|
|
85
96
|
RadioGroup,
|
|
86
97
|
default8 as Section,
|
|
87
98
|
SelectNative as Select,
|
|
99
|
+
default9 as SelectCard,
|
|
88
100
|
SelectNative2 as SelectNative,
|
|
89
101
|
SubHeading,
|
|
90
102
|
Switch,
|
|
@@ -92,8 +104,8 @@ export {
|
|
|
92
104
|
TagGroup,
|
|
93
105
|
TextAreaField,
|
|
94
106
|
TextField,
|
|
95
|
-
|
|
96
|
-
|
|
107
|
+
default10 as ToggleButton,
|
|
108
|
+
default11 as ToggleIconButton,
|
|
97
109
|
Tooltip
|
|
98
110
|
};
|
|
99
111
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { InputType } from 'storybook/internal/types';
|
|
3
3
|
export declare const borderVariants: (props?: ({
|
|
4
|
-
borderRadius?: "none" | "lg" | "sm" | "xs" | "2xs" | "xl" | "md" | "5xs" | "4xs" | "3xs" | "6xs" |
|
|
4
|
+
borderRadius?: "none" | "lg" | "sm" | "xs" | "2xs" | "xl" | "circle" | "md" | "5xs" | "4xs" | "3xs" | "6xs" | null | undefined;
|
|
5
5
|
borderWidth?: "none" | "lg" | "sm" | "xs" | "xl" | "md" | null | undefined;
|
|
6
6
|
borderStyle?: "none" | "solid" | "dashed" | null | undefined;
|
|
7
|
-
borderColour?: "secondary" | "
|
|
7
|
+
borderColour?: "secondary" | "none" | "white" | "critical" | "warning" | "caution" | "success" | "tertiary" | "accent" | "information" | "inverse" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
export type BorderVariants = VariantProps<typeof borderVariants>;
|
|
10
10
|
export declare const borderArgTypes: Record<string, InputType>;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const flexVariants: (props?: ({
|
|
3
3
|
display?: "flex" | "inline-flex" | null | undefined;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
alignItems?: "center" | "end" | "start" | "flexStart" | "flexEnd" | "stretch" | "selfStart" | "selfEnd" | "selfCenter" | null | undefined;
|
|
5
|
+
justifyContent?: "left" | "right" | "center" | "end" | "inherit" | "initial" | "start" | "flexStart" | "flexEnd" | "stretch" | "spaceBetween" | "spaceAround" | "spaceEvenly" | "normal" | "revert" | "revertLayer" | "unset" | null | undefined;
|
|
6
|
+
flexWrap?: "wrap" | "nowrap" | "wrapReverse" | null | undefined;
|
|
7
|
+
flexGrow?: 0 | 1 | "inherit" | "initial" | "revert" | "revertLayer" | "unset" | null | undefined;
|
|
8
|
+
flexShrink?: 0 | 1 | "inherit" | "initial" | "revert" | "revertLayer" | "unset" | null | undefined;
|
|
8
9
|
flexDirection?: "row" | "row-reverse" | "column" | "column-reverse" | null | undefined;
|
|
9
|
-
|
|
10
|
+
alignSelf?: "center" | "end" | "auto" | "baseline" | "inherit" | "initial" | "start" | "flexStart" | "flexEnd" | "stretch" | "selfStart" | "selfEnd" | "normal" | "revert" | "revertLayer" | "unset" | null | undefined;
|
|
11
|
+
alignContent?: "center" | "end" | "baseline" | "inherit" | "initial" | "start" | "flexStart" | "flexEnd" | "stretch" | "spaceBetween" | "spaceAround" | "spaceEvenly" | "normal" | "revert" | "revertLayer" | "unset" | "firstBaseline" | "lastBaseline" | "safeCenter" | "unsafeCenter" | null | undefined;
|
|
12
|
+
flexBasis?: "inherit" | "initial" | "content" | "revert" | "revertLayer" | "unset" | "maxContent" | "minContent" | "fitContent" | null | undefined;
|
|
10
13
|
gap?: "lg" | "sm" | "xs" | "2xs" | "xl" | "2xl" | "md" | "5xs" | "4xs" | "3xs" | "3xl" | "4xl" | "5xl" | "6xl" | null | undefined;
|
|
14
|
+
rowGap?: "lg" | "sm" | "xs" | "2xs" | "xl" | "2xl" | "md" | "5xs" | "4xs" | "3xs" | "3xl" | "4xl" | "5xl" | "6xl" | null | undefined;
|
|
15
|
+
columnGap?: "lg" | "sm" | "xs" | "2xs" | "xl" | "2xl" | "md" | "5xs" | "4xs" | "3xs" | "3xl" | "4xl" | "5xl" | "6xl" | null | undefined;
|
|
11
16
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
17
|
export type FlexVariants = VariantProps<typeof flexVariants>;
|