@flipdish/ui-library 0.12.4 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -6
- package/dist/native/components/atoms/AppStoreButton/index.d.ts +12 -0
- package/dist/native/components/atoms/Avatar/Avatar.styles.d.ts +39 -0
- package/dist/native/components/atoms/Avatar/Avatar.styles.d.ts.map +1 -0
- package/dist/native/components/atoms/Avatar/Avatar.styles.js +11 -0
- package/dist/native/components/atoms/Avatar/Avatar.styles.js.map +1 -0
- package/dist/native/components/atoms/Avatar/index.d.ts +19 -0
- package/dist/native/components/atoms/Avatar/index.d.ts.map +1 -0
- package/dist/native/components/atoms/Avatar/index.js +18 -0
- package/dist/native/components/atoms/Avatar/index.js.map +1 -0
- package/dist/native/components/atoms/BackgroundPattern/index.d.ts +12 -0
- package/dist/native/components/atoms/Badge/index.d.ts +12 -0
- package/dist/native/components/atoms/Button/index.d.ts +12 -0
- package/dist/native/components/atoms/Checkbox/index.d.ts +12 -0
- package/dist/native/components/atoms/CloseButton/index.d.ts +12 -0
- package/dist/native/components/atoms/Divider/index.d.ts +12 -0
- package/dist/native/components/atoms/Dot/index.d.ts +12 -0
- package/dist/native/components/atoms/FeaturedIcon/index.d.ts +12 -0
- package/dist/native/components/atoms/FileTrigger/index.d.ts +12 -0
- package/dist/native/components/atoms/FlipdishLogo/index.d.ts +12 -0
- package/dist/native/components/atoms/Illustration/index.d.ts +12 -0
- package/dist/native/components/atoms/Input/index.d.ts +12 -0
- package/dist/native/components/atoms/LoadingIndicator/index.d.ts +12 -0
- package/dist/native/components/atoms/ProgressBar/index.d.ts +12 -0
- package/dist/native/components/atoms/QRCode/index.d.ts +12 -0
- package/dist/native/components/atoms/RadioButton/index.d.ts +12 -0
- package/dist/native/components/atoms/RatingBadge/index.d.ts +12 -0
- package/dist/native/components/atoms/RatingStars/index.d.ts +12 -0
- package/dist/native/components/atoms/Skeleton/index.d.ts +12 -0
- package/dist/native/components/atoms/Slider/index.d.ts +12 -0
- package/dist/native/components/atoms/SocialButton/index.d.ts +12 -0
- package/dist/native/components/atoms/Toggle/index.d.ts +12 -0
- package/dist/native/components/atoms/Tooltip/index.d.ts +12 -0
- package/dist/native/components/atoms/UtilityButton/index.d.ts +12 -0
- package/dist/native/components/molecules/Alert/index.d.ts +12 -0
- package/dist/native/components/molecules/BadgeGroup/index.d.ts +12 -0
- package/dist/native/components/molecules/Breadcrumbs/index.d.ts +12 -0
- package/dist/native/components/molecules/ButtonGroup/index.d.ts +12 -0
- package/dist/native/components/molecules/Carousel/index.d.ts +12 -0
- package/dist/native/components/molecules/CodeSnippet/index.d.ts +12 -0
- package/dist/native/components/molecules/ContentDivider/index.d.ts +12 -0
- package/dist/native/components/molecules/CreditCard/index.d.ts +12 -0
- package/dist/native/components/molecules/Dropdown/index.d.ts +12 -0
- package/dist/native/components/molecules/EmptyState/index.d.ts +12 -0
- package/dist/native/components/molecules/Modal/index.d.ts +12 -0
- package/dist/native/components/molecules/Notification/index.d.ts +12 -0
- package/dist/native/components/molecules/Pagination/index.d.ts +12 -0
- package/dist/native/components/molecules/ProgressSteps/index.d.ts +12 -0
- package/dist/native/components/molecules/RadioGroup/index.d.ts +12 -0
- package/dist/native/components/molecules/SectionFooter/index.d.ts +12 -0
- package/dist/native/components/molecules/SectionHeader/index.d.ts +12 -0
- package/dist/native/components/molecules/Select/index.d.ts +12 -0
- package/dist/native/components/molecules/Tabs/index.d.ts +12 -0
- package/dist/native/components/molecules/Tags/index.d.ts +12 -0
- package/dist/native/components/molecules/TextArea/index.d.ts +12 -0
- package/dist/native/components/molecules/VerificationCodeInput/index.d.ts +12 -0
- package/dist/native/components/organisms/ActivityFeed/index.d.ts +12 -0
- package/dist/native/components/organisms/Calendar/index.d.ts +12 -0
- package/dist/native/components/organisms/Charts/index.d.ts +12 -0
- package/dist/native/components/organisms/ColorPicker/index.d.ts +12 -0
- package/dist/native/components/organisms/CommandMenu/index.d.ts +12 -0
- package/dist/native/components/organisms/DatePicker/index.d.ts +12 -0
- package/dist/native/components/organisms/FileUpload/index.d.ts +12 -0
- package/dist/native/components/organisms/FilterBar/index.d.ts +12 -0
- package/dist/native/components/organisms/GradientPicker/index.d.ts +12 -0
- package/dist/native/components/organisms/HeaderNavigation/index.d.ts +12 -0
- package/dist/native/components/organisms/ImagePicker/index.d.ts +12 -0
- package/dist/native/components/organisms/Messaging/index.d.ts +12 -0
- package/dist/native/components/organisms/PageHeader/index.d.ts +12 -0
- package/dist/native/components/organisms/SidebarNavigation/index.d.ts +12 -0
- package/dist/native/components/organisms/SlideoutMenu/index.d.ts +12 -0
- package/dist/native/components/organisms/Table/index.d.ts +12 -0
- package/dist/native/components/organisms/TextEditor/index.d.ts +12 -0
- package/dist/native/components/organisms/TreeView/index.d.ts +12 -0
- package/dist/native/components/organisms/VideoPlayer/index.d.ts +12 -0
- package/dist/native/components/templates/NotFoundPage/index.d.ts +12 -0
- package/dist/native/components/templates/PageLayout/index.d.ts +12 -0
- package/dist/native/hooks/useAriaDisclosureAttrs/index.d.ts +12 -0
- package/dist/native/hooks/useBreakpoints/index.d.ts +12 -0
- package/dist/native/hooks/useClipboard/index.d.ts +12 -0
- package/dist/native/hooks/useResizeObserver/index.d.ts +12 -0
- package/dist/native/providers/ErrorBoundary/index.d.ts +12 -0
- package/dist/native/providers/PortalContainer/index.d.ts +12 -0
- package/dist/native/providers/RouteProvider/index.d.ts +12 -0
- package/dist/native/providers/ThemeProvider/index.d.ts +12 -0
- package/dist/native/providers/UIProvider/index.d.ts +12 -0
- package/dist/native/utilities/cssScopeUtils/index.d.ts +12 -0
- package/dist/native/utilities/cx/index.d.ts +22 -0
- package/dist/native/utilities/cx/index.d.ts.map +1 -0
- package/dist/native/utilities/cx/index.js +38 -0
- package/dist/native/utilities/cx/index.js.map +1 -0
- package/dist/native/utilities/isReactComponent/index.d.ts +24 -0
- package/dist/native/utilities/isReactComponent/index.d.ts.map +1 -0
- package/dist/native/utilities/isReactComponent/index.js +35 -0
- package/dist/native/utilities/isReactComponent/index.js.map +1 -0
- package/dist/native/utilities/localStorageUtils/index.d.ts +12 -0
- package/dist/native/utilities/renderUtils/index.d.ts +12 -0
- package/dist/native/utilities/sessionStorageUtils/index.d.ts +12 -0
- package/dist/native/utilities/testIdUtils/index.d.ts +57 -0
- package/dist/native/utilities/testIdUtils/index.d.ts.map +1 -0
- package/dist/native/utilities/testIdUtils/index.js +58 -0
- package/dist/native/utilities/testIdUtils/index.js.map +1 -0
- package/dist/styles.css +10 -0
- package/dist/styles.native.css +41 -0
- package/package.json +50 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `RouteProvider` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/providers/RouteProvider` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `RouteProvider` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ThemeProvider` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/providers/ThemeProvider` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `ThemeProvider` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `UIProvider` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/providers/UIProvider` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `UIProvider` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cssScopeUtils` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/utilities/cssScopeUtils` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `cssScopeUtils` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge Tailwind class strings, resolving conflicts (last value wins). Accepts the
|
|
3
|
+
* same inputs as tailwind-merge — strings, arrays, and falsy values for
|
|
4
|
+
* conditionals — so it composes cleanly:
|
|
5
|
+
*
|
|
6
|
+
* cx('px-2', isActive && 'bg-primary', ['text-sm', null]);
|
|
7
|
+
*
|
|
8
|
+
* Pure JS with no DOM dependency, so the same helper works on web (PostCSS) and
|
|
9
|
+
* React Native (NativeWind). Imported by components as
|
|
10
|
+
* `@flipdish/ui-library/utilities/cx`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const cx: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
13
|
+
type ClassValue = string | number;
|
|
14
|
+
type ClassDefinition = Record<string, ClassValue | Record<string, ClassValue | Record<string, ClassValue>>>;
|
|
15
|
+
/**
|
|
16
|
+
* Identity helper that exists only so Tailwind IntelliSense recognises and sorts
|
|
17
|
+
* the class strings held inside style-config objects (e.g. `tailwind-variants`
|
|
18
|
+
* slot maps). Returns its argument unchanged.
|
|
19
|
+
*/
|
|
20
|
+
export declare const sortCx: <T extends ClassDefinition>(classes: T) => T;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utilities/cx/index.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,EAAE,sEAAU,CAAC;AAE1B,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAClC,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AAE5G;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,eAAe,EAAE,SAAS,CAAC,KAAG,CAAY,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* tailwind-merge configured for Untitled UI's custom font-size scale, so the
|
|
5
|
+
* `text-display-*` utilities are treated as part of the `font-size` conflict
|
|
6
|
+
* group. Without this, tailwind-merge wouldn't de-dupe e.g.
|
|
7
|
+
* `text-display-sm text-display-lg` down to the last one.
|
|
8
|
+
*
|
|
9
|
+
* Mirrors the `cx` helper from Untitled UI's Vite integration guide.
|
|
10
|
+
*/
|
|
11
|
+
const twMerge = extendTailwindMerge({
|
|
12
|
+
extend: {
|
|
13
|
+
theme: {
|
|
14
|
+
text: ['display-xs', 'display-sm', 'display-md', 'display-lg', 'display-xl', 'display-2xl'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Merge Tailwind class strings, resolving conflicts (last value wins). Accepts the
|
|
20
|
+
* same inputs as tailwind-merge — strings, arrays, and falsy values for
|
|
21
|
+
* conditionals — so it composes cleanly:
|
|
22
|
+
*
|
|
23
|
+
* cx('px-2', isActive && 'bg-primary', ['text-sm', null]);
|
|
24
|
+
*
|
|
25
|
+
* Pure JS with no DOM dependency, so the same helper works on web (PostCSS) and
|
|
26
|
+
* React Native (NativeWind). Imported by components as
|
|
27
|
+
* `@flipdish/ui-library/utilities/cx`.
|
|
28
|
+
*/
|
|
29
|
+
const cx = twMerge;
|
|
30
|
+
/**
|
|
31
|
+
* Identity helper that exists only so Tailwind IntelliSense recognises and sorts
|
|
32
|
+
* the class strings held inside style-config objects (e.g. `tailwind-variants`
|
|
33
|
+
* slot maps). Returns its argument unchanged.
|
|
34
|
+
*/
|
|
35
|
+
const sortCx = (classes) => classes;
|
|
36
|
+
|
|
37
|
+
export { cx, sortCx };
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/utilities/cx/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;AAOG;AACH,MAAM,OAAO,GAAG,mBAAmB,CAAC;AAClC,IAAA,MAAM,EAAE;AACN,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;AAC5F,SAAA;AACF,KAAA;AACF,CAAA,CAAC;AAEF;;;;;;;;;;AAUG;AACI,MAAM,EAAE,GAAG;AAKlB;;;;AAIG;AACI,MAAM,MAAM,GAAG,CAA4B,OAAU,KAAQ;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type ReactComponent = React.FC<any> | React.ComponentClass<any, any> | React.ForwardRefExoticComponent<any>;
|
|
3
|
+
/**
|
|
4
|
+
* Backs Untitled UI's `@/utils/is-react-component` import.
|
|
5
|
+
*
|
|
6
|
+
* Distinguishes a component passed as a prop (an icon `FC`, class component, or
|
|
7
|
+
* `forwardRef` object you instantiate) from an already-rendered element
|
|
8
|
+
* (handled via React's `isValidElement`). Untitled UI icon props accept either
|
|
9
|
+
* form; these guards select the "render it yourself" branch.
|
|
10
|
+
*
|
|
11
|
+
* Pure JS with no DOM dependency — works on web (PostCSS) and React Native
|
|
12
|
+
* (NativeWind). Imported by components as
|
|
13
|
+
* `@flipdish/ui-library/utilities/isReactComponent`.
|
|
14
|
+
*/
|
|
15
|
+
/** Checks if a given value is a function component. */
|
|
16
|
+
export declare const isFunctionComponent: (component: any) => component is React.FC<any>;
|
|
17
|
+
/** Checks if a given value is a class component. */
|
|
18
|
+
export declare const isClassComponent: (component: any) => component is React.ComponentClass<any, any>;
|
|
19
|
+
/** Checks if a given value is a forward ref component. */
|
|
20
|
+
export declare const isForwardRefComponent: (component: any) => component is React.ForwardRefExoticComponent<any>;
|
|
21
|
+
/** Checks if a given value is a valid React component (FC, class, or forwardRef). */
|
|
22
|
+
export declare const isReactComponent: (component: any) => component is ReactComponent;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backs Untitled UI's `@/utils/is-react-component` import.
|
|
3
|
+
*
|
|
4
|
+
* Distinguishes a component passed as a prop (an icon `FC`, class component, or
|
|
5
|
+
* `forwardRef` object you instantiate) from an already-rendered element
|
|
6
|
+
* (handled via React's `isValidElement`). Untitled UI icon props accept either
|
|
7
|
+
* form; these guards select the "render it yourself" branch.
|
|
8
|
+
*
|
|
9
|
+
* Pure JS with no DOM dependency — works on web (PostCSS) and React Native
|
|
10
|
+
* (NativeWind). Imported by components as
|
|
11
|
+
* `@flipdish/ui-library/utilities/isReactComponent`.
|
|
12
|
+
*/
|
|
13
|
+
/** Checks if a given value is a function component. */
|
|
14
|
+
// biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
|
|
15
|
+
const isFunctionComponent = (component) => {
|
|
16
|
+
return typeof component === 'function';
|
|
17
|
+
};
|
|
18
|
+
/** Checks if a given value is a class component. */
|
|
19
|
+
// biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
|
|
20
|
+
const isClassComponent = (component) => {
|
|
21
|
+
return typeof component === 'function' && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);
|
|
22
|
+
};
|
|
23
|
+
/** Checks if a given value is a forward ref component. */
|
|
24
|
+
// biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
|
|
25
|
+
const isForwardRefComponent = (component) => {
|
|
26
|
+
return typeof component === 'object' && component !== null && component.$$typeof?.toString() === 'Symbol(react.forward_ref)';
|
|
27
|
+
};
|
|
28
|
+
/** Checks if a given value is a valid React component (FC, class, or forwardRef). */
|
|
29
|
+
// biome-ignore lint/suspicious/noExplicitAny: required for React component type guard
|
|
30
|
+
const isReactComponent = (component) => {
|
|
31
|
+
return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent };
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `localStorageUtils` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/utilities/localStorageUtils` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `localStorageUtils` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `renderUtils` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/utilities/renderUtils` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `renderUtils` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sessionStorageUtils` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/utilities/sessionStorageUtils` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `sessionStorageUtils` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test-id convention for `@flipdish/ui-library`.
|
|
3
|
+
*
|
|
4
|
+
* Every component exposes an overridable `data-testid`. When omitted, a default
|
|
5
|
+
* is derived so automated tests always have a stable hook:
|
|
6
|
+
*
|
|
7
|
+
* - Root components default to `fd-<kebab-name>` (e.g. `fd-sidebar-navigation`).
|
|
8
|
+
* - Nested components inherit the ancestor's *resolved* testid as their prefix
|
|
9
|
+
* and append `--<segment>`, so the `fd-` prefix appears exactly once at the
|
|
10
|
+
* front: `fd-sidebar-navigation--nav-item-orders`.
|
|
11
|
+
* - A consumer-provided `data-testid` always wins and re-roots the prefix for
|
|
12
|
+
* everything beneath it.
|
|
13
|
+
*
|
|
14
|
+
* Pure React (no DOM / react-aria dependency), so it is safe to import from any
|
|
15
|
+
* layer. Consumed as `@flipdish/ui-library/utilities/testIdUtils`.
|
|
16
|
+
*/
|
|
17
|
+
/** Namespace prepended to every root-level testid. */
|
|
18
|
+
export declare const TEST_ID_PREFIX = "fd";
|
|
19
|
+
/** Separator placed between hierarchy levels (within a segment, use single `-`). */
|
|
20
|
+
export declare const TEST_ID_SEPARATOR = "--";
|
|
21
|
+
/** Convert an arbitrary string into a kebab-case, testid-safe segment. */
|
|
22
|
+
export declare const slugifyTestId: (value: string) => string;
|
|
23
|
+
/** Build a root-level testid, e.g. `rootTestId('sidebar-navigation')` -> `fd-sidebar-navigation`. */
|
|
24
|
+
export declare const rootTestId: (kebabName: string) => string;
|
|
25
|
+
/** Append a child segment to a parent testid, e.g. `joinTestId('fd-x', 'nav-item-orders')` -> `fd-x--nav-item-orders`. */
|
|
26
|
+
export declare const joinTestId: (prefix: string, segment: string) => string;
|
|
27
|
+
/** Return the override when provided, otherwise the fallback (explicit-child case). */
|
|
28
|
+
export declare const resolveTestId: (override: string | undefined, fallback: string) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Spread helper for the resolved testid. Returns `{ 'data-testid': value }` when
|
|
31
|
+
* a value is present, otherwise an empty object. Centralising this keeps the
|
|
32
|
+
* emitted attribute name in one place (a React Native sibling can map it to
|
|
33
|
+
* `testID` in a follow-up without touching call sites).
|
|
34
|
+
*/
|
|
35
|
+
export declare const testIdProps: (testId: string | undefined) => {
|
|
36
|
+
"data-testid"?: string;
|
|
37
|
+
};
|
|
38
|
+
/** Context carrying the current resolved testid, used as the prefix for descendant components. */
|
|
39
|
+
export declare const TestIdContext: import("react").Context<string | undefined>;
|
|
40
|
+
/** Provides a resolved testid as the prefix for descendant library components. */
|
|
41
|
+
export declare const TestIdProvider: import("react").Provider<string | undefined>;
|
|
42
|
+
/** Read the testid prefix contributed by an ancestor component (`undefined` at the root). */
|
|
43
|
+
export declare const useTestIdPrefix: () => string | undefined;
|
|
44
|
+
export interface UseResolvedTestIdOptions {
|
|
45
|
+
/** Consumer-provided override; wins over any derived value. */
|
|
46
|
+
testId?: string;
|
|
47
|
+
/** Segment appended to the inherited prefix when nested. */
|
|
48
|
+
segment: string;
|
|
49
|
+
/** Kebab component name used to build the root default when not nested. */
|
|
50
|
+
rootName: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve a component's testid: an explicit override wins; otherwise derive
|
|
54
|
+
* `<ancestorPrefix>--<segment>` when nested, or `fd-<rootName>` at the root.
|
|
55
|
+
*/
|
|
56
|
+
export declare const useResolvedTestId: ({ testId, segment, rootName }: UseResolvedTestIdOptions) => string;
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utilities/testIdUtils/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,sDAAsD;AACtD,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,0EAA0E;AAC1E,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAKlB,CAAC;AAE7B,qGAAqG;AACrG,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,KAAG,MAA0C,CAAC;AAE1F,0HAA0H;AAC1H,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,EAAE,SAAS,MAAM,KAAG,MAAmD,CAAC;AAEjH,uFAAuF;AACvF,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,GAAG,SAAS,EAAE,UAAU,MAAM,KAAG,MAA8B,CAAC;AAE9G;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,GAAG,SAAS,KAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAA+C,CAAC;AAEjI,kGAAkG;AAClG,eAAO,MAAM,aAAa,6CAA+C,CAAC;AAE1E,kFAAkF;AAClF,eAAO,MAAM,cAAc,8CAAyB,CAAC;AAErD,6FAA6F;AAC7F,eAAO,MAAM,eAAe,QAAO,MAAM,GAAG,SAAsC,CAAC;AAEnF,MAAM,WAAW,wBAAwB;IACvC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,+BAA+B,wBAAwB,KAAG,MAG3F,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Test-id convention for `@flipdish/ui-library`.
|
|
5
|
+
*
|
|
6
|
+
* Every component exposes an overridable `data-testid`. When omitted, a default
|
|
7
|
+
* is derived so automated tests always have a stable hook:
|
|
8
|
+
*
|
|
9
|
+
* - Root components default to `fd-<kebab-name>` (e.g. `fd-sidebar-navigation`).
|
|
10
|
+
* - Nested components inherit the ancestor's *resolved* testid as their prefix
|
|
11
|
+
* and append `--<segment>`, so the `fd-` prefix appears exactly once at the
|
|
12
|
+
* front: `fd-sidebar-navigation--nav-item-orders`.
|
|
13
|
+
* - A consumer-provided `data-testid` always wins and re-roots the prefix for
|
|
14
|
+
* everything beneath it.
|
|
15
|
+
*
|
|
16
|
+
* Pure React (no DOM / react-aria dependency), so it is safe to import from any
|
|
17
|
+
* layer. Consumed as `@flipdish/ui-library/utilities/testIdUtils`.
|
|
18
|
+
*/
|
|
19
|
+
/** Namespace prepended to every root-level testid. */
|
|
20
|
+
const TEST_ID_PREFIX = 'fd';
|
|
21
|
+
/** Separator placed between hierarchy levels (within a segment, use single `-`). */
|
|
22
|
+
const TEST_ID_SEPARATOR = '--';
|
|
23
|
+
/** Convert an arbitrary string into a kebab-case, testid-safe segment. */
|
|
24
|
+
const slugifyTestId = (value) => value
|
|
25
|
+
.toLowerCase()
|
|
26
|
+
.trim()
|
|
27
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
28
|
+
.replace(/^-+|-+$/g, '');
|
|
29
|
+
/** Build a root-level testid, e.g. `rootTestId('sidebar-navigation')` -> `fd-sidebar-navigation`. */
|
|
30
|
+
const rootTestId = (kebabName) => `${TEST_ID_PREFIX}-${kebabName}`;
|
|
31
|
+
/** Append a child segment to a parent testid, e.g. `joinTestId('fd-x', 'nav-item-orders')` -> `fd-x--nav-item-orders`. */
|
|
32
|
+
const joinTestId = (prefix, segment) => `${prefix}${TEST_ID_SEPARATOR}${segment}`;
|
|
33
|
+
/** Return the override when provided, otherwise the fallback (explicit-child case). */
|
|
34
|
+
const resolveTestId = (override, fallback) => override ?? fallback;
|
|
35
|
+
/**
|
|
36
|
+
* Spread helper for the resolved testid. Returns `{ 'data-testid': value }` when
|
|
37
|
+
* a value is present, otherwise an empty object. Centralising this keeps the
|
|
38
|
+
* emitted attribute name in one place (a React Native sibling can map it to
|
|
39
|
+
* `testID` in a follow-up without touching call sites).
|
|
40
|
+
*/
|
|
41
|
+
const testIdProps = (testId) => (testId ? { 'data-testid': testId } : {});
|
|
42
|
+
/** Context carrying the current resolved testid, used as the prefix for descendant components. */
|
|
43
|
+
const TestIdContext = createContext(undefined);
|
|
44
|
+
/** Provides a resolved testid as the prefix for descendant library components. */
|
|
45
|
+
const TestIdProvider = TestIdContext.Provider;
|
|
46
|
+
/** Read the testid prefix contributed by an ancestor component (`undefined` at the root). */
|
|
47
|
+
const useTestIdPrefix = () => useContext(TestIdContext);
|
|
48
|
+
/**
|
|
49
|
+
* Resolve a component's testid: an explicit override wins; otherwise derive
|
|
50
|
+
* `<ancestorPrefix>--<segment>` when nested, or `fd-<rootName>` at the root.
|
|
51
|
+
*/
|
|
52
|
+
const useResolvedTestId = ({ testId, segment, rootName }) => {
|
|
53
|
+
const prefix = useTestIdPrefix();
|
|
54
|
+
return testId ?? (prefix ? joinTestId(prefix, segment) : rootTestId(rootName));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { TEST_ID_PREFIX, TEST_ID_SEPARATOR, TestIdContext, TestIdProvider, joinTestId, resolveTestId, rootTestId, slugifyTestId, testIdProps, useResolvedTestId, useTestIdPrefix };
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/utilities/testIdUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA;;;;;;;;;;;;;;;AAeG;AAEH;AACO,MAAM,cAAc,GAAG;AAE9B;AACO,MAAM,iBAAiB,GAAG;AAEjC;MACa,aAAa,GAAG,CAAC,KAAa,KACzC;AACG,KAAA,WAAW;AACX,KAAA,IAAI;AACJ,KAAA,OAAO,CAAC,aAAa,EAAE,GAAG;AAC1B,KAAA,OAAO,CAAC,UAAU,EAAE,EAAE;AAE3B;AACO,MAAM,UAAU,GAAG,CAAC,SAAiB,KAAa,CAAA,EAAG,cAAc,CAAA,CAAA,EAAI,SAAS;AAEvF;AACO,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,OAAe,KAAa,GAAG,MAAM,CAAA,EAAG,iBAAiB,CAAA,EAAG,OAAO;AAE9G;AACO,MAAM,aAAa,GAAG,CAAC,QAA4B,EAAE,QAAgB,KAAa,QAAQ,IAAI;AAErG;;;;;AAKG;AACI,MAAM,WAAW,GAAG,CAAC,MAA0B,MAAkC,MAAM,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE;AAE/H;MACa,aAAa,GAAG,aAAa,CAAqB,SAAS;AAExE;AACO,MAAM,cAAc,GAAG,aAAa,CAAC;AAE5C;AACO,MAAM,eAAe,GAAG,MAA0B,UAAU,CAAC,aAAa;AAWjF;;;AAGG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAA4B,KAAY;AACnG,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;IAChC,OAAO,MAAM,KAAK,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;AAChF;;;;"}
|
package/dist/styles.css
CHANGED
|
@@ -30,6 +30,16 @@
|
|
|
30
30
|
*/
|
|
31
31
|
@source ".";
|
|
32
32
|
|
|
33
|
+
/*
|
|
34
|
+
* ...but not the React Native tree. Without these, a class used only by a `.native`
|
|
35
|
+
* component generates a utility in every web app's CSS — the one way native code can
|
|
36
|
+
* cost web consumers bytes, since the native JS itself is unreachable through the
|
|
37
|
+
* `exports` map. Two exclusions because the scan root differs: `native` is the built
|
|
38
|
+
* tree an installed consumer sees, `*.native.tsx` the sources scanned in dev/Storybook.
|
|
39
|
+
*/
|
|
40
|
+
@source not "./native";
|
|
41
|
+
@source not "./**/*.native.tsx";
|
|
42
|
+
|
|
33
43
|
/*
|
|
34
44
|
* Untitled UI runtime plugins (per https://www.untitledui.com/react/integrations/vite).
|
|
35
45
|
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* React Native Tailwind runtime for `@flipdish/ui-library`, compiled by NativeWind.
|
|
3
|
+
*
|
|
4
|
+
* Consumed by an Expo / React Native app's global CSS entry via:
|
|
5
|
+
*
|
|
6
|
+
* @import "@flipdish/ui-library/styles.native";
|
|
7
|
+
*
|
|
8
|
+
* Deliberately NOT `styles.css`. That file is the web runtime and is mostly
|
|
9
|
+
* inapplicable here — it declares `@plugin "tailwindcss-animate"` and
|
|
10
|
+
* `@plugin "tailwindcss-react-aria-components"` (both web-only), an `@utility`
|
|
11
|
+
* built on `::-webkit-scrollbar`, an `@layer base` block of `html`/`input`
|
|
12
|
+
* resets, and the Shiki syntax-highlighting overrides. Its `@source "."` would
|
|
13
|
+
* also scan the web JS output in `dist/`, generating utilities React Native can
|
|
14
|
+
* never use.
|
|
15
|
+
*
|
|
16
|
+
* A separate subpath rather than a `react-native` export condition on `./styles`:
|
|
17
|
+
* `@import` is resolved by Tailwind's CSS resolver, which applies the `style` /
|
|
18
|
+
* `default` conditions — not `react-native`.
|
|
19
|
+
*
|
|
20
|
+
* Tokens live separately; import them alongside this file:
|
|
21
|
+
*
|
|
22
|
+
* @import "tailwindcss";
|
|
23
|
+
* @import "@flipdish/ui-tokens/css";
|
|
24
|
+
* @import "@flipdish/ui-library/styles.native";
|
|
25
|
+
*
|
|
26
|
+
* Dark mode is intentionally left to NativeWind's default, which follows the
|
|
27
|
+
* device colour scheme via `useColorScheme`. The web runtime remaps `dark:` onto
|
|
28
|
+
* `[data-theme="dark"]`; replicating that here would break RN dark mode, since
|
|
29
|
+
* there is no DOM attribute to cascade from.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* Scan only the native build output. Resolves relative to this file's real
|
|
34
|
+
* location, which is `dist/` once shipped — so this is `dist/native`, the tree
|
|
35
|
+
* built by rollup.native.config.js, and never the web output beside it. There is
|
|
36
|
+
* no in-repo dev equivalent: native variants aren't previewed in Storybook, so
|
|
37
|
+
* this file is only ever consumed from the published package. A bare directory
|
|
38
|
+
* source avoids brace globs, which Tailwind's CSS parser rejects — even in a
|
|
39
|
+
* comment, so don't reintroduce one.
|
|
40
|
+
*/
|
|
41
|
+
@source "./native";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flipdish/ui-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -19,37 +19,66 @@
|
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
"./styles": "./dist/styles.css",
|
|
22
|
+
"./styles.native": "./dist/styles.native.css",
|
|
22
23
|
"./components/atoms/*": {
|
|
24
|
+
"react-native": {
|
|
25
|
+
"types": "./dist/native/components/atoms/*/index.d.ts",
|
|
26
|
+
"default": "./dist/native/components/atoms/*/index.js"
|
|
27
|
+
},
|
|
23
28
|
"types": "./dist/components/atoms/*/index.d.ts",
|
|
24
29
|
"import": "./dist/components/atoms/*/index.js",
|
|
25
30
|
"require": "./dist/components/atoms/*/index.cjs"
|
|
26
31
|
},
|
|
27
32
|
"./components/molecules/*": {
|
|
33
|
+
"react-native": {
|
|
34
|
+
"types": "./dist/native/components/molecules/*/index.d.ts",
|
|
35
|
+
"default": "./dist/native/components/molecules/*/index.js"
|
|
36
|
+
},
|
|
28
37
|
"types": "./dist/components/molecules/*/index.d.ts",
|
|
29
38
|
"import": "./dist/components/molecules/*/index.js",
|
|
30
39
|
"require": "./dist/components/molecules/*/index.cjs"
|
|
31
40
|
},
|
|
32
41
|
"./components/organisms/*": {
|
|
42
|
+
"react-native": {
|
|
43
|
+
"types": "./dist/native/components/organisms/*/index.d.ts",
|
|
44
|
+
"default": "./dist/native/components/organisms/*/index.js"
|
|
45
|
+
},
|
|
33
46
|
"types": "./dist/components/organisms/*/index.d.ts",
|
|
34
47
|
"import": "./dist/components/organisms/*/index.js",
|
|
35
48
|
"require": "./dist/components/organisms/*/index.cjs"
|
|
36
49
|
},
|
|
37
50
|
"./components/templates/*": {
|
|
51
|
+
"react-native": {
|
|
52
|
+
"types": "./dist/native/components/templates/*/index.d.ts",
|
|
53
|
+
"default": "./dist/native/components/templates/*/index.js"
|
|
54
|
+
},
|
|
38
55
|
"types": "./dist/components/templates/*/index.d.ts",
|
|
39
56
|
"import": "./dist/components/templates/*/index.js",
|
|
40
57
|
"require": "./dist/components/templates/*/index.cjs"
|
|
41
58
|
},
|
|
42
59
|
"./providers/*": {
|
|
60
|
+
"react-native": {
|
|
61
|
+
"types": "./dist/native/providers/*/index.d.ts",
|
|
62
|
+
"default": "./dist/native/providers/*/index.js"
|
|
63
|
+
},
|
|
43
64
|
"types": "./dist/providers/*/index.d.ts",
|
|
44
65
|
"import": "./dist/providers/*/index.js",
|
|
45
66
|
"require": "./dist/providers/*/index.cjs"
|
|
46
67
|
},
|
|
47
68
|
"./hooks/*": {
|
|
69
|
+
"react-native": {
|
|
70
|
+
"types": "./dist/native/hooks/*/index.d.ts",
|
|
71
|
+
"default": "./dist/native/hooks/*/index.js"
|
|
72
|
+
},
|
|
48
73
|
"types": "./dist/hooks/*/index.d.ts",
|
|
49
74
|
"import": "./dist/hooks/*/index.js",
|
|
50
75
|
"require": "./dist/hooks/*/index.cjs"
|
|
51
76
|
},
|
|
52
77
|
"./utilities/*": {
|
|
78
|
+
"react-native": {
|
|
79
|
+
"types": "./dist/native/utilities/*/index.d.ts",
|
|
80
|
+
"default": "./dist/native/utilities/*/index.js"
|
|
81
|
+
},
|
|
53
82
|
"types": "./dist/utilities/*/index.d.ts",
|
|
54
83
|
"import": "./dist/utilities/*/index.js",
|
|
55
84
|
"require": "./dist/utilities/*/index.cjs"
|
|
@@ -69,6 +98,7 @@
|
|
|
69
98
|
"@flipdish/ui-icons": "^0.3.2"
|
|
70
99
|
},
|
|
71
100
|
"peerDependencies": {
|
|
101
|
+
"@expo/metro-config": ">=54.0.0",
|
|
72
102
|
"@react-native-aria/focus": ">=0.2.7",
|
|
73
103
|
"@react-native-aria/interactions": ">=0.2.7",
|
|
74
104
|
"@tiptap/core": "^3.27.1",
|
|
@@ -83,8 +113,9 @@
|
|
|
83
113
|
"embla-carousel-react": "^8.6.0",
|
|
84
114
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
85
115
|
"input-otp": "^1.4.2",
|
|
116
|
+
"lightningcss": ">=1.27.0 <1.30.2",
|
|
86
117
|
"motion": "^12.40.0",
|
|
87
|
-
"nativewind": "^
|
|
118
|
+
"nativewind": "^5.0.0-preview.4",
|
|
88
119
|
"postcss-prefix-selector": "^2.1.1",
|
|
89
120
|
"qr-code-styling": "^1.9.2",
|
|
90
121
|
"react": "^19.0.0",
|
|
@@ -92,7 +123,8 @@
|
|
|
92
123
|
"react-aria-components": "^1.18.0",
|
|
93
124
|
"react-dom": "^19.0.0",
|
|
94
125
|
"react-hotkeys-hook": "^5.3.2",
|
|
95
|
-
"react-native": ">=0.
|
|
126
|
+
"react-native": ">=0.81.0",
|
|
127
|
+
"react-native-css": "^3.0.7",
|
|
96
128
|
"react-router": "^7.0.0",
|
|
97
129
|
"recharts": "^3.8.1",
|
|
98
130
|
"shiki": "^4.2.0",
|
|
@@ -100,6 +132,9 @@
|
|
|
100
132
|
"tailwind-variants": "^3.2.2"
|
|
101
133
|
},
|
|
102
134
|
"peerDependenciesMeta": {
|
|
135
|
+
"@expo/metro-config": {
|
|
136
|
+
"optional": true
|
|
137
|
+
},
|
|
103
138
|
"@react-native-aria/focus": {
|
|
104
139
|
"optional": true
|
|
105
140
|
},
|
|
@@ -139,6 +174,9 @@
|
|
|
139
174
|
"input-otp": {
|
|
140
175
|
"optional": true
|
|
141
176
|
},
|
|
177
|
+
"lightningcss": {
|
|
178
|
+
"optional": true
|
|
179
|
+
},
|
|
142
180
|
"motion": {
|
|
143
181
|
"optional": true
|
|
144
182
|
},
|
|
@@ -166,6 +204,9 @@
|
|
|
166
204
|
"react-native": {
|
|
167
205
|
"optional": true
|
|
168
206
|
},
|
|
207
|
+
"react-native-css": {
|
|
208
|
+
"optional": true
|
|
209
|
+
},
|
|
169
210
|
"react-router": {
|
|
170
211
|
"optional": true
|
|
171
212
|
},
|
|
@@ -208,6 +249,7 @@
|
|
|
208
249
|
"input-otp": "^1.4.2",
|
|
209
250
|
"jsdom": "^29.1.1",
|
|
210
251
|
"motion": "^12.40.0",
|
|
252
|
+
"nativewind": "^5.0.0-preview.4",
|
|
211
253
|
"playwright": "^1.61.1",
|
|
212
254
|
"qr-code-styling": "^1.9.2",
|
|
213
255
|
"react": "^19.0.0",
|
|
@@ -215,6 +257,7 @@
|
|
|
215
257
|
"react-aria-components": "^1.18.0",
|
|
216
258
|
"react-dom": "^19.0.0",
|
|
217
259
|
"react-hotkeys-hook": "^5.3.2",
|
|
260
|
+
"react-native-css": "^3.0.7",
|
|
218
261
|
"react-router": "^7.17.0",
|
|
219
262
|
"recharts": "^3.8.1",
|
|
220
263
|
"remark-gfm": "^4.0.1",
|
|
@@ -228,7 +271,9 @@
|
|
|
228
271
|
"vitest": "^4.1.10"
|
|
229
272
|
},
|
|
230
273
|
"scripts": {
|
|
231
|
-
"build": "rimraf dist &&
|
|
274
|
+
"build": "rimraf dist && pnpm build:web && pnpm build:native && node scripts/verify-build.mjs && node scripts/check-exports-resolution.mjs",
|
|
275
|
+
"build:web": "rollup -c && tsc -p tsconfig.build.json",
|
|
276
|
+
"build:native": "rollup -c rollup.native.config.js && tsc -p tsconfig.build.native.json && node scripts/finalise-native-types.mjs && node scripts/emit-native-stubs.mjs",
|
|
232
277
|
"lint:imports": "node scripts/check-deep-imports.mjs",
|
|
233
278
|
"typecheck": "tsc --noEmit",
|
|
234
279
|
"test": "vitest run --project unit",
|
|
@@ -236,7 +281,7 @@
|
|
|
236
281
|
"test:storybook": "vitest run --project storybook",
|
|
237
282
|
"test:storybook:watch": "vitest --project storybook",
|
|
238
283
|
"test:storybook:coverage": "vitest run --project storybook --coverage",
|
|
239
|
-
"typecheck:native": "
|
|
284
|
+
"typecheck:native": "node scripts/typecheck-native.mjs",
|
|
240
285
|
"storybook": "storybook dev -p 6006",
|
|
241
286
|
"build-storybook": "storybook build",
|
|
242
287
|
"chromatic": "chromatic --exit-zero-on-changes",
|