@bcgov/design-system-react-components 0.3.1 → 0.4.0-pr504
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1494 -778
- 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/AlertBanner/AlertBanner.d.ts +10 -0
- package/dist/cjs/types/components/AlertBanner/index.d.ts +2 -0
- package/dist/cjs/types/components/Callout/Callout.d.ts +10 -0
- package/dist/cjs/types/components/Callout/index.d.ts +2 -0
- package/dist/cjs/types/components/Icons/SvgBcOutlineIcon/SvgBcOutlineIcon.d.ts +3 -0
- package/dist/cjs/types/components/Icons/SvgBcOutlineIcon/index.d.ts +1 -0
- package/dist/cjs/types/components/Icons/SvgBetaIcon/SvgBetaIcon.d.ts +3 -0
- package/dist/cjs/types/components/Icons/SvgBetaIcon/index.d.ts +1 -0
- package/dist/cjs/types/components/Tag/Tag.d.ts +9 -1
- package/dist/cjs/types/components/index.d.ts +6 -0
- package/dist/esm/index.js +1489 -779
- 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/AlertBanner/AlertBanner.d.ts +10 -0
- package/dist/esm/types/components/AlertBanner/index.d.ts +2 -0
- package/dist/esm/types/components/Callout/Callout.d.ts +10 -0
- package/dist/esm/types/components/Callout/index.d.ts +2 -0
- package/dist/esm/types/components/Icons/SvgBcOutlineIcon/SvgBcOutlineIcon.d.ts +3 -0
- package/dist/esm/types/components/Icons/SvgBcOutlineIcon/index.d.ts +1 -0
- package/dist/esm/types/components/Icons/SvgBetaIcon/SvgBetaIcon.d.ts +3 -0
- package/dist/esm/types/components/Icons/SvgBetaIcon/index.d.ts +1 -0
- package/dist/esm/types/components/Tag/Tag.d.ts +9 -1
- package/dist/esm/types/components/index.d.ts +6 -0
- package/dist/index.d.ts +50 -3
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -29,8 +29,8 @@ function styleInject(css, ref) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var css_248z$k = "/**\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$
|
|
32
|
+
var css_248z$o = "/**\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$o);
|
|
34
34
|
|
|
35
35
|
/*
|
|
36
36
|
* Copyright 2024 Adobe. All rights reserved.
|
|
@@ -387,11 +387,8 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
|
|
|
387
387
|
setAttributeNS() {}
|
|
388
388
|
removeAttribute() {}
|
|
389
389
|
constructor(type, ownerDocument){
|
|
390
|
-
super(ownerDocument)
|
|
391
|
-
this.
|
|
392
|
-
;
|
|
393
|
-
this._index = 0;
|
|
394
|
-
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;
|
|
395
392
|
this.node = new ($23b9f4fcf0fe224b$export$d68d59712b04d9d1)(type, `react-aria-${++ownerDocument.nodeId}`);
|
|
396
393
|
// Start a transaction so that no updates are emitted from the collection
|
|
397
394
|
// until the props for this node are set. We don't know the real id for the
|
|
@@ -487,18 +484,8 @@ class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export
|
|
|
487
484
|
}
|
|
488
485
|
constructor(collection){
|
|
489
486
|
// @ts-ignore
|
|
490
|
-
super(null)
|
|
491
|
-
this.
|
|
492
|
-
;
|
|
493
|
-
this.ownerDocument = this;
|
|
494
|
-
this.dirtyNodes = new Set();
|
|
495
|
-
this.isSSR = false;
|
|
496
|
-
this.nodeId = 0;
|
|
497
|
-
this.nodesByProps = new WeakMap();
|
|
498
|
-
this.isMounted = true;
|
|
499
|
-
this.mutatedNodes = new Set();
|
|
500
|
-
this.subscriptions = new Set();
|
|
501
|
-
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;
|
|
502
489
|
this.collection = collection;
|
|
503
490
|
this.collectionMutated = true;
|
|
504
491
|
}
|
|
@@ -530,9 +517,7 @@ function $e948873055cbafe4$export$727c8fc270210f13(props) {
|
|
|
530
517
|
var _rendered_props_id, _ref;
|
|
531
518
|
// @ts-ignore
|
|
532
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;
|
|
533
|
-
// eslint-disable-next-line max-depth
|
|
534
520
|
if (key == null) throw new Error('Could not determine key for item');
|
|
535
|
-
// eslint-disable-next-line max-depth
|
|
536
521
|
if (idScope) key = idScope + ':' + key;
|
|
537
522
|
// Note: only works if wrapped Item passes through id...
|
|
538
523
|
rendered = (cloneElement)(rendered, addIdAndValue ? {
|
|
@@ -632,7 +617,6 @@ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
|
632
617
|
return defaultId || `${prefix}-${counter}`;
|
|
633
618
|
}
|
|
634
619
|
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
|
|
635
|
-
// @ts-ignore
|
|
636
620
|
let id = ($dbSRa$react).useId();
|
|
637
621
|
let [didSSR] = (useState)($b5e257d569688ac6$export$535bd6ca7f90a273());
|
|
638
622
|
let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
|
|
@@ -827,7 +811,16 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
|
827
811
|
let updateValue = (useCallback)((val)=>{
|
|
828
812
|
nextId.current = val;
|
|
829
813
|
}, []);
|
|
830
|
-
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
|
+
}
|
|
831
824
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
832
825
|
let r = res;
|
|
833
826
|
return ()=>{
|
|
@@ -849,14 +842,14 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
|
849
842
|
}
|
|
850
843
|
function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
|
|
851
844
|
if (idA === idB) return idA;
|
|
852
|
-
let
|
|
853
|
-
if (
|
|
854
|
-
|
|
845
|
+
let setIdsA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);
|
|
846
|
+
if (setIdsA) {
|
|
847
|
+
setIdsA.forEach((fn)=>fn(idB));
|
|
855
848
|
return idB;
|
|
856
849
|
}
|
|
857
|
-
let
|
|
858
|
-
if (
|
|
859
|
-
|
|
850
|
+
let setIdsB = $bdb11010cef70236$var$idsUpdaterMap.get(idB);
|
|
851
|
+
if (setIdsB) {
|
|
852
|
+
setIdsB.forEach((fn)=>fn(idA));
|
|
860
853
|
return idA;
|
|
861
854
|
}
|
|
862
855
|
return idB;
|
|
@@ -1035,7 +1028,7 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
|
1035
1028
|
return true;
|
|
1036
1029
|
}
|
|
1037
1030
|
});
|
|
1038
|
-
} catch
|
|
1031
|
+
} catch {
|
|
1039
1032
|
// Ignore
|
|
1040
1033
|
}
|
|
1041
1034
|
}
|
|
@@ -1197,8 +1190,10 @@ function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
|
|
|
1197
1190
|
}
|
|
1198
1191
|
function $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(props) {
|
|
1199
1192
|
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
1193
|
+
var _props_href;
|
|
1194
|
+
const href = router.useHref((_props_href = props.href) !== null && _props_href !== void 0 ? _props_href : '');
|
|
1200
1195
|
return {
|
|
1201
|
-
'data-href': props.href ?
|
|
1196
|
+
'data-href': props.href ? href : undefined,
|
|
1202
1197
|
'data-target': props.target,
|
|
1203
1198
|
'data-rel': props.rel,
|
|
1204
1199
|
'data-download': props.download,
|
|
@@ -1208,8 +1203,10 @@ function $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(props) {
|
|
|
1208
1203
|
}
|
|
1209
1204
|
function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
|
|
1210
1205
|
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
1206
|
+
var _props_href;
|
|
1207
|
+
const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : '');
|
|
1211
1208
|
return {
|
|
1212
|
-
href: (props === null || props === void 0 ? void 0 : props.href) ?
|
|
1209
|
+
href: (props === null || props === void 0 ? void 0 : props.href) ? href : undefined,
|
|
1213
1210
|
target: props === null || props === void 0 ? void 0 : props.target,
|
|
1214
1211
|
rel: props === null || props === void 0 ? void 0 : props.rel,
|
|
1215
1212
|
download: props === null || props === void 0 ? void 0 : props.download,
|
|
@@ -1332,7 +1329,6 @@ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
|
|
|
1332
1329
|
}, [
|
|
1333
1330
|
removeGlobalListener
|
|
1334
1331
|
]);
|
|
1335
|
-
// eslint-disable-next-line arrow-body-style
|
|
1336
1332
|
(useEffect)(()=>{
|
|
1337
1333
|
return removeAllGlobalListeners;
|
|
1338
1334
|
}, [
|
|
@@ -1499,6 +1495,7 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
|
1499
1495
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1500
1496
|
* governing permissions and limitations under the License.
|
|
1501
1497
|
*/ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
1498
|
+
if (!node) return false;
|
|
1502
1499
|
let style = window.getComputedStyle(node);
|
|
1503
1500
|
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
1504
1501
|
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
@@ -1555,7 +1552,6 @@ function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
|
|
|
1555
1552
|
* governing permissions and limitations under the License.
|
|
1556
1553
|
*/
|
|
1557
1554
|
|
|
1558
|
-
// @ts-ignore
|
|
1559
1555
|
let $5df64b3807dc15ee$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
1560
1556
|
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
1561
1557
|
let isSSR = ($b5e257d569688ac6$export$535bd6ca7f90a273)();
|
|
@@ -1720,7 +1716,7 @@ function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
|
|
|
1720
1716
|
return sum;
|
|
1721
1717
|
}
|
|
1722
1718
|
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
1723
|
-
if (document.contains(targetElement)) {
|
|
1719
|
+
if (targetElement && document.contains(targetElement)) {
|
|
1724
1720
|
let root = document.scrollingElement || document.documentElement;
|
|
1725
1721
|
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
|
|
1726
1722
|
// 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
|
|
@@ -2397,10 +2393,6 @@ function $e1995378a142960e$var$CollectionRoot({ children: children }) {
|
|
|
2397
2393
|
*/
|
|
2398
2394
|
|
|
2399
2395
|
const $7135fc7d473fd974$export$d40e14dec8b060a8 = /*#__PURE__*/ (createContext)(null);
|
|
2400
|
-
const $7135fc7d473fd974$export$6e2c8f0811a474ce = /*#__PURE__*/ ($e1995378a142960e$export$e953bb1cd0f19726)('section', (props, ref, section)=>{
|
|
2401
|
-
let { render: render } = (useContext)($7135fc7d473fd974$export$d40e14dec8b060a8);
|
|
2402
|
-
return render(props, ref, section);
|
|
2403
|
-
});
|
|
2404
2396
|
const $7135fc7d473fd974$export$a164736487e3f0ae = {
|
|
2405
2397
|
CollectionRoot ({ collection: collection, renderDropIndicator: renderDropIndicator }) {
|
|
2406
2398
|
return $7135fc7d473fd974$var$useCollectionRender(collection, null, renderDropIndicator);
|
|
@@ -2659,7 +2651,6 @@ let $14c0b72509d70225$var$modifiedElementMap = new WeakMap();
|
|
|
2659
2651
|
function $14c0b72509d70225$export$16a4697467175487(target) {
|
|
2660
2652
|
if (($c87311424ea30a05$export$fedb369cb70207f1)()) {
|
|
2661
2653
|
if ($14c0b72509d70225$var$state === 'default') {
|
|
2662
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2663
2654
|
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(target);
|
|
2664
2655
|
$14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
|
|
2665
2656
|
documentObject.documentElement.style.webkitUserSelect = 'none';
|
|
@@ -2686,7 +2677,6 @@ function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
|
|
|
2686
2677
|
($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
|
|
2687
2678
|
// Avoid race conditions
|
|
2688
2679
|
if ($14c0b72509d70225$var$state === 'restoring') {
|
|
2689
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2690
2680
|
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(target);
|
|
2691
2681
|
if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';
|
|
2692
2682
|
$14c0b72509d70225$var$savedUserSelect = '';
|
|
@@ -3025,7 +3015,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3025
3015
|
}
|
|
3026
3016
|
// Due to browser inconsistencies, especially on mobile browsers, we prevent
|
|
3027
3017
|
// default on pointer down and handle focusing the pressable element ourselves.
|
|
3028
|
-
if ($f6c31cce2adf654f$var$
|
|
3018
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget)) e.preventDefault();
|
|
3029
3019
|
state.pointerType = e.pointerType;
|
|
3030
3020
|
let shouldStopPropagation = true;
|
|
3031
3021
|
if (!state.isPressed) {
|
|
@@ -3048,7 +3038,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3048
3038
|
// Chrome and Firefox on touch Windows devices require mouse down events
|
|
3049
3039
|
// to be canceled in addition to pointer events, or an extra asynchronous
|
|
3050
3040
|
// focus event will be fired.
|
|
3051
|
-
if ($f6c31cce2adf654f$var$
|
|
3041
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget)) e.preventDefault();
|
|
3052
3042
|
e.stopPropagation();
|
|
3053
3043
|
}
|
|
3054
3044
|
};
|
|
@@ -3086,8 +3076,23 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3086
3076
|
state.pointerType = null;
|
|
3087
3077
|
removeAllGlobalListeners();
|
|
3088
3078
|
if (!allowTextSelectionOnPress) ($14c0b72509d70225$export$b0d6fa1ab32e3295)(state.target);
|
|
3079
|
+
// Prevent subsequent touchend event from triggering onClick on unrelated elements on Android. See below.
|
|
3080
|
+
// Both 'touch' and 'pen' pointerTypes trigger onTouchEnd, but 'mouse' does not.
|
|
3081
|
+
if ('ontouchend' in state.target && e.pointerType !== 'mouse') addGlobalListener(state.target, 'touchend', onTouchEnd, {
|
|
3082
|
+
once: true
|
|
3083
|
+
});
|
|
3089
3084
|
}
|
|
3090
3085
|
};
|
|
3086
|
+
// This is a workaround for an Android Chrome/Firefox issue where click events are fired on an incorrect element
|
|
3087
|
+
// if the original target is removed during onPointerUp (before onClick).
|
|
3088
|
+
// https://github.com/adobe/react-spectrum/issues/1513
|
|
3089
|
+
// https://issues.chromium.org/issues/40732224
|
|
3090
|
+
// Note: this event must be registered directly on the element, not via React props in order to work.
|
|
3091
|
+
// https://github.com/facebook/react/issues/9809
|
|
3092
|
+
let onTouchEnd = (e)=>{
|
|
3093
|
+
// Don't preventDefault if we actually want the default (e.g. submit/link click).
|
|
3094
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultUp(e.currentTarget)) e.preventDefault();
|
|
3095
|
+
};
|
|
3091
3096
|
let onPointerCancel = (e)=>{
|
|
3092
3097
|
cancel(e);
|
|
3093
3098
|
};
|
|
@@ -3102,7 +3107,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3102
3107
|
if (e.button !== 0 || !e.currentTarget.contains(e.target)) return;
|
|
3103
3108
|
// Due to browser inconsistencies, especially on mobile browsers, we prevent
|
|
3104
3109
|
// default on mouse down and handle focusing the pressable element ourselves.
|
|
3105
|
-
if ($f6c31cce2adf654f$var$
|
|
3110
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultDown(e.currentTarget)) e.preventDefault();
|
|
3106
3111
|
if (state.ignoreEmulatedMouseEvents) {
|
|
3107
3112
|
e.stopPropagation();
|
|
3108
3113
|
return;
|
|
@@ -3243,7 +3248,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
3243
3248
|
triggerPressUp
|
|
3244
3249
|
]);
|
|
3245
3250
|
// Remove user-select: none in case component unmounts immediately after pressStart
|
|
3246
|
-
// eslint-disable-next-line arrow-body-style
|
|
3247
3251
|
(useEffect)(()=>{
|
|
3248
3252
|
return ()=>{
|
|
3249
3253
|
var _ref_current_target;
|
|
@@ -3339,16 +3343,20 @@ function $f6c31cce2adf654f$var$isOverTarget(point, target) {
|
|
|
3339
3343
|
let pointRect = $f6c31cce2adf654f$var$getPointClientRect(point);
|
|
3340
3344
|
return $f6c31cce2adf654f$var$areRectanglesOverlapping(rect, pointRect);
|
|
3341
3345
|
}
|
|
3342
|
-
function $f6c31cce2adf654f$var$
|
|
3346
|
+
function $f6c31cce2adf654f$var$shouldPreventDefaultDown(target) {
|
|
3343
3347
|
// We cannot prevent default if the target is a draggable element.
|
|
3344
3348
|
return !(target instanceof HTMLElement) || !target.hasAttribute('draggable');
|
|
3345
3349
|
}
|
|
3346
|
-
function $f6c31cce2adf654f$var$
|
|
3347
|
-
if (target instanceof HTMLInputElement) return
|
|
3350
|
+
function $f6c31cce2adf654f$var$shouldPreventDefaultUp(target) {
|
|
3351
|
+
if (target instanceof HTMLInputElement) return false;
|
|
3348
3352
|
if (target instanceof HTMLButtonElement) return target.type !== 'submit' && target.type !== 'reset';
|
|
3349
3353
|
if ($f6c31cce2adf654f$var$isHTMLAnchorLink(target)) return false;
|
|
3350
3354
|
return true;
|
|
3351
3355
|
}
|
|
3356
|
+
function $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(target, key) {
|
|
3357
|
+
if (target instanceof HTMLInputElement) return !$f6c31cce2adf654f$var$isValidInputKey(target, key);
|
|
3358
|
+
return $f6c31cce2adf654f$var$shouldPreventDefaultUp(target);
|
|
3359
|
+
}
|
|
3352
3360
|
const $f6c31cce2adf654f$var$nonTextInputTypes = new Set([
|
|
3353
3361
|
'checkbox',
|
|
3354
3362
|
'radio',
|
|
@@ -3458,7 +3466,6 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
3458
3466
|
observer: null
|
|
3459
3467
|
});
|
|
3460
3468
|
// Clean up MutationObserver on unmount. See below.
|
|
3461
|
-
// eslint-disable-next-line arrow-body-style
|
|
3462
3469
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
3463
3470
|
const state = stateRef.current;
|
|
3464
3471
|
return ()=>{
|
|
@@ -4556,7 +4563,6 @@ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
|
|
|
4556
4563
|
contain
|
|
4557
4564
|
]);
|
|
4558
4565
|
// This is a useLayoutEffect so it is guaranteed to run before our async synthetic blur
|
|
4559
|
-
// eslint-disable-next-line arrow-body-style
|
|
4560
4566
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
4561
4567
|
return ()=>{
|
|
4562
4568
|
if (raf.current) cancelAnimationFrame(raf.current);
|
|
@@ -4598,12 +4604,12 @@ function $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {
|
|
|
4598
4604
|
function $9bf71ea28793e738$var$focusElement(element, scroll = false) {
|
|
4599
4605
|
if (element != null && !scroll) try {
|
|
4600
4606
|
(0, $6a99195332edec8b$export$80f3e147d781571c)(element);
|
|
4601
|
-
} catch
|
|
4607
|
+
} catch {
|
|
4602
4608
|
// ignore
|
|
4603
4609
|
}
|
|
4604
4610
|
else if (element != null) try {
|
|
4605
4611
|
element.focus();
|
|
4606
|
-
} catch
|
|
4612
|
+
} catch {
|
|
4607
4613
|
// ignore
|
|
4608
4614
|
}
|
|
4609
4615
|
}
|
|
@@ -4710,7 +4716,7 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
|
|
|
4710
4716
|
let onKeyDown = (e)=>{
|
|
4711
4717
|
if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
|
|
4712
4718
|
let focusedElement = ownerDocument.activeElement;
|
|
4713
|
-
if (!$9bf71ea28793e738$var$
|
|
4719
|
+
if (!$9bf71ea28793e738$var$isElementInChildScope(focusedElement, scopeRef) || !$9bf71ea28793e738$var$shouldRestoreFocus(scopeRef)) return;
|
|
4714
4720
|
let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
|
|
4715
4721
|
if (!treeNode) return;
|
|
4716
4722
|
let nodeToRestore = treeNode.nodeToRestore;
|
|
@@ -4727,11 +4733,11 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
|
|
|
4727
4733
|
}
|
|
4728
4734
|
// If there is no next element, or it is outside the current scope, move focus to the
|
|
4729
4735
|
// next element after the node to restore to instead.
|
|
4730
|
-
if ((!nextElement || !$9bf71ea28793e738$var$
|
|
4736
|
+
if ((!nextElement || !$9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) {
|
|
4731
4737
|
walker.currentNode = nodeToRestore;
|
|
4732
4738
|
// Skip over elements within the scope, in case the scope immediately follows the node to restore.
|
|
4733
4739
|
do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
|
|
4734
|
-
while ($9bf71ea28793e738$var$
|
|
4740
|
+
while ($9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef));
|
|
4735
4741
|
e.preventDefault();
|
|
4736
4742
|
e.stopPropagation();
|
|
4737
4743
|
if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
|
|
@@ -4764,8 +4770,7 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
|
|
|
4764
4770
|
if (!treeNode) return;
|
|
4765
4771
|
let nodeToRestore = treeNode.nodeToRestore;
|
|
4766
4772
|
// if we already lost focus to the body and this was the active scope, then we should attempt to restore
|
|
4767
|
-
if (restoreFocus && nodeToRestore &&
|
|
4768
|
-
($9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {
|
|
4773
|
+
if (restoreFocus && nodeToRestore && (ownerDocument.activeElement && $9bf71ea28793e738$var$isElementInChildScope(ownerDocument.activeElement, scopeRef) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {
|
|
4769
4774
|
// freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it
|
|
4770
4775
|
let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone();
|
|
4771
4776
|
requestAnimationFrame(()=>{
|
|
@@ -5087,7 +5092,6 @@ const $148a7a147e38ea7f$var$RTL_LANGS = new Set([
|
|
|
5087
5092
|
]);
|
|
5088
5093
|
function $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {
|
|
5089
5094
|
// If the Intl.Locale API is available, use it to get the locale's text direction.
|
|
5090
|
-
// @ts-ignore
|
|
5091
5095
|
if (Intl.Locale) {
|
|
5092
5096
|
let locale = new Intl.Locale(localeString).maximize();
|
|
5093
5097
|
// Use the text info object to get the direction if possible.
|
|
@@ -5122,11 +5126,10 @@ const $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
|
|
|
5122
5126
|
function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
|
|
5123
5127
|
let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';
|
|
5124
5128
|
try {
|
|
5125
|
-
// @ts-ignore
|
|
5126
5129
|
Intl.DateTimeFormat.supportedLocalesOf([
|
|
5127
5130
|
locale
|
|
5128
5131
|
]);
|
|
5129
|
-
} catch
|
|
5132
|
+
} catch {
|
|
5130
5133
|
locale = 'en-US';
|
|
5131
5134
|
}
|
|
5132
5135
|
return {
|
|
@@ -5372,8 +5375,7 @@ function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
|
5372
5375
|
|
|
5373
5376
|
|
|
5374
5377
|
function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
5375
|
-
let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: // @ts-ignore - undocumented
|
|
5376
|
-
preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented
|
|
5378
|
+
let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented
|
|
5377
5379
|
allowFocusWhenDisabled, // @ts-ignore
|
|
5378
5380
|
onClick: deprecatedOnClick, href: href, target: target, rel: rel, type: type = 'button' } = props;
|
|
5379
5381
|
let additionalProps;
|
|
@@ -5384,7 +5386,7 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
5384
5386
|
else additionalProps = {
|
|
5385
5387
|
role: 'button',
|
|
5386
5388
|
tabIndex: isDisabled ? undefined : 0,
|
|
5387
|
-
href: elementType === 'a' && isDisabled ?
|
|
5389
|
+
href: elementType === 'a' && !isDisabled ? href : undefined,
|
|
5388
5390
|
target: elementType === 'a' ? target : undefined,
|
|
5389
5391
|
type: elementType === 'input' ? type : undefined,
|
|
5390
5392
|
disabled: elementType === 'input' ? isDisabled : undefined,
|
|
@@ -5436,8 +5438,20 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
5436
5438
|
*/ /* Inspired by https://github.com/AlmeroSteyn/react-aria-live */ const $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY = 7000;
|
|
5437
5439
|
let $319e236875307eab$var$liveAnnouncer = null;
|
|
5438
5440
|
function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = 'assertive', timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
|
|
5439
|
-
if (!$319e236875307eab$var$liveAnnouncer)
|
|
5440
|
-
|
|
5441
|
+
if (!$319e236875307eab$var$liveAnnouncer) {
|
|
5442
|
+
$319e236875307eab$var$liveAnnouncer = new $319e236875307eab$var$LiveAnnouncer();
|
|
5443
|
+
// wait for the live announcer regions to be added to the dom, then announce
|
|
5444
|
+
// otherwise Safari won't announce the message if it's added too quickly
|
|
5445
|
+
// found most times less than 100ms were not consistent when announcing with Safari
|
|
5446
|
+
// IS_REACT_ACT_ENVIRONMENT is used by React 18. Previous versions checked for the `jest` global.
|
|
5447
|
+
// https://github.com/reactwg/react-18/discussions/102
|
|
5448
|
+
// if we're in a test environment, announce without waiting
|
|
5449
|
+
// @ts-ignore
|
|
5450
|
+
if (!(typeof IS_REACT_ACT_ENVIRONMENT === 'boolean' ? IS_REACT_ACT_ENVIRONMENT : typeof jest !== 'undefined')) setTimeout(()=>{
|
|
5451
|
+
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);
|
|
5452
|
+
}, 100);
|
|
5453
|
+
else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
|
|
5454
|
+
} else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
|
|
5441
5455
|
}
|
|
5442
5456
|
// LiveAnnouncer is implemented using vanilla DOM, not React. That's because as of React 18
|
|
5443
5457
|
// ReactDOM.render is deprecated, and the replacement, ReactDOM.createRoot is moved into a
|
|
@@ -5446,6 +5460,10 @@ function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = 'ass
|
|
|
5446
5460
|
// is simple enough to implement without React, so that's what we do here.
|
|
5447
5461
|
// See this discussion for more details: https://github.com/reactwg/react-18/discussions/125#discussioncomment-2382638
|
|
5448
5462
|
class $319e236875307eab$var$LiveAnnouncer {
|
|
5463
|
+
isAttached() {
|
|
5464
|
+
var _this_node;
|
|
5465
|
+
return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected;
|
|
5466
|
+
}
|
|
5449
5467
|
createLog(ariaLive) {
|
|
5450
5468
|
let node = document.createElement('div');
|
|
5451
5469
|
node.setAttribute('role', 'log');
|
|
@@ -5459,146 +5477,52 @@ class $319e236875307eab$var$LiveAnnouncer {
|
|
|
5459
5477
|
this.node = null;
|
|
5460
5478
|
}
|
|
5461
5479
|
announce(message, assertiveness = 'assertive', timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
|
|
5480
|
+
var _this_assertiveLog, _this_politeLog;
|
|
5462
5481
|
if (!this.node) return;
|
|
5463
5482
|
let node = document.createElement('div');
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5483
|
+
if (typeof message === 'object') {
|
|
5484
|
+
// To read an aria-labelledby, the element must have an appropriate role, such as img.
|
|
5485
|
+
node.setAttribute('role', 'img');
|
|
5486
|
+
node.setAttribute('aria-labelledby', message['aria-labelledby']);
|
|
5487
|
+
} else node.textContent = message;
|
|
5488
|
+
if (assertiveness === 'assertive') (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 ? void 0 : _this_assertiveLog.appendChild(node);
|
|
5489
|
+
else (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 ? void 0 : _this_politeLog.appendChild(node);
|
|
5467
5490
|
if (message !== '') setTimeout(()=>{
|
|
5468
5491
|
node.remove();
|
|
5469
5492
|
}, timeout);
|
|
5470
5493
|
}
|
|
5471
5494
|
clear(assertiveness) {
|
|
5472
5495
|
if (!this.node) return;
|
|
5473
|
-
if (!assertiveness || assertiveness === 'assertive') this.assertiveLog.innerHTML = '';
|
|
5474
|
-
if (!assertiveness || assertiveness === 'polite') this.politeLog.innerHTML = '';
|
|
5496
|
+
if ((!assertiveness || assertiveness === 'assertive') && this.assertiveLog) this.assertiveLog.innerHTML = '';
|
|
5497
|
+
if ((!assertiveness || assertiveness === 'polite') && this.politeLog) this.politeLog.innerHTML = '';
|
|
5475
5498
|
}
|
|
5476
5499
|
constructor(){
|
|
5477
|
-
this.node =
|
|
5478
|
-
this.
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
5502
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5503
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5504
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5505
|
-
*
|
|
5506
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
5507
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
5508
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
5509
|
-
* governing permissions and limitations under the License.
|
|
5510
|
-
*/
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
5514
|
-
let { validationBehavior: validationBehavior, focus: focus } = props;
|
|
5515
|
-
// This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
|
|
5516
|
-
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
5517
|
-
if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {
|
|
5518
|
-
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
|
|
5519
|
-
ref.current.setCustomValidity(errorMessage);
|
|
5520
|
-
// Prevent default tooltip for validation message.
|
|
5521
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=605277
|
|
5522
|
-
if (!ref.current.hasAttribute('title')) ref.current.title = '';
|
|
5523
|
-
if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current));
|
|
5524
|
-
}
|
|
5525
|
-
});
|
|
5526
|
-
let onReset = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5527
|
-
state.resetValidation();
|
|
5528
|
-
});
|
|
5529
|
-
let onInvalid = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
|
|
5530
|
-
var _ref_current;
|
|
5531
|
-
// Only commit validation if we are not already displaying one.
|
|
5532
|
-
// This avoids clearing server errors that the user didn't actually fix.
|
|
5533
|
-
if (!state.displayValidation.isInvalid) state.commitValidation();
|
|
5534
|
-
// Auto focus the first invalid input in a form, unless the error already had its default prevented.
|
|
5535
|
-
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
|
|
5536
|
-
if (!e.defaultPrevented && ref && form && $e93e671b31057976$var$getFirstInvalidInput(form) === ref.current) {
|
|
5537
|
-
var _ref_current1;
|
|
5538
|
-
if (focus) focus();
|
|
5539
|
-
else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
|
|
5540
|
-
// Always show focus ring.
|
|
5541
|
-
($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
|
|
5500
|
+
this.node = null;
|
|
5501
|
+
this.assertiveLog = null;
|
|
5502
|
+
this.politeLog = null;
|
|
5503
|
+
if (typeof document !== 'undefined') {
|
|
5504
|
+
this.node = document.createElement('div');
|
|
5505
|
+
this.node.dataset.liveAnnouncer = 'true';
|
|
5506
|
+
// copied from VisuallyHidden
|
|
5507
|
+
Object.assign(this.node.style, {
|
|
5508
|
+
border: 0,
|
|
5509
|
+
clip: 'rect(0 0 0 0)',
|
|
5510
|
+
clipPath: 'inset(50%)',
|
|
5511
|
+
height: '1px',
|
|
5512
|
+
margin: '-1px',
|
|
5513
|
+
overflow: 'hidden',
|
|
5514
|
+
padding: 0,
|
|
5515
|
+
position: 'absolute',
|
|
5516
|
+
width: '1px',
|
|
5517
|
+
whiteSpace: 'nowrap'
|
|
5518
|
+
});
|
|
5519
|
+
this.assertiveLog = this.createLog('assertive');
|
|
5520
|
+
this.node.appendChild(this.assertiveLog);
|
|
5521
|
+
this.politeLog = this.createLog('polite');
|
|
5522
|
+
this.node.appendChild(this.politeLog);
|
|
5523
|
+
document.body.prepend(this.node);
|
|
5542
5524
|
}
|
|
5543
|
-
// Prevent default browser error UI from appearing.
|
|
5544
|
-
e.preventDefault();
|
|
5545
|
-
});
|
|
5546
|
-
let onChange = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5547
|
-
state.commitValidation();
|
|
5548
|
-
});
|
|
5549
|
-
(useEffect)(()=>{
|
|
5550
|
-
let input = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
5551
|
-
if (!input) return;
|
|
5552
|
-
let form = input.form;
|
|
5553
|
-
input.addEventListener('invalid', onInvalid);
|
|
5554
|
-
input.addEventListener('change', onChange);
|
|
5555
|
-
form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
|
|
5556
|
-
return ()=>{
|
|
5557
|
-
input.removeEventListener('invalid', onInvalid);
|
|
5558
|
-
input.removeEventListener('change', onChange);
|
|
5559
|
-
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
|
|
5560
|
-
};
|
|
5561
|
-
}, [
|
|
5562
|
-
ref,
|
|
5563
|
-
onInvalid,
|
|
5564
|
-
onChange,
|
|
5565
|
-
onReset,
|
|
5566
|
-
validationBehavior
|
|
5567
|
-
]);
|
|
5568
|
-
}
|
|
5569
|
-
function $e93e671b31057976$var$getValidity(input) {
|
|
5570
|
-
// The native ValidityState object is live, meaning each property is a getter that returns the current state.
|
|
5571
|
-
// We need to create a snapshot of the validity state at the time this function is called to avoid unpredictable React renders.
|
|
5572
|
-
let validity = input.validity;
|
|
5573
|
-
return {
|
|
5574
|
-
badInput: validity.badInput,
|
|
5575
|
-
customError: validity.customError,
|
|
5576
|
-
patternMismatch: validity.patternMismatch,
|
|
5577
|
-
rangeOverflow: validity.rangeOverflow,
|
|
5578
|
-
rangeUnderflow: validity.rangeUnderflow,
|
|
5579
|
-
stepMismatch: validity.stepMismatch,
|
|
5580
|
-
tooLong: validity.tooLong,
|
|
5581
|
-
tooShort: validity.tooShort,
|
|
5582
|
-
typeMismatch: validity.typeMismatch,
|
|
5583
|
-
valueMissing: validity.valueMissing,
|
|
5584
|
-
valid: validity.valid
|
|
5585
|
-
};
|
|
5586
|
-
}
|
|
5587
|
-
function $e93e671b31057976$var$getNativeValidity(input) {
|
|
5588
|
-
return {
|
|
5589
|
-
isInvalid: !input.validity.valid,
|
|
5590
|
-
validationDetails: $e93e671b31057976$var$getValidity(input),
|
|
5591
|
-
validationErrors: input.validationMessage ? [
|
|
5592
|
-
input.validationMessage
|
|
5593
|
-
] : []
|
|
5594
|
-
};
|
|
5595
|
-
}
|
|
5596
|
-
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
5597
|
-
for(let i = 0; i < form.elements.length; i++){
|
|
5598
|
-
let element = form.elements[i];
|
|
5599
|
-
if (!element.validity.valid) return element;
|
|
5600
5525
|
}
|
|
5601
|
-
return null;
|
|
5602
5526
|
}
|
|
5603
5527
|
|
|
5604
5528
|
/*
|
|
@@ -5663,11 +5587,15 @@ function $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {
|
|
|
5663
5587
|
validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
|
|
5664
5588
|
} : null;
|
|
5665
5589
|
// Perform custom client side validation.
|
|
5666
|
-
let clientError = (useMemo)(()
|
|
5590
|
+
let clientError = (useMemo)(()=>{
|
|
5591
|
+
if (!validate || value == null) return null;
|
|
5592
|
+
let validateErrors = $e5be200c675c3b3a$var$runValidate(validate, value);
|
|
5593
|
+
return $e5be200c675c3b3a$var$getValidationResult(validateErrors);
|
|
5594
|
+
}, [
|
|
5667
5595
|
validate,
|
|
5668
5596
|
value
|
|
5669
5597
|
]);
|
|
5670
|
-
if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation =
|
|
5598
|
+
if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = undefined;
|
|
5671
5599
|
// Get relevant server errors from the form.
|
|
5672
5600
|
let serverErrors = (useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);
|
|
5673
5601
|
let serverErrorMessages = (useMemo)(()=>{
|
|
@@ -5759,7 +5687,7 @@ function $e5be200c675c3b3a$var$getValidationResult(errors) {
|
|
|
5759
5687
|
}
|
|
5760
5688
|
function $e5be200c675c3b3a$var$isEqualValidation(a, b) {
|
|
5761
5689
|
if (a === b) return true;
|
|
5762
|
-
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);
|
|
5690
|
+
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);
|
|
5763
5691
|
}
|
|
5764
5692
|
function $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {
|
|
5765
5693
|
let errors = new Set();
|
|
@@ -5784,6 +5712,110 @@ function $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {
|
|
|
5784
5712
|
};
|
|
5785
5713
|
}
|
|
5786
5714
|
|
|
5715
|
+
/*
|
|
5716
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
5717
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5718
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5719
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5720
|
+
*
|
|
5721
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
5722
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
5723
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
5724
|
+
* governing permissions and limitations under the License.
|
|
5725
|
+
*/
|
|
5726
|
+
|
|
5727
|
+
|
|
5728
|
+
function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
5729
|
+
let { validationBehavior: validationBehavior, focus: focus } = props;
|
|
5730
|
+
// This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
|
|
5731
|
+
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
5732
|
+
if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {
|
|
5733
|
+
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
|
|
5734
|
+
ref.current.setCustomValidity(errorMessage);
|
|
5735
|
+
// Prevent default tooltip for validation message.
|
|
5736
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=605277
|
|
5737
|
+
if (!ref.current.hasAttribute('title')) ref.current.title = '';
|
|
5738
|
+
if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current));
|
|
5739
|
+
}
|
|
5740
|
+
});
|
|
5741
|
+
let onReset = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5742
|
+
state.resetValidation();
|
|
5743
|
+
});
|
|
5744
|
+
let onInvalid = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
|
|
5745
|
+
var _ref_current;
|
|
5746
|
+
// Only commit validation if we are not already displaying one.
|
|
5747
|
+
// This avoids clearing server errors that the user didn't actually fix.
|
|
5748
|
+
if (!state.displayValidation.isInvalid) state.commitValidation();
|
|
5749
|
+
// Auto focus the first invalid input in a form, unless the error already had its default prevented.
|
|
5750
|
+
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
|
|
5751
|
+
if (!e.defaultPrevented && ref && form && $e93e671b31057976$var$getFirstInvalidInput(form) === ref.current) {
|
|
5752
|
+
var _ref_current1;
|
|
5753
|
+
if (focus) focus();
|
|
5754
|
+
else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
|
|
5755
|
+
// Always show focus ring.
|
|
5756
|
+
($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
|
|
5757
|
+
}
|
|
5758
|
+
// Prevent default browser error UI from appearing.
|
|
5759
|
+
e.preventDefault();
|
|
5760
|
+
});
|
|
5761
|
+
let onChange = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
5762
|
+
state.commitValidation();
|
|
5763
|
+
});
|
|
5764
|
+
(useEffect)(()=>{
|
|
5765
|
+
let input = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
5766
|
+
if (!input) return;
|
|
5767
|
+
let form = input.form;
|
|
5768
|
+
input.addEventListener('invalid', onInvalid);
|
|
5769
|
+
input.addEventListener('change', onChange);
|
|
5770
|
+
form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
|
|
5771
|
+
return ()=>{
|
|
5772
|
+
input.removeEventListener('invalid', onInvalid);
|
|
5773
|
+
input.removeEventListener('change', onChange);
|
|
5774
|
+
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
|
|
5775
|
+
};
|
|
5776
|
+
}, [
|
|
5777
|
+
ref,
|
|
5778
|
+
onInvalid,
|
|
5779
|
+
onChange,
|
|
5780
|
+
onReset,
|
|
5781
|
+
validationBehavior
|
|
5782
|
+
]);
|
|
5783
|
+
}
|
|
5784
|
+
function $e93e671b31057976$var$getValidity(input) {
|
|
5785
|
+
// The native ValidityState object is live, meaning each property is a getter that returns the current state.
|
|
5786
|
+
// We need to create a snapshot of the validity state at the time this function is called to avoid unpredictable React renders.
|
|
5787
|
+
let validity = input.validity;
|
|
5788
|
+
return {
|
|
5789
|
+
badInput: validity.badInput,
|
|
5790
|
+
customError: validity.customError,
|
|
5791
|
+
patternMismatch: validity.patternMismatch,
|
|
5792
|
+
rangeOverflow: validity.rangeOverflow,
|
|
5793
|
+
rangeUnderflow: validity.rangeUnderflow,
|
|
5794
|
+
stepMismatch: validity.stepMismatch,
|
|
5795
|
+
tooLong: validity.tooLong,
|
|
5796
|
+
tooShort: validity.tooShort,
|
|
5797
|
+
typeMismatch: validity.typeMismatch,
|
|
5798
|
+
valueMissing: validity.valueMissing,
|
|
5799
|
+
valid: validity.valid
|
|
5800
|
+
};
|
|
5801
|
+
}
|
|
5802
|
+
function $e93e671b31057976$var$getNativeValidity(input) {
|
|
5803
|
+
return {
|
|
5804
|
+
isInvalid: !input.validity.valid,
|
|
5805
|
+
validationDetails: $e93e671b31057976$var$getValidity(input),
|
|
5806
|
+
validationErrors: input.validationMessage ? [
|
|
5807
|
+
input.validationMessage
|
|
5808
|
+
] : []
|
|
5809
|
+
};
|
|
5810
|
+
}
|
|
5811
|
+
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
5812
|
+
for(let i = 0; i < form.elements.length; i++){
|
|
5813
|
+
let element = form.elements[i];
|
|
5814
|
+
if (!element.validity.valid) return element;
|
|
5815
|
+
}
|
|
5816
|
+
return null;
|
|
5817
|
+
}
|
|
5818
|
+
|
|
5787
5819
|
/*
|
|
5788
5820
|
* Copyright 2020 Adobe. All rights reserved.
|
|
5789
5821
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -5865,6 +5897,8 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
|
5865
5897
|
|
|
5866
5898
|
|
|
5867
5899
|
|
|
5900
|
+
|
|
5901
|
+
|
|
5868
5902
|
function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {
|
|
5869
5903
|
// Create validation state here because it doesn't make sense to add to general useToggleState.
|
|
5870
5904
|
let validationState = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
@@ -5883,8 +5917,18 @@ function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {
|
|
|
5883
5917
|
// https://css-tricks.com/indeterminate-checkboxes/
|
|
5884
5918
|
if (inputRef.current) inputRef.current.indeterminate = !!isIndeterminate;
|
|
5885
5919
|
});
|
|
5920
|
+
// Reset validation state on label press for checkbox with a hidden input.
|
|
5921
|
+
let { pressProps: pressProps } = ($f6c31cce2adf654f$export$45712eceda6fad21)({
|
|
5922
|
+
isDisabled: isDisabled || isReadOnly,
|
|
5923
|
+
onPress () {
|
|
5924
|
+
// @ts-expect-error
|
|
5925
|
+
let { [($e5be200c675c3b3a$export$a763b9476acd3eb)]: groupValidationState } = props;
|
|
5926
|
+
let { commitValidation: commitValidation } = groupValidationState ? groupValidationState : validationState;
|
|
5927
|
+
commitValidation();
|
|
5928
|
+
}
|
|
5929
|
+
});
|
|
5886
5930
|
return {
|
|
5887
|
-
labelProps: labelProps,
|
|
5931
|
+
labelProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(labelProps, pressProps),
|
|
5888
5932
|
inputProps: {
|
|
5889
5933
|
...inputProps,
|
|
5890
5934
|
checked: isSelected,
|
|
@@ -6166,23 +6210,185 @@ function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
6166
6210
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
6167
6211
|
* governing permissions and limitations under the License.
|
|
6168
6212
|
*/
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
};
|
|
6185
|
-
|
|
6213
|
+
|
|
6214
|
+
|
|
6215
|
+
const $5c3e21d68f1c4674$var$styles = {
|
|
6216
|
+
border: 0,
|
|
6217
|
+
clip: 'rect(0 0 0 0)',
|
|
6218
|
+
clipPath: 'inset(50%)',
|
|
6219
|
+
height: '1px',
|
|
6220
|
+
margin: '-1px',
|
|
6221
|
+
overflow: 'hidden',
|
|
6222
|
+
padding: 0,
|
|
6223
|
+
position: 'absolute',
|
|
6224
|
+
width: '1px',
|
|
6225
|
+
whiteSpace: 'nowrap'
|
|
6226
|
+
};
|
|
6227
|
+
function $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {
|
|
6228
|
+
let { style: style, isFocusable: isFocusable } = props;
|
|
6229
|
+
let [isFocused, setFocused] = (useState)(false);
|
|
6230
|
+
let { focusWithinProps: focusWithinProps } = ($9ab94262bd0047c7$export$420e68273165f4ec)({
|
|
6231
|
+
isDisabled: !isFocusable,
|
|
6232
|
+
onFocusWithinChange: (val)=>setFocused(val)
|
|
6233
|
+
});
|
|
6234
|
+
// If focused, don't hide the element.
|
|
6235
|
+
let combinedStyles = (useMemo)(()=>{
|
|
6236
|
+
if (isFocused) return style;
|
|
6237
|
+
else if (style) return {
|
|
6238
|
+
...$5c3e21d68f1c4674$var$styles,
|
|
6239
|
+
...style
|
|
6240
|
+
};
|
|
6241
|
+
else return $5c3e21d68f1c4674$var$styles;
|
|
6242
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6243
|
+
}, [
|
|
6244
|
+
isFocused
|
|
6245
|
+
]);
|
|
6246
|
+
return {
|
|
6247
|
+
visuallyHiddenProps: {
|
|
6248
|
+
...focusWithinProps,
|
|
6249
|
+
style: combinedStyles
|
|
6250
|
+
}
|
|
6251
|
+
};
|
|
6252
|
+
}
|
|
6253
|
+
function $5c3e21d68f1c4674$export$439d29a4e110a164(props) {
|
|
6254
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6255
|
+
let { children: children, elementType: Element = 'div', isFocusable: isFocusable, style: style, ...otherProps } = props;
|
|
6256
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);
|
|
6257
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(Element, ($3ef42575df84b30b$export$9d1611c77c2fe928)(otherProps, visuallyHiddenProps), children);
|
|
6258
|
+
}
|
|
6259
|
+
|
|
6260
|
+
/*
|
|
6261
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
6262
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6263
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
6264
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6265
|
+
*
|
|
6266
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
6267
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
6268
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
6269
|
+
* governing permissions and limitations under the License.
|
|
6270
|
+
*/
|
|
6271
|
+
|
|
6272
|
+
|
|
6273
|
+
|
|
6274
|
+
|
|
6275
|
+
|
|
6276
|
+
|
|
6277
|
+
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
6278
|
+
let { inputElementType: inputElementType = 'input', isDisabled: isDisabled = false, isRequired: isRequired = false, isReadOnly: isReadOnly = false, type: type = 'text', validationBehavior: validationBehavior = 'aria' } = props;
|
|
6279
|
+
let [value, setValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue || '', props.onChange);
|
|
6280
|
+
let { focusableProps: focusableProps } = ($e6afbd83fe6ebbd2$export$4c014de7c8940b4c)(props, ref);
|
|
6281
|
+
let validationState = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
6282
|
+
...props,
|
|
6283
|
+
value: value
|
|
6284
|
+
});
|
|
6285
|
+
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = validationState.displayValidation;
|
|
6286
|
+
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = ($2baaea4c71418dea$export$294aa081a6c6f55d)({
|
|
6287
|
+
...props,
|
|
6288
|
+
isInvalid: isInvalid,
|
|
6289
|
+
errorMessage: props.errorMessage || validationErrors
|
|
6290
|
+
});
|
|
6291
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
6292
|
+
labelable: true
|
|
6293
|
+
});
|
|
6294
|
+
const inputOnlyProps = {
|
|
6295
|
+
type: type,
|
|
6296
|
+
pattern: props.pattern
|
|
6297
|
+
};
|
|
6298
|
+
($99facab73266f662$export$5add1d006293d136)(ref, value, setValue);
|
|
6299
|
+
($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
|
|
6300
|
+
(useEffect)(()=>{
|
|
6301
|
+
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
|
|
6302
|
+
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
|
|
6303
|
+
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
|
|
6304
|
+
// textareas are always controlled. React is planning on removing this synchronization in a
|
|
6305
|
+
// future major version.
|
|
6306
|
+
// https://github.com/facebook/react/issues/19474
|
|
6307
|
+
// https://github.com/facebook/react/issues/11896
|
|
6308
|
+
if (ref.current instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
|
|
6309
|
+
let input = ref.current;
|
|
6310
|
+
Object.defineProperty(input, 'defaultValue', {
|
|
6311
|
+
get: ()=>input.value,
|
|
6312
|
+
set: ()=>{},
|
|
6313
|
+
configurable: true
|
|
6314
|
+
});
|
|
6315
|
+
}
|
|
6316
|
+
}, [
|
|
6317
|
+
ref
|
|
6318
|
+
]);
|
|
6319
|
+
return {
|
|
6320
|
+
labelProps: labelProps,
|
|
6321
|
+
inputProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, inputElementType === 'input' ? inputOnlyProps : undefined, {
|
|
6322
|
+
disabled: isDisabled,
|
|
6323
|
+
readOnly: isReadOnly,
|
|
6324
|
+
required: isRequired && validationBehavior === 'native',
|
|
6325
|
+
'aria-required': isRequired && validationBehavior === 'aria' || undefined,
|
|
6326
|
+
'aria-invalid': isInvalid || undefined,
|
|
6327
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
6328
|
+
'aria-activedescendant': props['aria-activedescendant'],
|
|
6329
|
+
'aria-autocomplete': props['aria-autocomplete'],
|
|
6330
|
+
'aria-haspopup': props['aria-haspopup'],
|
|
6331
|
+
value: value,
|
|
6332
|
+
onChange: (e)=>setValue(e.target.value),
|
|
6333
|
+
autoComplete: props.autoComplete,
|
|
6334
|
+
autoCapitalize: props.autoCapitalize,
|
|
6335
|
+
maxLength: props.maxLength,
|
|
6336
|
+
minLength: props.minLength,
|
|
6337
|
+
name: props.name,
|
|
6338
|
+
placeholder: props.placeholder,
|
|
6339
|
+
inputMode: props.inputMode,
|
|
6340
|
+
// Clipboard events
|
|
6341
|
+
onCopy: props.onCopy,
|
|
6342
|
+
onCut: props.onCut,
|
|
6343
|
+
onPaste: props.onPaste,
|
|
6344
|
+
// Composition events
|
|
6345
|
+
onCompositionEnd: props.onCompositionEnd,
|
|
6346
|
+
onCompositionStart: props.onCompositionStart,
|
|
6347
|
+
onCompositionUpdate: props.onCompositionUpdate,
|
|
6348
|
+
// Selection events
|
|
6349
|
+
onSelect: props.onSelect,
|
|
6350
|
+
// Input events
|
|
6351
|
+
onBeforeInput: props.onBeforeInput,
|
|
6352
|
+
onInput: props.onInput,
|
|
6353
|
+
...focusableProps,
|
|
6354
|
+
...fieldProps
|
|
6355
|
+
}),
|
|
6356
|
+
descriptionProps: descriptionProps,
|
|
6357
|
+
errorMessageProps: errorMessageProps,
|
|
6358
|
+
isInvalid: isInvalid,
|
|
6359
|
+
validationErrors: validationErrors,
|
|
6360
|
+
validationDetails: validationDetails
|
|
6361
|
+
};
|
|
6362
|
+
}
|
|
6363
|
+
|
|
6364
|
+
/*
|
|
6365
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
6366
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6367
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
6368
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6369
|
+
*
|
|
6370
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
6371
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
6372
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
6373
|
+
* governing permissions and limitations under the License.
|
|
6374
|
+
*/
|
|
6375
|
+
const $edcf132a9284368a$var$AXIS = {
|
|
6376
|
+
top: 'top',
|
|
6377
|
+
bottom: 'top',
|
|
6378
|
+
left: 'left',
|
|
6379
|
+
right: 'left'
|
|
6380
|
+
};
|
|
6381
|
+
const $edcf132a9284368a$var$FLIPPED_DIRECTION = {
|
|
6382
|
+
top: 'bottom',
|
|
6383
|
+
bottom: 'top',
|
|
6384
|
+
left: 'right',
|
|
6385
|
+
right: 'left'
|
|
6386
|
+
};
|
|
6387
|
+
const $edcf132a9284368a$var$CROSS_AXIS = {
|
|
6388
|
+
top: 'left',
|
|
6389
|
+
left: 'top'
|
|
6390
|
+
};
|
|
6391
|
+
const $edcf132a9284368a$var$AXIS_SIZE = {
|
|
6186
6392
|
top: 'height',
|
|
6187
6393
|
left: 'width'
|
|
6188
6394
|
};
|
|
@@ -6191,12 +6397,12 @@ const $edcf132a9284368a$var$TOTAL_SIZE = {
|
|
|
6191
6397
|
height: 'totalHeight'
|
|
6192
6398
|
};
|
|
6193
6399
|
const $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {};
|
|
6194
|
-
|
|
6195
|
-
let $edcf132a9284368a$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
6400
|
+
let $edcf132a9284368a$var$visualViewport = typeof document !== 'undefined' ? window.visualViewport : null;
|
|
6196
6401
|
function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
|
|
6197
6402
|
let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;
|
|
6198
6403
|
let scroll = {};
|
|
6199
|
-
|
|
6404
|
+
var _visualViewport_scale;
|
|
6405
|
+
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;
|
|
6200
6406
|
if (containerNode.tagName === 'BODY') {
|
|
6201
6407
|
let documentElement = document.documentElement;
|
|
6202
6408
|
totalWidth = documentElement.clientWidth;
|
|
@@ -6228,8 +6434,10 @@ function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
|
|
|
6228
6434
|
// before pinch zoom happens
|
|
6229
6435
|
scroll.top = 0;
|
|
6230
6436
|
scroll.left = 0;
|
|
6231
|
-
|
|
6232
|
-
|
|
6437
|
+
var _visualViewport_pageTop;
|
|
6438
|
+
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;
|
|
6439
|
+
var _visualViewport_pageLeft;
|
|
6440
|
+
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;
|
|
6233
6441
|
}
|
|
6234
6442
|
return {
|
|
6235
6443
|
width: width,
|
|
@@ -6258,7 +6466,8 @@ boundaryDimensions, // The dimensions of the containing block element that the p
|
|
|
6258
6466
|
// is portaled somewhere other than the body and has an ancestor with
|
|
6259
6467
|
// position: relative/absolute, it will be different.
|
|
6260
6468
|
containerDimensions, padding, containerOffsetWithBoundary) {
|
|
6261
|
-
|
|
6469
|
+
var _containerDimensions_scroll_axis;
|
|
6470
|
+
let containerScroll = (_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0;
|
|
6262
6471
|
// The height/width of the boundary. Matches the axis along which we are adjusting the overlay position
|
|
6263
6472
|
let boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]];
|
|
6264
6473
|
// Calculate the edges of the boundary (accomodating for the boundary padding) and the edges of the overlay.
|
|
@@ -6303,14 +6512,16 @@ function $edcf132a9284368a$var$parsePlacement(input) {
|
|
|
6303
6512
|
function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset) {
|
|
6304
6513
|
let { placement: placement, crossPlacement: crossPlacement, axis: axis, crossAxis: crossAxis, size: size, crossSize: crossSize } = placementInfo;
|
|
6305
6514
|
let position = {};
|
|
6515
|
+
var _childOffset_crossAxis;
|
|
6306
6516
|
// button position
|
|
6307
|
-
position[crossAxis] = childOffset[crossAxis];
|
|
6517
|
+
position[crossAxis] = (_childOffset_crossAxis = childOffset[crossAxis]) !== null && _childOffset_crossAxis !== void 0 ? _childOffset_crossAxis : 0;
|
|
6518
|
+
var _childOffset_crossSize, _overlaySize_crossSize, _childOffset_crossSize1, _overlaySize_crossSize1;
|
|
6308
6519
|
if (crossPlacement === 'center') // + (button size / 2) - (overlay size / 2)
|
|
6309
6520
|
// at this point the overlay center should match the button center
|
|
6310
|
-
position[crossAxis] += (childOffset[crossSize] - overlaySize[crossSize]) / 2;
|
|
6521
|
+
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;
|
|
6311
6522
|
else if (crossPlacement !== crossAxis) // + (button size) - (overlay size)
|
|
6312
6523
|
// at this point the overlay bottom should match the button bottom
|
|
6313
|
-
position[crossAxis] += childOffset[crossSize] - overlaySize[crossSize];
|
|
6524
|
+
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);
|
|
6314
6525
|
/* else {
|
|
6315
6526
|
the overlay top should match the button top
|
|
6316
6527
|
} */
|
|
@@ -6333,23 +6544,26 @@ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions,
|
|
|
6333
6544
|
}
|
|
6334
6545
|
function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection) {
|
|
6335
6546
|
const containerHeight = isContainerPositioned ? containerOffsetWithBoundary.height : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height];
|
|
6547
|
+
var _position_bottom;
|
|
6336
6548
|
// 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
|
|
6337
6549
|
// used in computePosition.
|
|
6338
|
-
let overlayTop = position.top != null ? containerOffsetWithBoundary.top + position.top : containerOffsetWithBoundary.top + (containerHeight - position.bottom - overlayHeight);
|
|
6550
|
+
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);
|
|
6551
|
+
var _boundaryDimensions_scroll_top, _margins_top, _margins_bottom, _boundaryDimensions_scroll_top1, _margins_top1, _margins_bottom1;
|
|
6339
6552
|
let maxHeight = heightGrowthDirection !== 'top' ? // We want the distance between the top of the overlay to the bottom of the boundary
|
|
6340
|
-
Math.max(0, boundaryDimensions.height + boundaryDimensions.top + boundaryDimensions.scroll.top // this is the
|
|
6341
|
-
-
|
|
6342
|
-
- (margins.top + margins.bottom + padding // save additional space for margin and padding
|
|
6553
|
+
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
|
|
6554
|
+
- (((_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
|
|
6343
6555
|
)) : Math.max(0, overlayTop + overlayHeight // this is the bottom of the overlay
|
|
6344
|
-
- (boundaryDimensions.top + boundaryDimensions.scroll.top // this is the top of the boundary
|
|
6345
|
-
) - (margins.top + margins.bottom + padding // save additional space for margin and padding
|
|
6556
|
+
- (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
|
|
6557
|
+
) - (((_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
|
|
6346
6558
|
));
|
|
6347
6559
|
return Math.min(boundaryDimensions.height - padding * 2, maxHeight);
|
|
6348
6560
|
}
|
|
6349
6561
|
function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
|
|
6350
6562
|
let { placement: placement, axis: axis, size: size } = placementInfo;
|
|
6351
|
-
|
|
6352
|
-
return Math.max(0,
|
|
6563
|
+
var _boundaryDimensions_scroll_axis, _margins_axis;
|
|
6564
|
+
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);
|
|
6565
|
+
var _margins_axis1;
|
|
6566
|
+
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);
|
|
6353
6567
|
}
|
|
6354
6568
|
function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset) {
|
|
6355
6569
|
let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput);
|
|
@@ -6395,8 +6609,9 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
|
|
|
6395
6609
|
let preferredArrowPosition = childOffset[crossAxis] + .5 * childOffset[crossSize] - position[crossAxis] - margins[$edcf132a9284368a$var$AXIS[crossAxis]];
|
|
6396
6610
|
// Min/Max position limits for the arrow with respect to the overlay
|
|
6397
6611
|
const arrowMinPosition = arrowSize / 2 + arrowBoundaryOffset;
|
|
6612
|
+
var _margins_left, _margins_right, _margins_top, _margins_bottom;
|
|
6398
6613
|
// overlaySize[crossSize] - margins = true size of the overlay
|
|
6399
|
-
const overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === 'left' ? margins.left + margins.right : margins.top + margins.bottom;
|
|
6614
|
+
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);
|
|
6400
6615
|
const arrowMaxPosition = overlaySize[crossSize] - overlayMargin - arrowSize / 2 - arrowBoundaryOffset;
|
|
6401
6616
|
// Min/Max position limits for the arrow with respect to the trigger/overlay anchor element
|
|
6402
6617
|
// Same margin accomodation done here as well as for the preferredArrowPosition
|
|
@@ -6427,8 +6642,10 @@ function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
|
|
|
6427
6642
|
}
|
|
6428
6643
|
let overlaySize = $edcf132a9284368a$var$getOffset(overlayNode);
|
|
6429
6644
|
let margins = $edcf132a9284368a$var$getMargins(overlayNode);
|
|
6430
|
-
|
|
6431
|
-
overlaySize.
|
|
6645
|
+
var _margins_left, _margins_right;
|
|
6646
|
+
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);
|
|
6647
|
+
var _margins_top, _margins_bottom;
|
|
6648
|
+
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);
|
|
6432
6649
|
let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode);
|
|
6433
6650
|
let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement);
|
|
6434
6651
|
let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container);
|
|
@@ -6501,9 +6718,7 @@ function $edcf132a9284368a$var$getContainingBlock(node) {
|
|
|
6501
6718
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
6502
6719
|
function $edcf132a9284368a$var$isContainingBlock(node) {
|
|
6503
6720
|
let style = window.getComputedStyle(node);
|
|
6504
|
-
return style.transform !== 'none' || /transform|perspective/.test(style.willChange) || style.filter !== 'none' || style.contain === 'paint' ||
|
|
6505
|
-
'backdropFilter' in style && style.backdropFilter !== 'none' || // @ts-ignore
|
|
6506
|
-
'WebkitBackdropFilter' in style && style.WebkitBackdropFilter !== 'none';
|
|
6721
|
+
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';
|
|
6507
6722
|
}
|
|
6508
6723
|
|
|
6509
6724
|
/*
|
|
@@ -6560,18 +6775,11 @@ function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
|
6560
6775
|
|
|
6561
6776
|
|
|
6562
6777
|
|
|
6563
|
-
|
|
6564
|
-
let $2a41e45df1593e64$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
6778
|
+
let $2a41e45df1593e64$var$visualViewport = typeof document !== 'undefined' ? window.visualViewport : null;
|
|
6565
6779
|
function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
6566
6780
|
let { direction: direction } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
6567
6781
|
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;
|
|
6568
|
-
let [position, setPosition] = (useState)(
|
|
6569
|
-
position: {},
|
|
6570
|
-
arrowOffsetLeft: undefined,
|
|
6571
|
-
arrowOffsetTop: undefined,
|
|
6572
|
-
maxHeight: undefined,
|
|
6573
|
-
placement: undefined
|
|
6574
|
-
});
|
|
6782
|
+
let [position, setPosition] = (useState)(null);
|
|
6575
6783
|
let deps = [
|
|
6576
6784
|
shouldUpdatePosition,
|
|
6577
6785
|
placement,
|
|
@@ -6607,17 +6815,20 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6607
6815
|
// changes, the focused element appears to stay in the same position.
|
|
6608
6816
|
let anchor = null;
|
|
6609
6817
|
if (scrollRef.current && scrollRef.current.contains(document.activeElement)) {
|
|
6610
|
-
|
|
6818
|
+
var _document_activeElement;
|
|
6819
|
+
let anchorRect = (_document_activeElement = document.activeElement) === null || _document_activeElement === void 0 ? void 0 : _document_activeElement.getBoundingClientRect();
|
|
6611
6820
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6821
|
+
var _anchorRect_top;
|
|
6612
6822
|
// Anchor from the top if the offset is in the top half of the scrollable element,
|
|
6613
6823
|
// otherwise anchor from the bottom.
|
|
6614
6824
|
anchor = {
|
|
6615
6825
|
type: 'top',
|
|
6616
|
-
offset: anchorRect.top - scrollRect.top
|
|
6826
|
+
offset: ((_anchorRect_top = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.top) !== null && _anchorRect_top !== void 0 ? _anchorRect_top : 0) - scrollRect.top
|
|
6617
6827
|
};
|
|
6618
6828
|
if (anchor.offset > scrollRect.height / 2) {
|
|
6619
6829
|
anchor.type = 'bottom';
|
|
6620
|
-
|
|
6830
|
+
var _anchorRect_bottom;
|
|
6831
|
+
anchor.offset = ((_anchorRect_bottom = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.bottom) !== null && _anchorRect_bottom !== void 0 ? _anchorRect_bottom : 0) - scrollRect.bottom;
|
|
6621
6832
|
}
|
|
6622
6833
|
}
|
|
6623
6834
|
// Always reset the overlay's previous max height if not defined by the user so that we can compensate for
|
|
@@ -6644,6 +6855,7 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6644
6855
|
arrowSize: arrowSize,
|
|
6645
6856
|
arrowBoundaryOffset: arrowBoundaryOffset
|
|
6646
6857
|
});
|
|
6858
|
+
if (!position.position) return;
|
|
6647
6859
|
// Modify overlay styles directly so positioning happens immediately without the need of a second render
|
|
6648
6860
|
// This is so we don't have to delay autoFocus scrolling or delay applying preventScroll for popovers
|
|
6649
6861
|
overlay.style.top = '';
|
|
@@ -6651,9 +6863,9 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6651
6863
|
overlay.style.left = '';
|
|
6652
6864
|
overlay.style.right = '';
|
|
6653
6865
|
Object.keys(position.position).forEach((key)=>overlay.style[key] = position.position[key] + 'px');
|
|
6654
|
-
overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + 'px' :
|
|
6866
|
+
overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + 'px' : '';
|
|
6655
6867
|
// Restore scroll position relative to anchor element.
|
|
6656
|
-
if (anchor) {
|
|
6868
|
+
if (anchor && document.activeElement && scrollRef.current) {
|
|
6657
6869
|
let anchorRect = document.activeElement.getBoundingClientRect();
|
|
6658
6870
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6659
6871
|
let newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];
|
|
@@ -6706,7 +6918,7 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6706
6918
|
updatePosition
|
|
6707
6919
|
]);
|
|
6708
6920
|
let close = (useCallback)(()=>{
|
|
6709
|
-
if (!isResizing.current) onClose();
|
|
6921
|
+
if (!isResizing.current) onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
6710
6922
|
}, [
|
|
6711
6923
|
onClose,
|
|
6712
6924
|
isResizing
|
|
@@ -6718,23 +6930,23 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6718
6930
|
isOpen: isOpen,
|
|
6719
6931
|
onClose: onClose && close
|
|
6720
6932
|
});
|
|
6721
|
-
var _position_maxHeight;
|
|
6933
|
+
var _position_maxHeight, _position_placement;
|
|
6722
6934
|
return {
|
|
6723
6935
|
overlayProps: {
|
|
6724
6936
|
style: {
|
|
6725
6937
|
position: 'absolute',
|
|
6726
6938
|
zIndex: 100000,
|
|
6727
|
-
...position.position,
|
|
6728
|
-
maxHeight: (_position_maxHeight = position.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : '100vh'
|
|
6939
|
+
...position === null || position === void 0 ? void 0 : position.position,
|
|
6940
|
+
maxHeight: (_position_maxHeight = position === null || position === void 0 ? void 0 : position.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : '100vh'
|
|
6729
6941
|
}
|
|
6730
6942
|
},
|
|
6731
|
-
placement: position.placement,
|
|
6943
|
+
placement: (_position_placement = position === null || position === void 0 ? void 0 : position.placement) !== null && _position_placement !== void 0 ? _position_placement : null,
|
|
6732
6944
|
arrowProps: {
|
|
6733
6945
|
'aria-hidden': 'true',
|
|
6734
6946
|
role: 'presentation',
|
|
6735
6947
|
style: {
|
|
6736
|
-
left: position.arrowOffsetLeft,
|
|
6737
|
-
top: position.arrowOffsetTop
|
|
6948
|
+
left: position === null || position === void 0 ? void 0 : position.arrowOffsetLeft,
|
|
6949
|
+
top: position === null || position === void 0 ? void 0 : position.arrowOffsetTop
|
|
6738
6950
|
}
|
|
6739
6951
|
},
|
|
6740
6952
|
updatePosition: updatePosition
|
|
@@ -6814,7 +7026,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
6814
7026
|
// Handle clicking outside the overlay to close it
|
|
6815
7027
|
($e0b6e0b68ec7f50f$export$872b660ac5a1ff98)({
|
|
6816
7028
|
ref: ref,
|
|
6817
|
-
onInteractOutside: isDismissable && isOpen ? onInteractOutside :
|
|
7029
|
+
onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,
|
|
6818
7030
|
onInteractOutsideStart: onInteractOutsideStart
|
|
6819
7031
|
});
|
|
6820
7032
|
let { focusWithinProps: focusWithinProps } = ($9ab94262bd0047c7$export$420e68273165f4ec)({
|
|
@@ -6830,7 +7042,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
6830
7042
|
// do not close the outer overlay. At this point, the active scope should
|
|
6831
7043
|
// still be the outer overlay, since blur events run before focus.
|
|
6832
7044
|
if (!e.relatedTarget || ($9bf71ea28793e738$export$1258395f99bf9cbf)(e.relatedTarget)) return;
|
|
6833
|
-
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose();
|
|
7045
|
+
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
6834
7046
|
}
|
|
6835
7047
|
});
|
|
6836
7048
|
let onPointerDownUnderlay = (e)=>{
|
|
@@ -6881,7 +7093,7 @@ function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
6881
7093
|
triggerProps: {
|
|
6882
7094
|
'aria-haspopup': ariaHasPopup,
|
|
6883
7095
|
'aria-expanded': isOpen,
|
|
6884
|
-
'aria-controls': isOpen ? overlayId :
|
|
7096
|
+
'aria-controls': isOpen ? overlayId : undefined,
|
|
6885
7097
|
onPress: state.toggle
|
|
6886
7098
|
},
|
|
6887
7099
|
overlayProps: {
|
|
@@ -6901,7 +7113,6 @@ function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
6901
7113
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
6902
7114
|
* governing permissions and limitations under the License.
|
|
6903
7115
|
*/
|
|
6904
|
-
// @ts-ignore
|
|
6905
7116
|
const $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
6906
7117
|
// HTML input types that do not cause the software keyboard to appear.
|
|
6907
7118
|
const $49c51c25361d4cd2$var$nonTextInputTypes = new Set([
|
|
@@ -7084,22 +7295,26 @@ function $49c51c25361d4cd2$var$setStyle(element, style, value) {
|
|
|
7084
7295
|
}
|
|
7085
7296
|
// Adds an event listener to an element, and returns a function to remove it.
|
|
7086
7297
|
function $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {
|
|
7298
|
+
// internal function, so it's ok to ignore the difficult to fix type error
|
|
7299
|
+
// @ts-ignore
|
|
7087
7300
|
target.addEventListener(event, handler, options);
|
|
7088
7301
|
return ()=>{
|
|
7302
|
+
// @ts-ignore
|
|
7089
7303
|
target.removeEventListener(event, handler, options);
|
|
7090
7304
|
};
|
|
7091
7305
|
}
|
|
7092
7306
|
function $49c51c25361d4cd2$var$scrollIntoView(target) {
|
|
7093
7307
|
let root = document.scrollingElement || document.documentElement;
|
|
7094
|
-
|
|
7308
|
+
let nextTarget = target;
|
|
7309
|
+
while(nextTarget && nextTarget !== root){
|
|
7095
7310
|
// Find the parent scrollable element and adjust the scroll position if the target is not already in view.
|
|
7096
|
-
let scrollable = ($62d8ded9296f3872$export$cfa2225e87938781)(
|
|
7097
|
-
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !==
|
|
7311
|
+
let scrollable = ($62d8ded9296f3872$export$cfa2225e87938781)(nextTarget);
|
|
7312
|
+
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {
|
|
7098
7313
|
let scrollableTop = scrollable.getBoundingClientRect().top;
|
|
7099
|
-
let targetTop =
|
|
7100
|
-
if (targetTop > scrollableTop +
|
|
7314
|
+
let targetTop = nextTarget.getBoundingClientRect().top;
|
|
7315
|
+
if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;
|
|
7101
7316
|
}
|
|
7102
|
-
|
|
7317
|
+
nextTarget = scrollable.parentElement;
|
|
7103
7318
|
}
|
|
7104
7319
|
}
|
|
7105
7320
|
function $49c51c25361d4cd2$var$willOpenKeyboard(target) {
|
|
@@ -7147,7 +7362,7 @@ function $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {
|
|
|
7147
7362
|
let context = (useContext)($f57aed4a881a3485$var$Context);
|
|
7148
7363
|
return {
|
|
7149
7364
|
modalProviderProps: {
|
|
7150
|
-
'aria-hidden': context && context.modalCount > 0 ? true :
|
|
7365
|
+
'aria-hidden': context && context.modalCount > 0 ? true : undefined
|
|
7151
7366
|
}
|
|
7152
7367
|
};
|
|
7153
7368
|
}
|
|
@@ -7419,64 +7634,6 @@ $a2f21f5f14f60553$exports = {
|
|
|
7419
7634
|
"zh-TW": $2b2734393847c884$exports
|
|
7420
7635
|
};
|
|
7421
7636
|
|
|
7422
|
-
/*
|
|
7423
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
7424
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7425
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7426
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7427
|
-
*
|
|
7428
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
7429
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
7430
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
7431
|
-
* governing permissions and limitations under the License.
|
|
7432
|
-
*/
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
const $5c3e21d68f1c4674$var$styles = {
|
|
7436
|
-
border: 0,
|
|
7437
|
-
clip: 'rect(0 0 0 0)',
|
|
7438
|
-
clipPath: 'inset(50%)',
|
|
7439
|
-
height: '1px',
|
|
7440
|
-
margin: '-1px',
|
|
7441
|
-
overflow: 'hidden',
|
|
7442
|
-
padding: 0,
|
|
7443
|
-
position: 'absolute',
|
|
7444
|
-
width: '1px',
|
|
7445
|
-
whiteSpace: 'nowrap'
|
|
7446
|
-
};
|
|
7447
|
-
function $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {
|
|
7448
|
-
let { style: style, isFocusable: isFocusable } = props;
|
|
7449
|
-
let [isFocused, setFocused] = (useState)(false);
|
|
7450
|
-
let { focusWithinProps: focusWithinProps } = ($9ab94262bd0047c7$export$420e68273165f4ec)({
|
|
7451
|
-
isDisabled: !isFocusable,
|
|
7452
|
-
onFocusWithinChange: (val)=>setFocused(val)
|
|
7453
|
-
});
|
|
7454
|
-
// If focused, don't hide the element.
|
|
7455
|
-
let combinedStyles = (useMemo)(()=>{
|
|
7456
|
-
if (isFocused) return style;
|
|
7457
|
-
else if (style) return {
|
|
7458
|
-
...$5c3e21d68f1c4674$var$styles,
|
|
7459
|
-
...style
|
|
7460
|
-
};
|
|
7461
|
-
else return $5c3e21d68f1c4674$var$styles;
|
|
7462
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7463
|
-
}, [
|
|
7464
|
-
isFocused
|
|
7465
|
-
]);
|
|
7466
|
-
return {
|
|
7467
|
-
visuallyHiddenProps: {
|
|
7468
|
-
...focusWithinProps,
|
|
7469
|
-
style: combinedStyles
|
|
7470
|
-
}
|
|
7471
|
-
};
|
|
7472
|
-
}
|
|
7473
|
-
function $5c3e21d68f1c4674$export$439d29a4e110a164(props) {
|
|
7474
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7475
|
-
let { children: children, elementType: Element = 'div', isFocusable: isFocusable, style: style, ...otherProps } = props;
|
|
7476
|
-
let { visuallyHiddenProps: visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);
|
|
7477
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(Element, ($3ef42575df84b30b$export$9d1611c77c2fe928)(otherProps, visuallyHiddenProps), children);
|
|
7478
|
-
}
|
|
7479
|
-
|
|
7480
7637
|
function $parcel$interopDefault$5(a) {
|
|
7481
7638
|
return a && a.__esModule ? a.default : a;
|
|
7482
7639
|
}
|
|
@@ -7538,7 +7695,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
7538
7695
|
// Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is
|
|
7539
7696
|
// made for elements with role="row" since VoiceOver on iOS has issues hiding elements with role="row".
|
|
7540
7697
|
// For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).
|
|
7541
|
-
if (visibleNodes.has(node) || hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
|
|
7698
|
+
if (visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
|
|
7542
7699
|
// Skip this node but continue to children if one of the targets is inside the node.
|
|
7543
7700
|
for (let target of visibleNodes){
|
|
7544
7701
|
if (node.contains(target)) return NodeFilter.FILTER_SKIP;
|
|
@@ -7613,6 +7770,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
7613
7770
|
observer.disconnect();
|
|
7614
7771
|
for (let node of hiddenNodes){
|
|
7615
7772
|
let count = $5e3802645cc19319$var$refCountMap.get(node);
|
|
7773
|
+
if (count == null) continue;
|
|
7616
7774
|
if (count === 1) {
|
|
7617
7775
|
node.removeAttribute('aria-hidden');
|
|
7618
7776
|
$5e3802645cc19319$var$refCountMap.delete(node);
|
|
@@ -7644,7 +7802,8 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
7644
7802
|
function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
|
|
7645
7803
|
let { triggerRef: triggerRef, popoverRef: popoverRef, isNonModal: isNonModal, isKeyboardDismissDisabled: isKeyboardDismissDisabled, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside, ...otherProps } = props;
|
|
7646
7804
|
let { overlayProps: overlayProps, underlayProps: underlayProps } = ($a11501f3d1d39e6c$export$ea8f71083e90600f)({
|
|
7647
|
-
|
|
7805
|
+
// If popover is in the top layer, it should not prevent other popovers from being dismissed.
|
|
7806
|
+
isOpen: state.isOpen && !otherProps['data-react-aria-top-layer'],
|
|
7648
7807
|
onClose: state.close,
|
|
7649
7808
|
shouldCloseOnBlur: true,
|
|
7650
7809
|
isDismissable: !isNonModal,
|
|
@@ -7656,7 +7815,7 @@ function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
|
|
|
7656
7815
|
targetRef: triggerRef,
|
|
7657
7816
|
overlayRef: popoverRef,
|
|
7658
7817
|
isOpen: state.isOpen,
|
|
7659
|
-
onClose: isNonModal ? state.close :
|
|
7818
|
+
onClose: isNonModal ? state.close : undefined
|
|
7660
7819
|
});
|
|
7661
7820
|
($49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({
|
|
7662
7821
|
isDisabled: isNonModal || !state.isOpen
|
|
@@ -7774,7 +7933,7 @@ function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
|
7774
7933
|
});
|
|
7775
7934
|
($337b884510726a0d$export$14c98a7594375490)();
|
|
7776
7935
|
(useEffect)(()=>{
|
|
7777
|
-
if (state.isOpen) return ($5e3802645cc19319$export$1c3ebcada18427bf)([
|
|
7936
|
+
if (state.isOpen && ref.current) return ($5e3802645cc19319$export$1c3ebcada18427bf)([
|
|
7778
7937
|
ref.current
|
|
7779
7938
|
]);
|
|
7780
7939
|
}, [
|
|
@@ -7847,7 +8006,7 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
7847
8006
|
let { keyboardDelegate: keyboardDelegate, selectionManager: selectionManager, onTypeSelect: onTypeSelect } = options;
|
|
7848
8007
|
let state = (useRef)({
|
|
7849
8008
|
search: '',
|
|
7850
|
-
timeout:
|
|
8009
|
+
timeout: undefined
|
|
7851
8010
|
}).current;
|
|
7852
8011
|
let onKeyDown = (e)=>{
|
|
7853
8012
|
let character = $fb3050f43d946246$var$getStringForKey(e.key);
|
|
@@ -7861,14 +8020,16 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
7861
8020
|
if (!('continuePropagation' in e)) e.stopPropagation();
|
|
7862
8021
|
}
|
|
7863
8022
|
state.search += character;
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
8023
|
+
if (keyboardDelegate.getKeyForSearch != null) {
|
|
8024
|
+
// Use the delegate to find a key to focus.
|
|
8025
|
+
// Prioritize items after the currently focused item, falling back to searching the whole list.
|
|
8026
|
+
let key = keyboardDelegate.getKeyForSearch(state.search, selectionManager.focusedKey);
|
|
8027
|
+
// If no key found, search from the top.
|
|
8028
|
+
if (key == null) key = keyboardDelegate.getKeyForSearch(state.search);
|
|
8029
|
+
if (key != null) {
|
|
8030
|
+
selectionManager.setFocusedKey(key);
|
|
8031
|
+
if (onTypeSelect) onTypeSelect(key);
|
|
8032
|
+
}
|
|
7872
8033
|
}
|
|
7873
8034
|
clearTimeout(state.timeout);
|
|
7874
8035
|
state.timeout = setTimeout(()=>{
|
|
@@ -7879,7 +8040,7 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
7879
8040
|
typeSelectProps: {
|
|
7880
8041
|
// Using a capturing listener to catch the keydown event before
|
|
7881
8042
|
// other hooks in order to handle the Spacebar event.
|
|
7882
|
-
onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown :
|
|
8043
|
+
onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : undefined
|
|
7883
8044
|
}
|
|
7884
8045
|
};
|
|
7885
8046
|
}
|
|
@@ -7916,21 +8077,23 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7916
8077
|
let { direction: direction } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
7917
8078
|
let router = ($ea8dcbcb9ea1b556$export$9a302a45f65d0572)();
|
|
7918
8079
|
let onKeyDown = (e)=>{
|
|
8080
|
+
var _ref_current;
|
|
7919
8081
|
// Prevent option + tab from doing anything since it doesn't move focus to the cells, only buttons/checkboxes
|
|
7920
8082
|
if (e.altKey && e.key === 'Tab') e.preventDefault();
|
|
7921
8083
|
// Keyboard events bubble through portals. Don't handle keyboard events
|
|
7922
8084
|
// for elements outside the collection (e.g. menus).
|
|
7923
|
-
if (!ref.current.contains(e.target)) return;
|
|
8085
|
+
if (!((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(e.target))) return;
|
|
7924
8086
|
const navigateToKey = (key, childFocus)=>{
|
|
7925
8087
|
if (key != null) {
|
|
7926
8088
|
if (manager.isLink(key) && linkBehavior === 'selection' && selectOnFocus && !($feb5ffebff200149$export$d3e3bd3e26688c04)(e)) {
|
|
8089
|
+
var _scrollRef_current;
|
|
7927
8090
|
// Set focused key and re-render synchronously to bring item into view if needed.
|
|
7928
8091
|
(flushSync)(()=>{
|
|
7929
8092
|
manager.setFocusedKey(key, childFocus);
|
|
7930
8093
|
});
|
|
7931
|
-
let item = scrollRef.current.querySelector(`[data-key="${CSS.escape(key.toString())}"]`);
|
|
8094
|
+
let item = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.querySelector(`[data-key="${CSS.escape(key.toString())}"]`);
|
|
7932
8095
|
let itemProps = manager.getItemProps(key);
|
|
7933
|
-
router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
8096
|
+
if (item) router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
7934
8097
|
return;
|
|
7935
8098
|
}
|
|
7936
8099
|
manager.setFocusedKey(key, childFocus);
|
|
@@ -7942,38 +8105,46 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7942
8105
|
switch(e.key){
|
|
7943
8106
|
case 'ArrowDown':
|
|
7944
8107
|
if (delegate.getKeyBelow) {
|
|
7945
|
-
var _delegate_getFirstKey, _delegate_getFirstKey1;
|
|
7946
|
-
|
|
7947
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow(manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
|
|
8108
|
+
var _delegate_getKeyBelow, _delegate_getFirstKey, _delegate_getFirstKey1;
|
|
8109
|
+
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);
|
|
7948
8110
|
if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
|
|
7949
|
-
|
|
8111
|
+
if (nextKey != null) {
|
|
8112
|
+
e.preventDefault();
|
|
8113
|
+
navigateToKey(nextKey);
|
|
8114
|
+
}
|
|
7950
8115
|
}
|
|
7951
8116
|
break;
|
|
7952
8117
|
case 'ArrowUp':
|
|
7953
8118
|
if (delegate.getKeyAbove) {
|
|
7954
|
-
var _delegate_getLastKey, _delegate_getLastKey1;
|
|
7955
|
-
|
|
7956
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove(manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
|
|
8119
|
+
var _delegate_getKeyAbove, _delegate_getLastKey, _delegate_getLastKey1;
|
|
8120
|
+
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);
|
|
7957
8121
|
if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey);
|
|
7958
|
-
|
|
8122
|
+
if (nextKey != null) {
|
|
8123
|
+
e.preventDefault();
|
|
8124
|
+
navigateToKey(nextKey);
|
|
8125
|
+
}
|
|
7959
8126
|
}
|
|
7960
8127
|
break;
|
|
7961
8128
|
case 'ArrowLeft':
|
|
7962
8129
|
if (delegate.getKeyLeftOf) {
|
|
7963
|
-
var _delegate_getFirstKey2, _delegate_getLastKey2;
|
|
7964
|
-
|
|
7965
|
-
let nextKey = delegate.getKeyLeftOf(manager.focusedKey);
|
|
8130
|
+
var _delegate_getKeyLeftOf, _delegate_getFirstKey2, _delegate_getLastKey2;
|
|
8131
|
+
let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === void 0 ? void 0 : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
|
|
7966
8132
|
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);
|
|
7967
|
-
|
|
8133
|
+
if (nextKey != null) {
|
|
8134
|
+
e.preventDefault();
|
|
8135
|
+
navigateToKey(nextKey, direction === 'rtl' ? 'first' : 'last');
|
|
8136
|
+
}
|
|
7968
8137
|
}
|
|
7969
8138
|
break;
|
|
7970
8139
|
case 'ArrowRight':
|
|
7971
8140
|
if (delegate.getKeyRightOf) {
|
|
7972
|
-
var _delegate_getLastKey3, _delegate_getFirstKey3;
|
|
7973
|
-
|
|
7974
|
-
let nextKey = delegate.getKeyRightOf(manager.focusedKey);
|
|
8141
|
+
var _delegate_getKeyRightOf, _delegate_getLastKey3, _delegate_getFirstKey3;
|
|
8142
|
+
let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === void 0 ? void 0 : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
|
|
7975
8143
|
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);
|
|
7976
|
-
|
|
8144
|
+
if (nextKey != null) {
|
|
8145
|
+
e.preventDefault();
|
|
8146
|
+
navigateToKey(nextKey, direction === 'rtl' ? 'last' : 'first');
|
|
8147
|
+
}
|
|
7977
8148
|
}
|
|
7978
8149
|
break;
|
|
7979
8150
|
case 'Home':
|
|
@@ -7981,8 +8152,10 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7981
8152
|
e.preventDefault();
|
|
7982
8153
|
let firstKey = delegate.getFirstKey(manager.focusedKey, ($feb5ffebff200149$export$16792effe837dba3)(e));
|
|
7983
8154
|
manager.setFocusedKey(firstKey);
|
|
7984
|
-
if (
|
|
7985
|
-
|
|
8155
|
+
if (firstKey != null) {
|
|
8156
|
+
if (($feb5ffebff200149$export$16792effe837dba3)(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(firstKey);
|
|
8157
|
+
else if (selectOnFocus) manager.replaceSelection(firstKey);
|
|
8158
|
+
}
|
|
7986
8159
|
}
|
|
7987
8160
|
break;
|
|
7988
8161
|
case 'End':
|
|
@@ -7990,22 +8163,28 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
7990
8163
|
e.preventDefault();
|
|
7991
8164
|
let lastKey = delegate.getLastKey(manager.focusedKey, ($feb5ffebff200149$export$16792effe837dba3)(e));
|
|
7992
8165
|
manager.setFocusedKey(lastKey);
|
|
7993
|
-
if (
|
|
7994
|
-
|
|
8166
|
+
if (lastKey != null) {
|
|
8167
|
+
if (($feb5ffebff200149$export$16792effe837dba3)(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(lastKey);
|
|
8168
|
+
else if (selectOnFocus) manager.replaceSelection(lastKey);
|
|
8169
|
+
}
|
|
7995
8170
|
}
|
|
7996
8171
|
break;
|
|
7997
8172
|
case 'PageDown':
|
|
7998
|
-
if (delegate.getKeyPageBelow) {
|
|
7999
|
-
e.preventDefault();
|
|
8173
|
+
if (delegate.getKeyPageBelow && manager.focusedKey != null) {
|
|
8000
8174
|
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
|
|
8001
|
-
|
|
8175
|
+
if (nextKey != null) {
|
|
8176
|
+
e.preventDefault();
|
|
8177
|
+
navigateToKey(nextKey);
|
|
8178
|
+
}
|
|
8002
8179
|
}
|
|
8003
8180
|
break;
|
|
8004
8181
|
case 'PageUp':
|
|
8005
|
-
if (delegate.getKeyPageAbove) {
|
|
8006
|
-
e.preventDefault();
|
|
8182
|
+
if (delegate.getKeyPageAbove && manager.focusedKey != null) {
|
|
8007
8183
|
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
|
|
8008
|
-
|
|
8184
|
+
if (nextKey != null) {
|
|
8185
|
+
e.preventDefault();
|
|
8186
|
+
navigateToKey(nextKey);
|
|
8187
|
+
}
|
|
8009
8188
|
}
|
|
8010
8189
|
break;
|
|
8011
8190
|
case 'a':
|
|
@@ -8034,7 +8213,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8034
8213
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
|
|
8035
8214
|
tabbable: true
|
|
8036
8215
|
});
|
|
8037
|
-
let next;
|
|
8216
|
+
let next = undefined;
|
|
8038
8217
|
let last;
|
|
8039
8218
|
do {
|
|
8040
8219
|
last = walker.lastChild();
|
|
@@ -8052,10 +8231,12 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8052
8231
|
top: 0,
|
|
8053
8232
|
left: 0
|
|
8054
8233
|
});
|
|
8055
|
-
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll', isVirtualized ?
|
|
8234
|
+
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll', isVirtualized ? undefined : ()=>{
|
|
8235
|
+
var _scrollRef_current, _scrollRef_current1;
|
|
8236
|
+
var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
|
|
8056
8237
|
scrollPos.current = {
|
|
8057
|
-
top: scrollRef.current.scrollTop,
|
|
8058
|
-
left: scrollRef.current.scrollLeft
|
|
8238
|
+
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,
|
|
8239
|
+
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
|
|
8059
8240
|
};
|
|
8060
8241
|
});
|
|
8061
8242
|
let onFocus = (e)=>{
|
|
@@ -8068,6 +8249,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8068
8249
|
if (!e.currentTarget.contains(e.target)) return;
|
|
8069
8250
|
manager.setFocused(true);
|
|
8070
8251
|
if (manager.focusedKey == null) {
|
|
8252
|
+
var _delegate_getLastKey, _delegate_getFirstKey;
|
|
8071
8253
|
let navigateToFirstKey = (key)=>{
|
|
8072
8254
|
if (key != null) {
|
|
8073
8255
|
manager.setFocusedKey(key);
|
|
@@ -8079,14 +8261,14 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8079
8261
|
// and either focus the first or last item accordingly.
|
|
8080
8262
|
let relatedTarget = e.relatedTarget;
|
|
8081
8263
|
var _manager_lastSelectedKey, _manager_firstSelectedKey;
|
|
8082
|
-
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToFirstKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : delegate.getLastKey());
|
|
8083
|
-
else navigateToFirstKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : delegate.getFirstKey());
|
|
8084
|
-
} else if (!isVirtualized) {
|
|
8264
|
+
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));
|
|
8265
|
+
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));
|
|
8266
|
+
} else if (!isVirtualized && scrollRef.current) {
|
|
8085
8267
|
// Restore the scroll position to what it was before.
|
|
8086
8268
|
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
8087
8269
|
scrollRef.current.scrollLeft = scrollPos.current.left;
|
|
8088
8270
|
}
|
|
8089
|
-
if (manager.focusedKey != null) {
|
|
8271
|
+
if (manager.focusedKey != null && scrollRef.current) {
|
|
8090
8272
|
// Refocus and scroll the focused item into view if it exists within the scrollable region.
|
|
8091
8273
|
let element = scrollRef.current.querySelector(`[data-key="${CSS.escape(manager.focusedKey.toString())}"]`);
|
|
8092
8274
|
if (element) {
|
|
@@ -8106,10 +8288,13 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8106
8288
|
const autoFocusRef = (useRef)(autoFocus);
|
|
8107
8289
|
(useEffect)(()=>{
|
|
8108
8290
|
if (autoFocusRef.current) {
|
|
8291
|
+
var _delegate_getFirstKey, _delegate_getLastKey;
|
|
8109
8292
|
let focusedKey = null;
|
|
8293
|
+
var _delegate_getFirstKey1;
|
|
8110
8294
|
// Check focus strategy to determine which item to focus
|
|
8111
|
-
if (autoFocus === 'first') focusedKey = delegate.getFirstKey();
|
|
8112
|
-
|
|
8295
|
+
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;
|
|
8296
|
+
var _delegate_getLastKey1;
|
|
8297
|
+
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;
|
|
8113
8298
|
// If there are any selected keys, make the first one the new focus target
|
|
8114
8299
|
let selectedKeys = manager.selectedKeys;
|
|
8115
8300
|
if (selectedKeys.size) {
|
|
@@ -8121,14 +8306,14 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8121
8306
|
manager.setFocused(true);
|
|
8122
8307
|
manager.setFocusedKey(focusedKey);
|
|
8123
8308
|
// If no default focus key is selected, focus the collection itself.
|
|
8124
|
-
if (focusedKey == null && !shouldUseVirtualFocus) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8309
|
+
if (focusedKey == null && !shouldUseVirtualFocus && ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8125
8310
|
}
|
|
8126
8311
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8127
8312
|
}, []);
|
|
8128
8313
|
// Scroll the focused element into view when the focusedKey changes.
|
|
8129
8314
|
let lastFocusedKey = (useRef)(manager.focusedKey);
|
|
8130
8315
|
(useEffect)(()=>{
|
|
8131
|
-
if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || autoFocusRef.current) &&
|
|
8316
|
+
if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || autoFocusRef.current) && scrollRef.current && ref.current) {
|
|
8132
8317
|
let modality = ($507fabe10e71c6fb$export$630ff653c5ada6a9)();
|
|
8133
8318
|
let element = ref.current.querySelector(`[data-key="${CSS.escape(manager.focusedKey.toString())}"]`);
|
|
8134
8319
|
if (!element) // If item element wasn't found, return early (don't update autoFocusRef and lastFocusedKey).
|
|
@@ -8143,7 +8328,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8143
8328
|
}
|
|
8144
8329
|
}
|
|
8145
8330
|
// If the focused key becomes null (e.g. the last item is deleted), focus the whole collection.
|
|
8146
|
-
if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8331
|
+
if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null && ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8147
8332
|
lastFocusedKey.current = manager.focusedKey;
|
|
8148
8333
|
autoFocusRef.current = false;
|
|
8149
8334
|
});
|
|
@@ -8171,7 +8356,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
8171
8356
|
// This will be marshalled to either the first or last item depending on where focus came from.
|
|
8172
8357
|
// If using virtual focus, don't set a tabIndex at all so that VoiceOver on iOS 14 doesn't try
|
|
8173
8358
|
// to move real DOM focus to the element anyway.
|
|
8174
|
-
let tabIndex;
|
|
8359
|
+
let tabIndex = undefined;
|
|
8175
8360
|
if (!shouldUseVirtualFocus) tabIndex = manager.focusedKey == null ? 0 : -1;
|
|
8176
8361
|
return {
|
|
8177
8362
|
collectionProps: {
|
|
@@ -8204,7 +8389,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8204
8389
|
else {
|
|
8205
8390
|
if (manager.selectionMode === 'none') return;
|
|
8206
8391
|
if (manager.isLink(key)) {
|
|
8207
|
-
if (linkBehavior === 'selection') {
|
|
8392
|
+
if (linkBehavior === 'selection' && ref.current) {
|
|
8208
8393
|
let itemProps = manager.getItemProps(key);
|
|
8209
8394
|
router.open(ref.current, e, itemProps.href, itemProps.routerOptions);
|
|
8210
8395
|
// Always set selected keys back to what they were so that select and combobox close.
|
|
@@ -8226,7 +8411,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8226
8411
|
let isFocused = key === manager.focusedKey;
|
|
8227
8412
|
if (isFocused && manager.isFocused && !shouldUseVirtualFocus) {
|
|
8228
8413
|
if (focus) focus();
|
|
8229
|
-
else if (document.activeElement !== ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8414
|
+
else if (document.activeElement !== ref.current && ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
8230
8415
|
}
|
|
8231
8416
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8232
8417
|
}, [
|
|
@@ -8269,7 +8454,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8269
8454
|
let hadPrimaryActionOnPressStart = (useRef)(false);
|
|
8270
8455
|
let performAction = (e)=>{
|
|
8271
8456
|
if (onAction) onAction();
|
|
8272
|
-
if (hasLinkAction) {
|
|
8457
|
+
if (hasLinkAction && ref.current) {
|
|
8273
8458
|
let itemProps = manager.getItemProps(key);
|
|
8274
8459
|
router.open(ref.current, e, itemProps.href, itemProps.routerOptions);
|
|
8275
8460
|
}
|
|
@@ -8297,10 +8482,10 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
8297
8482
|
} else if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
|
|
8298
8483
|
};
|
|
8299
8484
|
else {
|
|
8300
|
-
itemPressProps.onPressUp = hasPrimaryAction ?
|
|
8485
|
+
itemPressProps.onPressUp = hasPrimaryAction ? undefined : (e)=>{
|
|
8301
8486
|
if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
|
|
8302
8487
|
};
|
|
8303
|
-
itemPressProps.onPress = hasPrimaryAction ? performAction :
|
|
8488
|
+
itemPressProps.onPress = hasPrimaryAction ? performAction : undefined;
|
|
8304
8489
|
}
|
|
8305
8490
|
} else {
|
|
8306
8491
|
itemPressProps.onPressStart = (e)=>{
|
|
@@ -8393,6 +8578,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
8393
8578
|
*/ class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
8394
8579
|
getItemRect(key) {
|
|
8395
8580
|
let container = this.ref.current;
|
|
8581
|
+
if (!container) return null;
|
|
8396
8582
|
let item = key != null ? container.querySelector(`[data-key="${CSS.escape(key.toString())}"]`) : null;
|
|
8397
8583
|
if (!item) return null;
|
|
8398
8584
|
let containerRect = container.getBoundingClientRect();
|
|
@@ -8406,18 +8592,20 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
8406
8592
|
}
|
|
8407
8593
|
getContentSize() {
|
|
8408
8594
|
let container = this.ref.current;
|
|
8595
|
+
var _container_scrollWidth, _container_scrollHeight;
|
|
8409
8596
|
return {
|
|
8410
|
-
width: container.scrollWidth,
|
|
8411
|
-
height: container.scrollHeight
|
|
8597
|
+
width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
|
|
8598
|
+
height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
|
|
8412
8599
|
};
|
|
8413
8600
|
}
|
|
8414
8601
|
getVisibleRect() {
|
|
8415
8602
|
let container = this.ref.current;
|
|
8603
|
+
var _container_scrollLeft, _container_scrollTop, _container_offsetWidth, _container_offsetHeight;
|
|
8416
8604
|
return {
|
|
8417
|
-
x: container.scrollLeft,
|
|
8418
|
-
y: container.scrollTop,
|
|
8419
|
-
width: container.offsetWidth,
|
|
8420
|
-
height: container.offsetHeight
|
|
8605
|
+
x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
|
|
8606
|
+
y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
|
|
8607
|
+
width: (_container_offsetWidth = container === null || container === void 0 ? void 0 : container.offsetWidth) !== null && _container_offsetWidth !== void 0 ? _container_offsetWidth : 0,
|
|
8608
|
+
height: (_container_offsetHeight = container === null || container === void 0 ? void 0 : container.offsetHeight) !== null && _container_offsetHeight !== void 0 ? _container_offsetHeight : 0
|
|
8421
8609
|
};
|
|
8422
8610
|
}
|
|
8423
8611
|
constructor(ref){
|
|
@@ -8442,34 +8630,37 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8442
8630
|
var _item_props;
|
|
8443
8631
|
return this.disabledBehavior === 'all' && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
|
|
8444
8632
|
}
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
while(
|
|
8448
|
-
let item = this.collection.getItem(
|
|
8449
|
-
if (item.type === 'item' && !this.isDisabled(item)) return
|
|
8450
|
-
|
|
8633
|
+
findNextNonDisabled(key, getNext) {
|
|
8634
|
+
let nextKey = key;
|
|
8635
|
+
while(nextKey != null){
|
|
8636
|
+
let item = this.collection.getItem(nextKey);
|
|
8637
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === 'item' && !this.isDisabled(item)) return nextKey;
|
|
8638
|
+
nextKey = getNext(nextKey);
|
|
8451
8639
|
}
|
|
8452
8640
|
return null;
|
|
8453
8641
|
}
|
|
8642
|
+
getNextKey(key) {
|
|
8643
|
+
let nextKey = key;
|
|
8644
|
+
nextKey = this.collection.getKeyAfter(nextKey);
|
|
8645
|
+
return this.findNextNonDisabled(nextKey, (key)=>this.collection.getKeyAfter(key));
|
|
8646
|
+
}
|
|
8454
8647
|
getPreviousKey(key) {
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
if (item.type === 'item' && !this.isDisabled(item)) return key;
|
|
8459
|
-
key = this.collection.getKeyBefore(key);
|
|
8460
|
-
}
|
|
8461
|
-
return null;
|
|
8648
|
+
let nextKey = key;
|
|
8649
|
+
nextKey = this.collection.getKeyBefore(nextKey);
|
|
8650
|
+
return this.findNextNonDisabled(nextKey, (key)=>this.collection.getKeyBefore(key));
|
|
8462
8651
|
}
|
|
8463
8652
|
findKey(key, nextKey, shouldSkip) {
|
|
8464
|
-
let
|
|
8465
|
-
|
|
8653
|
+
let tempKey = key;
|
|
8654
|
+
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
8655
|
+
if (!itemRect || tempKey == null) return null;
|
|
8466
8656
|
// Find the item above or below in the same column.
|
|
8467
8657
|
let prevRect = itemRect;
|
|
8468
8658
|
do {
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8659
|
+
tempKey = nextKey(tempKey);
|
|
8660
|
+
if (tempKey == null) break;
|
|
8661
|
+
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
8662
|
+
}while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
8663
|
+
return tempKey;
|
|
8473
8664
|
}
|
|
8474
8665
|
isSameRow(prevRect, itemRect) {
|
|
8475
8666
|
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
@@ -8489,6 +8680,13 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8489
8680
|
return right ? this.getPreviousKey(key) : this.getNextKey(key);
|
|
8490
8681
|
}
|
|
8491
8682
|
getKeyRightOf(key) {
|
|
8683
|
+
// This is a temporary solution for CardView until we refactor useSelectableCollection.
|
|
8684
|
+
// https://github.com/orgs/adobe/projects/19/views/32?pane=issue&itemId=77825042
|
|
8685
|
+
let layoutDelegateMethod = this.direction === 'ltr' ? 'getKeyRightOf' : 'getKeyLeftOf';
|
|
8686
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
8687
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
8688
|
+
return this.findNextNonDisabled(key, (key)=>this.layoutDelegate[layoutDelegateMethod](key));
|
|
8689
|
+
}
|
|
8492
8690
|
if (this.layout === 'grid') {
|
|
8493
8691
|
if (this.orientation === 'vertical') return this.getNextColumn(key, this.direction === 'rtl');
|
|
8494
8692
|
else return this.findKey(key, (key)=>this.getNextColumn(key, this.direction === 'rtl'), this.isSameColumn);
|
|
@@ -8496,6 +8694,11 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8496
8694
|
return null;
|
|
8497
8695
|
}
|
|
8498
8696
|
getKeyLeftOf(key) {
|
|
8697
|
+
let layoutDelegateMethod = this.direction === 'ltr' ? 'getKeyLeftOf' : 'getKeyRightOf';
|
|
8698
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
8699
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
8700
|
+
return this.findNextNonDisabled(key, (key)=>this.layoutDelegate[layoutDelegateMethod](key));
|
|
8701
|
+
}
|
|
8499
8702
|
if (this.layout === 'grid') {
|
|
8500
8703
|
if (this.orientation === 'vertical') return this.getNextColumn(key, this.direction === 'ltr');
|
|
8501
8704
|
else return this.findKey(key, (key)=>this.getNextColumn(key, this.direction === 'ltr'), this.isSameColumn);
|
|
@@ -8504,61 +8707,53 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8504
8707
|
}
|
|
8505
8708
|
getFirstKey() {
|
|
8506
8709
|
let key = this.collection.getFirstKey();
|
|
8507
|
-
|
|
8508
|
-
let item = this.collection.getItem(key);
|
|
8509
|
-
if ((item === null || item === void 0 ? void 0 : item.type) === 'item' && !this.isDisabled(item)) return key;
|
|
8510
|
-
key = this.collection.getKeyAfter(key);
|
|
8511
|
-
}
|
|
8512
|
-
return null;
|
|
8710
|
+
return this.findNextNonDisabled(key, (key)=>this.collection.getKeyAfter(key));
|
|
8513
8711
|
}
|
|
8514
8712
|
getLastKey() {
|
|
8515
8713
|
let key = this.collection.getLastKey();
|
|
8516
|
-
|
|
8517
|
-
let item = this.collection.getItem(key);
|
|
8518
|
-
if (item.type === 'item' && !this.isDisabled(item)) return key;
|
|
8519
|
-
key = this.collection.getKeyBefore(key);
|
|
8520
|
-
}
|
|
8521
|
-
return null;
|
|
8714
|
+
return this.findNextNonDisabled(key, (key)=>this.collection.getKeyBefore(key));
|
|
8522
8715
|
}
|
|
8523
8716
|
getKeyPageAbove(key) {
|
|
8524
8717
|
let menu = this.ref.current;
|
|
8525
8718
|
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
8526
8719
|
if (!itemRect) return null;
|
|
8527
|
-
if (!($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getFirstKey();
|
|
8720
|
+
if (menu && !($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getFirstKey();
|
|
8721
|
+
let nextKey = key;
|
|
8528
8722
|
if (this.orientation === 'horizontal') {
|
|
8529
8723
|
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
8530
|
-
while(itemRect && itemRect.x > pageX){
|
|
8531
|
-
|
|
8532
|
-
itemRect =
|
|
8724
|
+
while(itemRect && itemRect.x > pageX && nextKey != null){
|
|
8725
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
8726
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8533
8727
|
}
|
|
8534
8728
|
} else {
|
|
8535
8729
|
let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
|
|
8536
|
-
while(itemRect && itemRect.y > pageY){
|
|
8537
|
-
|
|
8538
|
-
itemRect =
|
|
8730
|
+
while(itemRect && itemRect.y > pageY && nextKey != null){
|
|
8731
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
8732
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8539
8733
|
}
|
|
8540
8734
|
}
|
|
8541
|
-
return
|
|
8735
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
|
|
8542
8736
|
}
|
|
8543
8737
|
getKeyPageBelow(key) {
|
|
8544
8738
|
let menu = this.ref.current;
|
|
8545
8739
|
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
8546
8740
|
if (!itemRect) return null;
|
|
8547
|
-
if (!($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getLastKey();
|
|
8741
|
+
if (menu && !($cc38e7bd3fc7b213$export$2bb74740c4e19def)(menu)) return this.getLastKey();
|
|
8742
|
+
let nextKey = key;
|
|
8548
8743
|
if (this.orientation === 'horizontal') {
|
|
8549
8744
|
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
8550
|
-
while(itemRect && itemRect.x < pageX){
|
|
8551
|
-
|
|
8552
|
-
itemRect =
|
|
8745
|
+
while(itemRect && itemRect.x < pageX && nextKey != null){
|
|
8746
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
8747
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8553
8748
|
}
|
|
8554
8749
|
} else {
|
|
8555
8750
|
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
8556
|
-
while(itemRect && itemRect.y < pageY){
|
|
8557
|
-
|
|
8558
|
-
itemRect =
|
|
8751
|
+
while(itemRect && itemRect.y < pageY && nextKey != null){
|
|
8752
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
8753
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
8559
8754
|
}
|
|
8560
8755
|
}
|
|
8561
|
-
return
|
|
8756
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
|
|
8562
8757
|
}
|
|
8563
8758
|
getKeyForSearch(search, fromKey) {
|
|
8564
8759
|
if (!this.collator) return null;
|
|
@@ -8566,9 +8761,10 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
8566
8761
|
let key = fromKey || this.getFirstKey();
|
|
8567
8762
|
while(key != null){
|
|
8568
8763
|
let item = collection.getItem(key);
|
|
8764
|
+
if (!item) return null;
|
|
8569
8765
|
let substring = item.textValue.slice(0, search.length);
|
|
8570
8766
|
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
8571
|
-
key = this.
|
|
8767
|
+
key = this.getNextKey(key);
|
|
8572
8768
|
}
|
|
8573
8769
|
return null;
|
|
8574
8770
|
}
|
|
@@ -8739,17 +8935,26 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8739
8935
|
}
|
|
8740
8936
|
*iterateCollection(props) {
|
|
8741
8937
|
let { children: children, items: items } = props;
|
|
8742
|
-
if (
|
|
8938
|
+
if (($dbSRa$react).isValidElement(children) && children.type === ($dbSRa$react).Fragment) yield* this.iterateCollection({
|
|
8939
|
+
children: children.props.children,
|
|
8940
|
+
items: items
|
|
8941
|
+
});
|
|
8942
|
+
else if (typeof children === 'function') {
|
|
8743
8943
|
if (!items) throw new Error('props.children was a function but props.items is missing');
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8944
|
+
let index = 0;
|
|
8945
|
+
for (let item of items){
|
|
8946
|
+
yield* this.getFullNode({
|
|
8947
|
+
value: item,
|
|
8948
|
+
index: index
|
|
8949
|
+
}, {
|
|
8950
|
+
renderer: children
|
|
8951
|
+
});
|
|
8952
|
+
index++;
|
|
8953
|
+
}
|
|
8749
8954
|
} else {
|
|
8750
8955
|
let items = [];
|
|
8751
8956
|
($dbSRa$react).Children.forEach(children, (child)=>{
|
|
8752
|
-
items.push(child);
|
|
8957
|
+
if (child) items.push(child);
|
|
8753
8958
|
});
|
|
8754
8959
|
let index = 0;
|
|
8755
8960
|
for (let item of items){
|
|
@@ -8782,6 +8987,19 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8782
8987
|
};
|
|
8783
8988
|
}
|
|
8784
8989
|
*getFullNode(partialNode, state, parentKey, parentNode) {
|
|
8990
|
+
if (($dbSRa$react).isValidElement(partialNode.element) && partialNode.element.type === ($dbSRa$react).Fragment) {
|
|
8991
|
+
let children = [];
|
|
8992
|
+
($dbSRa$react).Children.forEach(partialNode.element.props.children, (child)=>{
|
|
8993
|
+
children.push(child);
|
|
8994
|
+
});
|
|
8995
|
+
var _partialNode_index;
|
|
8996
|
+
let index = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== void 0 ? _partialNode_index : 0;
|
|
8997
|
+
for (const child of children)yield* this.getFullNode({
|
|
8998
|
+
element: child,
|
|
8999
|
+
index: index++
|
|
9000
|
+
}, state, parentKey, parentNode);
|
|
9001
|
+
return;
|
|
9002
|
+
}
|
|
8785
9003
|
// If there's a value instead of an element on the node, and a parent renderer function is available,
|
|
8786
9004
|
// use it to render an element for the value.
|
|
8787
9005
|
let element = partialNode.element;
|
|
@@ -8800,17 +9018,19 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8800
9018
|
if (($dbSRa$react).isValidElement(element)) {
|
|
8801
9019
|
let type = element.type;
|
|
8802
9020
|
if (typeof type !== 'function' && typeof type.getCollectionNode !== 'function') {
|
|
8803
|
-
let name =
|
|
9021
|
+
let name = element.type;
|
|
8804
9022
|
throw new Error(`Unknown element <${name}> in collection.`);
|
|
8805
9023
|
}
|
|
8806
9024
|
let childNodes = type.getCollectionNode(element.props, this.context);
|
|
8807
|
-
|
|
9025
|
+
var _partialNode_index1;
|
|
9026
|
+
let index = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== void 0 ? _partialNode_index1 : 0;
|
|
8808
9027
|
let result = childNodes.next();
|
|
8809
9028
|
while(!result.done && result.value){
|
|
8810
9029
|
let childNode = result.value;
|
|
8811
9030
|
partialNode.index = index;
|
|
8812
|
-
|
|
8813
|
-
|
|
9031
|
+
var _childNode_key;
|
|
9032
|
+
let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== void 0 ? _childNode_key : null;
|
|
9033
|
+
if (nodeKey == null) nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
|
|
8814
9034
|
let nodes = this.getFullNode({
|
|
8815
9035
|
...childNode,
|
|
8816
9036
|
key: nodeKey,
|
|
@@ -8821,12 +9041,14 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8821
9041
|
...nodes
|
|
8822
9042
|
];
|
|
8823
9043
|
for (let node of children){
|
|
9044
|
+
var _childNode_value, _ref;
|
|
8824
9045
|
// Cache the node based on its value
|
|
8825
|
-
node.value = childNode.value
|
|
9046
|
+
node.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== void 0 ? _childNode_value : partialNode.value) !== null && _ref !== void 0 ? _ref : null;
|
|
8826
9047
|
if (node.value) this.cache.set(node.value, node);
|
|
9048
|
+
var _parentNode_type;
|
|
8827
9049
|
// The partial node may have specified a type for the child in order to specify a constraint.
|
|
8828
9050
|
// Verify that the full node that was built recursively matches this type.
|
|
8829
|
-
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.`);
|
|
9051
|
+
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.`);
|
|
8830
9052
|
index++;
|
|
8831
9053
|
yield node;
|
|
8832
9054
|
}
|
|
@@ -8835,25 +9057,26 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8835
9057
|
return;
|
|
8836
9058
|
}
|
|
8837
9059
|
// Ignore invalid elements
|
|
8838
|
-
if (partialNode.key == null) return;
|
|
9060
|
+
if (partialNode.key == null || partialNode.type == null) return;
|
|
8839
9061
|
// Create full node
|
|
8840
9062
|
let builder = this;
|
|
9063
|
+
var _partialNode_value, _partialNode_textValue;
|
|
8841
9064
|
let node = {
|
|
8842
9065
|
type: partialNode.type,
|
|
8843
9066
|
props: partialNode.props,
|
|
8844
9067
|
key: partialNode.key,
|
|
8845
9068
|
parentKey: parentNode ? parentNode.key : null,
|
|
8846
|
-
value: partialNode.value,
|
|
9069
|
+
value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== void 0 ? _partialNode_value : null,
|
|
8847
9070
|
level: parentNode ? parentNode.level + 1 : 0,
|
|
8848
9071
|
index: partialNode.index,
|
|
8849
9072
|
rendered: partialNode.rendered,
|
|
8850
|
-
textValue: partialNode.textValue,
|
|
9073
|
+
textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== void 0 ? _partialNode_textValue : '',
|
|
8851
9074
|
'aria-label': partialNode['aria-label'],
|
|
8852
9075
|
wrapper: partialNode.wrapper,
|
|
8853
9076
|
shouldInvalidate: partialNode.shouldInvalidate,
|
|
8854
|
-
hasChildNodes: partialNode.hasChildNodes,
|
|
9077
|
+
hasChildNodes: partialNode.hasChildNodes || false,
|
|
8855
9078
|
childNodes: $eb2240fc39a57fa5$var$iterable(function*() {
|
|
8856
|
-
if (!partialNode.hasChildNodes) return;
|
|
9079
|
+
if (!partialNode.hasChildNodes || !partialNode.childNodes) return;
|
|
8857
9080
|
let index = 0;
|
|
8858
9081
|
for (let child of partialNode.childNodes()){
|
|
8859
9082
|
// Ensure child keys are globally unique by prepending the parent node's key
|
|
@@ -8862,8 +9085,10 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
|
8862
9085
|
// but another parent has key `ab` and its child has a key `c`. The combined keys would result in both
|
|
8863
9086
|
// children having a key of `abc`.
|
|
8864
9087
|
child.key = `${node.key}${child.key}`;
|
|
8865
|
-
|
|
8866
|
-
|
|
9088
|
+
let nodes = builder.getFullNode({
|
|
9089
|
+
...child,
|
|
9090
|
+
index: index
|
|
9091
|
+
}, builder.getChildState(state, child), node.key, node);
|
|
8867
9092
|
for (let node of nodes){
|
|
8868
9093
|
index++;
|
|
8869
9094
|
yield node;
|
|
@@ -8992,9 +9217,10 @@ function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
|
|
|
8992
9217
|
}
|
|
8993
9218
|
function $c5a24bc478652b5f$var$getAncestors(collection, node) {
|
|
8994
9219
|
let parents = [];
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
9220
|
+
let currNode = node;
|
|
9221
|
+
while((currNode === null || currNode === void 0 ? void 0 : currNode.parentKey) != null){
|
|
9222
|
+
currNode = collection.getItem(currNode.parentKey);
|
|
9223
|
+
if (currNode) parents.unshift(currNode);
|
|
8998
9224
|
}
|
|
8999
9225
|
return parents;
|
|
9000
9226
|
}
|
|
@@ -9014,14 +9240,15 @@ const $453cc9f0df89c0a5$var$cache = new WeakMap();
|
|
|
9014
9240
|
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
9015
9241
|
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
9016
9242
|
if (count != null) return count;
|
|
9017
|
-
count
|
|
9243
|
+
// TS isn't smart enough to know we've ensured count is a number, so use a new variable
|
|
9244
|
+
let counter = 0;
|
|
9018
9245
|
let countItems = (items)=>{
|
|
9019
9246
|
for (let item of items)if (item.type === 'section') countItems(($c5a24bc478652b5f$export$1005530eda016c13)(item, collection));
|
|
9020
|
-
else
|
|
9247
|
+
else counter++;
|
|
9021
9248
|
};
|
|
9022
9249
|
countItems(collection);
|
|
9023
|
-
$453cc9f0df89c0a5$var$cache.set(collection,
|
|
9024
|
-
return
|
|
9250
|
+
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
9251
|
+
return counter;
|
|
9025
9252
|
}
|
|
9026
9253
|
|
|
9027
9254
|
/*
|
|
@@ -9460,136 +9687,33 @@ function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
9460
9687
|
state.open('first');
|
|
9461
9688
|
}
|
|
9462
9689
|
});
|
|
9463
|
-
let pressProps = {
|
|
9464
|
-
onPressStart (e) {
|
|
9465
|
-
// For consistency with native, open the menu on mouse/key down, but touch up.
|
|
9466
|
-
if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) // If opened with a screen reader, auto focus the first item.
|
|
9467
|
-
// Otherwise, the menu itself will be focused.
|
|
9468
|
-
state.open(e.pointerType === 'virtual' ? 'first' : null);
|
|
9469
|
-
},
|
|
9470
|
-
onPress (e) {
|
|
9471
|
-
if (e.pointerType === 'touch' && !isDisabled) state.toggle();
|
|
9472
|
-
}
|
|
9473
|
-
};
|
|
9474
|
-
// omit onPress from triggerProps since we override it above.
|
|
9475
|
-
delete triggerProps.onPress;
|
|
9476
|
-
return {
|
|
9477
|
-
menuTriggerProps: {
|
|
9478
|
-
...triggerProps,
|
|
9479
|
-
...trigger === 'press' ? pressProps : longPressProps,
|
|
9480
|
-
id: menuTriggerId,
|
|
9481
|
-
onKeyDown: onKeyDown
|
|
9482
|
-
},
|
|
9483
|
-
menuProps: {
|
|
9484
|
-
...overlayProps,
|
|
9485
|
-
'aria-labelledby': menuTriggerId,
|
|
9486
|
-
autoFocus: state.focusStrategy || true,
|
|
9487
|
-
onClose: state.close
|
|
9488
|
-
}
|
|
9489
|
-
};
|
|
9490
|
-
}
|
|
9491
|
-
|
|
9492
|
-
/*
|
|
9493
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
9494
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9495
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9496
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9497
|
-
*
|
|
9498
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
9499
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9500
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
9501
|
-
* governing permissions and limitations under the License.
|
|
9502
|
-
*/
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
9510
|
-
let { inputElementType: inputElementType = 'input', isDisabled: isDisabled = false, isRequired: isRequired = false, isReadOnly: isReadOnly = false, type: type = 'text', validationBehavior: validationBehavior = 'aria' } = props;
|
|
9511
|
-
let [value, setValue] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, props.defaultValue || '', props.onChange);
|
|
9512
|
-
let { focusableProps: focusableProps } = ($e6afbd83fe6ebbd2$export$4c014de7c8940b4c)(props, ref);
|
|
9513
|
-
let validationState = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
9514
|
-
...props,
|
|
9515
|
-
value: value
|
|
9516
|
-
});
|
|
9517
|
-
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = validationState.displayValidation;
|
|
9518
|
-
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = ($2baaea4c71418dea$export$294aa081a6c6f55d)({
|
|
9519
|
-
...props,
|
|
9520
|
-
isInvalid: isInvalid,
|
|
9521
|
-
errorMessage: props.errorMessage || validationErrors
|
|
9522
|
-
});
|
|
9523
|
-
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
9524
|
-
labelable: true
|
|
9525
|
-
});
|
|
9526
|
-
const inputOnlyProps = {
|
|
9527
|
-
type: type,
|
|
9528
|
-
pattern: props.pattern
|
|
9529
|
-
};
|
|
9530
|
-
($99facab73266f662$export$5add1d006293d136)(ref, value, setValue);
|
|
9531
|
-
($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
|
|
9532
|
-
(useEffect)(()=>{
|
|
9533
|
-
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
|
|
9534
|
-
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
|
|
9535
|
-
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
|
|
9536
|
-
// textareas are always controlled. React is planning on removing this synchronization in a
|
|
9537
|
-
// future major version.
|
|
9538
|
-
// https://github.com/facebook/react/issues/19474
|
|
9539
|
-
// https://github.com/facebook/react/issues/11896
|
|
9540
|
-
if (ref.current instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
|
|
9541
|
-
let input = ref.current;
|
|
9542
|
-
Object.defineProperty(input, 'defaultValue', {
|
|
9543
|
-
get: ()=>input.value,
|
|
9544
|
-
set: ()=>{},
|
|
9545
|
-
configurable: true
|
|
9546
|
-
});
|
|
9690
|
+
let pressProps = {
|
|
9691
|
+
onPressStart (e) {
|
|
9692
|
+
// For consistency with native, open the menu on mouse/key down, but touch up.
|
|
9693
|
+
if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) // If opened with a screen reader, auto focus the first item.
|
|
9694
|
+
// Otherwise, the menu itself will be focused.
|
|
9695
|
+
state.open(e.pointerType === 'virtual' ? 'first' : null);
|
|
9696
|
+
},
|
|
9697
|
+
onPress (e) {
|
|
9698
|
+
if (e.pointerType === 'touch' && !isDisabled) state.toggle();
|
|
9547
9699
|
}
|
|
9548
|
-
}
|
|
9549
|
-
|
|
9550
|
-
|
|
9700
|
+
};
|
|
9701
|
+
// omit onPress from triggerProps since we override it above.
|
|
9702
|
+
delete triggerProps.onPress;
|
|
9551
9703
|
return {
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
'aria-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
autoComplete: props.autoComplete,
|
|
9566
|
-
autoCapitalize: props.autoCapitalize,
|
|
9567
|
-
maxLength: props.maxLength,
|
|
9568
|
-
minLength: props.minLength,
|
|
9569
|
-
name: props.name,
|
|
9570
|
-
placeholder: props.placeholder,
|
|
9571
|
-
inputMode: props.inputMode,
|
|
9572
|
-
// Clipboard events
|
|
9573
|
-
onCopy: props.onCopy,
|
|
9574
|
-
onCut: props.onCut,
|
|
9575
|
-
onPaste: props.onPaste,
|
|
9576
|
-
// Composition events
|
|
9577
|
-
onCompositionEnd: props.onCompositionEnd,
|
|
9578
|
-
onCompositionStart: props.onCompositionStart,
|
|
9579
|
-
onCompositionUpdate: props.onCompositionUpdate,
|
|
9580
|
-
// Selection events
|
|
9581
|
-
onSelect: props.onSelect,
|
|
9582
|
-
// Input events
|
|
9583
|
-
onBeforeInput: props.onBeforeInput,
|
|
9584
|
-
onInput: props.onInput,
|
|
9585
|
-
...focusableProps,
|
|
9586
|
-
...fieldProps
|
|
9587
|
-
}),
|
|
9588
|
-
descriptionProps: descriptionProps,
|
|
9589
|
-
errorMessageProps: errorMessageProps,
|
|
9590
|
-
isInvalid: isInvalid,
|
|
9591
|
-
validationErrors: validationErrors,
|
|
9592
|
-
validationDetails: validationDetails
|
|
9704
|
+
// @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
|
|
9705
|
+
menuTriggerProps: {
|
|
9706
|
+
...triggerProps,
|
|
9707
|
+
...trigger === 'press' ? pressProps : longPressProps,
|
|
9708
|
+
id: menuTriggerId,
|
|
9709
|
+
onKeyDown: onKeyDown
|
|
9710
|
+
},
|
|
9711
|
+
menuProps: {
|
|
9712
|
+
...overlayProps,
|
|
9713
|
+
'aria-labelledby': menuTriggerId,
|
|
9714
|
+
autoFocus: state.focusStrategy || true,
|
|
9715
|
+
onClose: state.close
|
|
9716
|
+
}
|
|
9593
9717
|
};
|
|
9594
9718
|
}
|
|
9595
9719
|
|
|
@@ -9663,6 +9787,85 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
9663
9787
|
};
|
|
9664
9788
|
}
|
|
9665
9789
|
|
|
9790
|
+
/*
|
|
9791
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
9792
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the 'License');
|
|
9793
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
9794
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9795
|
+
*
|
|
9796
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
9797
|
+
* the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9798
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
9799
|
+
* governing permissions and limitations under the License.
|
|
9800
|
+
*/
|
|
9801
|
+
|
|
9802
|
+
|
|
9803
|
+
|
|
9804
|
+
function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
|
|
9805
|
+
let { isDisabled: isDisabled } = props;
|
|
9806
|
+
let triggerId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
9807
|
+
let panelId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
9808
|
+
let isSSR = ($b5e257d569688ac6$export$535bd6ca7f90a273)();
|
|
9809
|
+
let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;
|
|
9810
|
+
let raf = (useRef)(null);
|
|
9811
|
+
let handleBeforeMatch = (useCallback)(()=>{
|
|
9812
|
+
// Wait a frame to revert browser's removal of hidden attribute
|
|
9813
|
+
raf.current = requestAnimationFrame(()=>{
|
|
9814
|
+
if (ref.current) ref.current.setAttribute('hidden', 'until-found');
|
|
9815
|
+
});
|
|
9816
|
+
// Force sync state update
|
|
9817
|
+
(flushSync)(()=>{
|
|
9818
|
+
state.toggle();
|
|
9819
|
+
});
|
|
9820
|
+
}, [
|
|
9821
|
+
ref,
|
|
9822
|
+
state
|
|
9823
|
+
]);
|
|
9824
|
+
// @ts-ignore https://github.com/facebook/react/pull/24741
|
|
9825
|
+
($e9faafb641e167db$export$90fc3a17d93f704c)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);
|
|
9826
|
+
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
9827
|
+
// Cancel any pending RAF to prevent stale updates
|
|
9828
|
+
if (raf.current) cancelAnimationFrame(raf.current);
|
|
9829
|
+
// Until React supports hidden="until-found": https://github.com/facebook/react/pull/24741
|
|
9830
|
+
if (supportsBeforeMatch && ref.current && !isDisabled) {
|
|
9831
|
+
if (state.isExpanded) ref.current.removeAttribute('hidden');
|
|
9832
|
+
else ref.current.setAttribute('hidden', 'until-found');
|
|
9833
|
+
}
|
|
9834
|
+
}, [
|
|
9835
|
+
isDisabled,
|
|
9836
|
+
ref,
|
|
9837
|
+
state.isExpanded,
|
|
9838
|
+
supportsBeforeMatch
|
|
9839
|
+
]);
|
|
9840
|
+
(useEffect)(()=>{
|
|
9841
|
+
return ()=>{
|
|
9842
|
+
if (raf.current) cancelAnimationFrame(raf.current);
|
|
9843
|
+
};
|
|
9844
|
+
}, []);
|
|
9845
|
+
return {
|
|
9846
|
+
buttonProps: {
|
|
9847
|
+
id: triggerId,
|
|
9848
|
+
'aria-expanded': state.isExpanded,
|
|
9849
|
+
'aria-controls': panelId,
|
|
9850
|
+
onPress: (e)=>{
|
|
9851
|
+
if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();
|
|
9852
|
+
},
|
|
9853
|
+
isDisabled: isDisabled,
|
|
9854
|
+
onPressStart (e) {
|
|
9855
|
+
if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();
|
|
9856
|
+
}
|
|
9857
|
+
},
|
|
9858
|
+
panelProps: {
|
|
9859
|
+
id: panelId,
|
|
9860
|
+
// This can be overridden at the panel element level.
|
|
9861
|
+
role: 'group',
|
|
9862
|
+
'aria-labelledby': triggerId,
|
|
9863
|
+
'aria-hidden': !state.isExpanded,
|
|
9864
|
+
hidden: supportsBeforeMatch ? true : !state.isExpanded
|
|
9865
|
+
}
|
|
9866
|
+
};
|
|
9867
|
+
}
|
|
9868
|
+
|
|
9666
9869
|
/*
|
|
9667
9870
|
* Copyright 2020 Adobe. All rights reserved.
|
|
9668
9871
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -9675,7 +9878,8 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
9675
9878
|
* governing permissions and limitations under the License.
|
|
9676
9879
|
*/ const $ce9b18daab526bbd$export$5b9bb410392e3991 = new WeakMap();
|
|
9677
9880
|
function $ce9b18daab526bbd$export$f45c25170b9a99c2(state, key) {
|
|
9678
|
-
|
|
9881
|
+
var _listMap_get;
|
|
9882
|
+
let { id: id } = (_listMap_get = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state)) !== null && _listMap_get !== void 0 ? _listMap_get : {};
|
|
9679
9883
|
if (!id) throw new Error('Unknown list');
|
|
9680
9884
|
return `${id}-${$ce9b18daab526bbd$export$e0c709538cb8ae18(key)}`;
|
|
9681
9885
|
}
|
|
@@ -10337,7 +10541,7 @@ function $5b9b5b5723db6ae1$export$be42ebdab07ae4c2(props) {
|
|
|
10337
10541
|
let interactionDescription = (useMemo)(()=>{
|
|
10338
10542
|
let selectionMode = props.selectionManager.selectionMode;
|
|
10339
10543
|
let selectionBehavior = props.selectionManager.selectionBehavior;
|
|
10340
|
-
let message
|
|
10544
|
+
let message;
|
|
10341
10545
|
if (shouldLongPress) message = stringFormatter.format('longPressToSelect');
|
|
10342
10546
|
return selectionBehavior === 'replace' && selectionMode !== 'none' && props.hasItemActions ? message : undefined;
|
|
10343
10547
|
}, [
|
|
@@ -10459,26 +10663,39 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10459
10663
|
var _ref_current;
|
|
10460
10664
|
// Don't shift focus to the row if the active element is a element within the row already
|
|
10461
10665
|
// (e.g. clicking on a row button)
|
|
10462
|
-
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);
|
|
10666
|
+
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);
|
|
10463
10667
|
};
|
|
10464
10668
|
let treeGridRowProps = {};
|
|
10465
10669
|
let hasChildRows;
|
|
10466
10670
|
let hasLink = state.selectionManager.isLink(node.key);
|
|
10467
10671
|
if (node != null && 'expandedKeys' in state) {
|
|
10672
|
+
var _state_collection_getChildren, _state_collection, _filter_at;
|
|
10468
10673
|
// 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
|
|
10469
10674
|
// true...
|
|
10675
|
+
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);
|
|
10470
10676
|
hasChildRows = [
|
|
10471
|
-
...
|
|
10677
|
+
...children !== null && children !== void 0 ? children : []
|
|
10472
10678
|
].length > 1;
|
|
10473
10679
|
if (onAction == null && !hasLink && state.selectionManager.selectionMode === 'none' && hasChildRows) onAction = ()=>state.toggleKey(node.key);
|
|
10474
10680
|
let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : undefined;
|
|
10681
|
+
let setSize = 1;
|
|
10682
|
+
var _filter_at_index;
|
|
10683
|
+
if (node.level > 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
|
|
10684
|
+
let parent = state.collection.getItem(node.parentKey);
|
|
10685
|
+
if (parent) {
|
|
10686
|
+
var _state_collection_getChildren1, _state_collection1;
|
|
10687
|
+
// siblings must exist because our original node exists, same with lastItem
|
|
10688
|
+
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);
|
|
10689
|
+
setSize = ($c5a24bc478652b5f$export$7475b2c64539e4cf)(siblings).index + 1;
|
|
10690
|
+
}
|
|
10691
|
+
} else setSize = ((_filter_at_index = (_filter_at = [
|
|
10692
|
+
...state.collection
|
|
10693
|
+
].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;
|
|
10475
10694
|
treeGridRowProps = {
|
|
10476
10695
|
'aria-expanded': isExpanded,
|
|
10477
10696
|
'aria-level': node.level + 1,
|
|
10478
10697
|
'aria-posinset': (node === null || node === void 0 ? void 0 : node.index) + 1,
|
|
10479
|
-
'aria-setsize':
|
|
10480
|
-
...state.collection
|
|
10481
|
-
].filter((row)=>row.level === 0).at(-1).index + 1
|
|
10698
|
+
'aria-setsize': setSize
|
|
10482
10699
|
};
|
|
10483
10700
|
}
|
|
10484
10701
|
let { itemProps: itemProps, ...itemStates } = ($880e95eb8b93ba9a$export$ecf600387e221c37)({
|
|
@@ -10492,7 +10709,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10492
10709
|
linkBehavior: linkBehavior
|
|
10493
10710
|
});
|
|
10494
10711
|
let onKeyDown = (e)=>{
|
|
10495
|
-
if (!e.currentTarget.contains(e.target)) return;
|
|
10712
|
+
if (!e.currentTarget.contains(e.target) || !ref.current || !document.activeElement) return;
|
|
10496
10713
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current);
|
|
10497
10714
|
walker.currentNode = document.activeElement;
|
|
10498
10715
|
if ('expandedKeys' in state && document.activeElement === ref.current) {
|
|
@@ -10577,9 +10794,10 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10577
10794
|
// to the row above/below instead. We need to re-dispatch the event from a higher parent so it still
|
|
10578
10795
|
// bubbles and gets handled by useSelectableCollection.
|
|
10579
10796
|
if (!e.altKey && ref.current.contains(e.target)) {
|
|
10797
|
+
var _ref_current_parentElement;
|
|
10580
10798
|
e.stopPropagation();
|
|
10581
10799
|
e.preventDefault();
|
|
10582
|
-
ref.current.parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
|
|
10800
|
+
(_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));
|
|
10583
10801
|
}
|
|
10584
10802
|
break;
|
|
10585
10803
|
case 'Tab':
|
|
@@ -10648,8 +10866,8 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
10648
10866
|
};
|
|
10649
10867
|
}
|
|
10650
10868
|
function $4e8b0456ef72939f$var$last(walker) {
|
|
10651
|
-
let next;
|
|
10652
|
-
let last;
|
|
10869
|
+
let next = null;
|
|
10870
|
+
let last = null;
|
|
10653
10871
|
do {
|
|
10654
10872
|
last = walker.lastChild();
|
|
10655
10873
|
if (last) next = last;
|
|
@@ -10891,7 +11109,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
10891
11109
|
usage: 'search',
|
|
10892
11110
|
sensitivity: 'base'
|
|
10893
11111
|
});
|
|
10894
|
-
let delegate = (useMemo)(()=>keyboardDelegate || new ($2a25aae57d74318e$export$a05409b8bb224a5a)(state.collection, state.disabledKeys,
|
|
11112
|
+
let delegate = (useMemo)(()=>keyboardDelegate || new ($2a25aae57d74318e$export$a05409b8bb224a5a)(state.collection, state.disabledKeys, ref, collator), [
|
|
10895
11113
|
keyboardDelegate,
|
|
10896
11114
|
state.collection,
|
|
10897
11115
|
state.disabledKeys,
|
|
@@ -10905,17 +11123,19 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
10905
11123
|
switch(e.key){
|
|
10906
11124
|
case 'ArrowLeft':
|
|
10907
11125
|
{
|
|
11126
|
+
var _delegate_getKeyAbove, _delegate_getFirstKey;
|
|
10908
11127
|
// prevent scrolling containers
|
|
10909
11128
|
e.preventDefault();
|
|
10910
|
-
let key = state.selectedKey != null ? delegate.getKeyAbove(state.selectedKey) : delegate.getFirstKey();
|
|
11129
|
+
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);
|
|
10911
11130
|
if (key) state.setSelectedKey(key);
|
|
10912
11131
|
break;
|
|
10913
11132
|
}
|
|
10914
11133
|
case 'ArrowRight':
|
|
10915
11134
|
{
|
|
11135
|
+
var _delegate_getKeyBelow, _delegate_getFirstKey1;
|
|
10916
11136
|
// prevent scrolling containers
|
|
10917
11137
|
e.preventDefault();
|
|
10918
|
-
let key = state.selectedKey != null ? delegate.getKeyBelow(state.selectedKey) : delegate.getFirstKey();
|
|
11138
|
+
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);
|
|
10919
11139
|
if (key) state.setSelectedKey(key);
|
|
10920
11140
|
break;
|
|
10921
11141
|
}
|
|
@@ -10953,7 +11173,8 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
10953
11173
|
...labelProps,
|
|
10954
11174
|
onClick: ()=>{
|
|
10955
11175
|
if (!props.isDisabled) {
|
|
10956
|
-
|
|
11176
|
+
var _ref_current;
|
|
11177
|
+
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
|
|
10957
11178
|
// Show the focus ring so the user knows where focus went
|
|
10958
11179
|
($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
|
|
10959
11180
|
}
|
|
@@ -11026,17 +11247,18 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
11026
11247
|
|
|
11027
11248
|
|
|
11028
11249
|
|
|
11029
|
-
|
|
11030
11250
|
function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
11031
11251
|
let data = ($58aed456727eb0f3$export$703601b7e90536f8).get(state) || {};
|
|
11032
11252
|
let { autoComplete: autoComplete, name: name = data.name, isDisabled: isDisabled = data.isDisabled } = props;
|
|
11033
11253
|
let { validationBehavior: validationBehavior, isRequired: isRequired } = data;
|
|
11034
|
-
let modality = ($507fabe10e71c6fb$export$98e20ec92f614cfe)();
|
|
11035
11254
|
let { visuallyHiddenProps: visuallyHiddenProps } = ($5c3e21d68f1c4674$export$a966af930f325cab)();
|
|
11036
11255
|
($99facab73266f662$export$5add1d006293d136)(props.selectRef, state.selectedKey, state.setSelectedKey);
|
|
11037
11256
|
($e93e671b31057976$export$b8473d3665f3a75a)({
|
|
11038
11257
|
validationBehavior: validationBehavior,
|
|
11039
|
-
focus: ()=>
|
|
11258
|
+
focus: ()=>{
|
|
11259
|
+
var _triggerRef_current;
|
|
11260
|
+
return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();
|
|
11261
|
+
}
|
|
11040
11262
|
}, state, props.selectRef);
|
|
11041
11263
|
var _state_selectedKey;
|
|
11042
11264
|
// In Safari, the <select> cannot have `display: none` or `hidden` for autofill to work.
|
|
@@ -11045,18 +11267,6 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
11045
11267
|
// The solution is to use <VisuallyHidden> to hide the elements, which clips the elements to a
|
|
11046
11268
|
// 1px rectangle. In addition, we hide from screen readers with aria-hidden, and make the <select>
|
|
11047
11269
|
// non tabbable with tabIndex={-1}.
|
|
11048
|
-
//
|
|
11049
|
-
// In mobile browsers, there are next/previous buttons above the software keyboard for navigating
|
|
11050
|
-
// between fields in a form. These only support native form inputs that are tabbable. In order to
|
|
11051
|
-
// support those, an additional hidden input is used to marshall focus to the button. It is tabbable
|
|
11052
|
-
// except when the button is focused, so that shift tab works properly to go to the actual previous
|
|
11053
|
-
// input in the form. Using the <select> for this also works, but Safari on iOS briefly flashes
|
|
11054
|
-
// the native menu on focus, so this isn't ideal. A font-size of 16px or greater is required to
|
|
11055
|
-
// prevent Safari from zooming in on the input when it is focused.
|
|
11056
|
-
//
|
|
11057
|
-
// If the current interaction modality is null, then the user hasn't interacted with the page yet.
|
|
11058
|
-
// In this case, we set the tabIndex to -1 on the input element so that automated accessibility
|
|
11059
|
-
// checkers don't throw false-positives about focusable elements inside an aria-hidden parent.
|
|
11060
11270
|
return {
|
|
11061
11271
|
containerProps: {
|
|
11062
11272
|
...visuallyHiddenProps,
|
|
@@ -11067,13 +11277,9 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
11067
11277
|
['data-a11y-ignore']: 'aria-hidden-focus'
|
|
11068
11278
|
},
|
|
11069
11279
|
inputProps: {
|
|
11070
|
-
type: 'text',
|
|
11071
|
-
tabIndex: modality == null || state.isFocused || state.isOpen ? -1 : 0,
|
|
11072
11280
|
style: {
|
|
11073
|
-
|
|
11074
|
-
}
|
|
11075
|
-
onFocus: ()=>triggerRef.current.focus(),
|
|
11076
|
-
disabled: isDisabled
|
|
11281
|
+
display: 'none'
|
|
11282
|
+
}
|
|
11077
11283
|
},
|
|
11078
11284
|
selectProps: {
|
|
11079
11285
|
tabIndex: -1,
|
|
@@ -11089,7 +11295,7 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
11089
11295
|
function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
11090
11296
|
let { state: state, triggerRef: triggerRef, label: label, name: name, isDisabled: isDisabled } = props;
|
|
11091
11297
|
let selectRef = (useRef)(null);
|
|
11092
|
-
let { containerProps: containerProps,
|
|
11298
|
+
let { containerProps: containerProps, selectProps: selectProps } = $bdd25dc72710631f$export$f809e80f58e251d1({
|
|
11093
11299
|
...props,
|
|
11094
11300
|
selectRef: selectRef
|
|
11095
11301
|
}, state, triggerRef);
|
|
@@ -11100,14 +11306,14 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
|
11100
11306
|
if (state.collection.size <= 300) return /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
11101
11307
|
...containerProps,
|
|
11102
11308
|
"data-testid": "hidden-select-container"
|
|
11103
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement("
|
|
11309
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement("label", null, label, /*#__PURE__*/ ($dbSRa$react).createElement("select", {
|
|
11104
11310
|
...selectProps,
|
|
11105
11311
|
ref: selectRef
|
|
11106
11312
|
}, /*#__PURE__*/ ($dbSRa$react).createElement("option", null), [
|
|
11107
11313
|
...state.collection.getKeys()
|
|
11108
11314
|
].map((key)=>{
|
|
11109
11315
|
let item = state.collection.getItem(key);
|
|
11110
|
-
if (item.type === 'item') return /*#__PURE__*/ ($dbSRa$react).createElement("option", {
|
|
11316
|
+
if (item && item.type === 'item') return /*#__PURE__*/ ($dbSRa$react).createElement("option", {
|
|
11111
11317
|
key: item.key,
|
|
11112
11318
|
value: item.key
|
|
11113
11319
|
}, item.textValue);
|
|
@@ -11542,7 +11748,6 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
11542
11748
|
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
11543
11749
|
let descProps = ($ef06256079686ba0$export$f8aeda7b10753fa1)(description);
|
|
11544
11750
|
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
11545
|
-
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
11546
11751
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(item.props);
|
|
11547
11752
|
let linkProps = ($ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6)(item.props);
|
|
11548
11753
|
return {
|
|
@@ -11715,6 +11920,51 @@ function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {
|
|
|
11715
11920
|
*/
|
|
11716
11921
|
|
|
11717
11922
|
|
|
11923
|
+
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /*#__PURE__*/ (createContext)({});
|
|
11924
|
+
function $01b77f81d0f07f68$var$Label(props, ref) {
|
|
11925
|
+
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
11926
|
+
let { elementType: ElementType = 'label', ...labelProps } = props;
|
|
11927
|
+
// @ts-ignore
|
|
11928
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
11929
|
+
className: "react-aria-Label",
|
|
11930
|
+
...labelProps,
|
|
11931
|
+
ref: ref
|
|
11932
|
+
});
|
|
11933
|
+
}
|
|
11934
|
+
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /*#__PURE__*/ ($f39a9eba43920ace$export$86427a43e3e48ebb)($01b77f81d0f07f68$var$Label);
|
|
11935
|
+
|
|
11936
|
+
/*
|
|
11937
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
11938
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
11939
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11940
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11941
|
+
*
|
|
11942
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11943
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11944
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
11945
|
+
* governing permissions and limitations under the License.
|
|
11946
|
+
*/
|
|
11947
|
+
|
|
11948
|
+
|
|
11949
|
+
|
|
11950
|
+
|
|
11951
|
+
const $0393f8ab869a0f1a$export$e9f3bf65a26ce129 = /*#__PURE__*/ (createContext)(null);
|
|
11952
|
+
|
|
11953
|
+
/*
|
|
11954
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
11955
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
11956
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11957
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11958
|
+
*
|
|
11959
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11960
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11961
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
11962
|
+
* governing permissions and limitations under the License.
|
|
11963
|
+
*/
|
|
11964
|
+
|
|
11965
|
+
|
|
11966
|
+
|
|
11967
|
+
|
|
11718
11968
|
|
|
11719
11969
|
|
|
11720
11970
|
const $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes = new Set([
|
|
@@ -11730,35 +11980,88 @@ const $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes = new Set([
|
|
|
11730
11980
|
const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /*#__PURE__*/ (createContext)({});
|
|
11731
11981
|
function $d2b4bc8c273e7be6$var$Button(props, ref) {
|
|
11732
11982
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
|
|
11983
|
+
props = $d2b4bc8c273e7be6$var$disablePendingProps(props);
|
|
11733
11984
|
let ctx = props;
|
|
11985
|
+
let { isPending: isPending } = ctx;
|
|
11734
11986
|
let { buttonProps: buttonProps, isPressed: isPressed } = ($701a24aa0da5b062$export$ea18c227d4417cc3)(props, ref);
|
|
11735
11987
|
let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = ($f7dceffc5ad7768b$export$4e328f61c538687f)(props);
|
|
11736
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(
|
|
11988
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)({
|
|
11989
|
+
...props,
|
|
11990
|
+
isDisabled: props.isDisabled || isPending
|
|
11991
|
+
});
|
|
11992
|
+
let renderValues = {
|
|
11993
|
+
isHovered: isHovered,
|
|
11994
|
+
isPressed: (ctx.isPressed || isPressed) && !isPending,
|
|
11995
|
+
isFocused: isFocused,
|
|
11996
|
+
isFocusVisible: isFocusVisible,
|
|
11997
|
+
isDisabled: props.isDisabled || false,
|
|
11998
|
+
isPending: isPending !== null && isPending !== void 0 ? isPending : false
|
|
11999
|
+
};
|
|
11737
12000
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
11738
12001
|
...props,
|
|
11739
|
-
values:
|
|
11740
|
-
isHovered: isHovered,
|
|
11741
|
-
isPressed: isPressed,
|
|
11742
|
-
isFocused: isFocused,
|
|
11743
|
-
isFocusVisible: isFocusVisible,
|
|
11744
|
-
isDisabled: props.isDisabled || false
|
|
11745
|
-
},
|
|
12002
|
+
values: renderValues,
|
|
11746
12003
|
defaultClassName: 'react-aria-Button'
|
|
11747
12004
|
});
|
|
12005
|
+
let buttonId = ($bdb11010cef70236$export$f680877a34711e37)(buttonProps.id);
|
|
12006
|
+
let progressId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
12007
|
+
let ariaLabelledby = buttonProps['aria-labelledby'];
|
|
12008
|
+
if (isPending) {
|
|
12009
|
+
// aria-labelledby wins over aria-label
|
|
12010
|
+
// https://www.w3.org/TR/accname-1.2/#computation-steps
|
|
12011
|
+
if (ariaLabelledby) ariaLabelledby = `${ariaLabelledby} ${progressId}`;
|
|
12012
|
+
else if (buttonProps['aria-label']) ariaLabelledby = `${buttonId} ${progressId}`;
|
|
12013
|
+
}
|
|
12014
|
+
let wasPending = (useRef)(isPending);
|
|
12015
|
+
(useEffect)(()=>{
|
|
12016
|
+
let message = {
|
|
12017
|
+
'aria-labelledby': ariaLabelledby || buttonId
|
|
12018
|
+
};
|
|
12019
|
+
if (!wasPending.current && isFocused && isPending) ($319e236875307eab$export$a9b970dcc4ae71a9)(message, 'assertive');
|
|
12020
|
+
else if (wasPending.current && isFocused && !isPending) ($319e236875307eab$export$a9b970dcc4ae71a9)(message, 'assertive');
|
|
12021
|
+
wasPending.current = isPending;
|
|
12022
|
+
}, [
|
|
12023
|
+
isPending,
|
|
12024
|
+
isFocused,
|
|
12025
|
+
ariaLabelledby,
|
|
12026
|
+
buttonId
|
|
12027
|
+
]);
|
|
11748
12028
|
return /*#__PURE__*/ ($dbSRa$react).createElement("button", {
|
|
11749
12029
|
...($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
11750
12030
|
propNames: $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes
|
|
11751
12031
|
}),
|
|
11752
12032
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(buttonProps, focusProps, hoverProps),
|
|
11753
12033
|
...renderProps,
|
|
12034
|
+
id: buttonId,
|
|
11754
12035
|
ref: ref,
|
|
12036
|
+
"aria-labelledby": ariaLabelledby,
|
|
11755
12037
|
slot: props.slot || undefined,
|
|
12038
|
+
"aria-disabled": isPending ? 'true' : buttonProps['aria-disabled'],
|
|
11756
12039
|
"data-disabled": props.isDisabled || undefined,
|
|
11757
|
-
"data-pressed":
|
|
12040
|
+
"data-pressed": renderValues.isPressed || undefined,
|
|
11758
12041
|
"data-hovered": isHovered || undefined,
|
|
11759
12042
|
"data-focused": isFocused || undefined,
|
|
12043
|
+
"data-pending": isPending || undefined,
|
|
11760
12044
|
"data-focus-visible": isFocusVisible || undefined
|
|
11761
|
-
})
|
|
12045
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($0393f8ab869a0f1a$export$e9f3bf65a26ce129).Provider, {
|
|
12046
|
+
value: {
|
|
12047
|
+
id: progressId
|
|
12048
|
+
}
|
|
12049
|
+
}, renderProps.children));
|
|
12050
|
+
}
|
|
12051
|
+
function $d2b4bc8c273e7be6$var$disablePendingProps(props) {
|
|
12052
|
+
// Don't allow interaction while isPending is true
|
|
12053
|
+
if (props.isPending) {
|
|
12054
|
+
props.onPress = undefined;
|
|
12055
|
+
props.onPressStart = undefined;
|
|
12056
|
+
props.onPressEnd = undefined;
|
|
12057
|
+
props.onPressChange = undefined;
|
|
12058
|
+
props.onPressUp = undefined;
|
|
12059
|
+
props.onKeyDown = undefined;
|
|
12060
|
+
props.onKeyUp = undefined;
|
|
12061
|
+
props.onClick = undefined;
|
|
12062
|
+
props.href = undefined;
|
|
12063
|
+
}
|
|
12064
|
+
return props;
|
|
11762
12065
|
}
|
|
11763
12066
|
/**
|
|
11764
12067
|
* A button allows a user to perform an action, with mouse, touch, and keyboard interactions.
|
|
@@ -11873,11 +12176,13 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11873
12176
|
}
|
|
11874
12177
|
getKeyBefore(key) {
|
|
11875
12178
|
let node = this.keyMap.get(key);
|
|
11876
|
-
|
|
12179
|
+
var _node_prevKey;
|
|
12180
|
+
return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
|
|
11877
12181
|
}
|
|
11878
12182
|
getKeyAfter(key) {
|
|
11879
12183
|
let node = this.keyMap.get(key);
|
|
11880
|
-
|
|
12184
|
+
var _node_nextKey;
|
|
12185
|
+
return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
|
|
11881
12186
|
}
|
|
11882
12187
|
getFirstKey() {
|
|
11883
12188
|
return this.firstKey;
|
|
@@ -11886,7 +12191,8 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11886
12191
|
return this.lastKey;
|
|
11887
12192
|
}
|
|
11888
12193
|
getItem(key) {
|
|
11889
|
-
|
|
12194
|
+
var _this_keyMap_get;
|
|
12195
|
+
return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
|
|
11890
12196
|
}
|
|
11891
12197
|
at(idx) {
|
|
11892
12198
|
const keys = [
|
|
@@ -11900,13 +12206,15 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11900
12206
|
}
|
|
11901
12207
|
constructor(nodes){
|
|
11902
12208
|
this.keyMap = new Map();
|
|
12209
|
+
this.firstKey = null;
|
|
12210
|
+
this.lastKey = null;
|
|
11903
12211
|
this.iterable = nodes;
|
|
11904
12212
|
let visit = (node)=>{
|
|
11905
12213
|
this.keyMap.set(node.key, node);
|
|
11906
12214
|
if (node.childNodes && node.type === 'section') for (let child of node.childNodes)visit(child);
|
|
11907
12215
|
};
|
|
11908
12216
|
for (let node of nodes)visit(node);
|
|
11909
|
-
let last;
|
|
12217
|
+
let last = null;
|
|
11910
12218
|
let index = 0;
|
|
11911
12219
|
for (let [key, node] of this.keyMap){
|
|
11912
12220
|
if (last) {
|
|
@@ -11922,7 +12230,8 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11922
12230
|
// If it isn't the last node, last.nextKey will properly set at start of new loop
|
|
11923
12231
|
last.nextKey = undefined;
|
|
11924
12232
|
}
|
|
11925
|
-
|
|
12233
|
+
var _last_key;
|
|
12234
|
+
this.lastKey = (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
|
|
11926
12235
|
}
|
|
11927
12236
|
}
|
|
11928
12237
|
|
|
@@ -11940,11 +12249,11 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
|
|
|
11940
12249
|
constructor(keys, anchorKey, currentKey){
|
|
11941
12250
|
super(keys);
|
|
11942
12251
|
if (keys instanceof $e40ea825a81a3709$export$52baac22726c72bf) {
|
|
11943
|
-
this.anchorKey = anchorKey
|
|
11944
|
-
this.currentKey = currentKey
|
|
12252
|
+
this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : keys.anchorKey;
|
|
12253
|
+
this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : keys.currentKey;
|
|
11945
12254
|
} else {
|
|
11946
|
-
this.anchorKey = anchorKey;
|
|
11947
|
-
this.currentKey = currentKey;
|
|
12255
|
+
this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : null;
|
|
12256
|
+
this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : null;
|
|
11948
12257
|
}
|
|
11949
12258
|
}
|
|
11950
12259
|
}
|
|
@@ -11970,7 +12279,7 @@ function $7af3f5b51489e0b5$var$equalSets(setA, setB) {
|
|
|
11970
12279
|
return true;
|
|
11971
12280
|
}
|
|
11972
12281
|
function $7af3f5b51489e0b5$export$253fe78d46329472(props) {
|
|
11973
|
-
let { selectionMode: selectionMode = 'none', disallowEmptySelection: disallowEmptySelection, allowDuplicateSelectionEvents: allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = 'toggle', disabledBehavior: disabledBehavior = 'all' } = props;
|
|
12282
|
+
let { selectionMode: selectionMode = 'none', disallowEmptySelection: disallowEmptySelection = false, allowDuplicateSelectionEvents: allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = 'toggle', disabledBehavior: disabledBehavior = 'all' } = props;
|
|
11974
12283
|
// We want synchronous updates to `isFocused` and `focusedKey` after their setters are called.
|
|
11975
12284
|
// But we also need to trigger a react re-render. So, we have both a ref (sync) and state (async).
|
|
11976
12285
|
let isFocusedRef = (useRef)(false);
|
|
@@ -12109,8 +12418,9 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12109
12418
|
* Returns whether a key is selected.
|
|
12110
12419
|
*/ isSelected(key) {
|
|
12111
12420
|
if (this.state.selectionMode === 'none') return false;
|
|
12112
|
-
|
|
12113
|
-
|
|
12421
|
+
let mappedKey = this.getKey(key);
|
|
12422
|
+
if (mappedKey == null) return false;
|
|
12423
|
+
return this.state.selectedKeys === 'all' ? this.canSelectItem(mappedKey) : this.state.selectedKeys.has(mappedKey);
|
|
12114
12424
|
}
|
|
12115
12425
|
/**
|
|
12116
12426
|
* Whether the selection is empty.
|
|
@@ -12134,7 +12444,8 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12134
12444
|
let item = this.collection.getItem(key);
|
|
12135
12445
|
if (!first || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, first) < 0) first = item;
|
|
12136
12446
|
}
|
|
12137
|
-
|
|
12447
|
+
var _first_key;
|
|
12448
|
+
return (_first_key = first === null || first === void 0 ? void 0 : first.key) !== null && _first_key !== void 0 ? _first_key : null;
|
|
12138
12449
|
}
|
|
12139
12450
|
get lastSelectedKey() {
|
|
12140
12451
|
let last = null;
|
|
@@ -12142,7 +12453,8 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12142
12453
|
let item = this.collection.getItem(key);
|
|
12143
12454
|
if (!last || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, last) > 0) last = item;
|
|
12144
12455
|
}
|
|
12145
|
-
|
|
12456
|
+
var _last_key;
|
|
12457
|
+
return (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
|
|
12146
12458
|
}
|
|
12147
12459
|
get disabledKeys() {
|
|
12148
12460
|
return this.state.disabledKeys;
|
|
@@ -12158,18 +12470,21 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12158
12470
|
this.replaceSelection(toKey);
|
|
12159
12471
|
return;
|
|
12160
12472
|
}
|
|
12161
|
-
|
|
12473
|
+
let mappedToKey = this.getKey(toKey);
|
|
12474
|
+
if (mappedToKey == null) return;
|
|
12162
12475
|
let selection;
|
|
12163
12476
|
// Only select the one key if coming from a select all.
|
|
12164
12477
|
if (this.state.selectedKeys === 'all') selection = new ($e40ea825a81a3709$export$52baac22726c72bf)([
|
|
12165
|
-
|
|
12166
|
-
],
|
|
12478
|
+
mappedToKey
|
|
12479
|
+
], mappedToKey, mappedToKey);
|
|
12167
12480
|
else {
|
|
12168
12481
|
let selectedKeys = this.state.selectedKeys;
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12482
|
+
var _selectedKeys_anchorKey;
|
|
12483
|
+
let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : mappedToKey;
|
|
12484
|
+
selection = new ($e40ea825a81a3709$export$52baac22726c72bf)(selectedKeys, anchorKey, mappedToKey);
|
|
12485
|
+
var _selectedKeys_currentKey;
|
|
12486
|
+
for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : mappedToKey))selection.delete(key);
|
|
12487
|
+
for (let key of this.getKeyRange(mappedToKey, anchorKey))if (this.canSelectItem(key)) selection.add(key);
|
|
12173
12488
|
}
|
|
12174
12489
|
this.state.setSelectedKeys(selection);
|
|
12175
12490
|
}
|
|
@@ -12183,11 +12498,13 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12183
12498
|
return [];
|
|
12184
12499
|
}
|
|
12185
12500
|
getKeyRangeInternal(from, to) {
|
|
12501
|
+
var _this_layoutDelegate;
|
|
12502
|
+
if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0 ? void 0 : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to);
|
|
12186
12503
|
let keys = [];
|
|
12187
12504
|
let key = from;
|
|
12188
|
-
while(key){
|
|
12505
|
+
while(key != null){
|
|
12189
12506
|
let item = this.collection.getItem(key);
|
|
12190
|
-
if (item && item.type === 'item' || item.type === 'cell' && this.allowsCellSelection) keys.push(key);
|
|
12507
|
+
if (item && (item.type === 'item' || item.type === 'cell' && this.allowsCellSelection)) keys.push(key);
|
|
12191
12508
|
if (key === to) return keys;
|
|
12192
12509
|
key = this.collection.getKeyAfter(key);
|
|
12193
12510
|
}
|
|
@@ -12200,7 +12517,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12200
12517
|
// If cell selection is allowed, just return the key.
|
|
12201
12518
|
if (item.type === 'cell' && this.allowsCellSelection) return key;
|
|
12202
12519
|
// Find a parent item to select
|
|
12203
|
-
while(item.type !== 'item' && item.parentKey != null)item = this.collection.getItem(item.parentKey);
|
|
12520
|
+
while(item && item.type !== 'item' && item.parentKey != null)item = this.collection.getItem(item.parentKey);
|
|
12204
12521
|
if (!item || item.type !== 'item') return null;
|
|
12205
12522
|
return item.key;
|
|
12206
12523
|
}
|
|
@@ -12212,14 +12529,14 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12212
12529
|
this.replaceSelection(key);
|
|
12213
12530
|
return;
|
|
12214
12531
|
}
|
|
12215
|
-
|
|
12216
|
-
if (
|
|
12532
|
+
let mappedKey = this.getKey(key);
|
|
12533
|
+
if (mappedKey == null) return;
|
|
12217
12534
|
let keys = new ($e40ea825a81a3709$export$52baac22726c72bf)(this.state.selectedKeys === 'all' ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
12218
|
-
if (keys.has(
|
|
12219
|
-
else if (this.canSelectItem(
|
|
12220
|
-
keys.add(
|
|
12221
|
-
keys.anchorKey =
|
|
12222
|
-
keys.currentKey =
|
|
12535
|
+
if (keys.has(mappedKey)) keys.delete(mappedKey);
|
|
12536
|
+
else if (this.canSelectItem(mappedKey)) {
|
|
12537
|
+
keys.add(mappedKey);
|
|
12538
|
+
keys.anchorKey = mappedKey;
|
|
12539
|
+
keys.currentKey = mappedKey;
|
|
12223
12540
|
}
|
|
12224
12541
|
if (this.disallowEmptySelection && keys.size === 0) return;
|
|
12225
12542
|
this.state.setSelectedKeys(keys);
|
|
@@ -12228,11 +12545,11 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12228
12545
|
* Replaces the selection with only the given key.
|
|
12229
12546
|
*/ replaceSelection(key) {
|
|
12230
12547
|
if (this.selectionMode === 'none') return;
|
|
12231
|
-
|
|
12232
|
-
if (
|
|
12233
|
-
let selection = this.canSelectItem(
|
|
12234
|
-
|
|
12235
|
-
],
|
|
12548
|
+
let mappedKey = this.getKey(key);
|
|
12549
|
+
if (mappedKey == null) return;
|
|
12550
|
+
let selection = this.canSelectItem(mappedKey) ? new ($e40ea825a81a3709$export$52baac22726c72bf)([
|
|
12551
|
+
mappedKey
|
|
12552
|
+
], mappedKey, mappedKey) : new ($e40ea825a81a3709$export$52baac22726c72bf)();
|
|
12236
12553
|
this.state.setSelectedKeys(selection);
|
|
12237
12554
|
}
|
|
12238
12555
|
/**
|
|
@@ -12241,9 +12558,9 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12241
12558
|
if (this.selectionMode === 'none') return;
|
|
12242
12559
|
let selection = new ($e40ea825a81a3709$export$52baac22726c72bf)();
|
|
12243
12560
|
for (let key of keys){
|
|
12244
|
-
|
|
12245
|
-
if (
|
|
12246
|
-
selection.add(
|
|
12561
|
+
let mappedKey = this.getKey(key);
|
|
12562
|
+
if (mappedKey != null) {
|
|
12563
|
+
selection.add(mappedKey);
|
|
12247
12564
|
if (this.selectionMode === 'single') break;
|
|
12248
12565
|
}
|
|
12249
12566
|
}
|
|
@@ -12254,10 +12571,12 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12254
12571
|
let addKeys = (key)=>{
|
|
12255
12572
|
while(key != null){
|
|
12256
12573
|
if (this.canSelectItem(key)) {
|
|
12574
|
+
var _getFirstItem;
|
|
12257
12575
|
let item = this.collection.getItem(key);
|
|
12258
|
-
if (item.type === 'item') keys.push(key);
|
|
12576
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === 'item') keys.push(key);
|
|
12577
|
+
var _getFirstItem_key;
|
|
12259
12578
|
// Add child keys. If cell selection is allowed, then include item children too.
|
|
12260
|
-
if (item.hasChildNodes && (this.allowsCellSelection || item.type !== 'item')) addKeys(($c5a24bc478652b5f$export$fbdeaa6a76694f71)(($c5a24bc478652b5f$export$1005530eda016c13)(item, this.collection)).key);
|
|
12579
|
+
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);
|
|
12261
12580
|
}
|
|
12262
12581
|
key = this.collection.getKeyAfter(key);
|
|
12263
12582
|
}
|
|
@@ -12330,6 +12649,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12330
12649
|
var _options_allowsCellSelection;
|
|
12331
12650
|
this.allowsCellSelection = (_options_allowsCellSelection = options === null || options === void 0 ? void 0 : options.allowsCellSelection) !== null && _options_allowsCellSelection !== void 0 ? _options_allowsCellSelection : false;
|
|
12332
12651
|
this._isSelectAll = null;
|
|
12652
|
+
this.layoutDelegate = (options === null || options === void 0 ? void 0 : options.layoutDelegate) || null;
|
|
12333
12653
|
}
|
|
12334
12654
|
}
|
|
12335
12655
|
|
|
@@ -12348,7 +12668,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
12348
12668
|
|
|
12349
12669
|
|
|
12350
12670
|
function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
|
|
12351
|
-
let { filter: filter } = props;
|
|
12671
|
+
let { filter: filter, layoutDelegate: layoutDelegate } = props;
|
|
12352
12672
|
let selectionState = ($7af3f5b51489e0b5$export$253fe78d46329472)(props);
|
|
12353
12673
|
let disabledKeys = (useMemo)(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [
|
|
12354
12674
|
props.disabledKeys
|
|
@@ -12362,30 +12682,35 @@ function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
|
|
|
12362
12682
|
props.suppressTextValueWarning
|
|
12363
12683
|
]);
|
|
12364
12684
|
let collection = ($7613b1592d41b092$export$6cd28814d92fa9c9)(props, factory, context);
|
|
12365
|
-
let selectionManager = (useMemo)(()=>new ($d496c0a20b6e58ec$export$6c8a5aaad13c9852)(collection, selectionState
|
|
12685
|
+
let selectionManager = (useMemo)(()=>new ($d496c0a20b6e58ec$export$6c8a5aaad13c9852)(collection, selectionState, {
|
|
12686
|
+
layoutDelegate: layoutDelegate
|
|
12687
|
+
}), [
|
|
12366
12688
|
collection,
|
|
12367
|
-
selectionState
|
|
12689
|
+
selectionState,
|
|
12690
|
+
layoutDelegate
|
|
12368
12691
|
]);
|
|
12369
12692
|
// Reset focused key if that item is deleted from the collection.
|
|
12370
12693
|
const cachedCollection = (useRef)(null);
|
|
12371
12694
|
(useEffect)(()=>{
|
|
12372
|
-
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) {
|
|
12695
|
+
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey) && cachedCollection.current) {
|
|
12373
12696
|
const startItem = cachedCollection.current.getItem(selectionState.focusedKey);
|
|
12374
12697
|
const cachedItemNodes = [
|
|
12375
12698
|
...cachedCollection.current.getKeys()
|
|
12376
12699
|
].map((key)=>{
|
|
12377
12700
|
const itemNode = cachedCollection.current.getItem(key);
|
|
12378
|
-
return itemNode.type === 'item' ? itemNode : null;
|
|
12701
|
+
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
|
|
12379
12702
|
}).filter((node)=>node !== null);
|
|
12380
12703
|
const itemNodes = [
|
|
12381
12704
|
...collection.getKeys()
|
|
12382
12705
|
].map((key)=>{
|
|
12383
12706
|
const itemNode = collection.getItem(key);
|
|
12384
|
-
return itemNode.type === 'item' ? itemNode : null;
|
|
12707
|
+
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
|
|
12385
12708
|
}).filter((node)=>node !== null);
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12709
|
+
var _cachedItemNodes_length, _itemNodes_length;
|
|
12710
|
+
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);
|
|
12711
|
+
var _startItem_index, _startItem_index1, _itemNodes_length1;
|
|
12712
|
+
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);
|
|
12713
|
+
let newNode = null;
|
|
12389
12714
|
let isReverseSearching = false;
|
|
12390
12715
|
while(index >= 0){
|
|
12391
12716
|
if (!selectionManager.isDisabled(itemNodes[index].key)) {
|
|
@@ -12396,7 +12721,8 @@ function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
|
|
|
12396
12721
|
if (index < itemNodes.length - 1 && !isReverseSearching) index++;
|
|
12397
12722
|
else {
|
|
12398
12723
|
isReverseSearching = true;
|
|
12399
|
-
|
|
12724
|
+
var _startItem_index2, _startItem_index3;
|
|
12725
|
+
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;
|
|
12400
12726
|
index--;
|
|
12401
12727
|
}
|
|
12402
12728
|
}
|
|
@@ -12444,6 +12770,8 @@ function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
|
|
|
12444
12770
|
allowDuplicateSelectionEvents: true,
|
|
12445
12771
|
selectedKeys: selectedKeys,
|
|
12446
12772
|
onSelectionChange: (keys)=>{
|
|
12773
|
+
// impossible, but TS doesn't know that
|
|
12774
|
+
if (keys === 'all') return;
|
|
12447
12775
|
var _keys_values_next_value;
|
|
12448
12776
|
let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
|
|
12449
12777
|
// Always fire onSelectionChange, even if the key is the same
|
|
@@ -12494,11 +12822,150 @@ function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
|
|
|
12494
12822
|
isOpen
|
|
12495
12823
|
]);
|
|
12496
12824
|
return {
|
|
12497
|
-
isOpen: isOpen,
|
|
12498
|
-
setOpen: setOpen,
|
|
12499
|
-
open: open,
|
|
12500
|
-
close: close,
|
|
12501
|
-
toggle: toggle
|
|
12825
|
+
isOpen: isOpen,
|
|
12826
|
+
setOpen: setOpen,
|
|
12827
|
+
open: open,
|
|
12828
|
+
close: close,
|
|
12829
|
+
toggle: toggle
|
|
12830
|
+
};
|
|
12831
|
+
}
|
|
12832
|
+
|
|
12833
|
+
/*
|
|
12834
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
12835
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12836
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12837
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12838
|
+
*
|
|
12839
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12840
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12841
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12842
|
+
* governing permissions and limitations under the License.
|
|
12843
|
+
*/
|
|
12844
|
+
|
|
12845
|
+
function $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {
|
|
12846
|
+
let [isExpanded, setExpanded] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);
|
|
12847
|
+
const expand = (useCallback)(()=>{
|
|
12848
|
+
setExpanded(true);
|
|
12849
|
+
}, [
|
|
12850
|
+
setExpanded
|
|
12851
|
+
]);
|
|
12852
|
+
const collapse = (useCallback)(()=>{
|
|
12853
|
+
setExpanded(false);
|
|
12854
|
+
}, [
|
|
12855
|
+
setExpanded
|
|
12856
|
+
]);
|
|
12857
|
+
const toggle = (useCallback)(()=>{
|
|
12858
|
+
setExpanded(!isExpanded);
|
|
12859
|
+
}, [
|
|
12860
|
+
setExpanded,
|
|
12861
|
+
isExpanded
|
|
12862
|
+
]);
|
|
12863
|
+
return {
|
|
12864
|
+
isExpanded: isExpanded,
|
|
12865
|
+
setExpanded: setExpanded,
|
|
12866
|
+
expand: expand,
|
|
12867
|
+
collapse: collapse,
|
|
12868
|
+
toggle: toggle
|
|
12869
|
+
};
|
|
12870
|
+
}
|
|
12871
|
+
|
|
12872
|
+
/*
|
|
12873
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
12874
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12875
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12876
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12877
|
+
*
|
|
12878
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12879
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12880
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12881
|
+
* governing permissions and limitations under the License.
|
|
12882
|
+
*/
|
|
12883
|
+
|
|
12884
|
+
function $9385b3affbdec831$export$f36461af0ef4707d(props) {
|
|
12885
|
+
let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;
|
|
12886
|
+
let [expandedKeys, setExpandedKeys] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)((useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [
|
|
12887
|
+
props.expandedKeys
|
|
12888
|
+
]), (useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [
|
|
12889
|
+
props.defaultExpandedKeys
|
|
12890
|
+
]), props.onExpandedChange);
|
|
12891
|
+
(useEffect)(()=>{
|
|
12892
|
+
// Ensure only one item is expanded if allowsMultipleExpanded is false.
|
|
12893
|
+
if (!allowsMultipleExpanded && expandedKeys.size > 1) setExpandedKeys(new Set([
|
|
12894
|
+
expandedKeys.values().next().value
|
|
12895
|
+
]));
|
|
12896
|
+
});
|
|
12897
|
+
return {
|
|
12898
|
+
allowsMultipleExpanded: allowsMultipleExpanded,
|
|
12899
|
+
isDisabled: isDisabled,
|
|
12900
|
+
expandedKeys: expandedKeys,
|
|
12901
|
+
setExpandedKeys: setExpandedKeys,
|
|
12902
|
+
toggleKey (key) {
|
|
12903
|
+
let keys;
|
|
12904
|
+
if (allowsMultipleExpanded) {
|
|
12905
|
+
keys = new Set(expandedKeys);
|
|
12906
|
+
if (keys.has(key)) keys.delete(key);
|
|
12907
|
+
else keys.add(key);
|
|
12908
|
+
} else keys = new Set(expandedKeys.has(key) ? [] : [
|
|
12909
|
+
key
|
|
12910
|
+
]);
|
|
12911
|
+
setExpandedKeys(keys);
|
|
12912
|
+
}
|
|
12913
|
+
};
|
|
12914
|
+
}
|
|
12915
|
+
|
|
12916
|
+
/*
|
|
12917
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
12918
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12919
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12920
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12921
|
+
*
|
|
12922
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12923
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12924
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12925
|
+
* governing permissions and limitations under the License.
|
|
12926
|
+
*/
|
|
12927
|
+
|
|
12928
|
+
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
|
|
12929
|
+
let overlayTriggerState = ($fc909762b330b746$export$61c6a8c84e605fb6)(props);
|
|
12930
|
+
let [focusStrategy, setFocusStrategy] = (useState)(null);
|
|
12931
|
+
let [expandedKeysStack, setExpandedKeysStack] = (useState)([]);
|
|
12932
|
+
let closeAll = ()=>{
|
|
12933
|
+
setExpandedKeysStack([]);
|
|
12934
|
+
overlayTriggerState.close();
|
|
12935
|
+
};
|
|
12936
|
+
let openSubmenu = (triggerKey, level)=>{
|
|
12937
|
+
setExpandedKeysStack((oldStack)=>{
|
|
12938
|
+
if (level > oldStack.length) return oldStack;
|
|
12939
|
+
return [
|
|
12940
|
+
...oldStack.slice(0, level),
|
|
12941
|
+
triggerKey
|
|
12942
|
+
];
|
|
12943
|
+
});
|
|
12944
|
+
};
|
|
12945
|
+
let closeSubmenu = (triggerKey, level)=>{
|
|
12946
|
+
setExpandedKeysStack((oldStack)=>{
|
|
12947
|
+
let key = oldStack[level];
|
|
12948
|
+
if (key === triggerKey) return oldStack.slice(0, level);
|
|
12949
|
+
else return oldStack;
|
|
12950
|
+
});
|
|
12951
|
+
};
|
|
12952
|
+
return {
|
|
12953
|
+
focusStrategy: focusStrategy,
|
|
12954
|
+
...overlayTriggerState,
|
|
12955
|
+
open (focusStrategy = null) {
|
|
12956
|
+
setFocusStrategy(focusStrategy);
|
|
12957
|
+
overlayTriggerState.open();
|
|
12958
|
+
},
|
|
12959
|
+
toggle (focusStrategy = null) {
|
|
12960
|
+
setFocusStrategy(focusStrategy);
|
|
12961
|
+
overlayTriggerState.toggle();
|
|
12962
|
+
},
|
|
12963
|
+
close () {
|
|
12964
|
+
closeAll();
|
|
12965
|
+
},
|
|
12966
|
+
expandedKeysStack: expandedKeysStack,
|
|
12967
|
+
openSubmenu: openSubmenu,
|
|
12968
|
+
closeSubmenu: closeSubmenu
|
|
12502
12969
|
};
|
|
12503
12970
|
}
|
|
12504
12971
|
|
|
@@ -12627,7 +13094,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12627
13094
|
let { delay: delay = $8796f90736e175cb$var$TOOLTIP_DELAY, closeDelay: closeDelay = $8796f90736e175cb$var$TOOLTIP_COOLDOWN } = props;
|
|
12628
13095
|
let { isOpen: isOpen, open: open, close: close } = ($fc909762b330b746$export$61c6a8c84e605fb6)(props);
|
|
12629
13096
|
let id = (useMemo)(()=>`${++$8796f90736e175cb$var$tooltipId}`, []);
|
|
12630
|
-
let closeTimeout = (useRef)(
|
|
13097
|
+
let closeTimeout = (useRef)(null);
|
|
12631
13098
|
let closeCallback = (useRef)(close);
|
|
12632
13099
|
let ensureTooltipEntry = ()=>{
|
|
12633
13100
|
$8796f90736e175cb$var$tooltips[id] = hideTooltip;
|
|
@@ -12639,7 +13106,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12639
13106
|
}
|
|
12640
13107
|
};
|
|
12641
13108
|
let showTooltip = ()=>{
|
|
12642
|
-
clearTimeout(closeTimeout.current);
|
|
13109
|
+
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
12643
13110
|
closeTimeout.current = null;
|
|
12644
13111
|
closeOpenTooltips();
|
|
12645
13112
|
ensureTooltipEntry();
|
|
@@ -12656,7 +13123,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12656
13123
|
};
|
|
12657
13124
|
let hideTooltip = (immediate)=>{
|
|
12658
13125
|
if (immediate || closeDelay <= 0) {
|
|
12659
|
-
clearTimeout(closeTimeout.current);
|
|
13126
|
+
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
12660
13127
|
closeTimeout.current = null;
|
|
12661
13128
|
closeCallback.current();
|
|
12662
13129
|
} else if (!closeTimeout.current) closeTimeout.current = setTimeout(()=>{
|
|
@@ -12691,10 +13158,9 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12691
13158
|
}, [
|
|
12692
13159
|
close
|
|
12693
13160
|
]);
|
|
12694
|
-
// eslint-disable-next-line arrow-body-style
|
|
12695
13161
|
(useEffect)(()=>{
|
|
12696
13162
|
return ()=>{
|
|
12697
|
-
clearTimeout(closeTimeout.current);
|
|
13163
|
+
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
12698
13164
|
let tooltip = $8796f90736e175cb$var$tooltips[id];
|
|
12699
13165
|
if (tooltip) delete $8796f90736e175cb$var$tooltips[id];
|
|
12700
13166
|
};
|
|
@@ -12724,6 +13190,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
12724
13190
|
*/
|
|
12725
13191
|
|
|
12726
13192
|
|
|
13193
|
+
|
|
12727
13194
|
const $ee014567cb39d3f0$export$ff05c3ac10437e03 = /*#__PURE__*/ (createContext)(null);
|
|
12728
13195
|
function $ee014567cb39d3f0$var$FieldError(props, ref) {
|
|
12729
13196
|
let validation = (useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
|
|
@@ -12738,6 +13205,7 @@ function $ee014567cb39d3f0$var$FieldError(props, ref) {
|
|
|
12738
13205
|
*/ const $ee014567cb39d3f0$export$f551688fc98f2e09 = /*#__PURE__*/ (forwardRef)($ee014567cb39d3f0$var$FieldError);
|
|
12739
13206
|
const $ee014567cb39d3f0$var$FieldErrorInner = /*#__PURE__*/ (forwardRef)((props, ref)=>{
|
|
12740
13207
|
let validation = (useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
|
|
13208
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
12741
13209
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
12742
13210
|
...props,
|
|
12743
13211
|
defaultClassName: 'react-aria-FieldError',
|
|
@@ -12747,6 +13215,7 @@ const $ee014567cb39d3f0$var$FieldErrorInner = /*#__PURE__*/ (forwardRef)((props,
|
|
|
12747
13215
|
if (renderProps.children == null) return null;
|
|
12748
13216
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($514c0188e459b4c0$export$5f1af8db9871e1d6), {
|
|
12749
13217
|
slot: "errorMessage",
|
|
13218
|
+
...domProps,
|
|
12750
13219
|
...renderProps,
|
|
12751
13220
|
ref: ref
|
|
12752
13221
|
});
|
|
@@ -12801,32 +13270,6 @@ function $d3e0e05bdfcf66bd$var$Form(props, ref) {
|
|
|
12801
13270
|
*/
|
|
12802
13271
|
|
|
12803
13272
|
|
|
12804
|
-
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /*#__PURE__*/ (createContext)({});
|
|
12805
|
-
function $01b77f81d0f07f68$var$Label(props, ref) {
|
|
12806
|
-
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
12807
|
-
let { elementType: ElementType = 'label', ...labelProps } = props;
|
|
12808
|
-
// @ts-ignore
|
|
12809
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
12810
|
-
className: "react-aria-Label",
|
|
12811
|
-
...labelProps,
|
|
12812
|
-
ref: ref
|
|
12813
|
-
});
|
|
12814
|
-
}
|
|
12815
|
-
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /*#__PURE__*/ ($f39a9eba43920ace$export$86427a43e3e48ebb)($01b77f81d0f07f68$var$Label);
|
|
12816
|
-
|
|
12817
|
-
/*
|
|
12818
|
-
* Copyright 2022 Adobe. All rights reserved.
|
|
12819
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12820
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12821
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12822
|
-
*
|
|
12823
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12824
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12825
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12826
|
-
* governing permissions and limitations under the License.
|
|
12827
|
-
*/
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
13273
|
|
|
12831
13274
|
|
|
12832
13275
|
|
|
@@ -12910,7 +13353,7 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
12910
13353
|
let groupState = (useContext)($bc237834342dbd75$export$139c5b8563afc1fc);
|
|
12911
13354
|
let inputRef = ($df56164dff5785e2$export$4338b53315abf666)(($5dc95899b306f630$export$c9058316764c140e)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null));
|
|
12912
13355
|
let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isReadOnly: isReadOnly, isPressed: isPressed, isInvalid: isInvalid } = groupState ? ($fba3e38d5ca8983f$export$353b32fc6898d37d)({
|
|
12913
|
-
...props,
|
|
13356
|
+
...($64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
12914
13357
|
// Value is optional for standalone checkboxes, but required for CheckboxGroup items;
|
|
12915
13358
|
// it's passed explicitly here to avoid typescript error (requires ignore).
|
|
12916
13359
|
// @ts-ignore
|
|
@@ -12918,7 +13361,7 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
12918
13361
|
// ReactNode type doesn't allow function children.
|
|
12919
13362
|
children: typeof props.children === 'function' ? true : props.children
|
|
12920
13363
|
}, groupState, inputRef) : ($406796ff087fe49b$export$e375f10ce42261c5)({
|
|
12921
|
-
...props,
|
|
13364
|
+
...($64fa3d84918910a7$export$ef03459518577ad4)(props),
|
|
12922
13365
|
children: typeof props.children === 'function' ? true : props.children,
|
|
12923
13366
|
validationBehavior: validationBehavior
|
|
12924
13367
|
}, ($3017fa7ffdddec74$export$8042c6c013fd5226)(props), inputRef);
|
|
@@ -12929,7 +13372,6 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
12929
13372
|
isDisabled: isInteractionDisabled
|
|
12930
13373
|
});
|
|
12931
13374
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
12932
|
-
// TODO: should data attrs go on the label or on the <input>? useCheckbox passes them to the input...
|
|
12933
13375
|
...props,
|
|
12934
13376
|
defaultClassName: 'react-aria-Checkbox',
|
|
12935
13377
|
values: {
|
|
@@ -13427,7 +13869,7 @@ function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropH
|
|
|
13427
13869
|
return new Set([
|
|
13428
13870
|
focusedKey,
|
|
13429
13871
|
dropTargetKey
|
|
13430
|
-
].filter((k)=>k
|
|
13872
|
+
].filter((k)=>k != null));
|
|
13431
13873
|
}, [
|
|
13432
13874
|
focusedKey,
|
|
13433
13875
|
dropTargetKey
|
|
@@ -13525,7 +13967,11 @@ function $eed445e0843c11d0$var$StandaloneListBox({ props: props, listBoxRef: lis
|
|
|
13525
13967
|
children: null,
|
|
13526
13968
|
items: null
|
|
13527
13969
|
};
|
|
13528
|
-
let
|
|
13970
|
+
let { layoutDelegate: layoutDelegate } = (useContext)(($7135fc7d473fd974$export$4feb769f8ddf26c5));
|
|
13971
|
+
let state = ($e72dd72e1c76a225$export$2f645645f7bca764)({
|
|
13972
|
+
...props,
|
|
13973
|
+
layoutDelegate: layoutDelegate
|
|
13974
|
+
});
|
|
13529
13975
|
return /*#__PURE__*/ ($dbSRa$react).createElement($eed445e0843c11d0$var$ListBoxInner, {
|
|
13530
13976
|
state: state,
|
|
13531
13977
|
props: props,
|
|
@@ -13689,6 +14135,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state, props: props, listBo
|
|
|
13689
14135
|
[
|
|
13690
14136
|
($7135fc7d473fd974$export$d40e14dec8b060a8),
|
|
13691
14137
|
{
|
|
14138
|
+
name: 'ListBoxSection',
|
|
13692
14139
|
render: $eed445e0843c11d0$var$ListBoxSection
|
|
13693
14140
|
}
|
|
13694
14141
|
]
|
|
@@ -13700,7 +14147,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state, props: props, listBo
|
|
|
13700
14147
|
renderDropIndicator: ($612b8eb6cb90e02d$export$971707d8a129a1f7)(dragAndDropHooks, dropState)
|
|
13701
14148
|
})), emptyState, dragPreview));
|
|
13702
14149
|
}
|
|
13703
|
-
function $eed445e0843c11d0$var$ListBoxSection(props, ref, section) {
|
|
14150
|
+
function $eed445e0843c11d0$var$ListBoxSection(props, ref, section, className = 'react-aria-ListBoxSection') {
|
|
13704
14151
|
let state = (useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
13705
14152
|
let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (useContext)(($612b8eb6cb90e02d$export$d188a835a7bc5783));
|
|
13706
14153
|
let { CollectionBranch: CollectionBranch } = (useContext)(($7135fc7d473fd974$export$4feb769f8ddf26c5));
|
|
@@ -13711,7 +14158,7 @@ function $eed445e0843c11d0$var$ListBoxSection(props, ref, section) {
|
|
|
13711
14158
|
'aria-label': (_props_arialabel = props['aria-label']) !== null && _props_arialabel !== void 0 ? _props_arialabel : undefined
|
|
13712
14159
|
});
|
|
13713
14160
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
13714
|
-
defaultClassName:
|
|
14161
|
+
defaultClassName: className,
|
|
13715
14162
|
className: props.className,
|
|
13716
14163
|
style: props.style,
|
|
13717
14164
|
values: {}
|
|
@@ -13732,6 +14179,9 @@ function $eed445e0843c11d0$var$ListBoxSection(props, ref, section) {
|
|
|
13732
14179
|
renderDropIndicator: ($612b8eb6cb90e02d$export$971707d8a129a1f7)(dragAndDropHooks, dropState)
|
|
13733
14180
|
})));
|
|
13734
14181
|
}
|
|
14182
|
+
/**
|
|
14183
|
+
* A ListBoxSection represents a section within a ListBox.
|
|
14184
|
+
*/ const $eed445e0843c11d0$export$dca12b0bb56e4fc = /*#__PURE__*/ ($e1995378a142960e$export$e953bb1cd0f19726)('section', $eed445e0843c11d0$var$ListBoxSection);
|
|
13735
14185
|
const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960e$export$18af5c7a9e9b3664)('item', function ListBoxItem(props, forwardedRef, item) {
|
|
13736
14186
|
let ref = ($df56164dff5785e2$export$4338b53315abf666)(forwardedRef);
|
|
13737
14187
|
let state = (useContext)($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
@@ -13860,9 +14310,9 @@ function $44f671af83e7d9e0$var$OverlayArrow(props, ref) {
|
|
|
13860
14310
|
let placement = props.placement;
|
|
13861
14311
|
let style = {
|
|
13862
14312
|
position: 'absolute',
|
|
13863
|
-
[placement]: '100%',
|
|
13864
14313
|
transform: placement === 'top' || placement === 'bottom' ? 'translateX(-50%)' : 'translateY(-50%)'
|
|
13865
14314
|
};
|
|
14315
|
+
if (placement != null) style[placement] = '100%';
|
|
13866
14316
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
13867
14317
|
...props,
|
|
13868
14318
|
defaultClassName: 'react-aria-OverlayArrow',
|
|
@@ -13973,6 +14423,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
13973
14423
|
...renderProps.style
|
|
13974
14424
|
};
|
|
13975
14425
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($337b884510726a0d$export$c6fdb837b070b4ff), {
|
|
14426
|
+
...props,
|
|
13976
14427
|
isExiting: isExiting,
|
|
13977
14428
|
portalContainer: UNSTABLE_portalContainer
|
|
13978
14429
|
}, !props.isNonModal && state.isOpen && /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
@@ -14005,6 +14456,8 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
14005
14456
|
})));
|
|
14006
14457
|
}
|
|
14007
14458
|
|
|
14459
|
+
const $3674c52c6b3c5bce$export$795aec4671cbae19 = /*#__PURE__*/ (createContext)(null);
|
|
14460
|
+
|
|
14008
14461
|
/*
|
|
14009
14462
|
* Copyright 2022 Adobe. All rights reserved.
|
|
14010
14463
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -14023,10 +14476,14 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
14023
14476
|
|
|
14024
14477
|
|
|
14025
14478
|
|
|
14479
|
+
|
|
14480
|
+
|
|
14026
14481
|
const $de32f1b87079253c$export$8b93a07348a7730c = /*#__PURE__*/ (createContext)(null);
|
|
14027
14482
|
const $de32f1b87079253c$export$d2f961adcb0afbe = /*#__PURE__*/ (createContext)(null);
|
|
14028
14483
|
function $de32f1b87079253c$export$2e1e1122cf0cba88(props) {
|
|
14029
|
-
|
|
14484
|
+
// Use useMenuTriggerState instead of useOverlayTriggerState in case a menu is embedded in the dialog.
|
|
14485
|
+
// This is needed to handle submenus.
|
|
14486
|
+
let state = ($a28c903ee9ad8dc5$export$79fefeb1c2091ac3)(props);
|
|
14030
14487
|
let buttonRef = (useRef)(null);
|
|
14031
14488
|
let { triggerProps: triggerProps, overlayProps: overlayProps } = ($628037886ba31236$export$f9d5c8beee7d008d)({
|
|
14032
14489
|
type: 'dialog'
|
|
@@ -14043,6 +14500,10 @@ function $de32f1b87079253c$export$2e1e1122cf0cba88(props) {
|
|
|
14043
14500
|
$de32f1b87079253c$export$d2f961adcb0afbe,
|
|
14044
14501
|
state
|
|
14045
14502
|
],
|
|
14503
|
+
[
|
|
14504
|
+
($3674c52c6b3c5bce$export$795aec4671cbae19),
|
|
14505
|
+
state
|
|
14506
|
+
],
|
|
14046
14507
|
[
|
|
14047
14508
|
$de32f1b87079253c$export$8b93a07348a7730c,
|
|
14048
14509
|
overlayProps
|
|
@@ -14071,24 +14532,27 @@ function $de32f1b87079253c$var$Dialog(props, ref) {
|
|
|
14071
14532
|
'aria-labelledby': originalAriaLabelledby
|
|
14072
14533
|
}, ref);
|
|
14073
14534
|
let state = (useContext)($de32f1b87079253c$export$d2f961adcb0afbe);
|
|
14074
|
-
let children = props.children;
|
|
14075
|
-
if (typeof children === 'function') children = children({
|
|
14076
|
-
close: (state === null || state === void 0 ? void 0 : state.close) || (()=>{})
|
|
14077
|
-
});
|
|
14078
14535
|
if (!dialogProps['aria-label'] && !dialogProps['aria-labelledby']) {
|
|
14079
14536
|
// If aria-labelledby exists on props, we know it came from context.
|
|
14080
14537
|
// Use that as a fallback in case there is no title slot.
|
|
14081
14538
|
if (props['aria-labelledby']) dialogProps['aria-labelledby'] = props['aria-labelledby'];
|
|
14082
14539
|
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.');
|
|
14083
14540
|
}
|
|
14084
|
-
|
|
14541
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14542
|
+
defaultClassName: 'react-aria-Dialog',
|
|
14543
|
+
className: props.className,
|
|
14544
|
+
style: props.style,
|
|
14545
|
+
children: props.children,
|
|
14546
|
+
values: {
|
|
14547
|
+
close: (state === null || state === void 0 ? void 0 : state.close) || (()=>{})
|
|
14548
|
+
}
|
|
14549
|
+
});
|
|
14085
14550
|
return /*#__PURE__*/ ($dbSRa$react).createElement("section", {
|
|
14086
14551
|
...($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props),
|
|
14087
14552
|
...dialogProps,
|
|
14553
|
+
...renderProps,
|
|
14088
14554
|
ref: ref,
|
|
14089
|
-
slot: props.slot || undefined
|
|
14090
|
-
style: props.style,
|
|
14091
|
-
className: (_props_className = props.className) !== null && _props_className !== void 0 ? _props_className : 'react-aria-Dialog'
|
|
14555
|
+
slot: props.slot || undefined
|
|
14092
14556
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
14093
14557
|
values: [
|
|
14094
14558
|
[
|
|
@@ -14102,14 +14566,180 @@ function $de32f1b87079253c$var$Dialog(props, ref) {
|
|
|
14102
14566
|
}
|
|
14103
14567
|
}
|
|
14104
14568
|
}
|
|
14569
|
+
],
|
|
14570
|
+
[
|
|
14571
|
+
($d2b4bc8c273e7be6$export$24d547caef80ccd1),
|
|
14572
|
+
{
|
|
14573
|
+
slots: {
|
|
14574
|
+
[($64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},
|
|
14575
|
+
close: {
|
|
14576
|
+
onPress: ()=>state === null || state === void 0 ? void 0 : state.close()
|
|
14577
|
+
}
|
|
14578
|
+
}
|
|
14579
|
+
}
|
|
14105
14580
|
]
|
|
14106
14581
|
]
|
|
14107
|
-
}, children));
|
|
14582
|
+
}, renderProps.children));
|
|
14108
14583
|
}
|
|
14109
14584
|
/**
|
|
14110
14585
|
* A dialog is an overlay shown above other content in an application.
|
|
14111
14586
|
*/ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ (forwardRef)($de32f1b87079253c$var$Dialog);
|
|
14112
14587
|
|
|
14588
|
+
/*
|
|
14589
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
14590
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14591
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14592
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14593
|
+
*
|
|
14594
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14595
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14596
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
14597
|
+
* governing permissions and limitations under the License.
|
|
14598
|
+
*/
|
|
14599
|
+
|
|
14600
|
+
|
|
14601
|
+
|
|
14602
|
+
|
|
14603
|
+
|
|
14604
|
+
|
|
14605
|
+
const $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (createContext)(null);
|
|
14606
|
+
function $28f4fd908f0de97f$var$DisclosureGroup(props, ref) {
|
|
14607
|
+
let state = ($9385b3affbdec831$export$f36461af0ef4707d)(props);
|
|
14608
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14609
|
+
...props,
|
|
14610
|
+
defaultClassName: 'react-aria-DisclosureGroup',
|
|
14611
|
+
values: {
|
|
14612
|
+
isDisabled: state.isDisabled,
|
|
14613
|
+
state: state
|
|
14614
|
+
}
|
|
14615
|
+
});
|
|
14616
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
14617
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
14618
|
+
...domProps,
|
|
14619
|
+
...renderProps,
|
|
14620
|
+
ref: ref,
|
|
14621
|
+
"data-disabled": props.isDisabled || undefined
|
|
14622
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {
|
|
14623
|
+
value: state
|
|
14624
|
+
}, renderProps.children));
|
|
14625
|
+
}
|
|
14626
|
+
/**
|
|
14627
|
+
* A DisclosureGroup is a grouping of related disclosures, sometimes called an accordion.
|
|
14628
|
+
* It supports both single and multiple expanded items.
|
|
14629
|
+
*/ const $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (forwardRef)($28f4fd908f0de97f$var$DisclosureGroup);
|
|
14630
|
+
const $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (createContext)(null);
|
|
14631
|
+
const $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (createContext)(null);
|
|
14632
|
+
const $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (createContext)(null);
|
|
14633
|
+
function $28f4fd908f0de97f$var$Disclosure(props, ref) {
|
|
14634
|
+
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);
|
|
14635
|
+
let groupState = (useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);
|
|
14636
|
+
let { id: id, ...otherProps } = props;
|
|
14637
|
+
// Generate an id if one wasn't provided.
|
|
14638
|
+
// (can't pass id into useId since it can also be a number)
|
|
14639
|
+
let defaultId = ($bdb11010cef70236$export$f680877a34711e37)();
|
|
14640
|
+
id || (id = defaultId);
|
|
14641
|
+
let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;
|
|
14642
|
+
let state = ($bf996d45f4a36925$export$3fcbf6e4407997e0)({
|
|
14643
|
+
...props,
|
|
14644
|
+
isExpanded: isExpanded,
|
|
14645
|
+
onExpandedChange (isExpanded) {
|
|
14646
|
+
var _props_onExpandedChange;
|
|
14647
|
+
if (groupState) groupState.toggleKey(id);
|
|
14648
|
+
(_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);
|
|
14649
|
+
}
|
|
14650
|
+
});
|
|
14651
|
+
let panelRef = ($dbSRa$react).useRef(null);
|
|
14652
|
+
let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;
|
|
14653
|
+
let { buttonProps: buttonProps, panelProps: panelProps } = ($5e910fae8e128ead$export$6e3e27031a30522f)({
|
|
14654
|
+
...props,
|
|
14655
|
+
isExpanded: isExpanded,
|
|
14656
|
+
isDisabled: isDisabled
|
|
14657
|
+
}, state, panelRef);
|
|
14658
|
+
let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = ($f7dceffc5ad7768b$export$4e328f61c538687f)({
|
|
14659
|
+
within: true
|
|
14660
|
+
});
|
|
14661
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14662
|
+
...props,
|
|
14663
|
+
id: undefined,
|
|
14664
|
+
defaultClassName: 'react-aria-Disclosure',
|
|
14665
|
+
values: {
|
|
14666
|
+
isExpanded: state.isExpanded,
|
|
14667
|
+
isDisabled: isDisabled,
|
|
14668
|
+
isFocusVisibleWithin: isFocusVisibleWithin,
|
|
14669
|
+
state: state
|
|
14670
|
+
}
|
|
14671
|
+
});
|
|
14672
|
+
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(otherProps);
|
|
14673
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
14674
|
+
values: [
|
|
14675
|
+
[
|
|
14676
|
+
($d2b4bc8c273e7be6$export$24d547caef80ccd1),
|
|
14677
|
+
{
|
|
14678
|
+
slots: {
|
|
14679
|
+
[($64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},
|
|
14680
|
+
trigger: buttonProps
|
|
14681
|
+
}
|
|
14682
|
+
}
|
|
14683
|
+
],
|
|
14684
|
+
[
|
|
14685
|
+
$28f4fd908f0de97f$var$InternalDisclosureContext,
|
|
14686
|
+
{
|
|
14687
|
+
panelProps: panelProps,
|
|
14688
|
+
panelRef: panelRef
|
|
14689
|
+
}
|
|
14690
|
+
],
|
|
14691
|
+
[
|
|
14692
|
+
$28f4fd908f0de97f$export$dab3ea4a6ef094da,
|
|
14693
|
+
state
|
|
14694
|
+
]
|
|
14695
|
+
]
|
|
14696
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
14697
|
+
ref: ref,
|
|
14698
|
+
"data-expanded": state.isExpanded || undefined,
|
|
14699
|
+
"data-disabled": isDisabled || undefined,
|
|
14700
|
+
"data-focus-visible-within": isFocusVisibleWithin || undefined,
|
|
14701
|
+
...domProps,
|
|
14702
|
+
...focusWithinProps,
|
|
14703
|
+
...renderProps
|
|
14704
|
+
}, renderProps.children));
|
|
14705
|
+
}
|
|
14706
|
+
function $28f4fd908f0de97f$var$DisclosurePanel(props, ref) {
|
|
14707
|
+
let { role: role = 'group' } = props;
|
|
14708
|
+
let { panelProps: panelProps, panelRef: panelRef } = (useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);
|
|
14709
|
+
let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = ($f7dceffc5ad7768b$export$4e328f61c538687f)({
|
|
14710
|
+
within: true
|
|
14711
|
+
});
|
|
14712
|
+
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14713
|
+
...props,
|
|
14714
|
+
defaultClassName: 'react-aria-DisclosurePanel',
|
|
14715
|
+
values: {
|
|
14716
|
+
isFocusVisibleWithin: isFocusVisibleWithin
|
|
14717
|
+
}
|
|
14718
|
+
});
|
|
14719
|
+
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
14720
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement("div", {
|
|
14721
|
+
...DOMProps,
|
|
14722
|
+
ref: ($5dc95899b306f630$export$c9058316764c140e)(ref, panelRef),
|
|
14723
|
+
...($3ef42575df84b30b$export$9d1611c77c2fe928)(panelProps, focusWithinProps),
|
|
14724
|
+
...renderProps,
|
|
14725
|
+
role: role,
|
|
14726
|
+
"data-focus-visible-within": isFocusVisibleWithin || undefined
|
|
14727
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
14728
|
+
values: [
|
|
14729
|
+
[
|
|
14730
|
+
($d2b4bc8c273e7be6$export$24d547caef80ccd1),
|
|
14731
|
+
null
|
|
14732
|
+
]
|
|
14733
|
+
]
|
|
14734
|
+
}, props.children));
|
|
14735
|
+
}
|
|
14736
|
+
/**
|
|
14737
|
+
* 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.
|
|
14738
|
+
*/ const $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (forwardRef)($28f4fd908f0de97f$var$Disclosure);
|
|
14739
|
+
/**
|
|
14740
|
+
* A DisclosurePanel provides the content for a disclosure.
|
|
14741
|
+
*/ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (forwardRef)($28f4fd908f0de97f$var$DisclosurePanel);
|
|
14742
|
+
|
|
14113
14743
|
/*
|
|
14114
14744
|
* Copyright 2022 Adobe. All rights reserved.
|
|
14115
14745
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -14626,10 +15256,10 @@ function $82d7e5349645de74$var$SelectValue(props, ref) {
|
|
|
14626
15256
|
});
|
|
14627
15257
|
}
|
|
14628
15258
|
let stringFormatter = ($fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault($df39c1238ae2b5f3$exports))), 'react-aria-components');
|
|
14629
|
-
var _state_selectedItem_value, _state_selectedItem_textValue;
|
|
15259
|
+
var _ref, _state_selectedItem_value, _state_selectedItem_textValue;
|
|
14630
15260
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
14631
15261
|
...props,
|
|
14632
|
-
defaultChildren: rendered
|
|
15262
|
+
defaultChildren: (_ref = rendered !== null && rendered !== void 0 ? rendered : placeholder) !== null && _ref !== void 0 ? _ref : stringFormatter.format('selectPlaceholder'),
|
|
14633
15263
|
defaultClassName: 'react-aria-SelectValue',
|
|
14634
15264
|
values: {
|
|
14635
15265
|
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,
|
|
@@ -15153,7 +15783,8 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
15153
15783
|
isOpen: state.isOpen,
|
|
15154
15784
|
arrowSize: arrowWidth,
|
|
15155
15785
|
arrowBoundaryOffset: props.arrowBoundaryOffset,
|
|
15156
|
-
shouldFlip: props.shouldFlip
|
|
15786
|
+
shouldFlip: props.shouldFlip,
|
|
15787
|
+
onClose: ()=>state.close(true)
|
|
15157
15788
|
});
|
|
15158
15789
|
let isEntering = ($64fa3d84918910a7$export$6d3443f2c48bfc20)(props.tooltipRef, !!placement) || props.isEntering || false;
|
|
15159
15790
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
@@ -15176,7 +15807,7 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
15176
15807
|
...overlayProps.style,
|
|
15177
15808
|
...renderProps.style
|
|
15178
15809
|
},
|
|
15179
|
-
"data-placement": placement,
|
|
15810
|
+
"data-placement": placement !== null && placement !== void 0 ? placement : undefined,
|
|
15180
15811
|
"data-entering": isEntering || undefined,
|
|
15181
15812
|
"data-exiting": props.isExiting || undefined
|
|
15182
15813
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($44f671af83e7d9e0$export$2de4954e8ae13b9f).Provider, {
|
|
@@ -15188,43 +15819,113 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
15188
15819
|
}, renderProps.children));
|
|
15189
15820
|
}
|
|
15190
15821
|
|
|
15191
|
-
var css_248z$
|
|
15192
|
-
styleInject(css_248z$
|
|
15822
|
+
var css_248z$n = ".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";
|
|
15823
|
+
styleInject(css_248z$n);
|
|
15824
|
+
|
|
15825
|
+
var css_248z$m = ".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";
|
|
15826
|
+
styleInject(css_248z$m);
|
|
15193
15827
|
|
|
15194
15828
|
function Button({ size = "medium", variant = "primary", danger = false, isIconButton = false, ...props }) {
|
|
15195
15829
|
return (jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: `bcds-react-aria-Button ${size} ${variant} ${danger ? "danger" : ""} ${isIconButton ? "icon" : ""}`, ...props }));
|
|
15196
15830
|
}
|
|
15197
15831
|
|
|
15198
|
-
|
|
15199
|
-
|
|
15832
|
+
/* The component implements the Chevron Up icon from Font Awesome: https://fontawesome.com/icons/chevron-up */
|
|
15833
|
+
function SvgChevronUpIcon({ id = "chevron-up-icon" }) {
|
|
15834
|
+
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" }) }));
|
|
15835
|
+
}
|
|
15200
15836
|
|
|
15201
|
-
|
|
15202
|
-
|
|
15837
|
+
/* The component implements the Chevron Down icon from Font Awesome: https://fontawesome.com/icons/chevron-down */
|
|
15838
|
+
function SvgChevronDownIcon({ id = "chevron-down-icon" }) {
|
|
15839
|
+
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" }) }));
|
|
15840
|
+
}
|
|
15841
|
+
|
|
15842
|
+
function Accordion({ label, children, ...props }) {
|
|
15843
|
+
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 }) })] })) }));
|
|
15844
|
+
}
|
|
15845
|
+
|
|
15846
|
+
var css_248z$l = ".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";
|
|
15847
|
+
styleInject(css_248z$l);
|
|
15848
|
+
|
|
15849
|
+
function AccordionGroup({ title, titleElement, children, ...props }) {
|
|
15850
|
+
function getTitle() {
|
|
15851
|
+
switch (titleElement) {
|
|
15852
|
+
case "h1":
|
|
15853
|
+
return jsx("h1", { children: title });
|
|
15854
|
+
case "h2":
|
|
15855
|
+
return jsx("h2", { children: title });
|
|
15856
|
+
case "h3":
|
|
15857
|
+
return jsx("h3", { children: title });
|
|
15858
|
+
case "h4":
|
|
15859
|
+
return jsx("h4", { children: title });
|
|
15860
|
+
case "h5":
|
|
15861
|
+
return jsx("h5", { children: title });
|
|
15862
|
+
case "h6":
|
|
15863
|
+
return jsx("h6", { children: title });
|
|
15864
|
+
default:
|
|
15865
|
+
return jsx("span", { children: title });
|
|
15866
|
+
}
|
|
15867
|
+
}
|
|
15868
|
+
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 })] }));
|
|
15203
15869
|
}
|
|
15204
15870
|
|
|
15871
|
+
var css_248z$k = ".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";
|
|
15872
|
+
styleInject(css_248z$k);
|
|
15873
|
+
|
|
15874
|
+
/* The component implements the Circle Check icon from Font Awesome: https://fontawesome.com/icons/circle-check */
|
|
15205
15875
|
function SvgCheckCircleIcon({ id = "check-icon" }) {
|
|
15206
15876
|
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" }) }) }));
|
|
15207
15877
|
}
|
|
15208
15878
|
|
|
15879
|
+
/* The component implements the X Mark icon from Font Awesome: https://fontawesome.com/icons/xmark */
|
|
15209
15880
|
function SvgCloseIcon({ id = "close-icon" }) {
|
|
15210
15881
|
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: "M16 5.21286L14.7871 4L10 8.78714L5.21286 4L4 5.21286L8.78714 10L4 14.7871L5.21286 16L10 11.2129L14.7871 16L16 14.7871L11.2129 10L16 5.21286Z", fill: "currentColor" }) }) }));
|
|
15211
15882
|
}
|
|
15212
15883
|
|
|
15884
|
+
/* The component implements the Circle Exclamation icon from Font Awesome: https://fontawesome.com/icons/circle-exclamation */
|
|
15213
15885
|
function SvgExclamationCircleIcon({ id = "exclamation-icon-circle", }) {
|
|
15214
15886
|
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: "M9.99999 2C14.4062 2 18 5.59375 18 10C18 14.4375 14.4062 18 9.99999 18C5.56249 18 1.99998 14.4375 1.99998 10C1.99998 5.59375 5.56249 2 9.99999 2ZM9.99999 16.5C13.5625 16.5 16.5 13.5938 16.5 10C16.5 6.4375 13.5625 3.5 9.99999 3.5C6.40624 3.5 3.49999 6.4375 3.49999 10C3.49999 13.5938 6.40624 16.5 9.99999 16.5ZM9.99999 11.5C9.56249 11.5 9.24999 11.1875 9.24999 10.75V6.75C9.24999 6.34375 9.56249 6 9.99999 6C10.4062 6 10.75 6.34375 10.75 6.75V10.75C10.75 11.1875 10.4062 11.5 9.99999 11.5ZM9.99999 12.5625C10.5312 12.5625 10.9687 13 10.9687 13.5312C10.9687 14.0625 10.5312 14.5 9.99999 14.5C9.43749 14.5 8.99999 14.0625 8.99999 13.5312C8.99999 13 9.43749 12.5625 9.99999 12.5625Z", fill: "currentColor" }) }) }));
|
|
15215
15887
|
}
|
|
15216
15888
|
|
|
15217
|
-
|
|
15889
|
+
/* The component implements the Triangle Exclamation icon from Font Awesome: https://fontawesome.com/icons/triangle-exclamation */
|
|
15218
15890
|
function SvgExclamationIcon({ id = "exclamation-icon" }) {
|
|
15219
15891
|
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: "M17.835 15.0312C18.335 15.9062 17.71 17 16.6787 17H3.33499C2.30374 17 1.67874 15.9062 2.14749 15.0312L8.83499 3.65625C9.11624 3.21875 9.55373 3 10.0225 3C10.46 3 10.8975 3.21875 11.1787 3.65625L17.835 15.0312ZM3.64749 15.5H16.3663L9.99123 4.65625L3.64749 15.5ZM10.0225 12.5625C10.5537 12.5625 10.9912 13 10.9912 13.5312C10.9912 14.0625 10.5537 14.5 10.0225 14.5C9.45998 14.5 9.02249 14.0625 9.02249 13.5312C9.02249 13 9.45998 12.5625 10.0225 12.5625ZM9.27249 7.75C9.27249 7.34375 9.58498 7 10.0225 7C10.4287 7 10.7725 7.34375 10.7725 7.75V10.75C10.7725 11.1875 10.4287 11.5 10.0225 11.5C9.58498 11.5 9.27249 11.1875 9.27249 10.75V7.75Z", fill: "currentColor" }) }) }));
|
|
15220
15892
|
}
|
|
15221
15893
|
|
|
15894
|
+
/* The component implements the Circle Info icon from Font Awesome: https://fontawesome.com/icons/circle-info */
|
|
15222
15895
|
function SvgInfoIcon({ id = "information-icon" }) {
|
|
15223
15896
|
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: "M9.99999 2C14.4062 2 18 5.59375 18 10C18 14.4375 14.4062 18 9.99999 18C5.56249 18 1.99998 14.4375 1.99998 10C1.99998 5.59375 5.56249 2 9.99999 2ZM9.99999 16.5C13.5625 16.5 16.5 13.5938 16.5 10C16.5 6.4375 13.5625 3.5 9.99999 3.5C6.40624 3.5 3.49999 6.4375 3.49999 10C3.49999 13.5938 6.40624 16.5 9.99999 16.5ZM11.25 12.5C11.6562 12.5 12 12.8438 12 13.25C12 13.6875 11.6562 14 11.25 14H8.74999C8.31249 14 7.99999 13.6875 7.99999 13.25C7.99999 12.8438 8.31249 12.5 8.74999 12.5H9.24999V10.5H8.99999C8.56249 10.5 8.24999 10.1875 8.24999 9.75C8.24999 9.34375 8.56249 9 8.99999 9H9.99999C10.4062 9 10.75 9.34375 10.75 9.75V12.5H11.25ZM9.99999 8C9.43749 8 8.99999 7.5625 8.99999 7C8.99999 6.46875 9.43749 6 9.99999 6C10.5312 6 11 6.46875 11 7C11 7.5625 10.5312 8 9.99999 8Z", fill: "currentColor" }) }) }));
|
|
15224
15897
|
}
|
|
15225
15898
|
|
|
15226
|
-
|
|
15227
|
-
|
|
15899
|
+
/* Sets correct icon for theme */
|
|
15900
|
+
function getIcon$2(variant) {
|
|
15901
|
+
switch (variant) {
|
|
15902
|
+
case "info":
|
|
15903
|
+
return jsx(SvgInfoIcon, {});
|
|
15904
|
+
case "black":
|
|
15905
|
+
return jsx(SvgInfoIcon, {});
|
|
15906
|
+
case "success":
|
|
15907
|
+
return jsx(SvgCheckCircleIcon, {});
|
|
15908
|
+
case "warning":
|
|
15909
|
+
return jsx(SvgExclamationIcon, {});
|
|
15910
|
+
case "danger":
|
|
15911
|
+
return jsx(SvgExclamationCircleIcon, {});
|
|
15912
|
+
default:
|
|
15913
|
+
return;
|
|
15914
|
+
}
|
|
15915
|
+
}
|
|
15916
|
+
function AlertBanner({ variant = "info", isIconHidden = false, isCloseable = true, role = "status", onClose, children, customIcon, ...props }) {
|
|
15917
|
+
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, {}) }) }))] }) }));
|
|
15918
|
+
}
|
|
15919
|
+
|
|
15920
|
+
var css_248z$j = ".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";
|
|
15921
|
+
styleInject(css_248z$j);
|
|
15922
|
+
|
|
15923
|
+
function ButtonGroup({ orientation = "horizontal", alignment = "start", ariaLabel, children, ...props }) {
|
|
15924
|
+
return (jsx("div", { className: `bcds-ButtonGroup ${orientation} ${alignment}`, role: "group", "aria-label": ariaLabel, ...props, children: children }));
|
|
15925
|
+
}
|
|
15926
|
+
|
|
15927
|
+
var css_248z$i = ".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";
|
|
15928
|
+
styleInject(css_248z$i);
|
|
15228
15929
|
|
|
15229
15930
|
/* Sets correct left icon for selected variant */
|
|
15230
15931
|
function getIcon$1(variant) {
|
|
@@ -15247,6 +15948,14 @@ function AlertDialog({ children, variant = "info", role = "dialog", title, isClo
|
|
|
15247
15948
|
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 }))] })) }));
|
|
15248
15949
|
}
|
|
15249
15950
|
|
|
15951
|
+
var css_248z$h = ".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";
|
|
15952
|
+
styleInject(css_248z$h);
|
|
15953
|
+
|
|
15954
|
+
function Callout({ variant = "lightGrey", title, description, buttons, role = "note", isLeftBorderDisabled = false, children, ...props }) {
|
|
15955
|
+
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 }))] }) })) }));
|
|
15956
|
+
}
|
|
15957
|
+
|
|
15958
|
+
/* The component implements the Check icon from Font Awesome: https://fontawesome.com/icons/check */
|
|
15250
15959
|
function SvgCheckIcon({ id = "check-icon" }) {
|
|
15251
15960
|
return (jsx("svg", { id: id, width: "10", height: "10", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg", children: jsx("g", { children: jsx("path", { d: "M9.09447 1.16176C8.67766 0.834916 8.07489 0.907409 7.74747 1.32376L3.63547 6.55676L2.21847 4.85676C1.87495 4.46651 1.2832 4.42064 0.883639 4.75329C0.484082 5.08594 0.421942 5.6762 0.743468 6.08476L2.92047 8.69776C2.94047 8.72176 2.96947 8.72976 2.99047 8.75176C3.0133 8.78196 3.03802 8.81068 3.06447 8.83776C3.10707 8.86542 3.15189 8.8895 3.19847 8.90976C3.23068 8.92977 3.26407 8.9478 3.29847 8.96376C3.41159 9.01295 3.53316 9.03977 3.65647 9.04276H3.65747C3.78585 9.04006 3.91238 9.01149 4.02947 8.95876C4.06502 8.9413 4.09942 8.92159 4.13247 8.89976C4.18141 8.87729 4.22826 8.85052 4.27247 8.81976C4.29837 8.79134 4.32242 8.76128 4.34447 8.72976C4.36447 8.70976 4.39347 8.69976 4.41247 8.67576L9.25747 2.50976C9.58477 2.09253 9.51178 1.48896 9.09447 1.16176V1.16176Z", fill: "currentColor" }) }) }));
|
|
15252
15961
|
}
|
|
@@ -15412,14 +16121,6 @@ function RadioGroup({ orientation = "vertical", label, description, children, er
|
|
|
15412
16121
|
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 })] }))] })) }));
|
|
15413
16122
|
}
|
|
15414
16123
|
|
|
15415
|
-
function SvgChevronUpIcon({ id = "chevron-up-icon" }) {
|
|
15416
|
-
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" }) }));
|
|
15417
|
-
}
|
|
15418
|
-
|
|
15419
|
-
function SvgChevronDownIcon({ id = "chevron-down-icon" }) {
|
|
15420
|
-
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" }) }));
|
|
15421
|
-
}
|
|
15422
|
-
|
|
15423
16124
|
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";
|
|
15424
16125
|
styleInject(css_248z$7);
|
|
15425
16126
|
|
|
@@ -15440,18 +16141,27 @@ function Select({ items, sections, label, description, placeholder, size = "medi
|
|
|
15440
16141
|
// support different markup within the same component.
|
|
15441
16142
|
items: sections
|
|
15442
16143
|
? sections
|
|
15443
|
-
: [{ id: "section", header: "", items: items ? items : [] }], children: (section) => (jsxs($
|
|
16144
|
+
: [{ 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 }))] })) })] })) }) })] })) }));
|
|
16145
|
+
}
|
|
16146
|
+
|
|
16147
|
+
function SvgBcOutlineIcon({ id = "bc-outline-icon" }) {
|
|
16148
|
+
return (jsx("svg", { id: id, xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "currentColor", children: jsxs("g", { children: [jsx("path", { d: "M8.55494 17.9955C8.48489 17.9953 8.4157 17.9801 8.35199 17.951C8.28827 17.9219 8.23149 17.8795 8.18543 17.8268L7.40648 16.9832L6.22541 16.0636L5.199 15.4961C5.11007 15.4438 5.03665 15.3688 4.98625 15.2788C4.93585 15.1887 4.91028 15.0869 4.91217 14.9838V13.6103C4.90822 13.4748 4.9534 13.3423 5.03939 13.2374C5.12538 13.1325 5.24638 13.0622 5.3801 13.0395L5.90315 12.9832C5.85315 12.9105 5.81957 12.8278 5.80473 12.7408L5.47065 10.7162L4.85199 9.65994C4.77992 9.54214 4.75071 9.40308 4.76932 9.26624L5.06009 7.19318L4.03761 6.7708C3.97024 6.74182 3.90941 6.69953 3.85878 6.64647C3.80814 6.59342 3.76873 6.53069 3.74291 6.46204L2.8481 4.13645L2.06072 4.06615C1.97763 4.05479 1.89849 4.02362 1.82998 3.97527C1.76146 3.92691 1.70557 3.86279 1.66703 3.78831L0.0922668 0.863752C0.0326295 0.767506 0.000706201 0.65667 1.15824e-05 0.543447C-0.000683036 0.430224 0.0298779 0.319005 0.0883299 0.222035C0.14711 0.132622 0.233402 0.0647766 0.33416 0.0287553C0.434919 -0.00726609 0.544665 -0.00950484 0.646809 0.0223775C0.717673 0.042062 7.83223 2.31085 11.7298 1.5634C11.7994 1.5514 11.8709 1.55502 11.9389 1.57398C12.007 1.59295 12.0701 1.62679 12.1235 1.67307C12.2388 1.77389 12.3119 1.91446 12.3282 2.06676L13.0245 9.77692L13.6994 10.2111C13.7984 10.2792 13.8741 10.3762 13.9159 10.4889L14.1836 11.2324L15.3647 11.7251C15.4523 11.7653 15.5285 11.8268 15.5862 11.904C15.6439 11.9812 15.6812 12.0717 15.6948 12.1672L15.8326 13.0749L16.5131 13.5249C16.5697 13.5613 16.6179 13.6092 16.6549 13.6655L17.8922 15.4179C17.9503 15.5022 17.9865 15.5996 17.9975 15.7013C18.0085 15.803 17.9939 15.9059 17.9552 16.0006C17.9216 16.0925 17.8628 16.1731 17.7857 16.2333C17.7085 16.2934 17.616 16.3307 17.5187 16.3409L10.2529 16.9123C10.2067 17.0062 10.136 17.0859 10.0482 17.1429L8.81084 17.9252C8.73397 17.9725 8.64519 17.9969 8.55494 17.9955ZM5.97851 14.6356L6.76589 15.0619C6.79052 15.0739 6.81311 15.0896 6.83282 15.1086L8.07014 16.0827L8.13706 16.139L8.65224 16.7098L9.43962 16.2211L9.11342 15.5642L8.32604 14.8893L7.08872 14.0367L5.96389 14.1581L5.97851 14.6356ZM7.22539 12.8595C7.32381 12.8587 7.42002 12.8888 7.50041 12.9456L8.91601 13.9197L8.96719 13.959L9.85187 14.7414C9.91189 14.7939 9.95904 14.8595 9.98966 14.9331L10.3834 15.7588L16.4957 15.2768L15.9136 14.4551L15.1262 13.923C15.0604 13.8776 15.0044 13.8193 14.9618 13.7517C14.9191 13.684 14.8907 13.6084 14.8782 13.5294L14.7522 12.6857L13.6156 12.2161C13.5437 12.1851 13.4791 12.1395 13.4256 12.0823C13.3722 12.0251 13.3312 11.9575 13.3051 11.8837L13.0183 11.1014L12.2826 10.6166C12.2115 10.567 12.1521 10.5025 12.1085 10.4274C12.065 10.3524 12.0384 10.2688 12.0307 10.1824L11.3631 2.78271C8.21693 3.17641 3.76484 2.09432 1.6136 1.48916L2.40098 2.94413L3.24461 3.01837C3.34242 3.03086 3.43481 3.07037 3.5114 3.13246C3.588 3.19455 3.64577 3.27677 3.67823 3.36988L4.61015 5.78826L5.83341 6.27307C5.94925 6.32592 6.04441 6.41555 6.10411 6.52802C6.1638 6.6405 6.1847 6.76953 6.16355 6.8951L5.83341 9.20719L6.42844 10.192C6.46921 10.2576 6.49601 10.3309 6.50718 10.4074L6.86094 12.5513C6.8826 12.6703 6.8675 12.7932 6.81764 12.9034L7.18321 12.8601L7.22539 12.8595Z", fill: "currentColor" }), jsx("path", { d: "M4.04436 12.2499C3.95082 12.2486 3.8594 12.2218 3.78006 12.1722C3.70073 12.1226 3.63652 12.0522 3.59443 11.9687L2.23676 9.43722C2.19774 9.36465 2.17379 9.28495 2.16634 9.20289C2.1589 9.12084 2.16812 9.03813 2.19345 8.95973C2.21557 8.8832 2.2541 8.81242 2.30636 8.7523C2.35861 8.69218 2.42334 8.64416 2.49603 8.61159L3.4004 8.2179C3.46575 8.19146 3.53591 8.17896 3.60637 8.1812C3.67684 8.18345 3.74606 8.20039 3.80959 8.23094C3.87313 8.26149 3.92959 8.30498 3.97534 8.35862C4.02109 8.41225 4.05514 8.47486 4.0753 8.54241C4.12772 8.68078 4.12656 8.83374 4.07204 8.97129C4.01752 9.10884 3.91357 9.22106 3.78059 9.28593L3.44314 9.43047L4.48923 11.3866C4.56015 11.5165 4.58089 11.6679 4.54751 11.8122C4.51412 11.9564 4.42894 12.0833 4.30814 12.1689C4.23031 12.2217 4.13841 12.2499 4.04436 12.2499Z", fill: "currentColor" })] }) }));
|
|
16149
|
+
}
|
|
16150
|
+
|
|
16151
|
+
/* The component implements the Flask icon from Font Awesome: https://fontawesome.com/icons/flask */
|
|
16152
|
+
function SvgBetaIcon({ id = "beta-icon" }) {
|
|
16153
|
+
return (jsx("svg", { id: id, width: "20", height: "20", viewBox: "0 0 448 512", xmlns: "http://www.w3.org/2000/svg", children: jsx("g", { children: jsx("path", { d: "M288 0L160 0 128 0C110.3 0 96 14.3 96 32s14.3 32 32 32l0 132.8c0 11.8-3.3 23.5-9.5 33.5L10.3 406.2C3.6 417.2 0 429.7 0 442.6C0 480.9 31.1 512 69.4 512l309.2 0c38.3 0 69.4-31.1 69.4-69.4c0-12.8-3.6-25.4-10.3-36.4L329.5 230.4c-6.2-10.1-9.5-21.7-9.5-33.5L320 64c17.7 0 32-14.3 32-32s-14.3-32-32-32L288 0zM192 196.8L192 64l64 0 0 132.8c0 23.7 6.6 46.9 19 67.1L309.5 320l-171 0L173 263.9c12.4-20.2 19-43.4 19-67.1z", fill: "currentColor" }) }) }));
|
|
15444
16154
|
}
|
|
15445
16155
|
|
|
15446
16156
|
function SvgTooltipArrowUp({ id = "tooltip-arrow" }) {
|
|
15447
16157
|
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" }) }) }));
|
|
15448
16158
|
}
|
|
15449
16159
|
|
|
15450
|
-
var css_248z$6 = ".bcds-react-aria-Tag {\n color: var(--typography-color-primary);\n cursor: pointer;\n border
|
|
16160
|
+
var css_248z$6 = ".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";
|
|
15451
16161
|
styleInject(css_248z$6);
|
|
15452
16162
|
|
|
15453
|
-
function Tag({ color = "blue", icon, id, textValue }) {
|
|
15454
|
-
return (jsx($eaf9e70818b436db$export$3288d34c523a1192, { className: `bcds-react-aria-Tag ${color}`, 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" }) }) }) }))] })) }));
|
|
16163
|
+
function Tag({ color = "blue", tagStyle = "rectangular", size = "small", icon, id, textValue, }) {
|
|
16164
|
+
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" }) }) }) }))] })) }));
|
|
15455
16165
|
}
|
|
15456
16166
|
|
|
15457
16167
|
var css_248z$5 = ".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";
|
|
@@ -15503,5 +16213,5 @@ function Tooltip(props) {
|
|
|
15503
16213
|
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 })] }));
|
|
15504
16214
|
}
|
|
15505
16215
|
|
|
15506
|
-
export { AlertDialog, Button, ButtonGroup, Checkbox, CheckboxGroup, Dialog, $de32f1b87079253c$export$2e1e1122cf0cba88 as DialogTrigger, Footer, FooterLinks, Form, Header, InlineAlert, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, TextArea, TextField, Tooltip, $4e3b923658d69c60$export$8c610744efcf8a1d as TooltipTrigger };
|
|
16216
|
+
export { Accordion, AccordionGroup, 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 };
|
|
15507
16217
|
//# sourceMappingURL=index.js.map
|