@flipdish/ui-library 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -7
- package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.cjs +5 -12
- package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.cjs.map +1 -1
- package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.d.ts.map +1 -1
- package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.js +5 -12
- package/dist/components/atoms/AppStoreButton/components/app-store-buttons-outline.js.map +1 -1
- package/dist/components/atoms/AppStoreButton/index.cjs +6 -15
- package/dist/components/atoms/AppStoreButton/index.cjs.map +1 -1
- package/dist/components/atoms/AppStoreButton/index.d.ts.map +1 -1
- package/dist/components/atoms/AppStoreButton/index.js +6 -15
- package/dist/components/atoms/AppStoreButton/index.js.map +1 -1
- package/dist/components/atoms/Avatar/components/avatar-base.cjs +60 -0
- package/dist/components/atoms/Avatar/components/avatar-base.cjs.map +1 -0
- package/dist/components/atoms/Avatar/components/avatar-base.d.ts +77 -0
- package/dist/components/atoms/Avatar/components/avatar-base.d.ts.map +1 -0
- package/dist/components/atoms/Avatar/components/avatar-base.js +58 -0
- package/dist/components/atoms/Avatar/components/avatar-base.js.map +1 -0
- package/dist/components/atoms/Avatar/components/avatar-label-group.cjs +2 -2
- package/dist/components/atoms/Avatar/components/avatar-label-group.cjs.map +1 -1
- package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts +1 -1
- package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts.map +1 -1
- package/dist/components/atoms/Avatar/components/avatar-label-group.js +1 -1
- package/dist/components/atoms/Avatar/index.cjs +3 -55
- package/dist/components/atoms/Avatar/index.cjs.map +1 -1
- package/dist/components/atoms/Avatar/index.d.ts +2 -70
- package/dist/components/atoms/Avatar/index.d.ts.map +1 -1
- package/dist/components/atoms/Avatar/index.js +1 -57
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Badge/index.cjs +0 -1
- package/dist/components/atoms/Badge/index.cjs.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +0 -5
- package/dist/components/atoms/Badge/index.d.ts.map +1 -1
- package/dist/components/atoms/Badge/index.js +1 -1
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Button/index.cjs +3 -3
- package/dist/components/atoms/Button/index.cjs.map +1 -1
- package/dist/components/atoms/Button/index.d.ts.map +1 -1
- package/dist/components/atoms/Button/index.js +1 -1
- package/dist/components/atoms/FeaturedIcon/index.cjs +2 -2
- package/dist/components/atoms/FeaturedIcon/index.cjs.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.d.ts.map +1 -1
- package/dist/components/atoms/FeaturedIcon/index.js +1 -1
- package/dist/components/atoms/UtilityButton/index.cjs +2 -2
- package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
- package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
- package/dist/components/atoms/UtilityButton/index.js +1 -1
- package/dist/components/molecules/BadgeGroup/index.cjs +3 -3
- package/dist/components/molecules/BadgeGroup/index.cjs.map +1 -1
- package/dist/components/molecules/BadgeGroup/index.d.ts.map +1 -1
- package/dist/components/molecules/BadgeGroup/index.js +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.cjs +2 -2
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.cjs.map +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-account-item.js +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs +9 -6
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.cjs.map +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js +7 -4
- package/dist/components/molecules/Breadcrumbs/components/breadcrumb-item.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.cjs +3 -6
- package/dist/components/molecules/Breadcrumbs/index.cjs.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.d.ts +2 -6
- package/dist/components/molecules/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.js +2 -5
- package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.cjs +17 -0
- package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.cjs.map +1 -0
- package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.d.ts +13 -0
- package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.d.ts.map +1 -0
- package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.js +15 -0
- package/dist/components/molecules/Breadcrumbs/providers/breadcrumbs-context.js.map +1 -0
- package/dist/components/molecules/ButtonGroup/index.cjs +2 -2
- package/dist/components/molecules/ButtonGroup/index.cjs.map +1 -1
- package/dist/components/molecules/ButtonGroup/index.d.ts.map +1 -1
- package/dist/components/molecules/ButtonGroup/index.js +1 -1
- package/dist/components/molecules/Carousel/index.cjs +0 -1
- package/dist/components/molecules/Carousel/index.cjs.map +1 -1
- package/dist/components/molecules/Carousel/index.d.ts +0 -1
- package/dist/components/molecules/Carousel/index.d.ts.map +1 -1
- package/dist/components/molecules/Carousel/index.js +1 -1
- package/dist/components/molecules/Carousel/index.js.map +1 -1
- package/dist/components/molecules/Select/components/combobox.cjs +2 -2
- package/dist/components/molecules/Select/components/combobox.cjs.map +1 -1
- package/dist/components/molecules/Select/components/combobox.d.ts.map +1 -1
- package/dist/components/molecules/Select/components/combobox.js +1 -1
- package/dist/components/molecules/Select/components/select-item.cjs +2 -2
- package/dist/components/molecules/Select/components/select-item.cjs.map +1 -1
- package/dist/components/molecules/Select/components/select-item.d.ts.map +1 -1
- package/dist/components/molecules/Select/components/select-item.js +1 -1
- package/dist/components/molecules/Select/index.cjs +2 -2
- package/dist/components/molecules/Select/index.cjs.map +1 -1
- package/dist/components/molecules/Select/index.d.ts.map +1 -1
- package/dist/components/molecules/Select/index.js +1 -1
- package/dist/components/molecules/Tabs/index.cjs +2 -2
- package/dist/components/molecules/Tabs/index.cjs.map +1 -1
- package/dist/components/molecules/Tabs/index.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/index.js +1 -1
- package/dist/components/organisms/ActivityFeed/index.cjs +5 -1
- package/dist/components/organisms/ActivityFeed/index.cjs.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.d.ts.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.js +5 -1
- package/dist/components/organisms/ActivityFeed/index.js.map +1 -1
- package/dist/components/organisms/Charts/index.d.ts +22 -6
- package/dist/components/organisms/Charts/index.d.ts.map +1 -1
- package/dist/components/organisms/FileUpload/index.cjs +1 -4
- package/dist/components/organisms/FileUpload/index.cjs.map +1 -1
- package/dist/components/organisms/FileUpload/index.d.ts +1 -9
- package/dist/components/organisms/FileUpload/index.d.ts.map +1 -1
- package/dist/components/organisms/FileUpload/index.js +3 -3
- package/dist/components/organisms/FileUpload/index.js.map +1 -1
- package/dist/components/organisms/GradientPicker/index.cjs +0 -6
- package/dist/components/organisms/GradientPicker/index.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/index.d.ts +0 -28
- package/dist/components/organisms/GradientPicker/index.d.ts.map +1 -1
- package/dist/components/organisms/GradientPicker/index.js +1 -1
- package/dist/components/organisms/GradientPicker/index.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs +2 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.d.ts.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js +2 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-item.cjs +4 -3
- package/dist/components/organisms/HeaderNavigation/components/nav-item.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-item.d.ts.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-item.js +4 -3
- package/dist/components/organisms/HeaderNavigation/components/nav-item.js.map +1 -1
- package/dist/components/organisms/ImagePicker/index.cjs +0 -3
- package/dist/components/organisms/ImagePicker/index.cjs.map +1 -1
- package/dist/components/organisms/ImagePicker/index.d.ts +0 -6
- package/dist/components/organisms/ImagePicker/index.d.ts.map +1 -1
- package/dist/components/organisms/ImagePicker/index.js +1 -1
- package/dist/components/organisms/ImagePicker/index.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs +5 -2
- package/dist/components/organisms/SidebarNavigation/components/nav-button.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-button.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-button.js +5 -2
- package/dist/components/organisms/SidebarNavigation/components/nav-button.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs +5 -4
- package/dist/components/organisms/SidebarNavigation/components/nav-item.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-item.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-item.js +5 -4
- package/dist/components/organisms/SidebarNavigation/components/nav-item.js.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs +13 -13
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.js +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-tooltip.cjs +2 -2
- package/dist/components/organisms/TextEditor/components/text-editor-tooltip.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-tooltip.js +1 -1
- package/dist/components/organisms/TextEditor/index.cjs +6 -13
- package/dist/components/organisms/TextEditor/index.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/index.d.ts +2 -10
- package/dist/components/organisms/TextEditor/index.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/index.js +2 -9
- package/dist/components/organisms/TextEditor/index.js.map +1 -1
- package/dist/components/organisms/TextEditor/providers/text-editor-context.cjs +21 -0
- package/dist/components/organisms/TextEditor/providers/text-editor-context.cjs.map +1 -0
- package/dist/components/organisms/TextEditor/providers/text-editor-context.d.ts +17 -0
- package/dist/components/organisms/TextEditor/providers/text-editor-context.d.ts.map +1 -0
- package/dist/components/organisms/TextEditor/providers/text-editor-context.js +18 -0
- package/dist/components/organisms/TextEditor/providers/text-editor-context.js.map +1 -0
- package/dist/components/organisms/TreeView/index.cjs +2 -2
- package/dist/components/organisms/TreeView/index.cjs.map +1 -1
- package/dist/components/organisms/TreeView/index.d.ts.map +1 -1
- package/dist/components/organisms/TreeView/index.js +1 -1
- package/dist/hooks/{useAriaDisclosureAttrs/index.cjs → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.cjs} +1 -1
- package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.cjs.map +1 -0
- package/dist/hooks/{useAriaDisclosureAttrs/index.d.ts → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.d.ts} +1 -1
- package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.d.ts.map +1 -0
- package/dist/hooks/{useAriaDisclosureAttrs/index.js → __internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.js} +1 -1
- package/dist/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.js.map +1 -0
- package/dist/native/components/atoms/Button/index.d.ts.map +1 -1
- package/dist/native/components/atoms/Button/index.js +1 -1
- package/dist/{utilities/isReactComponent/index.d.ts → native/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts} +3 -3
- package/dist/native/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts.map +1 -0
- package/dist/{utilities/isReactComponent/index.js → native/utilities/__internal__/componentGuardUtils/componentGuard.utils.js} +3 -3
- package/dist/native/utilities/__internal__/componentGuardUtils/componentGuard.utils.js.map +1 -0
- package/dist/native/utilities/cx/index.d.ts +2 -2
- package/dist/native/utilities/cx/index.js +2 -2
- package/dist/native/{hooks/useAriaDisclosureAttrs → utilities/hrefUtils}/index.d.ts +3 -3
- package/dist/utilities/{isReactComponent/index.cjs → __internal__/componentGuardUtils/componentGuard.utils.cjs} +3 -3
- package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs.map +1 -0
- package/dist/{native/utilities/isReactComponent/index.d.ts → utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts} +3 -3
- package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.d.ts.map +1 -0
- package/dist/{native/utilities/isReactComponent/index.js → utilities/__internal__/componentGuardUtils/componentGuard.utils.js} +3 -3
- package/dist/utilities/__internal__/componentGuardUtils/componentGuard.utils.js.map +1 -0
- package/dist/utilities/__internal__/logUtils/log.utils.cjs +32 -0
- package/dist/utilities/__internal__/logUtils/log.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/logUtils/log.utils.d.ts +23 -0
- package/dist/utilities/__internal__/logUtils/log.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/logUtils/log.utils.js +30 -0
- package/dist/utilities/__internal__/logUtils/log.utils.js.map +1 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs +102 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts +41 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js +98 -0
- package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js.map +1 -0
- package/dist/utilities/cx/index.cjs +2 -2
- package/dist/utilities/cx/index.d.ts +2 -2
- package/dist/utilities/cx/index.js +2 -2
- package/dist/utilities/hrefUtils/index.cjs +50 -0
- package/dist/utilities/hrefUtils/index.cjs.map +1 -0
- package/dist/utilities/hrefUtils/index.d.ts +19 -0
- package/dist/utilities/hrefUtils/index.d.ts.map +1 -0
- package/dist/utilities/hrefUtils/index.js +47 -0
- package/dist/utilities/hrefUtils/index.js.map +1 -0
- package/dist/utilities/localStorageUtils/index.cjs +9 -102
- package/dist/utilities/localStorageUtils/index.cjs.map +1 -1
- package/dist/utilities/localStorageUtils/index.d.ts +5 -5
- package/dist/utilities/localStorageUtils/index.d.ts.map +1 -1
- package/dist/utilities/localStorageUtils/index.js +7 -100
- package/dist/utilities/localStorageUtils/index.js.map +1 -1
- package/dist/utilities/renderUtils/index.cjs +7 -12
- package/dist/utilities/renderUtils/index.cjs.map +1 -1
- package/dist/utilities/renderUtils/index.d.ts.map +1 -1
- package/dist/utilities/renderUtils/index.js +7 -12
- package/dist/utilities/renderUtils/index.js.map +1 -1
- package/dist/utilities/sessionStorageUtils/index.cjs +9 -103
- package/dist/utilities/sessionStorageUtils/index.cjs.map +1 -1
- package/dist/utilities/sessionStorageUtils/index.d.ts +5 -6
- package/dist/utilities/sessionStorageUtils/index.d.ts.map +1 -1
- package/dist/utilities/sessionStorageUtils/index.js +7 -101
- package/dist/utilities/sessionStorageUtils/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/hooks/useAriaDisclosureAttrs/index.cjs.map +0 -1
- package/dist/hooks/useAriaDisclosureAttrs/index.d.ts.map +0 -1
- package/dist/hooks/useAriaDisclosureAttrs/index.js.map +0 -1
- package/dist/native/utilities/isReactComponent/index.d.ts.map +0 -1
- package/dist/native/utilities/isReactComponent/index.js.map +0 -1
- package/dist/utilities/isReactComponent/index.cjs.map +0 -1
- package/dist/utilities/isReactComponent/index.d.ts.map +0 -1
- package/dist/utilities/isReactComponent/index.js.map +0 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
|
-
var isReactComponent = require('@flipdish/ui-library/utilities/isReactComponent');
|
|
6
5
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
6
|
var React = require('react');
|
|
7
|
+
var componentGuard_utils = require('../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
8
8
|
|
|
9
9
|
const iconsSizes = {
|
|
10
10
|
sm: '*:data-icon:size-4 *:data-icon:stroke-[2.25px]',
|
|
@@ -123,7 +123,7 @@ const styles = cx.sortCx({
|
|
|
123
123
|
const FeaturedIcon = (props) => {
|
|
124
124
|
const { size = 'sm', theme: variant = 'light', color = 'brand', icon: Icon, 'data-testid': dataTestId, ...otherProps } = props;
|
|
125
125
|
const featuredIconTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'featured-icon', rootName: 'featured-icon' });
|
|
126
|
-
return (jsxRuntime.jsxs("div", { ...otherProps, "data-featured-icon": true, "data-testid": featuredIconTestId, className: cx.cx('relative flex shrink-0 items-center justify-center', iconsSizes[size], styles[variant].base, styles[variant].sizes[size], styles[variant].colors[color], props.className), children: [
|
|
126
|
+
return (jsxRuntime.jsxs("div", { ...otherProps, "data-featured-icon": true, "data-testid": featuredIconTestId, className: cx.cx('relative flex shrink-0 items-center justify-center', iconsSizes[size], styles[variant].base, styles[variant].sizes[size], styles[variant].colors[color], props.className), children: [componentGuard_utils.isReactComponent(Icon) && jsxRuntime.jsx(Icon, { "data-icon": true, className: "z-1" }), React.isValidElement(Icon) && jsxRuntime.jsx("div", { className: "z-1", children: Icon }), props.children] }));
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
exports.FeaturedIcon = FeaturedIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/FeaturedIcon/index.tsx"],"sourcesContent":[null],"names":["sortCx","useResolvedTestId","_jsxs","cx","isReactComponent","_jsx","isValidElement"],"mappings":";;;;;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,CAAC,IAAI,CAAC,IAAIC,cAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EAAA,IAAA,EAAW,SAAS,EAAC,KAAK,EAAA,CAAG,EAC5DC,oBAAc,CAAC,IAAI,CAAC,IAAID,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,KAAK,EAAA,QAAA,EAAE,IAAI,GAAO,EAEzD,KAAK,CAAC,QAAQ,CAAA,EAAA,CACX;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/FeaturedIcon/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/FeaturedIcon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAsHhD,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC3D,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;IAC7E,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,gCA0BpD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { sortCx, cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
-
import { isReactComponent } from '@flipdish/ui-library/utilities/isReactComponent';
|
|
4
3
|
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
4
|
import { isValidElement } from 'react';
|
|
5
|
+
import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
6
6
|
|
|
7
7
|
const iconsSizes = {
|
|
8
8
|
sm: '*:data-icon:size-4 *:data-icon:stroke-[2.25px]',
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var Tooltip = require('@flipdish/ui-library/components/atoms/Tooltip');
|
|
5
5
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
|
-
var isReactComponent = require('@flipdish/ui-library/utilities/isReactComponent');
|
|
7
6
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
8
7
|
var React = require('react');
|
|
9
8
|
var reactAriaComponents = require('react-aria-components');
|
|
9
|
+
var componentGuard_utils = require('../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
10
10
|
|
|
11
11
|
const styles = {
|
|
12
12
|
secondary: 'bg-primary text-fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
|
|
@@ -43,7 +43,7 @@ const ButtonUtility = ({ tooltip, className, isDisabled, icon: Icon, size = 'sm'
|
|
|
43
43
|
}
|
|
44
44
|
const content = (jsxRuntime.jsxs(Component, { "aria-label": tooltip, ...props, "data-testid": buttonUtilityTestId, className: cx.cx('group relative inline-flex h-max cursor-pointer items-center justify-center rounded-md p-1.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50', styles[color],
|
|
45
45
|
// Icon styles
|
|
46
|
-
'*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:text-current *:data-icon:transition-inherit-all', size === 'xs' ? '*:data-icon:size-4' : '*:data-icon:size-5', className), children: [
|
|
46
|
+
'*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:text-current *:data-icon:transition-inherit-all', size === 'xs' ? '*:data-icon:size-4' : '*:data-icon:size-5', className), children: [componentGuard_utils.isReactComponent(Icon) && jsxRuntime.jsx(Icon, { "data-icon": true }), React.isValidElement(Icon) && Icon] }));
|
|
47
47
|
if (tooltip) {
|
|
48
48
|
return (jsxRuntime.jsx(Tooltip.Tooltip, { title: tooltip, placement: tooltipPlacement, isDisabled: isDisabled, offset: size === 'xs' ? 4 : 6, children: content }));
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","AriaLink","AriaButton","_jsxs","cx","isReactComponent","_jsx","isValidElement","Tooltip"],"mappings":";;;;;;;;;;AAWO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AA4CtF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,WAAW,EACnB,gBAAgB,GAAG,KAAK,EACxB,aAAa,EAAE,UAAU,EACzB,GAAG,UAAU,EACP,KAAI;AACV,IAAA,MAAM,mBAAmB,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AAC5H,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,UAAU,GAAG,UAAU,CAAC,IAAI,GAAG,SAAS;IAC/D,MAAM,SAAS,GAAG,IAAI,GAAGC,wBAAQ,GAAGC,0BAAU;IAE9C,IAAI,KAAK,GAAG,EAAE;IAEd,IAAI,IAAI,EAAE;AACR,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;YAEb,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI;;;;AAKnC,YAAA,IAAI,UAAU,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;SACnE;IACH;SAAO;AACL,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;AAEb,YAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,QAAQ;YACjC,UAAU;SACX;IACH;IAEA,MAAM,OAAO,IACXC,eAAA,CAAC,SAAS,EAAA,EAAA,YAAA,EACI,OAAO,KACf,KAAK,EAAA,aAAA,EACI,mBAAmB,EAChC,SAAS,EAAEC,KAAE,CACX,4PAA4P,EAC5P,MAAM,CAAC,KAAK,CAAC;;AAGb,QAAA,kHAAkH,EAClH,IAAI,KAAK,IAAI,GAAG,oBAAoB,GAAG,oBAAoB,EAE3D,SAAS,CACV,EAAA,QAAA,EAAA,CAEAC,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","AriaLink","AriaButton","_jsxs","cx","isReactComponent","_jsx","isValidElement","Tooltip"],"mappings":";;;;;;;;;;AAWO,MAAM,MAAM,GAAG;AACpB,IAAA,SAAS,EACP,8JAA8J;AAChK,IAAA,QAAQ,EAAE,0EAA0E;;AA4CtF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EAAE,IAAI,EACV,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,WAAW,EACnB,gBAAgB,GAAG,KAAK,EACxB,aAAa,EAAE,UA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EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,EAAA,QAAA,EACxG,OAAO,EAAA,CACA;IAEd;AAEA,IAAA,OAAO,OAAO;AAChB;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/UtilityButton/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1G,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,SAAS,IAAI,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAInH,eAAO,MAAM,MAAM;;;CAIlB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACjC,wCAAwC;IACxC,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WACf,SAAQ,WAAW,EACjB,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACvG,yCAAyC;IACzC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,UAAU,SAAU,SAAQ,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACnI,qDAAqD;IACrD,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CAChD;AAED,0CAA0C;AAC1C,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,yHAU3B,KAAK,gCAyDP,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Tooltip } from '@flipdish/ui-library/components/atoms/Tooltip';
|
|
3
3
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
|
-
import { isReactComponent } from '@flipdish/ui-library/utilities/isReactComponent';
|
|
5
4
|
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
5
|
import { isValidElement } from 'react';
|
|
7
6
|
import { Link, Button } from 'react-aria-components';
|
|
7
|
+
import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
8
8
|
|
|
9
9
|
const styles = {
|
|
10
10
|
secondary: 'bg-primary text-fg-quaternary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:shadow-xs',
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var uiIcons = require('@flipdish/ui-icons');
|
|
5
5
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
|
-
var isReactComponent = require('@flipdish/ui-library/utilities/isReactComponent');
|
|
7
6
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
8
7
|
var React = require('react');
|
|
8
|
+
var componentGuard_utils = require('../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
9
9
|
|
|
10
10
|
const baseClasses = {
|
|
11
11
|
light: {
|
|
@@ -107,9 +107,9 @@ const BadgeGroup = ({ children, addonText, size = 'md', color = 'brand', theme =
|
|
|
107
107
|
const dotClasses = cx.cx('inline-block size-2 shrink-0 rounded-full', sizes.dot, colors.dot);
|
|
108
108
|
const iconClasses = cx.cx(baseClasses[theme].icon, sizes.icon, colors.icon);
|
|
109
109
|
if (align === 'trailing') {
|
|
110
|
-
return (jsxRuntime.jsxs("div", { className: rootClasses, "data-testid": badgeGroupTestId, children: [theme === 'modern' && jsxRuntime.jsx("span", { className: dotClasses }), children, jsxRuntime.jsxs("span", { className: addonClasses, children: [addonText,
|
|
110
|
+
return (jsxRuntime.jsxs("div", { className: rootClasses, "data-testid": badgeGroupTestId, children: [theme === 'modern' && jsxRuntime.jsx("span", { className: dotClasses }), children, jsxRuntime.jsxs("span", { className: addonClasses, children: [addonText, componentGuard_utils.isReactComponent(IconTrailing) && jsxRuntime.jsx(IconTrailing, { className: iconClasses }), React.isValidElement(IconTrailing) && IconTrailing] })] }));
|
|
111
111
|
}
|
|
112
|
-
return (jsxRuntime.jsxs("div", { className: rootClasses, "data-testid": badgeGroupTestId, children: [jsxRuntime.jsxs("span", { className: addonClasses, children: [theme === 'modern' && jsxRuntime.jsx("span", { className: dotClasses }), addonText] }), children,
|
|
112
|
+
return (jsxRuntime.jsxs("div", { className: rootClasses, "data-testid": badgeGroupTestId, children: [jsxRuntime.jsxs("span", { className: addonClasses, children: [theme === 'modern' && jsxRuntime.jsx("span", { className: dotClasses }), addonText] }), children, componentGuard_utils.isReactComponent(IconTrailing) && jsxRuntime.jsx(IconTrailing, { className: iconClasses }), React.isValidElement(IconTrailing) && IconTrailing] }));
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
exports.BadgeGroup = BadgeGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/BadgeGroup/index.tsx"],"sourcesContent":[null],"names":["cx","sortCx","ArrowRight","useResolvedTestId","_jsxs","_jsx","isReactComponent","isValidElement"],"mappings":";;;;;;;;;AAcA,MAAM,WAAW,GAAoE;AACnF,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,gCAAgC;AACtC,QAAA,KAAK,EAAE,gCAAgC;AACxC,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,sGAAsG;AAC5G,QAAA,KAAK,EAAE,kFAAkF;AACzF,QAAA,IAAI,EAAE,0BAA0B;AACjC,KAAA;CACF;AAED,MAAM,cAAc,GAAG,CACrB,KAAa,EACb,IAAc,EACd,IAAc,MACmF;AACjG,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAEA,KAAE,CAAC,oCAAoC,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC;AACxE,YAAA,KAAK,EAAEA,KAAE,CAAC,aAAa,EAAE,KAAK,KAAK,QAAQ,IAAI,cAAc,EAAE,IAAI,IAAI,MAAM,CAAC;AAC9E,YAAA,IAAI,EAAE,aAAa;AACpB,SAAA;AACD,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAEA,KAAE,CAAC,oCAAoC,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC;AACxE,YAAA,KAAK,EAAEA,KAAE,CAAC,eAAe,EAAE,KAAK,KAAK,QAAQ,IAAI,cAAc,EAAE,IAAI,IAAI,MAAM,CAAC;AAChF,YAAA,IAAI,EAAE,aAAa;AACpB,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,EAAE,EA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K,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;AACxG,IAAA,MAAM,UAAU,GAAGA,KAAE,CAAC,2CAA2C,EAAE,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC;AACzF,IAAA,MAAM,WAAW,GAAGA,KAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;AAExE,IAAA,IAAI,KAAK,KAAK,UAAU,EAAE;QACxB,QACEI,yBAAK,SAAS,EAAE,WAAW,EAAA,aAAA,EAAe,gBAAgB,EAAA,QAAA,EAAA,CACvD,KAAK,KAAK,QAAQ,IAAIC,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,UAAU,EAAA,CAAI,EAErD,QAAQ,EAETD,eAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,YAAY,aAC1B,SAAS,EAGTE,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/BadgeGroup/index.tsx"],"sourcesContent":[null],"names":["cx","sortCx","ArrowRight","useResolvedTestId","_jsxs","_jsx","isReactComponent","isValidElement"],"mappings":";;;;;;;;;AAcA,MAAM,WAAW,GAAoE;AACnF,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,gCAAgC;AACtC,QAAA,KAAK,EAAE,gCAAgC;AACxC,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,sGAAsG;AAC5G,QAAA,KAAK,EAAE,kFAAkF;AACzF,QAAA,IAAI,EAAE,0BAA0B;AACjC,KAAA;CACF;AAED,MAAM,cAAc,GAAG,CACrB,KAAa,EACb,IAAc,EACd,IAAc,MACmF;AACjG,IAAA,OAAO,EAAE;AACP,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAEA,KAAE,CAAC,oCAAoC,EAAE,CAAC,IAAI,IAAI,CAAC,IAA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AC,YAAY,CAAC,IAAI,YAAY,CAAA,EAAA,CACxC,CAAA,EAAA,CACH;IAEV;IAEA,QACEH,yBAAK,SAAS,EAAE,WAAW,EAAA,aAAA,EAAe,gBAAgB,EAAA,QAAA,EAAA,CACxDA,eAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,YAAY,EAAA,QAAA,EAAA,CAC1B,KAAK,KAAK,QAAQ,IAAIC,yBAAM,SAAS,EAAE,UAAU,EAAA,CAAI,EACrD,SAAS,IACL,EAEN,QAAQ,EAGRC,qCAAgB,CAAC,YAAY,CAAC,IAAID,cAAA,CAAC,YAAY,EAAA,EAAC,SAAS,EAAE,WAAW,EAAA,CAAI,EAC1EE,oBAAc,CAAC,YAAY,CAAC,IAAI,YAAY,CAAA,EAAA,CACzC;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/BadgeGroup/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/BadgeGroup/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACxB,KAAK,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAChE,KAAK,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAChC,KAAK,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AA8FpC,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,YAAY,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,uHAUxB,eAAe,gCAgDjB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { ArrowRight } from '@flipdish/ui-icons';
|
|
3
3
|
import { sortCx, cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
|
-
import { isReactComponent } from '@flipdish/ui-library/utilities/isReactComponent';
|
|
5
4
|
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
5
|
import { isValidElement } from 'react';
|
|
6
|
+
import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
7
7
|
|
|
8
8
|
const baseClasses = {
|
|
9
9
|
light: {
|
|
@@ -4,15 +4,15 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var uiIcons = require('@flipdish/ui-icons');
|
|
5
5
|
var Avatar = require('@flipdish/ui-library/components/atoms/Avatar');
|
|
6
6
|
var RadioButton = require('@flipdish/ui-library/components/atoms/RadioButton');
|
|
7
|
-
var Breadcrumbs = require('@flipdish/ui-library/components/molecules/Breadcrumbs');
|
|
8
7
|
var Dropdown = require('@flipdish/ui-library/components/molecules/Dropdown');
|
|
9
8
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
10
9
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
11
10
|
var React = require('react');
|
|
12
11
|
var reactAriaComponents = require('react-aria-components');
|
|
12
|
+
var breadcrumbsContext = require('../providers/breadcrumbs-context.cjs');
|
|
13
13
|
|
|
14
14
|
const BreadcrumbAccountItem = ({ items, selectedKey, onSelectionChange }) => {
|
|
15
|
-
const context = React.useContext(
|
|
15
|
+
const context = React.useContext(breadcrumbsContext.BreadcrumbsContext);
|
|
16
16
|
const divider = context.divider || 'chevron';
|
|
17
17
|
const selectedAccount = items.find((item) => item.id === selectedKey);
|
|
18
18
|
const accountTestId = context.testIdPrefix ? testIdUtils.joinTestId(context.testIdPrefix, 'account') : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-account-item.cjs","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-account-item.tsx"],"sourcesContent":[null],"names":["useContext","BreadcrumbsContext","joinTestId","_jsx","AriaBreadcrumb","_jsxs","_Fragment","Dropdown","AriaButton","cx","Avatar","ChevronSelectorVertical","AriaMenuItem","RadioButtonBase","SlashDivider","ChevronRight"],"mappings":";;;;;;;;;;;;;AAyBO,MAAM,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAA8B,KAAI;AAC7G,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,
|
|
1
|
+
{"version":3,"file":"breadcrumb-account-item.cjs","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-account-item.tsx"],"sourcesContent":[null],"names":["useContext","BreadcrumbsContext","joinTestId","_jsx","AriaBreadcrumb","_jsxs","_Fragment","Dropdown","AriaButton","cx","Avatar","ChevronSelectorVertical","AriaMenuItem","RadioButtonBase","SlashDivider","ChevronRight"],"mappings":";;;;;;;;;;;;;AAyBO,MAAM,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAA8B,KAAI;AAC7G,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,qCAAkB,CAAC;AAC9C,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS;AAC5C,IAAA,MAAM,eAAe,GAAG,KAAK,CAAC,IAA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AAE,UAAU,EAAE,SAAS,EAAC,wBAAwB,EAAA,CAAG,CAAA,EAAA,CAC7E,CACJ,EAAA,EAvBI,OAAO,CAAC,EAAE,CAwBF,CAChB,CAAC,EAAA,CACY,EAAA,CACC,CAAA,EAAA,CACL,EAEf,CAAC,SAAS;AACT,qBAAC,OAAO,KAAK,OAAO,IAClBV,cAAA,CAACW,oBAAY,EAAA,EAAC,SAAS,EAAC,0DAA0D,GAAG,KAErFX,cAAA,CAACY,oBAAY,EAAA,EAAC,SAAS,EAAC,0DAA0D,EAAA,CAAG,CACtF,CAAC,CAAA,EAAA,CACH,CACJ,EAAA,CACc;AAErB;;;;"}
|
|
@@ -2,12 +2,12 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { ChevronSelectorVertical, SlashDivider, ChevronRight } from '@flipdish/ui-icons';
|
|
3
3
|
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
4
4
|
import { RadioButtonBase } from '@flipdish/ui-library/components/atoms/RadioButton';
|
|
5
|
-
import { BreadcrumbsContext } from '@flipdish/ui-library/components/molecules/Breadcrumbs';
|
|
6
5
|
import { Dropdown } from '@flipdish/ui-library/components/molecules/Dropdown';
|
|
7
6
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
8
7
|
import { joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
9
8
|
import { useContext } from 'react';
|
|
10
9
|
import { Breadcrumb, Button, MenuItem } from 'react-aria-components';
|
|
10
|
+
import { BreadcrumbsContext } from '../providers/breadcrumbs-context.js';
|
|
11
11
|
|
|
12
12
|
const BreadcrumbAccountItem = ({ items, selectedKey, onSelectionChange }) => {
|
|
13
13
|
const context = useContext(BreadcrumbsContext);
|
|
@@ -4,11 +4,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var uiIcons = require('@flipdish/ui-icons');
|
|
5
5
|
var Avatar = require('@flipdish/ui-library/components/atoms/Avatar');
|
|
6
6
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
7
|
-
var
|
|
7
|
+
var hrefUtils = require('@flipdish/ui-library/utilities/hrefUtils');
|
|
8
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var reactAriaComponents = require('react-aria-components');
|
|
11
|
-
var
|
|
11
|
+
var componentGuard_utils = require('../../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
12
|
+
var breadcrumbsContext = require('../providers/breadcrumbs-context.cjs');
|
|
12
13
|
|
|
13
14
|
const baseStyles = {
|
|
14
15
|
text: {
|
|
@@ -29,18 +30,20 @@ const baseStyles = {
|
|
|
29
30
|
},
|
|
30
31
|
};
|
|
31
32
|
const BreadcrumbBase = ({ href, children, icon: Icon, type = 'text', current, className, 'data-testid': dataTestId, ...otherProps }) => {
|
|
32
|
-
return (jsxRuntime.jsxs(reactAriaComponents.Link, { ...otherProps, "data-testid": dataTestId, ...(href ? { href } : {}), className: (state) => cx.cx('group inline-flex items-center justify-center gap-1 rounded-md outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 in-current:max-w-full', baseStyles[type].root, current && baseStyles[type].current.root, (href || otherProps.onClick) && 'cursor-pointer', typeof className === 'function' ? className(state) : className), children: [
|
|
33
|
+
return (jsxRuntime.jsxs(reactAriaComponents.Link, { ...otherProps, "data-testid": dataTestId, ...(href ? { href } : {}), className: (state) => cx.cx('group inline-flex items-center justify-center gap-1 rounded-md outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 in-current:max-w-full', baseStyles[type].root, current && baseStyles[type].current.root, (href || otherProps.onClick) && 'cursor-pointer', typeof className === 'function' ? className(state) : className), children: [componentGuard_utils.isReactComponent(Icon) && (jsxRuntime.jsx(Icon, { className: cx.cx('size-5 transition-inherit-all', baseStyles[type].icon, current && baseStyles[type].current.icon) })), React.isValidElement(Icon) && Icon, children && (jsxRuntime.jsx("span", { className: cx.cx('text-sm font-semibold whitespace-nowrap transition-inherit-all in-current:truncate', baseStyles[type].label, current && baseStyles[type].current.label), children: children }))] }));
|
|
33
34
|
};
|
|
34
35
|
const BreadcrumbItem = ({ href, icon, divider, type, isEllipsis, children, onClick, avatarSrc, className, id, 'data-testid': dataTestId, ...otherProps }) => {
|
|
35
|
-
const context = React.useContext(
|
|
36
|
+
const context = React.useContext(breadcrumbsContext.BreadcrumbsContext);
|
|
36
37
|
type = context.type || 'text';
|
|
37
38
|
divider = context.divider || 'chevron';
|
|
38
39
|
const prefix = context.testIdPrefix;
|
|
39
40
|
const itemSegment = id ?? (typeof children === 'string' ? testIdUtils.slugifyTestId(children) : href ? testIdUtils.slugifyTestId(href) : undefined);
|
|
40
41
|
const itemTestId = dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, isEllipsis ? 'ellipsis' : itemSegment ? `item-${itemSegment}` : 'item') : undefined);
|
|
41
|
-
|
|
42
|
+
// One sanitised value for every link branch — the avatar branch previously used the raw href.
|
|
43
|
+
const sanitizedHref = hrefUtils.safeHref(href);
|
|
44
|
+
return (jsxRuntime.jsx(reactAriaComponents.Breadcrumb, { ...otherProps, className: cx.cx('flex items-center current:overflow-hidden', avatarSrc ? 'gap-1.5 md:gap-2' : type === 'text' || type === 'text-line' ? 'gap-1.5 md:gap-2' : 'gap-0.5 md:gap-1', className), children: ({ isCurrent }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [avatarSrc ? (jsxRuntime.jsxs(reactAriaComponents.Link, { ...(sanitizedHref ? { href: sanitizedHref } : {}), "data-testid": itemTestId, className: ({ isPressed, isFocusVisible }) => cx.cx('flex cursor-pointer items-center gap-1.5 rounded-lg outline-0 outline-offset-2 outline-focus-ring', (isPressed || isFocusVisible) && 'outline-2'), children: [jsxRuntime.jsx("div", { className: "flex rounded-lg bg-primary p-0.5 ring-[0.5px] ring-secondary ring-inset", children: jsxRuntime.jsx(Avatar.Avatar, { size: "xs", src: avatarSrc, className: "shadow-md", contentClassName: "rounded-md before:hidden" }) }), children && jsxRuntime.jsx("span", { className: "text-sm font-semibold text-primary", children: children })] })) : isEllipsis ? (jsxRuntime.jsx(BreadcrumbBase
|
|
42
45
|
// The label for screen readers.
|
|
43
|
-
, { "aria-label": "See all breadcrumb items", type: type === 'text-line' ? 'text' : type, onClick: onClick, "data-testid": itemTestId, children: "..." })) : (jsxRuntime.jsx(BreadcrumbBase, { href:
|
|
46
|
+
, { "aria-label": "See all breadcrumb items", type: type === 'text-line' ? 'text' : type, onClick: onClick, "data-testid": itemTestId, children: "..." })) : (jsxRuntime.jsx(BreadcrumbBase, { href: sanitizedHref, icon: icon, current: isCurrent, type: type === 'text-line' ? 'text' : type, onClick: onClick, "data-testid": itemTestId, children: children })), !isCurrent &&
|
|
44
47
|
(divider === 'slash' ? (jsxRuntime.jsx(uiIcons.SlashDivider, { className: "size-4 shrink-0 stroke-[2.25px] text-utility-neutral-300" })) : (jsxRuntime.jsx(uiIcons.ChevronRight, { className: "size-4 shrink-0 stroke-[2.25px] text-utility-neutral-300" })))] })) }));
|
|
45
48
|
};
|
|
46
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.cjs","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-item.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaLink","cx","isReactComponent","_jsx","isValidElement","useContext","BreadcrumbsContext","slugifyTestId","joinTestId","AriaBreadcrumb","_Fragment","Avatar","SlashDivider","ChevronRight"],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.cjs","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-item.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaLink","cx","isReactComponent","_jsx","isValidElement","useContext","BreadcrumbsContext","slugifyTestId","joinTestId","safeHref","AriaBreadcrumb","_Fragment","Avatar","SlashDivider","ChevronRight"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,UAAU,G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,aAAa,EACnB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,IAAI,KAAK,WAAW,GAAG,MAAM,GAAG,IAAI,EAC1C,OAAO,EAAE,OAAO,EAAA,aAAA,EACH,UAAU,EAAA,QAAA,EAEtB,QAAQ,EAAA,CACM,CAClB,EAGA,CAAC,SAAS;AACT,qBAAC,OAAO,KAAK,OAAO,IAClBA,cAAA,CAACU,oBAAY,EAAA,EAAC,SAAS,EAAC,0DAA0D,GAAG,KAErFV,cAAA,CAACW,oBAAY,EAAA,EAAC,SAAS,EAAC,0DAA0D,EAAA,CAAG,CACtF,CAAC,CAAA,EAAA,CACH,CACJ,EAAA,CACc;AAErB;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC, type ReactNode } from 'react';
|
|
2
2
|
import { type BreadcrumbProps as AriaBreadcrumbProps } from 'react-aria-components';
|
|
3
|
-
import { type BreadcrumbType } from '../
|
|
3
|
+
import { type BreadcrumbType } from '../providers/breadcrumbs-context';
|
|
4
4
|
export interface BreadcrumbItemProps extends AriaBreadcrumbProps {
|
|
5
5
|
href?: string;
|
|
6
6
|
divider?: 'chevron' | 'slash';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-item.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,EAAE,EAAkB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,EAEL,KAAK,eAAe,IAAI,mBAAmB,EAG5C,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-item.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,EAAE,EAAkB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,EAEL,KAAK,eAAe,IAAI,mBAAmB,EAG5C,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AA6E3F,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sGAAsG;IACtG,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,GAAI,kIAa5B,mBAAmB,gCA0ErB,CAAC"}
|
|
@@ -2,11 +2,12 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { SlashDivider, ChevronRight } from '@flipdish/ui-icons';
|
|
3
3
|
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
4
4
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
5
|
-
import {
|
|
5
|
+
import { safeHref } from '@flipdish/ui-library/utilities/hrefUtils';
|
|
6
6
|
import { slugifyTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
7
|
import { useContext, isValidElement } from 'react';
|
|
8
8
|
import { Breadcrumb, Link } from 'react-aria-components';
|
|
9
|
-
import {
|
|
9
|
+
import { isReactComponent } from '../../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
10
|
+
import { BreadcrumbsContext } from '../providers/breadcrumbs-context.js';
|
|
10
11
|
|
|
11
12
|
const baseStyles = {
|
|
12
13
|
text: {
|
|
@@ -36,9 +37,11 @@ const BreadcrumbItem = ({ href, icon, divider, type, isEllipsis, children, onCli
|
|
|
36
37
|
const prefix = context.testIdPrefix;
|
|
37
38
|
const itemSegment = id ?? (typeof children === 'string' ? slugifyTestId(children) : href ? slugifyTestId(href) : undefined);
|
|
38
39
|
const itemTestId = dataTestId ?? (prefix ? joinTestId(prefix, isEllipsis ? 'ellipsis' : itemSegment ? `item-${itemSegment}` : 'item') : undefined);
|
|
39
|
-
|
|
40
|
+
// One sanitised value for every link branch — the avatar branch previously used the raw href.
|
|
41
|
+
const sanitizedHref = safeHref(href);
|
|
42
|
+
return (jsx(Breadcrumb, { ...otherProps, className: cx('flex items-center current:overflow-hidden', avatarSrc ? 'gap-1.5 md:gap-2' : type === 'text' || type === 'text-line' ? 'gap-1.5 md:gap-2' : 'gap-0.5 md:gap-1', className), children: ({ isCurrent }) => (jsxs(Fragment, { children: [avatarSrc ? (jsxs(Link, { ...(sanitizedHref ? { href: sanitizedHref } : {}), "data-testid": itemTestId, className: ({ isPressed, isFocusVisible }) => cx('flex cursor-pointer items-center gap-1.5 rounded-lg outline-0 outline-offset-2 outline-focus-ring', (isPressed || isFocusVisible) && 'outline-2'), children: [jsx("div", { className: "flex rounded-lg bg-primary p-0.5 ring-[0.5px] ring-secondary ring-inset", children: jsx(Avatar, { size: "xs", src: avatarSrc, className: "shadow-md", contentClassName: "rounded-md before:hidden" }) }), children && jsx("span", { className: "text-sm font-semibold text-primary", children: children })] })) : isEllipsis ? (jsx(BreadcrumbBase
|
|
40
43
|
// The label for screen readers.
|
|
41
|
-
, { "aria-label": "See all breadcrumb items", type: type === 'text-line' ? 'text' : type, onClick: onClick, "data-testid": itemTestId, children: "..." })) : (jsx(BreadcrumbBase, { href:
|
|
44
|
+
, { "aria-label": "See all breadcrumb items", type: type === 'text-line' ? 'text' : type, onClick: onClick, "data-testid": itemTestId, children: "..." })) : (jsx(BreadcrumbBase, { href: sanitizedHref, icon: icon, current: isCurrent, type: type === 'text-line' ? 'text' : type, onClick: onClick, "data-testid": itemTestId, children: children })), !isCurrent &&
|
|
42
45
|
(divider === 'slash' ? (jsx(SlashDivider, { className: "size-4 shrink-0 stroke-[2.25px] text-utility-neutral-300" })) : (jsx(ChevronRight, { className: "size-4 shrink-0 stroke-[2.25px] text-utility-neutral-300" })))] })) }));
|
|
43
46
|
};
|
|
44
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.js","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-item.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaLink","_jsx","AriaBreadcrumb","_Fragment"],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.js","sources":["../../../../../src/components/molecules/Breadcrumbs/components/breadcrumb-item.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaLink","_jsx","AriaBreadcrumb","_Fragment"],"mappings":";;;;;;;;;;;AAiBA,MAAM,UAAU,GAAG;AACjB,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,IAAI,EAAE,yDAAyD;AAC/D,QAAA,KAAK,EAAE,iDAAiD;AACxD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,IAAI,EAAE,yDAAyD;AAC/D,YAAA,KAAK,EAAE,uDAAuD;AAC/D,SAAA;AACF,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,4BAA4B;AAClC,QAAA,IAAI,EAAE,yDAAyD;AAC/D,QAAA,KAAK,EAAE,sDAAsD;AAC7D,QAAA,OAAO,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,wBAAwB,EAAE;AACzG,KAAA;CACF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AccountItem = require('./components/breadcrumb-account-item.cjs');
|
|
9
9
|
var breadcrumbItem = require('./components/breadcrumb-item.cjs');
|
|
10
|
+
var breadcrumbsContext = require('./providers/breadcrumbs-context.cjs');
|
|
10
11
|
|
|
11
|
-
const BreadcrumbsContext = React.createContext({
|
|
12
|
-
divider: 'chevron',
|
|
13
|
-
type: 'text',
|
|
14
|
-
});
|
|
15
12
|
const styles = {
|
|
16
13
|
text: 'gap-1.5 md:gap-2',
|
|
17
14
|
'text-line': 'pl-2 gap-1.5 md:gap-2 py-2 after:pointer-events-none after:absolute after:inset-0 after:border-b after:border-t after:border-secondary',
|
|
@@ -36,11 +33,11 @@ const Breadcrumbs = ({ children, divider = 'chevron', type = 'text', className,
|
|
|
36
33
|
const ellipsisItem = jsxRuntime.jsx(breadcrumbItem.BreadcrumbItem, { isEllipsis: true, divider: divider, type: type, onClick: () => setIsExpanded(true) }, "ellipsis");
|
|
37
34
|
return [...firstItems, ellipsisItem, ...lastItems];
|
|
38
35
|
})();
|
|
39
|
-
return (jsxRuntime.jsx("nav", { "aria-label": "Breadcrumbs", "data-testid": rootTestId, className: cx.cx('min-w-0', className), children: jsxRuntime.jsx(BreadcrumbsContext.Provider, { value: { divider, type, testIdPrefix: rootTestId }, children: jsxRuntime.jsx(reactAriaComponents.Breadcrumbs, { className: cx.cx('relative flex', styles[type]), children: visibleItems }) }) }));
|
|
36
|
+
return (jsxRuntime.jsx("nav", { "aria-label": "Breadcrumbs", "data-testid": rootTestId, className: cx.cx('min-w-0', className), children: jsxRuntime.jsx(breadcrumbsContext.BreadcrumbsContext.Provider, { value: { divider, type, testIdPrefix: rootTestId }, children: jsxRuntime.jsx(reactAriaComponents.Breadcrumbs, { className: cx.cx('relative flex', styles[type]), children: visibleItems }) }) }));
|
|
40
37
|
};
|
|
41
38
|
Breadcrumbs.Item = breadcrumbItem.BreadcrumbItem;
|
|
42
39
|
Breadcrumbs.AccountItem = breadcrumbAccountItem.BreadcrumbAccountItem;
|
|
43
40
|
|
|
41
|
+
exports.BreadcrumbsContext = breadcrumbsContext.BreadcrumbsContext;
|
|
44
42
|
exports.Breadcrumbs = Breadcrumbs;
|
|
45
|
-
exports.BreadcrumbsContext = BreadcrumbsContext;
|
|
46
43
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/Breadcrumbs/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/Breadcrumbs/index.tsx"],"sourcesContent":[null],"names":["useState","useResolvedTestId","_jsx","BreadcrumbItem","cx","BreadcrumbsContext","AriaBreadcrumbs","BreadcrumbAccountItem"],"mappings":";;;;;;;;;;;AA+BA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,kBAAkB;AACxB,IAAA,WAAW,EACT,wIAAwI;AAC1I,IAAA,MAAM,EAAE,kBAAkB;CAC3B;AAED;;;;;AAKG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,QAAQ,EACR,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,MAAM,EACb,SAAS,EACT,eAAe,GAAG,CAAC,EACnB,aAAa,EAAE,UAAU,GACR,KAAI;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAGA,cAAQ,CAAC,KAAK,CAAC;AACnD,IAAA,MAAM,UAAU,GAAGC,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAE7G,IAAA,MAAM,YAAY,GAAG,CAAC,MAAK;QACzB,MAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;QAEtD,IAAI,CAAC,eAAe,IAAI,aAAa,CAAC,MAAM,IAAI,eAAe,IAAI,UAAU,EAAE;AAC7E,YAAA,OAAO,aAAa;QACtB;AAEA,QAAA,MAAM,UAAU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|
2
|
+
import { type BreadcrumbType } from './providers/breadcrumbs-context';
|
|
3
|
+
export { BreadcrumbsContext, type BreadcrumbType } from './providers/breadcrumbs-context';
|
|
8
4
|
export interface BreadcrumbsProps {
|
|
9
5
|
divider?: 'chevron' | 'slash';
|
|
10
6
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Breadcrumbs/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Breadcrumbs/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAIxD,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAG1F,OAAO,EAAE,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAE1F,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AASD;;;;;GAKG;AACH,QAAA,MAAM,WAAW;0FAOd,gBAAgB;;;CAyBlB,CAAC;AAKF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
3
|
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
5
|
import { Breadcrumbs as Breadcrumbs$1 } from 'react-aria-components';
|
|
6
6
|
import { BreadcrumbAccountItem } from './components/breadcrumb-account-item.js';
|
|
7
7
|
import { BreadcrumbItem } from './components/breadcrumb-item.js';
|
|
8
|
+
import { BreadcrumbsContext } from './providers/breadcrumbs-context.js';
|
|
8
9
|
|
|
9
|
-
const BreadcrumbsContext = createContext({
|
|
10
|
-
divider: 'chevron',
|
|
11
|
-
type: 'text',
|
|
12
|
-
});
|
|
13
10
|
const styles = {
|
|
14
11
|
text: 'gap-1.5 md:gap-2',
|
|
15
12
|
'text-line': 'pl-2 gap-1.5 md:gap-2 py-2 after:pointer-events-none after:absolute after:inset-0 after:border-b after:border-t after:border-secondary',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Breadcrumbs/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaBreadcrumbs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Breadcrumbs/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaBreadcrumbs"],"mappings":";;;;;;;;;AA+BA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,kBAAkB;AACxB,IAAA,WAAW,EACT,wIAAwI;AAC1I,IAAA,MAAM,EAAE,kBAAkB;CAC3B;AAED;;;;;AAKG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,QAAQ,EACR,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,MAAM,EACb,SAAS,EACT,eAAe,GAAG,CAAC,EACnB,aAAa,EAAE,UAAU,GACR,KAAI;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACnD,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAE7G,IAAA,MAAM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AAW,CAAC,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Shared by the Breadcrumbs root and its private item components. Lives in its own
|
|
7
|
+
* module so items never import `../index` — that back-edge created a module cycle
|
|
8
|
+
* (index → item → index) that only worked because nothing dereferenced it at module
|
|
9
|
+
* evaluation time.
|
|
10
|
+
*/
|
|
11
|
+
const BreadcrumbsContext = React.createContext({
|
|
12
|
+
divider: 'chevron',
|
|
13
|
+
type: 'text',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
exports.BreadcrumbsContext = BreadcrumbsContext;
|
|
17
|
+
//# sourceMappingURL=breadcrumbs-context.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs-context.cjs","sources":["../../../../../src/components/molecules/Breadcrumbs/providers/breadcrumbs-context.ts"],"sourcesContent":[null],"names":["createContext"],"mappings":";;;;AAMA;;;;;AAKG;AACI,MAAM,kBAAkB,GAAGA,mBAAa,CAAgF;AAC7H,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,MAAM;AACb,CAAA;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type BreadcrumbType = 'text' | 'text-line' | 'button';
|
|
2
|
+
/**
|
|
3
|
+
* Shared by the Breadcrumbs root and its private item components. Lives in its own
|
|
4
|
+
* module so items never import `../index` — that back-edge created a module cycle
|
|
5
|
+
* (index → item → index) that only worked because nothing dereferenced it at module
|
|
6
|
+
* evaluation time.
|
|
7
|
+
*/
|
|
8
|
+
export declare const BreadcrumbsContext: import("react").Context<{
|
|
9
|
+
divider: "chevron" | "slash";
|
|
10
|
+
type: BreadcrumbType;
|
|
11
|
+
testIdPrefix?: string;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=breadcrumbs-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs-context.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Breadcrumbs/providers/breadcrumbs-context.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;aAA4B,SAAS,GAAG,OAAO;UAAQ,cAAc;mBAAiB,MAAM;EAGzH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared by the Breadcrumbs root and its private item components. Lives in its own
|
|
5
|
+
* module so items never import `../index` — that back-edge created a module cycle
|
|
6
|
+
* (index → item → index) that only worked because nothing dereferenced it at module
|
|
7
|
+
* evaluation time.
|
|
8
|
+
*/
|
|
9
|
+
const BreadcrumbsContext = createContext({
|
|
10
|
+
divider: 'chevron',
|
|
11
|
+
type: 'text',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { BreadcrumbsContext };
|
|
15
|
+
//# sourceMappingURL=breadcrumbs-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs-context.js","sources":["../../../../../src/components/molecules/Breadcrumbs/providers/breadcrumbs-context.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAMA;;;;;AAKG;AACI,MAAM,kBAAkB,GAAG,aAAa,CAAgF;AAC7H,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,MAAM;AACb,CAAA;;;;"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
|
-
var isReactComponent = require('@flipdish/ui-library/utilities/isReactComponent');
|
|
6
5
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var reactAriaComponents = require('react-aria-components');
|
|
8
|
+
var componentGuard_utils = require('../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
9
9
|
|
|
10
10
|
const styles = cx.sortCx({
|
|
11
11
|
common: {
|
|
@@ -51,7 +51,7 @@ const ButtonGroupItem = ({ iconLeading: IconLeading, iconTrailing: IconTrailing,
|
|
|
51
51
|
const isIcon = (IconLeading || IconTrailing) && !children;
|
|
52
52
|
const idPart = otherProps.id !== undefined ? testIdUtils.slugifyTestId(String(otherProps.id)) : typeof children === 'string' ? testIdUtils.slugifyTestId(children) : 'item';
|
|
53
53
|
const itemTestId = dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, `item-${idPart}`) : undefined);
|
|
54
|
-
return (jsxRuntime.jsxs(reactAriaComponents.ToggleButton, { ...otherProps, "data-testid": itemTestId, "data-icon-only": isIcon ? true : undefined, "data-icon-leading": IconLeading ? true : undefined, className: cx.cx(styles.common.root, styles.sizes[size].root, className), children: [
|
|
54
|
+
return (jsxRuntime.jsxs(reactAriaComponents.ToggleButton, { ...otherProps, "data-testid": itemTestId, "data-icon-only": isIcon ? true : undefined, "data-icon-leading": IconLeading ? true : undefined, className: cx.cx(styles.common.root, styles.sizes[size].root, className), children: [componentGuard_utils.isReactComponent(IconLeading) && jsxRuntime.jsx(IconLeading, { className: cx.cx(styles.common.icon, styles.sizes[size].icon) }), React.isValidElement(IconLeading) && IconLeading, children, componentGuard_utils.isReactComponent(IconTrailing) && jsxRuntime.jsx(IconTrailing, { className: cx.cx(styles.common.icon, styles.sizes[size].icon) }), React.isValidElement(IconTrailing) && IconTrailing] }));
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* A segmented set of connected buttons for single-select choices.
|