@flipdish/ui-library 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/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/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/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/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/{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/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/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/package.json +5 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/TextEditor/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/TextEditor/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;;AAuBA;AACA,MAAM,iBAAiB,GAAG,CAAC,KAAa,KAAI;IAC1C,OAAO,CAAA,8BAAA,EAAiC,IAAI,CAAC,CAAA,4HAAA,EAA+H,KAAK,0DAA0D,KAAK,CAAA,gCAAA,CAAkC,CAAC,CAAA,CAAA,CAAG;AACxR,CAAC;AAeD,MAAM,cAAc,GAAG,CAAC,EACtB,SAAS,EACT,cAAc,EACd,QAAQ,EACR,SAAS,EACT,UAAU,EACV,KAAK,EACL,WAAW,GAAG,oBAAoB,EAClC,aAAa,EAAE,UAAU,EACzB,GAAG,aAAa,EACI,KAAI;AACxB,IAAA,MAAM,EAAE,GAAG,KAAK,EAAE;AAClB,IAAA,MAAM,QAAQ,GAAG,CAAA,OAAA,EAAU,EAAE,EAAE;AAC/B,IAAA,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IAEzG,MAAM,MAAM,GAAG,SAAS,CAAC;AACvB,QAAA,GAAG,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
5
|
+
/**
|
|
6
|
+
* Shared by the TextEditor root and its private toolbar/extension components. Lives in
|
|
7
|
+
* its own module so those components never import `../index` — that back-edge created
|
|
8
|
+
* a module cycle that only worked because the context was dereferenced at render time.
|
|
9
|
+
*/
|
|
10
|
+
const EditorContext = React.createContext(null);
|
|
11
|
+
const useEditorContext = () => {
|
|
12
|
+
const context = React.useContext(EditorContext);
|
|
13
|
+
if (!context) {
|
|
14
|
+
throw new Error('useEditorContext must be used within a EditorProvider');
|
|
15
|
+
}
|
|
16
|
+
return context;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.EditorContext = EditorContext;
|
|
20
|
+
exports.useEditorContext = useEditorContext;
|
|
21
|
+
//# sourceMappingURL=text-editor-context.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-editor-context.cjs","sources":["../../../../../src/components/organisms/TextEditor/providers/text-editor-context.ts"],"sourcesContent":[null],"names":["createContext","useContext"],"mappings":";;;;AAaA;;;;AAIG;MACU,aAAa,GAAGA,mBAAa,CAA2B,IAAI;AAElE,MAAM,gBAAgB,GAAG,MAAK;AACnC,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAAC,aAAa,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC;IAC1E;AACA,IAAA,OAAO,OAAO;AAChB;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/react';
|
|
2
|
+
type EditorContextType = {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
editorId: string;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
limit?: number;
|
|
7
|
+
isInvalid?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Shared by the TextEditor root and its private toolbar/extension components. Lives in
|
|
11
|
+
* its own module so those components never import `../index` — that back-edge created
|
|
12
|
+
* a module cycle that only worked because the context was dereferenced at render time.
|
|
13
|
+
*/
|
|
14
|
+
export declare const EditorContext: import("react").Context<EditorContextType | null>;
|
|
15
|
+
export declare const useEditorContext: () => EditorContextType;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=text-editor-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-editor-context.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/TextEditor/providers/text-editor-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG5C,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,mDAAgD,CAAC;AAE3E,eAAO,MAAM,gBAAgB,yBAM5B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared by the TextEditor root and its private toolbar/extension components. Lives in
|
|
5
|
+
* its own module so those components never import `../index` — that back-edge created
|
|
6
|
+
* a module cycle that only worked because the context was dereferenced at render time.
|
|
7
|
+
*/
|
|
8
|
+
const EditorContext = createContext(null);
|
|
9
|
+
const useEditorContext = () => {
|
|
10
|
+
const context = useContext(EditorContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error('useEditorContext must be used within a EditorProvider');
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { EditorContext, useEditorContext };
|
|
18
|
+
//# sourceMappingURL=text-editor-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-editor-context.js","sources":["../../../../../src/components/organisms/TextEditor/providers/text-editor-context.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAaA;;;;AAIG;MACU,aAAa,GAAG,aAAa,CAA2B,IAAI;AAElE,MAAM,gBAAgB,GAAG,MAAK;AACnC,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC;IAC1E;AACA,IAAA,OAAO,OAAO;AAChB;;;;"}
|
|
@@ -4,10 +4,10 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var uiIcons = require('@flipdish/ui-icons');
|
|
5
5
|
var Checkbox = require('@flipdish/ui-library/components/atoms/Checkbox');
|
|
6
6
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
7
|
-
var isReactComponent = require('@flipdish/ui-library/utilities/isReactComponent');
|
|
8
7
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
8
|
var React = require('react');
|
|
10
9
|
var reactAriaComponents = require('react-aria-components');
|
|
10
|
+
var componentGuard_utils = require('../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
11
11
|
var treeView_utils = require('./treeView.utils.cjs');
|
|
12
12
|
|
|
13
13
|
const TreeViewContext = React.createContext({
|
|
@@ -166,7 +166,7 @@ const TreeViewItemContent = ({ icon: Icon, action, children, className }) => {
|
|
|
166
166
|
}
|
|
167
167
|
const paddingLeft = showConnectors && level > 1 ? BASE_PADDING : BASE_PADDING + (level - 1) * INDENT_SIZE;
|
|
168
168
|
return (jsxRuntime.jsxs("div", { className: cx.cx('flex w-full cursor-pointer items-center gap-2 rounded-sm -outline-offset-2 outline-focus-ring transition duration-100 ease-linear', size === 'sm' ? 'py-1.5 pr-2' : 'py-2 pr-2', isDropTarget && 'bg-secondary_hover outline-2', !isDropTarget && (isSelected || isIndeterminate) && 'bg-secondary hover:bg-secondary_hover', !isDropTarget && !isSelected && !isIndeterminate && 'hover:bg-primary_hover', isDisabled && 'cursor-not-allowed opacity-50', isFocusVisible && 'outline-2', className), style: { paddingLeft }, children: [connectors, hasChildItems && (jsxRuntime.jsx(reactAriaComponents.Button, { slot: "chevron", "data-testid": chevronTestId, className: "flex shrink-0 items-center justify-center outline-hidden", children: isExpanded ? jsxRuntime.jsx(uiIcons.ChevronDown, { className: "size-4 text-fg-quaternary" }) : jsxRuntime.jsx(uiIcons.ChevronRight, { className: "size-4 text-fg-quaternary" }) })), selectionMode !== 'none' && (jsxRuntime.jsx(reactAriaComponents.Checkbox, { slot: "selection", "data-testid": checkboxTestId, className: "flex shrink-0 items-center justify-center outline-hidden", children: ({ isSelected: checkSelected, isDisabled: checkDisabled, isFocusVisible: checkFocus }) => (jsxRuntime.jsx(Checkbox.CheckboxBase, { size: "sm", isSelected: checkSelected || isIndeterminate, isIndeterminate: isIndeterminate, isDisabled: checkDisabled, isFocusVisible: checkFocus })) })), jsxRuntime.jsxs("div", { className: cx.cx('flex min-w-0 flex-1 items-center', size === 'sm' ? 'gap-1.5' : 'gap-2'), children: [Icon &&
|
|
169
|
-
(
|
|
169
|
+
(componentGuard_utils.isReactComponent(Icon) ? (jsxRuntime.jsx(Icon, { className: cx.cx('shrink-0 text-fg-quaternary', size === 'sm' ? 'size-4' : 'size-5') })) : React.isValidElement(Icon) ? (Icon) : null), jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-tertiary", children: children }), action && (jsxRuntime.jsx("span", { "data-testid": actionTestId, className: "contents", children: action })), allowsDragging && (jsxRuntime.jsx(reactAriaComponents.Button, { slot: "drag", "data-testid": dragTestId, className: cx.cx('shrink-0 cursor-grab outline-hidden', !isSelected && 'hidden'), children: jsxRuntime.jsx(uiIcons.DotsGrid, { className: "size-4 text-fg-quaternary" }) }))] })] }));
|
|
170
170
|
} }));
|
|
171
171
|
};
|
|
172
172
|
const TreeView = TreeViewRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/TreeView/index.tsx"],"sourcesContent":[null],"names":["createContext","_jsxs","_jsx","cx","AriaDropIndicator","useResolvedTestId","useRef","useState","useCallback","cascadeSelection","useDragAndDrop","createDragPreview","useMemo","TestIdProvider","AriaTree","useTestIdPrefix","joinTestId","slugifyTestId","AriaTreeItem","useContext","AriaTreeItemContent","getDescendants","AriaButton","ChevronDown","ChevronRight","AriaCheckbox","CheckboxBase","isReactComponent","isValidElement","DotsGrid"],"mappings":";;;;;;;;;;;;AA+BA,MAAM,eAAe,GAAGA,mBAAa,CAAsB;AACzD,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,cAAc,EAAE,KAAK;IACrB,YAAY,EAAE,IAAI,GAAG,EAAE;AACvB,IAAA,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;AACjC,CAAA,CAAC;AAEF,MAAM,WAAW,GAAG,EAAE;AACtB,MAAM,YAAY,GAAG,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAwD,MACrFC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,0CACtC,IAAI,KAAK,MAAM,KACdC,wBACE,SAAS,EAAEC,KAAE,CACX,sFAAsF,EACtF,IAAI,KAAK,IAAI,GAAG,UAAU,GAAG,UAAU,CACxC,EAAA,CACD,CACH,EACA,IAAI,KAAK,KAAK,KACbD,wBAAK,SAAS,EAAEC,KAAE,CAAC,kDAAkD,EAAE,IAAI,KAAK,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,EAAA,QAAA,EAC7GD,cAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAEC,KAAE,CACX,2CAA2C,EAC3C,IAAI,KAAK,IAAI,GAAG,oCAAoC,GAAG,oCAAoC,CAC5F,GACD,EAAA,CACE,CACP,CAAA,EAAA,CACG,CACP;AAED;AACA,MAAM,qBAAqB,GAAG,CAAC,KAAoE,MACjGD,cAAA,CAACE,iCAAi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AE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,MACpFvB,cAAA,CAACwB,qBAAY,IACX,IAAI,EAAC,IAAI,EACT,UAAU,EAAE,aAAa,IAAI,eAAe,EAC5C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,aAAa,EACzB,cAAc,EAAE,UAAU,EAAA,CAC1B,CACH,GACY,CAChB,EAEDzB,yBAAK,SAAS,EAAEE,KAAE,CAAC,kCAAkC,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,EAAA,QAAA,EAAA,CACxF,IAAI;iCACFwB,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/TreeView/index.tsx"],"sourcesContent":[null],"names":["createContext","_jsxs","_jsx","cx","AriaDropIndicator","useResolvedTestId","useRef","useState","useCallback","cascadeSelection","useDragAndDrop","createDragPreview","useMemo","TestIdProvider","AriaTree","useTestIdPrefix","joinTestId","slugifyTestId","AriaTreeItem","useContext","AriaTreeItemContent","getDescendants","AriaButton","ChevronDown","ChevronRight","AriaCheckbox","CheckboxBase","isReactComponent","isValidElement","DotsGrid"],"mappings":";;;;;;;;;;;;AA+BA,MAAM,eAAe,GAAGA,mBAAa,CAAsB;AACzD,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,cAAc,EAAE,KAAK;IACrB,YAAY,EAAE,IAAI,GAAG,EAAE;AACvB,IAAA,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;AACjC,CAAA,CAAC;AAEF,MAAM,WAAW,GAAG,EAAE;AACtB,MAAM,YAAY,GAAG,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAwD,MACrFC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,0CACtC,IAAI,KAAK,MAAM,KACdC,wBACE,SAAS,EAAEC,KAAE,CACX,sFAAsF,EACtF,IAAI,KAAK,IAAI,GAAG,UAAU,GAAG,UAAU,CACxC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C,MAAM,EAAA,aAAA,EAAc,UAAU,EAAE,SAAS,EAAEnB,KAAE,CAAC,qCAAqC,EAAE,CAAC,UAAU,IAAI,QAAQ,CAAC,EAAA,QAAA,EAC5HD,eAAC2B,gBAAQ,EAAA,EAAC,SAAS,EAAC,2BAA2B,EAAA,CAAG,GACvC,CACd,CAAA,EAAA,CACG,CAAA,EAAA,CACF;QAEV,CAAC,EAAA,CACmB;AAE1B,CAAC;AAED,MAAM,QAAQ,GAAG;AAKjB,QAAQ,CAAC,IAAI,GAAG,YAAY;AAC5B,QAAQ,CAAC,WAAW,GAAG,mBAAmB;AAC1C,QAAQ,CAAC,aAAa,GAAG,qBAAqB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/TreeView/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/TreeView/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAGL,aAAa,IAAI,iBAAiB,EAIlC,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,SAAS,IAAI,aAAa,EAGhC,MAAM,uBAAuB,CAAC;AA4C/B,oEAAoE;AACpE,QAAA,MAAM,qBAAqB,GAAI,OAAO;IAAE,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;CAAE,gCAKlG,CAAC;AAEF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IAC3E,0DAA0D;IAC1D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,oEAAoE;IACpE,cAAc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IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,WAAW,EAAE,OAAO,mBAAmB,CAAC;IACxC,aAAa,EAAE,OAAO,qBAAqB,CAAC;CAC7C,CAAC;AAKF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { ChevronDown, ChevronRight, DotsGrid } from '@flipdish/ui-icons';
|
|
3
3
|
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/Checkbox';
|
|
4
4
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
5
|
-
import { isReactComponent } from '@flipdish/ui-library/utilities/isReactComponent';
|
|
6
5
|
import { useResolvedTestId, TestIdProvider, useTestIdPrefix, joinTestId, slugifyTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
6
|
import { createContext, useRef, useState, useCallback, useMemo, useContext, isValidElement } from 'react';
|
|
8
7
|
import { useDragAndDrop, Tree, DropIndicator, TreeItem, TreeItemContent, Button, Checkbox } from 'react-aria-components';
|
|
8
|
+
import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
9
9
|
import { cascadeSelection, createDragPreview, getDescendants } from './treeView.utils.js';
|
|
10
10
|
|
|
11
11
|
const TreeViewContext = createContext({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAriaDisclosureAttrs.cjs","sources":["../../../../src/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.ts"],"sourcesContent":[null],"names":["useEffect"],"mappings":";;;;AAWA;;;;;;;;;;AAUG;AACI,MAAM,sBAAsB,GAAG,CACpC,GAAwB,EACxB,EAAE,YAAY,EAAE,YAAY,EAAiC,KAC3D;IACFA,eAAS,CAAC,MAAK;AACb,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO;AACxB,QAAA,IAAI,CAAC,IAAI;YAAE;AAEX,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;YACL,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QAC1D;AAEA,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;AACL,YAAA,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,YAAY,CAAC;QAClD;IACF,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AACvC;;;;"}
|
|
@@ -17,4 +17,4 @@ export interface UseAriaDisclosureAttrsOptions {
|
|
|
17
17
|
* @summary set disclosure ARIA attributes directly on a ref'd node
|
|
18
18
|
*/
|
|
19
19
|
export declare const useAriaDisclosureAttrs: <T extends HTMLElement>(ref: RefObject<T | null>, { ariaExpanded, ariaControls }: UseAriaDisclosureAttrsOptions) => void;
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=useAriaDisclosureAttrs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAriaDisclosureAttrs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,6BAA6B;IAC5C,iGAAiG;IACjG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,WAAW,EAC1D,KAAK,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EACxB,gCAAgC,6BAA6B,SAkB9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAriaDisclosureAttrs.js","sources":["../../../../src/hooks/__internal__/useAriaDisclosureAttrs/useAriaDisclosureAttrs.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAWA;;;;;;;;;;AAUG;AACI,MAAM,sBAAsB,GAAG,CACpC,GAAwB,EACxB,EAAE,YAAY,EAAE,YAAY,EAAiC,KAC3D;IACF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO;AACxB,QAAA,IAAI,CAAC,IAAI;YAAE;AAEX,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;YACL,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QAC1D;AAEA,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;QACvC;aAAO;AACL,YAAA,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,YAAY,CAAC;QAClD;IACF,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AACvC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Button/index.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Button/index.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAyC,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;AAEtG,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,KAAK,QAAQ,GAAG,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,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eAAO,MAAM,MAAM,EAAE;IACnB,CAAC,KAAK,EAAE,SAAS,GAAG,YAAY,CAAC;IACjC,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;CAsGpC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '../../../utilities/cx/index.js';
|
|
3
|
-
import { isReactComponent } from '../../../utilities/isReactComponent/index.js';
|
|
4
3
|
import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
|
|
5
4
|
import { useState, isValidElement } from 'react';
|
|
6
5
|
import { Pressable, View, ActivityIndicator, Text, Linking } from 'react-native';
|
|
6
|
+
import { isReactComponent } from '../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
7
7
|
import { styles } from './Button.styles.js';
|
|
8
8
|
|
|
9
9
|
const LINK_COLORS = ['link-gray', 'link-color', 'link-destructive'];
|
|
@@ -9,8 +9,8 @@ type ReactComponent = React.FC<any> | React.ComponentClass<any, any> | React.For
|
|
|
9
9
|
* form; these guards select the "render it yourself" branch.
|
|
10
10
|
*
|
|
11
11
|
* Pure JS with no DOM dependency — works on web (PostCSS) and React Native
|
|
12
|
-
* (NativeWind).
|
|
13
|
-
*
|
|
12
|
+
* (NativeWind). INTERNAL: imported by components as
|
|
13
|
+
* `#internal/utilities/componentGuardUtils/componentGuard.utils`.
|
|
14
14
|
*/
|
|
15
15
|
/** Checks if a given value is a function component. */
|
|
16
16
|
export declare const isFunctionComponent: (component: any) => component is React.FC<any>;
|
|
@@ -21,4 +21,4 @@ export declare const isForwardRefComponent: (component: any) => component is Rea
|
|
|
21
21
|
/** Checks if a given value is a valid React component (FC, class, or forwardRef). */
|
|
22
22
|
export declare const isReactComponent: (component: any) => component is ReactComponent;
|
|
23
23
|
export {};
|
|
24
|
-
//# sourceMappingURL=
|
|
24
|
+
//# sourceMappingURL=componentGuard.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentGuard.utils.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;AAE5G;;;;;;;;;;;GAWG;AAEH,uDAAuD;AAEvD,eAAO,MAAM,mBAAmB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,EAAE,CAAC,GAAG,CAE7E,CAAC;AAEF,oDAAoD;AAEpD,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAE3F,CAAC;AAEF,0DAA0D;AAE1D,eAAO,MAAM,qBAAqB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAEtG,CAAC;AAEF,qFAAqF;AAErF,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,cAE9D,CAAC"}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* form; these guards select the "render it yourself" branch.
|
|
8
8
|
*
|
|
9
9
|
* Pure JS with no DOM dependency — works on web (PostCSS) and React Native
|
|
10
|
-
* (NativeWind).
|
|
11
|
-
*
|
|
10
|
+
* (NativeWind). INTERNAL: imported by components as
|
|
11
|
+
* `#internal/utilities/componentGuardUtils/componentGuard.utils`.
|
|
12
12
|
*/
|
|
13
13
|
/** Checks if a given value is a function component. */
|
|
14
14
|
// biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
|
|
@@ -32,4 +32,4 @@ const isReactComponent = (component) => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export { isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent };
|
|
35
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=componentGuard.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentGuard.utils.js","sources":["../../../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAMA;;;;;;;;;;;AAWG;AAEH;AACA;AACO,MAAM,mBAAmB,GAAG,CAAC,SAAc,KAAgC;AAChF,IAAA,OAAO,OAAO,SAAS,KAAK,UAAU;AACxC;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiD;IAC9F,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3I;AAEA;AACA;AACO,MAAM,qBAAqB,GAAG,CAAC,SAAc,KAAuD;AACzG,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,2BAA2B;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `
|
|
2
|
+
* `hrefUtils` has no React Native implementation.
|
|
3
3
|
*
|
|
4
4
|
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
-
* that importing `@flipdish/ui-library/
|
|
5
|
+
* that importing `@flipdish/ui-library/utilities/hrefUtils` from React Native fails at
|
|
6
6
|
* compile time rather than resolving to the web build's types. There is no
|
|
7
7
|
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
8
|
*
|
|
9
|
-
* To make `
|
|
9
|
+
* To make `hrefUtils` available on React Native, add an `index.native.tsx` beside
|
|
10
10
|
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
11
|
*/
|
|
12
12
|
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* form; these guards select the "render it yourself" branch.
|
|
10
10
|
*
|
|
11
11
|
* Pure JS with no DOM dependency — works on web (PostCSS) and React Native
|
|
12
|
-
* (NativeWind).
|
|
13
|
-
*
|
|
12
|
+
* (NativeWind). INTERNAL: imported by components as
|
|
13
|
+
* `#internal/utilities/componentGuardUtils/componentGuard.utils`.
|
|
14
14
|
*/
|
|
15
15
|
/** Checks if a given value is a function component. */
|
|
16
16
|
// biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
|
|
@@ -37,4 +37,4 @@ exports.isClassComponent = isClassComponent;
|
|
|
37
37
|
exports.isForwardRefComponent = isForwardRefComponent;
|
|
38
38
|
exports.isFunctionComponent = isFunctionComponent;
|
|
39
39
|
exports.isReactComponent = isReactComponent;
|
|
40
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=componentGuard.utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentGuard.utils.cjs","sources":["../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAMA;;;;;;;;;;;AAWG;AAEH;AACA;AACO,MAAM,mBAAmB,GAAG,CAAC,SAAc,KAAgC;AAChF,IAAA,OAAO,OAAO,SAAS,KAAK,UAAU;AACxC;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiD;IAC9F,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3I;AAEA;AACA;AACO,MAAM,qBAAqB,GAAG,CAAC,SAAc,KAAuD;AACzG,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,2BAA2B;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;;;;"}
|
|
@@ -9,8 +9,8 @@ type ReactComponent = React.FC<any> | React.ComponentClass<any, any> | React.For
|
|
|
9
9
|
* form; these guards select the "render it yourself" branch.
|
|
10
10
|
*
|
|
11
11
|
* Pure JS with no DOM dependency — works on web (PostCSS) and React Native
|
|
12
|
-
* (NativeWind).
|
|
13
|
-
*
|
|
12
|
+
* (NativeWind). INTERNAL: imported by components as
|
|
13
|
+
* `#internal/utilities/componentGuardUtils/componentGuard.utils`.
|
|
14
14
|
*/
|
|
15
15
|
/** Checks if a given value is a function component. */
|
|
16
16
|
export declare const isFunctionComponent: (component: any) => component is React.FC<any>;
|
|
@@ -21,4 +21,4 @@ export declare const isForwardRefComponent: (component: any) => component is Rea
|
|
|
21
21
|
/** Checks if a given value is a valid React component (FC, class, or forwardRef). */
|
|
22
22
|
export declare const isReactComponent: (component: any) => component is ReactComponent;
|
|
23
23
|
export {};
|
|
24
|
-
//# sourceMappingURL=
|
|
24
|
+
//# sourceMappingURL=componentGuard.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentGuard.utils.d.ts","sourceRoot":"","sources":["../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;AAE5G;;;;;;;;;;;GAWG;AAEH,uDAAuD;AAEvD,eAAO,MAAM,mBAAmB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,EAAE,CAAC,GAAG,CAE7E,CAAC;AAEF,oDAAoD;AAEpD,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAE3F,CAAC;AAEF,0DAA0D;AAE1D,eAAO,MAAM,qBAAqB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAEtG,CAAC;AAEF,qFAAqF;AAErF,eAAO,MAAM,gBAAgB,GAAI,WAAW,GAAG,KAAG,SAAS,IAAI,cAE9D,CAAC"}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* form; these guards select the "render it yourself" branch.
|
|
8
8
|
*
|
|
9
9
|
* Pure JS with no DOM dependency — works on web (PostCSS) and React Native
|
|
10
|
-
* (NativeWind).
|
|
11
|
-
*
|
|
10
|
+
* (NativeWind). INTERNAL: imported by components as
|
|
11
|
+
* `#internal/utilities/componentGuardUtils/componentGuard.utils`.
|
|
12
12
|
*/
|
|
13
13
|
/** Checks if a given value is a function component. */
|
|
14
14
|
// biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
|
|
@@ -32,4 +32,4 @@ const isReactComponent = (component) => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export { isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent };
|
|
35
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=componentGuard.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentGuard.utils.js","sources":["../../../../src/utilities/__internal__/componentGuardUtils/componentGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAMA;;;;;;;;;;;AAWG;AAEH;AACA;AACO,MAAM,mBAAmB,GAAG,CAAC,SAAc,KAAgC;AAChF,IAAA,OAAO,OAAO,SAAS,KAAK,UAAU;AACxC;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiD;IAC9F,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;AAC3I;AAEA;AACA;AACO,MAAM,qBAAqB,GAAG,CAAC,SAAc,KAAuD;AACzG,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,2BAA2B;AAC9H;AAEA;AACA;AACO,MAAM,gBAAgB,GAAG,CAAC,SAAc,KAAiC;AAC9E,IAAA,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC1G;;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* INTERNAL — not part of the public API.
|
|
5
|
+
*
|
|
6
|
+
* `__internal__` modules deliberately have no `index.ts`, so they never match
|
|
7
|
+
* `PUBLIC_ENTRY_GLOBS` (scripts/entry-manifest.mjs) and the `./utilities/*` exports
|
|
8
|
+
* map cannot resolve them — consumers physically cannot import this. Library code
|
|
9
|
+
* imports them via the package-private `#internal/utilities/*` subpath (area-namespaced — add `#internal/hooks/*` etc. as new areas grow internal modules) (package.json `imports`
|
|
10
|
+
* field, resolved by tsc/Vite/Vitest at source level and rewritten to relative paths
|
|
11
|
+
* in dist by the rollup `internal-subpath-imports` plugin). Never import via
|
|
12
|
+
* `@flipdish/ui-library/...` — it resolves in TypeScript but breaks at runtime;
|
|
13
|
+
* `check-deep-imports.mjs` enforces this.
|
|
14
|
+
*/
|
|
15
|
+
const seenWarnings = new Set();
|
|
16
|
+
/**
|
|
17
|
+
* Emits a `console.warn` prefixed with the library name, once per `key` for the
|
|
18
|
+
* lifetime of the module. Use for data-dependent runtime conditions (a blocked
|
|
19
|
+
* href scheme, a missing account id) that must stay visible in production —
|
|
20
|
+
* error-tracking tools pick console.warn up as breadcrumbs — without flooding
|
|
21
|
+
* the console on re-renders.
|
|
22
|
+
*/
|
|
23
|
+
const warnOnce = (key, message) => {
|
|
24
|
+
if (seenWarnings.has(key)) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
seenWarnings.add(key);
|
|
28
|
+
console.warn(`[@flipdish/ui-library] ${message}`);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.warnOnce = warnOnce;
|
|
32
|
+
//# sourceMappingURL=log.utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.utils.cjs","sources":["../../../../src/utilities/__internal__/logUtils/log.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;;;;;AAWG;AAEH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU;AAEtC;;;;;;AAMG;MACU,QAAQ,GAAG,CAAC,GAAW,EAAE,OAAe,KAAU;AAC7D,IAAA,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzB;IACF;AACA,IAAA,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC;AACrB,IAAA,OAAO,CAAC,IAAI,CAAC,0BAA0B,OAAO,CAAA,CAAE,CAAC;AACnD;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* INTERNAL — not part of the public API.
|
|
3
|
+
*
|
|
4
|
+
* `__internal__` modules deliberately have no `index.ts`, so they never match
|
|
5
|
+
* `PUBLIC_ENTRY_GLOBS` (scripts/entry-manifest.mjs) and the `./utilities/*` exports
|
|
6
|
+
* map cannot resolve them — consumers physically cannot import this. Library code
|
|
7
|
+
* imports them via the package-private `#internal/utilities/*` subpath (area-namespaced — add `#internal/hooks/*` etc. as new areas grow internal modules) (package.json `imports`
|
|
8
|
+
* field, resolved by tsc/Vite/Vitest at source level and rewritten to relative paths
|
|
9
|
+
* in dist by the rollup `internal-subpath-imports` plugin). Never import via
|
|
10
|
+
* `@flipdish/ui-library/...` — it resolves in TypeScript but breaks at runtime;
|
|
11
|
+
* `check-deep-imports.mjs` enforces this.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Emits a `console.warn` prefixed with the library name, once per `key` for the
|
|
15
|
+
* lifetime of the module. Use for data-dependent runtime conditions (a blocked
|
|
16
|
+
* href scheme, a missing account id) that must stay visible in production —
|
|
17
|
+
* error-tracking tools pick console.warn up as breadcrumbs — without flooding
|
|
18
|
+
* the console on re-renders.
|
|
19
|
+
*/
|
|
20
|
+
export declare const warnOnce: (key: string, message: string) => void;
|
|
21
|
+
/** Test-only: clears the once-per-key warning memory. */
|
|
22
|
+
export declare const resetWarnOnce: () => void;
|
|
23
|
+
//# sourceMappingURL=log.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.utils.d.ts","sourceRoot":"","sources":["../../../../src/utilities/__internal__/logUtils/log.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,KAAG,IAMvD,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,aAAa,QAAO,IAEhC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* INTERNAL — not part of the public API.
|
|
3
|
+
*
|
|
4
|
+
* `__internal__` modules deliberately have no `index.ts`, so they never match
|
|
5
|
+
* `PUBLIC_ENTRY_GLOBS` (scripts/entry-manifest.mjs) and the `./utilities/*` exports
|
|
6
|
+
* map cannot resolve them — consumers physically cannot import this. Library code
|
|
7
|
+
* imports them via the package-private `#internal/utilities/*` subpath (area-namespaced — add `#internal/hooks/*` etc. as new areas grow internal modules) (package.json `imports`
|
|
8
|
+
* field, resolved by tsc/Vite/Vitest at source level and rewritten to relative paths
|
|
9
|
+
* in dist by the rollup `internal-subpath-imports` plugin). Never import via
|
|
10
|
+
* `@flipdish/ui-library/...` — it resolves in TypeScript but breaks at runtime;
|
|
11
|
+
* `check-deep-imports.mjs` enforces this.
|
|
12
|
+
*/
|
|
13
|
+
const seenWarnings = new Set();
|
|
14
|
+
/**
|
|
15
|
+
* Emits a `console.warn` prefixed with the library name, once per `key` for the
|
|
16
|
+
* lifetime of the module. Use for data-dependent runtime conditions (a blocked
|
|
17
|
+
* href scheme, a missing account id) that must stay visible in production —
|
|
18
|
+
* error-tracking tools pick console.warn up as breadcrumbs — without flooding
|
|
19
|
+
* the console on re-renders.
|
|
20
|
+
*/
|
|
21
|
+
const warnOnce = (key, message) => {
|
|
22
|
+
if (seenWarnings.has(key)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
seenWarnings.add(key);
|
|
26
|
+
console.warn(`[@flipdish/ui-library] ${message}`);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { warnOnce };
|
|
30
|
+
//# sourceMappingURL=log.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.utils.js","sources":["../../../../src/utilities/__internal__/logUtils/log.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;AAWG;AAEH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU;AAEtC;;;;;;AAMG;MACU,QAAQ,GAAG,CAAC,GAAW,EAAE,OAAe,KAAU;AAC7D,IAAA,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzB;IACF;AACA,IAAA,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC;AACrB,IAAA,OAAO,CAAC,IAAI,CAAC,0BAA0B,OAAO,CAAA,CAAE,CAAC;AACnD;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var log_utils = require('../__internal__/logUtils/log.utils.cjs');
|
|
4
|
+
|
|
5
|
+
const ALLOWED_PROTOCOLS = ['http:', 'https:', 'mailto:', 'tel:'];
|
|
6
|
+
// The only scheme names that may appear in warnings — never consumer input.
|
|
7
|
+
const KNOWN_BLOCKED_SCHEMES = ['javascript:', 'data:', 'vbscript:', 'file:', 'blob:', 'ftp:'];
|
|
8
|
+
// Browsers strip tab/newline (and tolerate other C0 controls) when parsing URLs, so
|
|
9
|
+
// `java\nscript:alert(1)` executes as javascript: — remove them before scheme-checking.
|
|
10
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: removing control characters is the point
|
|
11
|
+
const CONTROL_CHARACTERS = /[\u0000-\u001F\u007F]/g;
|
|
12
|
+
/**
|
|
13
|
+
* Validates a consumer-supplied `href` for safe use on an anchor.
|
|
14
|
+
*
|
|
15
|
+
* Strips ASCII control characters, then rejects any explicit scheme outside
|
|
16
|
+
* http/https/mailto/tel — blocking `javascript:`, `data:` and friends. Scheme-less
|
|
17
|
+
* values (relative paths, fragments, bare domains) are allowed.
|
|
18
|
+
*
|
|
19
|
+
* @returns the cleaned href, or `undefined` when the href is not allowed (rendering
|
|
20
|
+
* an anchor with no `href` rather than an executable one).
|
|
21
|
+
*/
|
|
22
|
+
const safeHref = (href) => {
|
|
23
|
+
if (href === undefined) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const cleaned = href.replace(CONTROL_CHARACTERS, '');
|
|
27
|
+
const scheme = /^[a-z][a-z0-9+.-]*:/i.exec(cleaned.trim())?.[0].toLowerCase();
|
|
28
|
+
if (scheme && !ALLOWED_PROTOCOLS.includes(scheme)) {
|
|
29
|
+
// Kept in production builds on purpose: the dangerous input is data-dependent
|
|
30
|
+
// (CMS content, user profiles) and usually only exists in production. The warning
|
|
31
|
+
// text and dedupe key only ever use values from the fixed list below — a raw
|
|
32
|
+
// scheme is consumer input that can embed identifiers (`customer-123:`) and would
|
|
33
|
+
// grow the dedupe set without bound.
|
|
34
|
+
const known = KNOWN_BLOCKED_SCHEMES.includes(scheme);
|
|
35
|
+
log_utils.warnOnce(`safeHref:${known ? scheme : 'other-scheme'}`, `safeHref blocked an href with ${known ? `disallowed scheme "${scheme}"` : 'a non-allowlisted scheme'}. Allowed: http, https, mailto, tel, and relative URLs. The element renders without an href.`);
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return cleaned;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Whether an href points at an external site (http/https), for `target="_blank"`
|
|
42
|
+
* decisions. Unlike a bare `startsWith('http')`, this requires a real scheme match on
|
|
43
|
+
* the control-character-stripped value, so `javascript:` never classifies as internal
|
|
44
|
+
* by falling through, and `httpfoo` never classifies as external.
|
|
45
|
+
*/
|
|
46
|
+
const isExternalHref = (href) => /^https?:/i.test((href ?? '').replace(CONTROL_CHARACTERS, '').trim());
|
|
47
|
+
|
|
48
|
+
exports.isExternalHref = isExternalHref;
|
|
49
|
+
exports.safeHref = safeHref;
|
|
50
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/utilities/hrefUtils/index.ts"],"sourcesContent":[null],"names":["warnOnce"],"mappings":";;;;AAEA,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;AAEhE;AACA,MAAM,qBAAqB,GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;AAE7F;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,wBAAwB;AAEnD;;;;;;;;;AASG;AACI,MAAM,QAAQ,GAAG,CAAC,IAAwB,KAAwB;AACvE,IAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,QAAA,OAAO,SAAS;IAClB;IACA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AACpD,IAAA,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE;IAC7E,IAAI,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;;;;;;QAMjD,MAAM,KAAK,GAAG,qBAAqB,CAAC,QAAQ,CAAC,MAAM,CAAC;QACpDA,kBAAQ,CACN,CAAA,SAAA,EAAY,KAAK,GAAG,MAAM,GAAG,cAAc,CAAA,CAAE,EAC7C,CAAA,8BAAA,EAAiC,KAAK,GAAG,CAAA,mBAAA,EAAsB,MAAM,CAAA,CAAA,CAAG,GAAG,0BAA0B,CAAA,4FAAA,CAA8F,CACpM;AACD,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,OAAO,OAAO;AAChB;AAEA;;;;;AAKG;AACI,MAAM,cAAc,GAAG,CAAC,IAAwB,KAAc,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates a consumer-supplied `href` for safe use on an anchor.
|
|
3
|
+
*
|
|
4
|
+
* Strips ASCII control characters, then rejects any explicit scheme outside
|
|
5
|
+
* http/https/mailto/tel — blocking `javascript:`, `data:` and friends. Scheme-less
|
|
6
|
+
* values (relative paths, fragments, bare domains) are allowed.
|
|
7
|
+
*
|
|
8
|
+
* @returns the cleaned href, or `undefined` when the href is not allowed (rendering
|
|
9
|
+
* an anchor with no `href` rather than an executable one).
|
|
10
|
+
*/
|
|
11
|
+
export declare const safeHref: (href: string | undefined) => string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Whether an href points at an external site (http/https), for `target="_blank"`
|
|
14
|
+
* decisions. Unlike a bare `startsWith('http')`, this requires a real scheme match on
|
|
15
|
+
* the control-character-stripped value, so `javascript:` never classifies as internal
|
|
16
|
+
* by falling through, and `httpfoo` never classifies as external.
|
|
17
|
+
*/
|
|
18
|
+
export declare const isExternalHref: (href: string | undefined) => boolean;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/hrefUtils/index.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAoB5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,OAAgF,CAAC"}
|