@alto-avios/alto-ui 2.3.3 → 2.4.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/README.md +20 -9
- package/dist/assets/Badge.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonGroup.css +1 -1
- package/dist/assets/CardSection.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/CheckboxGroup.css +1 -1
- package/dist/assets/ClearFieldButton.css +1 -1
- package/dist/assets/DateField.css +1 -1
- package/dist/assets/Eyebrow.css +1 -1
- package/dist/assets/FieldDescription.css +1 -1
- package/dist/assets/FieldError.css +1 -1
- package/dist/assets/FieldHeader.css +1 -1
- package/dist/assets/FieldLabel.css +1 -1
- package/dist/assets/Grid.css +1 -1
- package/dist/assets/Heading.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Link.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/NewButton.css +1 -1
- package/dist/assets/NumberField.css +1 -0
- package/dist/assets/Radio.css +1 -1
- package/dist/assets/RadioGroup.css +1 -1
- package/dist/assets/Section.css +1 -0
- package/dist/assets/SubHeading.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/TextAreaField.css +1 -1
- package/dist/assets/ToggleButton.css +1 -1
- package/dist/assets/ToggleIconButton.css +1 -1
- package/dist/assets/Tooltip.css +1 -1
- package/dist/assets/fgColor.css +1 -1
- package/dist/assets/focusStyles.css +1 -1
- package/dist/assets/padding.css +1 -1
- package/dist/components/Badge/Badge.js +11 -11
- package/dist/components/Box/Box.d.ts +2 -2
- package/dist/components/Button/Button.js +23 -23
- package/dist/components/ButtonGroup/ButtonGroup.js +8 -8
- package/dist/components/CardSection/CardSection.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +11 -9
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +12 -12
- package/dist/components/CheckboxGroup/CheckboxGroup.js +3 -3
- package/dist/components/ClearFieldButton/ClearFieldButton.d.ts +1 -1
- package/dist/components/ClearFieldButton/ClearFieldButton.js +4 -4
- package/dist/components/DateField/DateField.js +3 -3
- package/dist/components/DestinationHeading/DestinationHeading.d.ts +1 -1
- package/dist/components/Eyebrow/Eyebrow.js +5 -5
- package/dist/components/FieldDescription/FieldDescription.js +1 -1
- package/dist/components/FieldError/FieldError.js +1 -1
- package/dist/components/FieldHeader/FieldHeader.d.ts +2 -1
- package/dist/components/FieldHeader/FieldHeader.js +5 -4
- package/dist/components/FieldHeader/FieldHeader.js.map +1 -1
- package/dist/components/FieldLabel/FieldLabel.d.ts +1 -1
- package/dist/components/FieldLabel/FieldLabel.js +1 -2
- package/dist/components/FieldLabel/FieldLabel.js.map +1 -1
- package/dist/components/Grid/Grid.d.ts +35 -16
- package/dist/components/Grid/Grid.js +63 -30
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/Heading/Heading.js +16 -16
- package/dist/components/Icon/Icon.d.ts +4 -4
- package/dist/components/Icon/Icon.js +1 -0
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/IconButton/IconButton.js +22 -22
- package/dist/components/Link/Link.js +7 -7
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -2
- package/dist/components/LoadingSpinner/LoadingSpinner.js +5 -5
- package/dist/components/NewButton/NewButton.js +28 -28
- package/dist/components/NumberField/NumberField.d.ts +55 -0
- package/dist/components/NumberField/NumberField.js +43 -0
- package/dist/components/NumberField/NumberField.js.map +1 -0
- package/dist/components/NumberField/index.d.ts +1 -0
- package/dist/components/NumberField/index.js +5 -0
- package/dist/components/NumberField/index.js.map +1 -0
- package/dist/components/Paragraph/Paragraph.d.ts +3 -3
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -2
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Section/Section.d.ts +29 -0
- package/dist/components/Section/Section.js +103 -0
- package/dist/components/Section/Section.js.map +1 -0
- package/dist/components/Section/index.d.ts +1 -0
- package/dist/components/Section/index.js +5 -0
- package/dist/components/Section/index.js.map +1 -0
- package/dist/components/SubHeading/SubHeading.js +8 -8
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/Tag/Tag.js +4 -4
- package/dist/components/TagGroup/TagGroup.d.ts +2 -2
- package/dist/components/TextAreaField/TextAreaField.js +2 -2
- package/dist/components/ToggleButton/ToggleButton.js +6 -6
- package/dist/components/ToggleIconButton/ToggleIconButton.js +6 -6
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +8 -4
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/backgroundColour/backgroundColour.d.ts +1 -1
- package/dist/utils/fgColour/fgColor.js +34 -34
- package/dist/utils/focus/focusStyles.js +2 -2
- package/dist/utils/padding/padding.d.ts +7 -7
- package/dist/utils/padding/padding.js +271 -46
- package/dist/utils/padding/padding.js.map +1 -1
- package/dist/utils/spaceToken/spaceToken.d.ts +3 -0
- package/dist/utils/spaceToken/spaceToken.js +25 -0
- package/dist/utils/spaceToken/spaceToken.js.map +1 -0
- package/package.json +43 -6
|
@@ -2,17 +2,17 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
3
3
|
import { Icon } from "../Icon/Icon.js";
|
|
4
4
|
import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
|
|
5
|
-
import '../../assets/Badge.css';const badge$1 = "
|
|
6
|
-
const md = "
|
|
7
|
-
const sm = "
|
|
8
|
-
const neutral = "
|
|
9
|
-
const critical = "
|
|
10
|
-
const warning = "
|
|
11
|
-
const caution = "
|
|
12
|
-
const success = "
|
|
13
|
-
const info = "
|
|
14
|
-
const brand = "
|
|
15
|
-
const sale = "
|
|
5
|
+
import '../../assets/Badge.css';const badge$1 = "_badge_6jwot_1";
|
|
6
|
+
const md = "_md_6jwot_16";
|
|
7
|
+
const sm = "_sm_6jwot_25";
|
|
8
|
+
const neutral = "_neutral_6jwot_33";
|
|
9
|
+
const critical = "_critical_6jwot_37";
|
|
10
|
+
const warning = "_warning_6jwot_41";
|
|
11
|
+
const caution = "_caution_6jwot_45";
|
|
12
|
+
const success = "_success_6jwot_49";
|
|
13
|
+
const info = "_info_6jwot_53";
|
|
14
|
+
const brand = "_brand_6jwot_57";
|
|
15
|
+
const sale = "_sale_6jwot_61";
|
|
16
16
|
const styles = {
|
|
17
17
|
badge: badge$1,
|
|
18
18
|
md,
|
|
@@ -8,12 +8,12 @@ export interface BoxProps extends BackgroundVariants, FlexVariants, BorderVarian
|
|
|
8
8
|
/**
|
|
9
9
|
* The HTML element to render the Box as.
|
|
10
10
|
*/
|
|
11
|
-
as?:
|
|
11
|
+
as?: 'div' | 'article';
|
|
12
12
|
/**
|
|
13
13
|
* The width of the Box.
|
|
14
14
|
* Accepts any valid CSS unit or "full"
|
|
15
15
|
*/
|
|
16
|
-
width?:
|
|
16
|
+
width?: 'full' | string;
|
|
17
17
|
/**
|
|
18
18
|
* The maximum width of the Box.
|
|
19
19
|
* Accepts any valid CSS unit.
|
|
@@ -5,33 +5,33 @@ import { Button as Button$1 } from "react-aria-components";
|
|
|
5
5
|
import { Icon } from "../Icon/Icon.js";
|
|
6
6
|
import LoadingSpinner from "../LoadingSpinner/LoadingSpinner.js";
|
|
7
7
|
import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
|
|
8
|
-
import '../../assets/Button.css';const button$1 = "
|
|
9
|
-
const sm = "
|
|
10
|
-
const md = "
|
|
11
|
-
const lg = "
|
|
12
|
-
const accentPrimary = "
|
|
13
|
-
const accentSecondary = "
|
|
14
|
-
const accentTertiary = "
|
|
15
|
-
const accentQuaternary = "
|
|
16
|
-
const criticalPrimary = "
|
|
17
|
-
const criticalSecondary = "
|
|
18
|
-
const criticalTertiary = "
|
|
19
|
-
const criticalQuaternary = "
|
|
20
|
-
const neutralPrimary = "
|
|
21
|
-
const neutralSecondary = "
|
|
22
|
-
const neutralTertiary = "
|
|
23
|
-
const neutralQuaternary = "
|
|
24
|
-
const whitePrimary = "
|
|
25
|
-
const whiteSecondary = "
|
|
26
|
-
const whiteTertiary = "
|
|
27
|
-
const whiteQuaternary = "
|
|
8
|
+
import '../../assets/Button.css';const button$1 = "_button_fkkc6_1";
|
|
9
|
+
const sm = "_sm_fkkc6_25";
|
|
10
|
+
const md = "_md_fkkc6_30";
|
|
11
|
+
const lg = "_lg_fkkc6_35";
|
|
12
|
+
const accentPrimary = "_accentPrimary_fkkc6_44";
|
|
13
|
+
const accentSecondary = "_accentSecondary_fkkc6_67";
|
|
14
|
+
const accentTertiary = "_accentTertiary_fkkc6_100";
|
|
15
|
+
const accentQuaternary = "_accentQuaternary_fkkc6_129";
|
|
16
|
+
const criticalPrimary = "_criticalPrimary_fkkc6_157";
|
|
17
|
+
const criticalSecondary = "_criticalSecondary_fkkc6_185";
|
|
18
|
+
const criticalTertiary = "_criticalTertiary_fkkc6_218";
|
|
19
|
+
const criticalQuaternary = "_criticalQuaternary_fkkc6_247";
|
|
20
|
+
const neutralPrimary = "_neutralPrimary_fkkc6_276";
|
|
21
|
+
const neutralSecondary = "_neutralSecondary_fkkc6_304";
|
|
22
|
+
const neutralTertiary = "_neutralTertiary_fkkc6_335";
|
|
23
|
+
const neutralQuaternary = "_neutralQuaternary_fkkc6_364";
|
|
24
|
+
const whitePrimary = "_whitePrimary_fkkc6_394";
|
|
25
|
+
const whiteSecondary = "_whiteSecondary_fkkc6_423";
|
|
26
|
+
const whiteTertiary = "_whiteTertiary_fkkc6_454";
|
|
27
|
+
const whiteQuaternary = "_whiteQuaternary_fkkc6_483";
|
|
28
28
|
const styles = {
|
|
29
29
|
button: button$1,
|
|
30
30
|
sm,
|
|
31
31
|
md,
|
|
32
32
|
lg,
|
|
33
33
|
accentPrimary,
|
|
34
|
-
"local-class": "_local-
|
|
34
|
+
"local-class": "_local-class_fkkc6_61",
|
|
35
35
|
accentSecondary,
|
|
36
36
|
accentTertiary,
|
|
37
37
|
accentQuaternary,
|
|
@@ -47,8 +47,8 @@ const styles = {
|
|
|
47
47
|
whiteSecondary,
|
|
48
48
|
whiteTertiary,
|
|
49
49
|
whiteQuaternary,
|
|
50
|
-
"fa-spinner-third": "_fa-spinner-
|
|
51
|
-
"icon-wrapper": "_icon-
|
|
50
|
+
"fa-spinner-third": "_fa-spinner-third_fkkc6_514",
|
|
51
|
+
"icon-wrapper": "_icon-wrapper_fkkc6_519"
|
|
52
52
|
};
|
|
53
53
|
const button = cva(styles.button, {
|
|
54
54
|
variants: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
4
|
-
import '../../assets/ButtonGroup.css';const buttonGroup = "
|
|
5
|
-
const alignStart = "
|
|
6
|
-
const alignCenter = "
|
|
7
|
-
const alignEnd = "
|
|
8
|
-
const alignJustify = "
|
|
9
|
-
const alignSplit = "
|
|
10
|
-
const alignStack = "
|
|
11
|
-
const alignStackFlip = "
|
|
4
|
+
import '../../assets/ButtonGroup.css';const buttonGroup = "_buttonGroup_zcnod_2";
|
|
5
|
+
const alignStart = "_alignStart_zcnod_10";
|
|
6
|
+
const alignCenter = "_alignCenter_zcnod_14";
|
|
7
|
+
const alignEnd = "_alignEnd_zcnod_18";
|
|
8
|
+
const alignJustify = "_alignJustify_zcnod_22";
|
|
9
|
+
const alignSplit = "_alignSplit_zcnod_26";
|
|
10
|
+
const alignStack = "_alignStack_zcnod_39";
|
|
11
|
+
const alignStackFlip = "_alignStackFlip_zcnod_44";
|
|
12
12
|
const styles = {
|
|
13
13
|
buttonGroup,
|
|
14
14
|
alignStart,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
import '../../assets/CardSection.css';const cardSection$1 = "
|
|
5
|
-
const cardContainer = "
|
|
6
|
-
const cardGrid = "
|
|
7
|
-
const contentCell = "
|
|
8
|
-
const contentBox = "
|
|
9
|
-
const mediaCell = "
|
|
10
|
-
const isReversed = "
|
|
4
|
+
import '../../assets/CardSection.css';const cardSection$1 = "_cardSection_1qtaq_1";
|
|
5
|
+
const cardContainer = "_cardContainer_1qtaq_12";
|
|
6
|
+
const cardGrid = "_cardGrid_1qtaq_24";
|
|
7
|
+
const contentCell = "_contentCell_1qtaq_33";
|
|
8
|
+
const contentBox = "_contentBox_1qtaq_40";
|
|
9
|
+
const mediaCell = "_mediaCell_1qtaq_51";
|
|
10
|
+
const isReversed = "_isReversed_1qtaq_65";
|
|
11
11
|
const styles = {
|
|
12
12
|
cardSection: cardSection$1,
|
|
13
13
|
cardContainer,
|
|
@@ -30,7 +30,7 @@ export interface CheckboxProps extends AriaCheckboxProps {
|
|
|
30
30
|
* or invalid via ARIA.
|
|
31
31
|
* @default 'aria'
|
|
32
32
|
*/
|
|
33
|
-
validationBehavior?:
|
|
33
|
+
validationBehavior?: 'native' | 'aria';
|
|
34
34
|
description?: string;
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
focusStyle?: 'default' | 'white';
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox as Checkbox$1 } from "react-aria-components";
|
|
3
3
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
4
4
|
import FieldDescription from "../FieldDescription/FieldDescription.js";
|
|
5
|
-
import '../../assets/Checkbox.css';const checkbox$1 = "
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
5
|
+
import '../../assets/Checkbox.css';const checkbox$1 = "_checkbox_1twm2_2";
|
|
6
|
+
const checkboxContainer = "_checkboxContainer_1twm2_19";
|
|
7
|
+
const checkboxLabel = "_checkboxLabel_1twm2_24";
|
|
8
|
+
const checkboxDescription = "_checkboxDescription_1twm2_28";
|
|
9
|
+
const checkboxSvgWrapper = "_checkboxSvgWrapper_1twm2_32";
|
|
10
|
+
const svg = "_svg_1twm2_46";
|
|
11
|
+
const defaultFocus = "_defaultFocus_1twm2_74";
|
|
12
|
+
const whiteFocus = "_whiteFocus_1twm2_78";
|
|
12
13
|
const styles = {
|
|
13
14
|
checkbox: checkbox$1,
|
|
15
|
+
checkboxContainer,
|
|
14
16
|
checkboxLabel,
|
|
15
17
|
checkboxDescription,
|
|
16
18
|
checkboxSvgWrapper,
|
|
@@ -48,7 +50,7 @@ const Checkbox = ({
|
|
|
48
50
|
focusStyle = "default",
|
|
49
51
|
...props
|
|
50
52
|
}) => {
|
|
51
|
-
return /* @__PURE__ */ jsxs(
|
|
53
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.checkboxContainer, children: [
|
|
52
54
|
/* @__PURE__ */ jsx(Checkbox$1, { className: checkbox({
|
|
53
55
|
focusStyle
|
|
54
56
|
}), isIndeterminate, defaultSelected, isSelected, value, isDisabled, isReadOnly, isRequired, isInvalid, validate, autoFocus, name, validationBehavior, ...props, children: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,28 +2,28 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { CheckboxGroupProps as AriaCheckboxGroupProps, ValidationResult } from 'react-aria-components';
|
|
3
3
|
export interface CheckboxGroupProps extends AriaCheckboxGroupProps {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
* The field label.
|
|
6
|
+
*/
|
|
7
7
|
label?: string;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* The children to render.
|
|
10
|
+
*/
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* The descriptive text located underneath the checkbox group.
|
|
14
|
+
*/
|
|
15
15
|
description?: string;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* The error message to display when the input value is invalid.
|
|
18
|
+
*/
|
|
19
19
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Whether the input is disabled.
|
|
22
|
+
*/
|
|
23
23
|
isDisabled?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Whether the input value is invalid.
|
|
26
|
+
*/
|
|
27
27
|
isInvalid?: boolean;
|
|
28
28
|
}
|
|
29
29
|
export declare const CheckboxGroup: ({ label, children, description, errorMessage, isDisabled, isInvalid, ...props }: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { CheckboxGroup as CheckboxGroup$1 } from "react-aria-components";
|
|
3
3
|
import { FieldHeader } from "../FieldHeader/FieldHeader.js";
|
|
4
|
-
import '../../assets/CheckboxGroup.css';const checkboxGroup = "
|
|
5
|
-
const errorMessage = "
|
|
6
|
-
const description = "
|
|
4
|
+
import '../../assets/CheckboxGroup.css';const checkboxGroup = "_checkboxGroup_1vs5o_1";
|
|
5
|
+
const errorMessage = "_errorMessage_1vs5o_8";
|
|
6
|
+
const description = "_description_1vs5o_13";
|
|
7
7
|
const styles = {
|
|
8
8
|
checkboxGroup,
|
|
9
9
|
errorMessage,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from '../Button/Button';
|
|
2
2
|
import { IconSize } from '../Icon/Icon';
|
|
3
3
|
export type ClearFieldButtonButtonSize = 'lg' | 'md' | 'sm';
|
|
4
|
-
export interface ClearFieldButtonProps extends Omit<ButtonProps,
|
|
4
|
+
export interface ClearFieldButtonProps extends Omit<ButtonProps, '$styleText'> {
|
|
5
5
|
slot?: string;
|
|
6
6
|
iconSize?: IconSize;
|
|
7
7
|
className?: string;
|
|
@@ -3,10 +3,10 @@ import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
|
3
3
|
import { Button } from "react-aria-components";
|
|
4
4
|
import { Icon } from "../Icon/Icon.js";
|
|
5
5
|
import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
|
|
6
|
-
import '../../assets/ClearFieldButton.css';const clearFieldButton$1 = "
|
|
7
|
-
const sm = "
|
|
8
|
-
const md = "
|
|
9
|
-
const lg = "
|
|
6
|
+
import '../../assets/ClearFieldButton.css';const clearFieldButton$1 = "_clearFieldButton_hkevp_1";
|
|
7
|
+
const sm = "_sm_hkevp_18";
|
|
8
|
+
const md = "_md_hkevp_23";
|
|
9
|
+
const lg = "_lg_hkevp_28";
|
|
10
10
|
const styles = {
|
|
11
11
|
clearFieldButton: clearFieldButton$1,
|
|
12
12
|
sm,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DateField as DateField$1, DateInput, DateSegment } from "react-aria-components";
|
|
3
3
|
import { FieldHeader } from "../FieldHeader/FieldHeader.js";
|
|
4
|
-
import '../../assets/DateField.css';const dateField = "
|
|
5
|
-
const dateInput = "
|
|
6
|
-
const dateSegment = "
|
|
4
|
+
import '../../assets/DateField.css';const dateField = "_dateField_1mc0h_1";
|
|
5
|
+
const dateInput = "_dateInput_1mc0h_5";
|
|
6
|
+
const dateSegment = "_dateSegment_1mc0h_48";
|
|
7
7
|
const styles = {
|
|
8
8
|
dateField,
|
|
9
9
|
dateInput,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
3
|
-
import '../../assets/Eyebrow.css';const eyebrow$1 = "
|
|
4
|
-
const inspiration = "
|
|
5
|
-
const collect = "
|
|
6
|
-
const spend = "
|
|
7
|
-
const activate = "
|
|
3
|
+
import '../../assets/Eyebrow.css';const eyebrow$1 = "_eyebrow_rc11b_1";
|
|
4
|
+
const inspiration = "_inspiration_rc11b_16";
|
|
5
|
+
const collect = "_collect_rc11b_20";
|
|
6
|
+
const spend = "_spend_rc11b_24";
|
|
7
|
+
const activate = "_activate_rc11b_29";
|
|
8
8
|
const styles = {
|
|
9
9
|
eyebrow: eyebrow$1,
|
|
10
10
|
inspiration,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from "react-aria-components";
|
|
3
|
-
import '../../assets/FieldDescription.css';const fieldDescription = "
|
|
3
|
+
import '../../assets/FieldDescription.css';const fieldDescription = "_fieldDescription_18783_1";
|
|
4
4
|
const styles = {
|
|
5
5
|
fieldDescription
|
|
6
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { FieldError as FieldError$1 } from "react-aria-components";
|
|
3
3
|
import { Icon } from "../Icon/Icon.js";
|
|
4
|
-
import '../../assets/FieldError.css';const fieldError = "
|
|
4
|
+
import '../../assets/FieldError.css';const fieldError = "_fieldError_1tsix_1";
|
|
5
5
|
const styles = {
|
|
6
6
|
fieldError
|
|
7
7
|
};
|
|
@@ -5,6 +5,7 @@ export interface FieldHeaderProps {
|
|
|
5
5
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
6
6
|
isInvalid?: boolean;
|
|
7
7
|
isRequired?: boolean;
|
|
8
|
+
labelFor?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const FieldHeader: ({ label, description, isInvalid, isRequired, errorMessage, }: FieldHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const FieldHeader: ({ label, description, isInvalid, isRequired, errorMessage, labelFor, }: FieldHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default FieldHeader;
|
|
@@ -2,21 +2,22 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import FieldDescription from "../FieldDescription/FieldDescription.js";
|
|
3
3
|
import { FieldError } from "../FieldError/FieldError.js";
|
|
4
4
|
import { FieldLabel } from "../FieldLabel/FieldLabel.js";
|
|
5
|
-
import '../../assets/FieldHeader.css';const fieldHeader = "
|
|
5
|
+
import '../../assets/FieldHeader.css';const fieldHeader = "_fieldHeader_3rjlj_1";
|
|
6
6
|
const styles = {
|
|
7
7
|
fieldHeader,
|
|
8
|
-
"label-container": "_label-
|
|
8
|
+
"label-container": "_label-container_3rjlj_12"
|
|
9
9
|
};
|
|
10
10
|
const FieldHeader = ({
|
|
11
11
|
label,
|
|
12
12
|
description,
|
|
13
13
|
isInvalid,
|
|
14
14
|
isRequired,
|
|
15
|
-
errorMessage
|
|
15
|
+
errorMessage,
|
|
16
|
+
labelFor
|
|
16
17
|
}) => {
|
|
17
18
|
return /* @__PURE__ */ jsxs("div", { className: styles.fieldHeader, "data-invalid": isInvalid ? true : void 0, children: [
|
|
18
19
|
/* @__PURE__ */ jsxs("div", { className: styles["label-container"], children: [
|
|
19
|
-
label && /* @__PURE__ */ jsx(FieldLabel, { required: isRequired ? true : void 0, children: label }),
|
|
20
|
+
label && /* @__PURE__ */ jsx(FieldLabel, { required: isRequired ? true : void 0, htmlFor: labelFor, children: label }),
|
|
20
21
|
!isRequired && /* @__PURE__ */ jsx("span", { children: "Optional" })
|
|
21
22
|
] }),
|
|
22
23
|
description && /* @__PURE__ */ jsx(FieldDescription, { children: description }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,5 +2,5 @@ import { LabelProps as AriaLabelProps } from 'react-aria-components';
|
|
|
2
2
|
export interface FieldLabelProps extends AriaLabelProps {
|
|
3
3
|
required?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const FieldLabel: ({ children,
|
|
5
|
+
export declare const FieldLabel: ({ children, ...props }: FieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default FieldLabel;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Label } from "react-aria-components";
|
|
3
|
-
import '../../assets/FieldLabel.css';const fieldLabel = "
|
|
3
|
+
import '../../assets/FieldLabel.css';const fieldLabel = "_fieldLabel_1jqml_1";
|
|
4
4
|
const styles = {
|
|
5
5
|
fieldLabel
|
|
6
6
|
};
|
|
7
7
|
const FieldLabel = ({
|
|
8
8
|
children,
|
|
9
|
-
required,
|
|
10
9
|
...props
|
|
11
10
|
}) => {
|
|
12
11
|
return /* @__PURE__ */ jsx(Label, { className: styles.fieldLabel, ...props, children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { SpaceToken } from '../../utils/spaceToken/spaceToken';
|
|
3
3
|
type AutoFlowValue = 'row' | 'column' | 'dense' | 'row dense' | 'column dense';
|
|
4
4
|
type AlignContentValue = 'start' | 'end' | 'center' | 'stretch' | 'space-around' | 'space-between' | 'space-evenly';
|
|
5
|
-
|
|
5
|
+
type ValidElements = 'div' | 'span';
|
|
6
|
+
type PolymorphicProps<E extends ValidElements> = {
|
|
7
|
+
as?: E;
|
|
8
|
+
} & Omit<React.ComponentPropsWithRef<E>, 'as'>;
|
|
9
|
+
export interface GridCellBaseProps {
|
|
6
10
|
/**
|
|
7
|
-
* Number of columns this cell should span
|
|
11
|
+
* Number of columns/rows this cell should span
|
|
12
|
+
* Can be a single number for column span or an object for both
|
|
8
13
|
*/
|
|
9
|
-
|
|
14
|
+
span?: number | {
|
|
15
|
+
column?: number;
|
|
16
|
+
row?: number;
|
|
17
|
+
};
|
|
10
18
|
/**
|
|
11
|
-
*
|
|
19
|
+
* Named grid area for placing the cell
|
|
12
20
|
*/
|
|
13
|
-
|
|
21
|
+
area?: string;
|
|
14
22
|
/**
|
|
15
|
-
*
|
|
23
|
+
* Column number where the cell will be placed
|
|
16
24
|
*/
|
|
17
|
-
|
|
25
|
+
column?: string | number;
|
|
18
26
|
/**
|
|
19
|
-
*
|
|
27
|
+
* Starting column for the cell
|
|
20
28
|
*/
|
|
21
|
-
|
|
29
|
+
columnStart?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Ending column for spanning multiple columns
|
|
32
|
+
*/
|
|
33
|
+
columnEnd?: number;
|
|
22
34
|
/**
|
|
23
|
-
*
|
|
35
|
+
* Row number where the cell will be placed
|
|
24
36
|
*/
|
|
25
|
-
|
|
37
|
+
row?: string | number;
|
|
26
38
|
/**
|
|
27
|
-
*
|
|
39
|
+
* Starting row for the cell
|
|
40
|
+
*/
|
|
41
|
+
rowStart?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Ending row for spanning multiple rows
|
|
28
44
|
*/
|
|
29
45
|
rowEnd?: number;
|
|
30
46
|
/**
|
|
@@ -37,7 +53,8 @@ export interface GridCellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
37
53
|
*/
|
|
38
54
|
style?: React.CSSProperties;
|
|
39
55
|
}
|
|
40
|
-
export
|
|
56
|
+
export type GridCellProps<E extends ValidElements = 'div'> = GridCellBaseProps & PolymorphicProps<E>;
|
|
57
|
+
export declare const GridCell: <E extends ValidElements = "div">({ as, span, area, column, columnStart, columnEnd, row, rowStart, rowEnd, children, style, ...rest }: GridCellProps<E>) => import("react/jsx-runtime").JSX.Element;
|
|
41
58
|
export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
59
|
/**
|
|
43
60
|
* Optional unique identifier for the grid
|
|
@@ -99,7 +116,7 @@ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
99
116
|
/**
|
|
100
117
|
* The content of the grid
|
|
101
118
|
*/
|
|
102
|
-
children
|
|
119
|
+
children?: React.ReactNode;
|
|
103
120
|
/**
|
|
104
121
|
* @internal
|
|
105
122
|
* Additional CSS properties to apply to the grid
|
|
@@ -108,6 +125,8 @@ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
108
125
|
}
|
|
109
126
|
export declare const Grid: {
|
|
110
127
|
({ id, isInline, alignContent, autoColumns, autoFlow, columns, rows, templateColumns, templateRows, gap, rowGap, columnGap, children, style, ...rest }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
111
|
-
Cell: ({
|
|
128
|
+
Cell: <E extends ValidElements = "div">({ as, span, area, column, columnStart, columnEnd, row, rowStart, rowEnd, children, style, ...rest }: GridCellProps<E>) => import("react/jsx-runtime").JSX.Element;
|
|
112
129
|
};
|
|
130
|
+
declare const isValidElement: (value: unknown) => value is ValidElements;
|
|
131
|
+
export { isValidElement };
|
|
113
132
|
export default Grid;
|
|
@@ -1,46 +1,74 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
2
|
+
import { getSpaceValue } from "../../utils/spaceToken/spaceToken.js";
|
|
3
|
+
import '../../assets/Grid.css';const grid = "_grid_agdpw_1";
|
|
4
|
+
const gridItem = "_gridItem_agdpw_6";
|
|
4
5
|
const styles = {
|
|
5
6
|
grid,
|
|
6
7
|
gridItem
|
|
7
8
|
};
|
|
8
|
-
const getGapValue = (token) => {
|
|
9
|
-
return token === "default" ? "var(--alto-grid-gutter-default)" : `var(--alto-sem-space-${token})`;
|
|
10
|
-
};
|
|
11
9
|
const GridCell = ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
as,
|
|
11
|
+
span,
|
|
12
|
+
area,
|
|
13
|
+
column,
|
|
14
|
+
columnStart,
|
|
15
|
+
columnEnd,
|
|
16
|
+
row,
|
|
16
17
|
rowStart,
|
|
17
18
|
rowEnd,
|
|
18
19
|
children,
|
|
19
20
|
style,
|
|
20
21
|
...rest
|
|
21
22
|
}) => {
|
|
23
|
+
const Component = as || "div";
|
|
24
|
+
const getSpanStyles = () => {
|
|
25
|
+
if (!span) return {};
|
|
26
|
+
if (typeof span === "number") {
|
|
27
|
+
return {
|
|
28
|
+
gridColumn: `span ${span}`
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
...span.column && {
|
|
33
|
+
gridColumn: `span ${span.column}`
|
|
34
|
+
},
|
|
35
|
+
...span.row && {
|
|
36
|
+
gridRow: `span ${span.row}`
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
22
40
|
const gridCellStyle = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...rowSpan && {
|
|
27
|
-
gridRow: `span ${rowSpan}`
|
|
28
|
-
},
|
|
29
|
-
...colStart && {
|
|
30
|
-
gridColumnStart: colStart
|
|
41
|
+
// Grid area takes precedence over individual positioning
|
|
42
|
+
...area && {
|
|
43
|
+
gridArea: area
|
|
31
44
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
// If no area is specified, use individual positioning props
|
|
46
|
+
...!area && {
|
|
47
|
+
...column && {
|
|
48
|
+
gridColumn: column
|
|
49
|
+
},
|
|
50
|
+
...columnStart && {
|
|
51
|
+
gridColumnStart: columnStart
|
|
52
|
+
},
|
|
53
|
+
...columnEnd && {
|
|
54
|
+
gridColumnEnd: columnEnd
|
|
55
|
+
},
|
|
56
|
+
...row && {
|
|
57
|
+
gridRow: row
|
|
58
|
+
},
|
|
59
|
+
...rowStart && {
|
|
60
|
+
gridRowStart: rowStart
|
|
61
|
+
},
|
|
62
|
+
...rowEnd && {
|
|
63
|
+
gridRowEnd: rowEnd
|
|
64
|
+
}
|
|
40
65
|
},
|
|
66
|
+
// Apply span styles
|
|
67
|
+
...getSpanStyles(),
|
|
68
|
+
// Apply any custom styles
|
|
41
69
|
...style
|
|
42
70
|
};
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
71
|
+
return /* @__PURE__ */ jsx(Component, { className: styles.gridCell, style: gridCellStyle, ...rest, children });
|
|
44
72
|
};
|
|
45
73
|
const Grid = ({
|
|
46
74
|
id,
|
|
@@ -69,19 +97,24 @@ const Grid = ({
|
|
|
69
97
|
gridAutoFlow: autoFlow,
|
|
70
98
|
alignContent,
|
|
71
99
|
...rowGap || columnGap ? {
|
|
72
|
-
rowGap:
|
|
73
|
-
columnGap:
|
|
100
|
+
rowGap: rowGap ? getSpaceValue(rowGap) : void 0,
|
|
101
|
+
columnGap: columnGap ? getSpaceValue(columnGap) : void 0
|
|
74
102
|
} : {
|
|
75
|
-
gap:
|
|
103
|
+
gap: getSpaceValue(gap || "default")
|
|
76
104
|
},
|
|
77
105
|
...style
|
|
78
106
|
};
|
|
79
107
|
return /* @__PURE__ */ jsx("div", { id, className: styles.grid, style: gridStyle, ...rest, children });
|
|
80
108
|
};
|
|
109
|
+
const isValidElement = (value) => {
|
|
110
|
+
const validElements = ["div", "span"];
|
|
111
|
+
return typeof value === "string" && validElements.includes(value);
|
|
112
|
+
};
|
|
81
113
|
Grid.Cell = GridCell;
|
|
82
114
|
export {
|
|
83
115
|
Grid,
|
|
84
116
|
GridCell,
|
|
85
|
-
Grid as default
|
|
117
|
+
Grid as default,
|
|
118
|
+
isValidElement
|
|
86
119
|
};
|
|
87
120
|
//# sourceMappingURL=Grid.js.map
|