@alto-avios/alto-ui 3.6.0-alpha.2 → 3.7.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 -1
- package/dist/assets/AviosCurrency.css +1 -0
- package/dist/assets/Field.css +1 -1
- package/dist/assets/SelectNative.css +1 -1
- package/dist/components/Accordion/Accordion.js +8 -8
- package/dist/components/AviosCurrency/AviosCurrency.d.ts +29 -0
- package/dist/components/AviosCurrency/AviosCurrency.js +166 -0
- package/dist/components/AviosCurrency/AviosCurrency.js.map +1 -0
- package/dist/components/AviosCurrency/index.d.ts +1 -0
- package/dist/components/AviosCurrency/index.js +5 -0
- package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.d.ts +5 -0
- package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +3 -3
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Button/Button.js +2 -4
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +3 -3
- package/dist/components/CalloutBanner/CalloutBanner.js +4 -4
- package/dist/components/CardSection/CardSection.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +4 -8
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/ClearFieldButton/ClearFieldButton.js +1 -1
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js +6 -6
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +5 -5
- package/dist/components/DateField/DateField.js +6 -1
- package/dist/components/DateField/DateField.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +5 -0
- package/dist/components/Dialog/Dialog.js +6 -9
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/ErrorSummary/ErrorSummary.js +5 -6
- package/dist/components/ErrorSummary/ErrorSummary.js.map +1 -1
- package/dist/components/Eyebrow/Eyebrow.js +1 -1
- package/dist/components/Grid/Grid.js +1 -3
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/Heading/Heading.js +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/IconBackdrop/IconBackdrop.js +1 -1
- package/dist/components/IconButton/IconButton.js +63 -22
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Image/Image.js +8 -8
- package/dist/components/Label/Label.js +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/ListBox/ListBox.d.ts +1 -1
- package/dist/components/ListBoxItem/index.d.ts +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +7 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.js +4 -5
- package/dist/components/LoadingSpinner/LoadingSpinner.js.map +1 -1
- package/dist/components/Menu/Menu.js +209 -191
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Paragraph/Paragraph.js +1 -1
- package/dist/components/PasswordField/PasswordField.js +3 -3
- package/dist/components/PhoneNumberField/PhoneNumberField.js +3 -3
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/SearchField/SearchField.js +3 -3
- package/dist/components/Section/Section.js +5 -5
- package/dist/components/SelectCard/SelectCard.js +2 -2
- package/dist/components/Slider/Slider.js +5 -1
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Spacer/Spacer.d.ts +2 -2
- package/dist/components/Spacer/Spacer.js +1 -2
- package/dist/components/Spacer/Spacer.js.map +1 -1
- package/dist/components/SubHeading/SubHeading.js +1 -1
- package/dist/components/TagGroup/TagGroup.js +0 -1
- package/dist/components/TagGroup/TagGroup.js.map +1 -1
- package/dist/components/TextAreaField/TextAreaField.js +1 -3
- package/dist/components/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +1 -3
- package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
- package/dist/components/ToggleIconButton/ToggleIconButton.js +2 -4
- package/dist/components/ToggleIconButton/ToggleIconButton.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -3
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/_base/Field/Field.d.ts +10 -1
- package/dist/components/_base/Field/Field.js +16 -6
- package/dist/components/_base/Field/Field.js.map +1 -1
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/index-DdUYounA.js +57 -0
- package/dist/index-DdUYounA.js.map +1 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/{react-number-format.es-DXPULhrt.js → react-number-format.es-BjKL6crg.js} +6 -6
- package/dist/{react-number-format.es-DXPULhrt.js.map → react-number-format.es-BjKL6crg.js.map} +1 -1
- package/dist/utils/backgroundColor/backgroundColor.js +1 -1
- package/dist/utils/backgroundColor/backgroundColor.test.d.ts +1 -0
- package/dist/utils/border/border.d.ts +1 -1
- package/dist/utils/border/border.js +1 -1
- package/dist/utils/border/border.test.d.ts +1 -0
- package/dist/utils/creditCard/creditCard.test.d.ts +1 -0
- package/dist/utils/flex/flex.d.ts +3 -3
- package/dist/utils/flex/flex.js +1 -23
- package/dist/utils/flex/flex.js.map +1 -1
- package/dist/utils/focus/focusStyles.js +1 -1
- package/dist/utils/focus/focusStyles.test.d.ts +1 -0
- package/dist/utils/foregroundColour/foregroundColor.js +1 -1
- package/dist/utils/foregroundColour/foregroundColor.test.d.ts +1 -0
- package/dist/utils/forms/field.js +1 -1
- package/dist/utils/padding/padding.d.ts +7 -7
- package/dist/utils/padding/padding.js +1 -1
- package/dist/utils/padding/padding.test.d.ts +1 -0
- package/dist/utils/phoneNumber/phoneNumber.test.d.ts +1 -0
- package/dist/utils/position/position.js +1 -1
- package/dist/utils/spaceToken/spaceToken.test.d.ts +1 -0
- package/package.json +14 -17
- package/dist/IconButton.module-DcfPVyUX.js +0 -48
- package/dist/IconButton.module-DcfPVyUX.js.map +0 -1
- package/dist/assets/AutoplayControl.css +0 -1
- package/dist/assets/Carousel.css +0 -1
- package/dist/assets/CarouselButton.css +0 -1
- package/dist/assets/CarouselDots.css +0 -1
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.d.ts +0 -27
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.js +0 -116
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.js.map +0 -1
- package/dist/components/Carousel/Carousel.d.ts +0 -171
- package/dist/components/Carousel/Carousel.js +0 -403
- package/dist/components/Carousel/Carousel.js.map +0 -1
- package/dist/components/Carousel/CarouselButton/CarouselButton.d.ts +0 -44
- package/dist/components/Carousel/CarouselButton/CarouselButton.js +0 -196
- package/dist/components/Carousel/CarouselButton/CarouselButton.js.map +0 -1
- package/dist/components/Carousel/CarouselControls.d.ts +0 -7
- package/dist/components/Carousel/CarouselControls.js +0 -305
- package/dist/components/Carousel/CarouselControls.js.map +0 -1
- package/dist/components/Carousel/CarouselDots/CarouselDots.d.ts +0 -16
- package/dist/components/Carousel/CarouselDots/CarouselDots.js +0 -154
- package/dist/components/Carousel/CarouselDots/CarouselDots.js.map +0 -1
- package/dist/components/Carousel/index.d.ts +0 -1
- package/dist/components/Carousel/index.js +0 -5
- package/dist/index-Bi3v_EjJ.js +0 -57
- package/dist/index-Bi3v_EjJ.js.map +0 -1
- package/dist/index-uZFEbUWx.js +0 -1005
- package/dist/index-uZFEbUWx.js.map +0 -1
- /package/dist/components/{Carousel → AviosCurrency}/index.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
._accordion_1m3lr_1{--accordion-transition-duration:.2s;--accordion-transition-timing:cubic-bezier(.4,0,.2,1);align-items:center;align-self:stretch;background-color:var(--alto-sem-color-bg-white-vibrant-default);border:1px solid var(--alto-sem-color-border-secondary);border-radius:var(--alto-card-radius);display:flex;flex-direction:column;padding:0}._accordionGroup_1m3lr_14,._accordionStack_1m3lr_20{display:flex;flex-direction:column;gap:var(--alto-sem-space-2xs)}._accordionHeader_1m3lr_26{display:flex;flex-direction:column;gap:var(--alto-sem-space-4xs);padding-bottom:var(--alto-sem-space-2xs)}._trigger_1m3lr_33{background-color:var(--alto-sem-color-bg-white-vibrant-default);border:none;border-radius:var(--alto-card-radius);cursor:pointer;padding:var(--alto-sem-space-md) var(--alto-sem-space-sm);width:100%}._buttonContent_1m3lr_42{align-items:center;display:flex;gap:var(--alto-sem-space-sm);justify-content:space-between;width:100%}._titleContainer_1m3lr_50{align-items:center;display:flex;flex:1;gap:var(--alto-sem-space-2xs)}._titleWrapper_1m3lr_57{display:flex;flex-direction:column}._endContainer_1m3lr_62{gap:var(--alto-sem-space-sm)}._endContainer_1m3lr_62,._titleEnd_1m3lr_69,._titleStart_1m3lr_68{align-items:center;display:flex}._accordionTitle_1m3lr_74{color:var(--alto-sem-color-fg-accent-secondary);flex:1;font-size:var(--alto-sem-text-body-lg-font-size);font-style:normal;font-weight:600;letter-spacing:var(--alto-sem-text-body-lg-letter-spacing);line-height:var(--alto-sem-text-body-lg-line-height);text-align:left}._accordionDescription_1m3lr_87,._accordionTitle_1m3lr_74{font-family:var(--alto-sem-text-body-font-family);margin:0}._accordionDescription_1m3lr_87{color:var(--alto-sem-color-fg-secondary);font-size:var(--alto-sem-text-body-md-font-size);letter-spacing:var(--alto-sem-text-body-md-letterSpacing);line-height:var(--alto-sem-text-body-md-line-height)}._iconWrapper_1m3lr_96{align-items:center;color:var(--alto-sem-color-foreground-secondary);display:flex;justify-content:center;transition:transform .25s cubic-bezier(.4,0,.2,1)}._accordion_1m3lr_1[data-expanded=true] ._iconWrapper_1m3lr_96{transform:rotate(180deg)}._accordion_1m3lr_1>[role=group]{height:0;overflow:hidden;visibility:hidden;width:100%}._accordion_1m3lr_1>[role=group],._accordion_1m3lr_1[data-expanded=true]>[role=group]{transition:height var(--accordion-transition-duration) var(--accordion-transition-timing),visibility
|
|
1
|
+
._accordion_1m3lr_1{--accordion-transition-duration:.2s;--accordion-transition-timing:cubic-bezier(.4,0,.2,1);align-items:center;align-self:stretch;background-color:var(--alto-sem-color-bg-white-vibrant-default);border:1px solid var(--alto-sem-color-border-secondary);border-radius:var(--alto-card-radius);display:flex;flex-direction:column;padding:0}._accordionGroup_1m3lr_14,._accordionStack_1m3lr_20{display:flex;flex-direction:column;gap:var(--alto-sem-space-2xs)}._accordionHeader_1m3lr_26{display:flex;flex-direction:column;gap:var(--alto-sem-space-4xs);padding-bottom:var(--alto-sem-space-2xs)}._trigger_1m3lr_33{background-color:var(--alto-sem-color-bg-white-vibrant-default);border:none;border-radius:var(--alto-card-radius);cursor:pointer;padding:var(--alto-sem-space-md) var(--alto-sem-space-sm);width:100%}._buttonContent_1m3lr_42{align-items:center;display:flex;gap:var(--alto-sem-space-sm);justify-content:space-between;width:100%}._titleContainer_1m3lr_50{align-items:center;display:flex;flex:1;gap:var(--alto-sem-space-2xs)}._titleWrapper_1m3lr_57{display:flex;flex-direction:column}._endContainer_1m3lr_62{gap:var(--alto-sem-space-sm)}._endContainer_1m3lr_62,._titleEnd_1m3lr_69,._titleStart_1m3lr_68{align-items:center;display:flex}._accordionTitle_1m3lr_74{color:var(--alto-sem-color-fg-accent-secondary);flex:1;font-size:var(--alto-sem-text-body-lg-font-size);font-style:normal;font-weight:600;letter-spacing:var(--alto-sem-text-body-lg-letter-spacing);line-height:var(--alto-sem-text-body-lg-line-height);text-align:left}._accordionDescription_1m3lr_87,._accordionTitle_1m3lr_74{font-family:var(--alto-sem-text-body-font-family);margin:0}._accordionDescription_1m3lr_87{color:var(--alto-sem-color-fg-secondary);font-size:var(--alto-sem-text-body-md-font-size);letter-spacing:var(--alto-sem-text-body-md-letterSpacing);line-height:var(--alto-sem-text-body-md-line-height)}._iconWrapper_1m3lr_96{align-items:center;color:var(--alto-sem-color-foreground-secondary);display:flex;justify-content:center;transition:transform .25s cubic-bezier(.4,0,.2,1)}._accordion_1m3lr_1[data-expanded=true] ._iconWrapper_1m3lr_96{transform:rotate(180deg)}._accordion_1m3lr_1>[role=group]{height:0;overflow:hidden;visibility:hidden;width:100%}._accordion_1m3lr_1>[role=group],._accordion_1m3lr_1[data-expanded=true]>[role=group]{transition:height var(--accordion-transition-duration) var(--accordion-transition-timing),visibility 0s linear}._accordion_1m3lr_1[data-expanded=true]>[role=group]{height:var(--group-height);visibility:visible}._panelContent_1m3lr_128{padding:var(--alto-sem-space-xs) var(--alto-sem-space-sm) var(--alto-sem-space-2xl)}._accordion_1m3lr_1[data-expanded=true],._accordion_1m3lr_1[data-expanded=true] ._trigger_1m3lr_33{background-color:var(--alto-sem-color-bg-layer1-default)}._accordion_1m3lr_1 ._trigger_1m3lr_33[data-hovered]{background-color:var(--alto-sem-color-overlay-state-darken-invert-hover)}._accordion_1m3lr_1 ._trigger_1m3lr_33[data-focus-visible]{box-shadow:0 0 0 2px var(--alto-sem-color-border-accent);outline:none}._accordion_1m3lr_1 ._trigger_1m3lr_33[data-pressed]{background-color:var(--alto-sem-color-overlay-state-darken-invert-active);outline:none}._accordion_1m3lr_1[data-expanded=true] ._trigger_1m3lr_33[data-hovered]{background-color:var(--alto-sem-color-overlay-state-darken-invert-hover);border-radius:var(--alto-card-radius) var(--alto-card-radius) 0 0}._accordion_1m3lr_1 ._trigger_1m3lr_33[data-focused]{outline:none}._accordion_1m3lr_1 ._trigger_1m3lr_33[data-disabled]{background-color:var(--alto-sem-color-bg-disabled-subtle);color:var(--alto-sem-color-fg-disabled-on-subtle);cursor:not-allowed}._accordion_1m3lr_1 ._trigger_1m3lr_33[data-disabled] ._iconWrapper_1m3lr_96,._trigger_1m3lr_33[data-disabled] ._accordionDescription_1m3lr_87,._trigger_1m3lr_33[data-disabled] ._accordionTitle_1m3lr_74{color:var(--alto-sem-color-fg-disabled-on-subtle)}._accordion_1m3lr_1[data-disabled]{background-color:var(--alto-sem-color-bg-disabled-subtle);border-color:var(--alto-sem-color-border-disabled-subtle)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._aviosCurrency_1gakm_1{align-items:center;display:inline-flex;gap:var(--alto-sem-space-5xs);position:relative;width:-moz-fit-content;width:fit-content}._aviosCurrencyName_1gakm_9{padding-left:var(--alto-sem-space-5xs)}._aviosCurrencyStrikethrough_1gakm_13{border-radius:1px;height:3px;left:0;position:absolute;top:50%;width:100%}._aviosCurrency_1gakm_1{color:var(--alto-sem-color-fg-spend-on-vibrant-default);font-family:var(--alto-sem-text-heading-font-family)}._aviosCurrency-primary_1gakm_27{color:var(--alto-sem-color-fg-primary)}._aviosCurrencyStrikethrough-primary_1gakm_31{background-color:var(--alto-sem-color-fg-primary)}._aviosCurrency-secondary_1gakm_35{color:var(--alto-sem-color-fg-secondary)}._aviosCurrencyStrikethrough-secondary_1gakm_39{background-color:var(--alto-sem-color-fg-secondary)}._aviosCurrency-white_1gakm_43{color:var(--alto-sem-color-fg-white-primary)}._aviosCurrencyStrikethrough-white_1gakm_47{background-color:var(--alto-sem-color-fg-white-primary)}._aviosCurrency-onSpend_1gakm_51{color:var(--alto-sem-color-fg-spend-on-vibrant-default)}._aviosCurrencyStrikethrough-onSpend_1gakm_55{background-color:var(--alto-sem-color-fg-spend-on-vibrant-default)}._aviosCurrency-onCollect_1gakm_59{color:var(--alto-sem-color-fg-collect-on-vibrant-default)}._aviosCurrencyStrikethrough-onCollect_1gakm_63{background-color:var(--alto-sem-color-fg-collect-on-vibrant-default)}._aviosCurrency-accentPrimary_1gakm_67{color:var(--alto-sem-color-fg-accent-primary)}._aviosCurrencyStrikethrough-accentPrimary_1gakm_71{background-color:var(--alto-sem-color-fg-accent-primary)}._aviosCurrency-accentSecondary_1gakm_75{color:var(--alto-sem-color-fg-accent-secondary)}._aviosCurrencyStrikethrough-accentSecondary_1gakm_79{background-color:var(--alto-sem-color-fg-accent-secondary)}._aviosCurrency-xl_1gakm_83{font-size:var(--alto-sem-text-heading-xl-font-size);font-weight:var(--alto-sem-text-heading-xl-font-weight);letter-spacing:var(--alto-sem-text-heading-xl-letter-spacing);line-height:var(--alto-sem-text-heading-xl-line-height)}._aviosCurrency-xl_1gakm_83 svg{height:var(--alto-sem-text-heading-xl-font-size);width:var(--alto-sem-text-heading-xl-font-size)}._aviosCurrencyStrikethrough-xl_1gakm_95{height:1.8px}._aviosCurrency-lg_1gakm_99{font-size:var(--alto-sem-text-heading-lg-font-size);font-weight:var(--alto-sem-text-heading-lg-font-weight);letter-spacing:var(--alto-sem-text-heading-lg-letter-spacing);line-height:var(--alto-sem-text-heading-lg-line-height)}._aviosCurrency-lg_1gakm_99 svg{height:var(--alto-sem-text-heading-lg-font-size);width:var(--alto-sem-text-heading-lg-font-size)}._aviosCurrencyStrikethrough-lg_1gakm_111{height:1.7px}._aviosCurrency-md_1gakm_115{font-size:var(--alto-sem-text-heading-md-font-size);font-weight:var(--alto-sem-text-heading-md-font-weight);letter-spacing:var(--alto-sem-text-heading-md-letter-spacing);line-height:var(--alto-sem-text-heading-md-line-height)}._aviosCurrency-md_1gakm_115 svg{height:var(--alto-sem-text-heading-md-font-size);width:var(--alto-sem-text-heading-md-font-size)}._aviosCurrencyStrikethrough-md_1gakm_127{height:1.5px}._aviosCurrency-sm_1gakm_131{font-size:var(--alto-sem-text-heading-sm-font-size);font-weight:var(--alto-sem-text-heading-sm-font-weight);letter-spacing:var(--alto-sem-text-heading-sm-letter-spacing);line-height:var(--alto-sem-text-heading-sm-line-height)}._aviosCurrency-sm_1gakm_131 svg{height:var(--alto-sem-text-heading-sm-font-size);width:var(--alto-sem-text-heading-sm-font-size)}._aviosCurrencyStrikethrough-sm_1gakm_143{height:1.2px}._aviosCurrency-xs_1gakm_147{font-size:var(--alto-sem-text-heading-xs-font-size);font-weight:var(--alto-sem-text-heading-xs-font-weight);letter-spacing:var(--alto-sem-text-heading-xs-letter-spacing);line-height:var(--alto-sem-text-heading-xs-line-height)}._aviosCurrency-xs_1gakm_147 svg{height:var(--alto-sem-text-heading-xs-font-size);width:var(--alto-sem-text-heading-xs-font-size)}._aviosCurrencyStrikethrough-xs_1gakm_159{height:1px}._aviosCurrency-2xs_1gakm_163{font-size:var(--alto-sem-text-heading-2xs-font-size);font-weight:var(--alto-sem-text-heading-2xs-font-weight);letter-spacing:var(--alto-sem-text-heading-2xs-letter-spacing);line-height:var(--alto-sem-text-heading-2xs-line-height)}._aviosCurrency-2xs_1gakm_163 svg{height:var(--alto-sem-text-heading-2xs-font-size);width:var(--alto-sem-text-heading-2xs-font-size)}._aviosCurrencyStrikethrough-2xs_1gakm_175{height:.8px}._aviosCurrency-3xs_1gakm_179{font-size:var(--alto-sem-text-body-md-font-size);font-weight:var(--alto-sem-text-heading-2xs-font-weight);letter-spacing:var(--alto-sem-text-body-md-letter-spacing);line-height:var(--alto-sem-text-body-md-line-height)}._aviosCurrency-3xs_1gakm_179 svg{height:var(--alto-sem-text-body-md-font-size);width:var(--alto-sem-text-body-md-font-size)}._aviosCurrencyStrikethrough-3xs_1gakm_191{height:.8px}._aviosCurrency-4xs_1gakm_195{font-size:var(--alto-sem-text-body-sm-font-size);font-weight:var(--alto-sem-text-heading-2xs-font-weight);letter-spacing:var(--alto-sem-text-body-sm-letter-spacing);line-height:var(--alto-sem-text-body-sm-line-height)}._aviosCurrency-4xs_1gakm_195 svg{height:var(--alto-sem-text-body-sm-font-size);width:var(--alto-sem-text-body-sm-font-size)}._aviosCurrencyStrikethrough-4xs_1gakm_207{height:.6px}._aviosCurrency-5xs_1gakm_211{font-size:var(--alto-sem-text-body-xs-font-size);font-weight:var(--alto-sem-text-heading-2xs-font-weight);letter-spacing:var(--alto-sem-text-body-xs-letter-spacing);line-height:var(--alto-sem-text-body-xs-line-height)}._aviosCurrency-5xs_1gakm_211 svg{height:var(--alto-sem-text-body-xs-font-size);width:var(--alto-sem-text-body-xs-font-size)}._aviosCurrencyStrikethrough-5xs_1gakm_223{height:.6px}
|
package/dist/assets/Field.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._fieldGrid_1ajki_1{display:grid;grid-template-columns:repeat(12,1fr)}._fieldError_1ajki_6{margin-top:var(--alto-sem-space-2xs)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._select_2fygw_1{color:var(--alto-sem-color-fg-primary);display:flex;flex-direction:column;font-style:normal;font-weight:var(--alto-sem-text-body-regular-font-weight);width:100%}._selectInput_2fygw_10{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--alto-sem-color-bg-base);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='20' fill='none' viewBox='0 0 18 20'%3E%3Cpath fill='%234B4855' d='M9.586 19.492c-.352.274-.86.274-1.172 0l-6.25-5c-.43-.312-.469-.898-.156-1.328.312-.39.898-.469 1.328-.117L9 17.578l5.664-4.531a.89.89 0 0 1 1.29.117c.312.43.273 1.016-.157 1.328l-6.25 5zm6.25-13.945c.39.312.469.898.117 1.289-.312.43-.898.469-1.289.156L9 2.461 3.336 6.992c-.43.313-1.016.274-1.328-.156-.313-.39-.274-.977.156-1.29l6.25-5c.313-.273.82-.273 1.172 0z'/%3E%3C/svg%3E");background-position:right var(--alto-sem-space-sm) center;background-repeat:no-repeat;border:1px solid var(--alto-sem-color-border-primary-default);border-radius:var(--alto-input-radius);color:var(--alto-sem-color-fg-primary);cursor:pointer;font-size:var(--alto-sem-text-body-md-font-size);letter-spacing:var(--alto-sem-text-body-md-letter-spacing);line-height:var(--alto-sem-text-body-md-line-height);padding:var(--alto-sem-space-xs) var(--alto-sem-space-sm)}._selectInput_2fygw_10 option[value=""][disabled]{color:var(--alto-sem-color-fg-secondary)}._selectInput_2fygw_10:-moz-placeholder
|
|
1
|
+
._select_2fygw_1{color:var(--alto-sem-color-fg-primary);display:flex;flex-direction:column;font-style:normal;font-weight:var(--alto-sem-text-body-regular-font-weight);width:100%}._selectInput_2fygw_10{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--alto-sem-color-bg-base);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='20' fill='none' viewBox='0 0 18 20'%3E%3Cpath fill='%234B4855' d='M9.586 19.492c-.352.274-.86.274-1.172 0l-6.25-5c-.43-.312-.469-.898-.156-1.328.312-.39.898-.469 1.328-.117L9 17.578l5.664-4.531a.89.89 0 0 1 1.29.117c.312.43.273 1.016-.157 1.328l-6.25 5zm6.25-13.945c.39.312.469.898.117 1.289-.312.43-.898.469-1.289.156L9 2.461 3.336 6.992c-.43.313-1.016.274-1.328-.156-.313-.39-.274-.977.156-1.29l6.25-5c.313-.273.82-.273 1.172 0z'/%3E%3C/svg%3E");background-position:right var(--alto-sem-space-sm) center;background-repeat:no-repeat;border:1px solid var(--alto-sem-color-border-primary-default);border-radius:var(--alto-input-radius);color:var(--alto-sem-color-fg-primary);cursor:pointer;font-size:var(--alto-sem-text-body-md-font-size);letter-spacing:var(--alto-sem-text-body-md-letter-spacing);line-height:var(--alto-sem-text-body-md-line-height);padding:var(--alto-sem-space-xs) var(--alto-sem-space-sm)}._selectInput_2fygw_10 option[value=""][disabled]{color:var(--alto-sem-color-fg-secondary)}._selectInput_2fygw_10:-moz-placeholder{color:var(--alto-sem-color-fg-secondary)}._selectInput_2fygw_10:placeholder-shown{color:var(--alto-sem-color-fg-secondary)}._select_2fygw_1[data-disabled] ._selectInput_2fygw_10{background-color:var(--alto-sem-color-bg-disabled-subtle);border:1px solid var(--alto-sem-color-border-disabled-subtle);color:var(--alto-sem-color-fg-disabled-on-subtle);cursor:not-allowed}._select_2fygw_1[data-invalid] ._selectInput_2fygw_10{border:2px solid var(--alto-sem-color-border-critical)}@-moz-document url-prefix(){._selectInput_2fygw_10{padding-right:var(--alto-sem-space-xl);text-indent:0;text-overflow:""}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { Disclosure, DisclosureGroup, Button, DisclosurePanel } from "react-aria-components";
|
|
4
4
|
import { Icon } from "../Icon/Icon.js";
|
|
5
5
|
import '../../assets/Accordion.css';const accordion = "_accordion_1m3lr_1";
|
|
@@ -58,8 +58,8 @@ const AccordionPanel = ({
|
|
|
58
58
|
children,
|
|
59
59
|
...props
|
|
60
60
|
}) => {
|
|
61
|
-
const contentRef =
|
|
62
|
-
|
|
61
|
+
const contentRef = React.useRef(null);
|
|
62
|
+
React.useEffect(() => {
|
|
63
63
|
const content = contentRef.current;
|
|
64
64
|
if (!content) return;
|
|
65
65
|
const group = content.closest('[role="group"]');
|
|
@@ -110,8 +110,8 @@ const AccordionGroup = ({
|
|
|
110
110
|
allowsMultipleExpanded = true
|
|
111
111
|
}) => {
|
|
112
112
|
const groupClasses = [styles.accordionGroup, className].filter(Boolean).join(" ");
|
|
113
|
-
const defaultExpandedKeys =
|
|
114
|
-
if (
|
|
113
|
+
const defaultExpandedKeys = React.Children.toArray(children).map((child, index) => {
|
|
114
|
+
if (React.isValidElement(child) && child.props.defaultExpanded) {
|
|
115
115
|
return `accordion-${index}`;
|
|
116
116
|
}
|
|
117
117
|
return null;
|
|
@@ -121,9 +121,9 @@ const AccordionGroup = ({
|
|
|
121
121
|
title,
|
|
122
122
|
description
|
|
123
123
|
] }),
|
|
124
|
-
/* @__PURE__ */ jsx(DisclosureGroup, { className: styles.accordionStack, allowsMultipleExpanded, defaultExpandedKeys, children:
|
|
125
|
-
if (
|
|
126
|
-
return
|
|
124
|
+
/* @__PURE__ */ jsx(DisclosureGroup, { className: styles.accordionStack, allowsMultipleExpanded, defaultExpandedKeys, children: React.Children.map(children, (child, index) => {
|
|
125
|
+
if (React.isValidElement(child)) {
|
|
126
|
+
return React.cloneElement(child, {
|
|
127
127
|
key: `accordion-${index}`,
|
|
128
128
|
id: `accordion-${index}`
|
|
129
129
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AviosCurrencySymbolProps } from '../AviosCurrencySymbol';
|
|
3
|
+
import { IconSize } from '../Icon/Icon';
|
|
4
|
+
export interface AviosCurrencyProps extends Omit<AviosCurrencySymbolProps, 'styleVariant'> {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* The style variant of the Avios currency
|
|
8
|
+
*/
|
|
9
|
+
styleVariant?: AviosCurrencySymbolProps['styleVariant'];
|
|
10
|
+
/**
|
|
11
|
+
* The size of the Avios currency
|
|
12
|
+
*/
|
|
13
|
+
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs' | '3xs' | '4xs' | '5xs';
|
|
14
|
+
/**
|
|
15
|
+
* Whether to display the currency name " Avios"
|
|
16
|
+
*/
|
|
17
|
+
hasCurrencyName?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The decorator to display
|
|
20
|
+
*/
|
|
21
|
+
decorator?: 'link' | 'dropdown';
|
|
22
|
+
/**
|
|
23
|
+
* Whether to display the Avios currency as a strikethrough
|
|
24
|
+
*/
|
|
25
|
+
isStrikethrough?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function getIconSize(size: AviosCurrencyProps['size']): IconSize;
|
|
28
|
+
export declare const AviosCurrency: ({ children, styleVariant, kind, size, hasCurrencyName, decorator, isStrikethrough, ...props }: AviosCurrencyProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default AviosCurrency;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
4
|
+
import { AviosCurrencySymbol } from "../AviosCurrencySymbol/AviosCurrencySymbol.js";
|
|
5
|
+
import { Icon } from "../Icon/Icon.js";
|
|
6
|
+
import '../../assets/AviosCurrency.css';const aviosCurrency$1 = "_aviosCurrency_1gakm_1";
|
|
7
|
+
const aviosCurrencyName = "_aviosCurrencyName_1gakm_9";
|
|
8
|
+
const aviosCurrencyStrikethrough$1 = "_aviosCurrencyStrikethrough_1gakm_13";
|
|
9
|
+
const styles = {
|
|
10
|
+
aviosCurrency: aviosCurrency$1,
|
|
11
|
+
aviosCurrencyName,
|
|
12
|
+
aviosCurrencyStrikethrough: aviosCurrencyStrikethrough$1,
|
|
13
|
+
"aviosCurrency-primary": "_aviosCurrency-primary_1gakm_27",
|
|
14
|
+
"aviosCurrencyStrikethrough-primary": "_aviosCurrencyStrikethrough-primary_1gakm_31",
|
|
15
|
+
"aviosCurrency-secondary": "_aviosCurrency-secondary_1gakm_35",
|
|
16
|
+
"aviosCurrencyStrikethrough-secondary": "_aviosCurrencyStrikethrough-secondary_1gakm_39",
|
|
17
|
+
"aviosCurrency-white": "_aviosCurrency-white_1gakm_43",
|
|
18
|
+
"aviosCurrencyStrikethrough-white": "_aviosCurrencyStrikethrough-white_1gakm_47",
|
|
19
|
+
"aviosCurrency-onSpend": "_aviosCurrency-onSpend_1gakm_51",
|
|
20
|
+
"aviosCurrencyStrikethrough-onSpend": "_aviosCurrencyStrikethrough-onSpend_1gakm_55",
|
|
21
|
+
"aviosCurrency-onCollect": "_aviosCurrency-onCollect_1gakm_59",
|
|
22
|
+
"aviosCurrencyStrikethrough-onCollect": "_aviosCurrencyStrikethrough-onCollect_1gakm_63",
|
|
23
|
+
"aviosCurrency-accentPrimary": "_aviosCurrency-accentPrimary_1gakm_67",
|
|
24
|
+
"aviosCurrencyStrikethrough-accentPrimary": "_aviosCurrencyStrikethrough-accentPrimary_1gakm_71",
|
|
25
|
+
"aviosCurrency-accentSecondary": "_aviosCurrency-accentSecondary_1gakm_75",
|
|
26
|
+
"aviosCurrencyStrikethrough-accentSecondary": "_aviosCurrencyStrikethrough-accentSecondary_1gakm_79",
|
|
27
|
+
"aviosCurrency-xl": "_aviosCurrency-xl_1gakm_83",
|
|
28
|
+
"aviosCurrencyStrikethrough-xl": "_aviosCurrencyStrikethrough-xl_1gakm_95",
|
|
29
|
+
"aviosCurrency-lg": "_aviosCurrency-lg_1gakm_99",
|
|
30
|
+
"aviosCurrencyStrikethrough-lg": "_aviosCurrencyStrikethrough-lg_1gakm_111",
|
|
31
|
+
"aviosCurrency-md": "_aviosCurrency-md_1gakm_115",
|
|
32
|
+
"aviosCurrencyStrikethrough-md": "_aviosCurrencyStrikethrough-md_1gakm_127",
|
|
33
|
+
"aviosCurrency-sm": "_aviosCurrency-sm_1gakm_131",
|
|
34
|
+
"aviosCurrencyStrikethrough-sm": "_aviosCurrencyStrikethrough-sm_1gakm_143",
|
|
35
|
+
"aviosCurrency-xs": "_aviosCurrency-xs_1gakm_147",
|
|
36
|
+
"aviosCurrencyStrikethrough-xs": "_aviosCurrencyStrikethrough-xs_1gakm_159",
|
|
37
|
+
"aviosCurrency-2xs": "_aviosCurrency-2xs_1gakm_163",
|
|
38
|
+
"aviosCurrencyStrikethrough-2xs": "_aviosCurrencyStrikethrough-2xs_1gakm_175",
|
|
39
|
+
"aviosCurrency-3xs": "_aviosCurrency-3xs_1gakm_179",
|
|
40
|
+
"aviosCurrencyStrikethrough-3xs": "_aviosCurrencyStrikethrough-3xs_1gakm_191",
|
|
41
|
+
"aviosCurrency-4xs": "_aviosCurrency-4xs_1gakm_195",
|
|
42
|
+
"aviosCurrencyStrikethrough-4xs": "_aviosCurrencyStrikethrough-4xs_1gakm_207",
|
|
43
|
+
"aviosCurrency-5xs": "_aviosCurrency-5xs_1gakm_211",
|
|
44
|
+
"aviosCurrencyStrikethrough-5xs": "_aviosCurrencyStrikethrough-5xs_1gakm_223"
|
|
45
|
+
};
|
|
46
|
+
const aviosCurrency = cva(styles.aviosCurrency, {
|
|
47
|
+
variants: {
|
|
48
|
+
styleVariant: {
|
|
49
|
+
primary: styles["aviosCurrency-primary"],
|
|
50
|
+
secondary: styles["aviosCurrency-secondary"],
|
|
51
|
+
white: styles["aviosCurrency-white"],
|
|
52
|
+
onSpend: styles["aviosCurrency-onSpend"],
|
|
53
|
+
onCollect: styles["aviosCurrency-onCollect"],
|
|
54
|
+
accentPrimary: styles["aviosCurrency-accentPrimary"],
|
|
55
|
+
accentSecondary: styles["aviosCurrency-accentSecondary"]
|
|
56
|
+
},
|
|
57
|
+
size: {
|
|
58
|
+
xl: styles["aviosCurrency-xl"],
|
|
59
|
+
lg: styles["aviosCurrency-lg"],
|
|
60
|
+
md: styles["aviosCurrency-md"],
|
|
61
|
+
sm: styles["aviosCurrency-sm"],
|
|
62
|
+
xs: styles["aviosCurrency-xs"],
|
|
63
|
+
"2xs": styles["aviosCurrency-2xs"],
|
|
64
|
+
"3xs": styles["aviosCurrency-3xs"],
|
|
65
|
+
"4xs": styles["aviosCurrency-4xs"],
|
|
66
|
+
"5xs": styles["aviosCurrency-5xs"]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
styleVariant: "accentSecondary"
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
function getIconSize(size) {
|
|
74
|
+
switch (size) {
|
|
75
|
+
case "sm":
|
|
76
|
+
return "0.75x";
|
|
77
|
+
case "2xs":
|
|
78
|
+
case "3xs":
|
|
79
|
+
case "4xs":
|
|
80
|
+
case "5xs":
|
|
81
|
+
return "0.5x";
|
|
82
|
+
default:
|
|
83
|
+
return "1x";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const aviosCurrencyStrikethrough = cva(styles.aviosCurrencyStrikethrough, {
|
|
87
|
+
variants: {
|
|
88
|
+
size: {
|
|
89
|
+
xl: styles["aviosCurrencyStrikethrough-xl"],
|
|
90
|
+
lg: styles["aviosCurrencyStrikethrough-lg"],
|
|
91
|
+
md: styles["aviosCurrencyStrikethrough-md"],
|
|
92
|
+
sm: styles["aviosCurrencyStrikethrough-sm"],
|
|
93
|
+
xs: styles["aviosCurrencyStrikethrough-xs"],
|
|
94
|
+
"2xs": styles["aviosCurrencyStrikethrough-2xs"],
|
|
95
|
+
"3xs": styles["aviosCurrencyStrikethrough-3xs"],
|
|
96
|
+
"4xs": styles["aviosCurrencyStrikethrough-4xs"],
|
|
97
|
+
"5xs": styles["aviosCurrencyStrikethrough-5xs"]
|
|
98
|
+
},
|
|
99
|
+
styleVariant: {
|
|
100
|
+
primary: styles["aviosCurrencyStrikethrough-primary"],
|
|
101
|
+
secondary: styles["aviosCurrencyStrikethrough-secondary"],
|
|
102
|
+
white: styles["aviosCurrencyStrikethrough-white"],
|
|
103
|
+
onSpend: styles["aviosCurrencyStrikethrough-onSpend"],
|
|
104
|
+
onCollect: styles["aviosCurrencyStrikethrough-onCollect"],
|
|
105
|
+
accentPrimary: styles["aviosCurrencyStrikethrough-accentPrimary"],
|
|
106
|
+
accentSecondary: styles["aviosCurrencyStrikethrough-accentSecondary"]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
defaultVariants: {
|
|
110
|
+
styleVariant: "accentSecondary",
|
|
111
|
+
size: "xl"
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const AviosCurrency = ({
|
|
115
|
+
children,
|
|
116
|
+
styleVariant = "accentSecondary",
|
|
117
|
+
kind = "balance",
|
|
118
|
+
size = "xl",
|
|
119
|
+
hasCurrencyName = false,
|
|
120
|
+
decorator,
|
|
121
|
+
isStrikethrough = false,
|
|
122
|
+
...props
|
|
123
|
+
}) => {
|
|
124
|
+
const {
|
|
125
|
+
isLink,
|
|
126
|
+
isDropdown
|
|
127
|
+
} = useMemo(() => {
|
|
128
|
+
if (decorator === "link") {
|
|
129
|
+
return {
|
|
130
|
+
isLink: true,
|
|
131
|
+
isDropdown: false
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
if (decorator === "dropdown") {
|
|
135
|
+
return {
|
|
136
|
+
isLink: false,
|
|
137
|
+
isDropdown: true
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
isLink: false,
|
|
142
|
+
isDropdown: false
|
|
143
|
+
};
|
|
144
|
+
}, [decorator]);
|
|
145
|
+
const iconSize = useMemo(() => getIconSize(size), [size]);
|
|
146
|
+
return /* @__PURE__ */ jsxs("span", { className: aviosCurrency({
|
|
147
|
+
styleVariant,
|
|
148
|
+
size
|
|
149
|
+
}), children: [
|
|
150
|
+
isStrikethrough && /* @__PURE__ */ jsx("span", { className: aviosCurrencyStrikethrough({
|
|
151
|
+
size,
|
|
152
|
+
styleVariant
|
|
153
|
+
}) }),
|
|
154
|
+
/* @__PURE__ */ jsx(AviosCurrencySymbol, { ...props, styleVariant, kind }),
|
|
155
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
156
|
+
isLink && /* @__PURE__ */ jsx(Icon, { iconName: "chevron-right", iconSize }),
|
|
157
|
+
isDropdown && /* @__PURE__ */ jsx(Icon, { iconName: "angles-up-down", iconSize }),
|
|
158
|
+
hasCurrencyName && /* @__PURE__ */ jsx("span", { className: styles["aviosCurrencyName"], children: "Avios" })
|
|
159
|
+
] });
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
AviosCurrency,
|
|
163
|
+
AviosCurrency as default,
|
|
164
|
+
getIconSize
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=AviosCurrency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AviosCurrency.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AviosCurrency';
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const aviosCurrencySymbol: (props?: ({
|
|
4
|
+
styleVariant?: "primary" | "secondary" | "accentPrimary" | "accentSecondary" | "white" | "onSpend" | "onCollect" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export type AviosCurrencySymbolVariants = VariantProps<typeof aviosCurrencySymbol>;
|
|
2
7
|
export type AviosCurrencySymbolKind = 'collect' | 'spend' | 'balance';
|
|
3
8
|
export type AviosCurrencySymbolStyleVariant = 'primary' | 'secondary' | 'white' | 'onSpend' | 'onCollect' | 'accentPrimary' | 'accentSecondary';
|
|
4
9
|
export interface AviosCurrencySymbolProps extends Omit<React.SVGProps<SVGSVGElement>, 'fill' | 'className' | 'style'> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { c as cva } from "../../index-
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
4
4
|
import '../../assets/AviosCurrencySymbol.css';const styles = {
|
|
5
5
|
"aviosCurrencySymbol-primary": "_aviosCurrencySymbol-primary_152jd_1",
|
|
6
6
|
"aviosCurrencySymbol-secondary": "_aviosCurrencySymbol-secondary_152jd_11",
|
|
@@ -51,7 +51,7 @@ const AviosCurrencySymbol = ({
|
|
|
51
51
|
"aria-label": ariaLabel,
|
|
52
52
|
...props
|
|
53
53
|
}) => {
|
|
54
|
-
const dimensions =
|
|
54
|
+
const dimensions = React.useMemo(() => {
|
|
55
55
|
if (width && height) {
|
|
56
56
|
return {
|
|
57
57
|
width,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as cva } from "../../index-
|
|
2
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
3
3
|
import { Icon } from "../Icon/Icon.js";
|
|
4
4
|
import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
|
|
5
5
|
import '../../assets/Badge.css';const badge$1 = "_badge_12fsq_1";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { c as cva } from "../../index-
|
|
2
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { useButton } from "@react-aria/button";
|
|
5
5
|
import { useObjectRef, mergeProps } from "@react-aria/utils";
|
|
@@ -66,9 +66,7 @@ const styles = {
|
|
|
66
66
|
whitePrimary,
|
|
67
67
|
whiteSecondary,
|
|
68
68
|
whiteTertiary,
|
|
69
|
-
whiteQuaternary
|
|
70
|
-
"fa-spinner-third": "_fa-spinner-third_9pg0y_544",
|
|
71
|
-
"icon-wrapper": "_icon-wrapper_9pg0y_549"
|
|
69
|
+
whiteQuaternary
|
|
72
70
|
};
|
|
73
71
|
const button = cva(styles.button, {
|
|
74
72
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { c as cva } from "../../index-
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
4
4
|
import '../../assets/ButtonGroup.css';const buttonGroup = "_buttonGroup_zcnod_2";
|
|
5
5
|
const alignStart = "_alignStart_zcnod_10";
|
|
6
6
|
const alignCenter = "_alignCenter_zcnod_14";
|
|
@@ -41,7 +41,7 @@ const ButtonGroup = ({
|
|
|
41
41
|
}) => {
|
|
42
42
|
return /* @__PURE__ */ jsx("div", { className: `${buttonGroupStyles({
|
|
43
43
|
align
|
|
44
|
-
})}`, role: "group", "aria-label": "Button Group", children:
|
|
44
|
+
})}`, role: "group", "aria-label": "Button Group", children: React.Children.map(children, (child) => child) });
|
|
45
45
|
};
|
|
46
46
|
export {
|
|
47
47
|
ButtonGroup,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { Icon } from "../Icon/Icon.js";
|
|
4
|
-
import { c as cva } from "../../index-
|
|
4
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
5
5
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
6
6
|
import '../../assets/CalloutBanner.css';const calloutBanner$1 = "_calloutBanner_kxqgt_1";
|
|
7
7
|
const calloutBanner__icon = "_calloutBanner__icon_kxqgt_12";
|
|
@@ -57,7 +57,7 @@ const CalloutBanner = ({
|
|
|
57
57
|
emphasis = "primary",
|
|
58
58
|
onDismiss
|
|
59
59
|
}) => {
|
|
60
|
-
const iconName =
|
|
60
|
+
const iconName = React.useMemo(() => {
|
|
61
61
|
switch (styleVariant) {
|
|
62
62
|
case "critical":
|
|
63
63
|
return "circle-exclamation";
|
|
@@ -70,7 +70,7 @@ const CalloutBanner = ({
|
|
|
70
70
|
default:
|
|
71
71
|
return "circle-exclamation";
|
|
72
72
|
}
|
|
73
|
-
}, [
|
|
73
|
+
}, [styleVariant]);
|
|
74
74
|
const hasOnDismiss = typeof onDismiss === "function";
|
|
75
75
|
return /* @__PURE__ */ jsxs("div", { className: calloutBanner({
|
|
76
76
|
emphasis,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as cva } from "../../index-
|
|
2
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import '../../assets/CardSection.css';const cardSection$1 = "_cardSection_1uwwa_1";
|
|
5
5
|
const cardContainer = "_cardContainer_1uwwa_12";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox as Checkbox$1 } from "react-aria-components";
|
|
3
|
-
import { c as cva } from "../../index-
|
|
3
|
+
import { c as cva } from "../../index-DdUYounA.js";
|
|
4
4
|
import FieldDescription from "../FieldDescription/FieldDescription.js";
|
|
5
5
|
import '../../assets/Checkbox.css';const checkbox$1 = "_checkbox_1twm2_2";
|
|
6
6
|
const checkboxContainer = "_checkboxContainer_1twm2_19";
|
|
@@ -2,24 +2,20 @@ 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
4
|
import '../../assets/CheckboxGroup.css';const checkboxGroup = "_checkboxGroup_1vs5o_1";
|
|
5
|
-
const errorMessage = "_errorMessage_1vs5o_8";
|
|
6
|
-
const description = "_description_1vs5o_13";
|
|
7
5
|
const styles = {
|
|
8
|
-
checkboxGroup
|
|
9
|
-
errorMessage,
|
|
10
|
-
description
|
|
6
|
+
checkboxGroup
|
|
11
7
|
};
|
|
12
8
|
const CheckboxGroup = ({
|
|
13
9
|
label,
|
|
14
10
|
children,
|
|
15
|
-
description
|
|
16
|
-
errorMessage
|
|
11
|
+
description,
|
|
12
|
+
errorMessage,
|
|
17
13
|
isDisabled,
|
|
18
14
|
isInvalid,
|
|
19
15
|
...props
|
|
20
16
|
}) => {
|
|
21
17
|
return /* @__PURE__ */ jsxs(CheckboxGroup$1, { className: styles.checkboxGroup, isDisabled, isInvalid, ...props, children: [
|
|
22
|
-
/* @__PURE__ */ jsx(FieldHeader, { label, description
|
|
18
|
+
/* @__PURE__ */ jsx(FieldHeader, { label, description, errorMessage, isRequired: true, isInvalid }),
|
|
23
19
|
children
|
|
24
20
|
] });
|
|
25
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as cva } from "../../index-
|
|
2
|
+
import { c as cva } from "../../index-DdUYounA.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { TextField, Input } from "react-aria-components";
|
|
4
|
-
import { P as PatternFormat } from "../../react-number-format.es-
|
|
4
|
+
import { P as PatternFormat } from "../../react-number-format.es-BjKL6crg.js";
|
|
5
5
|
import { Field } from "../_base/Field/Field.js";
|
|
6
6
|
import { Icon } from "../Icon/Icon.js";
|
|
7
7
|
import { getCardIcon } from "../../utils/creditCard/creditCard.js";
|
|
@@ -21,21 +21,21 @@ const CreditCardNumberField = ({
|
|
|
21
21
|
label = "Credit card number",
|
|
22
22
|
...props
|
|
23
23
|
}) => {
|
|
24
|
-
const [value, setValue] =
|
|
24
|
+
const [value, setValue] = React.useState(defaultValue);
|
|
25
25
|
const valueDefinitive = valueControlled ?? value;
|
|
26
|
-
const cardIcon =
|
|
26
|
+
const cardIcon = React.useMemo(() => {
|
|
27
27
|
if (typeof cardIconProp === "function") {
|
|
28
28
|
return cardIconProp(value) || "credit-card";
|
|
29
29
|
}
|
|
30
30
|
return cardIconProp || "credit-card";
|
|
31
31
|
}, [value, cardIconProp]);
|
|
32
|
-
return /* @__PURE__ */ jsx(Field, { className: styles.creditCardNumberField, as: TextField,
|
|
32
|
+
return /* @__PURE__ */ jsx(Field, { className: styles.creditCardNumberField, as: TextField, isRequired: true, hasEndIcon: true, ...props, children: /* @__PURE__ */ jsxs("div", { className: styles.inputWrapper, children: [
|
|
33
33
|
/* @__PURE__ */ jsx(PatternFormat, { type: "text", format: "#### #### #### ####", customInput: Input, placeholder: props == null ? void 0 : props.placeholder, allowEmptyFormatting: false, defaultValue, value: valueDefinitive, onValueChange: (values) => {
|
|
34
34
|
if (typeof onChangeControlled === "function") {
|
|
35
35
|
onChangeControlled(values.value);
|
|
36
36
|
}
|
|
37
37
|
setValue(values.value);
|
|
38
|
-
}, autoComplete: "cc-number" }),
|
|
38
|
+
}, autoComplete: "cc-number", "aria-label": label }),
|
|
39
39
|
/* @__PURE__ */ jsx(Icon, { iconName: cardIcon, iconPrefix: cardIcon === "credit-card" ? "fas" : "fab", className: styles.iconEnd, iconSize: "1.25x", padding: "roomy" })
|
|
40
40
|
] }) });
|
|
41
41
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { TextField, Input } from "react-aria-components";
|
|
4
|
-
import { P as PatternFormat } from "../../react-number-format.es-
|
|
4
|
+
import { P as PatternFormat } from "../../react-number-format.es-BjKL6crg.js";
|
|
5
5
|
import { Field } from "../_base/Field/Field.js";
|
|
6
6
|
import '../../assets/CreditCardSecurityCodeField.css';const creditCardSecurityCodeField = "_creditCardSecurityCodeField_14mb2_1";
|
|
7
7
|
const inputWrapper = "_inputWrapper_14mb2_11";
|
|
@@ -20,16 +20,16 @@ const CreditCardSecurityCodeField = ({
|
|
|
20
20
|
digits = 3,
|
|
21
21
|
...props
|
|
22
22
|
}) => {
|
|
23
|
-
const [value, setValue] =
|
|
23
|
+
const [value, setValue] = React.useState(defaultValue);
|
|
24
24
|
const valueDefinitive = valueControlled ?? value;
|
|
25
|
-
return /* @__PURE__ */ jsxs(Field, { className: styles.creditCardSecurityCodeField, as: TextField,
|
|
25
|
+
return /* @__PURE__ */ jsxs(Field, { className: styles.creditCardSecurityCodeField, as: TextField, isRequired: true, ...props, children: [
|
|
26
26
|
/* @__PURE__ */ jsxs("div", { className: styles.inputWrapper, children: [
|
|
27
27
|
/* @__PURE__ */ jsx(PatternFormat, { type: "text", format: `${"#".repeat(digits)}`, customInput: Input, placeholder: props == null ? void 0 : props.placeholder, defaultValue, value: valueDefinitive, onValueChange: (values) => {
|
|
28
28
|
if (typeof onChangeControlled === "function") {
|
|
29
29
|
onChangeControlled(values.value);
|
|
30
30
|
}
|
|
31
31
|
setValue(values.value);
|
|
32
|
-
}, autoComplete: "cc-csc" }),
|
|
32
|
+
}, autoComplete: "cc-csc", "aria-label": label }),
|
|
33
33
|
/* @__PURE__ */ jsx(CreditCardSecurityCodeIcon, { cardIcon })
|
|
34
34
|
] }),
|
|
35
35
|
(props == null ? void 0 : props.children) && /* @__PURE__ */ jsx("div", { className: styles.inputChildren, children: props.children })
|
|
@@ -126,6 +126,11 @@ class $3b62074eb05584b2$export$80ee6245ec4f29ec {
|
|
|
126
126
|
this.identifier = "gregory";
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
+
function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
|
|
130
|
+
var _a_isEqual, _b_isEqual;
|
|
131
|
+
var _a_isEqual1, _ref;
|
|
132
|
+
return (_ref = (_a_isEqual1 = (_a_isEqual = a.isEqual) === null || _a_isEqual === void 0 ? void 0 : _a_isEqual.call(a, b)) !== null && _a_isEqual1 !== void 0 ? _a_isEqual1 : (_b_isEqual = b.isEqual) === null || _b_isEqual === void 0 ? void 0 : _b_isEqual.call(b, a)) !== null && _ref !== void 0 ? _ref : a.identifier === b.identifier;
|
|
133
|
+
}
|
|
129
134
|
function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {
|
|
130
135
|
return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
|
|
131
136
|
}
|
|
@@ -260,7 +265,7 @@ function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
|
|
|
260
265
|
return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
261
266
|
}
|
|
262
267
|
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
|
|
263
|
-
if (date.calendar
|
|
268
|
+
if ($14e0f24ef4ac5c92$export$dbc69fd56b53d5e(date.calendar, calendar)) return date;
|
|
264
269
|
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
|
|
265
270
|
let copy = date.copy();
|
|
266
271
|
copy.calendar = calendar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateField.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -23,6 +23,11 @@ export interface DialogProps extends AriaDialogProps {
|
|
|
23
23
|
* Shows/hides the close (X) button in header
|
|
24
24
|
*/
|
|
25
25
|
hasDismissButton?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Text for the close button's tooltip and aria-label
|
|
28
|
+
* @default "Close dialog"
|
|
29
|
+
*/
|
|
30
|
+
dismissButtonLabel?: string;
|
|
26
31
|
/**
|
|
27
32
|
* ARIA role - use 'alertdialog' for important messages
|
|
28
33
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React, { useRef } from "react";
|
|
3
3
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
4
4
|
import { OverlayContainer, useOverlay, usePreventScroll, useModal } from "@react-aria/overlays";
|
|
5
5
|
import { useDialog } from "@react-aria/dialog";
|
|
@@ -45,6 +45,7 @@ function DialogWrapper({
|
|
|
45
45
|
size = "medium",
|
|
46
46
|
modal = false,
|
|
47
47
|
hasDismissButton = true,
|
|
48
|
+
dismissButtonLabel = "Close dialog",
|
|
48
49
|
role = "dialog",
|
|
49
50
|
id
|
|
50
51
|
} = props;
|
|
@@ -68,17 +69,13 @@ function DialogWrapper({
|
|
|
68
69
|
const {
|
|
69
70
|
modalProps
|
|
70
71
|
} = useModal();
|
|
71
|
-
const headerChild =
|
|
72
|
-
const otherChildren =
|
|
72
|
+
const headerChild = React.Children.toArray(children).find((child) => React.isValidElement(child) && child.type === DialogHeader);
|
|
73
|
+
const otherChildren = React.Children.toArray(children).filter((child) => !React.isValidElement(child) || child.type !== DialogHeader);
|
|
73
74
|
const hasHeader = Boolean(headerChild) || hasDismissButton;
|
|
74
75
|
const headerId = props["aria-labelledby"] || `${id}-header`;
|
|
75
76
|
const contentId = props["aria-describedby"] || `${id}-content`;
|
|
76
77
|
return /* @__PURE__ */ jsxs("div", { className: `${styles.dialogWrapper} ${modal ? styles.modal : ""}`, children: [
|
|
77
|
-
modal && /* @__PURE__ */ jsx("div", { className: styles.overlay, ...underlayProps, onClick: onClose,
|
|
78
|
-
if (e.key === "Enter" || e.key === "Space") {
|
|
79
|
-
onClose == null ? void 0 : onClose();
|
|
80
|
-
}
|
|
81
|
-
}, role: "button", tabIndex: 0 }),
|
|
78
|
+
modal && /* @__PURE__ */ jsx("div", { className: styles.overlay, ...underlayProps, onClick: onClose, "aria-hidden": "true" }),
|
|
82
79
|
/* @__PURE__ */ jsx(FocusScope, { contain: true, restoreFocus: true, autoFocus: false, children: /* @__PURE__ */ jsxs("div", { ...overlayProps, ...dialogProps, ...modalProps, ref, className: `${styles.dialog} ${styles[size]}`, "data-size": size, id, role, "aria-labelledby": headerId, "aria-describedby": contentId, children: [
|
|
83
80
|
/* @__PURE__ */ jsxs("div", { className: `${styles.dialogContent} ${!hasHeader ? styles.noHeader : ""}`, children: [
|
|
84
81
|
hasHeader && /* @__PURE__ */ jsx("div", { className: styles.dialogHeader, id: headerId, children: headerChild }),
|
|
@@ -88,7 +85,7 @@ function DialogWrapper({
|
|
|
88
85
|
iconName: "close",
|
|
89
86
|
iconPrefix: "far",
|
|
90
87
|
iconSize: "1x"
|
|
91
|
-
}, tooltipLabel:
|
|
88
|
+
}, tooltipLabel: dismissButtonLabel, "aria-label": dismissButtonLabel }) })
|
|
92
89
|
] }) })
|
|
93
90
|
] });
|
|
94
91
|
}
|