@pega/cosmos-react-core 5.0.0-dev.2.1 → 5.0.0-dev.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AIButton/AIButton.d.ts +1 -1
- package/lib/components/Actions/Actions.d.ts +1 -1
- package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +4 -2
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +2 -1
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/NavigationList.js +2 -2
- package/lib/components/AppShell/NavigationList.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +10 -11
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +11 -15
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Avatar/Avatar.test-ids.d.ts +2 -0
- package/lib/components/Avatar/Avatar.test-ids.d.ts.map +1 -0
- package/lib/components/Avatar/Avatar.test-ids.js +3 -0
- package/lib/components/Avatar/Avatar.test-ids.js.map +1 -0
- package/lib/components/Backdrop/Backdrop.d.ts +6 -4
- package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
- package/lib/components/Backdrop/Backdrop.js +7 -5
- package/lib/components/Backdrop/Backdrop.js.map +1 -1
- package/lib/components/Backdrop/Backdrop.test-ids.d.ts +2 -0
- package/lib/components/Backdrop/Backdrop.test-ids.d.ts.map +1 -0
- package/lib/components/Backdrop/Backdrop.test-ids.js +3 -0
- package/lib/components/Backdrop/Backdrop.test-ids.js.map +1 -0
- package/lib/components/Badges/Alert.d.ts +7 -5
- package/lib/components/Badges/Alert.d.ts.map +1 -1
- package/lib/components/Badges/Alert.js +7 -3
- package/lib/components/Badges/Alert.js.map +1 -1
- package/lib/components/Badges/Badges.test-ids.d.ts +7 -0
- package/lib/components/Badges/Badges.test-ids.d.ts.map +1 -0
- package/lib/components/Badges/Badges.test-ids.js +8 -0
- package/lib/components/Badges/Badges.test-ids.js.map +1 -0
- package/lib/components/Badges/Count.d.ts +5 -3
- package/lib/components/Badges/Count.d.ts.map +1 -1
- package/lib/components/Badges/Count.js +7 -4
- package/lib/components/Badges/Count.js.map +1 -1
- package/lib/components/Badges/Keyboard.d.ts +5 -3
- package/lib/components/Badges/Keyboard.d.ts.map +1 -1
- package/lib/components/Badges/Keyboard.js +7 -3
- package/lib/components/Badges/Keyboard.js.map +1 -1
- package/lib/components/Badges/Selection.d.ts +6 -4
- package/lib/components/Badges/Selection.d.ts.map +1 -1
- package/lib/components/Badges/Selection.js +7 -5
- package/lib/components/Badges/Selection.js.map +1 -1
- package/lib/components/Badges/Status.d.ts +7 -5
- package/lib/components/Badges/Status.d.ts.map +1 -1
- package/lib/components/Badges/Status.js +7 -4
- package/lib/components/Badges/Status.js.map +1 -1
- package/lib/components/Badges/Tag.d.ts +6 -4
- package/lib/components/Badges/Tag.d.ts.map +1 -1
- package/lib/components/Badges/Tag.js +7 -4
- package/lib/components/Badges/Tag.js.map +1 -1
- package/lib/components/Banner/Banner.d.ts +1 -1
- package/lib/components/Boolean/BooleanDisplay.d.ts +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.js +27 -16
- package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts +2 -2
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +47 -29
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.js +1 -7
- package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -5
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +2 -10
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +1 -12
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts +19 -9
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +49 -27
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyInput.js +2 -13
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/DangerButton/DangerButton.d.ts +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +1 -12
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.js +26 -20
- package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +1 -12
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/Duration/DurationInput.js +2 -11
- package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +1 -11
- package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.js +1 -11
- package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +1 -12
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +1 -11
- package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
- package/lib/components/Drawer/Drawer.js +1 -1
- package/lib/components/Drawer/Drawer.js.map +1 -1
- package/lib/components/File/FileDisplay.d.ts.map +1 -1
- package/lib/components/File/FileDisplay.js +1 -5
- package/lib/components/File/FileDisplay.js.map +1 -1
- package/lib/components/File/FileInput.d.ts.map +1 -1
- package/lib/components/File/FileInput.js +1 -11
- package/lib/components/File/FileInput.js.map +1 -1
- package/lib/components/File/FileVisual.d.ts +1 -1
- package/lib/components/File/FileVisual.d.ts.map +1 -1
- package/lib/components/File/FileVisual.js +15 -11
- package/lib/components/File/FileVisual.js.map +1 -1
- package/lib/components/Form/Form.d.ts +6 -4
- package/lib/components/Form/Form.d.ts.map +1 -1
- package/lib/components/Form/Form.js +7 -4
- package/lib/components/Form/Form.js.map +1 -1
- package/lib/components/Form/Form.test-ids.d.ts +2 -0
- package/lib/components/Form/Form.test-ids.d.ts.map +1 -0
- package/lib/components/Form/Form.test-ids.js +3 -0
- package/lib/components/Form/Form.test-ids.js.map +1 -0
- package/lib/components/HTML/HTML.d.ts +6 -4
- package/lib/components/HTML/HTML.d.ts.map +1 -1
- package/lib/components/HTML/HTML.js +7 -4
- package/lib/components/HTML/HTML.js.map +1 -1
- package/lib/components/HTML/HTML.test-ids.d.ts +2 -0
- package/lib/components/HTML/HTML.test-ids.d.ts.map +1 -0
- package/lib/components/HTML/HTML.test-ids.js +3 -0
- package/lib/components/HTML/HTML.test-ids.js.map +1 -0
- package/lib/components/Icon/Icon.d.ts +37 -8
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +98 -11
- package/lib/components/Icon/Icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/{flag-solid.icon.d.ts → flag-wave-solid.icon.d.ts} +2 -2
- package/lib/components/Icon/streamline-icons/flag-wave-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/{flag-solid.icon.js → flag-wave-solid.icon.js} +2 -2
- package/lib/components/Icon/streamline-icons/flag-wave-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/{flag.icon.d.ts → flag-wave.icon.d.ts} +2 -2
- package/lib/components/Icon/streamline-icons/flag-wave.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/{flag.icon.js → flag-wave.icon.js} +2 -2
- package/lib/components/Icon/streamline-icons/flag-wave.icon.js.map +1 -0
- package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
- package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
- package/lib/components/Icon/streamlineIconNames.js +2 -2
- package/lib/components/Icon/streamlineIconNames.js.map +1 -1
- package/lib/components/Input/Input.d.ts.map +1 -1
- package/lib/components/Input/Input.js +2 -27
- package/lib/components/Input/Input.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts +4 -2
- package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.js +11 -9
- package/lib/components/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.d.ts +3 -1
- package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.test-ids.d.ts +2 -0
- package/lib/components/Lightbox/Lightbox.test-ids.d.ts.map +1 -0
- package/lib/components/Lightbox/Lightbox.test-ids.js +12 -0
- package/lib/components/Lightbox/Lightbox.test-ids.js.map +1 -0
- package/lib/components/Lightbox/Lightbox.types.d.ts +2 -2
- package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
- package/lib/components/Link/Link.d.ts +6 -4
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js +8 -6
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/Link/Link.test-ids.d.ts +2 -0
- package/lib/components/Link/Link.test-ids.d.ts.map +1 -0
- package/lib/components/Link/Link.test-ids.js +7 -0
- package/lib/components/Link/Link.test-ids.js.map +1 -0
- package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +10 -8
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
- package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
- package/lib/components/Location/LocationDisplay.js +1 -6
- package/lib/components/Location/LocationDisplay.js.map +1 -1
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js +3 -30
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Location/LocationView.d.ts +3 -1
- package/lib/components/Location/LocationView.d.ts.map +1 -1
- package/lib/components/Menu/Menu.styles.d.ts +1 -1
- package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
- package/lib/components/Menu/Menu.styles.js +2 -2
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/Menu/MenuItem.js.map +1 -1
- package/lib/components/Modal/Modal.js +1 -1
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.js +1 -2
- package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
- package/lib/components/Number/NumberInput.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.js +3 -15
- package/lib/components/Number/NumberInput.js.map +1 -1
- package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
- package/lib/components/Phone/PhoneInput.js +1 -12
- package/lib/components/Phone/PhoneInput.js.map +1 -1
- package/lib/components/Progress/Progress.styles.d.ts +3 -1
- package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js +1 -8
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.d.ts +2 -2
- package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.js +69 -19
- package/lib/components/SearchInput/SearchInput.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.js +4 -0
- package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +1 -14
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Slider/Slider.d.ts.map +1 -1
- package/lib/components/Slider/Slider.js +2 -12
- package/lib/components/Slider/Slider.js.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +2 -30
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/Toaster/Toaster.d.ts +4 -2
- package/lib/components/Toaster/Toaster.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.js +18 -16
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Toaster/Toaster.test-ids.d.ts +2 -0
- package/lib/components/Toaster/Toaster.test-ids.d.ts.map +1 -0
- package/lib/components/Toaster/Toaster.test-ids.js +3 -0
- package/lib/components/Toaster/Toaster.test-ids.js.map +1 -0
- package/lib/components/Toaster/Toaster.types.d.ts +2 -1
- package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.types.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.d.ts +6 -4
- package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +7 -5
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.test-ids.d.ts +2 -0
- package/lib/components/Tooltip/Tooltip.test-ids.d.ts.map +1 -0
- package/lib/components/Tooltip/Tooltip.test-ids.js +3 -0
- package/lib/components/Tooltip/Tooltip.test-ids.js.map +1 -0
- package/lib/components/Tree/StandardTree.styles.d.ts +5 -3
- package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
- package/lib/components/Tree/Tree.d.ts +6 -4
- package/lib/components/Tree/Tree.d.ts.map +1 -1
- package/lib/components/Tree/Tree.js +7 -3
- package/lib/components/Tree/Tree.js.map +1 -1
- package/lib/components/Tree/Tree.test-ids.d.ts +3 -0
- package/lib/components/Tree/Tree.test-ids.d.ts.map +1 -0
- package/lib/components/Tree/Tree.test-ids.js +4 -0
- package/lib/components/Tree/Tree.test-ids.js.map +1 -0
- package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
- package/lib/hooks/useActiveDescendant.js +4 -1
- package/lib/hooks/useActiveDescendant.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +38 -0
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/i18n/default.d.ts +38 -0
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +40 -1
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +38 -0
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/theme/theme.d.ts +37 -6
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +12 -4
- package/lib/theme/themeOverrides.schema.json +22 -3
- package/lib/theme/themes/aries2023DarkTheme.json +1 -3
- package/lib/theme/themes/aries2023Theme.json +1 -1
- package/lib/theme/themes/darkTheme.json +1 -3
- package/package.json +6 -6
- package/lib/components/Icon/streamline-icons/flag-solid.icon.d.ts.map +0 -1
- package/lib/components/Icon/streamline-icons/flag-solid.icon.js.map +0 -1
- package/lib/components/Icon/streamline-icons/flag.icon.d.ts.map +0 -1
- package/lib/components/Icon/streamline-icons/flag.icon.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selection.js","sourceRoot":"","sources":["../../../src/components/Badges/Selection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,UAAU,EAAuC,MAAM,OAAO,CAAC;AACxF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Selection.js","sourceRoot":"","sources":["../../../src/components/Badges/Selection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,UAAU,EAAuC,MAAM,OAAO,CAAC;AACxF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/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AU,mBACI,OAAO,CAAC,MAAM,EAC3B,QAAQ,EAAC,IAAI,EACb,OAAO,EAAE,gBAAgB,gBACb,CAAC,CAAC,QAAQ,CAAC,YAEvB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACV,CACd,IACgB,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { FC, MouseEvent, forwardRef, PropsWithoutRef, Ref, KeyboardEvent } from 'react';\nimport styled, { css } from 'styled-components';\nimport { mix, transparentize } from 'polished';\n\nimport { ForwardProps, TestIdProp } from '../../types';\nimport { tryCatch, withTestIds } from '../../utils';\nimport BareButton, { StyledBareButton } from '../Button/BareButton';\nimport Icon, { registerIcon, StyledIcon } from '../Icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport { useConsolidatedRef, useI18n, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\n\nimport { getSelectableTestIds } from './Badges.test-ids';\n\nregisterIcon(timesIcon);\n\nexport interface SelectableProps extends TestIdProp {\n /** An id that is used by the onSelect and onRemove functions if they are provided. */\n id: string;\n /** The content of the Badge. */\n children: string;\n /** Takes an ID that represents the Badge. This function is called when the Badge is clicked. */\n onSelect?: (id: string) => void;\n /** Takes an ID that represents the Badge. This function is called when the Badge is closed by clicking the X. */\n onRemove?: (id: string) => void;\n /** Event handler called when the Badge is clicked. */\n onClick?: (event: MouseEvent) => void;\n /** Event handler fired on every keyup event. */\n onKeyUp?: (event: KeyboardEvent) => void;\n}\n\nexport const StyledSelectable = styled.button(\n ({\n theme: {\n base: { spacing, palette, 'border-radius': borderRadius },\n components: {\n badges: { selectable }\n }\n }\n }) => {\n const { foreground, background } = selectable.base;\n const { dark, 'primary-background': primaryBackground, interactive } = palette;\n\n const displayBackground = tryCatch(() => mix(0.15, background, primaryBackground));\n const hoverBorder = tryCatch(() => mix(0.3, background, primaryBackground));\n const boxShadowColor = tryCatch(() => transparentize(0.45, dark));\n\n const height = 1.125;\n return css`\n background: ${displayBackground};\n border: 0 solid transparent;\n border-radius: calc(${height} * ${borderRadius});\n color: ${foreground};\n cursor: default;\n display: inline-flex;\n font-size: 0.75rem;\n height: ${height}rem;\n padding: 0 ${spacing};\n max-width: 100%;\n line-height: 1;\n\n span {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n line-height: normal;\n }\n\n &:hover {\n color: ${interactive};\n box-shadow: inset 0 0 0 0.0625rem ${hoverBorder};\n\n ${StyledBareButton} {\n color: ${interactive};\n }\n }\n\n &:active {\n box-shadow: inset 0 0 0 0.0625rem ${background};\n }\n\n &:focus {\n color: ${interactive};\n box-shadow: 0 0 0.5rem -0.125rem ${boxShadowColor}, inset 0 0 0 0.125rem ${background};\n outline: none;\n\n ${StyledBareButton} {\n color: ${interactive};\n }\n }\n\n ${StyledIcon} {\n margin-inline-start: ${spacing};\n height: 1em;\n width: 1em;\n }\n `;\n }\n);\n\nStyledSelectable.defaultProps = defaultThemeProp;\n\nconst Selectable: FC<SelectableProps & ForwardProps> = forwardRef(function Selectable(\n {\n testId,\n id,\n children,\n onSelect,\n onRemove,\n onClick,\n onKeyUp,\n ...restProps\n }: PropsWithoutRef<SelectableProps>,\n ref: Ref<HTMLButtonElement>\n) {\n const consolidatedRef = useConsolidatedRef(ref);\n const t = useI18n();\n const testIds = useTestIds(testId, getSelectableTestIds);\n\n const handleClick = (e: MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n onSelect?.(id);\n };\n\n const handleCloseClick = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onRemove?.(id);\n };\n\n const handleKeyUp = (e: KeyboardEvent) => {\n onKeyUp?.(e);\n if (e.key === 'Enter') {\n onSelect?.(id);\n }\n\n if (e.key === 'Backspace' || e.key === 'Delete') {\n onRemove?.(id);\n }\n };\n\n return (\n <StyledSelectable\n data-testid={testIds.root}\n ref={consolidatedRef}\n onClick={handleClick}\n onKeyUp={handleKeyUp}\n {...restProps}\n >\n <span>{children}</span>\n {onRemove && (\n <BareButton\n data-testid={testIds.remove}\n tabIndex='-1'\n onClick={handleCloseClick}\n aria-label={t('remove')}\n >\n <Icon name='times' />\n </BareButton>\n )}\n </StyledSelectable>\n );\n});\n\nexport default withTestIds(Selectable, getSelectableTestIds);\n"]}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { ReactText } from 'react';
|
|
2
|
-
import { WithAttributes } from '../../types';
|
|
3
|
-
export type StatusProps = WithAttributes<'span', {
|
|
2
|
+
import { WithAttributes, TestIdProp } from '../../types';
|
|
3
|
+
export type StatusProps = WithAttributes<'span', TestIdProp & {
|
|
4
4
|
/** Determines the color to render the Badge as. This color is derived from the Theme. */
|
|
5
5
|
variant: 'success' | 'urgent' | 'warn' | 'pending' | 'info';
|
|
6
6
|
/** The content of the Badge, transformed to uppercase. */
|
|
7
7
|
children: ReactText;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const StyledStatus: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
9
|
+
export declare const StyledStatus: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, TestIdProp<undefined> & {
|
|
10
10
|
/** Determines the color to render the Badge as. This color is derived from the Theme. */
|
|
11
11
|
variant: 'success' | 'urgent' | 'warn' | 'pending' | 'info';
|
|
12
12
|
/** The content of the Badge, transformed to uppercase. */
|
|
13
13
|
children: ReactText;
|
|
14
|
-
} & Omit<import("../../types").Attributes<"span">, "children" | "variant">, never>;
|
|
15
|
-
declare const _default: import("react").ForwardRefExoticComponent<
|
|
14
|
+
} & Omit<import("../../types").Attributes<"span">, "children" | "testId" | "variant">, never>;
|
|
15
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<StatusProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
16
|
+
getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly []>;
|
|
17
|
+
};
|
|
16
18
|
export default _default;
|
|
17
19
|
//# sourceMappingURL=Status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/components/Badges/Status.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/components/Badges/Status.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAc,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMrE,MAAM,MAAM,WAAW,GAAG,cAAc,CACtC,MAAM,EACN,UAAU,GAAG;IACX,yFAAyF;IACzF,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAC5D,0DAA0D;IAC1D,QAAQ,EAAE,SAAS,CAAC;CACrB,CACF,CAAC;AACF,eAAO,MAAM,YAAY;IANrB,yFAAyF;aAChF,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM;IAC3D,0DAA0D;cAChD,SAAS;6FAwBrB,CAAC;;;;AAIH,wBAaE"}
|
|
@@ -4,7 +4,9 @@ import styled, { css } from 'styled-components';
|
|
|
4
4
|
import { rgba } from 'polished';
|
|
5
5
|
import { calculateFontSize } from '../../styles';
|
|
6
6
|
import { defaultThemeProp } from '../../theme';
|
|
7
|
-
import { tryCatch } from '../../utils';
|
|
7
|
+
import { tryCatch, withTestIds } from '../../utils';
|
|
8
|
+
import { useTestIds } from '../../hooks';
|
|
9
|
+
import { getStatusTestIds } from './Badges.test-ids';
|
|
8
10
|
export const StyledStatus = styled.span(props => {
|
|
9
11
|
const { spacing } = props.theme.base;
|
|
10
12
|
const borderRadius = props.theme.base['border-radius'];
|
|
@@ -26,7 +28,8 @@ export const StyledStatus = styled.span(props => {
|
|
|
26
28
|
`;
|
|
27
29
|
});
|
|
28
30
|
StyledStatus.defaultProps = defaultThemeProp;
|
|
29
|
-
export default forwardRef(function Status({ variant = 'info', children, ...restProps }, ref) {
|
|
30
|
-
|
|
31
|
-
});
|
|
31
|
+
export default withTestIds(forwardRef(function Status({ testId, variant = 'info', children, ...restProps }, ref) {
|
|
32
|
+
const testIds = useTestIds(testId, getStatusTestIds);
|
|
33
|
+
return (_jsx(StyledStatus, { "data-testid": testIds.root, ...restProps, variant: variant, ref: ref, children: children }));
|
|
34
|
+
}), getStatusTestIds);
|
|
32
35
|
//# sourceMappingURL=Status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Status.js","sourceRoot":"","sources":["../../../src/components/Badges/Status.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA8B,MAAM,OAAO,CAAC;AAC/D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Status.js","sourceRoot":"","sources":["../../../src/components/Badges/Status.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA8B,MAAM,OAAO,CAAC;AAC/D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,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AAc,OAAO,CAAC,IAAI,KAAM,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,YAC/E,QAAQ,GACI,CAChB,CAAC;AACJ,CAAC,CAAC,EACF,gBAAgB,CACjB,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, ReactText } from 'react';\nimport styled, { css } from 'styled-components';\nimport { rgba } from 'polished';\n\nimport { calculateFontSize } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport { RefElement, WithAttributes, TestIdProp } from '../../types';\nimport { tryCatch, withTestIds } from '../../utils';\nimport { useTestIds } from '../../hooks';\n\nimport { getStatusTestIds } from './Badges.test-ids';\n\nexport type StatusProps = WithAttributes<\n 'span',\n TestIdProp & {\n /** Determines the color to render the Badge as. This color is derived from the Theme. */\n variant: 'success' | 'urgent' | 'warn' | 'pending' | 'info';\n /** The content of the Badge, transformed to uppercase. */\n children: ReactText;\n }\n>;\nexport const StyledStatus = styled.span<StatusProps>(props => {\n const { spacing } = props.theme.base;\n const borderRadius = props.theme.base['border-radius'];\n const { status } = props.theme.components.badges;\n\n const { background, foreground } = status[props.variant];\n const shadow = tryCatch(() => rgba(foreground, 0.1));\n const fontSize = calculateFontSize(props.theme.base['font-size'], props.theme.base['font-scale']);\n\n return css`\n background-color: ${background};\n border-radius: calc(0.25 * ${borderRadius});\n color: ${foreground};\n box-shadow: inset 0 0 0 0.0625rem ${shadow};\n display: inline-block;\n font-size: ${fontSize.xxs};\n font-weight: bold;\n line-height: calc(${spacing} * 2.5);\n padding: 0 ${spacing};\n text-transform: uppercase;\n `;\n});\n\nStyledStatus.defaultProps = defaultThemeProp;\n\nexport default withTestIds(\n forwardRef<RefElement<StatusProps>, PropsWithoutRef<StatusProps>>(function Status(\n { testId, variant = 'info', children, ...restProps },\n ref\n ) {\n const testIds = useTestIds(testId, getStatusTestIds);\n return (\n <StyledStatus data-testid={testIds.root} {...restProps} variant={variant} ref={ref}>\n {children}\n </StyledStatus>\n );\n }),\n getStatusTestIds\n);\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, Ref, MouseEventHandler } from 'react';
|
|
2
|
-
import { BaseProps, ForwardProps } from '../../types';
|
|
3
|
-
export interface TagProps extends BaseProps {
|
|
2
|
+
import { BaseProps, ForwardProps, TestIdProp } from '../../types';
|
|
3
|
+
export interface TagProps extends BaseProps, TestIdProp {
|
|
4
4
|
/** The content of the Badge. */
|
|
5
5
|
children: string;
|
|
6
6
|
/** A location to navigate to. Passing an href will render an anchor styled as a Tag. */
|
|
@@ -11,6 +11,8 @@ export interface TagProps extends BaseProps {
|
|
|
11
11
|
ref?: Ref<HTMLSpanElement | HTMLAnchorElement | HTMLButtonElement>;
|
|
12
12
|
}
|
|
13
13
|
export declare const StyledTag: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
-
declare const
|
|
15
|
-
|
|
14
|
+
declare const _default: FC<TagProps & ForwardProps> & {
|
|
15
|
+
getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly []>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
16
18
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Badges/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,GAAG,EAAmB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAMhF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Badges/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,GAAG,EAAmB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAMhF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMlE,MAAM,WAAW,QAAS,SAAQ,SAAS,EAAE,UAAU;IACrD,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qGAAqG;IACrG,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IACnE,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,SAAS,0GAiCpB,CAAC;;;;AAuBH,wBAA+C"}
|
|
@@ -3,8 +3,10 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
import { mix } from 'polished';
|
|
5
5
|
import { defaultThemeProp } from '../../theme';
|
|
6
|
-
import { tryCatch } from '../../utils';
|
|
6
|
+
import { tryCatch, withTestIds } from '../../utils';
|
|
7
7
|
import BareButton from '../Button/BareButton';
|
|
8
|
+
import { useTestIds } from '../../hooks';
|
|
9
|
+
import { getTagTestIds } from './Badges.test-ids';
|
|
8
10
|
export const StyledTag = styled.span(props => {
|
|
9
11
|
const borderRadius = props.theme.base['border-radius'];
|
|
10
12
|
const { spacing } = props.theme.base;
|
|
@@ -36,8 +38,9 @@ export const StyledTag = styled.span(props => {
|
|
|
36
38
|
`;
|
|
37
39
|
});
|
|
38
40
|
StyledTag.defaultProps = defaultThemeProp;
|
|
39
|
-
const Tag = forwardRef(function Tag({ children, href, onClick, ...restProps }, ref) {
|
|
40
|
-
|
|
41
|
+
const Tag = forwardRef(function Tag({ testId, children, href, onClick, ...restProps }, ref) {
|
|
42
|
+
const testIds = useTestIds(testId, getTagTestIds);
|
|
43
|
+
return (_jsx(StyledTag, { "data-testid": testIds.root, ...restProps, as: onClick || href ? BareButton : undefined, href: href, onClick: onClick, ref: ref, children: children }));
|
|
41
44
|
});
|
|
42
|
-
export default Tag;
|
|
45
|
+
export default withTestIds(Tag, getTagTestIds);
|
|
43
46
|
//# sourceMappingURL=Tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/Badges/Tag.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAA2C,MAAM,OAAO,CAAC;AAChF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/Badges/Tag.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAA2C,MAAM,OAAO,CAAC;AAChF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAalD,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;IAC3C,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;IACrC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;IAErE,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CAChC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,UAAU,CAAC,CACtE,CAAC;IACF,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAEhD,OAAO,GAAG,CAAA;8BACkB,WAAW;iCACR,YAAY;aAChC,UAAU;;;iBAGN,OAAO;;;sBAGF,UAAU;;;;sBAIV,UAAU;oBACZ,SAAS;;;;;gCAKG,WAAW;;;GAGxC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1C,MAAM,GAAG,GAAgC,UAAU,CAAC,SAAS,GAAG,CAC9D,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,EAA6B,EAC5E,GAAoB;IAEpB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAClD,OAAO,CACL,KAAC,SAAS,mBACK,OAAO,CAAC,IAAI,KACrB,SAAS,EACb,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,YAEP,QAAQ,GACC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import { FC, forwardRef, Ref, PropsWithoutRef, MouseEventHandler } from 'react';\nimport styled, { css } from 'styled-components';\nimport { mix } from 'polished';\n\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch, withTestIds } from '../../utils';\nimport { BaseProps, ForwardProps, TestIdProp } from '../../types';\nimport BareButton from '../Button/BareButton';\nimport { useTestIds } from '../../hooks';\n\nimport { getTagTestIds } from './Badges.test-ids';\n\nexport interface TagProps extends BaseProps, TestIdProp {\n /** The content of the Badge. */\n children: string;\n /** A location to navigate to. Passing an href will render an anchor styled as a Tag. */\n href?: string;\n /** Click handler for the badge. Passing an onClick function will render a button styled as a Tag. */\n onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLSpanElement | HTMLAnchorElement | HTMLButtonElement>;\n}\n\nexport const StyledTag = styled.span(props => {\n const borderRadius = props.theme.base['border-radius'];\n const { spacing } = props.theme.base;\n const { foreground, background } = props.theme.components.badges.tag;\n\n const borderColor = tryCatch(() =>\n mix(0.85, props.theme.base.palette['primary-background'], background)\n );\n const boxShadow = props.theme.base.shadow.focus;\n\n return css`\n border: 0.0625rem solid ${borderColor};\n border-radius: calc(0.25 * ${borderRadius});\n color: ${foreground};\n display: inline-block;\n font-size: 0.75rem;\n padding: 0 ${spacing};\n\n &:hover {\n border-color: ${background};\n }\n\n &:focus {\n border-color: ${background};\n box-shadow: ${boxShadow};\n outline: none;\n }\n\n &:active {\n border: 0.0625rem solid ${borderColor};\n box-shadow: none;\n }\n `;\n});\n\nStyledTag.defaultProps = defaultThemeProp;\n\nconst Tag: FC<TagProps & ForwardProps> = forwardRef(function Tag(\n { testId, children, href, onClick, ...restProps }: PropsWithoutRef<TagProps>,\n ref: TagProps['ref']\n) {\n const testIds = useTestIds(testId, getTagTestIds);\n return (\n <StyledTag\n data-testid={testIds.root}\n {...restProps}\n as={onClick || href ? BareButton : undefined}\n href={href}\n onClick={onClick}\n ref={ref}\n >\n {children}\n </StyledTag>\n );\n});\n\nexport default withTestIds(Tag, getTagTestIds);\n"]}
|
|
@@ -38,6 +38,6 @@ export declare const StyledBannerContent: import("styled-components").StyledComp
|
|
|
38
38
|
}, never>;
|
|
39
39
|
export declare const StyledBannerMessageList: import("styled-components").StyledComponent<import("react").FC<import("../List").UnorderedListProps & ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
40
40
|
export declare const StyledBannerMessage: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
41
|
-
declare const _default: import("react").ForwardRefExoticComponent<
|
|
41
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<BannerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
42
|
export default _default;
|
|
43
43
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -10,6 +10,6 @@ export type BooleanDisplayProps = WithAttributes<'span', NoChildrenProp & {
|
|
|
10
10
|
*/
|
|
11
11
|
falseLabel?: string;
|
|
12
12
|
}>;
|
|
13
|
-
declare const _default: import("react").ForwardRefExoticComponent<
|
|
13
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<BooleanDisplayProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
14
14
|
export default _default;
|
|
15
15
|
//# sourceMappingURL=BooleanDisplay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAEjB,GAAG,EAKJ,MAAM,OAAO,CAAC;AACf,OAAe,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAUtE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAEjB,GAAG,EAKJ,MAAM,OAAO,CAAC;AACf,OAAe,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAUtE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAKxC,MAAM,WAAW,gBAAiB,SAAQ,SAAS,EAAE,cAAc;IACjE,mHAAmH;IACnH,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAYD,eAAO,MAAM,iBAAiB;sBACV,OAAO;iBACZ,OAAO;SA8BrB,CAAC;AAuBF,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,GAAG,YAAY,CAmJnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -13,6 +13,7 @@ import * as caretLeftIcon from '../Icon/icons/caret-left.icon';
|
|
|
13
13
|
import * as caretRightIcon from '../Icon/icons/caret-right.icon';
|
|
14
14
|
import MenuButton from '../MenuButton';
|
|
15
15
|
import Text, { StyledText } from '../Text';
|
|
16
|
+
import Tooltip from '../Tooltip/Tooltip';
|
|
16
17
|
registerIcon(caretLeftIcon, caretRightIcon);
|
|
17
18
|
const StyledSeparator = styled(Icon)(({ theme }) => {
|
|
18
19
|
const color = tryCatch(() => rgba(theme.base.palette['foreground-color'], theme.base.transparency['transparent-2']));
|
|
@@ -20,7 +21,7 @@ const StyledSeparator = styled(Icon)(({ theme }) => {
|
|
|
20
21
|
color: ${color};
|
|
21
22
|
`;
|
|
22
23
|
});
|
|
23
|
-
export const StyledBreadcrumbs = styled.div(({
|
|
24
|
+
export const StyledBreadcrumbs = styled.div(({ oneItemRemaining, fixedLength }) => css `
|
|
24
25
|
white-space: nowrap;
|
|
25
26
|
overflow: visible;
|
|
26
27
|
visibility: ${fixedLength ? undefined : 'hidden'};
|
|
@@ -33,18 +34,21 @@ export const StyledBreadcrumbs = styled.div(({ theme, oneItemRemaining, fixedLen
|
|
|
33
34
|
${StyledLink},
|
|
34
35
|
${StyledButton},
|
|
35
36
|
${StyledText} {
|
|
36
|
-
|
|
37
|
-
}
|
|
37
|
+
flex-shrink: 1;
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
&:last-child {
|
|
40
|
+
${oneItemRemaining
|
|
41
|
+
? css `
|
|
42
|
+
flex-shrink: 1;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
`
|
|
46
|
+
: css `
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
`}
|
|
44
49
|
}
|
|
45
|
-
|
|
50
|
+
}
|
|
46
51
|
`);
|
|
47
|
-
StyledBreadcrumbs.defaultProps = defaultThemeProp;
|
|
48
52
|
const getEllipsisStyles = ({ theme }) => {
|
|
49
53
|
return css `
|
|
50
54
|
min-width: ${theme.base['content-width'].xs};
|
|
@@ -60,6 +64,7 @@ StyledEllipsizedButton.defaultProps = defaultThemeProp;
|
|
|
60
64
|
const StyledEllipsizedText = styled(Text)(getEllipsisStyles);
|
|
61
65
|
StyledEllipsizedText.defaultProps = defaultThemeProp;
|
|
62
66
|
const Breadcrumbs = forwardRef(function Breadcrumbs({ path, leafOnly = false, ...restProps }, ref) {
|
|
67
|
+
const nodeRefs = useRef({});
|
|
63
68
|
const [breadcrumbsEl, setBreadcrumbsEl] = useElement();
|
|
64
69
|
const [numMenuItems, setNumMenuItems] = useState(leafOnly ? Math.max(path.length - 1, 0) : 0);
|
|
65
70
|
const minInlineWidth = useRef(0);
|
|
@@ -112,18 +117,24 @@ const Breadcrumbs = forwardRef(function Breadcrumbs({ path, leafOnly = false, ..
|
|
|
112
117
|
const { id, primary, visual, href, onClick, ...restCrumbProps } = crumb;
|
|
113
118
|
let Comp;
|
|
114
119
|
if (href)
|
|
115
|
-
Comp = (_jsxs(Link, { href: href, as: primary.length
|
|
120
|
+
Comp = (_jsxs(Link, { href: href, as: primary.length >= 20 ? StyledEllipsizedLink : undefined, onClick: (e) => {
|
|
116
121
|
onClick?.(id, e);
|
|
117
|
-
}, ...restCrumbProps,
|
|
122
|
+
}, ...restCrumbProps, ref: el => {
|
|
123
|
+
nodeRefs.current[id] = el;
|
|
124
|
+
}, children: [visual, " ", primary] }, id));
|
|
118
125
|
else if (onClick)
|
|
119
|
-
Comp = (_jsxs(Button, { variant: 'link', as: primary.length
|
|
126
|
+
Comp = (_jsxs(Button, { variant: 'link', as: primary.length >= 20 ? StyledEllipsizedButton : undefined, onClick: (e) => {
|
|
120
127
|
onClick(id, e);
|
|
121
|
-
}, ...restCrumbProps,
|
|
128
|
+
}, ...restCrumbProps, ref: el => {
|
|
129
|
+
nodeRefs.current[id] = el;
|
|
130
|
+
}, children: [visual, " ", primary] }, id));
|
|
122
131
|
else
|
|
123
|
-
Comp = (_jsxs(Text, { as: primary.length
|
|
132
|
+
Comp = (_jsxs(Text, { as: primary.length >= 20 ? StyledEllipsizedText : undefined, ...restCrumbProps, ref: el => {
|
|
133
|
+
nodeRefs.current[id] = el;
|
|
134
|
+
}, children: [visual, " ", primary] }, id));
|
|
124
135
|
if (index === path.slice(numMenuItems).length - 1)
|
|
125
136
|
return Comp;
|
|
126
|
-
return (_jsxs(Fragment, { children: [Comp, _jsx(StyledSeparator, { name: `caret-${end}` })] }, id));
|
|
137
|
+
return (_jsxs(Fragment, { children: [Comp, _jsx(Tooltip, { target: nodeRefs.current[id], smart: true, children: primary }), _jsx(StyledSeparator, { name: `caret-${end}` })] }, id));
|
|
127
138
|
})] }));
|
|
128
139
|
});
|
|
129
140
|
export default Breadcrumbs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EAIR,SAAS,EACT,M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,SAAS,KACtD,cAAc,aAEjB,MAAM,OAAG,OAAO,KAJZ,EAAE,CAKF,CACR,CAAC;gBAEJ,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC;oBAAE,OAAO,IAAI,CAAC;gBAE/D,OAAO,CACL,MAAC,QAAQ,eACN,IAAI,EACL,KAAC,eAAe,IAAC,IAAI,EAAE,SAAS,GAAG,EAAE,GAAI,KAF5B,EAAE,CAGN,CACZ,CAAC;YACJ,CAAC,CAAC,IACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import {\n forwardRef,\n Fragment,\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n useEffect,\n useRef,\n useState,\n MouseEvent\n} from 'react';\nimport styled, { css, DefaultTheme } from 'styled-components';\nimport { rgba } from 'polished';\n\nimport { useElement, useConsolidatedRef, useDirection } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { debounce, tryCatch } from '../../utils';\nimport Button, { StyledButton } from '../Button';\nimport Flex from '../Flex';\nimport Link, { StyledLink } from '../Link';\nimport Icon, { StyledIcon, registerIcon } from '../Icon';\nimport * as caretLeftIcon from '../Icon/icons/caret-left.icon';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport MenuButton from '../MenuButton';\nimport Text, { StyledText } from '../Text';\nimport { MenuItemProps } from '../Menu';\n\nregisterIcon(caretLeftIcon, caretRightIcon);\n\nexport interface BreadcrumbsProps extends BaseProps, NoChildrenProp {\n /** A set of actions representing the chronological hierarchy of pages or locations leading to the current view. */\n path: MenuItemProps[];\n /**\n * Renders only the leaf node outside the menu list.\n * @default false\n * Note: Disables variable length on resize.\n */\n leafOnly?: boolean;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledSeparator: typeof Icon = styled(Icon)(({ theme }) => {\n const color = tryCatch(() =>\n rgba(theme.base.palette['foreground-color'], theme.base.transparency['transparent-2'])\n );\n\n return css`\n color: ${color};\n `;\n});\n\nexport const StyledBreadcrumbs = styled.div<{ oneItemRemaining: boolean; fixedLength: boolean }>(\n ({ theme, oneItemRemaining, fixedLength }) => css`\n white-space: nowrap;\n overflow: visible;\n visibility: ${fixedLength ? undefined : 'hidden'};\n\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n ${StyledLink},\n ${StyledButton},\n ${StyledText} {\n max-width: ${theme.base['content-width'].md};\n }\n\n ${oneItemRemaining &&\n css`\n & > :last-child {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n `}\n `\n);\n\nStyledBreadcrumbs.defaultProps = defaultThemeProp;\n\nconst getEllipsisStyles = ({ theme }: { theme: DefaultTheme }) => {\n return css`\n min-width: ${theme.base['content-width'].xs};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n `;\n};\n\nconst StyledEllipsizedLink = styled(Link)(getEllipsisStyles);\n\nStyledEllipsizedLink.defaultProps = defaultThemeProp;\n\nconst StyledEllipsizedButton = styled(Button)(getEllipsisStyles);\n\nStyledEllipsizedButton.defaultProps = defaultThemeProp;\n\nconst StyledEllipsizedText = styled(Text)(getEllipsisStyles);\n\nStyledEllipsizedText.defaultProps = defaultThemeProp;\n\nconst Breadcrumbs: FunctionComponent<BreadcrumbsProps & ForwardProps> = forwardRef(\n function Breadcrumbs(\n { path, leafOnly = false, ...restProps }: PropsWithoutRef<BreadcrumbsProps>,\n ref: BreadcrumbsProps['ref']\n ) {\n const [breadcrumbsEl, setBreadcrumbsEl] = useElement<HTMLDivElement>();\n const [numMenuItems, setNumMenuItems] = useState(leafOnly ? Math.max(path.length - 1, 0) : 0);\n const minInlineWidth = useRef(0);\n\n const breadcrumbRef = useConsolidatedRef(setBreadcrumbsEl, ref);\n\n // Update menu based on length\n useEffect(() => {\n if (leafOnly) {\n setNumMenuItems(Math.max(path.length - 1, 0));\n } else {\n setNumMenuItems(0);\n }\n }, [path, leafOnly]);\n\n // Manage Observers\n useEffect(() => {\n const debouncedResize = debounce((entries: ResizeObserverEntry[]) => {\n if (entries[0].contentRect.width > minInlineWidth.current) {\n setNumMenuItems(curr => {\n if (curr === 0) return curr;\n return curr - 1;\n });\n }\n }, 100);\n\n const resizeObserver = new ResizeObserver(debouncedResize);\n\n const intersectionObserver = new IntersectionObserver(\n entries => {\n if (entries[0].intersectionRatio < 1 && numMenuItems < path.length - 1) {\n if (entries[0].rootBounds) minInlineWidth.current = entries[0].rootBounds.width + 1;\n setNumMenuItems(curr => {\n if (curr === path.length - 1) return curr;\n return curr + 1;\n });\n } else if (breadcrumbsEl) breadcrumbsEl.style.visibility = 'visible';\n },\n { root: breadcrumbsEl, threshold: 1 }\n );\n\n if (!leafOnly && breadcrumbsEl && breadcrumbsEl.lastChild) {\n intersectionObserver.observe(breadcrumbsEl.lastChild as Element);\n resizeObserver.observe(breadcrumbsEl);\n }\n\n return () => {\n intersectionObserver.disconnect();\n resizeObserver.disconnect();\n };\n }, [breadcrumbsEl, numMenuItems, leafOnly]);\n\n const { end } = useDirection();\n\n return (\n <Flex\n {...restProps}\n container={{ gap: 0.5, alignItems: 'center' }}\n as={StyledBreadcrumbs}\n oneItemRemaining={numMenuItems === path.length - 1}\n fixedLength={leafOnly}\n ref={breadcrumbRef}\n >\n {numMenuItems > 0 && (\n <>\n <MenuButton\n text='Links'\n iconOnly\n variant='link'\n icon='folder-hierarchy-solid'\n menu={{ items: path.slice(0, numMenuItems).reverse() }}\n />\n <StyledSeparator name={`caret-${end}`} />\n </>\n )}\n {path.slice(numMenuItems).map((crumb, index) => {\n const { id, primary, visual, href, onClick, ...restCrumbProps } = crumb;\n let Comp;\n if (href)\n Comp = (\n <Link\n key={id}\n href={href}\n as={primary.length > 60 ? StyledEllipsizedLink : undefined}\n onClick={(e: MouseEvent<HTMLAnchorElement>) => {\n onClick?.(id, e);\n }}\n {...restCrumbProps}\n >\n {visual} {primary}\n </Link>\n );\n else if (onClick)\n Comp = (\n <Button\n key={id}\n variant='link'\n as={primary.length > 60 ? StyledEllipsizedButton : undefined}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onClick(id, e);\n }}\n {...restCrumbProps}\n >\n {visual} {primary}\n </Button>\n );\n else\n Comp = (\n <Text\n key={id}\n as={primary.length > 60 ? StyledEllipsizedText : undefined}\n {...restCrumbProps}\n >\n {visual} {primary}\n </Text>\n );\n\n if (index === path.slice(numMenuItems).length - 1) return Comp;\n\n return (\n <Fragment key={id}>\n {Comp}\n <StyledSeparator name={`caret-${end}`} />\n </Fragment>\n );\n })}\n </Flex>\n );\n }\n);\n\nexport default Breadcrumbs;\n"]}
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EAIR,SAAS,EACT,MAAM,EACN,QAAQ,EAET,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,aAAa,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,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AAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,kBACzC,OAAO,GACA,EACV,KAAC,eAAe,IAAC,IAAI,EAAE,SAAS,GAAG,EAAE,GAAI,KAL5B,EAAE,CAMN,CACZ,CAAC;YACJ,CAAC,CAAC,IACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import {\n forwardRef,\n Fragment,\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n useEffect,\n useRef,\n useState,\n MouseEvent\n} from 'react';\nimport styled, { css, DefaultTheme } from 'styled-components';\nimport { rgba } from 'polished';\n\nimport { useElement, useConsolidatedRef, useDirection } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { debounce, tryCatch } from '../../utils';\nimport Button, { StyledButton } from '../Button';\nimport Flex from '../Flex';\nimport Link, { StyledLink } from '../Link';\nimport Icon, { StyledIcon, registerIcon } from '../Icon';\nimport * as caretLeftIcon from '../Icon/icons/caret-left.icon';\nimport * as caretRightIcon from '../Icon/icons/caret-right.icon';\nimport MenuButton from '../MenuButton';\nimport Text, { StyledText } from '../Text';\nimport { MenuItemProps } from '../Menu';\nimport Tooltip from '../Tooltip/Tooltip';\n\nregisterIcon(caretLeftIcon, caretRightIcon);\n\nexport interface BreadcrumbsProps extends BaseProps, NoChildrenProp {\n /** A set of actions representing the chronological hierarchy of pages or locations leading to the current view. */\n path: MenuItemProps[];\n /**\n * Renders only the leaf node outside the menu list.\n * @default false\n * Note: Disables variable length on resize.\n */\n leafOnly?: boolean;\n /** Ref forwarded to the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledSeparator: typeof Icon = styled(Icon)(({ theme }) => {\n const color = tryCatch(() =>\n rgba(theme.base.palette['foreground-color'], theme.base.transparency['transparent-2'])\n );\n\n return css`\n color: ${color};\n `;\n});\n\nexport const StyledBreadcrumbs = styled.div<{\n oneItemRemaining: boolean;\n fixedLength: boolean;\n}>(\n ({ oneItemRemaining, fixedLength }) => css`\n white-space: nowrap;\n overflow: visible;\n visibility: ${fixedLength ? undefined : 'hidden'};\n\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n ${StyledLink},\n ${StyledButton},\n ${StyledText} {\n flex-shrink: 1;\n\n &:last-child {\n ${oneItemRemaining\n ? css`\n flex-shrink: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n `\n : css`\n flex-shrink: 0;\n `}\n }\n }\n `\n);\n\nconst getEllipsisStyles = ({ theme }: { theme: DefaultTheme }) => {\n return css`\n min-width: ${theme.base['content-width'].xs};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n `;\n};\n\nconst StyledEllipsizedLink = styled(Link)(getEllipsisStyles);\n\nStyledEllipsizedLink.defaultProps = defaultThemeProp;\n\nconst StyledEllipsizedButton = styled(Button)(getEllipsisStyles);\n\nStyledEllipsizedButton.defaultProps = defaultThemeProp;\n\nconst StyledEllipsizedText = styled(Text)(getEllipsisStyles);\n\nStyledEllipsizedText.defaultProps = defaultThemeProp;\n\nconst Breadcrumbs: FunctionComponent<BreadcrumbsProps & ForwardProps> = forwardRef(\n function Breadcrumbs(\n { path, leafOnly = false, ...restProps }: PropsWithoutRef<BreadcrumbsProps>,\n ref: BreadcrumbsProps['ref']\n ) {\n const nodeRefs = useRef<{ [key: string]: HTMLElement | null }>({});\n const [breadcrumbsEl, setBreadcrumbsEl] = useElement<HTMLDivElement>();\n const [numMenuItems, setNumMenuItems] = useState(leafOnly ? Math.max(path.length - 1, 0) : 0);\n const minInlineWidth = useRef(0);\n\n const breadcrumbRef = useConsolidatedRef(setBreadcrumbsEl, ref);\n\n // Update menu based on length\n useEffect(() => {\n if (leafOnly) {\n setNumMenuItems(Math.max(path.length - 1, 0));\n } else {\n setNumMenuItems(0);\n }\n }, [path, leafOnly]);\n\n // Manage Observers\n useEffect(() => {\n const debouncedResize = debounce((entries: ResizeObserverEntry[]) => {\n if (entries[0].contentRect.width > minInlineWidth.current) {\n setNumMenuItems(curr => {\n if (curr === 0) return curr;\n return curr - 1;\n });\n }\n }, 100);\n\n const resizeObserver = new ResizeObserver(debouncedResize);\n\n const intersectionObserver = new IntersectionObserver(\n entries => {\n if (entries[0].intersectionRatio < 1 && numMenuItems < path.length - 1) {\n if (entries[0].rootBounds) minInlineWidth.current = entries[0].rootBounds.width + 1;\n setNumMenuItems(curr => {\n if (curr === path.length - 1) return curr;\n return curr + 1;\n });\n } else if (breadcrumbsEl) breadcrumbsEl.style.visibility = 'visible';\n },\n { root: breadcrumbsEl, threshold: 1 }\n );\n\n if (!leafOnly && breadcrumbsEl && breadcrumbsEl.lastChild) {\n intersectionObserver.observe(breadcrumbsEl.lastChild as Element);\n resizeObserver.observe(breadcrumbsEl);\n }\n\n return () => {\n intersectionObserver.disconnect();\n resizeObserver.disconnect();\n };\n }, [breadcrumbsEl, numMenuItems, leafOnly]);\n\n const { end } = useDirection();\n\n return (\n <Flex\n {...restProps}\n container={{ gap: 0.5, alignItems: 'center' }}\n as={StyledBreadcrumbs}\n oneItemRemaining={numMenuItems === path.length - 1}\n fixedLength={leafOnly}\n ref={breadcrumbRef}\n >\n {numMenuItems > 0 && (\n <>\n <MenuButton\n text='Links'\n iconOnly\n variant='link'\n icon='folder-hierarchy-solid'\n menu={{ items: path.slice(0, numMenuItems).reverse() }}\n />\n <StyledSeparator name={`caret-${end}`} />\n </>\n )}\n {path.slice(numMenuItems).map((crumb, index) => {\n const { id, primary, visual, href, onClick, ...restCrumbProps } = crumb;\n let Comp;\n if (href)\n Comp = (\n <Link\n key={id}\n href={href}\n as={primary.length >= 20 ? StyledEllipsizedLink : undefined}\n onClick={(e: MouseEvent<HTMLAnchorElement>) => {\n onClick?.(id, e);\n }}\n {...restCrumbProps}\n ref={el => {\n nodeRefs.current[id] = el;\n }}\n >\n {visual} {primary}\n </Link>\n );\n else if (onClick)\n Comp = (\n <Button\n key={id}\n variant='link'\n as={primary.length >= 20 ? StyledEllipsizedButton : undefined}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onClick(id, e);\n }}\n {...restCrumbProps}\n ref={el => {\n nodeRefs.current[id] = el;\n }}\n >\n {visual} {primary}\n </Button>\n );\n else\n Comp = (\n <Text\n key={id}\n as={primary.length >= 20 ? StyledEllipsizedText : undefined}\n {...restCrumbProps}\n ref={el => {\n nodeRefs.current[id] = el;\n }}\n >\n {visual} {primary}\n </Text>\n );\n\n if (index === path.slice(numMenuItems).length - 1) return Comp;\n\n return (\n <Fragment key={id}>\n {Comp}\n <Tooltip target={nodeRefs.current[id]} smart>\n {primary}\n </Tooltip>\n <StyledSeparator name={`caret-${end}`} />\n </Fragment>\n );\n })}\n </Flex>\n );\n }\n);\n\nexport default Breadcrumbs;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { ForwardProps } from '../../types';
|
|
3
|
-
import ComboBoxProps from './ComboBox.types';
|
|
2
|
+
import type { ForwardProps } from '../../types';
|
|
3
|
+
import type ComboBoxProps from './ComboBox.types';
|
|
4
4
|
declare const _default: FunctionComponent<ComboBoxProps & ForwardProps> & {
|
|
5
5
|
getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAUlB,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAsBhD,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;;;;AAoWlD,wBAAyD"}
|
|
@@ -9,7 +9,7 @@ import FormField from '../FormField';
|
|
|
9
9
|
import { StyledFormControl } from '../FormControl';
|
|
10
10
|
import Menu from '../Menu';
|
|
11
11
|
import Button from '../Button';
|
|
12
|
-
import { navigatorIsAvailable, withTestIds } from '../../utils';
|
|
12
|
+
import { navigatorIsAvailable, withTestIds, getFocusables } from '../../utils';
|
|
13
13
|
import menuHelpers from '../Menu/helpers';
|
|
14
14
|
import { sameWidth } from '../Popover/modifiers';
|
|
15
15
|
import VisuallyHiddenText from '../VisuallyHiddenText';
|
|
@@ -22,11 +22,13 @@ const ComboBox = forwardRef(function ComboBox(props, ref) {
|
|
|
22
22
|
const uid = useUID();
|
|
23
23
|
const { testId, additionalInfo, value, required, id = uid, label, labelHidden, info, status, readOnly, disabled, mode = 'single-select', selected, onChange, actions, onFocus, onBlur, onResolveSuggestion, onDropdownButtonClick: onDropdownButtonClickProp, onClick, onKeyDown, menu, ...restProps } = props;
|
|
24
24
|
const testIds = useTestIds(testId, getComboBoxTestIds);
|
|
25
|
+
const bodyRef = useRef(document.body);
|
|
25
26
|
const [pauseMenuDescendantEvaluation, setPauseMenuDescendantEvaluation] = useState(true);
|
|
26
27
|
const [pauseSelectedDescendantEvaluation, setPauseSelectedDescendantEvaluation] = useState(false);
|
|
27
28
|
const t = useI18n();
|
|
28
29
|
const listId = `${id}-list`;
|
|
29
30
|
const inputRef = useRef(null);
|
|
31
|
+
const popoverRef = useRef(null);
|
|
30
32
|
const [open, setOpen] = useState(false);
|
|
31
33
|
const menuRef = useRef(null);
|
|
32
34
|
const menuComponentId = `${id}-listbox`;
|
|
@@ -42,7 +44,7 @@ const ComboBox = forwardRef(function ComboBox(props, ref) {
|
|
|
42
44
|
setPauseSelectedDescendantEvaluation(!bool);
|
|
43
45
|
setPauseMenuDescendantEvaluation(bool);
|
|
44
46
|
}, []);
|
|
45
|
-
const focus = useFocusWithin([containerRef], focused => {
|
|
47
|
+
const focus = useFocusWithin([containerRef, popoverRef], focused => {
|
|
46
48
|
if (!focused) {
|
|
47
49
|
setOpen(false);
|
|
48
50
|
toggleMenuDescendantsActive(false);
|
|
@@ -57,14 +59,15 @@ const ComboBox = forwardRef(function ComboBox(props, ref) {
|
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
|
-
|
|
62
|
+
const handleEscape = useCallback((e) => {
|
|
61
63
|
e.preventDefault();
|
|
62
64
|
if (open) {
|
|
63
65
|
e.stopPropagation();
|
|
64
66
|
setOpen(false);
|
|
65
67
|
toggleMenuDescendantsActive(false);
|
|
66
68
|
}
|
|
67
|
-
},
|
|
69
|
+
}, [open]);
|
|
70
|
+
useEscape(handleEscape, containerRef, [handleEscape]);
|
|
68
71
|
const onInputKeyDown = useCallback((e) => {
|
|
69
72
|
if (!menu || readOnly)
|
|
70
73
|
return;
|
|
@@ -88,10 +91,20 @@ const ComboBox = forwardRef(function ComboBox(props, ref) {
|
|
|
88
91
|
toggleMenuDescendantsActive(true);
|
|
89
92
|
}
|
|
90
93
|
break;
|
|
91
|
-
case 'Tab':
|
|
94
|
+
case 'Tab': {
|
|
95
|
+
const forward = !e.shiftKey;
|
|
96
|
+
if (forward) {
|
|
97
|
+
const popoverFocusables = getFocusables(popoverRef);
|
|
98
|
+
if (popoverFocusables.length) {
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
popoverFocusables[0].focus();
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
92
104
|
setOpen(false);
|
|
93
105
|
toggleMenuDescendantsActive(false);
|
|
94
106
|
break;
|
|
107
|
+
}
|
|
95
108
|
default:
|
|
96
109
|
}
|
|
97
110
|
}, [open, readOnly, menu, value, onKeyDown]);
|
|
@@ -134,22 +147,38 @@ const ComboBox = forwardRef(function ComboBox(props, ref) {
|
|
|
134
147
|
// Workaround for the following error from jsx-ast-utils, fixed in version 3.5.0.
|
|
135
148
|
// The prop value with an expression type of JSXFragment could not be resolved. Please file issue to get this fixed immediately.
|
|
136
149
|
const inputActions = (_jsxs(_Fragment, { children: [dropdownButton, actions] }));
|
|
137
|
-
const Comp = (_jsxs(StyledComboBox, { ref: containerRef, as: StyledFormControl, id: `${id}-combobox`, role: 'combobox', "aria-haspopup": 'listbox', "aria-expanded": !readOnly && !disabled && open, "aria-owns": open && menu !== undefined && !pauseMenuDescendantEvaluation ? listId : undefined, children: [_jsx(ComboBoxInput, { "data-testid": testIds.control, ref: inputRef, role: 'searchbox', "aria-autocomplete": 'list', "aria-controls": open && menu !== undefined && !pauseMenuDescendantEvaluation ? listId : undefined, "aria-describedby": ariaDescribedBy, selected: selected?.items, spellCheck: false,
|
|
138
|
-
id,
|
|
139
|
-
readOnly,
|
|
140
|
-
disabled,
|
|
141
|
-
onChange,
|
|
142
|
-
value,
|
|
143
|
-
mode,
|
|
144
|
-
status,
|
|
145
|
-
onResolveSuggestion
|
|
146
|
-
}, actions: inputActions, onRemove: selected?.onRemove, onClick: onInputClick, onKeyDown: onInputKeyDown, required: required, pauseDescendantEvaluation: pauseSelectedDescendantEvaluation, onSelectedFocus: () => {
|
|
150
|
+
const Comp = (_jsxs(StyledComboBox, { ref: containerRef, as: StyledFormControl, id: `${id}-combobox`, role: 'combobox', "aria-haspopup": 'listbox', "aria-expanded": !readOnly && !disabled && open, "aria-owns": open && menu !== undefined && !pauseMenuDescendantEvaluation ? listId : undefined, children: [_jsx(ComboBoxInput, { "data-testid": testIds.control, ref: inputRef, role: 'searchbox', "aria-autocomplete": 'list', "aria-controls": open && menu !== undefined && !pauseMenuDescendantEvaluation ? listId : undefined, "aria-describedby": ariaDescribedBy, selected: selected?.items, spellCheck: false, id: id, readOnly: readOnly, disabled: disabled, onChange: onChange, value: value, mode: mode, status: status, onResolveSuggestion: onResolveSuggestion, actions: inputActions, onRemove: selected?.onRemove, onClick: onInputClick, onKeyDown: onInputKeyDown, required: required, pauseDescendantEvaluation: pauseSelectedDescendantEvaluation, onSelectedFocus: () => {
|
|
147
151
|
toggleSelectedDescendantsActive(true);
|
|
148
152
|
}, onSelectedBlur: () => {
|
|
149
153
|
toggleSelectedDescendantsActive(false);
|
|
150
|
-
}, ...restProps }), _jsx(Popover, { show: open && menu !== undefined, target: containerRef.current, placement: 'bottom-start', modifiers: [sameWidth],
|
|
154
|
+
}, ...restProps }), _jsx(Popover, { ref: popoverRef, show: open && menu !== undefined, target: containerRef.current, placement: 'bottom-start', modifiers: [sameWidth],
|
|
151
155
|
// FIXME: Removed absolute strategy for mobile to avoid overflow issues.
|
|
152
|
-
strategy: 'fixed', onMouseDown: (e) => e.preventDefault(),
|
|
156
|
+
strategy: 'fixed', onMouseDown: (e) => e.preventDefault(), onKeyDown: (e) => {
|
|
157
|
+
if (!inputRef.current)
|
|
158
|
+
return;
|
|
159
|
+
if (e.key === 'Tab') {
|
|
160
|
+
const popoverFocusables = getFocusables(popoverRef);
|
|
161
|
+
const currentIndex = popoverFocusables.indexOf(e.target);
|
|
162
|
+
const forward = !e.shiftKey;
|
|
163
|
+
const isLast = currentIndex === popoverFocusables.length - 1;
|
|
164
|
+
if (forward && isLast) {
|
|
165
|
+
e.preventDefault();
|
|
166
|
+
const allFocusable = getFocusables(bodyRef);
|
|
167
|
+
const nextIndex = allFocusable.indexOf(inputRef.current) + 1;
|
|
168
|
+
allFocusable[nextIndex]?.focus();
|
|
169
|
+
setOpen(false);
|
|
170
|
+
toggleMenuDescendantsActive(false);
|
|
171
|
+
}
|
|
172
|
+
else if (!forward && currentIndex === 0) {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
inputRef.current.focus();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (e.key === 'Escape') {
|
|
178
|
+
handleEscape(e);
|
|
179
|
+
inputRef.current.focus();
|
|
180
|
+
}
|
|
181
|
+
}, children: menu && (_jsx(Menu, { ref: menuRef, listId: listId, id: menuComponentId, role: 'listbox', mode: mode, ...menu, items: menu.items, focusControlEl: inputRef.current || undefined, onItemClick: (itemId, e) => {
|
|
153
182
|
if (mode === 'single-select') {
|
|
154
183
|
setOpen(false);
|
|
155
184
|
toggleMenuDescendantsActive(true);
|
|
@@ -160,18 +189,7 @@ const ComboBox = forwardRef(function ComboBox(props, ref) {
|
|
|
160
189
|
selected?.onNew?.(clickedItem?.primary);
|
|
161
190
|
}
|
|
162
191
|
}, "aria-label": t('menu_option_list'), pauseDescendantEvaluation: pauseMenuDescendantEvaluation, arrowNavigationUnsupported: true })) })] }));
|
|
163
|
-
return (_jsxs(_Fragment, { children: [label ? (_jsx(FormField, {
|
|
164
|
-
testId: testIds,
|
|
165
|
-
label,
|
|
166
|
-
labelHidden,
|
|
167
|
-
id,
|
|
168
|
-
info,
|
|
169
|
-
status,
|
|
170
|
-
required,
|
|
171
|
-
disabled,
|
|
172
|
-
onResolveSuggestion,
|
|
173
|
-
additionalInfo
|
|
174
|
-
}, children: Comp })) : (Comp), _jsx(VisuallyHiddenText, { id: `${id}-inputDescription`, "aria-hidden": true, children: `${t('combobox_open_close')} ` }), _jsx(VisuallyHiddenText, { id: `${id}-searchDescription`, "aria-hidden": true, children: t('combobox_search_instructions') }), _jsx(VisuallyHiddenText, { id: `${id}-multiselectDescription`, "aria-hidden": true, children: t('multiselect_instructions', [start]) })] }));
|
|
192
|
+
return (_jsxs(_Fragment, { children: [label ? (_jsx(FormField, { testId: testIds, label: label, labelHidden: labelHidden, id: id, info: info, status: status, required: required, disabled: disabled, onResolveSuggestion: onResolveSuggestion, additionalInfo: additionalInfo, children: Comp })) : (Comp), _jsx(VisuallyHiddenText, { id: `${id}-inputDescription`, "aria-hidden": true, children: `${t('combobox_open_close')} ` }), _jsx(VisuallyHiddenText, { id: `${id}-searchDescription`, "aria-hidden": true, children: t('combobox_search_instructions') }), _jsx(VisuallyHiddenText, { id: `${id}-multiselectDescription`, "aria-hidden": true, children: t('multiselect_instructions', [start]) })] }));
|
|
175
193
|
});
|
|
176
194
|
export default withTestIds(ComboBox, getComboBoxTestIds);
|
|
177
195
|
//# sourceMappingURL=ComboBox.js.map
|