@flipdish/ui-library 0.17.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/BackgroundPattern/components/grid-check.cjs +2 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.js +2 -1
- package/dist/components/atoms/BackgroundPattern/components/grid-check.js.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.cjs +4 -1
- package/dist/components/atoms/BackgroundPattern/index.cjs.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.d.ts +8 -3
- package/dist/components/atoms/BackgroundPattern/index.d.ts.map +1 -1
- package/dist/components/atoms/BackgroundPattern/index.js +4 -1
- package/dist/components/atoms/BackgroundPattern/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/EmptyState/index.cjs +4 -1
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +4 -1
- package/dist/components/molecules/EmptyState/index.js.map +1 -1
- package/dist/components/molecules/Pagination/index.cjs +2 -2
- package/dist/components/molecules/Pagination/index.cjs.map +1 -1
- package/dist/components/molecules/Pagination/index.d.ts +1 -1
- package/dist/components/molecules/Pagination/index.d.ts.map +1 -1
- package/dist/components/molecules/Pagination/index.js +2 -2
- package/dist/components/molecules/Pagination/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/Calendar/calendar.utils.cjs +16 -0
- package/dist/components/organisms/Calendar/calendar.utils.cjs.map +1 -0
- package/dist/components/organisms/Calendar/calendar.utils.d.ts +6 -0
- package/dist/components/organisms/Calendar/calendar.utils.d.ts.map +1 -0
- package/dist/components/organisms/Calendar/calendar.utils.js +14 -0
- package/dist/components/organisms/Calendar/calendar.utils.js.map +1 -0
- package/dist/components/organisms/Calendar/components/calendar-header.cjs +2 -1
- package/dist/components/organisms/Calendar/components/calendar-header.cjs.map +1 -1
- package/dist/components/organisms/Calendar/components/calendar-header.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/components/calendar-header.js +2 -1
- package/dist/components/organisms/Calendar/components/calendar-header.js.map +1 -1
- package/dist/components/organisms/Calendar/index.cjs +13 -7
- package/dist/components/organisms/Calendar/index.cjs.map +1 -1
- package/dist/components/organisms/Calendar/index.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/index.js +13 -7
- package/dist/components/organisms/Calendar/index.js.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.cjs +4 -0
- package/dist/components/organisms/Charts/components/charts-base.cjs.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.d.ts.map +1 -1
- package/dist/components/organisms/Charts/components/charts-base.js +4 -0
- package/dist/components/organisms/Charts/components/charts-base.js.map +1 -1
- package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.cjs +6 -0
- package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.cjs.map +1 -1
- package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.d.ts.map +1 -1
- package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.js +6 -0
- package/dist/components/organisms/GradientPicker/providers/gradient-picker-context.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/HeaderNavigation/components/nav-list.cjs +4 -2
- package/dist/components/organisms/HeaderNavigation/components/nav-list.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-list.d.ts.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-list.js +4 -2
- package/dist/components/organisms/HeaderNavigation/components/nav-list.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/SidebarNavigation/hooks/use-dual-tier-keyboard.cjs +7 -2
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.js +7 -2
- package/dist/components/organisms/SidebarNavigation/hooks/use-dual-tier-keyboard.js.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs +32 -15
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.js +20 -3
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.js.map +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 +30 -18
- 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 +26 -14
- 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/TextEditor/textEditor.utils.cjs +32 -0
- package/dist/components/organisms/TextEditor/textEditor.utils.cjs.map +1 -0
- package/dist/components/organisms/TextEditor/textEditor.utils.d.ts +14 -0
- package/dist/components/organisms/TextEditor/textEditor.utils.d.ts.map +1 -0
- package/dist/components/organisms/TextEditor/textEditor.utils.js +29 -0
- package/dist/components/organisms/TextEditor/textEditor.utils.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/hooks/useClipboard/index.cjs +10 -3
- package/dist/hooks/useClipboard/index.cjs.map +1 -1
- package/dist/hooks/useClipboard/index.d.ts.map +1 -1
- package/dist/hooks/useClipboard/index.js +10 -3
- package/dist/hooks/useClipboard/index.js.map +1 -1
- 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,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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { warnOnce } from '../__internal__/logUtils/log.utils.js';
|
|
2
|
+
|
|
3
|
+
const ALLOWED_PROTOCOLS = ['http:', 'https:', 'mailto:', 'tel:'];
|
|
4
|
+
// The only scheme names that may appear in warnings — never consumer input.
|
|
5
|
+
const KNOWN_BLOCKED_SCHEMES = ['javascript:', 'data:', 'vbscript:', 'file:', 'blob:', 'ftp:'];
|
|
6
|
+
// Browsers strip tab/newline (and tolerate other C0 controls) when parsing URLs, so
|
|
7
|
+
// `java\nscript:alert(1)` executes as javascript: — remove them before scheme-checking.
|
|
8
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: removing control characters is the point
|
|
9
|
+
const CONTROL_CHARACTERS = /[\u0000-\u001F\u007F]/g;
|
|
10
|
+
/**
|
|
11
|
+
* Validates a consumer-supplied `href` for safe use on an anchor.
|
|
12
|
+
*
|
|
13
|
+
* Strips ASCII control characters, then rejects any explicit scheme outside
|
|
14
|
+
* http/https/mailto/tel — blocking `javascript:`, `data:` and friends. Scheme-less
|
|
15
|
+
* values (relative paths, fragments, bare domains) are allowed.
|
|
16
|
+
*
|
|
17
|
+
* @returns the cleaned href, or `undefined` when the href is not allowed (rendering
|
|
18
|
+
* an anchor with no `href` rather than an executable one).
|
|
19
|
+
*/
|
|
20
|
+
const safeHref = (href) => {
|
|
21
|
+
if (href === undefined) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const cleaned = href.replace(CONTROL_CHARACTERS, '');
|
|
25
|
+
const scheme = /^[a-z][a-z0-9+.-]*:/i.exec(cleaned.trim())?.[0].toLowerCase();
|
|
26
|
+
if (scheme && !ALLOWED_PROTOCOLS.includes(scheme)) {
|
|
27
|
+
// Kept in production builds on purpose: the dangerous input is data-dependent
|
|
28
|
+
// (CMS content, user profiles) and usually only exists in production. The warning
|
|
29
|
+
// text and dedupe key only ever use values from the fixed list below — a raw
|
|
30
|
+
// scheme is consumer input that can embed identifiers (`customer-123:`) and would
|
|
31
|
+
// grow the dedupe set without bound.
|
|
32
|
+
const known = KNOWN_BLOCKED_SCHEMES.includes(scheme);
|
|
33
|
+
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.`);
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
return cleaned;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Whether an href points at an external site (http/https), for `target="_blank"`
|
|
40
|
+
* decisions. Unlike a bare `startsWith('http')`, this requires a real scheme match on
|
|
41
|
+
* the control-character-stripped value, so `javascript:` never classifies as internal
|
|
42
|
+
* by falling through, and `httpfoo` never classifies as external.
|
|
43
|
+
*/
|
|
44
|
+
const isExternalHref = (href) => /^https?:/i.test((href ?? '').replace(CONTROL_CHARACTERS, '').trim());
|
|
45
|
+
|
|
46
|
+
export { isExternalHref, safeHref };
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utilities/hrefUtils/index.ts"],"sourcesContent":[null],"names":[],"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;QACpD,QAAQ,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;;;;"}
|
|
@@ -14,18 +14,13 @@ const getEnvironmentVariable = (key) => {
|
|
|
14
14
|
if (typeof process !== 'undefined' && process.env && typeof process.env[key] === 'string') {
|
|
15
15
|
return process.env[key];
|
|
16
16
|
}
|
|
17
|
-
// Fallback to Vite env when available
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return viteEnv?.[key] ?? '';
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
17
|
+
// Fallback to Vite env when available. Written as bare `import.meta.env` — legal in
|
|
18
|
+
// the ESM build and in Vite/Vitest — and rewritten to `undefined` in the CJS output
|
|
19
|
+
// by the `import-meta-env-cjs-safe` plugin in rollup.config.js, where `import.meta`
|
|
20
|
+
// would be a parse error. No eval: strict-CSP consumers (no `unsafe-eval`) previously
|
|
21
|
+
// lost this path silently.
|
|
22
|
+
const viteEnv = undefined;
|
|
23
|
+
return viteEnv?.[key] ?? '';
|
|
29
24
|
};
|
|
30
25
|
/**
|
|
31
26
|
* Retrieves a micro-frontend attribute.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/utilities/renderUtils/index.ts"],"sourcesContent":[null],"names":["lazy","importWithRetry"],"mappings":";;;;;AAIA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,GAAW,KAAY;;AAE5D,IAAA,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;AACzF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAW;IACnC
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/utilities/renderUtils/index.ts"],"sourcesContent":[null],"names":["lazy","importWithRetry"],"mappings":";;;;;AAIA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,GAAW,KAAY;;AAE5D,IAAA,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;AACzF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAW;IACnC;;;;;;AAMA,IAAA,MAAM,OAAO,GAAI,SAA6E;AAC9F,IAAA,OAAO,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE;AAC7B;AAEA;;;;;AAKG;AACI,MAAM,yBAAyB,GAAG,CAAC,GAAW,KAAY;AAC/D,IAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACnC,QAAA,OAAO,EAAE;IACX;IACA,MAAM,gBAAgB,GAAG,QAAQ,CAAC,cAAc,CAAC,yBAAyB,CAAC;IAC3E,OAAO,gBAAgB,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE;AAClD;AAEA;;;;;;;;AAQG;AACI,MAAM,QAAQ,GAAG,MAAa;AACnC,IAAA,OAAO,sBAAsB,CAAC,qBAAqB,CAAC,IAAI,yBAAyB,CAAC,aAAa,CAAC,IAAI,yBAAyB,CAAC,YAAY,CAAC;AAC7I;AAEA;;;;;;;;AAQG;AACI,MAAM,QAAQ,GAAG,MAAa;AACnC,IAAA,OAAO,sBAAsB,CAAC,qBAAqB,CAAC,IAAI,yBAAyB,CAAC,aAAa,CAAC,IAAI,yBAAyB,CAAC,YAAY,CAAC;AAC7I;AAEA;;;;;;;;AAQG;AACI,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,sBAAsB,CAAC,uBAAuB,CAAC,IAAI,yBAAyB,CAAC,eAAe,CAAC,IAAI,yBAAyB,CAAC,cAAc,CAAC;AACnJ;AAEA;;;;;;;;AAQG;AACI,MAAM,kBAAkB,GAAG,MAAc;AAC9C,IAAA,MAAM,WAAW,GACf,sBAAsB,CAAC,8BAA8B,CAAC;QACtD,yBAAyB,CAAC,wBAAwB,CAAC;QACnD,yBAAyB,CAAC,sBAAsB,CAAC;AACnD,IAAA,OAAO,WAAW,EAAE,QAAQ,EAAE,KAAK,MAAM;AAC3C;AAEA;AACO,MAAM,aAAa,GAAG,CAAC,eAA0B,KAAKA,UAAI,CAAC,MAAMC,qCAAe,CAAC,eAAe,CAAC;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/renderUtils/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/renderUtils/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,KAAG,MAYpD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GAAI,KAAK,MAAM,KAAG,MAMvD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,QAAO,MAE3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,QAAO,MAE3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,QAAO,MAE7B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,QAAO,OAMrC,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,iBAAiB,MAAM,GAAG,4EAAiD,CAAC"}
|
|
@@ -12,18 +12,13 @@ const getEnvironmentVariable = (key) => {
|
|
|
12
12
|
if (typeof process !== 'undefined' && process.env && typeof process.env[key] === 'string') {
|
|
13
13
|
return process.env[key];
|
|
14
14
|
}
|
|
15
|
-
// Fallback to Vite env when available
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return viteEnv?.[key] ?? '';
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return '';
|
|
26
|
-
}
|
|
15
|
+
// Fallback to Vite env when available. Written as bare `import.meta.env` — legal in
|
|
16
|
+
// the ESM build and in Vite/Vitest — and rewritten to `undefined` in the CJS output
|
|
17
|
+
// by the `import-meta-env-cjs-safe` plugin in rollup.config.js, where `import.meta`
|
|
18
|
+
// would be a parse error. No eval: strict-CSP consumers (no `unsafe-eval`) previously
|
|
19
|
+
// lost this path silently.
|
|
20
|
+
const viteEnv = import.meta.env;
|
|
21
|
+
return viteEnv?.[key] ?? '';
|
|
27
22
|
};
|
|
28
23
|
/**
|
|
29
24
|
* Retrieves a micro-frontend attribute.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/utilities/renderUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,GAAW,KAAY;;AAE5D,IAAA,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;AACzF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAW;IACnC
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utilities/renderUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,GAAW,KAAY;;AAE5D,IAAA,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;AACzF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAW;IACnC;;;;;;AAMA,IAAA,MAAM,OAAO,GAAI,MAAM,CAAC,IAAkE,CAAC,GAAG;AAC9F,IAAA,OAAO,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE;AAC7B;AAEA;;;;;AAKG;AACI,MAAM,yBAAyB,GAAG,CAAC,GAAW,KAAY;AAC/D,IAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACnC,QAAA,OAAO,EAAE;IACX;IACA,MAAM,gBAAgB,GAAG,QAAQ,CAAC,cAAc,CAAC,yBAAyB,CAAC;IAC3E,OAAO,gBAAgB,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE;AAClD;AAEA;;;;;;;;AAQG;AACI,MAAM,QAAQ,GAAG,MAAa;AACnC,IAAA,OAAO,sBAAsB,CAAC,qBAAqB,CAAC,IAAI,yBAAyB,CAAC,aAAa,CAAC,IAAI,yBAAyB,CAAC,YAAY,CAAC;AAC7I;AAEA;;;;;;;;AAQG;AACI,MAAM,QAAQ,GAAG,MAAa;AACnC,IAAA,OAAO,sBAAsB,CAAC,qBAAqB,CAAC,IAAI,yBAAyB,CAAC,aAAa,CAAC,IAAI,yBAAyB,CAAC,YAAY,CAAC;AAC7I;AAEA;;;;;;;;AAQG;AACI,MAAM,UAAU,GAAG,MAAa;AACrC,IAAA,OAAO,sBAAsB,CAAC,uBAAuB,CAAC,IAAI,yBAAyB,CAAC,eAAe,CAAC,IAAI,yBAAyB,CAAC,cAAc,CAAC;AACnJ;AAEA;;;;;;;;AAQG;AACI,MAAM,kBAAkB,GAAG,MAAc;AAC9C,IAAA,MAAM,WAAW,GACf,sBAAsB,CAAC,8BAA8B,CAAC;QACtD,yBAAyB,CAAC,wBAAwB,CAAC;QACnD,yBAAyB,CAAC,sBAAsB,CAAC;AACnD,IAAA,OAAO,WAAW,EAAE,QAAQ,EAAE,KAAK,MAAM;AAC3C;AAEA;AACO,MAAM,aAAa,GAAG,CAAC,eAA0B,KAAK,IAAI,CAAC,MAAM,eAAe,CAAC,eAAe,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flipdish/ui-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"imports": {
|
|
7
|
+
"#internal/hooks/*": "./src/hooks/__internal__/*.ts",
|
|
8
|
+
"#internal/utilities/*": "./src/utilities/__internal__/*.ts"
|
|
9
|
+
},
|
|
6
10
|
"sideEffects": [
|
|
7
11
|
"*.css"
|
|
8
12
|
],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/hooks/useAriaDisclosureAttrs/index.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;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAriaDisclosureAttrs/index.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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/useAriaDisclosureAttrs/index.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utilities/isReactComponent/index.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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/utilities/isReactComponent/index.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/utilities/isReactComponent/index.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/isReactComponent/index.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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/utilities/isReactComponent/index.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;;;;"}
|