@bcgov/design-system-react-components 0.4.1-rc1 → 0.5.0-pr510
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 +23 -19
- package/dist/cjs/index.cjs +1649 -811
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/components/Accordion/Accordion.d.ts +6 -0
- package/dist/cjs/types/components/Accordion/index.d.ts +2 -0
- package/dist/cjs/types/components/AccordionGroup/AccordionGroup.d.ts +7 -0
- package/dist/cjs/types/components/AccordionGroup/index.d.ts +2 -0
- package/dist/cjs/types/components/Heading/Heading.d.ts +7 -0
- package/dist/cjs/types/components/Heading/index.d.ts +2 -0
- package/dist/cjs/types/components/Link/Link.d.ts +15 -0
- package/dist/cjs/types/components/Link/index.d.ts +2 -0
- package/dist/cjs/types/components/Text/Text.d.ts +8 -0
- package/dist/cjs/types/components/Text/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +5 -0
- package/dist/esm/index.js +1645 -812
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Accordion/Accordion.d.ts +6 -0
- package/dist/esm/types/components/Accordion/index.d.ts +2 -0
- package/dist/esm/types/components/AccordionGroup/AccordionGroup.d.ts +7 -0
- package/dist/esm/types/components/AccordionGroup/index.d.ts +2 -0
- package/dist/esm/types/components/Heading/Heading.d.ts +7 -0
- package/dist/esm/types/components/Heading/index.d.ts +2 -0
- package/dist/esm/types/components/Link/Link.d.ts +15 -0
- package/dist/esm/types/components/Link/index.d.ts +2 -0
- package/dist/esm/types/components/Text/Text.d.ts +8 -0
- package/dist/esm/types/components/Text/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +5 -0
- package/dist/index.d.ts +39 -2
- package/package.json +15 -15
package/dist/esm/index.js
CHANGED
|
@@ -29,11 +29,8 @@ function styleInject(css, ref) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var css_248z$m = "/**\n * Do not edit directly, this file was auto-generated.\n */\n\n:root {\n --surface-opacity-0: 0;\n --surface-opacity-10: 0.1;\n --surface-opacity-20: 0.2;\n --surface-opacity-30: 0.3;\n --surface-opacity-40: 0.4;\n --surface-opacity-50: 0.5;\n --surface-opacity-60: 0.6;\n --surface-opacity-70: 0.7;\n --surface-opacity-80: 0.8;\n --surface-opacity-90: 0.9;\n --surface-opacity-100: 1;\n --surface-shadow-none: 0 0.30000001192092896px 0.8999999761581421px 0 #0000001a, 0 1.600000023841858px 3.5999999046325684px 0 #00000021; /* Default shadow for most content and UI elements */\n --surface-shadow-small: 0 0.6000000238418579px 1.7999999523162842px 0 #0000001a, 0 3.200000047683716px 7.199999809265137px 0 #00000021; /* Reduced shadow for secondary UI elements */\n --surface-shadow-medium: 0 1.2000000476837158px 3.5999999046325684px 0 #0000001a, 0 6.400000095367432px 14.399999618530273px 0 #00000021; /* Standard shadow for UI elements like cards and buttons */\n --surface-shadow-large: 0 4.800000190734863px 14.399999618530273px 0 #0000002e, 0 25.600000381469727px 57.599998474121094px 0 #00000038; /* Larger shadow for emphasis. Use sparingly */\n --surface-color-primary-button-default: #013366; /* Default fill colour for primary buttons */\n --surface-color-primary-button-hover: #1E5189; /* Fill colour used when user hovers over primary button */\n --surface-color-primary-button-disabled: #EDEBE9; /* Fill colour for inactive primary buttons */\n --surface-color-primary-danger-button-default: #CE3E39; /* Default fill colour for buttons in danger/warning state */\n --surface-color-primary-danger-button-hover: #A2312D; /* Fill colour used when user hovers over danger/warning button */\n --surface-color-primary-danger-button-disabled: #EDEBE9; /* Default fill colour for disabled danger/warning button */\n --surface-color-primary-default: #013366; /* Default theme colour for components and layout */\n --surface-color-primary-hover: #1E5189; /* Hover variant of surface.color.primary.default */\n --surface-color-primary-pressed: #01264C; /* Selected/pressed variant of surface.color.primary.default */\n --surface-color-primary-disabled: #EDEBE9; /* Disabled/inactive variant of surface.color.primary default */\n --surface-color-secondary-button-default: #FFFFFF; /* Fill colour for secondary buttons */\n --surface-color-secondary-button-hover: #EDEBE9; /* Fill colour used when user hovers over secondary button */\n --surface-color-secondary-button-disabled: #EDEBE9; /* Fill colour for inactive secondary buttons */\n --surface-color-secondary-default: #FFFFFF; /* Light theme colour for components and layout */\n --surface-color-secondary-hover: #EDEBE9; /* Hover variant of surface.color.secondary.default */\n --surface-color-secondary-pressed: #E0DEDC; /* Selected/pressed variant of surface.color.secondary.default */\n --surface-color-secondary-disabled: #EDEBE9; /* Disabled/inactive variant of surface.color.secondary default */\n --surface-color-tertiary-button-default: rgba(255,255,255,0); /* Default fill colour for tertiary buttons */\n --surface-color-tertiary-button-hover: #ECEAE8; /* Fill colour used when user hovers over tertiary button */\n --surface-color-tertiary-button-disabled: #EDEBE9; /* Fill colour for inactive tertiary buttons */\n --surface-color-tertiary-default: #FFFFFF00; /* Alternative light theme colour for components and layout */\n --surface-color-tertiary-hover: #ECEAE8; /* Hover variant of surface.color.tertiary.default */\n --surface-color-tertiary-pressed: #E0DEDC; /* Selected/pressed variant of surface.color.tertiary.default */\n --surface-color-tertiary-disabled: #EDEBE9; /* Disabled/inactive variant of surface.color.tertiary default */\n --surface-color-menus-default: #FFFFFF; /* Default fill colour for menu items */\n --surface-color-menus-hover: #EDEBE9; /* Fill colour used when user hovers over a menu item */\n --surface-color-forms-default: #FFFFFF; /* Default fill colour for form/input fields */\n --surface-color-forms-disabled: #EDEBE9; /* Fill colour for inactive/disabled form/input fields */\n --surface-color-background-white: #FFFFFF; /* White background */\n --surface-color-background-light-gray: #FAF9F8; /* Default background colour for layout */\n --surface-color-background-light-blue: #F1F8FE; /* Light blue background */\n --surface-color-background-dark-blue: #053662; /* Dark blue background */\n --surface-color-border-default: #D8D8D8; /* Lighter border colour for UI elements */\n --surface-color-border-medium: #898785; /* Default border colour for UI elements */\n --surface-color-border-dark: #353433; /* Used as a hover colour for form fields and inputs */\n --surface-color-border-active: #2E5DD7; /* Used as the active stroke colour for UI elements */\n --surface-color-overlay-default: rgba(0,0,0,0.45); /* Background overlay colour for images and modal dialogues */\n --support-surface-color-info: #F7F9FC;\n --support-surface-color-danger: #F4E1E2; /* Background colour for error, failure or danger messages */\n --support-surface-color-success: #F6FFF8; /* Background colour for success messages */\n --support-surface-color-warning: #FEF1D8; /* Background colour for warning messages */\n --support-border-color-info: #053662; /* Border stroke for general/informational messages */\n --support-border-color-danger: #CE3E39; /* Border stroke for error, failure or danger messages */\n --support-border-color-success: #42814A; /* Border stroke for success messages */\n --support-border-color-warning: #F8BB47; /* Border stroke for warning messages */\n --icons-size-xsmall: 14px; /* Smallest icon size */\n --icons-size-small: 16px;\n --icons-size-medium: 20px; /* Default icon size */\n --icons-size-large: 24px;\n --icons-size-xlarge: 32px; /* Largest icon size */\n --icons-color-primary: #2D2D2D; /* Default colour for icons */\n --icons-color-secondary: #474543; /* Alternative colour for secondary/miscellaneous icons */\n --icons-color-disabled: #9F9D9C; /* Use only for inactive/disabled icons */\n --icons-color-link: #255A90; /* Use for hyperlinked icons */\n --icons-color-info: #053662; /* Emphasis colour for icons in general/informational state */\n --icons-color-danger: #CE3E39; /* Emphasis colour for icons in error, failure or danger state */\n --icons-color-success: #42814A; /* Emphasis colour for icons in success state */\n --icons-color-warning: #F8BB47; /* Emphasis colour for icons in warning state */\n --icons-color-primary-invert: #FFFFFF; /* Default colour for icons on dark backgrounds */\n --layout-border-width-none: 0;\n --layout-border-width-small: 1px;\n --layout-border-width-medium: 2px;\n --layout-border-width-large: 4px;\n --layout-padding-none: 0; /* No padding */\n --layout-padding-hair: 0.125rem; /* Smallest padding value for layout */\n --layout-padding-xsmall: 0.25rem;\n --layout-padding-small: 0.5rem;\n --layout-padding-medium: 1rem; /* Default padding value for layout */\n --layout-padding-large: 1.5rem;\n --layout-padding-xlarge: 2rem; /* Largest padding value for layout */\n --layout-margin-none: 0rem; /* No margin */\n --layout-margin-hair: 0.125rem; /* Smallest margin value for layout */\n --layout-margin-xsmall: 0.25rem;\n --layout-margin-small: 0.5rem; /* Default margin value for layout */\n --layout-margin-medium: 1rem;\n --layout-margin-large: 1.5rem;\n --layout-margin-xlarge: 2rem;\n --layout-margin-xxlarge: 2.5rem;\n --layout-margin-xxxlarge: 3rem;\n --layout-margin-huge: 3.5rem; /* Largest margin value for layout */\n --layout-border-radius-none: 0;\n --layout-border-radius-small: 2px;\n --layout-border-radius-medium: 4px;\n --layout-border-radius-large: 6px;\n --typography-font-families-bc-sans: 'BC Sans'; /* BC Sans font. Requires BC Sans package */\n --typography-line-heights-xxxdense: 1.125rem; /* Smallest line height */\n --typography-line-heights-xxdense: 1.313rem;\n --typography-line-heights-xdense: 1.688rem;\n --typography-line-heights-dense: 1.913rem;\n --typography-line-heights-regular: 2.125rem; /* Default line height */\n --typography-line-heights-sparse: 2.25rem;\n --typography-line-heights-xsparse: 3rem;\n --typography-line-heights-xxsparse: 3.375rem; /* Largest line height */\n --typography-line-heights-auto: AUTO; /* System token, used to generate type styles */\n --typography-font-weights-regular: 400; /* System token, used to generate text styles */\n --typography-font-weights-bold: 700; /* System token, used to generate text styles */\n --typography-font-weights-italic: Italic; /* DEPRECATED - will be removed in next major version. */\n --typography-font-weights-italic-weight: 400; /* System token, used to generate text styles */\n --typography-font-weights-italic-style: italic; /* System token, used to generate text styles */\n --typography-font-size-label: 0.75rem;\n --typography-font-size-small-body: 0.875rem;\n --typography-font-size-body: 1rem;\n --typography-font-size-large-body: 1.125rem;\n --typography-font-size-h5: 1.25rem;\n --typography-font-size-h4: 1.5rem;\n --typography-font-size-h3: 1.75rem;\n --typography-font-size-h2: 2rem;\n --typography-font-size-h1: 2.25rem;\n --typography-font-size-display: 3rem;\n --typography-letter-spacing-0: 0em; /* System token, used to generate type styles */\n --typography-paragraph-spacing-0: 0; /* System token, used to generate type styles */\n --typography-regular-label: 400 0.75rem/1.125rem 'BC Sans'; /* Labels and captions */\n --typography-regular-small-body: 400 0.875rem/1.313rem 'BC Sans'; /* Smaller body text */\n --typography-regular-body: 400 1rem/1.688rem 'BC Sans'; /* Default body text */\n --typography-regular-large-body: 400 1.125rem/1.913rem 'BC Sans'; /* Larger body text */\n --typography-regular-h6: 400 1.125rem/1.913rem 'BC Sans'; /* Alternate (unbolded) style for Heading 6 */\n --typography-regular-h5: 400 1.25rem/2.125rem 'BC Sans'; /* Alternate (unbolded) style for Heading 5 */\n --typography-regular-h4: 400 1.5rem/2.25rem 'BC Sans'; /* Alternate (unbolded) style for Heading 4 */\n --typography-regular-h3: 400 1.75rem/3rem 'BC Sans'; /* Alternate (unbolded) style for Heading 3 */\n --typography-regular-h2: 400 2rem/3.375rem 'BC Sans'; /* Alternate (unbolded) style for Heading 2 */\n --typography-regular-h1: 400 2.25rem/3rem 'BC Sans'; /* Alternate (unbolded) style for Heading 1 */\n --typography-regular-display: 400 3rem/AUTO 'BC Sans'; /* Extra-large body text size. Do not use for headings */\n --typography-bold-label: 700 0.75rem/1.125rem 'BC Sans'; /* Labels and captions (bolded) */\n --typography-bold-small-body: 700 0.875rem/1.313rem 'BC Sans'; /* Default for small body text (bolded) */\n --typography-bold-body: 700 1rem/1.688rem 'BC Sans'; /* Default for body text (bolded) */\n --typography-bold-large-body: 700 1.125rem/1.913rem 'BC Sans'; /* Larger text size for body text (bolded) */\n --typography-bold-h6: 700 1.125rem/1.913rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H6 */\n --typography-bold-h5: 700 1.25rem/2.125rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H5 */\n --typography-bold-h4: 700 1.5rem/2.25rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H4 */\n --typography-bold-h3: 700 1.75rem/3rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H3 */\n --typography-bold-h2: 700 2rem/3rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H2 */\n --typography-bold-h1: 700 2.25rem/3.375rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H1 */\n --typography-bold-display: 700 3rem/AUTO 'BC Sans'; /* Extra-large font size (bolded). Do not use for headings */\n --typography-italic-label: 400 italic 0.75rem/1.125rem 'BC Sans'; /* Labels and captions (italic) */\n --typography-italic-small-body: 400 italic 0.875rem/1.313rem 'BC Sans'; /* Small body text (italic) */\n --typography-italic-body: 400 italic 1rem/1.688rem 'BC Sans'; /* Default for body text (italic) */\n --typography-italic-large-body: 400 italic 1.125rem/1.913rem 'BC Sans'; /* Larger text size for body text (italic) */\n --typography-italic-h6: 400 italic 1.125rem/1.913rem 'BC Sans'; /* Alternate (italic) style for Heading 6 */\n --typography-italic-h5: 400 italic 1.25rem/2.125rem 'BC Sans'; /* Alternate (italic) style for Heading 5 */\n --typography-italic-h4: 400 italic 1.5rem/2.25rem 'BC Sans'; /* Alternate (italic) style for Heading 4 */\n --typography-italic-h3: 400 italic 1.75rem/3.375rem 'BC Sans'; /* Alternate (italic) style for Heading 3 */\n --typography-italic-h2: 400 italic 2rem/3rem 'BC Sans'; /* Alternate (italic) style for Heading 2 */\n --typography-italic-h1: 400 italic 2.25rem/3.375rem 'BC Sans'; /* Alternate (italic) style for Heading 1 */\n --typography-italic-display: 400 italic 3rem/AUTO 'BC Sans'; /* Extra-large font size (italic). Do not use for headings */\n --typography-text-case-none: none;\n --typography-text-decoration-none: none; /* System token, used to generate type styles */\n --typography-paragraph-indent-0: 0px; /* System token, used to generate type styles */\n --typography-color-primary: #2D2D2D; /* Default colour for all body text and headings */\n --typography-color-secondary: #474543; /* Alternative colour for secondary/miscellaneous text */\n --typography-color-placeholder: #9F9D9C; /* Use for placeholder text in forms */\n --typography-color-disabled: #9F9D9C; /* Use only for text in inactive user interface elements */\n --typography-color-link: #255A90; /* Use for hyperlinks in body text and headings */\n --typography-color-danger: #CE3E39; /* Use for error, failure or danger message text */\n --typography-color-primary-invert: #FFFFFF; /* Default colour for text on dark backgrounds */\n --typography-color-secondary-invert: #ECEAE8; /* Secondary colour for text on dark backgrounds */\n --theme-gold-10: #FEF8E8; /* Gold scale — lightest */\n --theme-gold-20: #FEF0D8; /* Gold scale */\n --theme-gold-30: #FDE9C4; /* Gold scale */\n --theme-gold-40: #FCE2B0; /* Gold scale */\n --theme-gold-50: #FBDA9D; /* Gold scale */\n --theme-gold-60: #FBD389; /* Gold scale */\n --theme-gold-70: #FACC75; /* Gold scale */\n --theme-gold-80: #F9C462; /* Gold scale */\n --theme-gold-90: #F8BA47; /* Gold scale */\n --theme-gold-100: #FCBA19; /* Gold scale — darkest */\n --theme-blue-10: #F1F8FE; /* Blue scale — lightest */\n --theme-blue-20: #D8EAFD; /* Blue scale */\n --theme-blue-30: #C1DDFC; /* Blue scale */\n --theme-blue-40: #A8D0FB; /* Blue scale */\n --theme-blue-50: #91C4FA; /* Blue scale */\n --theme-blue-60: #7AB8F9; /* Blue scale */\n --theme-blue-70: #5595D9; /* Blue scale */\n --theme-blue-80: #3470B1; /* Blue scale */\n --theme-blue-90: #1E5189; /* Blue scale */\n --theme-blue-100: #013366; /* Blue scale — darkest */\n --theme-gray-10: #FAF9F8; /* Greyscale — lightest */\n --theme-gray-20: #F3F2F1; /* Greyscale */\n --theme-gray-30: #ECEAE8; /* Greyscale */\n --theme-gray-40: #E0DEDC; /* Greyscale */\n --theme-gray-50: #D1CFCD; /* Greyscale */\n --theme-gray-60: #C6C5C3; /* Greyscale */\n --theme-gray-70: #9F9D9C; /* Greyscale */\n --theme-gray-80: #605E5C; /* Greyscale */\n --theme-gray-90: #3D3C3B; /* Greyscale */\n --theme-gray-100: #353433; /* Greyscale */\n --theme-gray-110: #252423; /* Greyscale — darkest */\n --theme-gray-white: #FFFFFF; /* White */\n --theme-primary-blue: #013366; /* Primary Blue (Blue 100) */\n --theme-primary-gold: #FCBA19; /* Primary Gold (Gold 100) */\n}\n";
|
|
33
|
-
styleInject(css_248z$
|
|
34
|
-
|
|
35
|
-
var css_248z$l = ".bcds-Alert-Banner {\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-around;\n width: 100%;\n padding: var(--layout-padding-none) var(--layout-padding-medium);\n}\n\n.bcds-Alert-Banner--Container {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-padding-medium);\n max-width: 1100px;\n padding: var(--layout-padding-small) var(--layout-padding-none);\n}\n\n.bcds-Alert-Banner--Icon {\n align-self: first baseline;\n justify-self: flex-start;\n padding-top: var(--layout-padding-xsmall);\n color: var(--icons-color-primary-invert);\n}\n\n.bcds-Alert-Banner--Content {\n display: inline-flex;\n gap: var(--layout-margin-medium);\n align-items: first baseline;\n flex-grow: 1;\n flex-wrap: wrap;\n font: var(--typography-regular-body);\n color: var(--typography-color-primary-invert);\n}\n\n.bcds-Alert-Banner--closeIcon {\n align-self: first baseline;\n}\n\n.bcds-Alert-Banner--closeIcon > .bcds-react-aria-Button[data-hovered] svg {\n color: var(--icons-color-primary);\n}\n\n.bcds-Alert-Banner--closeIcon svg {\n color: var(--icons-color-primary-invert);\n}\n\n/* Variants */\n\n/* Info theme */\n.bcds-Alert-Banner.info {\n background-color: var(--surface-color-background-dark-blue);\n}\n\n/* Success theme */\n.bcds-Alert-Banner.success {\n background-color: var(--support-border-color-success);\n}\n\n/* Warning theme */\n.bcds-Alert-Banner.warning {\n background-color: var(--support-border-color-warning);\n}\n\n.bcds-Alert-Banner.warning .bcds-Alert-Banner--Icon {\n color: var(--icons-color-primary);\n}\n\n.bcds-Alert-Banner.warning .bcds-Alert-Banner--Content {\n color: var(--typography-color-primary);\n}\n\n.bcds-Alert-Banner.warning .bcds-Alert-Banner--closeIcon svg {\n color: var(--icons-color-primary);\n}\n\n/* Danger theme */\n.bcds-Alert-Banner.danger {\n background-color: var(--support-border-color-danger);\n}\n\n/* Black theme */\n\n.bcds-Alert-Banner.black {\n background-color: var(--theme-gray-110);\n}\n";
|
|
36
|
-
styleInject(css_248z$l);
|
|
32
|
+
var css_248z$r = "/**\n * Do not edit directly, this file was auto-generated.\n */\n\n:root {\n --surface-opacity-0: 0;\n --surface-opacity-10: 0.1;\n --surface-opacity-20: 0.2;\n --surface-opacity-30: 0.3;\n --surface-opacity-40: 0.4;\n --surface-opacity-50: 0.5;\n --surface-opacity-60: 0.6;\n --surface-opacity-70: 0.7;\n --surface-opacity-80: 0.8;\n --surface-opacity-90: 0.9;\n --surface-opacity-100: 1;\n --surface-shadow-none: 0 0.30000001192092896px 0.8999999761581421px 0 #0000001a, 0 1.600000023841858px 3.5999999046325684px 0 #00000021; /* Default shadow for most content and UI elements */\n --surface-shadow-small: 0 0.6000000238418579px 1.7999999523162842px 0 #0000001a, 0 3.200000047683716px 7.199999809265137px 0 #00000021; /* Reduced shadow for secondary UI elements */\n --surface-shadow-medium: 0 1.2000000476837158px 3.5999999046325684px 0 #0000001a, 0 6.400000095367432px 14.399999618530273px 0 #00000021; /* Standard shadow for UI elements like cards and buttons */\n --surface-shadow-large: 0 4.800000190734863px 14.399999618530273px 0 #0000002e, 0 25.600000381469727px 57.599998474121094px 0 #00000038; /* Larger shadow for emphasis. Use sparingly */\n --surface-color-primary-button-default: #013366; /* Default fill colour for primary buttons */\n --surface-color-primary-button-hover: #1E5189; /* Fill colour used when user hovers over primary button */\n --surface-color-primary-button-disabled: #EDEBE9; /* Fill colour for inactive primary buttons */\n --surface-color-primary-danger-button-default: #CE3E39; /* Default fill colour for buttons in danger/warning state */\n --surface-color-primary-danger-button-hover: #A2312D; /* Fill colour used when user hovers over danger/warning button */\n --surface-color-primary-danger-button-disabled: #EDEBE9; /* Default fill colour for disabled danger/warning button */\n --surface-color-primary-default: #013366; /* Default theme colour for components and layout */\n --surface-color-primary-hover: #1E5189; /* Hover variant of surface.color.primary.default */\n --surface-color-primary-pressed: #01264C; /* Selected/pressed variant of surface.color.primary.default */\n --surface-color-primary-disabled: #EDEBE9; /* Disabled/inactive variant of surface.color.primary default */\n --surface-color-secondary-button-default: #FFFFFF; /* Fill colour for secondary buttons */\n --surface-color-secondary-button-hover: #EDEBE9; /* Fill colour used when user hovers over secondary button */\n --surface-color-secondary-button-disabled: #EDEBE9; /* Fill colour for inactive secondary buttons */\n --surface-color-secondary-default: #FFFFFF; /* Light theme colour for components and layout */\n --surface-color-secondary-hover: #EDEBE9; /* Hover variant of surface.color.secondary.default */\n --surface-color-secondary-pressed: #E0DEDC; /* Selected/pressed variant of surface.color.secondary.default */\n --surface-color-secondary-disabled: #EDEBE9; /* Disabled/inactive variant of surface.color.secondary default */\n --surface-color-tertiary-button-default: rgba(255,255,255,0); /* Default fill colour for tertiary buttons */\n --surface-color-tertiary-button-hover: #ECEAE8; /* Fill colour used when user hovers over tertiary button */\n --surface-color-tertiary-button-disabled: #EDEBE9; /* Fill colour for inactive tertiary buttons */\n --surface-color-tertiary-default: #FFFFFF00; /* Alternative light theme colour for components and layout */\n --surface-color-tertiary-hover: #ECEAE8; /* Hover variant of surface.color.tertiary.default */\n --surface-color-tertiary-pressed: #E0DEDC; /* Selected/pressed variant of surface.color.tertiary.default */\n --surface-color-tertiary-disabled: #EDEBE9; /* Disabled/inactive variant of surface.color.tertiary default */\n --surface-color-menus-default: #FFFFFF; /* Default fill colour for menu items */\n --surface-color-menus-hover: #EDEBE9; /* Fill colour used when user hovers over a menu item */\n --surface-color-forms-default: #FFFFFF; /* Default fill colour for form/input fields */\n --surface-color-forms-disabled: #EDEBE9; /* Fill colour for inactive/disabled form/input fields */\n --surface-color-background-white: #FFFFFF; /* White background */\n --surface-color-background-light-gray: #FAF9F8; /* Default background colour for layout */\n --surface-color-background-light-blue: #F1F8FE; /* Light blue background */\n --surface-color-background-dark-blue: #053662; /* Dark blue background */\n --surface-color-border-default: #D8D8D8; /* Lighter border colour for UI elements */\n --surface-color-border-medium: #898785; /* Default border colour for UI elements */\n --surface-color-border-dark: #353433; /* Used as a hover colour for form fields and inputs */\n --surface-color-border-active: #2E5DD7; /* Used as the active stroke colour for UI elements */\n --surface-color-overlay-default: rgba(0,0,0,0.45); /* Background overlay colour for images and modal dialogues */\n --support-surface-color-info: #F7F9FC;\n --support-surface-color-danger: #F4E1E2; /* Background colour for error, failure or danger messages */\n --support-surface-color-success: #F6FFF8; /* Background colour for success messages */\n --support-surface-color-warning: #FEF1D8; /* Background colour for warning messages */\n --support-border-color-info: #053662; /* Border stroke for general/informational messages */\n --support-border-color-danger: #CE3E39; /* Border stroke for error, failure or danger messages */\n --support-border-color-success: #42814A; /* Border stroke for success messages */\n --support-border-color-warning: #F8BB47; /* Border stroke for warning messages */\n --icons-size-xsmall: 14px; /* Smallest icon size */\n --icons-size-small: 16px;\n --icons-size-medium: 20px; /* Default icon size */\n --icons-size-large: 24px;\n --icons-size-xlarge: 32px; /* Largest icon size */\n --icons-color-primary: #2D2D2D; /* Default colour for icons */\n --icons-color-secondary: #474543; /* Alternative colour for secondary/miscellaneous icons */\n --icons-color-disabled: #9F9D9C; /* Use only for inactive/disabled icons */\n --icons-color-link: #255A90; /* Use for hyperlinked icons */\n --icons-color-info: #053662; /* Emphasis colour for icons in general/informational state */\n --icons-color-danger: #CE3E39; /* Emphasis colour for icons in error, failure or danger state */\n --icons-color-success: #42814A; /* Emphasis colour for icons in success state */\n --icons-color-warning: #F8BB47; /* Emphasis colour for icons in warning state */\n --icons-color-primary-invert: #FFFFFF; /* Default colour for icons on dark backgrounds */\n --layout-border-width-none: 0;\n --layout-border-width-small: 1px;\n --layout-border-width-medium: 2px;\n --layout-border-width-large: 4px;\n --layout-padding-none: 0; /* No padding */\n --layout-padding-hair: 0.125rem; /* Smallest padding value for layout */\n --layout-padding-xsmall: 0.25rem;\n --layout-padding-small: 0.5rem;\n --layout-padding-medium: 1rem; /* Default padding value for layout */\n --layout-padding-large: 1.5rem;\n --layout-padding-xlarge: 2rem; /* Largest padding value for layout */\n --layout-margin-none: 0rem; /* No margin */\n --layout-margin-hair: 0.125rem; /* Smallest margin value for layout */\n --layout-margin-xsmall: 0.25rem;\n --layout-margin-small: 0.5rem; /* Default margin value for layout */\n --layout-margin-medium: 1rem;\n --layout-margin-large: 1.5rem;\n --layout-margin-xlarge: 2rem;\n --layout-margin-xxlarge: 2.5rem;\n --layout-margin-xxxlarge: 3rem;\n --layout-margin-huge: 3.5rem; /* Largest margin value for layout */\n --layout-border-radius-none: 0;\n --layout-border-radius-small: 2px;\n --layout-border-radius-medium: 4px;\n --layout-border-radius-large: 6px;\n --layout-border-radius-circular: 9999px; /* Used for components with a circular radius */\n --typography-font-families-bc-sans: 'BC Sans'; /* BC Sans font. Requires BC Sans package */\n --typography-line-heights-xxxdense: 1.125rem; /* Smallest line height */\n --typography-line-heights-xxdense: 1.313rem;\n --typography-line-heights-xdense: 1.688rem;\n --typography-line-heights-dense: 1.913rem;\n --typography-line-heights-regular: 2.125rem; /* Default line height */\n --typography-line-heights-sparse: 2.25rem;\n --typography-line-heights-xsparse: 3rem;\n --typography-line-heights-xxsparse: 3.375rem; /* Largest line height */\n --typography-line-heights-auto: AUTO; /* System token, used to generate type styles */\n --typography-font-weights-regular: 400; /* System token, used to generate text styles */\n --typography-font-weights-bold: 700; /* System token, used to generate text styles */\n --typography-font-weights-italic-weight: 400; /* System token, used to generate text styles */\n --typography-font-weights-italic-style: italic; /* System token, used to generate text styles */\n --typography-font-size-label: 0.75rem;\n --typography-font-size-small-body: 0.875rem;\n --typography-font-size-body: 1rem;\n --typography-font-size-large-body: 1.125rem;\n --typography-font-size-h5: 1.25rem;\n --typography-font-size-h4: 1.5rem;\n --typography-font-size-h3: 1.75rem;\n --typography-font-size-h2: 2rem;\n --typography-font-size-h1: 2.25rem;\n --typography-font-size-display: 3rem;\n --typography-letter-spacing-0: 0em; /* System token, used to generate type styles */\n --typography-paragraph-spacing-0: 0; /* System token, used to generate type styles */\n --typography-regular-label: 400 0.75rem/1.125rem 'BC Sans'; /* Labels and captions */\n --typography-regular-small-body: 400 0.875rem/1.313rem 'BC Sans'; /* Smaller body text */\n --typography-regular-body: 400 1rem/1.688rem 'BC Sans'; /* Default body text */\n --typography-regular-large-body: 400 1.125rem/1.913rem 'BC Sans'; /* Larger body text */\n --typography-regular-h6: 400 1.125rem/1.913rem 'BC Sans'; /* Alternate (unbolded) style for Heading 6 */\n --typography-regular-h5: 400 1.25rem/2.125rem 'BC Sans'; /* Alternate (unbolded) style for Heading 5 */\n --typography-regular-h4: 400 1.5rem/2.25rem 'BC Sans'; /* Alternate (unbolded) style for Heading 4 */\n --typography-regular-h3: 400 1.75rem/3rem 'BC Sans'; /* Alternate (unbolded) style for Heading 3 */\n --typography-regular-h2: 400 2rem/3.375rem 'BC Sans'; /* Alternate (unbolded) style for Heading 2 */\n --typography-regular-h1: 400 2.25rem/3rem 'BC Sans'; /* Alternate (unbolded) style for Heading 1 */\n --typography-regular-display: 400 3rem/AUTO 'BC Sans'; /* Extra-large body text size. Do not use for headings */\n --typography-bold-label: 700 0.75rem/1.125rem 'BC Sans'; /* Labels and captions (bolded) */\n --typography-bold-small-body: 700 0.875rem/1.313rem 'BC Sans'; /* Default for small body text (bolded) */\n --typography-bold-body: 700 1rem/1.688rem 'BC Sans'; /* Default for body text (bolded) */\n --typography-bold-large-body: 700 1.125rem/1.913rem 'BC Sans'; /* Larger text size for body text (bolded) */\n --typography-bold-h6: 700 1.125rem/1.913rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H6 */\n --typography-bold-h5: 700 1.25rem/2.125rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H5 */\n --typography-bold-h4: 700 1.5rem/2.25rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H4 */\n --typography-bold-h3: 700 1.75rem/3rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H3 */\n --typography-bold-h2: 700 2rem/3rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H2 */\n --typography-bold-h1: 700 2.25rem/3.375rem 'BC Sans'; /* Default style for Heading 6. Includes all sizing/spacing values for H1 */\n --typography-bold-display: 700 3rem/AUTO 'BC Sans'; /* Extra-large font size (bolded). Do not use for headings */\n --typography-italic-label: 400 italic 0.75rem/1.125rem 'BC Sans'; /* Labels and captions (italic) */\n --typography-italic-small-body: 400 italic 0.875rem/1.313rem 'BC Sans'; /* Small body text (italic) */\n --typography-italic-body: 400 italic 1rem/1.688rem 'BC Sans'; /* Default for body text (italic) */\n --typography-italic-large-body: 400 italic 1.125rem/1.913rem 'BC Sans'; /* Larger text size for body text (italic) */\n --typography-italic-h6: 400 italic 1.125rem/1.913rem 'BC Sans'; /* Alternate (italic) style for Heading 6 */\n --typography-italic-h5: 400 italic 1.25rem/2.125rem 'BC Sans'; /* Alternate (italic) style for Heading 5 */\n --typography-italic-h4: 400 italic 1.5rem/2.25rem 'BC Sans'; /* Alternate (italic) style for Heading 4 */\n --typography-italic-h3: 400 italic 1.75rem/3.375rem 'BC Sans'; /* Alternate (italic) style for Heading 3 */\n --typography-italic-h2: 400 italic 2rem/3rem 'BC Sans'; /* Alternate (italic) style for Heading 2 */\n --typography-italic-h1: 400 italic 2.25rem/3.375rem 'BC Sans'; /* Alternate (italic) style for Heading 1 */\n --typography-italic-display: 400 italic 3rem/AUTO 'BC Sans'; /* Extra-large font size (italic). Do not use for headings */\n --typography-text-case-none: none;\n --typography-text-decoration-none: none; /* System token, used to generate type styles */\n --typography-paragraph-indent-0: 0px; /* System token, used to generate type styles */\n --typography-color-primary: #2D2D2D; /* Default colour for all body text and headings */\n --typography-color-secondary: #474543; /* Alternative colour for secondary/miscellaneous text */\n --typography-color-placeholder: #9F9D9C; /* Use for placeholder text in forms */\n --typography-color-disabled: #9F9D9C; /* Use only for text in inactive user interface elements */\n --typography-color-link: #255A90; /* Use for hyperlinks in body text and headings */\n --typography-color-danger: #CE3E39; /* Use for error, failure or danger message text */\n --typography-color-primary-invert: #FFFFFF; /* Default colour for text on dark backgrounds */\n --typography-color-secondary-invert: #ECEAE8; /* Secondary colour for text on dark backgrounds */\n --theme-gold-10: #FEF8E8; /* Gold scale — lightest */\n --theme-gold-20: #FEF0D8; /* Gold scale */\n --theme-gold-30: #FDE9C4; /* Gold scale */\n --theme-gold-40: #FCE2B0; /* Gold scale */\n --theme-gold-50: #FBDA9D; /* Gold scale */\n --theme-gold-60: #FBD389; /* Gold scale */\n --theme-gold-70: #FACC75; /* Gold scale */\n --theme-gold-80: #F9C462; /* Gold scale */\n --theme-gold-90: #F8BA47; /* Gold scale */\n --theme-gold-100: #FCBA19; /* Gold scale — darkest */\n --theme-blue-10: #F1F8FE; /* Blue scale — lightest */\n --theme-blue-20: #D8EAFD; /* Blue scale */\n --theme-blue-30: #C1DDFC; /* Blue scale */\n --theme-blue-40: #A8D0FB; /* Blue scale */\n --theme-blue-50: #91C4FA; /* Blue scale */\n --theme-blue-60: #7AB8F9; /* Blue scale */\n --theme-blue-70: #5595D9; /* Blue scale */\n --theme-blue-80: #3470B1; /* Blue scale */\n --theme-blue-90: #1E5189; /* Blue scale */\n --theme-blue-100: #013366; /* Blue scale — darkest */\n --theme-gray-10: #FAF9F8; /* Greyscale — lightest */\n --theme-gray-20: #F3F2F1; /* Greyscale */\n --theme-gray-30: #ECEAE8; /* Greyscale */\n --theme-gray-40: #E0DEDC; /* Greyscale */\n --theme-gray-50: #D1CFCD; /* Greyscale */\n --theme-gray-60: #C6C5C3; /* Greyscale */\n --theme-gray-70: #9F9D9C; /* Greyscale */\n --theme-gray-80: #605E5C; /* Greyscale */\n --theme-gray-90: #3D3C3B; /* Greyscale */\n --theme-gray-100: #353433; /* Greyscale */\n --theme-gray-110: #252423; /* Greyscale — darkest */\n --theme-gray-white: #FFFFFF; /* White */\n --theme-primary-blue: #013366; /* Primary Blue (Blue 100) */\n --theme-primary-gold: #FCBA19; /* Primary Gold (Gold 100) */\n}\n";
|
|
33
|
+
styleInject(css_248z$r);
|
|
37
34
|
|
|
38
35
|
/*
|
|
39
36
|
* Copyright 2024 Adobe. All rights reserved.
|
|
@@ -390,11 +387,8 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
|
|
|
390
387
|
setAttributeNS() {}
|
|
391
388
|
removeAttribute() {}
|
|
392
389
|
constructor(type, ownerDocument){
|
|
393
|
-
super(ownerDocument)
|
|
394
|
-
this.
|
|
395
|
-
;
|
|
396
|
-
this._index = 0;
|
|
397
|
-
this.hasSetProps = false;
|
|
390
|
+
super(ownerDocument), this.nodeType = 8 // COMMENT_NODE (we'd use ELEMENT_NODE but React DevTools will fail to get its dimensions)
|
|
391
|
+
, this._index = 0, this.hasSetProps = false;
|
|
398
392
|
this.node = new ($23b9f4fcf0fe224b$export$d68d59712b04d9d1)(type, `react-aria-${++ownerDocument.nodeId}`);
|
|
399
393
|
// Start a transaction so that no updates are emitted from the collection
|
|
400
394
|
// until the props for this node are set. We don't know the real id for the
|
|
@@ -490,18 +484,8 @@ class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export
|
|
|
490
484
|
}
|
|
491
485
|
constructor(collection){
|
|
492
486
|
// @ts-ignore
|
|
493
|
-
super(null)
|
|
494
|
-
this.
|
|
495
|
-
;
|
|
496
|
-
this.ownerDocument = this;
|
|
497
|
-
this.dirtyNodes = new Set();
|
|
498
|
-
this.isSSR = false;
|
|
499
|
-
this.nodeId = 0;
|
|
500
|
-
this.nodesByProps = new WeakMap();
|
|
501
|
-
this.isMounted = true;
|
|
502
|
-
this.mutatedNodes = new Set();
|
|
503
|
-
this.subscriptions = new Set();
|
|
504
|
-
this.transactionCount = 0;
|
|
487
|
+
super(null), this.nodeType = 11 // DOCUMENT_FRAGMENT_NODE
|
|
488
|
+
, this.ownerDocument = this, this.dirtyNodes = new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = new WeakMap(), this.isMounted = true, this.mutatedNodes = new Set(), this.subscriptions = new Set(), this.transactionCount = 0;
|
|
505
489
|
this.collection = collection;
|
|
506
490
|
this.collectionMutated = true;
|
|
507
491
|
}
|
|
@@ -533,9 +517,7 @@ function $e948873055cbafe4$export$727c8fc270210f13(props) {
|
|
|
533
517
|
var _rendered_props_id, _ref;
|
|
534
518
|
// @ts-ignore
|
|
535
519
|
let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== void 0 ? _rendered_props_id : item.key) !== null && _ref !== void 0 ? _ref : item.id;
|
|
536
|
-
// eslint-disable-next-line max-depth
|
|
537
520
|
if (key == null) throw new Error('Could not determine key for item');
|
|
538
|
-
// eslint-disable-next-line max-depth
|
|
539
521
|
if (idScope) key = idScope + ':' + key;
|
|
540
522
|
// Note: only works if wrapped Item passes through id...
|
|
541
523
|
rendered = (cloneElement)(rendered, addIdAndValue ? {
|
|
@@ -635,7 +617,6 @@ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
|
635
617
|
return defaultId || `${prefix}-${counter}`;
|
|
636
618
|
}
|
|
637
619
|
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
|
|
638
|
-
// @ts-ignore
|
|
639
620
|
let id = ($dbSRa$react).useId();
|
|
640
621
|
let [didSSR] = (useState)($b5e257d569688ac6$export$535bd6ca7f90a273());
|
|
641
622
|
let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
|
|
@@ -830,7 +811,16 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
|
830
811
|
let updateValue = (useCallback)((val)=>{
|
|
831
812
|
nextId.current = val;
|
|
832
813
|
}, []);
|
|
833
|
-
if ($bdb11010cef70236$var$canUseDOM)
|
|
814
|
+
if ($bdb11010cef70236$var$canUseDOM) {
|
|
815
|
+
// TS not smart enough to know that `has` means the value exists
|
|
816
|
+
if ($bdb11010cef70236$var$idsUpdaterMap.has(res) && !$bdb11010cef70236$var$idsUpdaterMap.get(res).includes(updateValue)) $bdb11010cef70236$var$idsUpdaterMap.set(res, [
|
|
817
|
+
...$bdb11010cef70236$var$idsUpdaterMap.get(res),
|
|
818
|
+
updateValue
|
|
819
|
+
]);
|
|
820
|
+
else $bdb11010cef70236$var$idsUpdaterMap.set(res, [
|
|
821
|
+
updateValue
|
|
822
|
+
]);
|
|
823
|
+
}
|
|
834
824
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
835
825
|
let r = res;
|
|
836
826
|
return ()=>{
|
|
@@ -852,14 +842,14 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
|
852
842
|
}
|
|
853
843
|
function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
|
|
854
844
|
if (idA === idB) return idA;
|
|
855
|
-
let
|
|
856
|
-
if (
|
|
857
|
-
|
|
845
|
+
let setIdsA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);
|
|
846
|
+
if (setIdsA) {
|
|
847
|
+
setIdsA.forEach((fn)=>fn(idB));
|
|
858
848
|
return idB;
|
|
859
849
|
}
|
|
860
|
-
let
|
|
861
|
-
if (
|
|
862
|
-
|
|
850
|
+
let setIdsB = $bdb11010cef70236$var$idsUpdaterMap.get(idB);
|
|
851
|
+
if (setIdsB) {
|
|
852
|
+
setIdsB.forEach((fn)=>fn(idA));
|
|
863
853
|
return idA;
|
|
864
854
|
}
|
|
865
855
|
return idB;
|
|
@@ -1038,7 +1028,7 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
|
1038
1028
|
return true;
|
|
1039
1029
|
}
|
|
1040
1030
|
});
|
|
1041
|
-
} catch
|
|
1031
|
+
} catch {
|
|
1042
1032
|
// Ignore
|
|
1043
1033
|
}
|
|
1044
1034
|
}
|
|
@@ -1146,6 +1136,14 @@ const $ea8dcbcb9ea1b556$var$RouterContext = /*#__PURE__*/ (createContext)({
|
|
|
1146
1136
|
function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
|
|
1147
1137
|
return (useContext)($ea8dcbcb9ea1b556$var$RouterContext);
|
|
1148
1138
|
}
|
|
1139
|
+
function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
|
|
1140
|
+
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
|
|
1141
|
+
let target = link.getAttribute('target');
|
|
1142
|
+
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac)
|
|
1143
|
+
!modifiers.ctrlKey && // open in new tab (windows)
|
|
1144
|
+
!modifiers.altKey && // download
|
|
1145
|
+
!modifiers.shiftKey;
|
|
1146
|
+
}
|
|
1149
1147
|
function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
|
|
1150
1148
|
var _window_event_type, _window_event;
|
|
1151
1149
|
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
|
|
@@ -1200,8 +1198,10 @@ function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
|
|
|
1200
1198
|
}
|
|
1201
1199
|
function $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(props) {
|
|
1202
1200
|
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
1201
|
+
var _props_href;
|
|
1202
|
+
const href = router.useHref((_props_href = props.href) !== null && _props_href !== void 0 ? _props_href : '');
|
|
1203
1203
|
return {
|
|
1204
|
-
'data-href': props.href ?
|
|
1204
|
+
'data-href': props.href ? href : undefined,
|
|
1205
1205
|
'data-target': props.target,
|
|
1206
1206
|
'data-rel': props.rel,
|
|
1207
1207
|
'data-download': props.download,
|
|
@@ -1211,8 +1211,10 @@ function $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(props) {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
|
|
1213
1213
|
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
1214
|
+
var _props_href;
|
|
1215
|
+
const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : '');
|
|
1214
1216
|
return {
|
|
1215
|
-
href: (props === null || props === void 0 ? void 0 : props.href) ?
|
|
1217
|
+
href: (props === null || props === void 0 ? void 0 : props.href) ? href : undefined,
|
|
1216
1218
|
target: props === null || props === void 0 ? void 0 : props.target,
|
|
1217
1219
|
rel: props === null || props === void 0 ? void 0 : props.rel,
|
|
1218
1220
|
download: props === null || props === void 0 ? void 0 : props.download,
|
|
@@ -1335,7 +1337,6 @@ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
|
|
|
1335
1337
|
}, [
|
|
1336
1338
|
removeGlobalListener
|
|
1337
1339
|
]);
|
|
1338
|
-
// eslint-disable-next-line arrow-body-style
|
|
1339
1340
|
(useEffect)(()=>{
|
|
1340
1341
|
return removeAllGlobalListeners;
|
|
1341
1342
|
}, [
|
|
@@ -1502,6 +1503,7 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
|
1502
1503
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1503
1504
|
* governing permissions and limitations under the License.
|
|
1504
1505
|
*/ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
1506
|
+
if (!node) return false;
|
|
1505
1507
|
let style = window.getComputedStyle(node);
|
|
1506
1508
|
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
1507
1509
|
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
@@ -1558,7 +1560,6 @@ function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
|
|
|
1558
1560
|
* governing permissions and limitations under the License.
|
|
1559
1561
|
*/
|
|
1560
1562
|
|
|
1561
|
-
// @ts-ignore
|
|
1562
1563
|
let $5df64b3807dc15ee$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
1563
1564
|
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
1564
1565
|
let isSSR = ($b5e257d569688ac6$export$535bd6ca7f90a273)();
|
|
@@ -1723,7 +1724,7 @@ function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
|
|
|
1723
1724
|
return sum;
|
|
1724
1725
|
}
|
|
1725
1726
|
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
1726
|
-
if (document.contains(targetElement)) {
|
|
1727
|
+
if (targetElement && document.contains(targetElement)) {
|
|
1727
1728
|
let root = document.scrollingElement || document.documentElement;
|
|
1728
1729
|
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
|
|
1729
1730
|
// If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
|
|
@@ -2400,10 +2401,6 @@ function $e1995378a142960e$var$CollectionRoot({ children: children }) {
|
|
|
2400
2401
|
*/
|
|
2401
2402
|
|
|
2402
2403
|
const $7135fc7d473fd974$export$d40e14dec8b060a8 = /*#__PURE__*/ (createContext)(null);
|
|
2403
|
-
const $7135fc7d473fd974$export$6e2c8f0811a474ce = /*#__PURE__*/ ($e1995378a142960e$export$e953bb1cd0f19726)('section', (props, ref, section)=>{
|
|
2404
|
-
let { render: render } = (useContext)($7135fc7d473fd974$export$d40e14dec8b060a8);
|
|
2405
|
-
return render(props, ref, section);
|
|
2406
|
-
});
|
|
2407
2404
|
const $7135fc7d473fd974$export$a164736487e3f0ae = {
|
|
2408
2405
|
CollectionRoot ({ collection: collection, renderDropIndicator: renderDropIndicator }) {
|
|
2409
2406
|
return $7135fc7d473fd974$var$useCollectionRender(collection, null, renderDropIndicator);
|
|
@@ -2662,7 +2659,6 @@ let $14c0b72509d70225$var$modifiedElementMap = new WeakMap();
|
|
|
2662
2659
|
function $14c0b72509d70225$export$16a4697467175487(target) {
|
|
2663
2660
|
if (($c87311424ea30a05$export$fedb369cb70207f1)()) {
|
|
2664
2661
|
if ($14c0b72509d70225$var$state === 'default') {
|
|
2665
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2666
2662
|
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(target);
|
|
2667
2663
|
$14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
|
|
2668
2664
|
documentObject.documentElement.style.webkitUserSelect = 'none';
|
|
@@ -2689,7 +2685,6 @@ function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
|
|
|
2689
2685
|
($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
|
|
2690
2686
|
// Avoid race conditions
|
|
2691
2687
|
if ($14c0b72509d70225$var$state === 'restoring') {
|
|
2692
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2693
2688
|
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(target);
|
|
2694
2689
|
if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';
|
|
2695
2690
|
$14c0b72509d70225$var$savedUserSelect = '';
|
|
@@ -3028,7 +3023,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3028
3023
|
}
|
|
3029
3024
|
// Due to browser inconsistencies, especially on mobile browsers, we prevent
|
|
3030
3025
|
// default on pointer down and handle focusing the pressable element ourselves.
|
|
3031
|
-
if ($f6c31cce2adf654f$var$
|
|
3026
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget)) e.preventDefault();
|
|
3032
3027
|
state.pointerType = e.pointerType;
|
|
3033
3028
|
let shouldStopPropagation = true;
|
|
3034
3029
|
if (!state.isPressed) {
|
|
@@ -3051,7 +3046,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3051
3046
|
// Chrome and Firefox on touch Windows devices require mouse down events
|
|
3052
3047
|
// to be canceled in addition to pointer events, or an extra asynchronous
|
|
3053
3048
|
// focus event will be fired.
|
|
3054
|
-
if ($f6c31cce2adf654f$var$
|
|
3049
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget)) e.preventDefault();
|
|
3055
3050
|
e.stopPropagation();
|
|
3056
3051
|
}
|
|
3057
3052
|
};
|
|
@@ -3089,8 +3084,23 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3089
3084
|
state.pointerType = null;
|
|
3090
3085
|
removeAllGlobalListeners();
|
|
3091
3086
|
if (!allowTextSelectionOnPress) ($14c0b72509d70225$export$b0d6fa1ab32e3295)(state.target);
|
|
3087
|
+
// Prevent subsequent touchend event from triggering onClick on unrelated elements on Android. See below.
|
|
3088
|
+
// Both 'touch' and 'pen' pointerTypes trigger onTouchEnd, but 'mouse' does not.
|
|
3089
|
+
if ('ontouchend' in state.target && e.pointerType !== 'mouse') addGlobalListener(state.target, 'touchend', onTouchEnd, {
|
|
3090
|
+
once: true
|
|
3091
|
+
});
|
|
3092
3092
|
}
|
|
3093
3093
|
};
|
|
3094
|
+
// This is a workaround for an Android Chrome/Firefox issue where click events are fired on an incorrect element
|
|
3095
|
+
// if the original target is removed during onPointerUp (before onClick).
|
|
3096
|
+
// https://github.com/adobe/react-spectrum/issues/1513
|
|
3097
|
+
// https://issues.chromium.org/issues/40732224
|
|
3098
|
+
// Note: this event must be registered directly on the element, not via React props in order to work.
|
|
3099
|
+
// https://github.com/facebook/react/issues/9809
|
|
3100
|
+
let onTouchEnd = (e)=>{
|
|
3101
|
+
// Don't preventDefault if we actually want the default (e.g. submit/link click).
|
|
3102
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultUp(e.currentTarget)) e.preventDefault();
|
|
3103
|
+
};
|
|
3094
3104
|
let onPointerCancel = (e)=>{
|
|
3095
3105
|
cancel(e);
|
|
3096
3106
|
};
|
|
@@ -3105,7 +3115,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3105
3115
|
if (e.button !== 0 || !e.currentTarget.contains(e.target)) return;
|
|
3106
3116
|
// Due to browser inconsistencies, especially on mobile browsers, we prevent
|
|
3107
3117
|
// default on mouse down and handle focusing the pressable element ourselves.
|
|
3108
|
-
if ($f6c31cce2adf654f$var$
|
|
3118
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget)) e.preventDefault();
|
|
3109
3119
|
if (state.ignoreEmulatedMouseEvents) {
|
|
3110
3120
|
e.stopPropagation();
|
|
3111
3121
|
return;
|
|
@@ -3246,7 +3256,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3246
3256
|
triggerPressUp
|
|
3247
3257
|
]);
|
|
3248
3258
|
// Remove user-select: none in case component unmounts immediately after pressStart
|
|
3249
|
-
// eslint-disable-next-line arrow-body-style
|
|
3250
3259
|
(useEffect)(()=>{
|
|
3251
3260
|
return ()=>{
|
|
3252
3261
|
var _ref_current_target;
|
|
@@ -3342,16 +3351,20 @@ function $f6c31cce2adf654f$var$isOverTarget(point, target) {
|
|
|
3342
3351
|
let pointRect = $f6c31cce2adf654f$var$getPointClientRect(point);
|
|
3343
3352
|
return $f6c31cce2adf654f$var$areRectanglesOverlapping(rect, pointRect);
|
|
3344
3353
|
}
|
|
3345
|
-
function $f6c31cce2adf654f$var$
|
|
3354
|
+
function $f6c31cce2adf654f$var$shouldPreventDefaultDown(target) {
|
|
3346
3355
|
// We cannot prevent default if the target is a draggable element.
|
|
3347
3356
|
return !(target instanceof HTMLElement) || !target.hasAttribute('draggable');
|
|
3348
3357
|
}
|
|
3349
|
-
function $f6c31cce2adf654f$var$
|
|
3350
|
-
if (target instanceof HTMLInputElement) return
|
|
3358
|
+
function $f6c31cce2adf654f$var$shouldPreventDefaultUp(target) {
|
|
3359
|
+
if (target instanceof HTMLInputElement) return false;
|
|
3351
3360
|
if (target instanceof HTMLButtonElement) return target.type !== 'submit' && target.type !== 'reset';
|
|
3352
3361
|
if ($f6c31cce2adf654f$var$isHTMLAnchorLink(target)) return false;
|
|
3353
3362
|
return true;
|
|
3354
3363
|
}
|
|
3364
|
+
function $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(target, key) {
|
|
3365
|
+
if (target instanceof HTMLInputElement) return !$f6c31cce2adf654f$var$isValidInputKey(target, key);
|
|
3366
|
+
return $f6c31cce2adf654f$var$shouldPreventDefaultUp(target);
|
|
3367
|
+
}
|
|
3355
3368
|
const $f6c31cce2adf654f$var$nonTextInputTypes = new Set([
|
|
3356
3369
|
'checkbox',
|
|
3357
3370
|
'radio',
|
|
@@ -3461,7 +3474,6 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
3461
3474
|
observer: null
|
|
3462
3475
|
});
|
|
3463
3476
|
// Clean up MutationObserver on unmount. See below.
|
|
3464
|
-
// eslint-disable-next-line arrow-body-style
|
|
3465
3477
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
3466
3478
|
const state = stateRef.current;
|
|
3467
3479
|
return ()=>{
|
|
@@ -4559,7 +4571,6 @@ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
|
|
|
4559
4571
|
contain
|
|
4560
4572
|
]);
|
|
4561
4573
|
// This is a useLayoutEffect so it is guaranteed to run before our async synthetic blur
|
|
4562
|
-
// eslint-disable-next-line arrow-body-style
|
|
4563
4574
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
4564
4575
|
return ()=>{
|
|
4565
4576
|
if (raf.current) cancelAnimationFrame(raf.current);
|
|
@@ -4601,12 +4612,12 @@ function $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {
|
|
|
4601
4612
|
function $9bf71ea28793e738$var$focusElement(element, scroll = false) {
|
|
4602
4613
|
if (element != null && !scroll) try {
|
|
4603
4614
|
(0, $6a99195332edec8b$export$80f3e147d781571c)(element);
|
|
4604
|
-
} catch
|
|
4615
|
+
} catch {
|
|
4605
4616
|
// ignore
|
|
4606
4617
|
}
|
|
4607
4618
|
else if (element != null) try {
|
|
4608
4619
|
element.focus();
|
|
4609
|
-
} catch
|
|
4620
|
+
} catch {
|
|
4610
4621
|
// ignore
|
|
4611
4622
|
}
|
|
4612
4623
|
}
|
|
@@ -4713,7 +4724,7 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
|
|
|
4713
4724
|
let onKeyDown = (e)=>{
|
|
4714
4725
|
if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
|
|
4715
4726
|
let focusedElement = ownerDocument.activeElement;
|
|
4716
|
-
if (!$9bf71ea28793e738$var$
|
|
4727
|
+
if (!$9bf71ea28793e738$var$isElementInChildScope(focusedElement, scopeRef) || !$9bf71ea28793e738$var$shouldRestoreFocus(scopeRef)) return;
|
|
4717
4728
|
let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
|
|
4718
4729
|
if (!treeNode) return;
|
|
4719
4730
|
let nodeToRestore = treeNode.nodeToRestore;
|
|
@@ -4730,11 +4741,11 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
|
|
|
4730
4741
|
}
|
|
4731
4742
|
// If there is no next element, or it is outside the current scope, move focus to the
|
|
4732
4743
|
// next element after the node to restore to instead.
|
|
4733
|
-
if ((!nextElement || !$9bf71ea28793e738$var$
|
|
4744
|
+
if ((!nextElement || !$9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) {
|
|
4734
4745
|
walker.currentNode = nodeToRestore;
|
|
4735
4746
|
// Skip over elements within the scope, in case the scope immediately follows the node to restore.
|
|
4736
4747
|
do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
|
|
4737
|
-
while ($9bf71ea28793e738$var$
|
|
4748
|
+
while ($9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef));
|
|
4738
4749
|
e.preventDefault();
|
|
4739
4750
|
e.stopPropagation();
|
|
4740
4751
|
if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
|
|
@@ -4767,8 +4778,7 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
|
|
|
4767
4778
|
if (!treeNode) return;
|
|
4768
4779
|
let nodeToRestore = treeNode.nodeToRestore;
|
|
4769
4780
|
// if we already lost focus to the body and this was the active scope, then we should attempt to restore
|
|
4770
|
-
if (restoreFocus && nodeToRestore &&
|
|
4771
|
-
($9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {
|
|
4781
|
+
if (restoreFocus && nodeToRestore && (ownerDocument.activeElement && $9bf71ea28793e738$var$isElementInChildScope(ownerDocument.activeElement, scopeRef) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {
|
|
4772
4782
|
// freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it
|
|
4773
4783
|
let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone();
|
|
4774
4784
|
requestAnimationFrame(()=>{
|
|
@@ -5044,6 +5054,66 @@ function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
|
|
|
5044
5054
|
return isDisabled ? false : hasTabbableChild;
|
|
5045
5055
|
}
|
|
5046
5056
|
|
|
5057
|
+
/*
|
|
5058
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5059
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5060
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5061
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5062
|
+
*
|
|
5063
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
5064
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
5065
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
5066
|
+
* governing permissions and limitations under the License.
|
|
5067
|
+
*/
|
|
5068
|
+
|
|
5069
|
+
|
|
5070
|
+
function $298d61e98472621b$export$dcf14c9974fe2767(props, ref) {
|
|
5071
|
+
let { elementType: elementType = 'a', onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, // @ts-ignore
|
|
5072
|
+
onClick: deprecatedOnClick, isDisabled: isDisabled, ...otherProps } = props;
|
|
5073
|
+
let linkProps = {};
|
|
5074
|
+
if (elementType !== 'a') linkProps = {
|
|
5075
|
+
role: 'link',
|
|
5076
|
+
tabIndex: !isDisabled ? 0 : undefined
|
|
5077
|
+
};
|
|
5078
|
+
let { focusableProps: focusableProps } = ($e6afbd83fe6ebbd2$export$4c014de7c8940b4c)(props, ref);
|
|
5079
|
+
let { pressProps: pressProps, isPressed: isPressed } = ($f6c31cce2adf654f$export$45712eceda6fad21)({
|
|
5080
|
+
onPress: onPress,
|
|
5081
|
+
onPressStart: onPressStart,
|
|
5082
|
+
onPressEnd: onPressEnd,
|
|
5083
|
+
isDisabled: isDisabled,
|
|
5084
|
+
ref: ref
|
|
5085
|
+
});
|
|
5086
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(otherProps, {
|
|
5087
|
+
labelable: true
|
|
5088
|
+
});
|
|
5089
|
+
let interactionHandlers = ($3ef42575df84b30b$export$9d1611c77c2fe928)(focusableProps, pressProps);
|
|
5090
|
+
let router = ($ea8dcbcb9ea1b556$export$9a302a45f65d0572)();
|
|
5091
|
+
let routerLinkProps = ($ea8dcbcb9ea1b556$export$7e924b3091a3bd18)(props);
|
|
5092
|
+
return {
|
|
5093
|
+
isPressed: isPressed,
|
|
5094
|
+
linkProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, routerLinkProps, {
|
|
5095
|
+
...interactionHandlers,
|
|
5096
|
+
...linkProps,
|
|
5097
|
+
'aria-disabled': isDisabled || undefined,
|
|
5098
|
+
'aria-current': props['aria-current'],
|
|
5099
|
+
onClick: (e)=>{
|
|
5100
|
+
var _pressProps_onClick;
|
|
5101
|
+
(_pressProps_onClick = pressProps.onClick) === null || _pressProps_onClick === void 0 ? void 0 : _pressProps_onClick.call(pressProps, e);
|
|
5102
|
+
if (deprecatedOnClick) {
|
|
5103
|
+
deprecatedOnClick(e);
|
|
5104
|
+
console.warn('onClick is deprecated, please use onPress');
|
|
5105
|
+
}
|
|
5106
|
+
// If a custom router is provided, prevent default and forward if this link should client navigate.
|
|
5107
|
+
if (!router.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.
|
|
5108
|
+
!e.isDefaultPrevented() && ($ea8dcbcb9ea1b556$export$efa8c9099e530235)(e.currentTarget, e) && props.href) {
|
|
5109
|
+
e.preventDefault();
|
|
5110
|
+
router.open(e.currentTarget, e, props.href, props.routerOptions);
|
|
5111
|
+
}
|
|
5112
|
+
}
|
|
5113
|
+
})
|
|
5114
|
+
};
|
|
5115
|
+
}
|
|
5116
|
+
|
|
5047
5117
|
/*
|
|
5048
5118
|
* Copyright 2020 Adobe. All rights reserved.
|
|
5049
5119
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -5090,7 +5160,6 @@ const $148a7a147e38ea7f$var$RTL_LANGS = new Set([
|
|
|
5090
5160
|
]);
|
|
5091
5161
|
function $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {
|
|
5092
5162
|
// If the Intl.Locale API is available, use it to get the locale's text direction.
|
|
5093
|
-
// @ts-ignore
|
|
5094
5163
|
if (Intl.Locale) {
|
|
5095
5164
|
let locale = new Intl.Locale(localeString).maximize();
|
|
5096
5165
|
// Use the text info object to get the direction if possible.
|
|
@@ -5125,11 +5194,10 @@ const $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
|
|
|
5125
5194
|
function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
|
|
5126
5195
|
let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';
|
|
5127
5196
|
try {
|
|
5128
|
-
// @ts-ignore
|
|
5129
5197
|
Intl.DateTimeFormat.supportedLocalesOf([
|
|
5130
5198
|
locale
|
|
5131
5199
|
]);
|
|
5132
|
-
} catch
|
|
5200
|
+
} catch {
|
|
5133
5201
|
locale = 'en-US';
|
|
5134
5202
|
}
|
|
5135
5203
|
return {
|
|
@@ -5375,8 +5443,7 @@ function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
|
5375
5443
|
|
|
5376
5444
|
|
|
5377
5445
|
function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
5378
|
-
let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: // @ts-ignore - undocumented
|
|
5379
|
-
preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented
|
|
5446
|
+
let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented
|
|
5380
5447
|
allowFocusWhenDisabled, // @ts-ignore
|
|
5381
5448
|
onClick: deprecatedOnClick, href: href, target: target, rel: rel, type: type = 'button' } = props;
|
|
5382
5449
|
let additionalProps;
|
|
@@ -5387,7 +5454,7 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
5387
5454
|
else additionalProps = {
|
|
5388
5455
|
role: 'button',
|
|
5389
5456
|
tabIndex: isDisabled ? undefined : 0,
|
|
5390
|
-
href: elementType === 'a' && isDisabled ?
|
|
5457
|
+
href: elementType === 'a' && !isDisabled ? href : undefined,
|
|
5391
5458
|
target: elementType === 'a' ? target : undefined,
|
|
5392
5459
|
type: elementType === 'input' ? type : undefined,
|
|
5393
5460
|
disabled: elementType === 'input' ? isDisabled : undefined,
|
|
@@ -5439,8 +5506,20 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
5439
5506
|
*/ /* Inspired by https://github.com/AlmeroSteyn/react-aria-live */ const $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY = 7000;
|
|
5440
5507
|
let $319e236875307eab$var$liveAnnouncer = null;
|
|
5441
5508
|
function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = 'assertive', timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
|
|
5442
|
-
if (!$319e236875307eab$var$liveAnnouncer)
|
|
5443
|
-
|
|
5509
|
+
if (!$319e236875307eab$var$liveAnnouncer) {
|
|
5510
|
+
$319e236875307eab$var$liveAnnouncer = new $319e236875307eab$var$LiveAnnouncer();
|
|
5511
|
+
// wait for the live announcer regions to be added to the dom, then announce
|
|
5512
|
+
// otherwise Safari won't announce the message if it's added too quickly
|
|
5513
|
+
// found most times less than 100ms were not consistent when announcing with Safari
|
|
5514
|
+
// IS_REACT_ACT_ENVIRONMENT is used by React 18. Previous versions checked for the `jest` global.
|
|
5515
|
+
// https://github.com/reactwg/react-18/discussions/102
|
|
5516
|
+
// if we're in a test environment, announce without waiting
|
|
5517
|
+
// @ts-ignore
|
|
5518
|
+
if (!(typeof IS_REACT_ACT_ENVIRONMENT === 'boolean' ? IS_REACT_ACT_ENVIRONMENT : typeof jest !== 'undefined')) setTimeout(()=>{
|
|
5519
|
+
if ($319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 ? void 0 : $319e236875307eab$var$liveAnnouncer.isAttached()) $319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 ? void 0 : $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
|
|
5520
|
+
}, 100);
|
|
5521
|
+
else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
|
|
5522
|
+
} else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
|
|
5444
5523
|
}
|
|
5445
5524
|
// LiveAnnouncer is implemented using vanilla DOM, not React. That's because as of React 18
|
|
5446
5525
|
// ReactDOM.render is deprecated, and the replacement, ReactDOM.createRoot is moved into a
|
|
@@ -5449,6 +5528,10 @@ function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = 'ass
|
|
|
5449
5528
|
// is simple enough to implement without React, so that's what we do here.
|
|
5450
5529
|
// See this discussion for more details: https://github.com/reactwg/react-18/discussions/125#discussioncomment-2382638
|
|
5451
5530
|
class $319e236875307eab$var$LiveAnnouncer {
|
|
5531
|
+
isAttached() {
|
|
5532
|
+
var _this_node;
|
|
5533
|
+
return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected;
|
|
5534
|
+
}
|
|
5452
5535
|
createLog(ariaLive) {
|
|
5453
5536
|
let node = document.createElement('div');
|
|
5454
5537
|
node.setAttribute('role', 'log');
|
|
@@ -5462,146 +5545,52 @@ class $319e236875307eab$var$LiveAnnouncer {
|
|
|
5462
5545
|
this.node = null;
|
|
5463
5546
|
}
|
|
5464
5547
|
announce(message, assertiveness = 'assertive', timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
|
|
5548
|
+
var _this_assertiveLog, _this_politeLog;
|
|
5465
5549
|
if (!this.node) return;
|
|
5466
5550
|
let node = document.createElement('div');
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5551
|
+
if (typeof message === 'object') {
|
|
5552
|
+
// To read an aria-labelledby, the element must have an appropriate role, such as img.
|
|
5553
|
+
node.setAttribute('role', 'img');
|
|
5554
|
+
node.setAttribute('aria-labelledby', message['aria-labelledby']);
|
|
5555
|
+
} else node.textContent = message;
|
|
5556
|
+
if (assertiveness === 'assertive') (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 ? void 0 : _this_assertiveLog.appendChild(node);
|
|
5557
|
+
else (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 ? void 0 : _this_politeLog.appendChild(node);
|
|
5470
5558
|
if (message !== '') setTimeout(()=>{
|
|
5471
5559
|
node.remove();
|
|
5472
5560
|
}, timeout);
|
|
5473
5561
|
}
|
|
5474
5562
|
clear(assertiveness) {
|
|
5475
5563
|
if (!this.node) return;
|
|
5476
|
-
if (!assertiveness || assertiveness === 'assertive') this.assertiveLog.innerHTML = '';
|
|
5477
|
-
if (!assertiveness || assertiveness === 'polite') this.politeLog.innerHTML = '';
|
|
5564
|
+
if ((!assertiveness || assertiveness === 'assertive') && this.assertiveLog) this.assertiveLog.innerHTML = '';
|
|
5565
|
+
if ((!assertiveness || assertiveness === 'polite') && this.politeLog) this.politeLog.innerHTML = '';
|
|
5478
5566
|
}
|
|
5479
5567
|
constructor(){
|
|
5480
|
-
this.node =
|
|
5481
|
-
this.
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
5505
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5506
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5507
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5508
|
-
*
|
|
5509
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
5510
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
5511
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
5512
|
-
* governing permissions and limitations under the License.
|
|
5513
|
-
*/
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
5517
|
-
let { validationBehavior: validationBehavior, focus: focus } = props;
|
|
5518
|
-
// This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
|
|
5519
|
-
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
5520
|
-
if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {
|
|
5521
|
-
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
|
|
5522
|
-
ref.current.setCustomValidity(errorMessage);
|
|
5523
|
-
// Prevent default tooltip for validation message.
|
|
5524
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=605277
|
|
5525
|
-
if (!ref.current.hasAttribute('title')) ref.current.title = '';
|
|
5526
|
-
if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current));
|
|
5527
|
-
}
|
|
5528
|
-
});
|
|
5529
|
-
let onReset = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5530
|
-
state.resetValidation();
|
|
5531
|
-
});
|
|
5532
|
-
let onInvalid = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
|
|
5533
|
-
var _ref_current;
|
|
5534
|
-
// Only commit validation if we are not already displaying one.
|
|
5535
|
-
// This avoids clearing server errors that the user didn't actually fix.
|
|
5536
|
-
if (!state.displayValidation.isInvalid) state.commitValidation();
|
|
5537
|
-
// Auto focus the first invalid input in a form, unless the error already had its default prevented.
|
|
5538
|
-
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
|
|
5539
|
-
if (!e.defaultPrevented && ref && form && $e93e671b31057976$var$getFirstInvalidInput(form) === ref.current) {
|
|
5540
|
-
var _ref_current1;
|
|
5541
|
-
if (focus) focus();
|
|
5542
|
-
else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
|
|
5543
|
-
// Always show focus ring.
|
|
5544
|
-
($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
|
|
5568
|
+
this.node = null;
|
|
5569
|
+
this.assertiveLog = null;
|
|
5570
|
+
this.politeLog = null;
|
|
5571
|
+
if (typeof document !== 'undefined') {
|
|
5572
|
+
this.node = document.createElement('div');
|
|
5573
|
+
this.node.dataset.liveAnnouncer = 'true';
|
|
5574
|
+
// copied from VisuallyHidden
|
|
5575
|
+
Object.assign(this.node.style, {
|
|
5576
|
+
border: 0,
|
|
5577
|
+
clip: 'rect(0 0 0 0)',
|
|
5578
|
+
clipPath: 'inset(50%)',
|
|
5579
|
+
height: '1px',
|
|
5580
|
+
margin: '-1px',
|
|
5581
|
+
overflow: 'hidden',
|
|
5582
|
+
padding: 0,
|
|
5583
|
+
position: 'absolute',
|
|
5584
|
+
width: '1px',
|
|
5585
|
+
whiteSpace: 'nowrap'
|
|
5586
|
+
});
|
|
5587
|
+
this.assertiveLog = this.createLog('assertive');
|
|
5588
|
+
this.node.appendChild(this.assertiveLog);
|
|
5589
|
+
this.politeLog = this.createLog('polite');
|
|
5590
|
+
this.node.appendChild(this.politeLog);
|
|
5591
|
+
document.body.prepend(this.node);
|
|
5545
5592
|
}
|
|
5546
|
-
// Prevent default browser error UI from appearing.
|
|
5547
|
-
e.preventDefault();
|
|
5548
|
-
});
|
|
5549
|
-
let onChange = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5550
|
-
state.commitValidation();
|
|
5551
|
-
});
|
|
5552
|
-
(useEffect)(()=>{
|
|
5553
|
-
let input = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
5554
|
-
if (!input) return;
|
|
5555
|
-
let form = input.form;
|
|
5556
|
-
input.addEventListener('invalid', onInvalid);
|
|
5557
|
-
input.addEventListener('change', onChange);
|
|
5558
|
-
form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
|
|
5559
|
-
return ()=>{
|
|
5560
|
-
input.removeEventListener('invalid', onInvalid);
|
|
5561
|
-
input.removeEventListener('change', onChange);
|
|
5562
|
-
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
|
|
5563
|
-
};
|
|
5564
|
-
}, [
|
|
5565
|
-
ref,
|
|
5566
|
-
onInvalid,
|
|
5567
|
-
onChange,
|
|
5568
|
-
onReset,
|
|
5569
|
-
validationBehavior
|
|
5570
|
-
]);
|
|
5571
|
-
}
|
|
5572
|
-
function $e93e671b31057976$var$getValidity(input) {
|
|
5573
|
-
// The native ValidityState object is live, meaning each property is a getter that returns the current state.
|
|
5574
|
-
// We need to create a snapshot of the validity state at the time this function is called to avoid unpredictable React renders.
|
|
5575
|
-
let validity = input.validity;
|
|
5576
|
-
return {
|
|
5577
|
-
badInput: validity.badInput,
|
|
5578
|
-
customError: validity.customError,
|
|
5579
|
-
patternMismatch: validity.patternMismatch,
|
|
5580
|
-
rangeOverflow: validity.rangeOverflow,
|
|
5581
|
-
rangeUnderflow: validity.rangeUnderflow,
|
|
5582
|
-
stepMismatch: validity.stepMismatch,
|
|
5583
|
-
tooLong: validity.tooLong,
|
|
5584
|
-
tooShort: validity.tooShort,
|
|
5585
|
-
typeMismatch: validity.typeMismatch,
|
|
5586
|
-
valueMissing: validity.valueMissing,
|
|
5587
|
-
valid: validity.valid
|
|
5588
|
-
};
|
|
5589
|
-
}
|
|
5590
|
-
function $e93e671b31057976$var$getNativeValidity(input) {
|
|
5591
|
-
return {
|
|
5592
|
-
isInvalid: !input.validity.valid,
|
|
5593
|
-
validationDetails: $e93e671b31057976$var$getValidity(input),
|
|
5594
|
-
validationErrors: input.validationMessage ? [
|
|
5595
|
-
input.validationMessage
|
|
5596
|
-
] : []
|
|
5597
|
-
};
|
|
5598
|
-
}
|
|
5599
|
-
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
5600
|
-
for(let i = 0; i < form.elements.length; i++){
|
|
5601
|
-
let element = form.elements[i];
|
|
5602
|
-
if (!element.validity.valid) return element;
|
|
5603
5593
|
}
|
|
5604
|
-
return null;
|
|
5605
5594
|
}
|
|
5606
5595
|
|
|
5607
5596
|
/*
|
|
@@ -5666,11 +5655,15 @@ function $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {
|
|
|
5666
5655
|
validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
|
|
5667
5656
|
} : null;
|
|
5668
5657
|
// Perform custom client side validation.
|
|
5669
|
-
let clientError = (useMemo)(()
|
|
5658
|
+
let clientError = (useMemo)(()=>{
|
|
5659
|
+
if (!validate || value == null) return null;
|
|
5660
|
+
let validateErrors = $e5be200c675c3b3a$var$runValidate(validate, value);
|
|
5661
|
+
return $e5be200c675c3b3a$var$getValidationResult(validateErrors);
|
|
5662
|
+
}, [
|
|
5670
5663
|
validate,
|
|
5671
5664
|
value
|
|
5672
5665
|
]);
|
|
5673
|
-
if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation =
|
|
5666
|
+
if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = undefined;
|
|
5674
5667
|
// Get relevant server errors from the form.
|
|
5675
5668
|
let serverErrors = (useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);
|
|
5676
5669
|
let serverErrorMessages = (useMemo)(()=>{
|
|
@@ -5762,7 +5755,7 @@ function $e5be200c675c3b3a$var$getValidationResult(errors) {
|
|
|
5762
5755
|
}
|
|
5763
5756
|
function $e5be200c675c3b3a$var$isEqualValidation(a, b) {
|
|
5764
5757
|
if (a === b) return true;
|
|
5765
|
-
return a && b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i)=>a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v])=>b.validationDetails[k] === v);
|
|
5758
|
+
return !!a && !!b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i)=>a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v])=>b.validationDetails[k] === v);
|
|
5766
5759
|
}
|
|
5767
5760
|
function $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {
|
|
5768
5761
|
let errors = new Set();
|
|
@@ -5788,7 +5781,7 @@ function $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {
|
|
|
5788
5781
|
}
|
|
5789
5782
|
|
|
5790
5783
|
/*
|
|
5791
|
-
* Copyright
|
|
5784
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
5792
5785
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5793
5786
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5794
5787
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -5800,39 +5793,143 @@ function $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {
|
|
|
5800
5793
|
*/
|
|
5801
5794
|
|
|
5802
5795
|
|
|
5803
|
-
function $
|
|
5804
|
-
let {
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
let { pressProps: pressProps, isPressed: isPressed } = ($f6c31cce2adf654f$export$45712eceda6fad21)({
|
|
5816
|
-
isDisabled: isDisabled
|
|
5796
|
+
function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
5797
|
+
let { validationBehavior: validationBehavior, focus: focus } = props;
|
|
5798
|
+
// This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
|
|
5799
|
+
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
5800
|
+
if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {
|
|
5801
|
+
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
|
|
5802
|
+
ref.current.setCustomValidity(errorMessage);
|
|
5803
|
+
// Prevent default tooltip for validation message.
|
|
5804
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=605277
|
|
5805
|
+
if (!ref.current.hasAttribute('title')) ref.current.title = '';
|
|
5806
|
+
if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current));
|
|
5807
|
+
}
|
|
5817
5808
|
});
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5809
|
+
let onReset = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5810
|
+
state.resetValidation();
|
|
5811
|
+
});
|
|
5812
|
+
let onInvalid = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
|
|
5813
|
+
var _ref_current;
|
|
5814
|
+
// Only commit validation if we are not already displaying one.
|
|
5815
|
+
// This avoids clearing server errors that the user didn't actually fix.
|
|
5816
|
+
if (!state.displayValidation.isInvalid) state.commitValidation();
|
|
5817
|
+
// Auto focus the first invalid input in a form, unless the error already had its default prevented.
|
|
5818
|
+
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
|
|
5819
|
+
if (!e.defaultPrevented && ref && form && $e93e671b31057976$var$getFirstInvalidInput(form) === ref.current) {
|
|
5820
|
+
var _ref_current1;
|
|
5821
|
+
if (focus) focus();
|
|
5822
|
+
else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
|
|
5823
|
+
// Always show focus ring.
|
|
5824
|
+
($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
|
|
5823
5825
|
}
|
|
5826
|
+
// Prevent default browser error UI from appearing.
|
|
5827
|
+
e.preventDefault();
|
|
5824
5828
|
});
|
|
5825
|
-
let
|
|
5826
|
-
|
|
5827
|
-
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
5828
|
-
labelable: true
|
|
5829
|
+
let onChange = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5830
|
+
state.commitValidation();
|
|
5829
5831
|
});
|
|
5830
|
-
(
|
|
5832
|
+
(useEffect)(()=>{
|
|
5833
|
+
let input = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
5834
|
+
if (!input) return;
|
|
5835
|
+
let form = input.form;
|
|
5836
|
+
input.addEventListener('invalid', onInvalid);
|
|
5837
|
+
input.addEventListener('change', onChange);
|
|
5838
|
+
form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
|
|
5839
|
+
return ()=>{
|
|
5840
|
+
input.removeEventListener('invalid', onInvalid);
|
|
5841
|
+
input.removeEventListener('change', onChange);
|
|
5842
|
+
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
|
|
5843
|
+
};
|
|
5844
|
+
}, [
|
|
5845
|
+
ref,
|
|
5846
|
+
onInvalid,
|
|
5847
|
+
onChange,
|
|
5848
|
+
onReset,
|
|
5849
|
+
validationBehavior
|
|
5850
|
+
]);
|
|
5851
|
+
}
|
|
5852
|
+
function $e93e671b31057976$var$getValidity(input) {
|
|
5853
|
+
// The native ValidityState object is live, meaning each property is a getter that returns the current state.
|
|
5854
|
+
// We need to create a snapshot of the validity state at the time this function is called to avoid unpredictable React renders.
|
|
5855
|
+
let validity = input.validity;
|
|
5831
5856
|
return {
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5857
|
+
badInput: validity.badInput,
|
|
5858
|
+
customError: validity.customError,
|
|
5859
|
+
patternMismatch: validity.patternMismatch,
|
|
5860
|
+
rangeOverflow: validity.rangeOverflow,
|
|
5861
|
+
rangeUnderflow: validity.rangeUnderflow,
|
|
5862
|
+
stepMismatch: validity.stepMismatch,
|
|
5863
|
+
tooLong: validity.tooLong,
|
|
5864
|
+
tooShort: validity.tooShort,
|
|
5865
|
+
typeMismatch: validity.typeMismatch,
|
|
5866
|
+
valueMissing: validity.valueMissing,
|
|
5867
|
+
valid: validity.valid
|
|
5868
|
+
};
|
|
5869
|
+
}
|
|
5870
|
+
function $e93e671b31057976$var$getNativeValidity(input) {
|
|
5871
|
+
return {
|
|
5872
|
+
isInvalid: !input.validity.valid,
|
|
5873
|
+
validationDetails: $e93e671b31057976$var$getValidity(input),
|
|
5874
|
+
validationErrors: input.validationMessage ? [
|
|
5875
|
+
input.validationMessage
|
|
5876
|
+
] : []
|
|
5877
|
+
};
|
|
5878
|
+
}
|
|
5879
|
+
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
5880
|
+
for(let i = 0; i < form.elements.length; i++){
|
|
5881
|
+
let element = form.elements[i];
|
|
5882
|
+
if (!element.validity.valid) return element;
|
|
5883
|
+
}
|
|
5884
|
+
return null;
|
|
5885
|
+
}
|
|
5886
|
+
|
|
5887
|
+
/*
|
|
5888
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5889
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5890
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5891
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5892
|
+
*
|
|
5893
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
5894
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
5895
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
5896
|
+
* governing permissions and limitations under the License.
|
|
5897
|
+
*/
|
|
5898
|
+
|
|
5899
|
+
|
|
5900
|
+
function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
5901
|
+
let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = props;
|
|
5902
|
+
let onChange = (e)=>{
|
|
5903
|
+
// since we spread props on label, onChange will end up there as well as in here.
|
|
5904
|
+
// so we have to stop propagation at the lowest level that we care about
|
|
5905
|
+
e.stopPropagation();
|
|
5906
|
+
state.setSelected(e.target.checked);
|
|
5907
|
+
};
|
|
5908
|
+
let hasChildren = children != null;
|
|
5909
|
+
let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
|
|
5910
|
+
if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
|
|
5911
|
+
// This handles focusing the input on pointer down, which Safari does not do by default.
|
|
5912
|
+
let { pressProps: pressProps, isPressed: isPressed } = ($f6c31cce2adf654f$export$45712eceda6fad21)({
|
|
5913
|
+
isDisabled: isDisabled
|
|
5914
|
+
});
|
|
5915
|
+
// iOS does not toggle checkboxes if you drag off and back onto the label, so handle it ourselves.
|
|
5916
|
+
let { pressProps: labelProps, isPressed: isLabelPressed } = ($f6c31cce2adf654f$export$45712eceda6fad21)({
|
|
5917
|
+
isDisabled: isDisabled || isReadOnly,
|
|
5918
|
+
onPress () {
|
|
5919
|
+
state.toggle();
|
|
5920
|
+
}
|
|
5921
|
+
});
|
|
5922
|
+
let { focusableProps: focusableProps } = ($e6afbd83fe6ebbd2$export$4c014de7c8940b4c)(props, ref);
|
|
5923
|
+
let interactions = ($3ef42575df84b30b$export$9d1611c77c2fe928)(pressProps, focusableProps);
|
|
5924
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
5925
|
+
labelable: true
|
|
5926
|
+
});
|
|
5927
|
+
($99facab73266f662$export$5add1d006293d136)(ref, state.isSelected, state.setSelected);
|
|
5928
|
+
return {
|
|
5929
|
+
labelProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(labelProps, {
|
|
5930
|
+
onClick: (e)=>e.preventDefault()
|
|
5931
|
+
}),
|
|
5932
|
+
inputProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, {
|
|
5836
5933
|
'aria-invalid': isInvalid || validationState === 'invalid' || undefined,
|
|
5837
5934
|
'aria-errormessage': props['aria-errormessage'],
|
|
5838
5935
|
'aria-controls': props['aria-controls'],
|
|
@@ -5868,6 +5965,8 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
|
5868
5965
|
|
|
5869
5966
|
|
|
5870
5967
|
|
|
5968
|
+
|
|
5969
|
+
|
|
5871
5970
|
function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {
|
|
5872
5971
|
// Create validation state here because it doesn't make sense to add to general useToggleState.
|
|
5873
5972
|
let validationState = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
@@ -5886,8 +5985,18 @@ function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {
|
|
|
5886
5985
|
// https://css-tricks.com/indeterminate-checkboxes/
|
|
5887
5986
|
if (inputRef.current) inputRef.current.indeterminate = !!isIndeterminate;
|
|
5888
5987
|
});
|
|
5988
|
+
// Reset validation state on label press for checkbox with a hidden input.
|
|
5989
|
+
let { pressProps: pressProps } = ($f6c31cce2adf654f$export$45712eceda6fad21)({
|
|
5990
|
+
isDisabled: isDisabled || isReadOnly,
|
|
5991
|
+
onPress () {
|
|
5992
|
+
// @ts-expect-error
|
|
5993
|
+
let { [($e5be200c675c3b3a$export$a763b9476acd3eb)]: groupValidationState } = props;
|
|
5994
|
+
let { commitValidation: commitValidation } = groupValidationState ? groupValidationState : validationState;
|
|
5995
|
+
commitValidation();
|
|
5996
|
+
}
|
|
5997
|
+
});
|
|
5889
5998
|
return {
|
|
5890
|
-
labelProps: labelProps,
|
|
5999
|
+
labelProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(labelProps, pressProps),
|
|
5891
6000
|
inputProps: {
|
|
5892
6001
|
...inputProps,
|
|
5893
6002
|
checked: isSelected,
|
|
@@ -6158,6 +6267,168 @@ function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
6158
6267
|
};
|
|
6159
6268
|
}
|
|
6160
6269
|
|
|
6270
|
+
/*
|
|
6271
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
6272
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6273
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
6274
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6275
|
+
*
|
|
6276
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
6277
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
6278
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
6279
|
+
* governing permissions and limitations under the License.
|
|
6280
|
+
*/
|
|
6281
|
+
|
|
6282
|
+
|
|
6283
|
+
const $5c3e21d68f1c4674$var$styles = {
|
|
6284
|
+
border: 0,
|
|
6285
|
+
clip: 'rect(0 0 0 0)',
|
|
6286
|
+
clipPath: 'inset(50%)',
|
|
6287
|
+
height: '1px',
|
|
6288
|
+
margin: '-1px',
|
|
6289
|
+
overflow: 'hidden',
|
|
6290
|
+
padding: 0,
|
|
6291
|
+
position: 'absolute',
|
|
6292
|
+
width: '1px',
|
|
6293
|
+
whiteSpace: 'nowrap'
|
|
6294
|
+
};
|
|
6295
|
+
function $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {
|
|
6296
|
+
let { style: style, isFocusable: isFocusable } = props;
|
|
6297
|
+
let [isFocused, setFocused] = (useState)(false);
|
|
6298
|
+
let { focusWithinProps: focusWithinProps } = ($9ab94262bd0047c7$export$420e68273165f4ec)({
|
|
6299
|
+
isDisabled: !isFocusable,
|
|
6300
|
+
onFocusWithinChange: (val)=>setFocused(val)
|
|
6301
|
+
});
|
|
6302
|
+
// If focused, don't hide the element.
|
|
6303
|
+
let combinedStyles = (useMemo)(()=>{
|
|
6304
|
+
if (isFocused) return style;
|
|
6305
|
+
else if (style) return {
|
|
6306
|
+
...$5c3e21d68f1c4674$var$styles,
|
|
6307
|
+
...style
|
|
6308
|
+
};
|
|
6309
|
+
else return $5c3e21d68f1c4674$var$styles;
|
|
6310
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6311
|
+
}, [
|
|
6312
|
+
isFocused
|
|
6313
|
+
]);
|
|
6314
|
+
return {
|
|
6315
|
+
visuallyHiddenProps: {
|
|
6316
|
+
...focusWithinProps,
|
|
6317
|
+
style: combinedStyles
|
|
6318
|
+
}
|
|
6319
|
+
};
|
|
6320
|
+
}
|
|
6321
|
+
function $5c3e21d68f1c4674$export$439d29a4e110a164(props) {
|
|
6322
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6323
|
+
let { children: children, elementType: Element = 'div', isFocusable: isFocusable, style: style, ...otherProps } = props;
|
|
6324
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);
|
|
6325
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(Element, ($3ef42575df84b30b$export$9d1611c77c2fe928)(otherProps, visuallyHiddenProps), children);
|
|
6326
|
+
}
|
|
6327
|
+
|
|
6328
|
+
/*
|
|
6329
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
6330
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6331
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
6332
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6333
|
+
*
|
|
6334
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
6335
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
6336
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
6337
|
+
* governing permissions and limitations under the License.
|
|
6338
|
+
*/
|
|
6339
|
+
|
|
6340
|
+
|
|
6341
|
+
|
|
6342
|
+
|
|
6343
|
+
|
|
6344
|
+
|
|
6345
|
+
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
6346
|
+
let { inputElementType: inputElementType = 'input', isDisabled: isDisabled = false, isRequired: isRequired = false, isReadOnly: isReadOnly = false, type: type = 'text', validationBehavior: validationBehavior = 'aria' } = props;
|
|
6347
|
+
let [value, setValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue || '', props.onChange);
|
|
6348
|
+
let { focusableProps: focusableProps } = ($e6afbd83fe6ebbd2$export$4c014de7c8940b4c)(props, ref);
|
|
6349
|
+
let validationState = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
6350
|
+
...props,
|
|
6351
|
+
value: value
|
|
6352
|
+
});
|
|
6353
|
+
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = validationState.displayValidation;
|
|
6354
|
+
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = ($2baaea4c71418dea$export$294aa081a6c6f55d)({
|
|
6355
|
+
...props,
|
|
6356
|
+
isInvalid: isInvalid,
|
|
6357
|
+
errorMessage: props.errorMessage || validationErrors
|
|
6358
|
+
});
|
|
6359
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
6360
|
+
labelable: true
|
|
6361
|
+
});
|
|
6362
|
+
const inputOnlyProps = {
|
|
6363
|
+
type: type,
|
|
6364
|
+
pattern: props.pattern
|
|
6365
|
+
};
|
|
6366
|
+
($99facab73266f662$export$5add1d006293d136)(ref, value, setValue);
|
|
6367
|
+
($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
|
|
6368
|
+
(useEffect)(()=>{
|
|
6369
|
+
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
|
|
6370
|
+
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
|
|
6371
|
+
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
|
|
6372
|
+
// textareas are always controlled. React is planning on removing this synchronization in a
|
|
6373
|
+
// future major version.
|
|
6374
|
+
// https://github.com/facebook/react/issues/19474
|
|
6375
|
+
// https://github.com/facebook/react/issues/11896
|
|
6376
|
+
if (ref.current instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
|
|
6377
|
+
let input = ref.current;
|
|
6378
|
+
Object.defineProperty(input, 'defaultValue', {
|
|
6379
|
+
get: ()=>input.value,
|
|
6380
|
+
set: ()=>{},
|
|
6381
|
+
configurable: true
|
|
6382
|
+
});
|
|
6383
|
+
}
|
|
6384
|
+
}, [
|
|
6385
|
+
ref
|
|
6386
|
+
]);
|
|
6387
|
+
return {
|
|
6388
|
+
labelProps: labelProps,
|
|
6389
|
+
inputProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, inputElementType === 'input' ? inputOnlyProps : undefined, {
|
|
6390
|
+
disabled: isDisabled,
|
|
6391
|
+
readOnly: isReadOnly,
|
|
6392
|
+
required: isRequired && validationBehavior === 'native',
|
|
6393
|
+
'aria-required': isRequired && validationBehavior === 'aria' || undefined,
|
|
6394
|
+
'aria-invalid': isInvalid || undefined,
|
|
6395
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
6396
|
+
'aria-activedescendant': props['aria-activedescendant'],
|
|
6397
|
+
'aria-autocomplete': props['aria-autocomplete'],
|
|
6398
|
+
'aria-haspopup': props['aria-haspopup'],
|
|
6399
|
+
value: value,
|
|
6400
|
+
onChange: (e)=>setValue(e.target.value),
|
|
6401
|
+
autoComplete: props.autoComplete,
|
|
6402
|
+
autoCapitalize: props.autoCapitalize,
|
|
6403
|
+
maxLength: props.maxLength,
|
|
6404
|
+
minLength: props.minLength,
|
|
6405
|
+
name: props.name,
|
|
6406
|
+
placeholder: props.placeholder,
|
|
6407
|
+
inputMode: props.inputMode,
|
|
6408
|
+
// Clipboard events
|
|
6409
|
+
onCopy: props.onCopy,
|
|
6410
|
+
onCut: props.onCut,
|
|
6411
|
+
onPaste: props.onPaste,
|
|
6412
|
+
// Composition events
|
|
6413
|
+
onCompositionEnd: props.onCompositionEnd,
|
|
6414
|
+
onCompositionStart: props.onCompositionStart,
|
|
6415
|
+
onCompositionUpdate: props.onCompositionUpdate,
|
|
6416
|
+
// Selection events
|
|
6417
|
+
onSelect: props.onSelect,
|
|
6418
|
+
// Input events
|
|
6419
|
+
onBeforeInput: props.onBeforeInput,
|
|
6420
|
+
onInput: props.onInput,
|
|
6421
|
+
...focusableProps,
|
|
6422
|
+
...fieldProps
|
|
6423
|
+
}),
|
|
6424
|
+
descriptionProps: descriptionProps,
|
|
6425
|
+
errorMessageProps: errorMessageProps,
|
|
6426
|
+
isInvalid: isInvalid,
|
|
6427
|
+
validationErrors: validationErrors,
|
|
6428
|
+
validationDetails: validationDetails
|
|
6429
|
+
};
|
|
6430
|
+
}
|
|
6431
|
+
|
|
6161
6432
|
/*
|
|
6162
6433
|
* Copyright 2020 Adobe. All rights reserved.
|
|
6163
6434
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -6194,12 +6465,12 @@ const $edcf132a9284368a$var$TOTAL_SIZE = {
|
|
|
6194
6465
|
height: 'totalHeight'
|
|
6195
6466
|
};
|
|
6196
6467
|
const $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {};
|
|
6197
|
-
|
|
6198
|
-
let $edcf132a9284368a$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
6468
|
+
let $edcf132a9284368a$var$visualViewport = typeof document !== 'undefined' ? window.visualViewport : null;
|
|
6199
6469
|
function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
|
|
6200
6470
|
let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;
|
|
6201
6471
|
let scroll = {};
|
|
6202
|
-
|
|
6472
|
+
var _visualViewport_scale;
|
|
6473
|
+
let isPinchZoomedIn = ((_visualViewport_scale = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.scale) !== null && _visualViewport_scale !== void 0 ? _visualViewport_scale : 1) > 1;
|
|
6203
6474
|
if (containerNode.tagName === 'BODY') {
|
|
6204
6475
|
let documentElement = document.documentElement;
|
|
6205
6476
|
totalWidth = documentElement.clientWidth;
|
|
@@ -6231,8 +6502,10 @@ function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
|
|
|
6231
6502
|
// before pinch zoom happens
|
|
6232
6503
|
scroll.top = 0;
|
|
6233
6504
|
scroll.left = 0;
|
|
6234
|
-
|
|
6235
|
-
|
|
6505
|
+
var _visualViewport_pageTop;
|
|
6506
|
+
top = (_visualViewport_pageTop = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.pageTop) !== null && _visualViewport_pageTop !== void 0 ? _visualViewport_pageTop : 0;
|
|
6507
|
+
var _visualViewport_pageLeft;
|
|
6508
|
+
left = (_visualViewport_pageLeft = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.pageLeft) !== null && _visualViewport_pageLeft !== void 0 ? _visualViewport_pageLeft : 0;
|
|
6236
6509
|
}
|
|
6237
6510
|
return {
|
|
6238
6511
|
width: width,
|
|
@@ -6261,7 +6534,8 @@ boundaryDimensions, // The dimensions of the containing block element that the p
|
|
|
6261
6534
|
// is portaled somewhere other than the body and has an ancestor with
|
|
6262
6535
|
// position: relative/absolute, it will be different.
|
|
6263
6536
|
containerDimensions, padding, containerOffsetWithBoundary) {
|
|
6264
|
-
|
|
6537
|
+
var _containerDimensions_scroll_axis;
|
|
6538
|
+
let containerScroll = (_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0;
|
|
6265
6539
|
// The height/width of the boundary. Matches the axis along which we are adjusting the overlay position
|
|
6266
6540
|
let boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]];
|
|
6267
6541
|
// Calculate the edges of the boundary (accomodating for the boundary padding) and the edges of the overlay.
|
|
@@ -6306,14 +6580,16 @@ function $edcf132a9284368a$var$parsePlacement(input) {
|
|
|
6306
6580
|
function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset) {
|
|
6307
6581
|
let { placement: placement, crossPlacement: crossPlacement, axis: axis, crossAxis: crossAxis, size: size, crossSize: crossSize } = placementInfo;
|
|
6308
6582
|
let position = {};
|
|
6583
|
+
var _childOffset_crossAxis;
|
|
6309
6584
|
// button position
|
|
6310
|
-
position[crossAxis] = childOffset[crossAxis];
|
|
6585
|
+
position[crossAxis] = (_childOffset_crossAxis = childOffset[crossAxis]) !== null && _childOffset_crossAxis !== void 0 ? _childOffset_crossAxis : 0;
|
|
6586
|
+
var _childOffset_crossSize, _overlaySize_crossSize, _childOffset_crossSize1, _overlaySize_crossSize1;
|
|
6311
6587
|
if (crossPlacement === 'center') // + (button size / 2) - (overlay size / 2)
|
|
6312
6588
|
// at this point the overlay center should match the button center
|
|
6313
|
-
position[crossAxis] += (childOffset[crossSize] - overlaySize[crossSize]) / 2;
|
|
6589
|
+
position[crossAxis] += (((_childOffset_crossSize = childOffset[crossSize]) !== null && _childOffset_crossSize !== void 0 ? _childOffset_crossSize : 0) - ((_overlaySize_crossSize = overlaySize[crossSize]) !== null && _overlaySize_crossSize !== void 0 ? _overlaySize_crossSize : 0)) / 2;
|
|
6314
6590
|
else if (crossPlacement !== crossAxis) // + (button size) - (overlay size)
|
|
6315
6591
|
// at this point the overlay bottom should match the button bottom
|
|
6316
|
-
position[crossAxis] += childOffset[crossSize] - overlaySize[crossSize];
|
|
6592
|
+
position[crossAxis] += ((_childOffset_crossSize1 = childOffset[crossSize]) !== null && _childOffset_crossSize1 !== void 0 ? _childOffset_crossSize1 : 0) - ((_overlaySize_crossSize1 = overlaySize[crossSize]) !== null && _overlaySize_crossSize1 !== void 0 ? _overlaySize_crossSize1 : 0);
|
|
6317
6593
|
/* else {
|
|
6318
6594
|
the overlay top should match the button top
|
|
6319
6595
|
} */
|
|
@@ -6336,23 +6612,26 @@ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions,
|
|
|
6336
6612
|
}
|
|
6337
6613
|
function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection) {
|
|
6338
6614
|
const containerHeight = isContainerPositioned ? containerOffsetWithBoundary.height : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height];
|
|
6615
|
+
var _position_bottom;
|
|
6339
6616
|
// For cases where position is set via "bottom" instead of "top", we need to calculate the true overlay top with respect to the boundary. Reverse calculate this with the same method
|
|
6340
6617
|
// used in computePosition.
|
|
6341
|
-
let overlayTop = position.top != null ? containerOffsetWithBoundary.top + position.top : containerOffsetWithBoundary.top + (containerHeight - position.bottom - overlayHeight);
|
|
6618
|
+
let overlayTop = position.top != null ? containerOffsetWithBoundary.top + position.top : containerOffsetWithBoundary.top + (containerHeight - ((_position_bottom = position.bottom) !== null && _position_bottom !== void 0 ? _position_bottom : 0) - overlayHeight);
|
|
6619
|
+
var _boundaryDimensions_scroll_top, _margins_top, _margins_bottom, _boundaryDimensions_scroll_top1, _margins_top1, _margins_bottom1;
|
|
6342
6620
|
let maxHeight = heightGrowthDirection !== 'top' ? // We want the distance between the top of the overlay to the bottom of the boundary
|
|
6343
|
-
Math.max(0, boundaryDimensions.height + boundaryDimensions.top + boundaryDimensions.scroll.top // this is the
|
|
6344
|
-
-
|
|
6345
|
-
- (margins.top + margins.bottom + padding // save additional space for margin and padding
|
|
6621
|
+
Math.max(0, boundaryDimensions.height + boundaryDimensions.top + ((_boundaryDimensions_scroll_top = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top !== void 0 ? _boundaryDimensions_scroll_top : 0) - overlayTop // this is the top of the overlay
|
|
6622
|
+
- (((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0) + padding // save additional space for margin and padding
|
|
6346
6623
|
)) : Math.max(0, overlayTop + overlayHeight // this is the bottom of the overlay
|
|
6347
|
-
- (boundaryDimensions.top + boundaryDimensions.scroll.top // this is the top of the boundary
|
|
6348
|
-
) - (margins.top + margins.bottom + padding // save additional space for margin and padding
|
|
6624
|
+
- (boundaryDimensions.top + ((_boundaryDimensions_scroll_top1 = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top1 !== void 0 ? _boundaryDimensions_scroll_top1 : 0) // this is the top of the boundary
|
|
6625
|
+
) - (((_margins_top1 = margins.top) !== null && _margins_top1 !== void 0 ? _margins_top1 : 0) + ((_margins_bottom1 = margins.bottom) !== null && _margins_bottom1 !== void 0 ? _margins_bottom1 : 0) + padding // save additional space for margin and padding
|
|
6349
6626
|
));
|
|
6350
6627
|
return Math.min(boundaryDimensions.height - padding * 2, maxHeight);
|
|
6351
6628
|
}
|
|
6352
6629
|
function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
|
|
6353
6630
|
let { placement: placement, axis: axis, size: size } = placementInfo;
|
|
6354
|
-
|
|
6355
|
-
return Math.max(0,
|
|
6631
|
+
var _boundaryDimensions_scroll_axis, _margins_axis;
|
|
6632
|
+
if (placement === axis) return Math.max(0, childOffset[axis] - boundaryDimensions[axis] - ((_boundaryDimensions_scroll_axis = boundaryDimensions.scroll[axis]) !== null && _boundaryDimensions_scroll_axis !== void 0 ? _boundaryDimensions_scroll_axis : 0) + containerOffsetWithBoundary[axis] - ((_margins_axis = margins[axis]) !== null && _margins_axis !== void 0 ? _margins_axis : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
|
|
6633
|
+
var _margins_axis1;
|
|
6634
|
+
return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + boundaryDimensions.scroll[axis] - containerOffsetWithBoundary[axis] - childOffset[axis] - childOffset[size] - ((_margins_axis1 = margins[axis]) !== null && _margins_axis1 !== void 0 ? _margins_axis1 : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
|
|
6356
6635
|
}
|
|
6357
6636
|
function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset) {
|
|
6358
6637
|
let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput);
|
|
@@ -6398,8 +6677,9 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
|
|
|
6398
6677
|
let preferredArrowPosition = childOffset[crossAxis] + .5 * childOffset[crossSize] - position[crossAxis] - margins[$edcf132a9284368a$var$AXIS[crossAxis]];
|
|
6399
6678
|
// Min/Max position limits for the arrow with respect to the overlay
|
|
6400
6679
|
const arrowMinPosition = arrowSize / 2 + arrowBoundaryOffset;
|
|
6680
|
+
var _margins_left, _margins_right, _margins_top, _margins_bottom;
|
|
6401
6681
|
// overlaySize[crossSize] - margins = true size of the overlay
|
|
6402
|
-
const overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === 'left' ? margins.left + margins.right : margins.top + margins.bottom;
|
|
6682
|
+
const overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === 'left' ? ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0) : ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
|
|
6403
6683
|
const arrowMaxPosition = overlaySize[crossSize] - overlayMargin - arrowSize / 2 - arrowBoundaryOffset;
|
|
6404
6684
|
// Min/Max position limits for the arrow with respect to the trigger/overlay anchor element
|
|
6405
6685
|
// Same margin accomodation done here as well as for the preferredArrowPosition
|
|
@@ -6430,8 +6710,10 @@ function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
|
|
|
6430
6710
|
}
|
|
6431
6711
|
let overlaySize = $edcf132a9284368a$var$getOffset(overlayNode);
|
|
6432
6712
|
let margins = $edcf132a9284368a$var$getMargins(overlayNode);
|
|
6433
|
-
|
|
6434
|
-
overlaySize.
|
|
6713
|
+
var _margins_left, _margins_right;
|
|
6714
|
+
overlaySize.width += ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0);
|
|
6715
|
+
var _margins_top, _margins_bottom;
|
|
6716
|
+
overlaySize.height += ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
|
|
6435
6717
|
let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode);
|
|
6436
6718
|
let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement);
|
|
6437
6719
|
let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container);
|
|
@@ -6504,9 +6786,7 @@ function $edcf132a9284368a$var$getContainingBlock(node) {
|
|
|
6504
6786
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
6505
6787
|
function $edcf132a9284368a$var$isContainingBlock(node) {
|
|
6506
6788
|
let style = window.getComputedStyle(node);
|
|
6507
|
-
return style.transform !== 'none' || /transform|perspective/.test(style.willChange) || style.filter !== 'none' || style.contain === 'paint' ||
|
|
6508
|
-
'backdropFilter' in style && style.backdropFilter !== 'none' || // @ts-ignore
|
|
6509
|
-
'WebkitBackdropFilter' in style && style.WebkitBackdropFilter !== 'none';
|
|
6789
|
+
return style.transform !== 'none' || /transform|perspective/.test(style.willChange) || style.filter !== 'none' || style.contain === 'paint' || 'backdropFilter' in style && style.backdropFilter !== 'none' || 'WebkitBackdropFilter' in style && style.WebkitBackdropFilter !== 'none';
|
|
6510
6790
|
}
|
|
6511
6791
|
|
|
6512
6792
|
/*
|
|
@@ -6563,18 +6843,11 @@ function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
|
6563
6843
|
|
|
6564
6844
|
|
|
6565
6845
|
|
|
6566
|
-
|
|
6567
|
-
let $2a41e45df1593e64$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
6846
|
+
let $2a41e45df1593e64$var$visualViewport = typeof document !== 'undefined' ? window.visualViewport : null;
|
|
6568
6847
|
function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
6569
6848
|
let { direction: direction } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
6570
6849
|
let { arrowSize: arrowSize = 0, targetRef: targetRef, overlayRef: overlayRef, scrollRef: scrollRef = overlayRef, placement: placement = 'bottom', containerPadding: containerPadding = 12, shouldFlip: shouldFlip = true, boundaryElement: boundaryElement = typeof document !== 'undefined' ? document.body : null, offset: offset = 0, crossOffset: crossOffset = 0, shouldUpdatePosition: shouldUpdatePosition = true, isOpen: isOpen = true, onClose: onClose, maxHeight: maxHeight, arrowBoundaryOffset: arrowBoundaryOffset = 0 } = props;
|
|
6571
|
-
let [position, setPosition] = (useState)(
|
|
6572
|
-
position: {},
|
|
6573
|
-
arrowOffsetLeft: undefined,
|
|
6574
|
-
arrowOffsetTop: undefined,
|
|
6575
|
-
maxHeight: undefined,
|
|
6576
|
-
placement: undefined
|
|
6577
|
-
});
|
|
6850
|
+
let [position, setPosition] = (useState)(null);
|
|
6578
6851
|
let deps = [
|
|
6579
6852
|
shouldUpdatePosition,
|
|
6580
6853
|
placement,
|
|
@@ -6610,17 +6883,20 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6610
6883
|
// changes, the focused element appears to stay in the same position.
|
|
6611
6884
|
let anchor = null;
|
|
6612
6885
|
if (scrollRef.current && scrollRef.current.contains(document.activeElement)) {
|
|
6613
|
-
|
|
6886
|
+
var _document_activeElement;
|
|
6887
|
+
let anchorRect = (_document_activeElement = document.activeElement) === null || _document_activeElement === void 0 ? void 0 : _document_activeElement.getBoundingClientRect();
|
|
6614
6888
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6889
|
+
var _anchorRect_top;
|
|
6615
6890
|
// Anchor from the top if the offset is in the top half of the scrollable element,
|
|
6616
6891
|
// otherwise anchor from the bottom.
|
|
6617
6892
|
anchor = {
|
|
6618
6893
|
type: 'top',
|
|
6619
|
-
offset: anchorRect.top - scrollRect.top
|
|
6894
|
+
offset: ((_anchorRect_top = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.top) !== null && _anchorRect_top !== void 0 ? _anchorRect_top : 0) - scrollRect.top
|
|
6620
6895
|
};
|
|
6621
6896
|
if (anchor.offset > scrollRect.height / 2) {
|
|
6622
6897
|
anchor.type = 'bottom';
|
|
6623
|
-
|
|
6898
|
+
var _anchorRect_bottom;
|
|
6899
|
+
anchor.offset = ((_anchorRect_bottom = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.bottom) !== null && _anchorRect_bottom !== void 0 ? _anchorRect_bottom : 0) - scrollRect.bottom;
|
|
6624
6900
|
}
|
|
6625
6901
|
}
|
|
6626
6902
|
// Always reset the overlay's previous max height if not defined by the user so that we can compensate for
|
|
@@ -6647,6 +6923,7 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6647
6923
|
arrowSize: arrowSize,
|
|
6648
6924
|
arrowBoundaryOffset: arrowBoundaryOffset
|
|
6649
6925
|
});
|
|
6926
|
+
if (!position.position) return;
|
|
6650
6927
|
// Modify overlay styles directly so positioning happens immediately without the need of a second render
|
|
6651
6928
|
// This is so we don't have to delay autoFocus scrolling or delay applying preventScroll for popovers
|
|
6652
6929
|
overlay.style.top = '';
|
|
@@ -6654,9 +6931,9 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6654
6931
|
overlay.style.left = '';
|
|
6655
6932
|
overlay.style.right = '';
|
|
6656
6933
|
Object.keys(position.position).forEach((key)=>overlay.style[key] = position.position[key] + 'px');
|
|
6657
|
-
overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + 'px' :
|
|
6934
|
+
overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + 'px' : '';
|
|
6658
6935
|
// Restore scroll position relative to anchor element.
|
|
6659
|
-
if (anchor) {
|
|
6936
|
+
if (anchor && document.activeElement && scrollRef.current) {
|
|
6660
6937
|
let anchorRect = document.activeElement.getBoundingClientRect();
|
|
6661
6938
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6662
6939
|
let newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];
|
|
@@ -6709,7 +6986,7 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6709
6986
|
updatePosition
|
|
6710
6987
|
]);
|
|
6711
6988
|
let close = (useCallback)(()=>{
|
|
6712
|
-
if (!isResizing.current) onClose();
|
|
6989
|
+
if (!isResizing.current) onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
6713
6990
|
}, [
|
|
6714
6991
|
onClose,
|
|
6715
6992
|
isResizing
|
|
@@ -6721,23 +6998,23 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6721
6998
|
isOpen: isOpen,
|
|
6722
6999
|
onClose: onClose && close
|
|
6723
7000
|
});
|
|
6724
|
-
var _position_maxHeight;
|
|
7001
|
+
var _position_maxHeight, _position_placement;
|
|
6725
7002
|
return {
|
|
6726
7003
|
overlayProps: {
|
|
6727
7004
|
style: {
|
|
6728
7005
|
position: 'absolute',
|
|
6729
7006
|
zIndex: 100000,
|
|
6730
|
-
...position.position,
|
|
6731
|
-
maxHeight: (_position_maxHeight = position.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : '100vh'
|
|
7007
|
+
...position === null || position === void 0 ? void 0 : position.position,
|
|
7008
|
+
maxHeight: (_position_maxHeight = position === null || position === void 0 ? void 0 : position.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : '100vh'
|
|
6732
7009
|
}
|
|
6733
7010
|
},
|
|
6734
|
-
placement: position.placement,
|
|
7011
|
+
placement: (_position_placement = position === null || position === void 0 ? void 0 : position.placement) !== null && _position_placement !== void 0 ? _position_placement : null,
|
|
6735
7012
|
arrowProps: {
|
|
6736
7013
|
'aria-hidden': 'true',
|
|
6737
7014
|
role: 'presentation',
|
|
6738
7015
|
style: {
|
|
6739
|
-
left: position.arrowOffsetLeft,
|
|
6740
|
-
top: position.arrowOffsetTop
|
|
7016
|
+
left: position === null || position === void 0 ? void 0 : position.arrowOffsetLeft,
|
|
7017
|
+
top: position === null || position === void 0 ? void 0 : position.arrowOffsetTop
|
|
6741
7018
|
}
|
|
6742
7019
|
},
|
|
6743
7020
|
updatePosition: updatePosition
|
|
@@ -6817,7 +7094,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
6817
7094
|
// Handle clicking outside the overlay to close it
|
|
6818
7095
|
($e0b6e0b68ec7f50f$export$872b660ac5a1ff98)({
|
|
6819
7096
|
ref: ref,
|
|
6820
|
-
onInteractOutside: isDismissable && isOpen ? onInteractOutside :
|
|
7097
|
+
onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,
|
|
6821
7098
|
onInteractOutsideStart: onInteractOutsideStart
|
|
6822
7099
|
});
|
|
6823
7100
|
let { focusWithinProps: focusWithinProps } = ($9ab94262bd0047c7$export$420e68273165f4ec)({
|
|
@@ -6833,7 +7110,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
6833
7110
|
// do not close the outer overlay. At this point, the active scope should
|
|
6834
7111
|
// still be the outer overlay, since blur events run before focus.
|
|
6835
7112
|
if (!e.relatedTarget || ($9bf71ea28793e738$export$1258395f99bf9cbf)(e.relatedTarget)) return;
|
|
6836
|
-
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose();
|
|
7113
|
+
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
6837
7114
|
}
|
|
6838
7115
|
});
|
|
6839
7116
|
let onPointerDownUnderlay = (e)=>{
|
|
@@ -6884,7 +7161,7 @@ function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
6884
7161
|
triggerProps: {
|
|
6885
7162
|
'aria-haspopup': ariaHasPopup,
|
|
6886
7163
|
'aria-expanded': isOpen,
|
|
6887
|
-
'aria-controls': isOpen ? overlayId :
|
|
7164
|
+
'aria-controls': isOpen ? overlayId : undefined,
|
|
6888
7165
|
onPress: state.toggle
|
|
6889
7166
|
},
|
|
6890
7167
|
overlayProps: {
|
|
@@ -6904,7 +7181,6 @@ function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
6904
7181
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
6905
7182
|
* governing permissions and limitations under the License.
|
|
6906
7183
|
*/
|
|
6907
|
-
// @ts-ignore
|
|
6908
7184
|
const $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
6909
7185
|
// HTML input types that do not cause the software keyboard to appear.
|
|
6910
7186
|
const $49c51c25361d4cd2$var$nonTextInputTypes = new Set([
|
|
@@ -7087,22 +7363,26 @@ function $49c51c25361d4cd2$var$setStyle(element, style, value) {
|
|
|
7087
7363
|
}
|
|
7088
7364
|
// Adds an event listener to an element, and returns a function to remove it.
|
|
7089
7365
|
function $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {
|
|
7366
|
+
// internal function, so it's ok to ignore the difficult to fix type error
|
|
7367
|
+
// @ts-ignore
|
|
7090
7368
|
target.addEventListener(event, handler, options);
|
|
7091
7369
|
return ()=>{
|
|
7370
|
+
// @ts-ignore
|
|
7092
7371
|
target.removeEventListener(event, handler, options);
|
|
7093
7372
|
};
|
|
7094
7373
|
}
|
|
7095
7374
|
function $49c51c25361d4cd2$var$scrollIntoView(target) {
|
|
7096
7375
|
let root = document.scrollingElement || document.documentElement;
|
|
7097
|
-
|
|
7376
|
+
let nextTarget = target;
|
|
7377
|
+
while(nextTarget && nextTarget !== root){
|
|
7098
7378
|
// Find the parent scrollable element and adjust the scroll position if the target is not already in view.
|
|
7099
|
-
let scrollable = ($62d8ded9296f3872$export$cfa2225e87938781)(
|
|
7100
|
-
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !==
|
|
7379
|
+
let scrollable = ($62d8ded9296f3872$export$cfa2225e87938781)(nextTarget);
|
|
7380
|
+
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {
|
|
7101
7381
|
let scrollableTop = scrollable.getBoundingClientRect().top;
|
|
7102
|
-
let targetTop =
|
|
7103
|
-
if (targetTop > scrollableTop +
|
|
7382
|
+
let targetTop = nextTarget.getBoundingClientRect().top;
|
|
7383
|
+
if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;
|
|
7104
7384
|
}
|
|
7105
|
-
|
|
7385
|
+
nextTarget = scrollable.parentElement;
|
|
7106
7386
|
}
|
|
7107
7387
|
}
|
|
7108
7388
|
function $49c51c25361d4cd2$var$willOpenKeyboard(target) {
|
|
@@ -7150,7 +7430,7 @@ function $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {
|
|
|
7150
7430
|
let context = (useContext)($f57aed4a881a3485$var$Context);
|
|
7151
7431
|
return {
|
|
7152
7432
|
modalProviderProps: {
|
|
7153
|
-
'aria-hidden': context && context.modalCount > 0 ? true :
|
|
7433
|
+
'aria-hidden': context && context.modalCount > 0 ? true : undefined
|
|
7154
7434
|
}
|
|
7155
7435
|
};
|
|
7156
7436
|
}
|
|
@@ -7422,64 +7702,6 @@ $a2f21f5f14f60553$exports = {
|
|
|
7422
7702
|
"zh-TW": $2b2734393847c884$exports
|
|
7423
7703
|
};
|
|
7424
7704
|
|
|
7425
|
-
/*
|
|
7426
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7427
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7428
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7429
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7430
|
-
*
|
|
7431
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
7432
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
7433
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
7434
|
-
* governing permissions and limitations under the License.
|
|
7435
|
-
*/
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
const $5c3e21d68f1c4674$var$styles = {
|
|
7439
|
-
border: 0,
|
|
7440
|
-
clip: 'rect(0 0 0 0)',
|
|
7441
|
-
clipPath: 'inset(50%)',
|
|
7442
|
-
height: '1px',
|
|
7443
|
-
margin: '-1px',
|
|
7444
|
-
overflow: 'hidden',
|
|
7445
|
-
padding: 0,
|
|
7446
|
-
position: 'absolute',
|
|
7447
|
-
width: '1px',
|
|
7448
|
-
whiteSpace: 'nowrap'
|
|
7449
|
-
};
|
|
7450
|
-
function $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {
|
|
7451
|
-
let { style: style, isFocusable: isFocusable } = props;
|
|
7452
|
-
let [isFocused, setFocused] = (useState)(false);
|
|
7453
|
-
let { focusWithinProps: focusWithinProps } = ($9ab94262bd0047c7$export$420e68273165f4ec)({
|
|
7454
|
-
isDisabled: !isFocusable,
|
|
7455
|
-
onFocusWithinChange: (val)=>setFocused(val)
|
|
7456
|
-
});
|
|
7457
|
-
// If focused, don't hide the element.
|
|
7458
|
-
let combinedStyles = (useMemo)(()=>{
|
|
7459
|
-
if (isFocused) return style;
|
|
7460
|
-
else if (style) return {
|
|
7461
|
-
...$5c3e21d68f1c4674$var$styles,
|
|
7462
|
-
...style
|
|
7463
|
-
};
|
|
7464
|
-
else return $5c3e21d68f1c4674$var$styles;
|
|
7465
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7466
|
-
}, [
|
|
7467
|
-
isFocused
|
|
7468
|
-
]);
|
|
7469
|
-
return {
|
|
7470
|
-
visuallyHiddenProps: {
|
|
7471
|
-
...focusWithinProps,
|
|
7472
|
-
style: combinedStyles
|
|
7473
|
-
}
|
|
7474
|
-
};
|
|
7475
|
-
}
|
|
7476
|
-
function $5c3e21d68f1c4674$export$439d29a4e110a164(props) {
|
|
7477
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7478
|
-
let { children: children, elementType: Element = 'div', isFocusable: isFocusable, style: style, ...otherProps } = props;
|
|
7479
|
-
let { visuallyHiddenProps: visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);
|
|
7480
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(Element, ($3ef42575df84b30b$export$9d1611c77c2fe928)(otherProps, visuallyHiddenProps), children);
|
|
7481
|
-
}
|
|
7482
|
-
|
|
7483
7705
|
function $parcel$interopDefault$5(a) {
|
|
7484
7706
|
return a && a.__esModule ? a.default : a;
|
|
7485
7707
|
}
|
|
@@ -7541,7 +7763,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
7541
7763
|
// Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is
|
|
7542
7764
|
// made for elements with role="row" since VoiceOver on iOS has issues hiding elements with role="row".
|
|
7543
7765
|
// For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).
|
|
7544
|
-
if (visibleNodes.has(node) || hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
|
|
7766
|
+
if (visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
|
|
7545
7767
|
// Skip this node but continue to children if one of the targets is inside the node.
|
|
7546
7768
|
for (let target of visibleNodes){
|
|
7547
7769
|
if (node.contains(target)) return NodeFilter.FILTER_SKIP;
|
|
@@ -7616,6 +7838,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
7616
7838
|
observer.disconnect();
|
|
7617
7839
|
for (let node of hiddenNodes){
|
|
7618
7840
|
let count = $5e3802645cc19319$var$refCountMap.get(node);
|
|
7841
|
+
if (count == null) continue;
|
|
7619
7842
|
if (count === 1) {
|
|
7620
7843
|
node.removeAttribute('aria-hidden');
|
|
7621
7844
|
$5e3802645cc19319$var$refCountMap.delete(node);
|
|
@@ -7647,7 +7870,8 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
7647
7870
|
function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
|
|
7648
7871
|
let { triggerRef: triggerRef, popoverRef: popoverRef, isNonModal: isNonModal, isKeyboardDismissDisabled: isKeyboardDismissDisabled, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside, ...otherProps } = props;
|
|
7649
7872
|
let { overlayProps: overlayProps, underlayProps: underlayProps } = ($a11501f3d1d39e6c$export$ea8f71083e90600f)({
|
|
7650
|
-
|
|
7873
|
+
// If popover is in the top layer, it should not prevent other popovers from being dismissed.
|
|
7874
|
+
isOpen: state.isOpen && !otherProps['data-react-aria-top-layer'],
|
|
7651
7875
|
onClose: state.close,
|
|
7652
7876
|
shouldCloseOnBlur: true,
|
|
7653
7877
|
isDismissable: !isNonModal,
|
|
@@ -7659,7 +7883,7 @@ function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
|
|
|
7659
7883
|
targetRef: triggerRef,
|
|
7660
7884
|
overlayRef: popoverRef,
|
|
7661
7885
|
isOpen: state.isOpen,
|
|
7662
|
-
onClose: isNonModal ? state.close :
|
|
7886
|
+
onClose: isNonModal ? state.close : undefined
|
|
7663
7887
|
});
|
|
7664
7888
|
($49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({
|
|
7665
7889
|
isDisabled: isNonModal || !state.isOpen
|
|
@@ -7777,7 +8001,7 @@ function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
|
7777
8001
|
});
|
|
7778
8002
|
($337b884510726a0d$export$14c98a7594375490)();
|
|
7779
8003
|
(useEffect)(()=>{
|
|
7780
|
-
if (state.isOpen) return ($5e3802645cc19319$export$1c3ebcada18427bf)([
|
|
8004
|
+
if (state.isOpen && ref.current) return ($5e3802645cc19319$export$1c3ebcada18427bf)([
|
|
7781
8005
|
ref.current
|
|
7782
8006
|
]);
|
|
7783
8007
|
}, [
|
|
@@ -7850,7 +8074,7 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
7850
8074
|
let { keyboardDelegate: keyboardDelegate, selectionManager: selectionManager, onTypeSelect: onTypeSelect } = options;
|
|
7851
8075
|
let state = (useRef)({
|
|
7852
8076
|
search: '',
|
|
7853
|
-
timeout:
|
|
8077
|
+
timeout: undefined
|
|
7854
8078
|
}).current;
|
|
7855
8079
|
let onKeyDown = (e)=>{
|
|
7856
8080
|
let character = $fb3050f43d946246$var$getStringForKey(e.key);
|
|
@@ -7864,14 +8088,16 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
7864
8088
|
if (!('continuePropagation' in e)) e.stopPropagation();
|
|
7865
8089
|
}
|
|
7866
8090
|
state.search += character;
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
8091
|
+
if (keyboardDelegate.getKeyForSearch != null) {
|
|
8092
|
+
// Use the delegate to find a key to focus.
|
|
8093
|
+
// Prioritize items after the currently focused item, falling back to searching the whole list.
|
|
8094
|
+
let key = keyboardDelegate.getKeyForSearch(state.search, selectionManager.focusedKey);
|
|
8095
|
+
// If no key found, search from the top.
|
|
8096
|
+
if (key == null) key = keyboardDelegate.getKeyForSearch(state.search);
|
|
8097
|
+
if (key != null) {
|
|
8098
|
+
selectionManager.setFocusedKey(key);
|
|
8099
|
+
if (onTypeSelect) onTypeSelect(key);
|
|
8100
|
+
}
|
|
7875
8101
|
}
|
|
7876
8102
|
clearTimeout(state.timeout);
|
|
7877
8103
|
state.timeout = setTimeout(()=>{
|
|
@@ -7882,7 +8108,7 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
7882
8108
|
typeSelectProps: {
|
|
7883
8109
|
// Using a capturing listener to catch the keydown event before
|
|
7884
8110
|
// other hooks in order to handle the Spacebar event.
|
|
7885
|
-
onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown :
|
|
8111
|
+
onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : undefined
|
|
7886
8112
|
}
|
|
7887
8113
|
};
|
|
7888
8114
|
}
|
|
@@ -7919,21 +8145,23 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7919
8145
|
let { direction: direction } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
7920
8146
|
let router = ($ea8dcbcb9ea1b556$export$9a302a45f65d0572)();
|
|
7921
8147
|
let onKeyDown = (e)=>{
|
|
8148
|
+
var _ref_current;
|
|
7922
8149
|
// Prevent option + tab from doing anything since it doesn't move focus to the cells, only buttons/checkboxes
|
|
7923
8150
|
if (e.altKey && e.key === 'Tab') e.preventDefault();
|
|
7924
8151
|
// Keyboard events bubble through portals. Don't handle keyboard events
|
|
7925
8152
|
// for elements outside the collection (e.g. menus).
|
|
7926
|
-
if (!ref.current.contains(e.target)) return;
|
|
8153
|
+
if (!((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(e.target))) return;
|
|
7927
8154
|
const navigateToKey = (key, childFocus)=>{
|
|
7928
8155
|
if (key != null) {
|
|
7929
8156
|
if (manager.isLink(key) && linkBehavior === 'selection' && selectOnFocus && !($feb5ffebff200149$export$d3e3bd3e26688c04)(e)) {
|
|
8157
|
+
var _scrollRef_current;
|
|
7930
8158
|
// Set focused key and re-render synchronously to bring item into view if needed.
|
|
7931
8159
|
(flushSync)(()=>{
|
|
7932
8160
|
manager.setFocusedKey(key, childFocus);
|
|
7933
8161
|
});
|
|
7934
|
-
let item = scrollRef.current.querySelector(`[data-key="${CSS.escape(key.toString())}"]`);
|
|
8162
|
+
let item = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.querySelector(`[data-key="${CSS.escape(key.toString())}"]`);
|
|
7935
8163
|
let itemProps = manager.getItemProps(key);
|
|
7936
|
-
router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
8164
|
+
if (item) router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
7937
8165
|
return;
|
|
7938
8166
|
}
|
|
7939
8167
|
manager.setFocusedKey(key, childFocus);
|
|
@@ -7945,38 +8173,46 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7945
8173
|
switch(e.key){
|
|
7946
8174
|
case 'ArrowDown':
|
|
7947
8175
|
if (delegate.getKeyBelow) {
|
|
7948
|
-
var _delegate_getFirstKey, _delegate_getFirstKey1;
|
|
7949
|
-
|
|
7950
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow(manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
|
|
8176
|
+
var _delegate_getKeyBelow, _delegate_getFirstKey, _delegate_getFirstKey1;
|
|
8177
|
+
let nextKey = manager.focusedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
|
|
7951
8178
|
if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
|
|
7952
|
-
|
|
8179
|
+
if (nextKey != null) {
|
|
8180
|
+
e.preventDefault();
|
|
8181
|
+
navigateToKey(nextKey);
|
|
8182
|
+
}
|
|
7953
8183
|
}
|
|
7954
8184
|
break;
|
|
7955
8185
|
case 'ArrowUp':
|
|
7956
8186
|
if (delegate.getKeyAbove) {
|
|
7957
|
-
var _delegate_getLastKey, _delegate_getLastKey1;
|
|
7958
|
-
|
|
7959
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove(manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
|
|
8187
|
+
var _delegate_getKeyAbove, _delegate_getLastKey, _delegate_getLastKey1;
|
|
8188
|
+
let nextKey = manager.focusedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
|
|
7960
8189
|
if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey);
|
|
7961
|
-
|
|
8190
|
+
if (nextKey != null) {
|
|
8191
|
+
e.preventDefault();
|
|
8192
|
+
navigateToKey(nextKey);
|
|
8193
|
+
}
|
|
7962
8194
|
}
|
|
7963
8195
|
break;
|
|
7964
8196
|
case 'ArrowLeft':
|
|
7965
8197
|
if (delegate.getKeyLeftOf) {
|
|
7966
|
-
var _delegate_getFirstKey2, _delegate_getLastKey2;
|
|
7967
|
-
|
|
7968
|
-
let nextKey = delegate.getKeyLeftOf(manager.focusedKey);
|
|
8198
|
+
var _delegate_getKeyLeftOf, _delegate_getFirstKey2, _delegate_getLastKey2;
|
|
8199
|
+
let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === void 0 ? void 0 : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
|
|
7969
8200
|
if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === void 0 ? void 0 : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === void 0 ? void 0 : _delegate_getLastKey2.call(delegate, manager.focusedKey);
|
|
7970
|
-
|
|
8201
|
+
if (nextKey != null) {
|
|
8202
|
+
e.preventDefault();
|
|
8203
|
+
navigateToKey(nextKey, direction === 'rtl' ? 'first' : 'last');
|
|
8204
|
+
}
|
|
7971
8205
|
}
|
|
7972
8206
|
break;
|
|
7973
8207
|
case 'ArrowRight':
|
|
7974
8208
|
if (delegate.getKeyRightOf) {
|
|
7975
|
-
var _delegate_getLastKey3, _delegate_getFirstKey3;
|
|
7976
|
-
|
|
7977
|
-
let nextKey = delegate.getKeyRightOf(manager.focusedKey);
|
|
8209
|
+
var _delegate_getKeyRightOf, _delegate_getLastKey3, _delegate_getFirstKey3;
|
|
8210
|
+
let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === void 0 ? void 0 : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
|
|
7978
8211
|
if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === void 0 ? void 0 : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === void 0 ? void 0 : _delegate_getFirstKey3.call(delegate, manager.focusedKey);
|
|
7979
|
-
|
|
8212
|
+
if (nextKey != null) {
|
|
8213
|
+
e.preventDefault();
|
|
8214
|
+
navigateToKey(nextKey, direction === 'rtl' ? 'last' : 'first');
|
|
8215
|
+
}
|
|
7980
8216
|
}
|
|
7981
8217
|
break;
|
|
7982
8218
|
case 'Home':
|
|
@@ -7984,8 +8220,10 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7984
8220
|
e.preventDefault();
|
|
7985
8221
|
let firstKey = delegate.getFirstKey(manager.focusedKey, ($feb5ffebff200149$export$16792effe837dba3)(e));
|
|
7986
8222
|
manager.setFocusedKey(firstKey);
|
|
7987
|
-
if (
|
|
7988
|
-
|
|
8223
|
+
if (firstKey != null) {
|
|
8224
|
+
if (($feb5ffebff200149$export$16792effe837dba3)(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(firstKey);
|
|
8225
|
+
else if (selectOnFocus) manager.replaceSelection(firstKey);
|
|
8226
|
+
}
|
|
7989
8227
|
}
|
|
7990
8228
|
break;
|
|
7991
8229
|
case 'End':
|
|
@@ -7993,22 +8231,28 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7993
8231
|
e.preventDefault();
|
|
7994
8232
|
let lastKey = delegate.getLastKey(manager.focusedKey, ($feb5ffebff200149$export$16792effe837dba3)(e));
|
|
7995
8233
|
manager.setFocusedKey(lastKey);
|
|
7996
|
-
if (
|
|
7997
|
-
|
|
8234
|
+
if (lastKey != null) {
|
|
8235
|
+
if (($feb5ffebff200149$export$16792effe837dba3)(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(lastKey);
|
|
8236
|
+
else if (selectOnFocus) manager.replaceSelection(lastKey);
|
|
8237
|
+
}
|
|
7998
8238
|
}
|
|
7999
8239
|
break;
|
|
8000
8240
|
case 'PageDown':
|
|
8001
|
-
if (delegate.getKeyPageBelow) {
|
|
8002
|
-
e.preventDefault();
|
|
8241
|
+
if (delegate.getKeyPageBelow && manager.focusedKey != null) {
|
|
8003
8242
|
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
|
|
8004
|
-
|
|
8243
|
+
if (nextKey != null) {
|
|
8244
|
+
e.preventDefault();
|
|
8245
|
+
navigateToKey(nextKey);
|
|
8246
|
+
}
|
|
8005
8247
|
}
|
|
8006
8248
|
break;
|
|
8007
8249
|
case 'PageUp':
|
|
8008
|
-
if (delegate.getKeyPageAbove) {
|
|
8009
|
-
e.preventDefault();
|
|
8250
|
+
if (delegate.getKeyPageAbove && manager.focusedKey != null) {
|
|
8010
8251
|
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
|
|
8011
|
-
|
|
8252
|
+
if (nextKey != null) {
|
|
8253
|
+
e.preventDefault();
|
|
8254
|
+
navigateToKey(nextKey);
|
|
8255
|
+
}
|
|
8012
8256
|
}
|
|
8013
8257
|
break;
|
|
8014
8258
|
case 'a':
|
|
@@ -8037,7 +8281,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8037
8281
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
|
|
8038
8282
|
tabbable: true
|
|
8039
8283
|
});
|
|
8040
|
-
let next;
|
|
8284
|
+
let next = undefined;
|
|
8041
8285
|
let last;
|
|
8042
8286
|
do {
|
|
8043
8287
|
last = walker.lastChild();
|
|
@@ -8055,10 +8299,12 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8055
8299
|
top: 0,
|
|
8056
8300
|
left: 0
|
|
8057
8301
|
});
|
|
8058
|
-
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll', isVirtualized ?
|
|
8302
|
+
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll', isVirtualized ? undefined : ()=>{
|
|
8303
|
+
var _scrollRef_current, _scrollRef_current1;
|
|
8304
|
+
var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
|
|
8059
8305
|
scrollPos.current = {
|
|
8060
|
-
top: scrollRef.current.scrollTop,
|
|
8061
|
-
left: scrollRef.current.scrollLeft
|
|
8306
|
+
top: (_scrollRef_current_scrollTop = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.scrollTop) !== null && _scrollRef_current_scrollTop !== void 0 ? _scrollRef_current_scrollTop : 0,
|
|
8307
|
+
left: (_scrollRef_current_scrollLeft = (_scrollRef_current1 = scrollRef.current) === null || _scrollRef_current1 === void 0 ? void 0 : _scrollRef_current1.scrollLeft) !== null && _scrollRef_current_scrollLeft !== void 0 ? _scrollRef_current_scrollLeft : 0
|
|
8062
8308
|
};
|
|
8063
8309
|
});
|
|
8064
8310
|
let onFocus = (e)=>{
|
|
@@ -8071,6 +8317,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8071
8317
|
if (!e.currentTarget.contains(e.target)) return;
|
|
8072
8318
|
manager.setFocused(true);
|
|
8073
8319
|
if (manager.focusedKey == null) {
|
|
8320
|
+
var _delegate_getLastKey, _delegate_getFirstKey;
|
|
8074
8321
|
let navigateToFirstKey = (key)=>{
|
|
8075
8322
|
if (key != null) {
|
|
8076
8323
|
manager.setFocusedKey(key);
|
|
@@ -8082,14 +8329,14 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8082
8329
|
// and either focus the first or last item accordingly.
|
|
8083
8330
|
let relatedTarget = e.relatedTarget;
|
|
8084
8331
|
var _manager_lastSelectedKey, _manager_firstSelectedKey;
|
|
8085
|
-
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToFirstKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : delegate.getLastKey());
|
|
8086
|
-
else navigateToFirstKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : delegate.getFirstKey());
|
|
8087
|
-
} else if (!isVirtualized) {
|
|
8332
|
+
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToFirstKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate));
|
|
8333
|
+
else navigateToFirstKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate));
|
|
8334
|
+
} else if (!isVirtualized && scrollRef.current) {
|
|
8088
8335
|
// Restore the scroll position to what it was before.
|
|
8089
8336
|
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
8090
8337
|
scrollRef.current.scrollLeft = scrollPos.current.left;
|
|
8091
8338
|
}
|
|
8092
|
-
if (manager.focusedKey != null) {
|
|
8339
|
+
if (manager.focusedKey != null && scrollRef.current) {
|
|
8093
8340
|
// Refocus and scroll the focused item into view if it exists within the scrollable region.
|
|
8094
8341
|
let element = scrollRef.current.querySelector(`[data-key="${CSS.escape(manager.focusedKey.toString())}"]`);
|
|
8095
8342
|
if (element) {
|
|
@@ -8109,10 +8356,13 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8109
8356
|
const autoFocusRef = (useRef)(autoFocus);
|
|
8110
8357
|
(useEffect)(()=>{
|
|
8111
8358
|
if (autoFocusRef.current) {
|
|
8359
|
+
var _delegate_getFirstKey, _delegate_getLastKey;
|
|
8112
8360
|
let focusedKey = null;
|
|
8361
|
+
var _delegate_getFirstKey1;
|
|
8113
8362
|
// Check focus strategy to determine which item to focus
|
|
8114
|
-
if (autoFocus === 'first') focusedKey = delegate.getFirstKey();
|
|
8115
|
-
|
|
8363
|
+
if (autoFocus === 'first') focusedKey = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
|
|
8364
|
+
var _delegate_getLastKey1;
|
|
8365
|
+
if (autoFocus === 'last') focusedKey = (_delegate_getLastKey1 = (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate)) !== null && _delegate_getLastKey1 !== void 0 ? _delegate_getLastKey1 : null;
|
|
8116
8366
|
// If there are any selected keys, make the first one the new focus target
|
|
8117
8367
|
let selectedKeys = manager.selectedKeys;
|
|
8118
8368
|
if (selectedKeys.size) {
|
|
@@ -8124,14 +8374,14 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8124
8374
|
manager.setFocused(true);
|
|
8125
8375
|
manager.setFocusedKey(focusedKey);
|
|
8126
8376
|
// If no default focus key is selected, focus the collection itself.
|
|
8127
|
-
if (focusedKey == null && !shouldUseVirtualFocus) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8377
|
+
if (focusedKey == null && !shouldUseVirtualFocus && ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8128
8378
|
}
|
|
8129
8379
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8130
8380
|
}, []);
|
|
8131
8381
|
// Scroll the focused element into view when the focusedKey changes.
|
|
8132
8382
|
let lastFocusedKey = (useRef)(manager.focusedKey);
|
|
8133
8383
|
(useEffect)(()=>{
|
|
8134
|
-
if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || autoFocusRef.current) &&
|
|
8384
|
+
if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || autoFocusRef.current) && scrollRef.current && ref.current) {
|
|
8135
8385
|
let modality = ($507fabe10e71c6fb$export$630ff653c5ada6a9)();
|
|
8136
8386
|
let element = ref.current.querySelector(`[data-key="${CSS.escape(manager.focusedKey.toString())}"]`);
|
|
8137
8387
|
if (!element) // If item element wasn't found, return early (don't update autoFocusRef and lastFocusedKey).
|
|
@@ -8146,7 +8396,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8146
8396
|
}
|
|
8147
8397
|
}
|
|
8148
8398
|
// If the focused key becomes null (e.g. the last item is deleted), focus the whole collection.
|
|
8149
|
-
if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8399
|
+
if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null && ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8150
8400
|
lastFocusedKey.current = manager.focusedKey;
|
|
8151
8401
|
autoFocusRef.current = false;
|
|
8152
8402
|
});
|
|
@@ -8174,7 +8424,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8174
8424
|
// This will be marshalled to either the first or last item depending on where focus came from.
|
|
8175
8425
|
// If using virtual focus, don't set a tabIndex at all so that VoiceOver on iOS 14 doesn't try
|
|
8176
8426
|
// to move real DOM focus to the element anyway.
|
|
8177
|
-
let tabIndex;
|
|
8427
|
+
let tabIndex = undefined;
|
|
8178
8428
|
if (!shouldUseVirtualFocus) tabIndex = manager.focusedKey == null ? 0 : -1;
|
|
8179
8429
|
return {
|
|
8180
8430
|
collectionProps: {
|
|
@@ -8207,7 +8457,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8207
8457
|
else {
|
|
8208
8458
|
if (manager.selectionMode === 'none') return;
|
|
8209
8459
|
if (manager.isLink(key)) {
|
|
8210
|
-
if (linkBehavior === 'selection') {
|
|
8460
|
+
if (linkBehavior === 'selection' && ref.current) {
|
|
8211
8461
|
let itemProps = manager.getItemProps(key);
|
|
8212
8462
|
router.open(ref.current, e, itemProps.href, itemProps.routerOptions);
|
|
8213
8463
|
// Always set selected keys back to what they were so that select and combobox close.
|
|
@@ -8229,7 +8479,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8229
8479
|
let isFocused = key === manager.focusedKey;
|
|
8230
8480
|
if (isFocused && manager.isFocused && !shouldUseVirtualFocus) {
|
|
8231
8481
|
if (focus) focus();
|
|
8232
|
-
else if (document.activeElement !== ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8482
|
+
else if (document.activeElement !== ref.current && ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8233
8483
|
}
|
|
8234
8484
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8235
8485
|
}, [
|
|
@@ -8272,7 +8522,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8272
8522
|
let hadPrimaryActionOnPressStart = (useRef)(false);
|
|
8273
8523
|
let performAction = (e)=>{
|
|
8274
8524
|
if (onAction) onAction();
|
|
8275
|
-
if (hasLinkAction) {
|
|
8525
|
+
if (hasLinkAction && ref.current) {
|
|
8276
8526
|
let itemProps = manager.getItemProps(key);
|
|
8277
8527
|
router.open(ref.current, e, itemProps.href, itemProps.routerOptions);
|
|
8278
8528
|
}
|
|
@@ -8300,10 +8550,10 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8300
8550
|
} else if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
|
|
8301
8551
|
};
|
|
8302
8552
|
else {
|
|
8303
|
-
itemPressProps.onPressUp = hasPrimaryAction ?
|
|
8553
|
+
itemPressProps.onPressUp = hasPrimaryAction ? undefined : (e)=>{
|
|
8304
8554
|
if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
|
|
8305
8555
|
};
|
|
8306
|
-
itemPressProps.onPress = hasPrimaryAction ? performAction :
|
|
8556
|
+
itemPressProps.onPress = hasPrimaryAction ? performAction : undefined;
|
|
8307
8557
|
}
|
|
8308
8558
|
} else {
|
|
8309
8559
|
itemPressProps.onPressStart = (e)=>{
|
|
@@ -8396,6 +8646,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
8396
8646
|
*/ class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
8397
8647
|
getItemRect(key) {
|
|
8398
8648
|
let container = this.ref.current;
|
|
8649
|
+
if (!container) return null;
|
|
8399
8650
|
let item = key != null ? container.querySelector(`[data-key="${CSS.escape(key.toString())}"]`) : null;
|
|
8400
8651
|
if (!item) return null;
|
|
8401
8652
|
let containerRect = container.getBoundingClientRect();
|
|
@@ -8409,18 +8660,20 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
8409
8660
|
}
|
|
8410
8661
|
getContentSize() {
|
|
8411
8662
|
let container = this.ref.current;
|
|
8663
|
+
var _container_scrollWidth, _container_scrollHeight;
|
|
8412
8664
|
return {
|
|
8413
|
-
width: container.scrollWidth,
|
|
8414
|
-
height: container.scrollHeight
|
|
8665
|
+
width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
|
|
8666
|
+
height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
|
|
8415
8667
|
};
|
|
8416
8668
|
}
|
|
8417
8669
|
getVisibleRect() {
|
|
8418
8670
|
let container = this.ref.current;
|
|
8671
|
+
var _container_scrollLeft, _container_scrollTop, _container_offsetWidth, _container_offsetHeight;
|
|
8419
8672
|
return {
|
|
8420
|
-
x: container.scrollLeft,
|
|
8421
|
-
y: container.scrollTop,
|
|
8422
|
-
width: container.offsetWidth,
|
|
8423
|
-
height: container.offsetHeight
|
|
8673
|
+
x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
|
|
8674
|
+
y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
|
|
8675
|
+
width: (_container_offsetWidth = container === null || container === void 0 ? void 0 : container.offsetWidth) !== null && _container_offsetWidth !== void 0 ? _container_offsetWidth : 0,
|
|
8676
|
+
height: (_container_offsetHeight = container === null || container === void 0 ? void 0 : container.offsetHeight) !== null && _container_offsetHeight !== void 0 ? _container_offsetHeight : 0
|
|
8424
8677
|
};
|
|
8425
8678
|
}
|
|
8426
8679
|
constructor(ref){
|
|
@@ -8445,34 +8698,37 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8445
8698
|
var _item_props;
|
|
8446
8699
|
return this.disabledBehavior === 'all' && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
|
|
8447
8700
|
}
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
while(
|
|
8451
|
-
let item = this.collection.getItem(
|
|
8452
|
-
if (item.type === 'item' && !this.isDisabled(item)) return
|
|
8453
|
-
|
|
8701
|
+
findNextNonDisabled(key, getNext) {
|
|
8702
|
+
let nextKey = key;
|
|
8703
|
+
while(nextKey != null){
|
|
8704
|
+
let item = this.collection.getItem(nextKey);
|
|
8705
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === 'item' && !this.isDisabled(item)) return nextKey;
|
|
8706
|
+
nextKey = getNext(nextKey);
|
|
8454
8707
|
}
|
|
8455
8708
|
return null;
|
|
8456
8709
|
}
|
|
8710
|
+
getNextKey(key) {
|
|
8711
|
+
let nextKey = key;
|
|
8712
|
+
nextKey = this.collection.getKeyAfter(nextKey);
|
|
8713
|
+
return this.findNextNonDisabled(nextKey, (key)=>this.collection.getKeyAfter(key));
|
|
8714
|
+
}
|
|
8457
8715
|
getPreviousKey(key) {
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
if (item.type === 'item' && !this.isDisabled(item)) return key;
|
|
8462
|
-
key = this.collection.getKeyBefore(key);
|
|
8463
|
-
}
|
|
8464
|
-
return null;
|
|
8716
|
+
let nextKey = key;
|
|
8717
|
+
nextKey = this.collection.getKeyBefore(nextKey);
|
|
8718
|
+
return this.findNextNonDisabled(nextKey, (key)=>this.collection.getKeyBefore(key));
|
|
8465
8719
|
}
|
|
8466
8720
|
findKey(key, nextKey, shouldSkip) {
|
|
8467
|
-
let
|
|
8468
|
-
|
|
8721
|
+
let tempKey = key;
|
|
8722
|
+
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
8723
|
+
if (!itemRect || tempKey == null) return null;
|
|
8469
8724
|
// Find the item above or below in the same column.
|
|
8470
8725
|
let prevRect = itemRect;
|
|
8471
8726
|
do {
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8727
|
+
tempKey = nextKey(tempKey);
|
|
8728
|
+
if (tempKey == null) break;
|
|
8729
|
+
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
8730
|
+
}while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
8731
|
+
return tempKey;
|
|
8476
8732
|
}
|
|
8477
8733
|
isSameRow(prevRect, itemRect) {
|
|
8478
8734
|
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
@@ -8492,6 +8748,13 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8492
8748
|
return right ? this.getPreviousKey(key) : this.getNextKey(key);
|
|
8493
8749
|
}
|
|
8494
8750
|
getKeyRightOf(key) {
|
|
8751
|
+
// This is a temporary solution for CardView until we refactor useSelectableCollection.
|
|
8752
|
+
// https://github.com/orgs/adobe/projects/19/views/32?pane=issue&itemId=77825042
|
|
8753
|
+
let layoutDelegateMethod = this.direction === 'ltr' ? 'getKeyRightOf' : 'getKeyLeftOf';
|
|
8754
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
8755
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
8756
|
+
return this.findNextNonDisabled(key, (key)=>this.layoutDelegate[layoutDelegateMethod](key));
|
|
8757
|
+
}
|
|
8495
8758
|
if (this.layout === 'grid') {
|
|
8496
8759
|
if (this.orientation === 'vertical') return this.getNextColumn(key, this.direction === 'rtl');
|
|
8497
8760
|
else return this.findKey(key, (key)=>this.getNextColumn(key, this.direction === 'rtl'), this.isSameColumn);
|
|
@@ -8499,6 +8762,11 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8499
8762
|
return null;
|
|
8500
8763
|
}
|
|
8501
8764
|
getKeyLeftOf(key) {
|
|
8765
|
+
let layoutDelegateMethod = this.direction === 'ltr' ? 'getKeyLeftOf' : 'getKeyRightOf';
|
|
8766
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
8767
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
8768
|
+
return this.findNextNonDisabled(key, (key)=>this.layoutDelegate[layoutDelegateMethod](key));
|
|
8769
|
+
}
|
|
8502
8770
|
if (this.layout === 'grid') {
|
|
8503
8771
|
if (this.orientation === 'vertical') return this.getNextColumn(key, this.direction === 'ltr');
|
|
8504
8772
|
else return this.findKey(key, (key)=>this.getNextColumn(key, this.direction === 'ltr'), this.isSameColumn);
|
|
@@ -8507,61 +8775,53 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8507
8775
|
}
|
|
8508
8776
|
getFirstKey() {
|
|
8509
8777
|
let key = this.collection.getFirstKey();
|
|
8510
|
-
|
|
8511
|
-
let item = this.collection.getItem(key);
|
|
8512
|
-
if ((item === null || item === void 0 ? void 0 : item.type) === 'item' && !this.isDisabled(item)) return key;
|
|
8513
|
-
key = this.collection.getKeyAfter(key);
|
|
8514
|
-
}
|
|
8515
|
-
return null;
|
|
8778
|
+
return this.findNextNonDisabled(key, (key)=>this.collection.getKeyAfter(key));
|
|
8516
8779
|
}
|
|
8517
8780
|
getLastKey() {
|
|
8518
8781
|
let key = this.collection.getLastKey();
|
|
8519
|
-
|
|
8520
|
-
let item = this.collection.getItem(key);
|
|
8521
|
-
if (item.type === 'item' && !this.isDisabled(item)) return key;
|
|
8522
|
-
key = this.collection.getKeyBefore(key);
|
|
8523
|
-
}
|
|
8524
|
-
return null;
|
|
8782
|
+
return this.findNextNonDisabled(key, (key)=>this.collection.getKeyBefore(key));
|
|
8525
8783
|
}
|
|
8526
8784
|
getKeyPageAbove(key) {
|
|
8527
8785
|
let menu = this.ref.current;
|
|
8528
8786
|
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
8529
8787
|
if (!itemRect) return null;
|
|
8530
|
-
if (!($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getFirstKey();
|
|
8788
|
+
if (menu && !($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getFirstKey();
|
|
8789
|
+
let nextKey = key;
|
|
8531
8790
|
if (this.orientation === 'horizontal') {
|
|
8532
8791
|
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
8533
|
-
while(itemRect && itemRect.x > pageX){
|
|
8534
|
-
|
|
8535
|
-
itemRect =
|
|
8792
|
+
while(itemRect && itemRect.x > pageX && nextKey != null){
|
|
8793
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
8794
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8536
8795
|
}
|
|
8537
8796
|
} else {
|
|
8538
8797
|
let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
|
|
8539
|
-
while(itemRect && itemRect.y > pageY){
|
|
8540
|
-
|
|
8541
|
-
itemRect =
|
|
8798
|
+
while(itemRect && itemRect.y > pageY && nextKey != null){
|
|
8799
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
8800
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8542
8801
|
}
|
|
8543
8802
|
}
|
|
8544
|
-
return
|
|
8803
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
|
|
8545
8804
|
}
|
|
8546
8805
|
getKeyPageBelow(key) {
|
|
8547
8806
|
let menu = this.ref.current;
|
|
8548
8807
|
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
8549
8808
|
if (!itemRect) return null;
|
|
8550
|
-
if (!($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getLastKey();
|
|
8809
|
+
if (menu && !($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getLastKey();
|
|
8810
|
+
let nextKey = key;
|
|
8551
8811
|
if (this.orientation === 'horizontal') {
|
|
8552
8812
|
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
8553
|
-
while(itemRect && itemRect.x < pageX){
|
|
8554
|
-
|
|
8555
|
-
itemRect =
|
|
8813
|
+
while(itemRect && itemRect.x < pageX && nextKey != null){
|
|
8814
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
8815
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8556
8816
|
}
|
|
8557
8817
|
} else {
|
|
8558
8818
|
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
8559
|
-
while(itemRect && itemRect.y < pageY){
|
|
8560
|
-
|
|
8561
|
-
itemRect =
|
|
8819
|
+
while(itemRect && itemRect.y < pageY && nextKey != null){
|
|
8820
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
8821
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8562
8822
|
}
|
|
8563
8823
|
}
|
|
8564
|
-
return
|
|
8824
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
|
|
8565
8825
|
}
|
|
8566
8826
|
getKeyForSearch(search, fromKey) {
|
|
8567
8827
|
if (!this.collator) return null;
|
|
@@ -8569,9 +8829,10 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8569
8829
|
let key = fromKey || this.getFirstKey();
|
|
8570
8830
|
while(key != null){
|
|
8571
8831
|
let item = collection.getItem(key);
|
|
8832
|
+
if (!item) return null;
|
|
8572
8833
|
let substring = item.textValue.slice(0, search.length);
|
|
8573
8834
|
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
8574
|
-
key = this.
|
|
8835
|
+
key = this.getNextKey(key);
|
|
8575
8836
|
}
|
|
8576
8837
|
return null;
|
|
8577
8838
|
}
|
|
@@ -8742,17 +9003,26 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8742
9003
|
}
|
|
8743
9004
|
*iterateCollection(props) {
|
|
8744
9005
|
let { children: children, items: items } = props;
|
|
8745
|
-
if (
|
|
9006
|
+
if (($dbSRa$react).isValidElement(children) && children.type === ($dbSRa$react).Fragment) yield* this.iterateCollection({
|
|
9007
|
+
children: children.props.children,
|
|
9008
|
+
items: items
|
|
9009
|
+
});
|
|
9010
|
+
else if (typeof children === 'function') {
|
|
8746
9011
|
if (!items) throw new Error('props.children was a function but props.items is missing');
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
9012
|
+
let index = 0;
|
|
9013
|
+
for (let item of items){
|
|
9014
|
+
yield* this.getFullNode({
|
|
9015
|
+
value: item,
|
|
9016
|
+
index: index
|
|
9017
|
+
}, {
|
|
9018
|
+
renderer: children
|
|
9019
|
+
});
|
|
9020
|
+
index++;
|
|
9021
|
+
}
|
|
8752
9022
|
} else {
|
|
8753
9023
|
let items = [];
|
|
8754
9024
|
($dbSRa$react).Children.forEach(children, (child)=>{
|
|
8755
|
-
items.push(child);
|
|
9025
|
+
if (child) items.push(child);
|
|
8756
9026
|
});
|
|
8757
9027
|
let index = 0;
|
|
8758
9028
|
for (let item of items){
|
|
@@ -8785,6 +9055,19 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8785
9055
|
};
|
|
8786
9056
|
}
|
|
8787
9057
|
*getFullNode(partialNode, state, parentKey, parentNode) {
|
|
9058
|
+
if (($dbSRa$react).isValidElement(partialNode.element) && partialNode.element.type === ($dbSRa$react).Fragment) {
|
|
9059
|
+
let children = [];
|
|
9060
|
+
($dbSRa$react).Children.forEach(partialNode.element.props.children, (child)=>{
|
|
9061
|
+
children.push(child);
|
|
9062
|
+
});
|
|
9063
|
+
var _partialNode_index;
|
|
9064
|
+
let index = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== void 0 ? _partialNode_index : 0;
|
|
9065
|
+
for (const child of children)yield* this.getFullNode({
|
|
9066
|
+
element: child,
|
|
9067
|
+
index: index++
|
|
9068
|
+
}, state, parentKey, parentNode);
|
|
9069
|
+
return;
|
|
9070
|
+
}
|
|
8788
9071
|
// If there's a value instead of an element on the node, and a parent renderer function is available,
|
|
8789
9072
|
// use it to render an element for the value.
|
|
8790
9073
|
let element = partialNode.element;
|
|
@@ -8803,17 +9086,19 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8803
9086
|
if (($dbSRa$react).isValidElement(element)) {
|
|
8804
9087
|
let type = element.type;
|
|
8805
9088
|
if (typeof type !== 'function' && typeof type.getCollectionNode !== 'function') {
|
|
8806
|
-
let name =
|
|
9089
|
+
let name = element.type;
|
|
8807
9090
|
throw new Error(`Unknown element <${name}> in collection.`);
|
|
8808
9091
|
}
|
|
8809
9092
|
let childNodes = type.getCollectionNode(element.props, this.context);
|
|
8810
|
-
|
|
9093
|
+
var _partialNode_index1;
|
|
9094
|
+
let index = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== void 0 ? _partialNode_index1 : 0;
|
|
8811
9095
|
let result = childNodes.next();
|
|
8812
9096
|
while(!result.done && result.value){
|
|
8813
9097
|
let childNode = result.value;
|
|
8814
9098
|
partialNode.index = index;
|
|
8815
|
-
|
|
8816
|
-
|
|
9099
|
+
var _childNode_key;
|
|
9100
|
+
let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== void 0 ? _childNode_key : null;
|
|
9101
|
+
if (nodeKey == null) nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
|
|
8817
9102
|
let nodes = this.getFullNode({
|
|
8818
9103
|
...childNode,
|
|
8819
9104
|
key: nodeKey,
|
|
@@ -8824,12 +9109,14 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8824
9109
|
...nodes
|
|
8825
9110
|
];
|
|
8826
9111
|
for (let node of children){
|
|
9112
|
+
var _childNode_value, _ref;
|
|
8827
9113
|
// Cache the node based on its value
|
|
8828
|
-
node.value = childNode.value
|
|
9114
|
+
node.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== void 0 ? _childNode_value : partialNode.value) !== null && _ref !== void 0 ? _ref : null;
|
|
8829
9115
|
if (node.value) this.cache.set(node.value, node);
|
|
9116
|
+
var _parentNode_type;
|
|
8830
9117
|
// The partial node may have specified a type for the child in order to specify a constraint.
|
|
8831
9118
|
// Verify that the full node that was built recursively matches this type.
|
|
8832
|
-
if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node.type)}> in <${$eb2240fc39a57fa5$var$capitalize(parentNode.type)}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
|
|
9119
|
+
if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node.type)}> in <${$eb2240fc39a57fa5$var$capitalize((_parentNode_type = parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) !== null && _parentNode_type !== void 0 ? _parentNode_type : 'unknown parent type')}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
|
|
8833
9120
|
index++;
|
|
8834
9121
|
yield node;
|
|
8835
9122
|
}
|
|
@@ -8838,25 +9125,26 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8838
9125
|
return;
|
|
8839
9126
|
}
|
|
8840
9127
|
// Ignore invalid elements
|
|
8841
|
-
if (partialNode.key == null) return;
|
|
9128
|
+
if (partialNode.key == null || partialNode.type == null) return;
|
|
8842
9129
|
// Create full node
|
|
8843
9130
|
let builder = this;
|
|
9131
|
+
var _partialNode_value, _partialNode_textValue;
|
|
8844
9132
|
let node = {
|
|
8845
9133
|
type: partialNode.type,
|
|
8846
9134
|
props: partialNode.props,
|
|
8847
9135
|
key: partialNode.key,
|
|
8848
9136
|
parentKey: parentNode ? parentNode.key : null,
|
|
8849
|
-
value: partialNode.value,
|
|
9137
|
+
value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== void 0 ? _partialNode_value : null,
|
|
8850
9138
|
level: parentNode ? parentNode.level + 1 : 0,
|
|
8851
9139
|
index: partialNode.index,
|
|
8852
9140
|
rendered: partialNode.rendered,
|
|
8853
|
-
textValue: partialNode.textValue,
|
|
9141
|
+
textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== void 0 ? _partialNode_textValue : '',
|
|
8854
9142
|
'aria-label': partialNode['aria-label'],
|
|
8855
9143
|
wrapper: partialNode.wrapper,
|
|
8856
9144
|
shouldInvalidate: partialNode.shouldInvalidate,
|
|
8857
|
-
hasChildNodes: partialNode.hasChildNodes,
|
|
9145
|
+
hasChildNodes: partialNode.hasChildNodes || false,
|
|
8858
9146
|
childNodes: $eb2240fc39a57fa5$var$iterable(function*() {
|
|
8859
|
-
if (!partialNode.hasChildNodes) return;
|
|
9147
|
+
if (!partialNode.hasChildNodes || !partialNode.childNodes) return;
|
|
8860
9148
|
let index = 0;
|
|
8861
9149
|
for (let child of partialNode.childNodes()){
|
|
8862
9150
|
// Ensure child keys are globally unique by prepending the parent node's key
|
|
@@ -8865,8 +9153,10 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8865
9153
|
// but another parent has key `ab` and its child has a key `c`. The combined keys would result in both
|
|
8866
9154
|
// children having a key of `abc`.
|
|
8867
9155
|
child.key = `${node.key}${child.key}`;
|
|
8868
|
-
|
|
8869
|
-
|
|
9156
|
+
let nodes = builder.getFullNode({
|
|
9157
|
+
...child,
|
|
9158
|
+
index: index
|
|
9159
|
+
}, builder.getChildState(state, child), node.key, node);
|
|
8870
9160
|
for (let node of nodes){
|
|
8871
9161
|
index++;
|
|
8872
9162
|
yield node;
|
|
@@ -8995,9 +9285,10 @@ function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
|
|
|
8995
9285
|
}
|
|
8996
9286
|
function $c5a24bc478652b5f$var$getAncestors(collection, node) {
|
|
8997
9287
|
let parents = [];
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9288
|
+
let currNode = node;
|
|
9289
|
+
while((currNode === null || currNode === void 0 ? void 0 : currNode.parentKey) != null){
|
|
9290
|
+
currNode = collection.getItem(currNode.parentKey);
|
|
9291
|
+
if (currNode) parents.unshift(currNode);
|
|
9001
9292
|
}
|
|
9002
9293
|
return parents;
|
|
9003
9294
|
}
|
|
@@ -9017,14 +9308,15 @@ const $453cc9f0df89c0a5$var$cache = new WeakMap();
|
|
|
9017
9308
|
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
9018
9309
|
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
9019
9310
|
if (count != null) return count;
|
|
9020
|
-
count
|
|
9311
|
+
// TS isn't smart enough to know we've ensured count is a number, so use a new variable
|
|
9312
|
+
let counter = 0;
|
|
9021
9313
|
let countItems = (items)=>{
|
|
9022
9314
|
for (let item of items)if (item.type === 'section') countItems(($c5a24bc478652b5f$export$1005530eda016c13)(item, collection));
|
|
9023
|
-
else
|
|
9315
|
+
else counter++;
|
|
9024
9316
|
};
|
|
9025
9317
|
countItems(collection);
|
|
9026
|
-
$453cc9f0df89c0a5$var$cache.set(collection,
|
|
9027
|
-
return
|
|
9318
|
+
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
9319
|
+
return counter;
|
|
9028
9320
|
}
|
|
9029
9321
|
|
|
9030
9322
|
/*
|
|
@@ -9477,6 +9769,7 @@ function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
9477
9769
|
// omit onPress from triggerProps since we override it above.
|
|
9478
9770
|
delete triggerProps.onPress;
|
|
9479
9771
|
return {
|
|
9772
|
+
// @ts-ignore - TODO we pass out both DOMAttributes AND AriaButtonProps, but useButton will discard the longPress event handlers, it's only through PressResponder magic that this works for RSP and RAC. it does not work in aria examples
|
|
9480
9773
|
menuTriggerProps: {
|
|
9481
9774
|
...triggerProps,
|
|
9482
9775
|
...trigger === 'press' ? pressProps : longPressProps,
|
|
@@ -9506,110 +9799,6 @@ function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
9506
9799
|
|
|
9507
9800
|
|
|
9508
9801
|
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
9513
|
-
let { inputElementType: inputElementType = 'input', isDisabled: isDisabled = false, isRequired: isRequired = false, isReadOnly: isReadOnly = false, type: type = 'text', validationBehavior: validationBehavior = 'aria' } = props;
|
|
9514
|
-
let [value, setValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue || '', props.onChange);
|
|
9515
|
-
let { focusableProps: focusableProps } = ($e6afbd83fe6ebbd2$export$4c014de7c8940b4c)(props, ref);
|
|
9516
|
-
let validationState = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
9517
|
-
...props,
|
|
9518
|
-
value: value
|
|
9519
|
-
});
|
|
9520
|
-
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = validationState.displayValidation;
|
|
9521
|
-
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = ($2baaea4c71418dea$export$294aa081a6c6f55d)({
|
|
9522
|
-
...props,
|
|
9523
|
-
isInvalid: isInvalid,
|
|
9524
|
-
errorMessage: props.errorMessage || validationErrors
|
|
9525
|
-
});
|
|
9526
|
-
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
9527
|
-
labelable: true
|
|
9528
|
-
});
|
|
9529
|
-
const inputOnlyProps = {
|
|
9530
|
-
type: type,
|
|
9531
|
-
pattern: props.pattern
|
|
9532
|
-
};
|
|
9533
|
-
($99facab73266f662$export$5add1d006293d136)(ref, value, setValue);
|
|
9534
|
-
($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
|
|
9535
|
-
(useEffect)(()=>{
|
|
9536
|
-
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
|
|
9537
|
-
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
|
|
9538
|
-
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
|
|
9539
|
-
// textareas are always controlled. React is planning on removing this synchronization in a
|
|
9540
|
-
// future major version.
|
|
9541
|
-
// https://github.com/facebook/react/issues/19474
|
|
9542
|
-
// https://github.com/facebook/react/issues/11896
|
|
9543
|
-
if (ref.current instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
|
|
9544
|
-
let input = ref.current;
|
|
9545
|
-
Object.defineProperty(input, 'defaultValue', {
|
|
9546
|
-
get: ()=>input.value,
|
|
9547
|
-
set: ()=>{},
|
|
9548
|
-
configurable: true
|
|
9549
|
-
});
|
|
9550
|
-
}
|
|
9551
|
-
}, [
|
|
9552
|
-
ref
|
|
9553
|
-
]);
|
|
9554
|
-
return {
|
|
9555
|
-
labelProps: labelProps,
|
|
9556
|
-
inputProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, inputElementType === 'input' ? inputOnlyProps : undefined, {
|
|
9557
|
-
disabled: isDisabled,
|
|
9558
|
-
readOnly: isReadOnly,
|
|
9559
|
-
required: isRequired && validationBehavior === 'native',
|
|
9560
|
-
'aria-required': isRequired && validationBehavior === 'aria' || undefined,
|
|
9561
|
-
'aria-invalid': isInvalid || undefined,
|
|
9562
|
-
'aria-errormessage': props['aria-errormessage'],
|
|
9563
|
-
'aria-activedescendant': props['aria-activedescendant'],
|
|
9564
|
-
'aria-autocomplete': props['aria-autocomplete'],
|
|
9565
|
-
'aria-haspopup': props['aria-haspopup'],
|
|
9566
|
-
value: value,
|
|
9567
|
-
onChange: (e)=>setValue(e.target.value),
|
|
9568
|
-
autoComplete: props.autoComplete,
|
|
9569
|
-
autoCapitalize: props.autoCapitalize,
|
|
9570
|
-
maxLength: props.maxLength,
|
|
9571
|
-
minLength: props.minLength,
|
|
9572
|
-
name: props.name,
|
|
9573
|
-
placeholder: props.placeholder,
|
|
9574
|
-
inputMode: props.inputMode,
|
|
9575
|
-
// Clipboard events
|
|
9576
|
-
onCopy: props.onCopy,
|
|
9577
|
-
onCut: props.onCut,
|
|
9578
|
-
onPaste: props.onPaste,
|
|
9579
|
-
// Composition events
|
|
9580
|
-
onCompositionEnd: props.onCompositionEnd,
|
|
9581
|
-
onCompositionStart: props.onCompositionStart,
|
|
9582
|
-
onCompositionUpdate: props.onCompositionUpdate,
|
|
9583
|
-
// Selection events
|
|
9584
|
-
onSelect: props.onSelect,
|
|
9585
|
-
// Input events
|
|
9586
|
-
onBeforeInput: props.onBeforeInput,
|
|
9587
|
-
onInput: props.onInput,
|
|
9588
|
-
...focusableProps,
|
|
9589
|
-
...fieldProps
|
|
9590
|
-
}),
|
|
9591
|
-
descriptionProps: descriptionProps,
|
|
9592
|
-
errorMessageProps: errorMessageProps,
|
|
9593
|
-
isInvalid: isInvalid,
|
|
9594
|
-
validationErrors: validationErrors,
|
|
9595
|
-
validationDetails: validationDetails
|
|
9596
|
-
};
|
|
9597
|
-
}
|
|
9598
|
-
|
|
9599
|
-
/*
|
|
9600
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
9601
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9602
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9603
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9604
|
-
*
|
|
9605
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
9606
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9607
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
9608
|
-
* governing permissions and limitations under the License.
|
|
9609
|
-
*/
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
9802
|
function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
9614
9803
|
let { role: role = 'dialog' } = props;
|
|
9615
9804
|
let titleId = ($bdb11010cef70236$export$b4cc09c592e8fdb8)();
|
|
@@ -9660,8 +9849,87 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
9660
9849
|
if (isRefocusing.current) e.stopPropagation();
|
|
9661
9850
|
}
|
|
9662
9851
|
},
|
|
9663
|
-
titleProps: {
|
|
9664
|
-
id: titleId
|
|
9852
|
+
titleProps: {
|
|
9853
|
+
id: titleId
|
|
9854
|
+
}
|
|
9855
|
+
};
|
|
9856
|
+
}
|
|
9857
|
+
|
|
9858
|
+
/*
|
|
9859
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
9860
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the 'License');
|
|
9861
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9862
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9863
|
+
*
|
|
9864
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
9865
|
+
* the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9866
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
9867
|
+
* governing permissions and limitations under the License.
|
|
9868
|
+
*/
|
|
9869
|
+
|
|
9870
|
+
|
|
9871
|
+
|
|
9872
|
+
function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
|
|
9873
|
+
let { isDisabled: isDisabled } = props;
|
|
9874
|
+
let triggerId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
9875
|
+
let panelId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
9876
|
+
let isSSR = ($b5e257d569688ac6$export$535bd6ca7f90a273)();
|
|
9877
|
+
let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;
|
|
9878
|
+
let raf = (useRef)(null);
|
|
9879
|
+
let handleBeforeMatch = (useCallback)(()=>{
|
|
9880
|
+
// Wait a frame to revert browser's removal of hidden attribute
|
|
9881
|
+
raf.current = requestAnimationFrame(()=>{
|
|
9882
|
+
if (ref.current) ref.current.setAttribute('hidden', 'until-found');
|
|
9883
|
+
});
|
|
9884
|
+
// Force sync state update
|
|
9885
|
+
(flushSync)(()=>{
|
|
9886
|
+
state.toggle();
|
|
9887
|
+
});
|
|
9888
|
+
}, [
|
|
9889
|
+
ref,
|
|
9890
|
+
state
|
|
9891
|
+
]);
|
|
9892
|
+
// @ts-ignore https://github.com/facebook/react/pull/24741
|
|
9893
|
+
($e9faafb641e167db$export$90fc3a17d93f704c)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);
|
|
9894
|
+
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
9895
|
+
// Cancel any pending RAF to prevent stale updates
|
|
9896
|
+
if (raf.current) cancelAnimationFrame(raf.current);
|
|
9897
|
+
// Until React supports hidden="until-found": https://github.com/facebook/react/pull/24741
|
|
9898
|
+
if (supportsBeforeMatch && ref.current && !isDisabled) {
|
|
9899
|
+
if (state.isExpanded) ref.current.removeAttribute('hidden');
|
|
9900
|
+
else ref.current.setAttribute('hidden', 'until-found');
|
|
9901
|
+
}
|
|
9902
|
+
}, [
|
|
9903
|
+
isDisabled,
|
|
9904
|
+
ref,
|
|
9905
|
+
state.isExpanded,
|
|
9906
|
+
supportsBeforeMatch
|
|
9907
|
+
]);
|
|
9908
|
+
(useEffect)(()=>{
|
|
9909
|
+
return ()=>{
|
|
9910
|
+
if (raf.current) cancelAnimationFrame(raf.current);
|
|
9911
|
+
};
|
|
9912
|
+
}, []);
|
|
9913
|
+
return {
|
|
9914
|
+
buttonProps: {
|
|
9915
|
+
id: triggerId,
|
|
9916
|
+
'aria-expanded': state.isExpanded,
|
|
9917
|
+
'aria-controls': panelId,
|
|
9918
|
+
onPress: (e)=>{
|
|
9919
|
+
if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();
|
|
9920
|
+
},
|
|
9921
|
+
isDisabled: isDisabled,
|
|
9922
|
+
onPressStart (e) {
|
|
9923
|
+
if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();
|
|
9924
|
+
}
|
|
9925
|
+
},
|
|
9926
|
+
panelProps: {
|
|
9927
|
+
id: panelId,
|
|
9928
|
+
// This can be overridden at the panel element level.
|
|
9929
|
+
role: 'group',
|
|
9930
|
+
'aria-labelledby': triggerId,
|
|
9931
|
+
'aria-hidden': !state.isExpanded,
|
|
9932
|
+
hidden: supportsBeforeMatch ? true : !state.isExpanded
|
|
9665
9933
|
}
|
|
9666
9934
|
};
|
|
9667
9935
|
}
|
|
@@ -9678,7 +9946,8 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
9678
9946
|
* governing permissions and limitations under the License.
|
|
9679
9947
|
*/ const $ce9b18daab526bbd$export$5b9bb410392e3991 = new WeakMap();
|
|
9680
9948
|
function $ce9b18daab526bbd$export$f45c25170b9a99c2(state, key) {
|
|
9681
|
-
|
|
9949
|
+
var _listMap_get;
|
|
9950
|
+
let { id: id } = (_listMap_get = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state)) !== null && _listMap_get !== void 0 ? _listMap_get : {};
|
|
9682
9951
|
if (!id) throw new Error('Unknown list');
|
|
9683
9952
|
return `${id}-${$ce9b18daab526bbd$export$e0c709538cb8ae18(key)}`;
|
|
9684
9953
|
}
|
|
@@ -10340,7 +10609,7 @@ function $5b9b5b5723db6ae1$export$be42ebdab07ae4c2(props) {
|
|
|
10340
10609
|
let interactionDescription = (useMemo)(()=>{
|
|
10341
10610
|
let selectionMode = props.selectionManager.selectionMode;
|
|
10342
10611
|
let selectionBehavior = props.selectionManager.selectionBehavior;
|
|
10343
|
-
let message
|
|
10612
|
+
let message;
|
|
10344
10613
|
if (shouldLongPress) message = stringFormatter.format('longPressToSelect');
|
|
10345
10614
|
return selectionBehavior === 'replace' && selectionMode !== 'none' && props.hasItemActions ? message : undefined;
|
|
10346
10615
|
}, [
|
|
@@ -10462,26 +10731,39 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10462
10731
|
var _ref_current;
|
|
10463
10732
|
// Don't shift focus to the row if the active element is a element within the row already
|
|
10464
10733
|
// (e.g. clicking on a row button)
|
|
10465
|
-
if (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(document.activeElement))) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
10734
|
+
if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(document.activeElement)))) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
10466
10735
|
};
|
|
10467
10736
|
let treeGridRowProps = {};
|
|
10468
10737
|
let hasChildRows;
|
|
10469
10738
|
let hasLink = state.selectionManager.isLink(node.key);
|
|
10470
10739
|
if (node != null && 'expandedKeys' in state) {
|
|
10740
|
+
var _state_collection_getChildren, _state_collection, _filter_at;
|
|
10471
10741
|
// TODO: ideally node.hasChildNodes would be a way to tell if a row has child nodes, but the row's contents make it so that value is always
|
|
10472
10742
|
// true...
|
|
10743
|
+
let children = (_state_collection_getChildren = (_state_collection = state.collection).getChildren) === null || _state_collection_getChildren === void 0 ? void 0 : _state_collection_getChildren.call(_state_collection, node.key);
|
|
10473
10744
|
hasChildRows = [
|
|
10474
|
-
...
|
|
10745
|
+
...children !== null && children !== void 0 ? children : []
|
|
10475
10746
|
].length > 1;
|
|
10476
10747
|
if (onAction == null && !hasLink && state.selectionManager.selectionMode === 'none' && hasChildRows) onAction = ()=>state.toggleKey(node.key);
|
|
10477
10748
|
let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : undefined;
|
|
10749
|
+
let setSize = 1;
|
|
10750
|
+
var _filter_at_index;
|
|
10751
|
+
if (node.level > 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
|
|
10752
|
+
let parent = state.collection.getItem(node.parentKey);
|
|
10753
|
+
if (parent) {
|
|
10754
|
+
var _state_collection_getChildren1, _state_collection1;
|
|
10755
|
+
// siblings must exist because our original node exists, same with lastItem
|
|
10756
|
+
let siblings = (_state_collection_getChildren1 = (_state_collection1 = state.collection).getChildren) === null || _state_collection_getChildren1 === void 0 ? void 0 : _state_collection_getChildren1.call(_state_collection1, parent.key);
|
|
10757
|
+
setSize = ($c5a24bc478652b5f$export$7475b2c64539e4cf)(siblings).index + 1;
|
|
10758
|
+
}
|
|
10759
|
+
} else setSize = ((_filter_at_index = (_filter_at = [
|
|
10760
|
+
...state.collection
|
|
10761
|
+
].filter((row)=>row.level === 0).at(-1)) === null || _filter_at === void 0 ? void 0 : _filter_at.index) !== null && _filter_at_index !== void 0 ? _filter_at_index : 0) + 1;
|
|
10478
10762
|
treeGridRowProps = {
|
|
10479
10763
|
'aria-expanded': isExpanded,
|
|
10480
10764
|
'aria-level': node.level + 1,
|
|
10481
10765
|
'aria-posinset': (node === null || node === void 0 ? void 0 : node.index) + 1,
|
|
10482
|
-
'aria-setsize':
|
|
10483
|
-
...state.collection
|
|
10484
|
-
].filter((row)=>row.level === 0).at(-1).index + 1
|
|
10766
|
+
'aria-setsize': setSize
|
|
10485
10767
|
};
|
|
10486
10768
|
}
|
|
10487
10769
|
let { itemProps: itemProps, ...itemStates } = ($880e95eb8b93ba9a$export$ecf600387e221c37)({
|
|
@@ -10495,7 +10777,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10495
10777
|
linkBehavior: linkBehavior
|
|
10496
10778
|
});
|
|
10497
10779
|
let onKeyDown = (e)=>{
|
|
10498
|
-
if (!e.currentTarget.contains(e.target)) return;
|
|
10780
|
+
if (!e.currentTarget.contains(e.target) || !ref.current || !document.activeElement) return;
|
|
10499
10781
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current);
|
|
10500
10782
|
walker.currentNode = document.activeElement;
|
|
10501
10783
|
if ('expandedKeys' in state && document.activeElement === ref.current) {
|
|
@@ -10580,9 +10862,10 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10580
10862
|
// to the row above/below instead. We need to re-dispatch the event from a higher parent so it still
|
|
10581
10863
|
// bubbles and gets handled by useSelectableCollection.
|
|
10582
10864
|
if (!e.altKey && ref.current.contains(e.target)) {
|
|
10865
|
+
var _ref_current_parentElement;
|
|
10583
10866
|
e.stopPropagation();
|
|
10584
10867
|
e.preventDefault();
|
|
10585
|
-
ref.current.parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
|
|
10868
|
+
(_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === void 0 ? void 0 : _ref_current_parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
|
|
10586
10869
|
}
|
|
10587
10870
|
break;
|
|
10588
10871
|
case 'Tab':
|
|
@@ -10651,8 +10934,8 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10651
10934
|
};
|
|
10652
10935
|
}
|
|
10653
10936
|
function $4e8b0456ef72939f$var$last(walker) {
|
|
10654
|
-
let next;
|
|
10655
|
-
let last;
|
|
10937
|
+
let next = null;
|
|
10938
|
+
let last = null;
|
|
10656
10939
|
do {
|
|
10657
10940
|
last = walker.lastChild();
|
|
10658
10941
|
if (last) next = last;
|
|
@@ -10894,7 +11177,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
10894
11177
|
usage: 'search',
|
|
10895
11178
|
sensitivity: 'base'
|
|
10896
11179
|
});
|
|
10897
|
-
let delegate = (useMemo)(()=>keyboardDelegate || new ($2a25aae57d74318e$export$a05409b8bb224a5a)(state.collection, state.disabledKeys,
|
|
11180
|
+
let delegate = (useMemo)(()=>keyboardDelegate || new ($2a25aae57d74318e$export$a05409b8bb224a5a)(state.collection, state.disabledKeys, ref, collator), [
|
|
10898
11181
|
keyboardDelegate,
|
|
10899
11182
|
state.collection,
|
|
10900
11183
|
state.disabledKeys,
|
|
@@ -10908,17 +11191,19 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
10908
11191
|
switch(e.key){
|
|
10909
11192
|
case 'ArrowLeft':
|
|
10910
11193
|
{
|
|
11194
|
+
var _delegate_getKeyAbove, _delegate_getFirstKey;
|
|
10911
11195
|
// prevent scrolling containers
|
|
10912
11196
|
e.preventDefault();
|
|
10913
|
-
let key = state.selectedKey != null ? delegate.getKeyAbove(state.selectedKey) : delegate.getFirstKey();
|
|
11197
|
+
let key = state.selectedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, state.selectedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
|
|
10914
11198
|
if (key) state.setSelectedKey(key);
|
|
10915
11199
|
break;
|
|
10916
11200
|
}
|
|
10917
11201
|
case 'ArrowRight':
|
|
10918
11202
|
{
|
|
11203
|
+
var _delegate_getKeyBelow, _delegate_getFirstKey1;
|
|
10919
11204
|
// prevent scrolling containers
|
|
10920
11205
|
e.preventDefault();
|
|
10921
|
-
let key = state.selectedKey != null ? delegate.getKeyBelow(state.selectedKey) : delegate.getFirstKey();
|
|
11206
|
+
let key = state.selectedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, state.selectedKey) : (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate);
|
|
10922
11207
|
if (key) state.setSelectedKey(key);
|
|
10923
11208
|
break;
|
|
10924
11209
|
}
|
|
@@ -10956,7 +11241,8 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
10956
11241
|
...labelProps,
|
|
10957
11242
|
onClick: ()=>{
|
|
10958
11243
|
if (!props.isDisabled) {
|
|
10959
|
-
|
|
11244
|
+
var _ref_current;
|
|
11245
|
+
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
|
|
10960
11246
|
// Show the focus ring so the user knows where focus went
|
|
10961
11247
|
($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
|
|
10962
11248
|
}
|
|
@@ -11029,17 +11315,18 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
11029
11315
|
|
|
11030
11316
|
|
|
11031
11317
|
|
|
11032
|
-
|
|
11033
11318
|
function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
11034
11319
|
let data = ($58aed456727eb0f3$export$703601b7e90536f8).get(state) || {};
|
|
11035
11320
|
let { autoComplete: autoComplete, name: name = data.name, isDisabled: isDisabled = data.isDisabled } = props;
|
|
11036
11321
|
let { validationBehavior: validationBehavior, isRequired: isRequired } = data;
|
|
11037
|
-
let modality = ($507fabe10e71c6fb$export$98e20ec92f614cfe)();
|
|
11038
11322
|
let { visuallyHiddenProps: visuallyHiddenProps } = ($5c3e21d68f1c4674$export$a966af930f325cab)();
|
|
11039
11323
|
($99facab73266f662$export$5add1d006293d136)(props.selectRef, state.selectedKey, state.setSelectedKey);
|
|
11040
11324
|
($e93e671b31057976$export$b8473d3665f3a75a)({
|
|
11041
11325
|
validationBehavior: validationBehavior,
|
|
11042
|
-
focus: ()=>
|
|
11326
|
+
focus: ()=>{
|
|
11327
|
+
var _triggerRef_current;
|
|
11328
|
+
return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();
|
|
11329
|
+
}
|
|
11043
11330
|
}, state, props.selectRef);
|
|
11044
11331
|
var _state_selectedKey;
|
|
11045
11332
|
// In Safari, the <select> cannot have `display: none` or `hidden` for autofill to work.
|
|
@@ -11048,18 +11335,6 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
11048
11335
|
// The solution is to use <VisuallyHidden> to hide the elements, which clips the elements to a
|
|
11049
11336
|
// 1px rectangle. In addition, we hide from screen readers with aria-hidden, and make the <select>
|
|
11050
11337
|
// non tabbable with tabIndex={-1}.
|
|
11051
|
-
//
|
|
11052
|
-
// In mobile browsers, there are next/previous buttons above the software keyboard for navigating
|
|
11053
|
-
// between fields in a form. These only support native form inputs that are tabbable. In order to
|
|
11054
|
-
// support those, an additional hidden input is used to marshall focus to the button. It is tabbable
|
|
11055
|
-
// except when the button is focused, so that shift tab works properly to go to the actual previous
|
|
11056
|
-
// input in the form. Using the <select> for this also works, but Safari on iOS briefly flashes
|
|
11057
|
-
// the native menu on focus, so this isn't ideal. A font-size of 16px or greater is required to
|
|
11058
|
-
// prevent Safari from zooming in on the input when it is focused.
|
|
11059
|
-
//
|
|
11060
|
-
// If the current interaction modality is null, then the user hasn't interacted with the page yet.
|
|
11061
|
-
// In this case, we set the tabIndex to -1 on the input element so that automated accessibility
|
|
11062
|
-
// checkers don't throw false-positives about focusable elements inside an aria-hidden parent.
|
|
11063
11338
|
return {
|
|
11064
11339
|
containerProps: {
|
|
11065
11340
|
...visuallyHiddenProps,
|
|
@@ -11070,13 +11345,9 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
11070
11345
|
['data-a11y-ignore']: 'aria-hidden-focus'
|
|
11071
11346
|
},
|
|
11072
11347
|
inputProps: {
|
|
11073
|
-
type: 'text',
|
|
11074
|
-
tabIndex: modality == null || state.isFocused || state.isOpen ? -1 : 0,
|
|
11075
11348
|
style: {
|
|
11076
|
-
|
|
11077
|
-
}
|
|
11078
|
-
onFocus: ()=>triggerRef.current.focus(),
|
|
11079
|
-
disabled: isDisabled
|
|
11349
|
+
display: 'none'
|
|
11350
|
+
}
|
|
11080
11351
|
},
|
|
11081
11352
|
selectProps: {
|
|
11082
11353
|
tabIndex: -1,
|
|
@@ -11092,7 +11363,7 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
11092
11363
|
function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
11093
11364
|
let { state: state, triggerRef: triggerRef, label: label, name: name, isDisabled: isDisabled } = props;
|
|
11094
11365
|
let selectRef = (useRef)(null);
|
|
11095
|
-
let { containerProps: containerProps,
|
|
11366
|
+
let { containerProps: containerProps, selectProps: selectProps } = $bdd25dc72710631f$export$f809e80f58e251d1({
|
|
11096
11367
|
...props,
|
|
11097
11368
|
selectRef: selectRef
|
|
11098
11369
|
}, state, triggerRef);
|
|
@@ -11103,14 +11374,14 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
|
11103
11374
|
if (state.collection.size <= 300) return /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
11104
11375
|
...containerProps,
|
|
11105
11376
|
"data-testid": "hidden-select-container"
|
|
11106
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement("
|
|
11377
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement("label", null, label, /*#__PURE__*/ ($dbSRa$react).createElement("select", {
|
|
11107
11378
|
...selectProps,
|
|
11108
11379
|
ref: selectRef
|
|
11109
11380
|
}, /*#__PURE__*/ ($dbSRa$react).createElement("option", null), [
|
|
11110
11381
|
...state.collection.getKeys()
|
|
11111
11382
|
].map((key)=>{
|
|
11112
11383
|
let item = state.collection.getItem(key);
|
|
11113
|
-
if (item.type === 'item') return /*#__PURE__*/ ($dbSRa$react).createElement("option", {
|
|
11384
|
+
if (item && item.type === 'item') return /*#__PURE__*/ ($dbSRa$react).createElement("option", {
|
|
11114
11385
|
key: item.key,
|
|
11115
11386
|
value: item.key
|
|
11116
11387
|
}, item.textValue);
|
|
@@ -11545,7 +11816,6 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
11545
11816
|
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
11546
11817
|
let descProps = ($ef06256079686ba0$export$f8aeda7b10753fa1)(description);
|
|
11547
11818
|
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
11548
|
-
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
11549
11819
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(item.props);
|
|
11550
11820
|
let linkProps = ($ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6)(item.props);
|
|
11551
11821
|
return {
|
|
@@ -11718,6 +11988,103 @@ function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {
|
|
|
11718
11988
|
*/
|
|
11719
11989
|
|
|
11720
11990
|
|
|
11991
|
+
const $4f118338184dc1d9$export$e2509388b49734e7 = /*#__PURE__*/ (createContext)(null);
|
|
11992
|
+
function $4f118338184dc1d9$var$Link(props, ref) {
|
|
11993
|
+
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $4f118338184dc1d9$export$e2509388b49734e7);
|
|
11994
|
+
let ElementType = props.href && !props.isDisabled ? 'a' : 'span';
|
|
11995
|
+
let { linkProps: linkProps, isPressed: isPressed } = ($298d61e98472621b$export$dcf14c9974fe2767)({
|
|
11996
|
+
...props,
|
|
11997
|
+
elementType: ElementType
|
|
11998
|
+
}, ref);
|
|
11999
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(props);
|
|
12000
|
+
let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = ($f7dceffc5ad7768b$export$4e328f61c538687f)();
|
|
12001
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
12002
|
+
...props,
|
|
12003
|
+
defaultClassName: 'react-aria-Link',
|
|
12004
|
+
values: {
|
|
12005
|
+
isCurrent: !!props['aria-current'],
|
|
12006
|
+
isDisabled: props.isDisabled || false,
|
|
12007
|
+
isPressed: isPressed,
|
|
12008
|
+
isHovered: isHovered,
|
|
12009
|
+
isFocused: isFocused,
|
|
12010
|
+
isFocusVisible: isFocusVisible
|
|
12011
|
+
}
|
|
12012
|
+
});
|
|
12013
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
12014
|
+
ref: ref,
|
|
12015
|
+
slot: props.slot || undefined,
|
|
12016
|
+
...($3ef42575df84b30b$export$9d1611c77c2fe928)(renderProps, linkProps, hoverProps, focusProps),
|
|
12017
|
+
"data-focused": isFocused || undefined,
|
|
12018
|
+
"data-hovered": isHovered || undefined,
|
|
12019
|
+
"data-pressed": isPressed || undefined,
|
|
12020
|
+
"data-focus-visible": isFocusVisible || undefined,
|
|
12021
|
+
"data-current": !!props['aria-current'] || undefined,
|
|
12022
|
+
"data-disabled": props.isDisabled || undefined
|
|
12023
|
+
}, renderProps.children);
|
|
12024
|
+
}
|
|
12025
|
+
/**
|
|
12026
|
+
* A link allows a user to navigate to another page or resource within a web page
|
|
12027
|
+
* or application.
|
|
12028
|
+
*/ const $4f118338184dc1d9$export$a6c7ac8248d6e38a = /*#__PURE__*/ (forwardRef)($4f118338184dc1d9$var$Link);
|
|
12029
|
+
|
|
12030
|
+
/*
|
|
12031
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
12032
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12033
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12034
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12035
|
+
*
|
|
12036
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12037
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12038
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12039
|
+
* governing permissions and limitations under the License.
|
|
12040
|
+
*/
|
|
12041
|
+
|
|
12042
|
+
|
|
12043
|
+
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /*#__PURE__*/ (createContext)({});
|
|
12044
|
+
function $01b77f81d0f07f68$var$Label(props, ref) {
|
|
12045
|
+
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
12046
|
+
let { elementType: ElementType = 'label', ...labelProps } = props;
|
|
12047
|
+
// @ts-ignore
|
|
12048
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
12049
|
+
className: "react-aria-Label",
|
|
12050
|
+
...labelProps,
|
|
12051
|
+
ref: ref
|
|
12052
|
+
});
|
|
12053
|
+
}
|
|
12054
|
+
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /*#__PURE__*/ ($f39a9eba43920ace$export$86427a43e3e48ebb)($01b77f81d0f07f68$var$Label);
|
|
12055
|
+
|
|
12056
|
+
/*
|
|
12057
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
12058
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12059
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12060
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12061
|
+
*
|
|
12062
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12063
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12064
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12065
|
+
* governing permissions and limitations under the License.
|
|
12066
|
+
*/
|
|
12067
|
+
|
|
12068
|
+
|
|
12069
|
+
|
|
12070
|
+
|
|
12071
|
+
const $0393f8ab869a0f1a$export$e9f3bf65a26ce129 = /*#__PURE__*/ (createContext)(null);
|
|
12072
|
+
|
|
12073
|
+
/*
|
|
12074
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
12075
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12076
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12077
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12078
|
+
*
|
|
12079
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12080
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12081
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12082
|
+
* governing permissions and limitations under the License.
|
|
12083
|
+
*/
|
|
12084
|
+
|
|
12085
|
+
|
|
12086
|
+
|
|
12087
|
+
|
|
11721
12088
|
|
|
11722
12089
|
|
|
11723
12090
|
const $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes = new Set([
|
|
@@ -11733,35 +12100,88 @@ const $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes = new Set([
|
|
|
11733
12100
|
const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /*#__PURE__*/ (createContext)({});
|
|
11734
12101
|
function $d2b4bc8c273e7be6$var$Button(props, ref) {
|
|
11735
12102
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
|
|
12103
|
+
props = $d2b4bc8c273e7be6$var$disablePendingProps(props);
|
|
11736
12104
|
let ctx = props;
|
|
12105
|
+
let { isPending: isPending } = ctx;
|
|
11737
12106
|
let { buttonProps: buttonProps, isPressed: isPressed } = ($701a24aa0da5b062$export$ea18c227d4417cc3)(props, ref);
|
|
11738
12107
|
let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = ($f7dceffc5ad7768b$export$4e328f61c538687f)(props);
|
|
11739
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(
|
|
12108
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)({
|
|
12109
|
+
...props,
|
|
12110
|
+
isDisabled: props.isDisabled || isPending
|
|
12111
|
+
});
|
|
12112
|
+
let renderValues = {
|
|
12113
|
+
isHovered: isHovered,
|
|
12114
|
+
isPressed: (ctx.isPressed || isPressed) && !isPending,
|
|
12115
|
+
isFocused: isFocused,
|
|
12116
|
+
isFocusVisible: isFocusVisible,
|
|
12117
|
+
isDisabled: props.isDisabled || false,
|
|
12118
|
+
isPending: isPending !== null && isPending !== void 0 ? isPending : false
|
|
12119
|
+
};
|
|
11740
12120
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
11741
12121
|
...props,
|
|
11742
|
-
values:
|
|
11743
|
-
isHovered: isHovered,
|
|
11744
|
-
isPressed: isPressed,
|
|
11745
|
-
isFocused: isFocused,
|
|
11746
|
-
isFocusVisible: isFocusVisible,
|
|
11747
|
-
isDisabled: props.isDisabled || false
|
|
11748
|
-
},
|
|
12122
|
+
values: renderValues,
|
|
11749
12123
|
defaultClassName: 'react-aria-Button'
|
|
11750
12124
|
});
|
|
12125
|
+
let buttonId = ($bdb11010cef70236$export$f680877a34711e37)(buttonProps.id);
|
|
12126
|
+
let progressId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
12127
|
+
let ariaLabelledby = buttonProps['aria-labelledby'];
|
|
12128
|
+
if (isPending) {
|
|
12129
|
+
// aria-labelledby wins over aria-label
|
|
12130
|
+
// https://www.w3.org/TR/accname-1.2/#computation-steps
|
|
12131
|
+
if (ariaLabelledby) ariaLabelledby = `${ariaLabelledby} ${progressId}`;
|
|
12132
|
+
else if (buttonProps['aria-label']) ariaLabelledby = `${buttonId} ${progressId}`;
|
|
12133
|
+
}
|
|
12134
|
+
let wasPending = (useRef)(isPending);
|
|
12135
|
+
(useEffect)(()=>{
|
|
12136
|
+
let message = {
|
|
12137
|
+
'aria-labelledby': ariaLabelledby || buttonId
|
|
12138
|
+
};
|
|
12139
|
+
if (!wasPending.current && isFocused && isPending) ($319e236875307eab$export$a9b970dcc4ae71a9)(message, 'assertive');
|
|
12140
|
+
else if (wasPending.current && isFocused && !isPending) ($319e236875307eab$export$a9b970dcc4ae71a9)(message, 'assertive');
|
|
12141
|
+
wasPending.current = isPending;
|
|
12142
|
+
}, [
|
|
12143
|
+
isPending,
|
|
12144
|
+
isFocused,
|
|
12145
|
+
ariaLabelledby,
|
|
12146
|
+
buttonId
|
|
12147
|
+
]);
|
|
11751
12148
|
return /*#__PURE__*/ ($dbSRa$react).createElement("button", {
|
|
11752
12149
|
...($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
11753
12150
|
propNames: $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes
|
|
11754
12151
|
}),
|
|
11755
12152
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(buttonProps, focusProps, hoverProps),
|
|
11756
12153
|
...renderProps,
|
|
12154
|
+
id: buttonId,
|
|
11757
12155
|
ref: ref,
|
|
12156
|
+
"aria-labelledby": ariaLabelledby,
|
|
11758
12157
|
slot: props.slot || undefined,
|
|
12158
|
+
"aria-disabled": isPending ? 'true' : buttonProps['aria-disabled'],
|
|
11759
12159
|
"data-disabled": props.isDisabled || undefined,
|
|
11760
|
-
"data-pressed":
|
|
12160
|
+
"data-pressed": renderValues.isPressed || undefined,
|
|
11761
12161
|
"data-hovered": isHovered || undefined,
|
|
11762
12162
|
"data-focused": isFocused || undefined,
|
|
12163
|
+
"data-pending": isPending || undefined,
|
|
11763
12164
|
"data-focus-visible": isFocusVisible || undefined
|
|
11764
|
-
})
|
|
12165
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($0393f8ab869a0f1a$export$e9f3bf65a26ce129).Provider, {
|
|
12166
|
+
value: {
|
|
12167
|
+
id: progressId
|
|
12168
|
+
}
|
|
12169
|
+
}, renderProps.children));
|
|
12170
|
+
}
|
|
12171
|
+
function $d2b4bc8c273e7be6$var$disablePendingProps(props) {
|
|
12172
|
+
// Don't allow interaction while isPending is true
|
|
12173
|
+
if (props.isPending) {
|
|
12174
|
+
props.onPress = undefined;
|
|
12175
|
+
props.onPressStart = undefined;
|
|
12176
|
+
props.onPressEnd = undefined;
|
|
12177
|
+
props.onPressChange = undefined;
|
|
12178
|
+
props.onPressUp = undefined;
|
|
12179
|
+
props.onKeyDown = undefined;
|
|
12180
|
+
props.onKeyUp = undefined;
|
|
12181
|
+
props.onClick = undefined;
|
|
12182
|
+
props.href = undefined;
|
|
12183
|
+
}
|
|
12184
|
+
return props;
|
|
11765
12185
|
}
|
|
11766
12186
|
/**
|
|
11767
12187
|
* A button allows a user to perform an action, with mouse, touch, and keyboard interactions.
|
|
@@ -11876,11 +12296,13 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11876
12296
|
}
|
|
11877
12297
|
getKeyBefore(key) {
|
|
11878
12298
|
let node = this.keyMap.get(key);
|
|
11879
|
-
|
|
12299
|
+
var _node_prevKey;
|
|
12300
|
+
return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
|
|
11880
12301
|
}
|
|
11881
12302
|
getKeyAfter(key) {
|
|
11882
12303
|
let node = this.keyMap.get(key);
|
|
11883
|
-
|
|
12304
|
+
var _node_nextKey;
|
|
12305
|
+
return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
|
|
11884
12306
|
}
|
|
11885
12307
|
getFirstKey() {
|
|
11886
12308
|
return this.firstKey;
|
|
@@ -11889,7 +12311,8 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11889
12311
|
return this.lastKey;
|
|
11890
12312
|
}
|
|
11891
12313
|
getItem(key) {
|
|
11892
|
-
|
|
12314
|
+
var _this_keyMap_get;
|
|
12315
|
+
return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
|
|
11893
12316
|
}
|
|
11894
12317
|
at(idx) {
|
|
11895
12318
|
const keys = [
|
|
@@ -11903,13 +12326,15 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11903
12326
|
}
|
|
11904
12327
|
constructor(nodes){
|
|
11905
12328
|
this.keyMap = new Map();
|
|
12329
|
+
this.firstKey = null;
|
|
12330
|
+
this.lastKey = null;
|
|
11906
12331
|
this.iterable = nodes;
|
|
11907
12332
|
let visit = (node)=>{
|
|
11908
12333
|
this.keyMap.set(node.key, node);
|
|
11909
12334
|
if (node.childNodes && node.type === 'section') for (let child of node.childNodes)visit(child);
|
|
11910
12335
|
};
|
|
11911
12336
|
for (let node of nodes)visit(node);
|
|
11912
|
-
let last;
|
|
12337
|
+
let last = null;
|
|
11913
12338
|
let index = 0;
|
|
11914
12339
|
for (let [key, node] of this.keyMap){
|
|
11915
12340
|
if (last) {
|
|
@@ -11925,7 +12350,8 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11925
12350
|
// If it isn't the last node, last.nextKey will properly set at start of new loop
|
|
11926
12351
|
last.nextKey = undefined;
|
|
11927
12352
|
}
|
|
11928
|
-
|
|
12353
|
+
var _last_key;
|
|
12354
|
+
this.lastKey = (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
|
|
11929
12355
|
}
|
|
11930
12356
|
}
|
|
11931
12357
|
|
|
@@ -11943,11 +12369,11 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11943
12369
|
constructor(keys, anchorKey, currentKey){
|
|
11944
12370
|
super(keys);
|
|
11945
12371
|
if (keys instanceof $e40ea825a81a3709$export$52baac22726c72bf) {
|
|
11946
|
-
this.anchorKey = anchorKey
|
|
11947
|
-
this.currentKey = currentKey
|
|
12372
|
+
this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : keys.anchorKey;
|
|
12373
|
+
this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : keys.currentKey;
|
|
11948
12374
|
} else {
|
|
11949
|
-
this.anchorKey = anchorKey;
|
|
11950
|
-
this.currentKey = currentKey;
|
|
12375
|
+
this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : null;
|
|
12376
|
+
this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : null;
|
|
11951
12377
|
}
|
|
11952
12378
|
}
|
|
11953
12379
|
}
|
|
@@ -11973,7 +12399,7 @@ function $7af3f5b51489e0b5$var$equalSets(setA, setB) {
|
|
|
11973
12399
|
return true;
|
|
11974
12400
|
}
|
|
11975
12401
|
function $7af3f5b51489e0b5$export$253fe78d46329472(props) {
|
|
11976
|
-
let { selectionMode: selectionMode = 'none', disallowEmptySelection: disallowEmptySelection, allowDuplicateSelectionEvents: allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = 'toggle', disabledBehavior: disabledBehavior = 'all' } = props;
|
|
12402
|
+
let { selectionMode: selectionMode = 'none', disallowEmptySelection: disallowEmptySelection = false, allowDuplicateSelectionEvents: allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = 'toggle', disabledBehavior: disabledBehavior = 'all' } = props;
|
|
11977
12403
|
// We want synchronous updates to `isFocused` and `focusedKey` after their setters are called.
|
|
11978
12404
|
// But we also need to trigger a react re-render. So, we have both a ref (sync) and state (async).
|
|
11979
12405
|
let isFocusedRef = (useRef)(false);
|
|
@@ -12112,8 +12538,9 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12112
12538
|
* Returns whether a key is selected.
|
|
12113
12539
|
*/ isSelected(key) {
|
|
12114
12540
|
if (this.state.selectionMode === 'none') return false;
|
|
12115
|
-
|
|
12116
|
-
|
|
12541
|
+
let mappedKey = this.getKey(key);
|
|
12542
|
+
if (mappedKey == null) return false;
|
|
12543
|
+
return this.state.selectedKeys === 'all' ? this.canSelectItem(mappedKey) : this.state.selectedKeys.has(mappedKey);
|
|
12117
12544
|
}
|
|
12118
12545
|
/**
|
|
12119
12546
|
* Whether the selection is empty.
|
|
@@ -12137,7 +12564,8 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12137
12564
|
let item = this.collection.getItem(key);
|
|
12138
12565
|
if (!first || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, first) < 0) first = item;
|
|
12139
12566
|
}
|
|
12140
|
-
|
|
12567
|
+
var _first_key;
|
|
12568
|
+
return (_first_key = first === null || first === void 0 ? void 0 : first.key) !== null && _first_key !== void 0 ? _first_key : null;
|
|
12141
12569
|
}
|
|
12142
12570
|
get lastSelectedKey() {
|
|
12143
12571
|
let last = null;
|
|
@@ -12145,7 +12573,8 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12145
12573
|
let item = this.collection.getItem(key);
|
|
12146
12574
|
if (!last || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, last) > 0) last = item;
|
|
12147
12575
|
}
|
|
12148
|
-
|
|
12576
|
+
var _last_key;
|
|
12577
|
+
return (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
|
|
12149
12578
|
}
|
|
12150
12579
|
get disabledKeys() {
|
|
12151
12580
|
return this.state.disabledKeys;
|
|
@@ -12161,18 +12590,21 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12161
12590
|
this.replaceSelection(toKey);
|
|
12162
12591
|
return;
|
|
12163
12592
|
}
|
|
12164
|
-
|
|
12593
|
+
let mappedToKey = this.getKey(toKey);
|
|
12594
|
+
if (mappedToKey == null) return;
|
|
12165
12595
|
let selection;
|
|
12166
12596
|
// Only select the one key if coming from a select all.
|
|
12167
12597
|
if (this.state.selectedKeys === 'all') selection = new ($e40ea825a81a3709$export$52baac22726c72bf)([
|
|
12168
|
-
|
|
12169
|
-
],
|
|
12598
|
+
mappedToKey
|
|
12599
|
+
], mappedToKey, mappedToKey);
|
|
12170
12600
|
else {
|
|
12171
12601
|
let selectedKeys = this.state.selectedKeys;
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12602
|
+
var _selectedKeys_anchorKey;
|
|
12603
|
+
let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : mappedToKey;
|
|
12604
|
+
selection = new ($e40ea825a81a3709$export$52baac22726c72bf)(selectedKeys, anchorKey, mappedToKey);
|
|
12605
|
+
var _selectedKeys_currentKey;
|
|
12606
|
+
for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : mappedToKey))selection.delete(key);
|
|
12607
|
+
for (let key of this.getKeyRange(mappedToKey, anchorKey))if (this.canSelectItem(key)) selection.add(key);
|
|
12176
12608
|
}
|
|
12177
12609
|
this.state.setSelectedKeys(selection);
|
|
12178
12610
|
}
|
|
@@ -12186,11 +12618,13 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12186
12618
|
return [];
|
|
12187
12619
|
}
|
|
12188
12620
|
getKeyRangeInternal(from, to) {
|
|
12621
|
+
var _this_layoutDelegate;
|
|
12622
|
+
if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0 ? void 0 : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to);
|
|
12189
12623
|
let keys = [];
|
|
12190
12624
|
let key = from;
|
|
12191
|
-
while(key){
|
|
12625
|
+
while(key != null){
|
|
12192
12626
|
let item = this.collection.getItem(key);
|
|
12193
|
-
if (item && item.type === 'item' || item.type === 'cell' && this.allowsCellSelection) keys.push(key);
|
|
12627
|
+
if (item && (item.type === 'item' || item.type === 'cell' && this.allowsCellSelection)) keys.push(key);
|
|
12194
12628
|
if (key === to) return keys;
|
|
12195
12629
|
key = this.collection.getKeyAfter(key);
|
|
12196
12630
|
}
|
|
@@ -12203,7 +12637,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12203
12637
|
// If cell selection is allowed, just return the key.
|
|
12204
12638
|
if (item.type === 'cell' && this.allowsCellSelection) return key;
|
|
12205
12639
|
// Find a parent item to select
|
|
12206
|
-
while(item.type !== 'item' && item.parentKey != null)item = this.collection.getItem(item.parentKey);
|
|
12640
|
+
while(item && item.type !== 'item' && item.parentKey != null)item = this.collection.getItem(item.parentKey);
|
|
12207
12641
|
if (!item || item.type !== 'item') return null;
|
|
12208
12642
|
return item.key;
|
|
12209
12643
|
}
|
|
@@ -12215,14 +12649,14 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12215
12649
|
this.replaceSelection(key);
|
|
12216
12650
|
return;
|
|
12217
12651
|
}
|
|
12218
|
-
|
|
12219
|
-
if (
|
|
12652
|
+
let mappedKey = this.getKey(key);
|
|
12653
|
+
if (mappedKey == null) return;
|
|
12220
12654
|
let keys = new ($e40ea825a81a3709$export$52baac22726c72bf)(this.state.selectedKeys === 'all' ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
12221
|
-
if (keys.has(
|
|
12222
|
-
else if (this.canSelectItem(
|
|
12223
|
-
keys.add(
|
|
12224
|
-
keys.anchorKey =
|
|
12225
|
-
keys.currentKey =
|
|
12655
|
+
if (keys.has(mappedKey)) keys.delete(mappedKey);
|
|
12656
|
+
else if (this.canSelectItem(mappedKey)) {
|
|
12657
|
+
keys.add(mappedKey);
|
|
12658
|
+
keys.anchorKey = mappedKey;
|
|
12659
|
+
keys.currentKey = mappedKey;
|
|
12226
12660
|
}
|
|
12227
12661
|
if (this.disallowEmptySelection && keys.size === 0) return;
|
|
12228
12662
|
this.state.setSelectedKeys(keys);
|
|
@@ -12231,11 +12665,11 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12231
12665
|
* Replaces the selection with only the given key.
|
|
12232
12666
|
*/ replaceSelection(key) {
|
|
12233
12667
|
if (this.selectionMode === 'none') return;
|
|
12234
|
-
|
|
12235
|
-
if (
|
|
12236
|
-
let selection = this.canSelectItem(
|
|
12237
|
-
|
|
12238
|
-
],
|
|
12668
|
+
let mappedKey = this.getKey(key);
|
|
12669
|
+
if (mappedKey == null) return;
|
|
12670
|
+
let selection = this.canSelectItem(mappedKey) ? new ($e40ea825a81a3709$export$52baac22726c72bf)([
|
|
12671
|
+
mappedKey
|
|
12672
|
+
], mappedKey, mappedKey) : new ($e40ea825a81a3709$export$52baac22726c72bf)();
|
|
12239
12673
|
this.state.setSelectedKeys(selection);
|
|
12240
12674
|
}
|
|
12241
12675
|
/**
|
|
@@ -12244,9 +12678,9 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12244
12678
|
if (this.selectionMode === 'none') return;
|
|
12245
12679
|
let selection = new ($e40ea825a81a3709$export$52baac22726c72bf)();
|
|
12246
12680
|
for (let key of keys){
|
|
12247
|
-
|
|
12248
|
-
if (
|
|
12249
|
-
selection.add(
|
|
12681
|
+
let mappedKey = this.getKey(key);
|
|
12682
|
+
if (mappedKey != null) {
|
|
12683
|
+
selection.add(mappedKey);
|
|
12250
12684
|
if (this.selectionMode === 'single') break;
|
|
12251
12685
|
}
|
|
12252
12686
|
}
|
|
@@ -12257,10 +12691,12 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12257
12691
|
let addKeys = (key)=>{
|
|
12258
12692
|
while(key != null){
|
|
12259
12693
|
if (this.canSelectItem(key)) {
|
|
12694
|
+
var _getFirstItem;
|
|
12260
12695
|
let item = this.collection.getItem(key);
|
|
12261
|
-
if (item.type === 'item') keys.push(key);
|
|
12696
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === 'item') keys.push(key);
|
|
12697
|
+
var _getFirstItem_key;
|
|
12262
12698
|
// Add child keys. If cell selection is allowed, then include item children too.
|
|
12263
|
-
if (item.hasChildNodes && (this.allowsCellSelection || item.type !== 'item')) addKeys(($c5a24bc478652b5f$export$fbdeaa6a76694f71)(($c5a24bc478652b5f$export$1005530eda016c13)(item, this.collection)).key);
|
|
12699
|
+
if ((item === null || item === void 0 ? void 0 : item.hasChildNodes) && (this.allowsCellSelection || item.type !== 'item')) addKeys((_getFirstItem_key = (_getFirstItem = ($c5a24bc478652b5f$export$fbdeaa6a76694f71)(($c5a24bc478652b5f$export$1005530eda016c13)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null);
|
|
12264
12700
|
}
|
|
12265
12701
|
key = this.collection.getKeyAfter(key);
|
|
12266
12702
|
}
|
|
@@ -12333,6 +12769,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12333
12769
|
var _options_allowsCellSelection;
|
|
12334
12770
|
this.allowsCellSelection = (_options_allowsCellSelection = options === null || options === void 0 ? void 0 : options.allowsCellSelection) !== null && _options_allowsCellSelection !== void 0 ? _options_allowsCellSelection : false;
|
|
12335
12771
|
this._isSelectAll = null;
|
|
12772
|
+
this.layoutDelegate = (options === null || options === void 0 ? void 0 : options.layoutDelegate) || null;
|
|
12336
12773
|
}
|
|
12337
12774
|
}
|
|
12338
12775
|
|
|
@@ -12351,7 +12788,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12351
12788
|
|
|
12352
12789
|
|
|
12353
12790
|
function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
|
|
12354
|
-
let { filter: filter } = props;
|
|
12791
|
+
let { filter: filter, layoutDelegate: layoutDelegate } = props;
|
|
12355
12792
|
let selectionState = ($7af3f5b51489e0b5$export$253fe78d46329472)(props);
|
|
12356
12793
|
let disabledKeys = (useMemo)(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [
|
|
12357
12794
|
props.disabledKeys
|
|
@@ -12365,30 +12802,35 @@ function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
|
|
|
12365
12802
|
props.suppressTextValueWarning
|
|
12366
12803
|
]);
|
|
12367
12804
|
let collection = ($7613b1592d41b092$export$6cd28814d92fa9c9)(props, factory, context);
|
|
12368
|
-
let selectionManager = (useMemo)(()=>new ($d496c0a20b6e58ec$export$6c8a5aaad13c9852)(collection, selectionState
|
|
12805
|
+
let selectionManager = (useMemo)(()=>new ($d496c0a20b6e58ec$export$6c8a5aaad13c9852)(collection, selectionState, {
|
|
12806
|
+
layoutDelegate: layoutDelegate
|
|
12807
|
+
}), [
|
|
12369
12808
|
collection,
|
|
12370
|
-
selectionState
|
|
12809
|
+
selectionState,
|
|
12810
|
+
layoutDelegate
|
|
12371
12811
|
]);
|
|
12372
12812
|
// Reset focused key if that item is deleted from the collection.
|
|
12373
12813
|
const cachedCollection = (useRef)(null);
|
|
12374
12814
|
(useEffect)(()=>{
|
|
12375
|
-
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) {
|
|
12815
|
+
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey) && cachedCollection.current) {
|
|
12376
12816
|
const startItem = cachedCollection.current.getItem(selectionState.focusedKey);
|
|
12377
12817
|
const cachedItemNodes = [
|
|
12378
12818
|
...cachedCollection.current.getKeys()
|
|
12379
12819
|
].map((key)=>{
|
|
12380
12820
|
const itemNode = cachedCollection.current.getItem(key);
|
|
12381
|
-
return itemNode.type === 'item' ? itemNode : null;
|
|
12821
|
+
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
|
|
12382
12822
|
}).filter((node)=>node !== null);
|
|
12383
12823
|
const itemNodes = [
|
|
12384
12824
|
...collection.getKeys()
|
|
12385
12825
|
].map((key)=>{
|
|
12386
12826
|
const itemNode = collection.getItem(key);
|
|
12387
|
-
return itemNode.type === 'item' ? itemNode : null;
|
|
12827
|
+
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
|
|
12388
12828
|
}).filter((node)=>node !== null);
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12829
|
+
var _cachedItemNodes_length, _itemNodes_length;
|
|
12830
|
+
const diff = ((_cachedItemNodes_length = cachedItemNodes === null || cachedItemNodes === void 0 ? void 0 : cachedItemNodes.length) !== null && _cachedItemNodes_length !== void 0 ? _cachedItemNodes_length : 0) - ((_itemNodes_length = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length !== void 0 ? _itemNodes_length : 0);
|
|
12831
|
+
var _startItem_index, _startItem_index1, _itemNodes_length1;
|
|
12832
|
+
let index = Math.min(diff > 1 ? Math.max(((_startItem_index = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index !== void 0 ? _startItem_index : 0) - diff + 1, 0) : (_startItem_index1 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index1 !== void 0 ? _startItem_index1 : 0, ((_itemNodes_length1 = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length1 !== void 0 ? _itemNodes_length1 : 0) - 1);
|
|
12833
|
+
let newNode = null;
|
|
12392
12834
|
let isReverseSearching = false;
|
|
12393
12835
|
while(index >= 0){
|
|
12394
12836
|
if (!selectionManager.isDisabled(itemNodes[index].key)) {
|
|
@@ -12399,7 +12841,8 @@ function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
|
|
|
12399
12841
|
if (index < itemNodes.length - 1 && !isReverseSearching) index++;
|
|
12400
12842
|
else {
|
|
12401
12843
|
isReverseSearching = true;
|
|
12402
|
-
|
|
12844
|
+
var _startItem_index2, _startItem_index3;
|
|
12845
|
+
if (index > ((_startItem_index2 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index2 !== void 0 ? _startItem_index2 : 0)) index = (_startItem_index3 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index3 !== void 0 ? _startItem_index3 : 0;
|
|
12403
12846
|
index--;
|
|
12404
12847
|
}
|
|
12405
12848
|
}
|
|
@@ -12447,6 +12890,8 @@ function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
|
|
|
12447
12890
|
allowDuplicateSelectionEvents: true,
|
|
12448
12891
|
selectedKeys: selectedKeys,
|
|
12449
12892
|
onSelectionChange: (keys)=>{
|
|
12893
|
+
// impossible, but TS doesn't know that
|
|
12894
|
+
if (keys === 'all') return;
|
|
12450
12895
|
var _keys_values_next_value;
|
|
12451
12896
|
let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
|
|
12452
12897
|
// Always fire onSelectionChange, even if the key is the same
|
|
@@ -12505,6 +12950,145 @@ function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
|
|
|
12505
12950
|
};
|
|
12506
12951
|
}
|
|
12507
12952
|
|
|
12953
|
+
/*
|
|
12954
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
12955
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12956
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12957
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12958
|
+
*
|
|
12959
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12960
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12961
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12962
|
+
* governing permissions and limitations under the License.
|
|
12963
|
+
*/
|
|
12964
|
+
|
|
12965
|
+
function $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {
|
|
12966
|
+
let [isExpanded, setExpanded] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);
|
|
12967
|
+
const expand = (useCallback)(()=>{
|
|
12968
|
+
setExpanded(true);
|
|
12969
|
+
}, [
|
|
12970
|
+
setExpanded
|
|
12971
|
+
]);
|
|
12972
|
+
const collapse = (useCallback)(()=>{
|
|
12973
|
+
setExpanded(false);
|
|
12974
|
+
}, [
|
|
12975
|
+
setExpanded
|
|
12976
|
+
]);
|
|
12977
|
+
const toggle = (useCallback)(()=>{
|
|
12978
|
+
setExpanded(!isExpanded);
|
|
12979
|
+
}, [
|
|
12980
|
+
setExpanded,
|
|
12981
|
+
isExpanded
|
|
12982
|
+
]);
|
|
12983
|
+
return {
|
|
12984
|
+
isExpanded: isExpanded,
|
|
12985
|
+
setExpanded: setExpanded,
|
|
12986
|
+
expand: expand,
|
|
12987
|
+
collapse: collapse,
|
|
12988
|
+
toggle: toggle
|
|
12989
|
+
};
|
|
12990
|
+
}
|
|
12991
|
+
|
|
12992
|
+
/*
|
|
12993
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
12994
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12995
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12996
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12997
|
+
*
|
|
12998
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12999
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13000
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13001
|
+
* governing permissions and limitations under the License.
|
|
13002
|
+
*/
|
|
13003
|
+
|
|
13004
|
+
function $9385b3affbdec831$export$f36461af0ef4707d(props) {
|
|
13005
|
+
let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;
|
|
13006
|
+
let [expandedKeys, setExpandedKeys] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)((useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [
|
|
13007
|
+
props.expandedKeys
|
|
13008
|
+
]), (useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [
|
|
13009
|
+
props.defaultExpandedKeys
|
|
13010
|
+
]), props.onExpandedChange);
|
|
13011
|
+
(useEffect)(()=>{
|
|
13012
|
+
// Ensure only one item is expanded if allowsMultipleExpanded is false.
|
|
13013
|
+
if (!allowsMultipleExpanded && expandedKeys.size > 1) setExpandedKeys(new Set([
|
|
13014
|
+
expandedKeys.values().next().value
|
|
13015
|
+
]));
|
|
13016
|
+
});
|
|
13017
|
+
return {
|
|
13018
|
+
allowsMultipleExpanded: allowsMultipleExpanded,
|
|
13019
|
+
isDisabled: isDisabled,
|
|
13020
|
+
expandedKeys: expandedKeys,
|
|
13021
|
+
setExpandedKeys: setExpandedKeys,
|
|
13022
|
+
toggleKey (key) {
|
|
13023
|
+
let keys;
|
|
13024
|
+
if (allowsMultipleExpanded) {
|
|
13025
|
+
keys = new Set(expandedKeys);
|
|
13026
|
+
if (keys.has(key)) keys.delete(key);
|
|
13027
|
+
else keys.add(key);
|
|
13028
|
+
} else keys = new Set(expandedKeys.has(key) ? [] : [
|
|
13029
|
+
key
|
|
13030
|
+
]);
|
|
13031
|
+
setExpandedKeys(keys);
|
|
13032
|
+
}
|
|
13033
|
+
};
|
|
13034
|
+
}
|
|
13035
|
+
|
|
13036
|
+
/*
|
|
13037
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
13038
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13039
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13040
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13041
|
+
*
|
|
13042
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
13043
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13044
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13045
|
+
* governing permissions and limitations under the License.
|
|
13046
|
+
*/
|
|
13047
|
+
|
|
13048
|
+
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
|
|
13049
|
+
let overlayTriggerState = ($fc909762b330b746$export$61c6a8c84e605fb6)(props);
|
|
13050
|
+
let [focusStrategy, setFocusStrategy] = (useState)(null);
|
|
13051
|
+
let [expandedKeysStack, setExpandedKeysStack] = (useState)([]);
|
|
13052
|
+
let closeAll = ()=>{
|
|
13053
|
+
setExpandedKeysStack([]);
|
|
13054
|
+
overlayTriggerState.close();
|
|
13055
|
+
};
|
|
13056
|
+
let openSubmenu = (triggerKey, level)=>{
|
|
13057
|
+
setExpandedKeysStack((oldStack)=>{
|
|
13058
|
+
if (level > oldStack.length) return oldStack;
|
|
13059
|
+
return [
|
|
13060
|
+
...oldStack.slice(0, level),
|
|
13061
|
+
triggerKey
|
|
13062
|
+
];
|
|
13063
|
+
});
|
|
13064
|
+
};
|
|
13065
|
+
let closeSubmenu = (triggerKey, level)=>{
|
|
13066
|
+
setExpandedKeysStack((oldStack)=>{
|
|
13067
|
+
let key = oldStack[level];
|
|
13068
|
+
if (key === triggerKey) return oldStack.slice(0, level);
|
|
13069
|
+
else return oldStack;
|
|
13070
|
+
});
|
|
13071
|
+
};
|
|
13072
|
+
return {
|
|
13073
|
+
focusStrategy: focusStrategy,
|
|
13074
|
+
...overlayTriggerState,
|
|
13075
|
+
open (focusStrategy = null) {
|
|
13076
|
+
setFocusStrategy(focusStrategy);
|
|
13077
|
+
overlayTriggerState.open();
|
|
13078
|
+
},
|
|
13079
|
+
toggle (focusStrategy = null) {
|
|
13080
|
+
setFocusStrategy(focusStrategy);
|
|
13081
|
+
overlayTriggerState.toggle();
|
|
13082
|
+
},
|
|
13083
|
+
close () {
|
|
13084
|
+
closeAll();
|
|
13085
|
+
},
|
|
13086
|
+
expandedKeysStack: expandedKeysStack,
|
|
13087
|
+
openSubmenu: openSubmenu,
|
|
13088
|
+
closeSubmenu: closeSubmenu
|
|
13089
|
+
};
|
|
13090
|
+
}
|
|
13091
|
+
|
|
12508
13092
|
/*
|
|
12509
13093
|
* Copyright 2020 Adobe. All rights reserved.
|
|
12510
13094
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -12630,7 +13214,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12630
13214
|
let { delay: delay = $8796f90736e175cb$var$TOOLTIP_DELAY, closeDelay: closeDelay = $8796f90736e175cb$var$TOOLTIP_COOLDOWN } = props;
|
|
12631
13215
|
let { isOpen: isOpen, open: open, close: close } = ($fc909762b330b746$export$61c6a8c84e605fb6)(props);
|
|
12632
13216
|
let id = (useMemo)(()=>`${++$8796f90736e175cb$var$tooltipId}`, []);
|
|
12633
|
-
let closeTimeout = (useRef)(
|
|
13217
|
+
let closeTimeout = (useRef)(null);
|
|
12634
13218
|
let closeCallback = (useRef)(close);
|
|
12635
13219
|
let ensureTooltipEntry = ()=>{
|
|
12636
13220
|
$8796f90736e175cb$var$tooltips[id] = hideTooltip;
|
|
@@ -12642,7 +13226,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12642
13226
|
}
|
|
12643
13227
|
};
|
|
12644
13228
|
let showTooltip = ()=>{
|
|
12645
|
-
clearTimeout(closeTimeout.current);
|
|
13229
|
+
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
12646
13230
|
closeTimeout.current = null;
|
|
12647
13231
|
closeOpenTooltips();
|
|
12648
13232
|
ensureTooltipEntry();
|
|
@@ -12659,7 +13243,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12659
13243
|
};
|
|
12660
13244
|
let hideTooltip = (immediate)=>{
|
|
12661
13245
|
if (immediate || closeDelay <= 0) {
|
|
12662
|
-
clearTimeout(closeTimeout.current);
|
|
13246
|
+
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
12663
13247
|
closeTimeout.current = null;
|
|
12664
13248
|
closeCallback.current();
|
|
12665
13249
|
} else if (!closeTimeout.current) closeTimeout.current = setTimeout(()=>{
|
|
@@ -12694,10 +13278,9 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12694
13278
|
}, [
|
|
12695
13279
|
close
|
|
12696
13280
|
]);
|
|
12697
|
-
// eslint-disable-next-line arrow-body-style
|
|
12698
13281
|
(useEffect)(()=>{
|
|
12699
13282
|
return ()=>{
|
|
12700
|
-
clearTimeout(closeTimeout.current);
|
|
13283
|
+
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
12701
13284
|
let tooltip = $8796f90736e175cb$var$tooltips[id];
|
|
12702
13285
|
if (tooltip) delete $8796f90736e175cb$var$tooltips[id];
|
|
12703
13286
|
};
|
|
@@ -12727,6 +13310,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12727
13310
|
*/
|
|
12728
13311
|
|
|
12729
13312
|
|
|
13313
|
+
|
|
12730
13314
|
const $ee014567cb39d3f0$export$ff05c3ac10437e03 = /*#__PURE__*/ (createContext)(null);
|
|
12731
13315
|
function $ee014567cb39d3f0$var$FieldError(props, ref) {
|
|
12732
13316
|
let validation = (useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
|
|
@@ -12741,6 +13325,7 @@ function $ee014567cb39d3f0$var$FieldError(props, ref) {
|
|
|
12741
13325
|
*/ const $ee014567cb39d3f0$export$f551688fc98f2e09 = /*#__PURE__*/ (forwardRef)($ee014567cb39d3f0$var$FieldError);
|
|
12742
13326
|
const $ee014567cb39d3f0$var$FieldErrorInner = /*#__PURE__*/ (forwardRef)((props, ref)=>{
|
|
12743
13327
|
let validation = (useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
|
|
13328
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
12744
13329
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
12745
13330
|
...props,
|
|
12746
13331
|
defaultClassName: 'react-aria-FieldError',
|
|
@@ -12750,6 +13335,7 @@ const $ee014567cb39d3f0$var$FieldErrorInner = /*#__PURE__*/ (forwardRef)((props,
|
|
|
12750
13335
|
if (renderProps.children == null) return null;
|
|
12751
13336
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($514c0188e459b4c0$export$5f1af8db9871e1d6), {
|
|
12752
13337
|
slot: "errorMessage",
|
|
13338
|
+
...domProps,
|
|
12753
13339
|
...renderProps,
|
|
12754
13340
|
ref: ref
|
|
12755
13341
|
});
|
|
@@ -12768,54 +13354,28 @@ const $ee014567cb39d3f0$var$FieldErrorInner = /*#__PURE__*/ (forwardRef)((props,
|
|
|
12768
13354
|
*/
|
|
12769
13355
|
|
|
12770
13356
|
|
|
12771
|
-
const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ (createContext)(null);
|
|
12772
|
-
function $d3e0e05bdfcf66bd$var$Form(props, ref) {
|
|
12773
|
-
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d3e0e05bdfcf66bd$export$c24727297075ec6a);
|
|
12774
|
-
let { validationErrors: validationErrors, validationBehavior: validationBehavior = 'native', children: children, className: className, ...domProps } = props;
|
|
12775
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement("form", {
|
|
12776
|
-
noValidate: validationBehavior !== 'native',
|
|
12777
|
-
...domProps,
|
|
12778
|
-
ref: ref,
|
|
12779
|
-
className: className || 'react-aria-Form'
|
|
12780
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement($d3e0e05bdfcf66bd$export$c24727297075ec6a.Provider, {
|
|
12781
|
-
value: {
|
|
12782
|
-
...props,
|
|
12783
|
-
validationBehavior: validationBehavior
|
|
12784
|
-
}
|
|
12785
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(($e5be200c675c3b3a$export$571b5131b7e65c11).Provider, {
|
|
12786
|
-
value: validationErrors !== null && validationErrors !== void 0 ? validationErrors : {}
|
|
12787
|
-
}, children)));
|
|
12788
|
-
}
|
|
12789
|
-
/**
|
|
12790
|
-
* A form is a group of inputs that allows users to submit data to a server,
|
|
12791
|
-
* with support for providing field validation errors.
|
|
12792
|
-
*/ const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ (forwardRef)($d3e0e05bdfcf66bd$var$Form);
|
|
12793
|
-
|
|
12794
|
-
/*
|
|
12795
|
-
* Copyright 2022 Adobe. All rights reserved.
|
|
12796
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12797
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12798
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12799
|
-
*
|
|
12800
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12801
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12802
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12803
|
-
* governing permissions and limitations under the License.
|
|
12804
|
-
*/
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /*#__PURE__*/ (createContext)({});
|
|
12808
|
-
function $01b77f81d0f07f68$var$Label(props, ref) {
|
|
12809
|
-
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
12810
|
-
let { elementType: ElementType = 'label', ...labelProps } = props;
|
|
12811
|
-
// @ts-ignore
|
|
12812
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
12813
|
-
className: "react-aria-Label",
|
|
12814
|
-
...labelProps,
|
|
12815
|
-
ref: ref
|
|
12816
|
-
});
|
|
13357
|
+
const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ (createContext)(null);
|
|
13358
|
+
function $d3e0e05bdfcf66bd$var$Form(props, ref) {
|
|
13359
|
+
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d3e0e05bdfcf66bd$export$c24727297075ec6a);
|
|
13360
|
+
let { validationErrors: validationErrors, validationBehavior: validationBehavior = 'native', children: children, className: className, ...domProps } = props;
|
|
13361
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement("form", {
|
|
13362
|
+
noValidate: validationBehavior !== 'native',
|
|
13363
|
+
...domProps,
|
|
13364
|
+
ref: ref,
|
|
13365
|
+
className: className || 'react-aria-Form'
|
|
13366
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement($d3e0e05bdfcf66bd$export$c24727297075ec6a.Provider, {
|
|
13367
|
+
value: {
|
|
13368
|
+
...props,
|
|
13369
|
+
validationBehavior: validationBehavior
|
|
13370
|
+
}
|
|
13371
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($e5be200c675c3b3a$export$571b5131b7e65c11).Provider, {
|
|
13372
|
+
value: validationErrors !== null && validationErrors !== void 0 ? validationErrors : {}
|
|
13373
|
+
}, children)));
|
|
12817
13374
|
}
|
|
12818
|
-
|
|
13375
|
+
/**
|
|
13376
|
+
* A form is a group of inputs that allows users to submit data to a server,
|
|
13377
|
+
* with support for providing field validation errors.
|
|
13378
|
+
*/ const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ (forwardRef)($d3e0e05bdfcf66bd$var$Form);
|
|
12819
13379
|
|
|
12820
13380
|
/*
|
|
12821
13381
|
* Copyright 2022 Adobe. All rights reserved.
|
|
@@ -12913,7 +13473,7 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
12913
13473
|
let groupState = (useContext)($bc237834342dbd75$export$139c5b8563afc1fc);
|
|
12914
13474
|
let inputRef = ($df56164dff5785e2$export$4338b53315abf666)(($5dc95899b306f630$export$c9058316764c140e)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));
|
|
12915
13475
|
let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isReadOnly: isReadOnly, isPressed: isPressed, isInvalid: isInvalid } = groupState ? ($fba3e38d5ca8983f$export$353b32fc6898d37d)({
|
|
12916
|
-
...props,
|
|
13476
|
+
...($64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
12917
13477
|
// Value is optional for standalone checkboxes, but required for CheckboxGroup items;
|
|
12918
13478
|
// it's passed explicitly here to avoid typescript error (requires ignore).
|
|
12919
13479
|
// @ts-ignore
|
|
@@ -12921,7 +13481,7 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
12921
13481
|
// ReactNode type doesn't allow function children.
|
|
12922
13482
|
children: typeof props.children === 'function' ? true : props.children
|
|
12923
13483
|
}, groupState, inputRef) : ($406796ff087fe49b$export$e375f10ce42261c5)({
|
|
12924
|
-
...props,
|
|
13484
|
+
...($64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
12925
13485
|
children: typeof props.children === 'function' ? true : props.children,
|
|
12926
13486
|
validationBehavior: validationBehavior
|
|
12927
13487
|
}, ($3017fa7ffdddec74$export$8042c6c013fd5226)(props), inputRef);
|
|
@@ -12932,7 +13492,6 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
12932
13492
|
isDisabled: isInteractionDisabled
|
|
12933
13493
|
});
|
|
12934
13494
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
12935
|
-
// TODO: should data attrs go on the label or on the <input>? useCheckbox passes them to the input...
|
|
12936
13495
|
...props,
|
|
12937
13496
|
defaultClassName: 'react-aria-Checkbox',
|
|
12938
13497
|
values: {
|
|
@@ -13430,7 +13989,7 @@ function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropH
|
|
|
13430
13989
|
return new Set([
|
|
13431
13990
|
focusedKey,
|
|
13432
13991
|
dropTargetKey
|
|
13433
|
-
].filter((k)=>k
|
|
13992
|
+
].filter((k)=>k != null));
|
|
13434
13993
|
}, [
|
|
13435
13994
|
focusedKey,
|
|
13436
13995
|
dropTargetKey
|
|
@@ -13528,7 +14087,11 @@ function $eed445e0843c11d0$var$StandaloneListBox({ props: props, listBoxRef: lis
|
|
|
13528
14087
|
children: null,
|
|
13529
14088
|
items: null
|
|
13530
14089
|
};
|
|
13531
|
-
let
|
|
14090
|
+
let { layoutDelegate: layoutDelegate } = (useContext)(($7135fc7d473fd974$export$4feb769f8ddf26c5));
|
|
14091
|
+
let state = ($e72dd72e1c76a225$export$2f645645f7bca764)({
|
|
14092
|
+
...props,
|
|
14093
|
+
layoutDelegate: layoutDelegate
|
|
14094
|
+
});
|
|
13532
14095
|
return /*#__PURE__*/ ($dbSRa$react).createElement($eed445e0843c11d0$var$ListBoxInner, {
|
|
13533
14096
|
state: state,
|
|
13534
14097
|
props: props,
|
|
@@ -13692,6 +14255,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state, props: props, listBo
|
|
|
13692
14255
|
[
|
|
13693
14256
|
($7135fc7d473fd974$export$d40e14dec8b060a8),
|
|
13694
14257
|
{
|
|
14258
|
+
name: 'ListBoxSection',
|
|
13695
14259
|
render: $eed445e0843c11d0$var$ListBoxSection
|
|
13696
14260
|
}
|
|
13697
14261
|
]
|
|
@@ -13703,7 +14267,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state, props: props, listBo
|
|
|
13703
14267
|
renderDropIndicator: ($612b8eb6cb90e02d$export$971707d8a129a1f7)(dragAndDropHooks, dropState)
|
|
13704
14268
|
})), emptyState, dragPreview));
|
|
13705
14269
|
}
|
|
13706
|
-
function $eed445e0843c11d0$var$ListBoxSection(props, ref, section) {
|
|
14270
|
+
function $eed445e0843c11d0$var$ListBoxSection(props, ref, section, className = 'react-aria-ListBoxSection') {
|
|
13707
14271
|
let state = (useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
13708
14272
|
let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (useContext)(($612b8eb6cb90e02d$export$d188a835a7bc5783));
|
|
13709
14273
|
let { CollectionBranch: CollectionBranch } = (useContext)(($7135fc7d473fd974$export$4feb769f8ddf26c5));
|
|
@@ -13714,7 +14278,7 @@ function $eed445e0843c11d0$var$ListBoxSection(props, ref, section) {
|
|
|
13714
14278
|
'aria-label': (_props_arialabel = props['aria-label']) !== null && _props_arialabel !== void 0 ? _props_arialabel : undefined
|
|
13715
14279
|
});
|
|
13716
14280
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
13717
|
-
defaultClassName:
|
|
14281
|
+
defaultClassName: className,
|
|
13718
14282
|
className: props.className,
|
|
13719
14283
|
style: props.style,
|
|
13720
14284
|
values: {}
|
|
@@ -13735,6 +14299,9 @@ function $eed445e0843c11d0$var$ListBoxSection(props, ref, section) {
|
|
|
13735
14299
|
renderDropIndicator: ($612b8eb6cb90e02d$export$971707d8a129a1f7)(dragAndDropHooks, dropState)
|
|
13736
14300
|
})));
|
|
13737
14301
|
}
|
|
14302
|
+
/**
|
|
14303
|
+
* A ListBoxSection represents a section within a ListBox.
|
|
14304
|
+
*/ const $eed445e0843c11d0$export$dca12b0bb56e4fc = /*#__PURE__*/ ($e1995378a142960e$export$e953bb1cd0f19726)('section', $eed445e0843c11d0$var$ListBoxSection);
|
|
13738
14305
|
const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960e$export$18af5c7a9e9b3664)('item', function ListBoxItem(props, forwardedRef, item) {
|
|
13739
14306
|
let ref = ($df56164dff5785e2$export$4338b53315abf666)(forwardedRef);
|
|
13740
14307
|
let state = (useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
@@ -13863,9 +14430,9 @@ function $44f671af83e7d9e0$var$OverlayArrow(props, ref) {
|
|
|
13863
14430
|
let placement = props.placement;
|
|
13864
14431
|
let style = {
|
|
13865
14432
|
position: 'absolute',
|
|
13866
|
-
[placement]: '100%',
|
|
13867
14433
|
transform: placement === 'top' || placement === 'bottom' ? 'translateX(-50%)' : 'translateY(-50%)'
|
|
13868
14434
|
};
|
|
14435
|
+
if (placement != null) style[placement] = '100%';
|
|
13869
14436
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
13870
14437
|
...props,
|
|
13871
14438
|
defaultClassName: 'react-aria-OverlayArrow',
|
|
@@ -13976,6 +14543,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
13976
14543
|
...renderProps.style
|
|
13977
14544
|
};
|
|
13978
14545
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($337b884510726a0d$export$c6fdb837b070b4ff), {
|
|
14546
|
+
...props,
|
|
13979
14547
|
isExiting: isExiting,
|
|
13980
14548
|
portalContainer: UNSTABLE_portalContainer
|
|
13981
14549
|
}, !props.isNonModal && state.isOpen && /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
@@ -14008,6 +14576,8 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
14008
14576
|
})));
|
|
14009
14577
|
}
|
|
14010
14578
|
|
|
14579
|
+
const $3674c52c6b3c5bce$export$795aec4671cbae19 = /*#__PURE__*/ (createContext)(null);
|
|
14580
|
+
|
|
14011
14581
|
/*
|
|
14012
14582
|
* Copyright 2022 Adobe. All rights reserved.
|
|
14013
14583
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -14026,10 +14596,14 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
14026
14596
|
|
|
14027
14597
|
|
|
14028
14598
|
|
|
14599
|
+
|
|
14600
|
+
|
|
14029
14601
|
const $de32f1b87079253c$export$8b93a07348a7730c = /*#__PURE__*/ (createContext)(null);
|
|
14030
14602
|
const $de32f1b87079253c$export$d2f961adcb0afbe = /*#__PURE__*/ (createContext)(null);
|
|
14031
14603
|
function $de32f1b87079253c$export$2e1e1122cf0cba88(props) {
|
|
14032
|
-
|
|
14604
|
+
// Use useMenuTriggerState instead of useOverlayTriggerState in case a menu is embedded in the dialog.
|
|
14605
|
+
// This is needed to handle submenus.
|
|
14606
|
+
let state = ($a28c903ee9ad8dc5$export$79fefeb1c2091ac3)(props);
|
|
14033
14607
|
let buttonRef = (useRef)(null);
|
|
14034
14608
|
let { triggerProps: triggerProps, overlayProps: overlayProps } = ($628037886ba31236$export$f9d5c8beee7d008d)({
|
|
14035
14609
|
type: 'dialog'
|
|
@@ -14046,6 +14620,10 @@ function $de32f1b87079253c$export$2e1e1122cf0cba88(props) {
|
|
|
14046
14620
|
$de32f1b87079253c$export$d2f961adcb0afbe,
|
|
14047
14621
|
state
|
|
14048
14622
|
],
|
|
14623
|
+
[
|
|
14624
|
+
($3674c52c6b3c5bce$export$795aec4671cbae19),
|
|
14625
|
+
state
|
|
14626
|
+
],
|
|
14049
14627
|
[
|
|
14050
14628
|
$de32f1b87079253c$export$8b93a07348a7730c,
|
|
14051
14629
|
overlayProps
|
|
@@ -14074,24 +14652,27 @@ function $de32f1b87079253c$var$Dialog(props, ref) {
|
|
|
14074
14652
|
'aria-labelledby': originalAriaLabelledby
|
|
14075
14653
|
}, ref);
|
|
14076
14654
|
let state = (useContext)($de32f1b87079253c$export$d2f961adcb0afbe);
|
|
14077
|
-
let children = props.children;
|
|
14078
|
-
if (typeof children === 'function') children = children({
|
|
14079
|
-
close: (state === null || state === void 0 ? void 0 : state.close) || (()=>{})
|
|
14080
|
-
});
|
|
14081
14655
|
if (!dialogProps['aria-label'] && !dialogProps['aria-labelledby']) {
|
|
14082
14656
|
// If aria-labelledby exists on props, we know it came from context.
|
|
14083
14657
|
// Use that as a fallback in case there is no title slot.
|
|
14084
14658
|
if (props['aria-labelledby']) dialogProps['aria-labelledby'] = props['aria-labelledby'];
|
|
14085
14659
|
else console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');
|
|
14086
14660
|
}
|
|
14087
|
-
|
|
14661
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14662
|
+
defaultClassName: 'react-aria-Dialog',
|
|
14663
|
+
className: props.className,
|
|
14664
|
+
style: props.style,
|
|
14665
|
+
children: props.children,
|
|
14666
|
+
values: {
|
|
14667
|
+
close: (state === null || state === void 0 ? void 0 : state.close) || (()=>{})
|
|
14668
|
+
}
|
|
14669
|
+
});
|
|
14088
14670
|
return /*#__PURE__*/ ($dbSRa$react).createElement("section", {
|
|
14089
14671
|
...($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props),
|
|
14090
14672
|
...dialogProps,
|
|
14673
|
+
...renderProps,
|
|
14091
14674
|
ref: ref,
|
|
14092
|
-
slot: props.slot || undefined
|
|
14093
|
-
style: props.style,
|
|
14094
|
-
className: (_props_className = props.className) !== null && _props_className !== void 0 ? _props_className : 'react-aria-Dialog'
|
|
14675
|
+
slot: props.slot || undefined
|
|
14095
14676
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
14096
14677
|
values: [
|
|
14097
14678
|
[
|
|
@@ -14105,14 +14686,205 @@ function $de32f1b87079253c$var$Dialog(props, ref) {
|
|
|
14105
14686
|
}
|
|
14106
14687
|
}
|
|
14107
14688
|
}
|
|
14689
|
+
],
|
|
14690
|
+
[
|
|
14691
|
+
($d2b4bc8c273e7be6$export$24d547caef80ccd1),
|
|
14692
|
+
{
|
|
14693
|
+
slots: {
|
|
14694
|
+
[($64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},
|
|
14695
|
+
close: {
|
|
14696
|
+
onPress: ()=>state === null || state === void 0 ? void 0 : state.close()
|
|
14697
|
+
}
|
|
14698
|
+
}
|
|
14699
|
+
}
|
|
14108
14700
|
]
|
|
14109
14701
|
]
|
|
14110
|
-
}, children));
|
|
14702
|
+
}, renderProps.children));
|
|
14111
14703
|
}
|
|
14112
14704
|
/**
|
|
14113
14705
|
* A dialog is an overlay shown above other content in an application.
|
|
14114
14706
|
*/ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ (forwardRef)($de32f1b87079253c$var$Dialog);
|
|
14115
14707
|
|
|
14708
|
+
/*
|
|
14709
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
14710
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14711
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14712
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14713
|
+
*
|
|
14714
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14715
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14716
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14717
|
+
* governing permissions and limitations under the License.
|
|
14718
|
+
*/
|
|
14719
|
+
|
|
14720
|
+
|
|
14721
|
+
|
|
14722
|
+
|
|
14723
|
+
|
|
14724
|
+
|
|
14725
|
+
const $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (createContext)(null);
|
|
14726
|
+
function $28f4fd908f0de97f$var$DisclosureGroup(props, ref) {
|
|
14727
|
+
let state = ($9385b3affbdec831$export$f36461af0ef4707d)(props);
|
|
14728
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14729
|
+
...props,
|
|
14730
|
+
defaultClassName: 'react-aria-DisclosureGroup',
|
|
14731
|
+
values: {
|
|
14732
|
+
isDisabled: state.isDisabled,
|
|
14733
|
+
state: state
|
|
14734
|
+
}
|
|
14735
|
+
});
|
|
14736
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
14737
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
14738
|
+
...domProps,
|
|
14739
|
+
...renderProps,
|
|
14740
|
+
ref: ref,
|
|
14741
|
+
"data-disabled": props.isDisabled || undefined
|
|
14742
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {
|
|
14743
|
+
value: state
|
|
14744
|
+
}, renderProps.children));
|
|
14745
|
+
}
|
|
14746
|
+
/**
|
|
14747
|
+
* A DisclosureGroup is a grouping of related disclosures, sometimes called an accordion.
|
|
14748
|
+
* It supports both single and multiple expanded items.
|
|
14749
|
+
*/ const $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (forwardRef)($28f4fd908f0de97f$var$DisclosureGroup);
|
|
14750
|
+
const $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (createContext)(null);
|
|
14751
|
+
const $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (createContext)(null);
|
|
14752
|
+
const $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (createContext)(null);
|
|
14753
|
+
function $28f4fd908f0de97f$var$Disclosure(props, ref) {
|
|
14754
|
+
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);
|
|
14755
|
+
let groupState = (useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);
|
|
14756
|
+
let { id: id, ...otherProps } = props;
|
|
14757
|
+
// Generate an id if one wasn't provided.
|
|
14758
|
+
// (can't pass id into useId since it can also be a number)
|
|
14759
|
+
let defaultId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
14760
|
+
id || (id = defaultId);
|
|
14761
|
+
let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;
|
|
14762
|
+
let state = ($bf996d45f4a36925$export$3fcbf6e4407997e0)({
|
|
14763
|
+
...props,
|
|
14764
|
+
isExpanded: isExpanded,
|
|
14765
|
+
onExpandedChange (isExpanded) {
|
|
14766
|
+
var _props_onExpandedChange;
|
|
14767
|
+
if (groupState) groupState.toggleKey(id);
|
|
14768
|
+
(_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);
|
|
14769
|
+
}
|
|
14770
|
+
});
|
|
14771
|
+
let panelRef = ($dbSRa$react).useRef(null);
|
|
14772
|
+
let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;
|
|
14773
|
+
let { buttonProps: buttonProps, panelProps: panelProps } = ($5e910fae8e128ead$export$6e3e27031a30522f)({
|
|
14774
|
+
...props,
|
|
14775
|
+
isExpanded: isExpanded,
|
|
14776
|
+
isDisabled: isDisabled
|
|
14777
|
+
}, state, panelRef);
|
|
14778
|
+
let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = ($f7dceffc5ad7768b$export$4e328f61c538687f)({
|
|
14779
|
+
within: true
|
|
14780
|
+
});
|
|
14781
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14782
|
+
...props,
|
|
14783
|
+
id: undefined,
|
|
14784
|
+
defaultClassName: 'react-aria-Disclosure',
|
|
14785
|
+
values: {
|
|
14786
|
+
isExpanded: state.isExpanded,
|
|
14787
|
+
isDisabled: isDisabled,
|
|
14788
|
+
isFocusVisibleWithin: isFocusVisibleWithin,
|
|
14789
|
+
state: state
|
|
14790
|
+
}
|
|
14791
|
+
});
|
|
14792
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(otherProps);
|
|
14793
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
14794
|
+
values: [
|
|
14795
|
+
[
|
|
14796
|
+
($d2b4bc8c273e7be6$export$24d547caef80ccd1),
|
|
14797
|
+
{
|
|
14798
|
+
slots: {
|
|
14799
|
+
[($64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},
|
|
14800
|
+
trigger: buttonProps
|
|
14801
|
+
}
|
|
14802
|
+
}
|
|
14803
|
+
],
|
|
14804
|
+
[
|
|
14805
|
+
$28f4fd908f0de97f$var$InternalDisclosureContext,
|
|
14806
|
+
{
|
|
14807
|
+
panelProps: panelProps,
|
|
14808
|
+
panelRef: panelRef
|
|
14809
|
+
}
|
|
14810
|
+
],
|
|
14811
|
+
[
|
|
14812
|
+
$28f4fd908f0de97f$export$dab3ea4a6ef094da,
|
|
14813
|
+
state
|
|
14814
|
+
]
|
|
14815
|
+
]
|
|
14816
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
14817
|
+
ref: ref,
|
|
14818
|
+
"data-expanded": state.isExpanded || undefined,
|
|
14819
|
+
"data-disabled": isDisabled || undefined,
|
|
14820
|
+
"data-focus-visible-within": isFocusVisibleWithin || undefined,
|
|
14821
|
+
...domProps,
|
|
14822
|
+
...focusWithinProps,
|
|
14823
|
+
...renderProps
|
|
14824
|
+
}, renderProps.children));
|
|
14825
|
+
}
|
|
14826
|
+
function $28f4fd908f0de97f$var$DisclosurePanel(props, ref) {
|
|
14827
|
+
let { role: role = 'group' } = props;
|
|
14828
|
+
let { panelProps: panelProps, panelRef: panelRef } = (useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);
|
|
14829
|
+
let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = ($f7dceffc5ad7768b$export$4e328f61c538687f)({
|
|
14830
|
+
within: true
|
|
14831
|
+
});
|
|
14832
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14833
|
+
...props,
|
|
14834
|
+
defaultClassName: 'react-aria-DisclosurePanel',
|
|
14835
|
+
values: {
|
|
14836
|
+
isFocusVisibleWithin: isFocusVisibleWithin
|
|
14837
|
+
}
|
|
14838
|
+
});
|
|
14839
|
+
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
14840
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
14841
|
+
...DOMProps,
|
|
14842
|
+
ref: ($5dc95899b306f630$export$c9058316764c140e)(ref, panelRef),
|
|
14843
|
+
...($3ef42575df84b30b$export$9d1611c77c2fe928)(panelProps, focusWithinProps),
|
|
14844
|
+
...renderProps,
|
|
14845
|
+
role: role,
|
|
14846
|
+
"data-focus-visible-within": isFocusVisibleWithin || undefined
|
|
14847
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
14848
|
+
values: [
|
|
14849
|
+
[
|
|
14850
|
+
($d2b4bc8c273e7be6$export$24d547caef80ccd1),
|
|
14851
|
+
null
|
|
14852
|
+
]
|
|
14853
|
+
]
|
|
14854
|
+
}, props.children));
|
|
14855
|
+
}
|
|
14856
|
+
/**
|
|
14857
|
+
* A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.
|
|
14858
|
+
*/ const $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (forwardRef)($28f4fd908f0de97f$var$Disclosure);
|
|
14859
|
+
/**
|
|
14860
|
+
* A DisclosurePanel provides the content for a disclosure.
|
|
14861
|
+
*/ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (forwardRef)($28f4fd908f0de97f$var$DisclosurePanel);
|
|
14862
|
+
|
|
14863
|
+
/*
|
|
14864
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
14865
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14866
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14867
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14868
|
+
*
|
|
14869
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14870
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14871
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14872
|
+
* governing permissions and limitations under the License.
|
|
14873
|
+
*/
|
|
14874
|
+
|
|
14875
|
+
|
|
14876
|
+
function $5cb03073d3f54797$var$Heading(props, ref) {
|
|
14877
|
+
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, ($4e85f108e88277b8$export$d688439359537581));
|
|
14878
|
+
let { children: children, level: level = 3, className: className, ...domProps } = props;
|
|
14879
|
+
let Element = `h${level}`;
|
|
14880
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(Element, {
|
|
14881
|
+
...domProps,
|
|
14882
|
+
ref: ref,
|
|
14883
|
+
className: className !== null && className !== void 0 ? className : 'react-aria-Heading'
|
|
14884
|
+
}, children);
|
|
14885
|
+
}
|
|
14886
|
+
const $5cb03073d3f54797$export$a8a3e93435678ff9 = /*#__PURE__*/ (forwardRef)($5cb03073d3f54797$var$Heading);
|
|
14887
|
+
|
|
14116
14888
|
/*
|
|
14117
14889
|
* Copyright 2022 Adobe. All rights reserved.
|
|
14118
14890
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -14629,10 +15401,10 @@ function $82d7e5349645de74$var$SelectValue(props, ref) {
|
|
|
14629
15401
|
});
|
|
14630
15402
|
}
|
|
14631
15403
|
let stringFormatter = ($fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault($df39c1238ae2b5f3$exports))), 'react-aria-components');
|
|
14632
|
-
var _state_selectedItem_value, _state_selectedItem_textValue;
|
|
15404
|
+
var _ref, _state_selectedItem_value, _state_selectedItem_textValue;
|
|
14633
15405
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14634
15406
|
...props,
|
|
14635
|
-
defaultChildren: rendered
|
|
15407
|
+
defaultChildren: (_ref = rendered !== null && rendered !== void 0 ? rendered : placeholder) !== null && _ref !== void 0 ? _ref : stringFormatter.format('selectPlaceholder'),
|
|
14636
15408
|
defaultClassName: 'react-aria-SelectValue',
|
|
14637
15409
|
values: {
|
|
14638
15410
|
selectedItem: (_state_selectedItem_value = (_state_selectedItem = state.selectedItem) === null || _state_selectedItem === void 0 ? void 0 : _state_selectedItem.value) !== null && _state_selectedItem_value !== void 0 ? _state_selectedItem_value : null,
|
|
@@ -15156,7 +15928,8 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
15156
15928
|
isOpen: state.isOpen,
|
|
15157
15929
|
arrowSize: arrowWidth,
|
|
15158
15930
|
arrowBoundaryOffset: props.arrowBoundaryOffset,
|
|
15159
|
-
shouldFlip: props.shouldFlip
|
|
15931
|
+
shouldFlip: props.shouldFlip,
|
|
15932
|
+
onClose: ()=>state.close(true)
|
|
15160
15933
|
});
|
|
15161
15934
|
let isEntering = ($64fa3d84918910a7$export$6d3443f2c48bfc20)(props.tooltipRef, !!placement) || props.isEntering || false;
|
|
15162
15935
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
@@ -15179,7 +15952,7 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
15179
15952
|
...overlayProps.style,
|
|
15180
15953
|
...renderProps.style
|
|
15181
15954
|
},
|
|
15182
|
-
"data-placement": placement,
|
|
15955
|
+
"data-placement": placement !== null && placement !== void 0 ? placement : undefined,
|
|
15183
15956
|
"data-entering": isEntering || undefined,
|
|
15184
15957
|
"data-exiting": props.isExiting || undefined
|
|
15185
15958
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($44f671af83e7d9e0$export$2de4954e8ae13b9f).Provider, {
|
|
@@ -15191,13 +15964,58 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
15191
15964
|
}, renderProps.children));
|
|
15192
15965
|
}
|
|
15193
15966
|
|
|
15194
|
-
var css_248z$
|
|
15195
|
-
styleInject(css_248z$
|
|
15967
|
+
var css_248z$q = ".bcds-react-aria-Disclosure {\n display: flex;\n flex-direction: column;\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-default);\n border-radius: var(--layout-border-radius-medium);\n overflow: hidden;\n}\n\n.bcds-react-aria-Disclosure--Button {\n display: inline-flex;\n flex-direction: row;\n padding: var(--layout-padding-small) var(--layout-padding-medium);\n gap: var(--layout-margin-small);\n justify-content: space-between;\n align-items: center;\n background-color: var(--surface-color-background-light-gray);\n border: none;\n cursor: pointer;\n font: var(--typography-bold-body);\n color: var(--typography-color-primary);\n}\n\n/* Hover */\n.bcds-react-aria-Disclosure--Button[data-hovered] {\n background-color: var(--surface-color-menus-hover);\n}\n\n/* Accordion content */\n.bcds-react-aria-Disclosure[data-expanded]\n > .bcds-react-aria-Disclosure--Panel {\n display: flex;\n align-items: flex-start;\n padding: var(--layout-padding-medium);\n gap: var(--layout-margin-small);\n background-color: var(--surface-color-forms-default);\n font: var(--typography-regular-body);\n}\n\n/* Focus state */\n.bcds-react-aria-Disclosure[data-focus-visible-within] {\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n\n/* Override default focus behaviour for button */\n.bcds-react-aria-Disclosure[data-focus-visible-within]\n > .bcds-react-aria-Disclosure--Button {\n outline: none;\n}\n\n.bcds-react-aria-Disclosure--Button[data-focused] {\n outline: none;\n}\n\n/* Disabled state */\n.bcds-react-aria-Disclosure[data-disabled]\n > .bcds-react-aria-Disclosure--Button {\n background-color: var(--surface-color-forms-disabled);\n color: var(--typography-color-disabled);\n cursor: not-allowed;\n}\n";
|
|
15968
|
+
styleInject(css_248z$q);
|
|
15969
|
+
|
|
15970
|
+
var css_248z$p = ".bcds-react-aria-Button {\n border: none;\n border-radius: var(--layout-border-radius-medium);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: var(--layout-padding-small);\n font: var(--typography-regular-body);\n padding-left: 16px;\n padding-right: 16px;\n}\n.bcds-react-aria-Button[data-disabled] {\n cursor: not-allowed;\n}\n.bcds-react-aria-Button[data-focused] {\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n\n/* Icon button */\n.bcds-react-aria-Button.icon {\n align-items: center;\n justify-content: space-around;\n}\n\n/* Sizes */\n.bcds-react-aria-Button.small {\n min-height: 32px;\n}\n.bcds-react-aria-Button.small.icon {\n padding: unset;\n height: 32px;\n width: 32px;\n min-width: 32px;\n}\n.bcds-react-aria-Button.medium {\n min-height: 40px;\n}\n.bcds-react-aria-Button.medium.icon {\n padding: unset;\n height: 40px;\n width: 40px;\n min-width: 40px;\n}\n\n/* Variant - Primary */\n.bcds-react-aria-Button.primary {\n background: var(--surface-color-primary-button-default);\n color: var(--icons-color-primary-invert);\n}\n.bcds-react-aria-Button.primary.danger {\n background-color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Button.primary[data-disabled] {\n background-color: var(--surface-color-primary-danger-button-disabled);\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Button.primary[data-hovered] {\n background-color: var(--surface-color-primary-button-hover);\n}\n.bcds-react-aria-Button.primary.danger[data-hovered] {\n background-color: var(--surface-color-primary-danger-button-hover);\n}\n\n/* Variant - Secondary */\n.bcds-react-aria-Button.secondary {\n background-color: var(--surface-color-secondary-button-default);\n border: 1px solid var(--surface-color-border-dark);\n color: var(--typography-color-primary);\n}\n.bcds-react-aria-Button.secondary.danger {\n border-color: var(--support-border-color-danger);\n color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Button.secondary[data-disabled] {\n background-color: var(--surface-color-secondary-button-disabled);\n border-color: var(--surface-color-border-default);\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Button.secondary[data-hovered] {\n background-color: var(--surface-color-secondary-button-hover);\n}\n.bcds-react-aria-Button.secondary.danger[data-hovered] {\n background-color: var(--support-surface-color-danger);\n}\n\n/* Variant - Tertiary */\n.bcds-react-aria-Button.tertiary {\n background-color: var(--surface-color-tertiary-button-default);\n color: var(--typography-color-primary);\n}\n.bcds-react-aria-Button.tertiary.danger {\n color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Button.tertiary[data-disabled] {\n background-color: var(--surface-color-tertiary-button-default);\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Button.tertiary[data-hovered] {\n background-color: var(--surface-color-tertiary-button-hover);\n}\n.bcds-react-aria-Button.tertiary.danger[data-hovered] {\n background-color: var(--support-surface-color-danger);\n}\n\n/* Variant - Link */\n.bcds-react-aria-Button.link {\n background-color: var(--surface-color-tertiary-button-default);\n color: var(--typography-color-link);\n text-decoration: underline;\n text-underline-offset: 0.3em;\n}\n.bcds-react-aria-Button.link.danger {\n color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Button.link[data-disabled] {\n color: var(--typography-color-disabled);\n}\n";
|
|
15971
|
+
styleInject(css_248z$p);
|
|
15196
15972
|
|
|
15197
15973
|
function Button({ size = "medium", variant = "primary", danger = false, isIconButton = false, ...props }) {
|
|
15198
15974
|
return (jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: `bcds-react-aria-Button ${size} ${variant} ${danger ? "danger" : ""} ${isIconButton ? "icon" : ""}`, ...props }));
|
|
15199
15975
|
}
|
|
15200
15976
|
|
|
15977
|
+
/* The component implements the Chevron Up icon from Font Awesome: https://fontawesome.com/icons/chevron-up */
|
|
15978
|
+
function SvgChevronUpIcon({ id = "chevron-up-icon" }) {
|
|
15979
|
+
return (jsx("svg", { id: id, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M4.21231 13.3146L9.52695 8.2226C9.6939 8.08348 9.86086 8 10.0278 8C10.1948 8 10.3339 8.05565 10.473 8.16695L15.7876 13.259C16.066 13.5372 16.066 13.9546 15.8155 14.2051C15.5651 14.4833 15.1477 14.4833 14.8694 14.2329L10.0278 9.61387L5.13054 14.2885C4.88011 14.539 4.43491 14.539 4.18448 14.2607C3.93405 13.9825 3.93405 13.5651 4.21231 13.3146Z", fill: "currentColor" }) }));
|
|
15980
|
+
}
|
|
15981
|
+
|
|
15982
|
+
/* The component implements the Chevron Down icon from Font Awesome: https://fontawesome.com/icons/chevron-down */
|
|
15983
|
+
function SvgChevronDownIcon({ id = "chevron-down-icon" }) {
|
|
15984
|
+
return (jsx("svg", { id: id, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M15.7882 9.15569L10.4858 14.236C10.3192 14.3748 10.1527 14.4303 10.0139 14.4303C9.84731 14.4303 9.68074 14.3748 9.54194 14.2637L4.21182 9.15569C3.9342 8.90584 3.9342 8.46167 4.18405 8.21182C4.4339 7.9342 4.87808 7.9342 5.12793 8.18405L10.0139 12.8479L14.872 8.18405C15.1219 7.9342 15.5661 7.9342 15.8159 8.21182C16.0658 8.46167 16.0658 8.90584 15.7882 9.15569Z", fill: "currentColor" }) }));
|
|
15985
|
+
}
|
|
15986
|
+
|
|
15987
|
+
function Accordion({ label, children, ...props }) {
|
|
15988
|
+
return (jsx($28f4fd908f0de97f$export$74a362b31437ec83, { className: `bcds-react-aria-Disclosure`, ...props, children: ({ isExpanded }) => (jsxs(Fragment, { children: [jsxs(Button, { className: "bcds-react-aria-Disclosure--Button", size: "small", variant: "link", slot: "trigger", children: [label, isExpanded ? jsx(SvgChevronUpIcon, {}) : jsx(SvgChevronDownIcon, {})] }), jsx($28f4fd908f0de97f$export$feabaa331e1d464c, { className: "bcds-react-aria-Disclosure--Panel", children: jsx(Fragment, { children: children }) })] })) }));
|
|
15989
|
+
}
|
|
15990
|
+
|
|
15991
|
+
var css_248z$o = ".bcds-react-aria-DisclosureGroup {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: var(--layout-border-width-small);\n background-color: var(--surface-color-border-default);\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-default);\n border-radius: var(--layout-border-radius-medium);\n overflow: hidden;\n}\n\n/* Override individual accordion item borders */\n.bcds-react-aria-DisclosureGroup > .bcds-react-aria-Disclosure {\n border: none;\n border-radius: var(--layout-border-radius-none);\n}\n\n/* Focus state */\n.bcds-react-aria-DisclosureGroup\n > .bcds-react-aria-Disclosure[data-focus-visible-within] {\n border-radius: var(--layout-border-radius-hair);\n outline-offset: calc(var(--layout-margin-hair) * -1);\n}\n\n/* Title styles */\n.bcds-react-aria-DisclosureGroup--Title {\n color: var(--typography-color-primary);\n margin: var(--layout-margin-medium) var(--layout-margin-none);\n}\n\n.bcds-react-aria-DisclosureGroup--Title > h1 {\n font: var(--typography-bold-h1);\n margin-block-start: 0;\n margin-block-end: 0;\n}\n\n.bcds-react-aria-DisclosureGroup--Title > h2 {\n font: var(--typography-bold-h2);\n margin-block-start: 0;\n margin-block-end: 0;\n}\n\n.bcds-react-aria-DisclosureGroup--Title > h3 {\n font: var(--typography-bold-h3);\n margin-block-start: 0;\n margin-block-end: 0;\n}\n\n.bcds-react-aria-DisclosureGroup--Title > h4 {\n font: var(--typography-bold-h4);\n margin-block-start: 0;\n margin-block-end: 0;\n}\n\n.bcds-react-aria-DisclosureGroup--Title > h5 {\n font: var(--typography-bold-h5);\n margin-block-start: 0;\n margin-block-end: 0;\n}\n\n.bcds-react-aria-DisclosureGroup--Title > h6 {\n font: var(--typography-bold-h6);\n margin-block-start: 0;\n margin-block-end: 0;\n}\n\n.bcds-react-aria-DisclosureGroup--Title > span {\n font: var(--typography-bold-large-body);\n}\n";
|
|
15992
|
+
styleInject(css_248z$o);
|
|
15993
|
+
|
|
15994
|
+
function AccordionGroup({ title, titleElement, children, ...props }) {
|
|
15995
|
+
function getTitle() {
|
|
15996
|
+
switch (titleElement) {
|
|
15997
|
+
case "h1":
|
|
15998
|
+
return jsx("h1", { children: title });
|
|
15999
|
+
case "h2":
|
|
16000
|
+
return jsx("h2", { children: title });
|
|
16001
|
+
case "h3":
|
|
16002
|
+
return jsx("h3", { children: title });
|
|
16003
|
+
case "h4":
|
|
16004
|
+
return jsx("h4", { children: title });
|
|
16005
|
+
case "h5":
|
|
16006
|
+
return jsx("h5", { children: title });
|
|
16007
|
+
case "h6":
|
|
16008
|
+
return jsx("h6", { children: title });
|
|
16009
|
+
default:
|
|
16010
|
+
return jsx("span", { children: title });
|
|
16011
|
+
}
|
|
16012
|
+
}
|
|
16013
|
+
return (jsxs(Fragment, { children: [title && (jsx("div", { className: "bcds-react-aria-DisclosureGroup--Title", children: getTitle() })), jsx($28f4fd908f0de97f$export$944aceb4f8c89f10, { className: "bcds-react-aria-DisclosureGroup", ...props, children: children })] }));
|
|
16014
|
+
}
|
|
16015
|
+
|
|
16016
|
+
var css_248z$n = ".bcds-Alert-Banner {\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-around;\n width: 100%;\n padding: var(--layout-padding-none) var(--layout-padding-medium);\n}\n\n.bcds-Alert-Banner--Container {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-padding-medium);\n max-width: 1100px;\n padding: var(--layout-padding-small) var(--layout-padding-none);\n}\n\n.bcds-Alert-Banner--Icon {\n align-self: first baseline;\n justify-self: flex-start;\n padding-top: var(--layout-padding-xsmall);\n color: var(--icons-color-primary-invert);\n}\n\n.bcds-Alert-Banner--Content {\n display: inline-flex;\n gap: var(--layout-margin-medium);\n align-items: first baseline;\n flex-grow: 1;\n flex-wrap: wrap;\n font: var(--typography-regular-body);\n color: var(--typography-color-primary-invert);\n}\n\n.bcds-Alert-Banner--closeIcon {\n align-self: first baseline;\n}\n\n.bcds-Alert-Banner--closeIcon > .bcds-react-aria-Button[data-hovered] svg {\n color: var(--icons-color-primary);\n}\n\n.bcds-Alert-Banner--closeIcon svg {\n color: var(--icons-color-primary-invert);\n}\n\n/* Variants */\n\n/* Info theme */\n.bcds-Alert-Banner.info {\n background-color: var(--surface-color-background-dark-blue);\n}\n\n/* Success theme */\n.bcds-Alert-Banner.success {\n background-color: var(--support-border-color-success);\n}\n\n/* Warning theme */\n.bcds-Alert-Banner.warning {\n background-color: var(--support-border-color-warning);\n}\n\n.bcds-Alert-Banner.warning .bcds-Alert-Banner--Icon {\n color: var(--icons-color-primary);\n}\n\n.bcds-Alert-Banner.warning .bcds-Alert-Banner--Content {\n color: var(--typography-color-primary);\n}\n\n.bcds-Alert-Banner.warning .bcds-Alert-Banner--closeIcon svg {\n color: var(--icons-color-primary);\n}\n\n/* Danger theme */\n.bcds-Alert-Banner.danger {\n background-color: var(--support-border-color-danger);\n}\n\n/* Black theme */\n\n.bcds-Alert-Banner.black {\n background-color: var(--theme-gray-110);\n}\n";
|
|
16017
|
+
styleInject(css_248z$n);
|
|
16018
|
+
|
|
15201
16019
|
/* The component implements the Circle Check icon from Font Awesome: https://fontawesome.com/icons/circle-check */
|
|
15202
16020
|
function SvgCheckCircleIcon({ id = "check-icon" }) {
|
|
15203
16021
|
return (jsx("svg", { id: id, width: "20", height: "20", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: jsx("g", { children: jsx("path", { d: "M12.4688 7.46875C12.75 7.1875 13.2188 7.1875 13.5 7.5C13.8125 7.78125 13.8125 8.25 13.5 8.53125L9.5 12.5312C9.375 12.6875 9.1875 12.75 9 12.75C8.78125 12.75 8.59375 12.6875 8.4375 12.5312L6.4375 10.5312C6.125 10.25 6.125 9.78125 6.4375 9.46875C6.71875 9.1875 7.1875 9.1875 7.5 9.46875L9 10.9688L12.4688 7.46875ZM10 2C14.4062 2 18 5.59375 18 10C18 14.4375 14.4062 18 10 18C5.5625 18 2 14.4375 2 10C2 5.59375 5.5625 2 10 2ZM10 16.5C13.5625 16.5 16.5 13.5938 16.5 10C16.5 6.4375 13.5625 3.5 10 3.5C6.40625 3.5 3.5 6.4375 3.5 10C3.5 13.5938 6.40625 16.5 10 16.5Z", fill: "currentColor" }) }) }));
|
|
@@ -15244,15 +16062,15 @@ function AlertBanner({ variant = "info", isIconHidden = false, isCloseable = tru
|
|
|
15244
16062
|
return (jsx("div", { className: `bcds-Alert-Banner ${variant}`, ...props, children: jsxs("div", { className: "bcds-Alert-Banner--Container", children: [" ", !isIconHidden && (jsx("span", { className: "bcds-Alert-Banner--Icon", children: customIcon ? customIcon : getIcon$2(variant) })), jsx("div", { className: "bcds-Alert-Banner--Content", role: role, children: children }), isCloseable && (jsx("span", { className: "bcds-Alert-Banner--closeIcon", children: jsx(Button, { variant: "tertiary", isIconButton: true, size: "small", "aria-label": "Close this alert", type: "button", onPress: onClose, children: jsx(SvgCloseIcon, {}) }) }))] }) }));
|
|
15245
16063
|
}
|
|
15246
16064
|
|
|
15247
|
-
var css_248z$
|
|
15248
|
-
styleInject(css_248z$
|
|
16065
|
+
var css_248z$m = ".bcds-ButtonGroup {\n display: flex;\n gap: var(--layout-margin-small);\n flex-grow: 1;\n}\n\n.bcds-ButtonGroup.horizontal {\n flex-direction: row;\n}\n\n.bcds-ButtonGroup.vertical {\n flex-direction: column;\n}\n\n.bcds-ButtonGroup.start {\n justify-content: flex-start;\n}\n\n.bcds-ButtonGroup.center {\n justify-content: center;\n}\n\n.bcds-ButtonGroup.end {\n justify-content: flex-end;\n}\n";
|
|
16066
|
+
styleInject(css_248z$m);
|
|
15249
16067
|
|
|
15250
16068
|
function ButtonGroup({ orientation = "horizontal", alignment = "start", ariaLabel, children, ...props }) {
|
|
15251
16069
|
return (jsx("div", { className: `bcds-ButtonGroup ${orientation} ${alignment}`, role: "group", "aria-label": ariaLabel, ...props, children: children }));
|
|
15252
16070
|
}
|
|
15253
16071
|
|
|
15254
|
-
var css_248z$
|
|
15255
|
-
styleInject(css_248z$
|
|
16072
|
+
var css_248z$l = ".bcds-react-aria-AlertDialog {\n display: flex;\n flex-direction: column;\n}\n\n/* Variant icons */\n.bcds-react-aria-AlertDialog.info .bcds-react-aria-AlertDialog--Icon {\n color: var(--icons-color-primary);\n}\n.bcds-react-aria-AlertDialog.confirmation .bcds-react-aria-AlertDialog--Icon {\n color: var(--icons-color-success);\n}\n.bcds-react-aria-AlertDialog.warning .bcds-react-aria-AlertDialog--Icon {\n color: var(--icons-color-warning);\n}\n.bcds-react-aria-AlertDialog.error .bcds-react-aria-AlertDialog--Icon {\n color: var(--icons-color-danger);\n}\n.bcds-react-aria-AlertDialog.destructive .bcds-react-aria-AlertDialog--Icon {\n color: var(--icons-color-danger);\n}\n\n.bcds-react-aria-AlertDialog--Header {\n display: inline-flex;\n flex-direction: row;\n gap: var(--layout-padding-small);\n justify-content: space-between;\n padding: var(--layout-padding-medium) var(--layout-padding-large);\n border-bottom: var(--layout-border-width-small) solid\n var(--surface-color-border-default);\n}\n\n.bcds-react-aria-AlertDialog--Title {\n flex-grow: 1;\n font: var(--typography-bold-h5);\n color: var(--typography-color-primary);\n}\n\n.bcds-react-aria-AlertDialog--Icon {\n justify-self: flex-start;\n align-self: center;\n padding-top: var(--layout-padding-xsmall);\n}\n\n.bcds-react-aria-AlertDialog--closeIcon {\n justify-self: flex-end;\n color: var(--icons-color-primary);\n}\n\n.bcds-react-aria-AlertDialog--children {\n font: var(--typography-regular-body);\n color: var(--typography-color-primary);\n padding: var(--layout-padding-medium) var(--layout-padding-large);\n border-bottom: var(--layout-border-width-small) solid\n var(--surface-color-border-default);\n}\n\n.bcds-react-aria-AlertDialog > .bcds-ButtonGroup {\n padding: var(--layout-padding-medium) var(--layout-padding-large);\n}\n";
|
|
16073
|
+
styleInject(css_248z$l);
|
|
15256
16074
|
|
|
15257
16075
|
/* Sets correct left icon for selected variant */
|
|
15258
16076
|
function getIcon$1(variant) {
|
|
@@ -15275,8 +16093,8 @@ function AlertDialog({ children, variant = "info", role = "dialog", title, isClo
|
|
|
15275
16093
|
return (jsx($de32f1b87079253c$export$3ddf2d174ce01153, { className: `bcds-react-aria-AlertDialog ${variant}`, role: role, ...props, children: ({ close }) => (jsxs(Fragment, { children: [jsxs("div", { className: "bcds-react-aria-AlertDialog--Header", children: [!isIconHidden && (jsx("div", { className: "bcds-react-aria-AlertDialog--Icon", children: getIcon$1(variant) })), title && (jsx("div", { className: "bcds-react-aria-AlertDialog--Title", slot: "title", children: title })), isCloseable && (jsx("div", { className: "bcds-react-aria-AlertDialog--closeIcon", children: jsx(Button, { variant: "tertiary", isIconButton: true, size: "small", "aria-label": "Close", type: "button", onPress: close, children: jsx(SvgCloseIcon, {}) }) }))] }), children && (jsx("div", { className: "bcds-react-aria-AlertDialog--children", slot: "children", children: jsx(Fragment, { children: children }) })), buttons && (jsx(ButtonGroup, { alignment: "end", orientation: "horizontal", children: buttons }))] })) }));
|
|
15276
16094
|
}
|
|
15277
16095
|
|
|
15278
|
-
var css_248z$
|
|
15279
|
-
styleInject(css_248z$
|
|
16096
|
+
var css_248z$k = ".bcds-Callout {\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: var(--layout-padding-medium) var(--layout-padding-large);\n border-radius: var(--layout-border-radius-medium)\n var(--layout-border-radius-none) var(--layout-border-radius-none)\n var(--layout-border-radius-medium);\n}\n\n.bcds-Callout--Container {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: var(--layout-margin-small);\n}\n\n.bcds-Callout--Container > .bcds-Callout--Title {\n font: var(--typography-bold-large-body);\n color: var(--typography-color-primary);\n}\n\n.bcds-Callout--Container > .bcds-Callout--Description {\n font: var(--typography-regular-body);\n color: var(--typography-color-secondary);\n}\n\n/* Theme - light grey (default) */\n.bcds-Callout.lightGrey {\n background-color: var(--surface-color-background-light-gray);\n border-left: var(--layout-border-width-large) solid var(--theme-primary-blue);\n}\n\n/* Theme - light blue */\n.bcds-Callout.lightBlue {\n background-color: var(--theme-blue-10);\n border-left: var(--layout-border-width-large) solid var(--theme-primary-blue);\n}\n\n/* Theme - light gold */\n.bcds-Callout.lightGold {\n background-color: var(--theme-gold-10);\n border-left: var(--layout-border-width-large) solid var(--theme-primary-blue);\n}\n\n/* Theme - blue */\n.bcds-Callout.Blue {\n background-color: var(--surface-color-background-dark-blue);\n border-left: var(--layout-border-width-large) solid var(--theme-primary-gold);\n}\n\n.bcds-Callout.Blue .bcds-Callout--Title {\n color: var(--typography-color-primary-invert);\n}\n\n.bcds-Callout.Blue .bcds-Callout--Description {\n color: var(--typography-color-secondary-invert);\n}\n\n/* Theme - grey */\n.bcds-Callout.Grey {\n background-color: var(--theme-gray-80);\n border-left: var(--layout-border-width-large) solid var(--theme-primary-gold);\n}\n\n.bcds-Callout.Grey .bcds-Callout--Title {\n color: var(--typography-color-primary-invert);\n}\n\n.bcds-Callout.Grey .bcds-Callout--Description {\n color: var(--typography-color-secondary-invert);\n}\n\n/* Theme - black */\n.bcds-Callout.Black {\n background-color: var(--theme-gray-100);\n border-left: var(--layout-border-width-large) solid var(--theme-primary-gold);\n}\n\n.bcds-Callout.Black .bcds-Callout--Title {\n color: var(--typography-color-primary-invert);\n}\n\n.bcds-Callout.Black .bcds-Callout--Description {\n color: var(--typography-color-secondary-invert);\n}\n\n/* Border disabled */\n.bcds-Callout.lightGrey.noBorder,\n.bcds-Callout.lightGold.noBorder,\n.bcds-Callout.lightBlue.noBorder,\n.bcds-Callout.Blue.noBorder,\n.bcds-Callout.Grey.noBorder,\n.bcds-Callout.Black.noBorder {\n border-left: none;\n border-radius: var(--layout-border-radius-none);\n}\n";
|
|
16097
|
+
styleInject(css_248z$k);
|
|
15280
16098
|
|
|
15281
16099
|
function Callout({ variant = "lightGrey", title, description, buttons, role = "note", isLeftBorderDisabled = false, children, ...props }) {
|
|
15282
16100
|
return (jsx("div", { className: `bcds-Callout ${variant} ${isLeftBorderDisabled ? "noBorder" : ""}`, ...props, role: role, children: children ? (children) : (jsx(Fragment, { children: jsxs("div", { className: "bcds-Callout--Container", "aria-labelledby": "callout-title", role: role, children: [title && (jsx("span", { className: "bcds-Callout--Title", id: "callout-title", children: title })), description && (jsx("span", { className: "bcds-Callout--Description", children: description })), buttons && (jsx(ButtonGroup, { alignment: "start", orientation: "horizontal", children: buttons }))] }) })) }));
|
|
@@ -15291,22 +16109,22 @@ function SvgDashIcon({ id = "dash-icon" }) {
|
|
|
15291
16109
|
return (jsx("svg", { id: id, width: "8", height: "10", viewBox: "0 0 8 2", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M6.99005 1.96004H1.01005C0.479855 1.96004 0.0500488 1.53023 0.0500488 1.00004C0.0500488 0.469846 0.479855 0.0400391 1.01005 0.0400391H6.99005C7.52024 0.0400391 7.95005 0.469846 7.95005 1.00004C7.95005 1.53023 7.52024 1.96004 6.99005 1.96004H6.99005Z", fill: "currentColor" }) }));
|
|
15292
16110
|
}
|
|
15293
16111
|
|
|
15294
|
-
var css_248z$
|
|
15295
|
-
styleInject(css_248z$
|
|
16112
|
+
var css_248z$j = ".bcds-react-aria-Checkbox {\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n align-items: center;\n}\n\n/* Checkbox */\n.bcds-react-aria-Checkbox > .checkbox {\n align-self: first baseline;\n display: flex;\n margin-top: var(--layout-margin-hair);\n justify-content: space-around;\n width: var(--icons-size-small);\n height: var(--icons-size-small);\n min-width: var(--icons-size-small);\n background-color: var(--surface-color-secondary-default);\n border-color: var(--surface-color-border-medium);\n border-style: solid;\n border-width: var(--layout-border-width-small);\n border-radius: var(--layout-border-radius-small);\n}\n.bcds-react-aria-Checkbox > .checkbox > svg {\n align-self: center;\n}\n\n/* Label */\n.bcds-react-aria-Checkbox > .label {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n}\n\n/* Focus */\n.bcds-react-aria-Checkbox[data-focused] > .checkbox {\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n\n/* Hover */\n.bcds-react-aria-Checkbox[data-hovered] > .checkbox {\n border-color: var(--surface-color-border-dark);\n}\n.bcds-react-aria-Checkbox[data-selected][data-hovered] > .checkbox {\n background-color: var(--surface-color-primary-hover);\n border-color: var(--surface-color-primary-hover);\n}\n\n/* Pressed */\n.bcds-react-aria-Checkbox[data-pressed] > .checkbox {\n background-color: var(--surface-color-primary-default);\n}\n\n/* Selected */\n.bcds-react-aria-Checkbox[data-selected] > .checkbox {\n background-color: var(--surface-color-primary-default);\n border-color: var(--surface-color-primary-default);\n}\n.bcds-react-aria-Checkbox[data-selected] > .checkbox > svg {\n color: var(--icons-color-primary-invert);\n}\n\n/* Disabled */\n.bcds-react-aria-Checkbox[data-disabled] {\n cursor: not-allowed;\n}\n.bcds-react-aria-Checkbox[data-disabled] > .checkbox {\n border-color: var(--surface-color-border-medium);\n background-color: var(--surface-color-primary-disabled);\n}\n.bcds-react-aria-Checkbox[data-disabled] > .label {\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Checkbox[data-selected][data-disabled] > .checkbox {\n border-color: var(--surface-color-primary-disabled);\n background-color: var(--surface-color-primary-disabled);\n}\n.bcds-react-aria-Checkbox[data-selected][data-disabled] > .checkbox > svg {\n color: var(--icons-color-disabled);\n}\n\n/* Indeterminate */\n.bcds-react-aria-Checkbox[data-indeterminate] > .checkbox {\n background-color: var(--surface-color-primary-default);\n border-color: var(--surface-color-primary-default);\n}\n.bcds-react-aria-Checkbox[data-indeterminate][data-disabled] > .checkbox {\n background-color: var(--surface-color-primary-disabled);\n border-color: var(--surface-color-primary-disabled);\n}\n.bcds-react-aria-Checkbox[data-indeterminate][data-invalid] > .checkbox {\n background-color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Checkbox[data-indeterminate] > .checkbox > svg {\n color: var(--icons-color-primary-invert);\n align-self: center;\n vertical-align: middle;\n}\n.bcds-react-aria-Checkbox[data-indeterminate][data-disabled] > .checkbox > svg {\n color: var(--icons-color-disabled);\n}\n\n/* Read-only */\n.bcds-react-aria-Checkbox[data-readonly] {\n cursor: not-allowed;\n}\n\n/* Invalid */\n.bcds-react-aria-Checkbox[data-invalid] > .checkbox {\n border-color: var(--support-border-color-danger);\n}\n.bcds-react-aria-Checkbox[data-invalid] > .checkbox > svg {\n color: var(--icons-color-primary-invert);\n}\n.bcds-react-aria-Checkbox[data-selected][data-invalid] > .checkbox {\n background-color: var(--surface-color-primary-danger-button-default);\n}\n";
|
|
16113
|
+
styleInject(css_248z$j);
|
|
15296
16114
|
|
|
15297
16115
|
function Checkbox({ value, children, ...props }) {
|
|
15298
16116
|
return (jsx($bc237834342dbd75$export$48513f6b9f8ce62d, { className: "bcds-react-aria-Checkbox", value: value, ...props, children: ({ isRequired, isSelected, isIndeterminate }) => (jsxs(Fragment, { children: [jsxs("div", { className: "checkbox", children: [isSelected && !isIndeterminate && jsx(SvgCheckIcon, {}), isIndeterminate && jsx(SvgDashIcon, {})] }), jsxs("span", { className: "label", children: [jsx(Fragment, { children: children }), " ", isRequired && "(required)"] })] })) }));
|
|
15299
16117
|
}
|
|
15300
16118
|
|
|
15301
|
-
var css_248z$
|
|
15302
|
-
styleInject(css_248z$
|
|
16119
|
+
var css_248z$i = ".bcds-react-aria-CheckboxGroup {\n display: flex;\n flex-direction: column;\n gap: var(--layout-margin-small);\n}\n\n/* Orientation */\n.bcds-react-aria-CheckboxGroup--options {\n display: flex;\n}\n\n.bcds-react-aria-CheckboxGroup--options.vertical {\n flex-direction: column;\n gap: var(--layout-margin-small);\n}\n\n.bcds-react-aria-CheckboxGroup--options.horizontal {\n flex-direction: row;\n gap: var(--layout-margin-medium);\n}\n.bcds-react-aria-CheckboxGroup--options.horizontal.flex-wrap-nowrap {\n flex-wrap: nowrap;\n}\n.bcds-react-aria-CheckboxGroup--options.horizontal.flex-wrap-wrap {\n flex-wrap: wrap;\n}\n.bcds-react-aria-CheckboxGroup--options.horizontal.flex-wrap-wrap-reverse {\n flex-wrap: wrap-reverse;\n}\n\n/* Parts */\n.bcds-react-aria-CheckboxGroup--label {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-primary);\n}\n\n.bcds-react-aria-CheckboxGroup--description {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n}\n\n.bcds-react-aria-CheckboxGroup--error {\n display: inline-flex;\n flex-direction: row;\n gap: var(--layout-margin-xsmall);\n font: var(--typography-regular-small-body);\n color: var(--typography-color-danger);\n}\n";
|
|
16120
|
+
styleInject(css_248z$i);
|
|
15303
16121
|
|
|
15304
16122
|
function CheckboxGroup({ orientation = "vertical", label, description, errorMessage, flexWrap = "nowrap", children, ...props }) {
|
|
15305
16123
|
return (jsx($bc237834342dbd75$export$4aa08d5625cb8ead, { className: `bcds-react-aria-CheckboxGroup`, ...props, children: ({ isRequired, isInvalid }) => (jsxs(Fragment, { children: [label && (jsxs($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: "bcds-react-aria-CheckboxGroup--label", children: [label, " ", isRequired && "(required)"] })), jsx("div", { className: `bcds-react-aria-CheckboxGroup--options ${orientation} flex-wrap-${flexWrap}`, children: jsx(Fragment, { children: children }) }), description && (jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "bcds-react-aria-CheckboxGroup--description", children: description })), isInvalid && (jsxs("div", { className: "bcds-react-aria-CheckboxGroup--error", children: [jsx(SvgExclamationIcon, {}), jsx($ee014567cb39d3f0$export$f551688fc98f2e09, { children: errorMessage })] }))] })) }));
|
|
15306
16124
|
}
|
|
15307
16125
|
|
|
15308
|
-
var css_248z$
|
|
15309
|
-
styleInject(css_248z$
|
|
16126
|
+
var css_248z$h = ".bcds-react-aria-Dialog {\n display: flex;\n flex-direction: column;\n min-height: var(--layout-margin-xxxlarge);\n}\n\n.bcds-react-aria-Dialog--Container {\n position: relative;\n}\n\n/* Close icon */\n.bcds-react-aria-Dialog--closeIcon {\n color: var(--icons-color-primary);\n position: absolute;\n top: 0;\n right: 0;\n padding: var(--layout-padding-small);\n}\n.bcds-react-aria-Dialog--closeIcon > svg {\n min-width: var(--icons-size-medium);\n height: var(--icons-size-medium);\n}\n";
|
|
16127
|
+
styleInject(css_248z$h);
|
|
15310
16128
|
|
|
15311
16129
|
function Dialog({ isCloseable = true, role = "dialog", children, ...props }) {
|
|
15312
16130
|
return (jsx($de32f1b87079253c$export$3ddf2d174ce01153, { className: "bcds-react-aria-Dialog", role: role, ...props, children: ({ close }) => (jsx(Fragment, { children: jsxs("div", { className: "bcds-react-aria-Dialog--Container", children: [isCloseable && (jsx("span", { className: "bcds-react-aria-Dialog--closeIcon", children: jsx(Button, { variant: "tertiary", isIconButton: true, size: "small", "aria-label": "Close", type: "button", onPress: close, children: jsx(SvgCloseIcon, {}) }) })), jsx(Fragment, { children: children })] }) })) }));
|
|
@@ -15317,8 +16135,8 @@ function SvgBcLogo({ id = "bcgov-logo" }) {
|
|
|
15317
16135
|
return (jsxs("svg", { id: id, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 847.65 327.01", children: [jsx("path", { d: "M109.59,226.32c44.7,0,106.54,25.17,151.41,25.17,32.02,0,63.26-8.54,81.04-21.13,1.24-7.39,1.9-14.97,1.9-22.72,0-75.13-60.91-136.04-136.04-136.04s-136.04,60.91-136.04,136.04c0,7.65.64,15.15,1.86,22.46,4.9-.91,21.57-3.79,35.87-3.79Z", style: { fill: "#fff", strokeWidth: "0px" } }), jsxs("g", { children: [jsxs("g", { children: [jsx("rect", { x: "415.4", y: "252.98", width: "314.66", height: "3.82", style: { fill: "#e3a82b", strokeWidth: "0px" } }), jsx("path", { d: "M423.47,116.64c0-6.39-.45-8.08-4.76-8.43l-3-.21c-.49-.39-.35-2.12.1-2.16,5.17-.46,11.69-.69,20.6-.69,6.04,0,11.79.43,16.1,2.42,4.12,1.81,7.28,5.26,7.28,10.79,0,6.22-4.03,9.41-9.77,11.83,0,.86.77,1.12,1.82,1.29,5.17.86,12.84,5.18,12.84,14.42,0,10.01-8.24,16.75-25.49,16.75-2.78,0-7.47-.26-11.5-.26s-7.47.17-11.02.26c-.57-.26-.77-1.64-.19-2.16l1.73-.26c5.08-.78,5.27-1.73,5.27-10.79v-32.8ZM431.32,128.12c0,2.42.1,2.59,4.98,2.42,9.77-.35,15.04-2.94,15.04-11.05s-7-11.65-14.28-11.65c-2.11,0-3.55.17-4.41.52-.96.26-1.34.69-1.34,2.24v17.52ZM431.32,148.14c0,3.11.19,7.51,2.01,9.41,1.82,1.98,4.7,2.42,7.57,2.42,8.53,0,15.04-3.45,15.04-12.08,0-6.82-3.83-14.76-19.07-14.76-5.17,0-5.56.52-5.56,2.24v12.77Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M531.26,125.14c0-7.82-.16-9.07-4.99-9.44l-2.05-.15c-.49-.29-.33-1.62.16-1.84,4.09.15,6.87.22,10.31.22s6.06-.07,10.15-.22c.49.22.65,1.55.16,1.84l-2.04.15c-4.83.37-4.99,1.62-4.99,9.44v26.25c0,7.82.16,8.85,4.99,9.36l2.04.22c.49.29.33,1.62-.16,1.84-4.09-.15-6.87-.22-10.15-.22-3.44,0-6.22.07-10.31.22-.49-.22-.66-1.4-.16-1.84l2.05-.22c4.83-.52,4.99-1.55,4.99-9.36v-26.25Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M576.66,151.53c0,7.74.15,8.85,4.6,9.22l2.45.22c.46.29.31,1.62-.15,1.84-4.37-.15-6.98-.22-10.05-.22s-5.75.07-10.66.22c-.46-.22-.62-1.47,0-1.84l2.76-.22c4.37-.37,4.75-1.48,4.75-9.22v-32.96c0-2.28,0-2.36-2.3-2.36h-4.22c-3.3,0-7.51.15-9.43,1.84-1.84,1.62-2.61,3.24-3.45,5.09-.62.44-1.69.07-1.99-.52,1.22-3.32,2.38-8.04,2.91-10.98.23-.15,1.23-.22,1.46,0,.46,2.36,2.99,2.29,6.52,2.29h31.05c4.14,0,4.83-.15,5.98-2.06.38-.15,1.23-.07,1.38.22-.84,3.02-1.38,9-1.15,11.21-.31.59-1.61.59-1.99.15-.23-1.84-.77-4.57-1.92-5.38-1.76-1.25-4.68-1.84-8.89-1.84h-5.44c-2.3,0-2.22.07-2.22,2.51v32.81Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M609.53,125.14c0-7.82-.16-9.07-4.99-9.44l-2.05-.15c-.49-.29-.33-1.62.16-1.84,4.09.15,6.87.22,10.31.22s6.05-.07,10.15-.22c.49.22.66,1.55.17,1.84l-2.05.15c-4.83.37-4.99,1.62-4.99,9.44v26.25c0,7.82.16,8.85,4.99,9.36l2.05.22c.49.29.33,1.62-.17,1.84-4.09-.15-6.87-.22-10.15-.22-3.44,0-6.22.07-10.31.22-.49-.22-.65-1.4-.16-1.84l2.05-.22c4.83-.52,4.99-1.55,4.99-9.36v-26.25Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M646.2,163.57c-7.31,0-11.92-1.92-13.57-2.73-1.04-1.62-2.18-6.86-2.35-10.32.44-.52,1.74-.66,2.09-.22,1.31,3.76,4.87,10.98,14.96,10.98,7.31,0,10.87-4.05,10.87-8.48,0-3.24-.78-6.86-7.13-10.32l-8.26-4.57c-4.35-2.43-9.4-6.64-9.4-12.68,0-7,6.44-12.68,17.75-12.68,2.7,0,5.83.44,8.09.96,1.13.29,2.35.44,3.04.44.78,1.77,1.57,5.9,1.57,9-.35.44-1.74.66-2.18.22-1.13-3.54-3.48-8.33-11.83-8.33s-10.35,4.79-10.35,8.18c0,4.28,4.18,7.38,7.39,9.07l6.96,3.69c5.48,2.88,10.88,7.15,10.88,14.16,0,8.11-7.22,13.64-18.53,13.64Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M689.99,138.78c-3.81,0-3.96.15-3.96,2.36v10.4c0,7.74.4,8.77,4.84,9.22l2.3.22c.48.29.32,1.62-.16,1.84-4.28-.15-6.98-.22-10.08-.22-3.41,0-6.11.15-9.2.22-.47-.22-.63-1.4-.16-1.84l1.35-.22c4.45-.74,4.6-1.48,4.6-9.22v-26.54c0-7.74-.55-8.99-4.68-9.29l-2.06-.15c-.48-.29-.32-1.62.16-1.84,3.89.07,6.58.22,10,.22,3.1,0,5.79-.07,9.2-.22.48.22.63,1.55.16,1.84l-1.51.15c-4.6.44-4.76,1.55-4.76,9.29v8.48c0,2.28.16,2.36,3.96,2.36h22.69c3.81,0,3.97-.07,3.97-2.36v-8.48c0-7.74-.16-8.85-4.84-9.29l-1.51-.15c-.48-.29-.32-1.62.16-1.84,3.65.15,6.35.22,9.6.22s5.79-.07,9.36-.22c.48.22.63,1.55.16,1.84l-1.66.15c-4.6.44-4.76,1.55-4.76,9.29v26.54c0,7.74.16,8.7,4.76,9.22l1.9.22c.47.29.32,1.62-.16,1.84-3.81-.15-6.51-.22-9.6-.22-3.25,0-6.11.07-9.6.22-.48-.22-.63-1.4-.16-1.84l1.51-.22c4.84-.74,4.84-1.48,4.84-9.22v-10.4c0-2.21-.16-2.36-3.97-2.36h-22.69Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M378.06,179.01c6.52-5.07,14.83-7.57,24.12-7.57,4.82,0,11.61.98,15.81,2.14,1.07.27,1.7.45,2.5.36.09,2.05.54,7.65,1.25,13.09-.45.62-1.79.71-2.41.18-1.34-6.05-5.36-13-18.31-13-13.67,0-25.28,8.64-25.28,27.06s11.88,29.02,26.53,29.02c11.52,0,16.62-7.48,18.67-12.73.63-.44,1.97-.27,2.32.36-.62,4.63-2.95,10.5-4.29,12.2-1.07.18-2.14.53-3.13.89-1.97.71-8.4,2.05-14.11,2.05-8.04,0-15.72-1.6-22.24-5.96-7.15-4.9-12.69-12.99-12.69-24.48,0-9.88,4.47-18.34,11.26-23.59Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M426.92,207.81c0-14.75,11.61-26.03,27.56-26.03,17.88,0,26.86,12.31,26.86,25.29,0,14.89-11.92,25.73-26.86,25.73-17.19,0-27.56-11.72-27.56-25ZM473.6,209.35c0-12.17-5.65-25.29-20.44-25.29-8.05,0-18.5,5.24-18.5,21.38,0,10.91,5.57,25.07,20.82,25.07,9.29,0,18.12-6.64,18.12-21.16Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M568.68,201.47c0-4.57-.16-13.05-1.49-15.26-.55-.89-1.95-1.4-3.91-1.55l-1.95-.15c-.47-.52-.31-1.47.15-1.77,2.97.15,5.86.22,8.91.22,3.28,0,5.39-.08,8.21-.22.62.37.55,1.33.16,1.77l-1.88.15c-1.95.15-3.44.81-3.91,1.77-1.09,2.43-1.09,10.91-1.09,15.04v8.33c0,6.42-1.1,13.2-5.47,17.62-3.36,3.47-9.14,5.38-14.93,5.38-5.39,0-10.79-.96-14.62-4.05-4.14-3.24-6.1-8.63-6.1-17.4v-17.4c0-7.67-.16-8.92-4.69-9.29l-1.96-.15c-.47-.29-.31-1.55.15-1.77,3.91.15,6.57.22,9.69.22s5.78-.08,9.61-.22c.47.22.63,1.47.16,1.77l-1.88.15c-4.53.37-4.69,1.62-4.69,9.29v15.93c0,11.87,3.91,19.69,15.87,19.69,11.33,0,15.63-8.41,15.63-19.61v-8.48Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M659.52,192.26c0-5.51-.35-6.93-4.23-7.22l-2.77-.27c-.31-.28-.48-1.78.09-1.82,4.67-.35,10.54-.59,18.57-.59,5.44,0,10.62.37,14.51,2.08,3.71,1.57,6.56,4.54,6.56,9.31,0,5.36-3.63,8.12-8.81,10.2,0,.75.69.97,1.64,1.12,4.67.74,11.58,4.47,11.58,12.44,0,8.64-7.43,14.45-22.98,14.45-2.5,0-6.74-.22-10.37-.22s-6.74.15-9.93.22c-.52-.22-.69-1.41-.17-1.86l1.55-.22c4.58-.67,4.75-1.49,4.75-9.31v-28.3ZM666.6,202.16c0,2.09.09,2.24,4.49,2.09,8.81-.3,13.56-2.53,13.56-9.53s-6.3-10.05-12.87-10.05c-1.9,0-3.2.15-3.97.45-.87.22-1.21.59-1.21,1.94v15.12ZM666.6,219.44c0,2.68.17,6.48,1.81,8.12,1.64,1.71,4.23,2.08,6.82,2.08,7.69,0,13.56-2.98,13.56-10.43,0-5.88-3.45-12.73-17.19-12.73-4.67,0-5.01.44-5.01,1.94v11.02Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M518.75,160.97l-2.05-.18c-.41-.04-.78-.1-1.13-.15-2.99-.53-4.19-3.2-5.6-5.67l-7.08-12.32c-1.22-2.05-2.53-4.82-5.33-5.21,7.25-.87,13.81-5.06,13.81-12.24,0-8.3-8.21-12.01-16.52-12.01-4.98,0-9.52.13-14.59.13-2.79,0-6.12-.13-8.92-.13-1.55,0-1.57.32-1.57,1.18,0,1.28.54.92,2.19,1.02,5.9.33,5.68,1.43,5.68,6.49v32.31c0,4.62.4,6-4.46,6.44,0,0-.74.08-1.17.12l-2.06.21c-.49.44-.33,1.62.16,1.84,1.09-.04,3.03-.12,3.03-.12,2.69-.08,5.38-.28,8.06-.28s5.29.21,7.95.29h0c.94.03,1.94.07,3.03.1.49-.22.66-1.4.16-1.84l-2.07-.2c-.42-.05-1.15-.11-1.15-.11-4.9-.33-4.6-1.71-4.6-6.46v-12.17c0-.71-.09-2.61.44-3.16.44-.48,1.22-.4,1.92-.4,6.64,0,6.55.63,9.7,6.16l8.56,15.4c.7,1.19,1.22,2.69,2.97,2.69h7.44c.94.03,1.92.06,3.01.1.49-.22.65-1.4.16-1.84ZM488.92,136.74c-1.49,0-4.46.55-4.46-1.42v-14.14c0-5.53.18-6.32,6.82-6.32,7.78,0,12.58,3.95,12.58,11.22,0,3.16-1.14,6.08-4.02,8.06-3.32,2.29-6.9,2.61-10.92,2.61Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsxs("g", { children: [jsx("path", { d: "M490.53,194.2c0-7.74-.16-8.92-5.27-9.29l-2.03-.15c-.49-.3-.32-1.62.16-1.84,4.54.15,7.3.22,10.54.22s5.92-.07,9.98-.22c.49.22.65,1.55.16,1.84l-1.95.15c-4.78.37-4.95,1.55-4.95,9.29v25.66c0,4.64.24,6.56,1.7,7.96.89.81,2.43,1.7,8.84,1.7,6.89,0,8.6-.3,9.9-.96,1.62-.89,3.73-3.54,5.35-7.3.49-.37,2.03-.07,2.03.44,0,.81-2.27,8.33-3.41,10.32-4.13-.15-11.84-.22-20.2-.22h-7.46c-3.41,0-6,.07-10.54.22-.49-.22-.65-1.4-.16-1.84l2.43-.22c4.7-.44,4.87-1.48,4.87-9.22v-26.54Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M707.79,194.34c0-7.81-.16-9.07-4.86-9.44l-1.99-.15c-.48-.3-.32-1.62.16-1.84,3.98.15,6.69.22,10.03.22s5.89-.07,9.87-.22c.48.22.64,1.55.16,1.84l-1.99.15c-4.7.37-4.86,1.62-4.86,9.44v26.25c0,7.82.16,8.85,4.86,9.36l1.99.22c.48.3.32,1.62-.16,1.84-3.98-.15-6.69-.22-9.87-.22-3.35,0-6.05.07-10.03.22-.48-.22-.64-1.4-.16-1.84l1.99-.22c4.7-.52,4.86-1.55,4.86-9.36v-26.25Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M644.16,229.94c-.41-.04-1.17-.1-1.17-.1-.84-.08-1.59-.2-2.19-.86-1.03-1.1-.95-4.23-.95-5.48v-32.31c0-1.41-.34-4.46.69-5.56.52-.58,1.59-.67,2.55-.73h0c.58-.05.6-.05,1.11-.07l2.05-.15c.49-.3.33-1.62-.16-1.84-1.09.04-2.09.02-3.03.05h0s-8.7,0-8.7,0c-.95,0-1.81,0-2.32,1.02l-17.73,36.92-15.66-35.67c-.52-1.25-.6-2.27-2.24-2.27h-9.05c-.94-.03-1.98-.02-3.08-.06-.49.22-.66,1.55-.16,1.84l2.05.15c.42.03,1.19.09,1.19.09,3.4.22,3.61.98,3.3,4.55l-2.67,34.65c-.23,3.48-.42,5.32-4.07,5.66,0,0-.77.1-1.19.14l-2.04.22c-.49.44-.33,1.62.16,1.84,1.08-.04,3-.1,3-.1,1.85-.09,3.73-.25,5.61-.25,2.03,0,4.06.19,6.1.27h0c.94.03,1.94.07,3.03.1.49-.22.66-1.4.16-1.84l-2.04-.22c-.54-.04-1.14-.1-1.14-.1-5.26-.36-5.14-4.07-4.81-8.62l2.5-32.23h.6l16.95,39.66c.17.55.43,1.49,1.29,1.49.78,0,1.03-.86,1.29-1.41l19.1-40.68h.6v35.44c0,1.41.17,4.3-1.29,5.4-.76.57-3.25.91-3.25.91-.34.05-.7.1-1.11.15l-2.04.22c-.49.44-.33,1.62.16,1.84,1.08-.04,2.99-.1,2.99-.1,2.77-.08,5.59-.28,8.41-.28,2.03,0,6,.19,6,.19.95.03,2.02.13,3.12.17.49-.22.66-1.4.16-1.84l-2.05-.22Z", style: { fill: "#234075", strokeWidth: "0px" } }), jsx("path", { d: "M777.13,230.14l-.28-.22c-.41-.04-.77-.09-1.11-.15-3.19-.71-4.43-4.55-5.61-7.29l-16.41-38.83c-.16-.47-.49-1.47-1.14-1.47-.89,0-1.14,1.08-1.38,1.7l-15.68,38.76c-.57,1.47-2.03,5.03-3.09,6.11-.81.83-1.86.99-2.99,1.1,0,0-.88.08-1.31.13l-1.93.2c-.49.44-.33,1.62.16,1.84,1.09-.04,3.03-.11,3.03-.11,2.14-.03,4.29-.3,6.44-.3,1.81,0,3.61.19,5.41.27,0,0,1.94.07,3.03.11.49-.22.65-1.4.16-1.84l-2.05-.22c-.41-.04-1.11-.11-1.11-.11-1.89-.21-4.24-.55-4.24-2.62,0-1.39.65-3.02,1.14-4.25l2.44-5.8c1.22-2.78.73-3.1,3.98-3.1h11.05c3.9,0,3.33,0,5.04,3.95l2.6,5.88c.41,1.01,1.14,2.71,1.14,3.79,0,1.94-2.12,2.07-4.11,2.24,0,0-.66.06-1.23.1l-1.97.14c-.49.44-.33,1.62.17,1.84,1.09-.04,3.03-.12,3.03-.12,2.31-.08,4.64-.26,6.87-.26,2.85,0,5.69.19,8.54.27h0c.93.03.14.06,1.22.1.49-.22.65-1.4.16-1.84ZM755.64,211.89h-9.57c-.33,0-3,.31-3-.47,0-.24.17-.7.25-.94l5.75-14.23c.17-.39.75-2.35,1.41-2.35.5,0,1.17,2.03,1.33,2.35l5.66,13.29c0,.16.58,1.41.58,1.72,0,.86-1.91.62-2.41.62Z", style: { fill: "#234075", strokeWidth: "0px" } })] }), jsx("rect", { width: "847.65", height: "327.01", style: { fill: "none", strokeWidth: "0px" } })] }), jsxs("g", { children: [jsx("polygon", { points: "295.89 176.17 301.27 178.4 313.19 170.08 295.89 176.17", style: { fill: "#e3a82b", strokeWidth: "0px" } }), jsx("path", { d: "M95.46,166.88l-14.14-4.97.71-1.73,15.92,5.31.07-.04,2.1-1.19.84-.53-17.36-7.39.73-1.82,38.75,15.67,1.28-.53-38.44-18.73.86-1.76,40.73,18.96.56-.29-39.49-22.4.81-1.68,57.03,31.03c.47-.86,1.44-2.44,1.95-3.28-21.68-20.39-42.61-35.69-42.61-35.69,0,0,21.52,14.41,48.07,27.81.88-1.09,1.6-1.97,2.53-3.01l-48.65-42.83,1.31-1.34,39.27,33.47-36.38-36.43,1.36-1.41,40.84,39.47-38.02-42.2,1.45-1.31,35.14,37.63-32.07-40.41,1.38-1.26,41.11,50.03c1.06-.92,1.95-1.61,3.06-2.46-12.44-26.91-26.02-48.8-26.02-48.8,0,0,14.46,21.28,33.96,43.56,1.19-.67,2.4-1.31,3.63-1.92l-.21-.13-28.81-57.5,1.71-.75,23.87,45.74-20.08-47.41,1.79-.8,23.08,51.9-19.45-53.37,1.84-.67,18.49,48.05-14.6-49.49,1.75-.65,19.22,61.38-.04.16.05-.02c1.28-.43,2.58-.81,3.89-1.16-1.46-29.48-5.82-54.7-5.82-54.7,0,0,5.4,25,15.08,52.87,1.35-.17,2.71-.31,4.07-.4l-.04-.06h.17l-.1-.14-5.17-64.11,1.87-.06,5,51.35-.86-51.48,1.96-.07,1.96,56.77,1.96-56.77,1.96.07-.86,51.48,5-51.35,1.87.06-5.17,64.11-.1.14h.03v.02s.07,0,.07,0c1.34.08,2.66.22,3.98.38,9.67-27.84,15.06-52.8,15.06-52.8,0,0-4.35,25.14-5.82,54.57,1.32.35,2.63.73,3.91,1.15l19.15-61.16,1.76.65-14.6,49.48,18.49-48.05,1.84.67-19.45,53.37,23.08-51.9,1.79.8-20.08,47.41,23.87-45.74,1.71.75-28.71,57.3.05.02c1.18.58,2.34,1.19,3.49,1.83,19.42-22.21,33.79-43.37,33.79-43.37,0,0-13.49,21.74-25.89,48.52,1.11.84,2.19,1.7,3.24,2.6l40.63-49.49,1.39,1.26-32.08,40.41,35.14-37.63,1.45,1.31-38.02,42.2,40.84-39.47,1.36,1.41-36.38,36.43,39.27-33.47,1.31,1.34-48.06,42.35.03.03c.84.94,1.65,1.9,2.44,2.88,26.39-13.34,47.71-27.62,47.71-27.62,0,0-20.72,15.16-42.29,35.4.59.99,1.55,2.67,2.09,3.69l56.22-30.61.81,1.69-44.88,25.45,46.68-21.72.86,1.76-43.48,21.19.83.29,44.24-17.89.74,1.82-41.12,17.49.77.32,27.4-9.13,4.13-2.88,1.37,1.05,9.02-3.01.71,1.73-7.8,2.75,11.27,8.6,3.61,2.01c-14.49-60.58-68.98-105.62-134-105.62s-121.42,46.63-134.73,108.82c.17-.08.34-.16.51-.24l1.65-.75,1.01-.47,19.01-10.66Z", style: { fill: "#e3a82b", strokeWidth: "0px" } })] }), jsx("path", { d: "M72.5,233.02s20.32-4.06,37.29-4.06c44.7,0,106.54,25.17,151.41,25.17,32.91,0,65.02-9.03,82.51-22.19,1.37-7.79,2.08-15.8,2.08-23.98,0-11.08-1.32-21.85-3.79-32.17l-18.7-10.43-21.95,15.39-14.76-5.75c-5,2.53-35.83,23.15-35.83,23.15l-11.84-8.57-12.7-2.51-16.93-12.33-19.42,13.33s-21.67,12.58-22.41,12.58-26.14-20.13-26.14-20.13l-11.7-12.33c-1.99,1.26-9.95,4.91-9.95,4.91l-.41.11-7.7-2.38-9.35-4.96-28.41,12.88c-.17.08-.34.16-.51.24-2,9.34-3.06,19.03-3.06,28.96,0,8.56.79,16.93,2.28,25.06Z", style: { fill: "#234075", strokeWidth: "0px" } })] })] }));
|
|
15318
16136
|
}
|
|
15319
16137
|
|
|
15320
|
-
var css_248z$
|
|
15321
|
-
styleInject(css_248z$
|
|
16138
|
+
var css_248z$g = ".bcds-footer {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n width: 100%;\n}\n\n.bcds-footer > .bcds-footer--acknowledgement {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n border-top: var(--layout-border-width-large) solid var(--theme-gold-60);\n border-bottom: var(--layout-border-width-large) solid var(--theme-gold-60);\n background-color: var(--theme-gray-110);\n padding: var(--layout-padding-xlarge);\n}\n\n.bcds-footer\n > .bcds-footer--acknowledgement\n > .bcds-footer--acknowledgement-text {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: stretch;\n color: var(--typography-color-primary-invert);\n font: var(--typography-regular-small-body);\n max-width: 1100px;\n width: 100%;\n}\n\n.bcds-footer\n > .bcds-footer--acknowledgement\n > .bcds-footer--acknowledgement-text\n > p {\n margin: var(--layout-margin-none);\n}\n\n.bcds-footer > .bcds-footer--container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n background-color: var(--surface-color-background-light-gray);\n padding: var(--layout-padding-xlarge);\n}\n\n.bcds-footer > .bcds-footer--container > .bcds-footer--container-content {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: var(--layout-padding-xlarge);\n max-width: 1100px;\n width: 100%;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: flex-start;\n column-gap: var(--layout-padding-xlarge);\n row-gap: var(--layout-padding-medium);\n justify-content: space-between;\n width: 100%;\n}\n\n/* `horizontal` class is the default, when no `children` prop is passed */\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links.horizontal {\n flex-direction: row;\n}\n\n/* `vertical` class is used when a `children` prop is passed */\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links.vertical {\n flex-direction: column;\n align-items: stretch;\n row-gap: var(--layout-padding-xlarge);\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--logo {\n display: flex;\n flex-direction: column;\n gap: var(--layout-padding-large);\n min-width: 324px;\n width: 576px;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--logo\n > #bcgov-logo-footer {\n width: 146px;\n min-width: 146px;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--logo\n > p {\n font: var(--typography-regular-small-body);\n margin: var(--layout-margin-none);\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--logo\n > p\n > a {\n color: var(--typography-color-secondary);\n font: var(--typography-regular-small-body);\n text-decoration: underline;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--logo\n > p\n > a:hover {\n text-decoration: none;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--links {\n margin: var(--layout-margin-none);\n}\n\n/*\n When Footer hasn't been passed `children`, expand the links container to take\n up 320px, as the default links are narrower.\n*/\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links.horizontal\n > .bcds-footer--links {\n min-width: 320px;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--links\n > .bcds-footer--links-title {\n display: block;\n font: var(--typography-bold-small-body);\n margin-bottom: var(--layout-padding-medium);\n text-transform: uppercase;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--links\n > ul {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: auto;\n grid-column-gap: var(--layout-padding-xlarge);\n grid-row-gap: var(--layout-padding-small);\n list-style: none;\n margin: var(--layout-margin-none);\n padding: var(--layout-padding-none);\n}\n\n/*\n When a Footer has been passed `children`, the logo-links container fills the\n full width of the container, so there's room for 4 columns of links.\n*/\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links.vertical\n > .bcds-footer--links\n > ul {\n grid-template-columns: repeat(4, 1fr);\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--links\n > ul\n > li {\n font: var(--typography-regular-small-body);\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--links\n > ul\n > li\n > a {\n color: var(--typography-color-primary);\n text-decoration: none;\n}\n\n.bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--links\n > ul\n > li\n > a:hover {\n text-decoration: underline;\n}\n\n.bcds-footer > .bcds-footer--container > .bcds-footer--container-content > hr {\n background-color: var(--surface-color-border-dark);\n border: var(--layout-border-width-none);\n height: var(--layout-border-width-small);\n margin: var(--layout-margin-none);\n width: 100%;\n}\n\np.bcds-footer--copyright {\n color: var(--typography-color-secondary);\n font: var(--typography-regular-body);\n margin: var(--layout-margin-none);\n}\n\n/* Tablet */\n@media (max-width: 991px) {\n /* Links drop beneath logo in the default configuration */\n .bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links {\n flex-wrap: wrap;\n }\n\n .bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--logo {\n max-width: 324px;\n }\n\n /*\n When the `children` prop is used with multiple FooterLinks components,\n only two columns of links appear on screen at once.\n */\n .bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links.vertical\n > .bcds-footer--links\n > ul {\n grid-template-columns: repeat(2, 1fr);\n }\n}\n\n/* Extra small screens */\n@media (max-width: 575px) {\n .bcds-footer > .bcds-footer--acknowledgement {\n padding: var(--layout-padding-xlarge) var(--layout-padding-medium);\n }\n\n .bcds-footer > .bcds-footer--container {\n padding: var(--layout-padding-medium);\n }\n\n .bcds-footer > .bcds-footer--container > .bcds-footer--container-content {\n gap: var(--layout-padding-medium);\n }\n\n .bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links\n > .bcds-footer--logo {\n gap: var(--layout-padding-medium);\n }\n\n /*\n When the `children` prop is used with multiple FooterLinks components,\n only one column of links appear on screen at once.\n */\n .bcds-footer\n > .bcds-footer--container\n > .bcds-footer--container-content\n > .bcds-footer--logo-links.vertical\n > .bcds-footer--links\n > ul {\n grid-template-columns: repeat(1, 1fr);\n }\n}\n";
|
|
16139
|
+
styleInject(css_248z$g);
|
|
15322
16140
|
|
|
15323
16141
|
/**
|
|
15324
16142
|
* A titled list of links for use in the Footer. Rendered inside a `<figure>`
|
|
@@ -15372,8 +16190,8 @@ function Form({ ...props }) {
|
|
|
15372
16190
|
return jsx($d3e0e05bdfcf66bd$export$a7fed597f4b8afd8, { ...props });
|
|
15373
16191
|
}
|
|
15374
16192
|
|
|
15375
|
-
var css_248z$
|
|
15376
|
-
styleInject(css_248z$
|
|
16193
|
+
var css_248z$f = ".bcds-header {\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-around;\n background-color: var(--surface-color-forms-default);\n border-bottom-color: var(--surface-color-border-default);\n border-bottom-style: solid;\n border-bottom-width: var(--layout-border-width-small);\n min-height: 65px;\n padding: var(--layout-padding-none) var(--layout-padding-medium);\n width: 100%;\n}\n\n.bcds-header > .bcds-header--container {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-padding-medium);\n max-width: 1100px;\n}\n\n.bcds-header > .bcds-header--container > .bcds-header--title {\n flex-grow: 1;\n font: var(--typography-bold-h4);\n color: var(--typography-color-primary);\n}\n\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks {\n list-style: none;\n margin: 0;\n padding: 0;\n position: absolute;\n}\n\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks li a,\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks li button {\n background-color: var(--surface-color-forms-default);\n box-sizing: border-box;\n color: var(--typography-color-link);\n font: var(--typography-regular-body);\n margin-top: -17.5px; /* Center the link visually in a single line-height header */\n padding: var(--layout-padding-xsmall) var(--layout-padding-medium);\n position: absolute;\n margin-left: -100000px;\n}\n\n.bcds-header > .bcds-header--container > ul.bcds-header--skiplinks li a:focus,\n.bcds-header\n > .bcds-header--container\n > ul.bcds-header--skiplinks\n li\n button:focus {\n margin-left: 0; /* Line up left edge with left edge of logo image */\n text-wrap: nowrap;\n}\n\n.bcds-header > .bcds-header--container > .bcds-header--line {\n background-color: var(--surface-color-border-default);\n width: 1px;\n height: 32px;\n}\n\n.bcds-header > .bcds-header--container svg#bcgov-logo-header {\n min-width: 129px;\n width: 129px;\n}\n";
|
|
16194
|
+
styleInject(css_248z$f);
|
|
15377
16195
|
|
|
15378
16196
|
function Header({ children, logoLinkElement, logoImage = jsx(SvgBcLogo, { id: "bcgov-logo-header" }), skipLinks, title = "", titleElement = "span", }) {
|
|
15379
16197
|
function getLogo() {
|
|
@@ -15406,8 +16224,15 @@ function Header({ children, logoLinkElement, logoImage = jsx(SvgBcLogo, { id: "b
|
|
|
15406
16224
|
}) })), title && (jsxs(Fragment, { children: [jsx("div", { className: "bcds-header--line" }), getTitle()] })), children] }) }));
|
|
15407
16225
|
}
|
|
15408
16226
|
|
|
15409
|
-
var css_248z$
|
|
15410
|
-
styleInject(css_248z$
|
|
16227
|
+
var css_248z$e = "/* Headings */\nh1.bcds-react-aria-Heading {\n font: var(--typography-bold-h1);\n}\n\nh2.bcds-react-aria-Heading {\n font: var(--typography-bold-h2);\n}\n\nh3.bcds-react-aria-Heading {\n font: var(--typography-bold-h3);\n}\n\nh4.bcds-react-aria-Heading {\n font: var(--typography-bold-h4);\n}\n\nh5.bcds-react-aria-Heading {\n font: var(--typography-bold-h5);\n}\n\nh6.bcds-react-aria-Heading {\n font: var(--typography-bold-h6);\n}\n\n/* Text colour */\n.bcds-react-aria-Heading.primary {\n color: var(--typography-color-primary);\n}\n.bcds-react-aria-Heading.primaryInvert {\n color: var(--typography-color-primary-invert);\n}\n.bcds-react-aria-Heading.secondary {\n color: var(--typography-color-secondary);\n}\n.bcds-react-aria-Heading.secondaryInvert {\n color: var(--typography-color-secondary-invert);\n}\n.bcds-react-aria-Heading.disabled {\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Heading.danger {\n color: var(--typography-color-danger);\n}\n";
|
|
16228
|
+
styleInject(css_248z$e);
|
|
16229
|
+
|
|
16230
|
+
function Heading({ color = "primary", isUnstyled = false, ...props }) {
|
|
16231
|
+
return (jsx($5cb03073d3f54797$export$a8a3e93435678ff9, { className: isUnstyled ? undefined : `bcds-react-aria-Heading ${color}`, ...props }));
|
|
16232
|
+
}
|
|
16233
|
+
|
|
16234
|
+
var css_248z$d = ".bcds-Inline-Alert {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: var(--layout-margin-small);\n padding: var(--layout-padding-medium) var(--layout-padding-large);\n}\n\n/* Alert content */\n.bcds-Inline-Alert--container {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n}\n\n.bcds-Inline-Alert--container > .title {\n font: var(--typography-bold-body);\n color: var(--typography-color-primary);\n}\n\n.bcds-Inline-Alert--container > .description {\n font: var(--typography-regular-body);\n color: var(--typography-color-primary);\n}\n\n/* Left icon */\n.bcds-Inline-Alert--icon {\n display: inline-flex;\n align-self: flex-start;\n padding-top: var(--layout-padding-xsmall);\n}\n\n.bcds-Inline-Alert--icon > svg {\n min-width: var(--icons-size-medium);\n height: var(--icons-size-medium);\n}\n\n/* Closeable */\n.bcds-Inline-Alert.closeable {\n /*\n Because the close icon button is removed from the document flow, we\n manually adjust the padding to push the `--container` element off the right\n edge of the InlineAlert.\n */\n padding: var(--layout-padding-medium) 52px var(--layout-padding-medium)\n var(--layout-padding-large);\n}\n\n.bcds-Inline-Alert--closeIcon {\n align-self: first baseline;\n color: var(--icons-color-primary);\n position: relative;\n}\n\n.bcds-Inline-Alert--closeIcon > button {\n position: absolute;\n /*\n Centers the button vertically.\n Button height (32px) minus line-height of text (27px) divided by 2.\n */\n top: -2.5px;\n}\n\n.bcds-Inline-Alert--closeIcon > svg {\n min-width: var(--icons-size-medium);\n height: var(--icons-size-medium);\n}\n\n/* Info variant */\n.bcds-Inline-Alert.info {\n background-color: var(--support-surface-color-info);\n border: var(--layout-border-width-small) solid\n var(--support-border-color-info);\n border-radius: var(--layout-border-radius-medium);\n}\n\n.bcds-Inline-Alert.info > .bcds-Inline-Alert--icon {\n color: var(--icons-color-info);\n}\n\n/* Success variant */\n.bcds-Inline-Alert.success {\n background-color: var(--suport-surface-color-success);\n border: var(--layout-border-width-small) solid\n var(--support-border-color-success);\n border-radius: var(--layout-border-radius-medium);\n}\n\n.bcds-Inline-Alert.success > .bcds-Inline-Alert--icon {\n color: var(--icons-color-success);\n}\n\n/* Warning variant */\n.bcds-Inline-Alert.warning {\n background-color: var(--support-surface-color-warning);\n border: var(--layout-border-width-small) solid\n var(--support-border-color-warning);\n border-radius: var(--layout-border-radius-medium);\n}\n\n.bcds-Inline-Alert.warning > .bcds-Inline-Alert--icon {\n color: var(--icons-color-warning);\n}\n\n/* Danger variant */\n.bcds-Inline-Alert.danger {\n background-color: var(--support-surface-color-danger);\n border: var(--layout-border-width-small) solid\n var(--support-border-color-danger);\n border-radius: var(--layout-border-radius-medium);\n}\n\n.bcds-Inline-Alert.danger > .bcds-Inline-Alert--icon {\n color: var(--icons-color-danger);\n}\n\n/* Button group */\n.bcds-Inline-Alert--container > .bcds-ButtonGroup {\n padding-top: var(--layout-padding-small);\n}\n";
|
|
16235
|
+
styleInject(css_248z$d);
|
|
15411
16236
|
|
|
15412
16237
|
function getIcon(variant) {
|
|
15413
16238
|
switch (variant) {
|
|
@@ -15427,39 +16252,40 @@ function InlineAlert({ variant = "info", title, description, isIconHidden = fals
|
|
|
15427
16252
|
return (jsxs("div", { className: `bcds-Inline-Alert ${variant} ${isCloseable ? "closeable" : null}`, ...props, children: [!isIconHidden && (jsx("span", { className: "bcds-Inline-Alert--icon", children: getIcon(variant) })), jsx("div", { className: "bcds-Inline-Alert--container", role: role, "aria-labelledby": "alert-title", children: children ? (children) : (jsxs(Fragment, { children: [title && (jsx("span", { className: "title", id: "alert-title", children: title })), description && jsx("span", { className: "description", children: description }), buttons && (jsx(ButtonGroup, { alignment: "end", orientation: "horizontal", children: buttons }))] })) }), isCloseable && (jsx("span", { className: "bcds-Inline-Alert--closeIcon", children: jsx(Button, { variant: "tertiary", isIconButton: true, size: "small", "aria-label": "Close this alert", type: "button", onPress: onClose, children: jsx(SvgCloseIcon, {}) }) }))] }));
|
|
15428
16253
|
}
|
|
15429
16254
|
|
|
15430
|
-
var css_248z$
|
|
15431
|
-
styleInject(css_248z$
|
|
16255
|
+
var css_248z$c = ".bcds-react-aria-Link {\n color: var(--typography-color-link);\n text-decoration: underline;\n text-underline-offset: var(--layout-padding-hair);\n cursor: pointer;\n}\n\n/* Icon slots */\n.bcds-react-aria-Link--Icon {\n display: inline-flex;\n flex-direction: row;\n vertical-align: text-bottom;\n margin: var(--layout-margin-none) var(--layout-margin-xsmall);\n}\n\n/* Sizing */\n.bcds-react-aria-Link.small {\n font: var(--typography-regular-small-body);\n}\n\n.bcds-react-aria-Link.medium {\n font: var(--typography-regular-body);\n}\n\n.bcds-react-aria-Link.large {\n font: var(--typography-regular-large-body);\n}\n\n/* Placeholder large button style */\n.bcds-react-aria-Button.large {\n min-height: 40px;\n}\n\n/* Hover */\n.bcds-react-aria-Link[data-hovered] {\n color: var(--surface-color-border-active);\n}\n\n.bcds-react-aria-Link[data-hovered].danger {\n color: var(--surface-color-primary-danger-button-hover);\n}\n\n/* Selected */\n.bcds-react-aria-Link[data-current] {\n color: var(--surface-color-border-active);\n}\n\n/* Focus */\n.bcds-react-aria-Link[data-focus-visible] {\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n border-radius: var(--layout-border-radius-small);\n}\n\n/* Disabled */\n.bcds-react-aria-Link[data-disabled],\n.bcds-react-aria-Link[data-disabled].danger {\n color: var(--typography-color-disabled);\n cursor: not-allowed;\n}\n\n/* Danger */\n.bcds-react-aria-Link.danger {\n color: var(--typography-color-danger);\n}\n";
|
|
16256
|
+
styleInject(css_248z$c);
|
|
16257
|
+
|
|
16258
|
+
function Link({ children, size = "medium", danger = false, isButton = false, buttonVariant = "primary", isUnstyled = false, iconLeft, iconRight, ariaLabel, ...props }) {
|
|
16259
|
+
return (jsxs($4f118338184dc1d9$export$a6c7ac8248d6e38a, { className: !isUnstyled
|
|
16260
|
+
? isButton
|
|
16261
|
+
? `bcds-react-aria-Button ${size} ${buttonVariant} ${danger && "danger"}`
|
|
16262
|
+
: `bcds-react-aria-Link ${size} ${danger && "danger"}`
|
|
16263
|
+
: undefined, "aria-label": ariaLabel, ...props, children: [iconLeft && (jsx("span", { className: "bcds-react-aria-Link--Icon", children: iconLeft })), children, iconRight && (jsx("span", { className: "bcds-react-aria-Link--Icon", children: iconRight }))] }));
|
|
16264
|
+
}
|
|
16265
|
+
|
|
16266
|
+
var css_248z$b = "/* Styles for overlay element */\n.react-aria-ModalOverlay:has(.bcds-react-aria-Modal) {\n position: fixed;\n inset: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: var(--layout-margin-small);\n background: var(--surface-color-overlay-default);\n height: 100vh;\n width: 100vw;\n z-index: 1000;\n}\n.react-aria-ModalOverlay:has(.bcds-react-aria-Modal)[data-entering] {\n animation: modal-fade 200ms;\n}\n.react-aria-ModalOverlay:has(.bcds-react-aria-Modal)[data-exiting] {\n animation: modal-fade 150ms reverse ease-in;\n}\n@media (prefers-reduced-motion) {\n /* Don't animate modal fade in/out if prefers-reduced-motion is on */\n .react-aria-ModalOverlay:has(.bcds-react-aria-Modal)[data-entering] {\n animation: unset;\n }\n .react-aria-ModalOverlay:has(.bcds-react-aria-Modal)[data-exiting] {\n animation: unset;\n }\n}\n\n@keyframes modal-fade {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n/* Styles for content container */\n.bcds-react-aria-Modal {\n box-sizing: border-box;\n max-width: 100vw;\n width: 600px;\n max-height: 100vh;\n min-height: var(--layout-margin-xxxlarge);\n height: auto;\n margin: var(--layout-margin-large);\n border-radius: var(--layout-border-radius-medium);\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-default);\n background: var(--surface-color-forms-default);\n box-shadow: var(--surface-shadow-large);\n}\n";
|
|
16267
|
+
styleInject(css_248z$b);
|
|
15432
16268
|
|
|
15433
16269
|
function Modal({ children, ...props }) {
|
|
15434
16270
|
return (jsx($f3f84453ead64de5$export$2b77a92f1a5ad772, { className: "bcds-react-aria-Modal", ...props, children: children }));
|
|
15435
16271
|
}
|
|
15436
16272
|
|
|
15437
|
-
var css_248z$
|
|
15438
|
-
styleInject(css_248z$
|
|
16273
|
+
var css_248z$a = ".bcds-react-aria-Radio {\n cursor: pointer;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-margin-small);\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n forced-color-adjust: none;\n}\n\n/* Selector */\n.bcds-react-aria-Radio:before {\n align-self: first baseline;\n margin-top: var(--layout-margin-xsmall);\n content: \"\";\n display: block;\n width: var(--icons-size-xsmall);\n height: var(--icons-size-xsmall);\n box-sizing: border-box;\n background-color: var(--surface-color-secondary-default);\n border-radius: var(--icons-size-small);\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-medium);\n transition: all 200ms;\n}\n@media (prefers-reduced-motion) {\n .bcds-react-aria-Radio:before {\n /* No animation on radio button circle if user has reduced motion set */\n transition: none;\n }\n}\n\n/* Hover */\n.bcds-react-aria-Radio[data-hovered]:before {\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-dark);\n}\n\n/* Pressed */\n.bcds-react-aria-Radio[data-pressed]:before {\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-dark);\n}\n\n/* Selected */\n.bcds-react-aria-Radio[data-selected]:before {\n border: 5px solid var(--surface-color-primary-default);\n}\n\n/* Focused */\n.bcds-react-aria-Radio[data-focus-visible]:before {\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n\n/* Invalid */\n.bcds-react-aria-Radio[data-invalid]:before {\n border: var(--layout-border-width-small) solid\n var(--support-border-color-danger);\n}\n.bcds-react-aria-Radio[data-selected][data-invalid] {\n color: var(--typography-color-danger);\n}\n.bcds-react-aria-Radio[data-selected][data-invalid]:before {\n border: 5px solid var(--support-border-color-danger);\n}\n\n/* Disabled */\n.bcds-react-aria-Radio[data-disabled] {\n color: var(--typography-color-disabled);\n cursor: not-allowed;\n}\n.bcds-react-aria-radio[data-selected][data-disabled]:before {\n border: 5px solid var(--surface-color-border-default);\n}\n\n/* Read only */\n.bcds-react-aria-Radio[data-readonly] {\n cursor: not-allowed;\n}\n";
|
|
16274
|
+
styleInject(css_248z$a);
|
|
15439
16275
|
|
|
15440
16276
|
function Radio({ value, children, ...props }) {
|
|
15441
16277
|
return (jsx($b6c3ddc6086f204d$export$d7b12c4107be0d61, { className: "bcds-react-aria-Radio", value: value, ...props, children: children }));
|
|
15442
16278
|
}
|
|
15443
16279
|
|
|
15444
|
-
var css_248z$
|
|
15445
|
-
styleInject(css_248z$
|
|
16280
|
+
var css_248z$9 = ".bcds-react-aria-RadioGroup {\n display: flex;\n flex-direction: column;\n gap: var(--layout-margin-small);\n}\n\n/* Orientation */\n.bcds-react-aria-RadioGroup--options {\n display: inline-flex;\n}\n\n.bcds-react-aria-RadioGroup--options.vertical {\n flex-direction: column;\n gap: var(--layout-margin-small);\n}\n\n.bcds-react-aria-RadioGroup--options.horizontal {\n flex-direction: row;\n gap: var(--layout-margin-medium);\n}\n.bcds-react-aria-RadioGroup--options.horizontal.flex-wrap-nowrap {\n flex-wrap: nowrap;\n}\n.bcds-react-aria-RadioGroup--options.horizontal.flex-wrap-wrap {\n flex-wrap: wrap;\n}\n.bcds-react-aria-RadioGroup--options.horizontal.flex-wrap-nowrap {\n flex-wrap: wrap-reverse;\n}\n\n/* Parts */\n.bcds-react-aria-RadioGroup--label {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-primary);\n}\n\n.bcds-react-aria-RadioGroup--description {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n}\n\n.bcds-react-aria-RadioGroup--error {\n display: inline-flex;\n flex-direction: row;\n gap: var(--layout-margin-xsmall);\n font: var(--typography-regular-small-body);\n color: var(--typography-color-danger);\n}\n";
|
|
16281
|
+
styleInject(css_248z$9);
|
|
15446
16282
|
|
|
15447
16283
|
function RadioGroup({ orientation = "vertical", label, description, children, errorMessage, flexWrap = "nowrap", ...props }) {
|
|
15448
16284
|
return (jsx($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { className: "bcds-react-aria-RadioGroup", ...props, children: ({ isRequired, isInvalid }) => (jsxs(Fragment, { children: [label && (jsxs($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: "bcds-react-aria-RadioGroup--label", children: [label, " ", isRequired && "(required)"] })), jsx("div", { className: `bcds-react-aria-RadioGroup--options ${orientation} flex-wrap-${flexWrap}`, children: children }), description && (jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "bcds-react-aria-RadioGroup--description", children: description })), isInvalid && (jsxs("div", { className: "bcds-react-aria-RadioGroup--error", children: [jsx(SvgExclamationIcon, {}), jsx($ee014567cb39d3f0$export$f551688fc98f2e09, { children: errorMessage })] }))] })) }));
|
|
15449
16285
|
}
|
|
15450
16286
|
|
|
15451
|
-
/*
|
|
15452
|
-
|
|
15453
|
-
return (jsx("svg", { id: id, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M4.21231 13.3146L9.52695 8.2226C9.6939 8.08348 9.86086 8 10.0278 8C10.1948 8 10.3339 8.05565 10.473 8.16695L15.7876 13.259C16.066 13.5372 16.066 13.9546 15.8155 14.2051C15.5651 14.4833 15.1477 14.4833 14.8694 14.2329L10.0278 9.61387L5.13054 14.2885C4.88011 14.539 4.43491 14.539 4.18448 14.2607C3.93405 13.9825 3.93405 13.5651 4.21231 13.3146Z", fill: "currentColor" }) }));
|
|
15454
|
-
}
|
|
15455
|
-
|
|
15456
|
-
/* The component implements the Chevron Down icon from Font Awesome: https://fontawesome.com/icons/chevron-down */
|
|
15457
|
-
function SvgChevronDownIcon({ id = "chevron-down-icon" }) {
|
|
15458
|
-
return (jsx("svg", { id: id, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M15.7882 9.15569L10.4858 14.236C10.3192 14.3748 10.1527 14.4303 10.0139 14.4303C9.84731 14.4303 9.68074 14.3748 9.54194 14.2637L4.21182 9.15569C3.9342 8.90584 3.9342 8.46167 4.18405 8.21182C4.4339 7.9342 4.87808 7.9342 5.12793 8.18405L10.0139 12.8479L14.872 8.18405C15.1219 7.9342 15.5661 7.9342 15.8159 8.21182C16.0658 8.46167 16.0658 8.90584 15.7882 9.15569Z", fill: "currentColor" }) }));
|
|
15459
|
-
}
|
|
15460
|
-
|
|
15461
|
-
var css_248z$7 = ".bcds-react-aria-Select {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n /* Hacks for `stretch`: https://caniuse.com/mdn-css_properties_max-width_stretch */\n max-width: -moz-available;\n max-width: -webkit-fill-available;\n}\n\n/* Label above select input */\n.bcds-react-aria-Select--Label {\n color: var(--typography-color-secondary);\n font: var(--typography-regular-small-body);\n padding: var(--layout-padding-xsmall) var(--layout-padding-none);\n}\n.bcds-react-aria-Select[data-disabled] > .bcds-react-aria-Select--Label {\n color: var(--typography-color-disabled);\n}\n\n/* Text description below select input */\n.bcds-react-aria-Select--Description {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n padding: var(--layout-padding-xsmall) var(--layout-padding-none);\n}\n\n/* Error message */\n.bcds-react-aria-Select--Error {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-danger);\n}\n\n/* Error icon */\n.bcds-react-aria-Select[data-invalid]\n > .bcds-react-aria-Select--Button\n > svg:not(:last-child) {\n color: var(--icons-color-danger);\n}\n\n/* Select input equivalent */\n.bcds-react-aria-Select--Button {\n background-color: var(--surface-color-forms-default);\n border: 1px solid var(--surface-color-border-default);\n border-radius: var(--layout-border-radius-medium);\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n gap: var(--layout-margin-small);\n align-items: center;\n padding: 0 12px;\n max-width: 100%;\n}\n.bcds-react-aria-Select--Button.invalid {\n border-color: var(--support-border-color-danger);\n}\n.bcds-react-aria-Select[data-invalid] > .bcds-react-aria-Select--Button {\n border-color: var(--support-border-color-danger);\n}\n.bcds-react-aria-Select--Button[data-disabled] {\n background-color: var(--surface-color-forms-disabled);\n cursor: not-allowed;\n}\n.bcds-react-aria-Select--Button[data-hovered] {\n border-color: var(--surface-color-border-dark);\n}\n.bcds-react-aria-Select--Button[data-focused] {\n border-color: var(--surface-color-border-active);\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n.bcds-react-aria-Select--Button[data-pressed] {\n border-color: var(--surface-color-border-active);\n}\n.bcds-react-aria-Select--Button.medium {\n height: 40px;\n}\n.bcds-react-aria-Select--Button.small {\n height: 32px;\n}\n.bcds-react-aria-Select--Button > .bcds-react-aria-SelectValue {\n font: var(--typography-regular-body);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n min-width: 0;\n}\n.bcds-react-aria-Select--Button > svg {\n flex-shrink: 0;\n}\n\n/* Dropdown menu panel */\n.bcds-react-aria-Select--Popover {\n background-color: var(--surface-color-forms-default);\n border: 1px solid var(--surface-color-border-default);\n border-radius: var(--layout-border-radius-medium);\n box-shadow: var(--surface-shadow-medium);\n box-sizing: border-box;\n overflow-y: auto;\n padding: var(--layout-padding-hair) var(--layout-padding-xsmall);\n width: var(\n --trigger-width\n ); /* Variable provided by Select component https://react-spectrum.adobe.com/react-aria/Select.html#popover-1 */\n}\n.bcds-react-aria-Select--ListBox[data-focused] {\n outline: none;\n}\n.bcds-react-aria-Select--ListBox > .bcds-react-aria-Section:not(:first-child) {\n border-top: 1px solid var(--surface-color-border-default);\n margin-top: 1px;\n padding-top: 2px;\n}\n\n/* Header label within Section of multi-section Select */\n.bcds-react-aria-Select--Header {\n color: var(--typography-color-secondary);\n font: var(--typography-regular-small-body);\n padding: var(--layout-padding-hair) var(--layout-padding-small);\n}\n\n/* ListBox option item */\n.bcds-react-aria-Select--ListBoxItem {\n border-radius: var(--layout-border-radius-medium);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-margin-small);\n padding: var(--layout-padding-small);\n}\n.bcds-react-aria-Select--ListBoxItem[data-focused],\n.bcds-react-aria-Select--ListBoxItem[data-hovered] {\n background-color: var(--surface-color-secondary-button-hover);\n outline: none;\n}\n.bcds-react-aria-Select--ListBoxItem-icon {\n display: flex;\n align-items: center;\n justify-content: space-around;\n /* This `min-width` rule can cause horizontal overflow on very narrow Select\n instances, but if we leave it out, the icons will shrink instead. */\n min-width: 20px;\n}\n.bcds-react-aria-Select--ListBoxItem-Text-container {\n color: var(--typography-color-primary);\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n}\n.bcds-react-aria-Select--ListBoxItem-Text-label {\n font: var(--typography-regular-body);\n}\n.bcds-react-aria-Select--ListBoxItem.destructive {\n color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Select--ListBoxItem.destructive\n .bcds-react-aria-Select--ListBoxItem-Text-label {\n color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Select--ListBoxItem-Text-description {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n}\n";
|
|
15462
|
-
styleInject(css_248z$7);
|
|
16287
|
+
var css_248z$8 = ".bcds-react-aria-Select {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n /* Hacks for `stretch`: https://caniuse.com/mdn-css_properties_max-width_stretch */\n max-width: -moz-available;\n max-width: -webkit-fill-available;\n}\n\n/* Label above select input */\n.bcds-react-aria-Select--Label {\n color: var(--typography-color-secondary);\n font: var(--typography-regular-small-body);\n padding: var(--layout-padding-xsmall) var(--layout-padding-none);\n}\n.bcds-react-aria-Select[data-disabled] > .bcds-react-aria-Select--Label {\n color: var(--typography-color-disabled);\n}\n\n/* Text description below select input */\n.bcds-react-aria-Select--Description {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n padding: var(--layout-padding-xsmall) var(--layout-padding-none);\n}\n\n/* Error message */\n.bcds-react-aria-Select--Error {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-danger);\n}\n\n/* Error icon */\n.bcds-react-aria-Select[data-invalid]\n > .bcds-react-aria-Select--Button\n > svg:not(:last-child) {\n color: var(--icons-color-danger);\n}\n\n/* Select input equivalent */\n.bcds-react-aria-Select--Button {\n background-color: var(--surface-color-forms-default);\n border: 1px solid var(--surface-color-border-default);\n border-radius: var(--layout-border-radius-medium);\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n gap: var(--layout-margin-small);\n align-items: center;\n padding: 0 12px;\n max-width: 100%;\n}\n.bcds-react-aria-Select--Button.invalid {\n border-color: var(--support-border-color-danger);\n}\n.bcds-react-aria-Select[data-invalid] > .bcds-react-aria-Select--Button {\n border-color: var(--support-border-color-danger);\n}\n.bcds-react-aria-Select--Button[data-disabled] {\n background-color: var(--surface-color-forms-disabled);\n cursor: not-allowed;\n}\n.bcds-react-aria-Select--Button[data-hovered] {\n border-color: var(--surface-color-border-dark);\n}\n.bcds-react-aria-Select--Button[data-focused] {\n border-color: var(--surface-color-border-active);\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n.bcds-react-aria-Select--Button[data-pressed] {\n border-color: var(--surface-color-border-active);\n}\n.bcds-react-aria-Select--Button.medium {\n height: 40px;\n}\n.bcds-react-aria-Select--Button.small {\n height: 32px;\n}\n.bcds-react-aria-Select--Button > .bcds-react-aria-SelectValue {\n font: var(--typography-regular-body);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n min-width: 0;\n}\n.bcds-react-aria-Select--Button > svg {\n flex-shrink: 0;\n}\n\n/* Dropdown menu panel */\n.bcds-react-aria-Select--Popover {\n background-color: var(--surface-color-forms-default);\n border: 1px solid var(--surface-color-border-default);\n border-radius: var(--layout-border-radius-medium);\n box-shadow: var(--surface-shadow-medium);\n box-sizing: border-box;\n overflow-y: auto;\n padding: var(--layout-padding-hair) var(--layout-padding-xsmall);\n width: var(\n --trigger-width\n ); /* Variable provided by Select component https://react-spectrum.adobe.com/react-aria/Select.html#popover-1 */\n}\n.bcds-react-aria-Select--ListBox[data-focused] {\n outline: none;\n}\n.bcds-react-aria-Select--ListBox > .bcds-react-aria-Section:not(:first-child) {\n border-top: 1px solid var(--surface-color-border-default);\n margin-top: 1px;\n padding-top: 2px;\n}\n\n/* Header label within Section of multi-section Select */\n.bcds-react-aria-Select--Header {\n color: var(--typography-color-secondary);\n font: var(--typography-regular-small-body);\n padding: var(--layout-padding-hair) var(--layout-padding-small);\n}\n\n/* ListBox option item */\n.bcds-react-aria-Select--ListBoxItem {\n border-radius: var(--layout-border-radius-medium);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-margin-small);\n padding: var(--layout-padding-small);\n}\n.bcds-react-aria-Select--ListBoxItem[data-focused],\n.bcds-react-aria-Select--ListBoxItem[data-hovered] {\n background-color: var(--surface-color-secondary-button-hover);\n outline: none;\n}\n.bcds-react-aria-Select--ListBoxItem-icon {\n display: flex;\n align-items: center;\n justify-content: space-around;\n /* This `min-width` rule can cause horizontal overflow on very narrow Select\n instances, but if we leave it out, the icons will shrink instead. */\n min-width: 20px;\n}\n.bcds-react-aria-Select--ListBoxItem-Text-container {\n color: var(--typography-color-primary);\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n}\n.bcds-react-aria-Select--ListBoxItem-Text-label {\n font: var(--typography-regular-body);\n}\n.bcds-react-aria-Select--ListBoxItem.destructive {\n color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Select--ListBoxItem.destructive\n .bcds-react-aria-Select--ListBoxItem-Text-label {\n color: var(--surface-color-primary-danger-button-default);\n}\n.bcds-react-aria-Select--ListBoxItem-Text-description {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n}\n";
|
|
16288
|
+
styleInject(css_248z$8);
|
|
15463
16289
|
|
|
15464
16290
|
/** Select displays a collapsible list of options and allows a user to select one of them. */
|
|
15465
16291
|
function Select({ items, sections, label, description, placeholder, size = "medium", errorMessage, ...props }) {
|
|
@@ -15478,7 +16304,7 @@ function Select({ items, sections, label, description, placeholder, size = "medi
|
|
|
15478
16304
|
// support different markup within the same component.
|
|
15479
16305
|
items: sections
|
|
15480
16306
|
? sections
|
|
15481
|
-
: [{ id: "section", header: "", items: items ? items : [] }], children: (section) => (jsxs($
|
|
16307
|
+
: [{ id: "section", header: "", items: items ? items : [] }], children: (section) => (jsxs($eed445e0843c11d0$export$dca12b0bb56e4fc, { id: section.id, className: "bcds-react-aria-Section", children: [section?.header && (jsx($72a5793c14baf454$export$8b251419efc915eb, { className: "bcds-react-aria-Select--Header", children: section.header })), jsx($e1995378a142960e$export$fb8073518f34e6ec, { items: section.items, children: (item) => (jsxs($eed445e0843c11d0$export$a11e76429ed99b4, { id: item?.id ? item.id : item.label, className: `bcds-react-aria-Select--ListBoxItem ${item?.isDestructive ? "destructive" : ""}`, textValue: item.label, children: [item?.iconLeft && (jsx("div", { className: "bcds-react-aria-Select--ListBoxItem-icon", children: item.iconLeft })), jsxs("div", { className: "bcds-react-aria-Select--ListBoxItem-Text-container", children: [jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "label", className: "bcds-react-aria-Select--ListBoxItem-Text-label", children: item.label }), item.description && (jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "bcds-react-aria-Select--ListBoxItem-Text-description", children: item.description }))] }), item?.iconRight && (jsx("div", { className: "bcds-react-aria-Select--ListBoxItem-icon", children: item.iconRight }))] })) })] })) }) })] })) }));
|
|
15482
16308
|
}
|
|
15483
16309
|
|
|
15484
16310
|
function SvgBcOutlineIcon({ id = "bc-outline-icon" }) {
|
|
@@ -15494,27 +16320,34 @@ function SvgTooltipArrowUp({ id = "tooltip-arrow" }) {
|
|
|
15494
16320
|
return (jsx("svg", { id: id, width: "19", height: "9", viewBox: "0 0 19 9", xmlns: "http://www.w3.org/2000/svg", children: jsx("g", { children: jsx("path", { d: "M8.4188 1.41421C9.19985 0.633163 10.4662 0.633165 11.2472 1.41421L18.833 9L0.833008 9L8.4188 1.41421Z", fill: "currentColor" }) }) }));
|
|
15495
16321
|
}
|
|
15496
16322
|
|
|
15497
|
-
var css_248z$
|
|
15498
|
-
styleInject(css_248z$
|
|
16323
|
+
var css_248z$7 = ".bcds-react-aria-Tag {\n color: var(--typography-color-primary);\n cursor: pointer;\n border: var(--layout-border-width-small) solid;\n display: flex;\n align-items: center;\n font: var(--typography-regular-label);\n width: fit-content;\n}\n.bcds-react-aria-Tag .react-aria-Button {\n background: none;\n border: none;\n color: var(--typography-color-primary);\n cursor: pointer;\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n/* Tag colors */\n.bcds-react-aria-Tag.bc-blue {\n background-color: var(--theme-primary-blue);\n border-color: var(--theme-blue-90);\n color: var(--typography-color-primary-invert);\n}\n.bcds-react-aria-Tag.bc-blue .react-aria-Button {\n color: var(--typography-color-primary-invert);\n}\n.bcds-react-aria-Tag.bc-gold {\n background-color: var(--theme-primary-gold);\n border-color: var(--theme-blue-90);\n}\n.bcds-react-aria-Tag.blue {\n background-color: var(--support-surface-color-info);\n border-color: var(--support-border-color-info);\n}\n.bcds-react-aria-Tag.dark {\n background: var(--theme-gray-110);\n border-color: var(--theme-blue-90);\n color: var(--typography-color-primary-invert);\n}\n.bcds-react-aria-Tag.dark .react-aria-Button {\n color: var(--typography-color-primary-invert);\n}\n.bcds-react-aria-Tag.gray,\n.bcds-react-aria-Tag.grey {\n background-color: var(--theme-gray-20);\n border-color: var(--surface-color-border-dark);\n}\n.bcds-react-aria-Tag.green {\n background-color: var(--support-surface-color-success);\n border-color: var(--support-border-color-success);\n}\n.bcds-react-aria-Tag.red {\n background-color: var(--support-surface-color-danger);\n border-color: var(--support-border-color-danger);\n}\n.bcds-react-aria-Tag.yellow {\n background-color: var(--support-surface-color-warning);\n border-color: var(--support-border-color-warning);\n}\n\n/* Tag style */\n.bcds-react-aria-Tag.rectangular {\n border-radius: var(--layout-border-radius-small);\n}\n.bcds-react-aria-Tag.circular {\n border-radius: var(--layout-borderRadius-Circular, 9999px);\n}\n\n/* Tag size */\n.bcds-react-aria-Tag.medium {\n height: var(--layout-padding-xlarge);\n padding: var(--layout-padding-hair) var(--layout-padding-medium);\n gap: var(--layout-margin-medium);\n}\n.bcds-react-aria-Tag.small {\n height: var(--layout-padding-large);\n padding: var(--layout-padding-hair) var(--layout-padding-small);\n gap: var(--layout-margin-small);\n}\n\n/* Selected */\n.bcds-react-aria-Tag[data-selected] {\n border-radius: var(--layout-border-radius-small);\n border: var(--layout-border-width-medium) solid\n var(--surface-color-border-active);\n}\n\n/* Focused */\n.bcds-react-aria-Tag[data-focused] {\n outline: var(--layout-border-width-medium) solid\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n\n/* Disabled */\n.bcds-react-aria-Tag[data-disabled] {\n background-color: var(--surface-color-primary-button-disabled);\n border-color: var(--surface-color-border-default);\n color: var(--typography-color-disabled);\n cursor: not-allowed;\n}\n";
|
|
16324
|
+
styleInject(css_248z$7);
|
|
15499
16325
|
|
|
15500
16326
|
function Tag({ color = "blue", tagStyle = "rectangular", size = "small", icon, id, textValue, }) {
|
|
15501
16327
|
return (jsx($eaf9e70818b436db$export$3288d34c523a1192, { className: `bcds-react-aria-Tag ${color} ${tagStyle} ${size}`, id: id, textValue: textValue, children: ({ allowsRemoving, isDisabled }) => (jsxs(Fragment, { children: [icon, textValue, !isDisabled && allowsRemoving && (jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { "aria-label": `Remove ${textValue}`, slot: "remove", children: jsx("svg", { width: "14", height: "15", viewBox: "0 0 14 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("g", { id: "Icons / Close", children: jsx("path", { id: "Vector", d: "M12.6004 3.03239L11.4684 1.90039L7.00039 6.36839L2.53239 1.90039L1.40039 3.03239L5.86839 7.50039L1.40039 11.9684L2.53239 13.1004L7.00039 8.63239L11.4684 13.1004L12.6004 11.9684L8.13239 7.50039L12.6004 3.03239Z", fill: "currentColor" }) }) }) }))] })) }));
|
|
15502
16328
|
}
|
|
15503
16329
|
|
|
15504
|
-
var css_248z$
|
|
15505
|
-
styleInject(css_248z$
|
|
16330
|
+
var css_248z$6 = ".bcds-react-aria-TagGroup {\n color: var(--typography-color-primary);\n font: var(--typography-regular-small-body);\n}\n\n.bcds-react-aria-TagGroup--Label,\n.bcds-react-aria-TagGroup--Text-description,\n.bcds-react-aria-TagGroup--Text-error {\n display: block;\n padding: var(--layout-padding-xsmall) var(--layout-padding-none);\n}\n\n.bcds-react-aria-TagGroup--Text-error {\n display: flex;\n color: var(--typography-color-danger);\n}\n\n.bcds-react-aria-TagGroup--Text-error > svg {\n padding-right: var(--layout-padding-xsmall);\n color: var(--icons-color-danger);\n min-width: var(--icons-size-medium);\n height: var(--icons-size-medium);\n}\n";
|
|
16331
|
+
styleInject(css_248z$6);
|
|
15506
16332
|
|
|
15507
16333
|
function TagGroup({ children, label, description, errorMessage, ...props }) {
|
|
15508
16334
|
return (jsxs($eaf9e70818b436db$export$67ea30858aaf75e3, { className: "bcds-react-aria-TagGroup", ...props, children: [label && (jsx($01b77f81d0f07f68$export$b04be29aa201d4f5, { className: "bcds-react-aria-TagGroup--Label", children: label })), children, description && (jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "description", className: "bcds-react-aria-TagGroup--Text-description", children: description })), errorMessage && (jsxs($514c0188e459b4c0$export$5f1af8db9871e1d6, { slot: "errorMessage", className: "bcds-react-aria-TagGroup--Text-error", children: [jsx(SvgExclamationIcon, {}), errorMessage] }))] }));
|
|
15509
16335
|
}
|
|
15510
16336
|
|
|
15511
|
-
var css_248z$
|
|
15512
|
-
styleInject(css_248z$
|
|
16337
|
+
var css_248z$5 = ".bcds-react-aria-TagList {\n display: flex;\n flex-wrap: wrap;\n gap: var(--layout-padding-small);\n width: fit-content;\n}\n\n.bcds-react-aria-TagList.horizontal {\n flex-direction: row;\n}\n\n.bcds-react-aria-TagList.vertical {\n flex-direction: column;\n}\n";
|
|
16338
|
+
styleInject(css_248z$5);
|
|
15513
16339
|
|
|
15514
16340
|
function TagList({ items, orientation = "horizontal", renderEmptyState, ...props }) {
|
|
15515
16341
|
return (jsx($eaf9e70818b436db$export$f9fef0f55402315b, { className: `bcds-react-aria-TagList ${orientation}`, ...props, renderEmptyState: renderEmptyState, items: items, children: (item) => createElement(Tag, { ...item, key: item.id }) }));
|
|
15516
16342
|
}
|
|
15517
16343
|
|
|
16344
|
+
var css_248z$4 = "/* Medium size (default) */\n.bcds-react-aria-Text.medium {\n font: var(--typography-regular-body);\n}\n\n.bcds-react-aria-Text.medium b,\n.bcds-react-aria-Text.medium strong {\n font: var(--typography-bold-body);\n}\n\n.bcds-react-aria-Text.medium i,\n.bcds-react-aria-Text.medium em {\n font: var(--typography-italic-body);\n}\n\n/* Small size */\n.bcds-react-aria-Text.small {\n font: var(--typography-regular-small-body);\n}\n\n.bcds-react-aria-Text.small b,\n.bcds-react-aria-Text.small strong {\n font: var(--typography-bold-small-body);\n}\n\n.bcds-react-aria-Text.small i,\n.bcds-react-aria-Text.small em {\n font: var(--typography-italic-small-body);\n}\n\n/* Large size */\n.bcds-react-aria-Text.large {\n font: var(--typography-regular-large-body);\n}\n\n.bcds-react-aria-Text.large b,\n.bcds-react-aria-Text.large strong {\n font: var(--typography-bold-large-body);\n}\n\n.bcds-react-aria-Text.large i,\n.bcds-react-aria-Text.large em {\n font: var(--typography-italic-large-body);\n}\n\n/* Text color */\n.bcds-react-aria-Text.primary {\n color: var(--typography-color-primary);\n}\n.bcds-react-aria-Text.primaryInvert {\n color: var(--typography-color-primary-invert);\n}\n.bcds-react-aria-Text.secondary {\n color: var(--typography-color-secondary);\n}\n.bcds-react-aria-Text.secondaryInvert {\n color: var(--typography-color-secondary-invert);\n}\n.bcds-react-aria-Text.disabled {\n color: var(--typography-color-disabled);\n}\n.bcds-react-aria-Text.danger {\n color: var(--typography-color-danger);\n}\n";
|
|
16345
|
+
styleInject(css_248z$4);
|
|
16346
|
+
|
|
16347
|
+
function Text({ elementType = "span", size = "medium", color = "primary", isUnstyled = false, ...props }) {
|
|
16348
|
+
return (jsx($514c0188e459b4c0$export$5f1af8db9871e1d6, { elementType: elementType, className: isUnstyled ? undefined : `bcds-react-aria-Text ${size} ${color}`, ...props, children: props.children }));
|
|
16349
|
+
}
|
|
16350
|
+
|
|
15518
16351
|
var css_248z$3 = ".bcds-react-aria-TextArea {\n display: inline-flex;\n flex-direction: column;\n /* Hacks for `stretch`: https://caniuse.com/mdn-css_properties_max-width_stretch */\n align-self: stretch;\n max-width: -moz-available;\n max-width: -webkit-fill-available;\n}\n\n/* Styles for the text label above the input field */\n.bcds-react-aria-TextArea--Label {\n font: var(--typography-regular-small-body);\n color: var(--typography-color-primary);\n padding: var(--layout-padding-xsmall) var(--layout-padding-none);\n}\n\n/* Styles for the description and character count slot below the input field */\n.bcds-react-aria-TextArea--Description {\n display: grid;\n gap: var(--layout-margin-medium);\n padding: var(--layout-padding-xsmall) var(--layout-padding-none);\n font: var(--typography-regular-small-body);\n color: var(--typography-color-secondary);\n}\n\n/* Description label */\n.bcds-react-aria-TextArea--Description > .text {\n justify-self: flex-start;\n grid-row: 1;\n}\n\n/* Character counter */\n.bcds-react-aria-TextArea--Description > .counter {\n justify-self: flex-end;\n grid-row: 1;\n}\n\n/* Styles for the input field container */\n.bcds-react-aria-TextArea--Container {\n color: var(--typography-color-primary);\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--layout-margin-small);\n background: var(--surface-color-forms-default);\n box-sizing: border-box;\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-default);\n border-radius: var(--layout-border-radius-medium);\n padding: var(--layout-padding-small) 12px;\n}\n\n/* Text input field */\n.bcds-react-aria-TextArea--Input {\n font: var(--typography-regular-body);\n padding: var(--layout-padding-none);\n color: var(--typography-color-primary);\n border: none;\n flex-grow: 1;\n}\n\n.bcds-rect-aria-TextArea--Input::placeholder {\n color: var(--typography-color-placeholder);\n}\n\n/* Hover and focus states */\n.bcds-react-aria-TextArea--Container\n > .bcds-react-aria-TextArea--Input[data-focused] {\n outline: none;\n}\n\n.bcds-react-aria-TextArea--Container:focus-within {\n border-radius: var(--layout-border-radius-large);\n border: var(--layout-border-width-small) solid\n var(--surface-color-border-active);\n outline: solid var(--layout-border-width-medium)\n var(--surface-color-border-active);\n outline-offset: var(--layout-margin-hair);\n}\n\n.bcds-react-aria-TextArea--Container:hover {\n border-color: var(--surface-color-border-dark);\n}\n\n/* Disabled and invalid states */\n.bcds-react-aria-TextArea[data-disabled]\n > .bcds-react-aria-TextArea--Container {\n background: var(--surface-color-forms-disabled);\n cursor: not-allowed;\n}\n\n.bcds-react-aria-TextArea--Input[data-disabled] {\n cursor: not-allowed;\n}\n\n.bcds-react-aria-TextArea[data-invalid] > .bcds-react-aria-TextArea--Container {\n border-radius: var(--layout-border-radius-medium);\n border: var(--layout-border-width-small) solid\n var(--support-border-color-danger);\n background: var(--surface-color-forms-default);\n}\n\n.bcds-react-aria-TextArea[data-readonly]\n > .bcds-react-aria-TextArea--Container {\n background: var(--surface-color-forms-disabled);\n}\n\n.bcds-react-aria-TextArea[data-readonly]\n > .bcds-react-aria-TextArea--Container\n > .bcds-react-aria-TextArea--Input {\n background: var(--surface-color-forms-disabled);\n}\n\n/* Styles for the error message slot */\n.bcds-react-aria-TextArea--Error {\n display: flex;\n font: var(--typography-regular-small-body);\n color: var(--typography-color-danger);\n}\n\n.bcds-react-aria-TextArea--Error > svg {\n padding-right: var(--layout-padding-xsmall);\n color: var(--icons-color-danger);\n width: var(--icons-size-medium);\n height: var(--icons-size-medium);\n}\n";
|
|
15519
16352
|
styleInject(css_248z$3);
|
|
15520
16353
|
|
|
@@ -15550,5 +16383,5 @@ function Tooltip(props) {
|
|
|
15550
16383
|
return (jsxs($4e3b923658d69c60$export$28c660c63b792dea, { className: "bcds-react-aria-Tooltip", ...props, children: [jsx($44f671af83e7d9e0$export$746d02f47f4d381, { className: "bcds-react-aria-OverlayArrow", children: jsx(SvgTooltipArrowUp, {}) }), jsx(Fragment, { children: props.children })] }));
|
|
15551
16384
|
}
|
|
15552
16385
|
|
|
15553
|
-
export { AlertBanner, AlertDialog, Button, ButtonGroup, Callout, Checkbox, CheckboxGroup, Dialog, $de32f1b87079253c$export$2e1e1122cf0cba88 as DialogTrigger, Footer, FooterLinks, Form, Header, InlineAlert, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, TextArea, TextField, Tooltip, $4e3b923658d69c60$export$8c610744efcf8a1d as TooltipTrigger };
|
|
16386
|
+
export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Callout, Checkbox, CheckboxGroup, Dialog, $de32f1b87079253c$export$2e1e1122cf0cba88 as DialogTrigger, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, Tooltip, $4e3b923658d69c60$export$8c610744efcf8a1d as TooltipTrigger };
|
|
15554
16387
|
//# sourceMappingURL=index.js.map
|