@molecule/app-ui-react 4.13.0 → 4.14.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 +97 -119
- package/dist/components/Accordion.d.ts +1 -11
- package/dist/components/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion.js +1 -82
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/Alert.d.ts +1 -25
- package/dist/components/Alert.d.ts.map +1 -1
- package/dist/components/Alert.js +1 -60
- package/dist/components/Alert.js.map +1 -1
- package/dist/components/Avatar.d.ts +1 -11
- package/dist/components/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar.js +1 -28
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Checkbox.d.ts +1 -11
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +1 -27
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/Pagination.d.ts +1 -11
- package/dist/components/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination.js +1 -79
- package/dist/components/Pagination.js.map +1 -1
- package/dist/components/RadioGroup.d.ts +1 -11
- package/dist/components/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup.js +1 -35
- package/dist/components/RadioGroup.js.map +1 -1
- package/dist/components/Select.d.ts +1 -26
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +1 -71
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Spinner.d.ts +1 -16
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner.js +1 -29
- package/dist/components/Spinner.js.map +1 -1
- package/dist/components/Switch.d.ts +1 -11
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +1 -32
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Table.d.ts +1 -11
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/components/Table.js +1 -57
- package/dist/components/Table.js.map +1 -1
- package/dist/components/Tabs.d.ts +1 -11
- package/dist/components/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs.js +1 -75
- package/dist/components/Tabs.js.map +1 -1
- package/dist/components/Textarea.d.ts +1 -10
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +1 -27
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/Toast.d.ts +2 -14
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +8 -89
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/formSubmitError.d.ts.map +1 -1
- package/dist/components/formSubmitError.js +7 -2
- package/dist/components/formSubmitError.js.map +1 -1
- package/dist/elements/Anchor.d.ts +1 -1
- package/dist/elements/Box.d.ts +1 -15
- package/dist/elements/Box.d.ts.map +1 -1
- package/dist/elements/Box.js +1 -56
- package/dist/elements/Box.js.map +1 -1
- package/dist/elements/CheckField.d.ts +1 -16
- package/dist/elements/CheckField.d.ts.map +1 -1
- package/dist/elements/CheckField.js +1 -52
- package/dist/elements/CheckField.js.map +1 -1
- package/dist/elements/Image.d.ts +1 -16
- package/dist/elements/Image.d.ts.map +1 -1
- package/dist/elements/Image.js +1 -21
- package/dist/elements/Image.js.map +1 -1
- package/dist/elements/Pressable.d.ts +1 -16
- package/dist/elements/Pressable.d.ts.map +1 -1
- package/dist/elements/Pressable.js +1 -42
- package/dist/elements/Pressable.js.map +1 -1
- package/dist/elements/ScrollArea.d.ts +1 -15
- package/dist/elements/ScrollArea.d.ts.map +1 -1
- package/dist/elements/ScrollArea.js +1 -41
- package/dist/elements/ScrollArea.js.map +1 -1
- package/dist/elements/SelectField.d.ts +1 -10
- package/dist/elements/SelectField.d.ts.map +1 -1
- package/dist/elements/SelectField.js +1 -63
- package/dist/elements/SelectField.js.map +1 -1
- package/dist/elements/Svg.d.ts +1 -123
- package/dist/elements/Svg.d.ts.map +1 -1
- package/dist/elements/Svg.js +1 -177
- package/dist/elements/Svg.js.map +1 -1
- package/dist/elements/TableBox.d.ts +1 -15
- package/dist/elements/TableBox.d.ts.map +1 -1
- package/dist/elements/TableBox.js +1 -17
- package/dist/elements/TableBox.js.map +1 -1
- package/dist/elements/TableCell.d.ts +1 -15
- package/dist/elements/TableCell.d.ts.map +1 -1
- package/dist/elements/TableCell.js +1 -17
- package/dist/elements/TableCell.js.map +1 -1
- package/dist/elements/Text.d.ts +1 -17
- package/dist/elements/Text.d.ts.map +1 -1
- package/dist/elements/Text.js +1 -19
- package/dist/elements/Text.js.map +1 -1
- package/dist/elements/TextField.d.ts +1 -17
- package/dist/elements/TextField.d.ts.map +1 -1
- package/dist/elements/TextField.js +1 -104
- package/dist/elements/TextField.js.map +1 -1
- package/dist/elements/drag.d.ts +1 -10
- package/dist/elements/drag.d.ts.map +1 -1
- package/dist/elements/drag.js +1 -21
- package/dist/elements/drag.js.map +1 -1
- package/dist/elements/flow.d.ts +1 -16
- package/dist/elements/flow.d.ts.map +1 -1
- package/dist/elements/flow.js +1 -17
- package/dist/elements/flow.js.map +1 -1
- package/dist/elements/hover.d.ts +1 -9
- package/dist/elements/hover.d.ts.map +1 -1
- package/dist/elements/hover.js +1 -22
- package/dist/elements/hover.js.map +1 -1
- package/dist/elements/measure.d.ts +1 -24
- package/dist/elements/measure.d.ts.map +1 -1
- package/dist/elements/measure.js +1 -19
- package/dist/elements/measure.js.map +1 -1
- package/dist/elements/paste.d.ts +1 -4
- package/dist/elements/paste.d.ts.map +1 -1
- package/dist/elements/paste.js +1 -14
- package/dist/elements/paste.js.map +1 -1
- package/dist/elements/ref.d.ts +1 -15
- package/dist/elements/ref.d.ts.map +1 -1
- package/dist/elements/ref.js +1 -17
- package/dist/elements/ref.js.map +1 -1
- package/dist/elements/style.d.ts +1 -34
- package/dist/elements/style.d.ts.map +1 -1
- package/dist/elements/style.js +1 -33
- package/dist/elements/style.js.map +1 -1
- package/dist/elements/types.d.ts +1 -22
- package/dist/elements/types.d.ts.map +1 -1
- package/dist/elements/types.js +1 -6
- package/dist/elements/types.js.map +1 -1
- package/dist/elements/viewport.d.ts +1 -52
- package/dist/elements/viewport.d.ts.map +1 -1
- package/dist/elements/viewport.js +1 -103
- package/dist/elements/viewport.js.map +1 -1
- package/dist/index.native.d.ts +1 -0
- package/dist/index.native.d.ts.map +1 -1
- package/dist/index.native.js +1 -0
- package/dist/index.native.js.map +1 -1
- package/dist/kit.native.d.ts +12 -0
- package/dist/kit.native.d.ts.map +1 -0
- package/dist/kit.native.js +11 -0
- package/dist/kit.native.js.map +1 -0
- package/dist/kit.web.d.ts +39 -0
- package/dist/kit.web.d.ts.map +1 -0
- package/dist/kit.web.js +34 -0
- package/dist/kit.web.js.map +1 -0
- package/dist/platform/index.d.ts +1 -28
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js +1 -179
- package/dist/platform/index.js.map +1 -1
- package/dist/utilities/initials.d.ts +1 -12
- package/dist/utilities/initials.d.ts.map +1 -1
- package/dist/utilities/initials.js +1 -22
- package/dist/utilities/initials.js.map +1 -1
- package/dist/utilities/isReactNode.d.ts +1 -15
- package/dist/utilities/isReactNode.d.ts.map +1 -1
- package/dist/utilities/isReactNode.js +1 -26
- package/dist/utilities/isReactNode.js.map +1 -1
- package/dist/utilities/mergeRefs.d.ts +1 -19
- package/dist/utilities/mergeRefs.d.ts.map +1 -1
- package/dist/utilities/mergeRefs.js +1 -33
- package/dist/utilities/mergeRefs.js.map +1 -1
- package/dist/utilities/renderIcon.d.ts +3 -17
- package/dist/utilities/renderIcon.d.ts.map +1 -1
- package/dist/utilities/renderIcon.js +6 -31
- package/dist/utilities/renderIcon.js.map +1 -1
- package/dist/utilities/rootProps.d.ts +1 -19
- package/dist/utilities/rootProps.d.ts.map +1 -1
- package/dist/utilities/rootProps.js +1 -18
- package/dist/utilities/rootProps.js.map +1 -1
- package/package.json +16 -8
- package/dist/platform/arrow.d.ts +0 -5
- package/dist/platform/arrow.d.ts.map +0 -1
- package/dist/platform/arrow.js +0 -49
- package/dist/platform/arrow.js.map +0 -1
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Validates legacy slot input at the React rendering boundary.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
import { type ReactNode } from 'react';
|
|
7
|
-
/**
|
|
8
|
-
* Checks whether the value is a React child without replacing valid nodes.
|
|
9
|
-
* React recognizes its own opaque element and portal objects. It consumes iterables and
|
|
10
|
-
* thenables during render, so checking those must leave their contents alone.
|
|
11
|
-
*
|
|
12
|
-
* @param value - The legacy slot value.
|
|
13
|
-
* @returns Whether the slot can render the value.
|
|
14
|
-
*/
|
|
15
|
-
export declare function isReactNode(value: unknown): value is ReactNode;
|
|
1
|
+
export { isReactNode } from '@molecule/app-react-ui-kit-components/helpers';
|
|
16
2
|
//# sourceMappingURL=isReactNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isReactNode.d.ts","sourceRoot":"","sources":["../../src/utilities/isReactNode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"isReactNode.d.ts","sourceRoot":"","sources":["../../src/utilities/isReactNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA"}
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Validates legacy slot input at the React rendering boundary.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
import { Children } from 'react';
|
|
7
|
-
/**
|
|
8
|
-
* Checks whether the value is a React child without replacing valid nodes.
|
|
9
|
-
* React recognizes its own opaque element and portal objects. It consumes iterables and
|
|
10
|
-
* thenables during render, so checking those must leave their contents alone.
|
|
11
|
-
*
|
|
12
|
-
* @param value - The legacy slot value.
|
|
13
|
-
* @returns Whether the slot can render the value.
|
|
14
|
-
*/
|
|
15
|
-
export function isReactNode(value) {
|
|
16
|
-
if (typeof value === 'function' || typeof value === 'symbol')
|
|
17
|
-
return false;
|
|
18
|
-
if (value === null || typeof value !== 'object')
|
|
19
|
-
return true;
|
|
20
|
-
if (Symbol.iterator in value && typeof value[Symbol.iterator] === 'function')
|
|
21
|
-
return true;
|
|
22
|
-
if ('then' in value && typeof value.then === 'function')
|
|
23
|
-
return true;
|
|
24
|
-
Children.count(value);
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
1
|
+
export { isReactNode } from '@molecule/app-react-ui-kit-components/helpers';
|
|
27
2
|
//# sourceMappingURL=isReactNode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isReactNode.js","sourceRoot":"","sources":["../../src/utilities/isReactNode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"isReactNode.js","sourceRoot":"","sources":["../../src/utilities/isReactNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA"}
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Merges a component's forwarded ref with its own internal ref.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
import type { RefCallback } from 'react';
|
|
7
|
-
type Ref<T> = RefCallback<T> | {
|
|
8
|
-
current: T | null;
|
|
9
|
-
} | null | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Merges multiple refs (object or callback) into a single callback ref, so an internal ref
|
|
12
|
-
* (focus-trap or positioning bookkeeping) can coexist with the consumer's forwarded ref on the
|
|
13
|
-
* same DOM node.
|
|
14
|
-
*
|
|
15
|
-
* @param refs - The refs to merge; `undefined`/`null` entries are skipped.
|
|
16
|
-
* @returns A callback that attaches the refs and preserves their detach behavior.
|
|
17
|
-
*/
|
|
18
|
-
export declare function mergeRefs<T>(...refs: Ref<T>[]): RefCallback<T>;
|
|
19
|
-
export {};
|
|
1
|
+
export { mergeRefs } from '@molecule/app-react-ui-kit-components/helpers';
|
|
20
2
|
//# sourceMappingURL=mergeRefs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeRefs.d.ts","sourceRoot":"","sources":["../../src/utilities/mergeRefs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mergeRefs.d.ts","sourceRoot":"","sources":["../../src/utilities/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAA"}
|
|
@@ -1,34 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
function applyRef(ref, node) {
|
|
3
|
-
if (typeof ref === 'function')
|
|
4
|
-
return ref(node);
|
|
5
|
-
if (ref)
|
|
6
|
-
ref.current = node;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Merges multiple refs (object or callback) into a single callback ref, so an internal ref
|
|
10
|
-
* (focus-trap or positioning bookkeeping) can coexist with the consumer's forwarded ref on the
|
|
11
|
-
* same DOM node.
|
|
12
|
-
*
|
|
13
|
-
* @param refs - The refs to merge; `undefined`/`null` entries are skipped.
|
|
14
|
-
* @returns A callback that attaches the refs and preserves their detach behavior.
|
|
15
|
-
*/
|
|
16
|
-
export function mergeRefs(...refs) {
|
|
17
|
-
return (node) => {
|
|
18
|
-
const cleanups = refs.map((ref) => applyRef(ref, node));
|
|
19
|
-
if (node === null || !cleanups.some((cleanup) => typeof cleanup === 'function'))
|
|
20
|
-
return;
|
|
21
|
-
// React 19 calls this instead of passing null to the merged callback. Refs
|
|
22
|
-
// without a cleanup still need their normal detach.
|
|
23
|
-
return () => {
|
|
24
|
-
refs.forEach((ref, index) => {
|
|
25
|
-
const cleanup = cleanups[index];
|
|
26
|
-
if (typeof cleanup === 'function')
|
|
27
|
-
cleanup();
|
|
28
|
-
else
|
|
29
|
-
applyRef(ref, null);
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
}
|
|
1
|
+
export { mergeRefs } from '@molecule/app-react-ui-kit-components/helpers';
|
|
34
2
|
//# sourceMappingURL=mergeRefs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeRefs.js","sourceRoot":"","sources":["../../src/utilities/mergeRefs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mergeRefs.js","sourceRoot":"","sources":["../../src/utilities/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAA"}
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Render an icon from the current icon set.
|
|
2
|
+
* Render an icon from the current icon set with this renderer's SVG hosts.
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Renders an icon by name as an SVG element, on React DOM and React Native.
|
|
10
|
-
*
|
|
11
|
-
* The SVG is marked `aria-hidden` + `focusable="false"`: every call site is
|
|
12
|
-
* decorative chrome (close X, chevrons, status glyphs) whose accessible name
|
|
13
|
-
* comes from the surrounding control's `aria-label`/text. Without this, some
|
|
14
|
-
* screen reader/browser combos announce a stray "image" for each glyph.
|
|
15
|
-
* A set's prebuilt glyph (`icon.svg`) is drawn from its markup, as the Icon component draws it.
|
|
16
|
-
*
|
|
17
|
-
* @param name - Icon name from the icon set
|
|
18
|
-
* @param className - CSS class for sizing
|
|
19
|
-
* @returns React SVG element
|
|
20
|
-
*/
|
|
21
|
-
export declare function renderIcon(name: IconName, className?: string): React.ReactElement;
|
|
6
|
+
/** Renders a decorative SVG icon from the bonded icon set. */
|
|
7
|
+
export declare const renderIcon: (name: import("@molecule/app-icons").IconName, className?: string) => React.ReactElement;
|
|
22
8
|
//# sourceMappingURL=renderIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderIcon.d.ts","sourceRoot":"","sources":["../../src/utilities/renderIcon.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"renderIcon.d.ts","sourceRoot":"","sources":["../../src/utilities/renderIcon.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,8DAA8D;AAC9D,eAAO,MAAM,UAAU,0FAA+C,CAAA"}
|
|
@@ -1,35 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getIcon } from '@molecule/app-icons';
|
|
3
|
-
import { Path, Svg, SvgMarkup } from '@molecule/app-ui-react/elements';
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The SVG is marked `aria-hidden` + `focusable="false"`: every call site is
|
|
8
|
-
* decorative chrome (close X, chevrons, status glyphs) whose accessible name
|
|
9
|
-
* comes from the surrounding control's `aria-label`/text. Without this, some
|
|
10
|
-
* screen reader/browser combos announce a stray "image" for each glyph.
|
|
11
|
-
* A set's prebuilt glyph (`icon.svg`) is drawn from its markup, as the Icon component draws it.
|
|
2
|
+
* Render an icon from the current icon set with this renderer's SVG hosts.
|
|
12
3
|
*
|
|
13
|
-
* @
|
|
14
|
-
* @param className - CSS class for sizing
|
|
15
|
-
* @returns React SVG element
|
|
4
|
+
* @module
|
|
16
5
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'aria-hidden': true,
|
|
22
|
-
focusable: false,
|
|
23
|
-
className,
|
|
24
|
-
viewBox: icon.viewBox || '0 0 20 20',
|
|
25
|
-
fill: icon.fill || 'currentColor',
|
|
26
|
-
stroke: icon.stroke,
|
|
27
|
-
strokeWidth: icon.strokeWidth,
|
|
28
|
-
strokeLinecap: icon.strokeLinecap,
|
|
29
|
-
strokeLinejoin: icon.strokeLinejoin,
|
|
30
|
-
};
|
|
31
|
-
if (icon.svg)
|
|
32
|
-
return _jsx(SvgMarkup, { ...canvas, markup: icon.svg });
|
|
33
|
-
return (_jsx(Svg, { ...canvas, children: icon.paths.map((p, i) => (_jsx(Path, { d: p.d, fillRule: p.fillRule, clipRule: p.clipRule }, i))) }));
|
|
34
|
-
}
|
|
6
|
+
import { createIconRenderer } from '@molecule/app-react-ui-kit-components/icons';
|
|
7
|
+
import { Path, Svg, SvgMarkup } from '@molecule/app-ui-react/elements';
|
|
8
|
+
/** Renders a decorative SVG icon from the bonded icon set. */
|
|
9
|
+
export const renderIcon = createIconRenderer({ Path, Svg, SvgMarkup });
|
|
35
10
|
//# sourceMappingURL=renderIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderIcon.js","sourceRoot":"","sources":["../../src/utilities/renderIcon.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderIcon.js","sourceRoot":"","sources":["../../src/utilities/renderIcon.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAChF,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAEtE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAA"}
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* The props a component spreads onto its root element.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* The caller's rest props for a component's root element, with `BaseProps.automationId`
|
|
8
|
-
* rendered as the `data-mol-id` attribute it documents. Spread raw, React would write
|
|
9
|
-
* `automationId` to the DOM as an unknown attribute (with a dev warning) and the automation
|
|
10
|
-
* hook an agent or E2E test looks for would never appear.
|
|
11
|
-
*
|
|
12
|
-
* @param rest - The props the component does not consume itself.
|
|
13
|
-
* @returns The props to spread onto the root element.
|
|
14
|
-
*/
|
|
15
|
-
export declare function rootProps<T extends {
|
|
16
|
-
automationId?: string;
|
|
17
|
-
}>(rest: T): Omit<T, 'automationId'> & {
|
|
18
|
-
'data-mol-id'?: string;
|
|
19
|
-
};
|
|
1
|
+
export { rootProps } from '@molecule/app-react-ui-kit-components/helpers';
|
|
20
2
|
//# sourceMappingURL=rootProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootProps.d.ts","sourceRoot":"","sources":["../../src/utilities/rootProps.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rootProps.d.ts","sourceRoot":"","sources":["../../src/utilities/rootProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAA"}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* The props a component spreads onto its root element.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* The caller's rest props for a component's root element, with `BaseProps.automationId`
|
|
8
|
-
* rendered as the `data-mol-id` attribute it documents. Spread raw, React would write
|
|
9
|
-
* `automationId` to the DOM as an unknown attribute (with a dev warning) and the automation
|
|
10
|
-
* hook an agent or E2E test looks for would never appear.
|
|
11
|
-
*
|
|
12
|
-
* @param rest - The props the component does not consume itself.
|
|
13
|
-
* @returns The props to spread onto the root element.
|
|
14
|
-
*/
|
|
15
|
-
export function rootProps(rest) {
|
|
16
|
-
const { automationId, ...others } = rest;
|
|
17
|
-
return automationId === undefined ? others : { ...others, 'data-mol-id': automationId };
|
|
18
|
-
}
|
|
1
|
+
export { rootProps } from '@molecule/app-react-ui-kit-components/helpers';
|
|
19
2
|
//# sourceMappingURL=rootProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootProps.js","sourceRoot":"","sources":["../../src/utilities/rootProps.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rootProps.js","sourceRoot":"","sources":["../../src/utilities/rootProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-ui-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.1",
|
|
4
4
|
"description": "React UI primitive bundle for molecule.dev — Button, Modal, Tooltip, Toast, Alert, Card, Badge, Avatar, Tabs, Accordion, Dropdown, Select, Checkbox, Switch, Input, Table, Spinner, Skeleton, Progress and more. Import these primitives; do not rebuild them.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -77,25 +77,26 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@molecule/app-inline-style-dom": "1.2.0",
|
|
79
79
|
"@molecule/app-overlay-dom": "1.1.0",
|
|
80
|
-
"@molecule/app-pointer-events-dom": "1.
|
|
80
|
+
"@molecule/app-pointer-events-dom": "1.2.0",
|
|
81
|
+
"@molecule/app-react-ui-kit-components": "1.0.1"
|
|
81
82
|
},
|
|
82
83
|
"peerDependencies": {
|
|
83
84
|
"@molecule/app-filesystem": "^1.1.0",
|
|
84
85
|
"@molecule/app-i18n": "^1.3.0",
|
|
85
86
|
"@molecule/app-icons": "^1.0.1",
|
|
86
|
-
"@molecule/app-react": "^4.
|
|
87
|
-
"@molecule/app-ui": "^1.
|
|
88
|
-
"@molecule/app-ui-react-native": "^2.
|
|
87
|
+
"@molecule/app-react": "^4.17.0",
|
|
88
|
+
"@molecule/app-ui": "^1.16.0",
|
|
89
|
+
"@molecule/app-ui-react-native": "^2.3.0",
|
|
89
90
|
"react": "^18.0.0 || ^19.0.0",
|
|
90
91
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
91
92
|
},
|
|
92
93
|
"devDependencies": {
|
|
93
94
|
"@molecule/app-filesystem": "1.1.0",
|
|
94
|
-
"@molecule/app-i18n": "1.
|
|
95
|
+
"@molecule/app-i18n": "1.4.0",
|
|
95
96
|
"@molecule/app-icons": "1.0.4",
|
|
96
|
-
"@molecule/app-react": "4.
|
|
97
|
+
"@molecule/app-react": "4.19.0",
|
|
97
98
|
"@molecule/app-routing": "1.5.3",
|
|
98
|
-
"@molecule/app-ui-react-native": "2.
|
|
99
|
+
"@molecule/app-ui-react-native": "2.3.0",
|
|
99
100
|
"@testing-library/react": "16.3.3",
|
|
100
101
|
"@types/node": "26.6.5",
|
|
101
102
|
"@types/react": "19.3.0",
|
|
@@ -120,5 +121,12 @@
|
|
|
120
121
|
"@molecule/app-ui-react-native": {
|
|
121
122
|
"optional": true
|
|
122
123
|
}
|
|
124
|
+
},
|
|
125
|
+
"imports": {
|
|
126
|
+
"#kit": {
|
|
127
|
+
"browser": "./dist/kit.web.js",
|
|
128
|
+
"react-native": "./dist/kit.native.js",
|
|
129
|
+
"default": "./dist/kit.web.js"
|
|
130
|
+
}
|
|
123
131
|
}
|
|
124
132
|
}
|
package/dist/platform/arrow.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Positions the themed browser tooltip arrow. */
|
|
2
|
-
import type { OverlayPlatform } from '@molecule/app-react/overlay';
|
|
3
|
-
/** Renders the arrow beside the tooltip surface so the tip cannot clip it. */
|
|
4
|
-
export declare const OverlayArrow: OverlayPlatform['OverlayArrow'];
|
|
5
|
-
//# sourceMappingURL=arrow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../src/platform/arrow.tsx"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAmDlE,8EAA8E;AAC9E,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,cAAc,CAExD,CAAA"}
|
package/dist/platform/arrow.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from '../elements/Box.js';
|
|
3
|
-
/** Arrow square size (px) before the 45° rotation that turns it into a diamond. */
|
|
4
|
-
const ARROW_SIZE = 8;
|
|
5
|
-
/**
|
|
6
|
-
* Returns the arrow's inline position style for a given placement. The arrow
|
|
7
|
-
* has no dedicated ClassMap resolver (`tooltip()` takes no options), so its
|
|
8
|
-
* shape/position is expressed via a small inline style — the sanctioned
|
|
9
|
-
* exception for values ClassMap cannot express. Its color is NOT hardcoded:
|
|
10
|
-
* `var(--color-surface)` / `var(--color-border)` are the same CSS custom
|
|
11
|
-
* properties the `bg-surface`/`border` Tailwind utilities in `tooltipContent`
|
|
12
|
-
* resolve to (see `@molecule/app-ui-tailwind/base.css`), so the arrow always
|
|
13
|
-
* matches the tooltip body in both themes.
|
|
14
|
-
* @param placement - The tooltip's resolved placement.
|
|
15
|
-
* @returns Inline style positioning the rotated-square arrow for that placement.
|
|
16
|
-
*/
|
|
17
|
-
function getArrowStyle(placement) {
|
|
18
|
-
const half = ARROW_SIZE / 2;
|
|
19
|
-
const base = {
|
|
20
|
-
position: 'absolute',
|
|
21
|
-
width: ARROW_SIZE,
|
|
22
|
-
height: ARROW_SIZE,
|
|
23
|
-
background: 'var(--color-surface)',
|
|
24
|
-
border: '1px solid var(--color-border)',
|
|
25
|
-
};
|
|
26
|
-
switch (placement) {
|
|
27
|
-
case 'top':
|
|
28
|
-
return { ...base, bottom: -half, left: '50%', transform: 'translateX(-50%) rotate(45deg)' };
|
|
29
|
-
case 'top-start':
|
|
30
|
-
return { ...base, bottom: -half, left: 12, transform: 'rotate(45deg)' };
|
|
31
|
-
case 'top-end':
|
|
32
|
-
return { ...base, bottom: -half, right: 12, transform: 'rotate(45deg)' };
|
|
33
|
-
case 'bottom':
|
|
34
|
-
return { ...base, top: -half, left: '50%', transform: 'translateX(-50%) rotate(45deg)' };
|
|
35
|
-
case 'bottom-start':
|
|
36
|
-
return { ...base, top: -half, left: 12, transform: 'rotate(45deg)' };
|
|
37
|
-
case 'bottom-end':
|
|
38
|
-
return { ...base, top: -half, right: 12, transform: 'rotate(45deg)' };
|
|
39
|
-
case 'left':
|
|
40
|
-
return { ...base, right: -half, top: '50%', transform: 'translateY(-50%) rotate(45deg)' };
|
|
41
|
-
case 'right':
|
|
42
|
-
return { ...base, left: -half, top: '50%', transform: 'translateY(-50%) rotate(45deg)' };
|
|
43
|
-
default:
|
|
44
|
-
return base;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/** Renders the arrow beside the tooltip surface so the tip cannot clip it. */
|
|
48
|
-
export const OverlayArrow = ({ placement }) => (_jsx(Box, { as: "span", "aria-hidden": "true", webStyle: getArrowStyle(placement) }));
|
|
49
|
-
//# sourceMappingURL=arrow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.js","sourceRoot":"","sources":["../../src/platform/arrow.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AAExC,mFAAmF;AACnF,MAAM,UAAU,GAAG,CAAC,CAAA;AAEpB;;;;;;;;;;;GAWG;AACH,SAAS,aAAa,CAAC,SAA2B;IAChD,MAAM,IAAI,GAAG,UAAU,GAAG,CAAC,CAAA;IAC3B,MAAM,IAAI,GAAa;QACrB,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,UAAU;QACjB,MAAM,EAAE,UAAU;QAClB,UAAU,EAAE,sBAAsB;QAClC,MAAM,EAAE,+BAA+B;KACxC,CAAA;IACD,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,KAAK;YACR,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAA;QAC7F,KAAK,WAAW;YACd,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;QACzE,KAAK,SAAS;YACZ,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;QAC1E,KAAK,QAAQ;YACX,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAA;QAC1F,KAAK,cAAc;YACjB,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;QACtE,KAAK,YAAY;YACf,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;QACvE,KAAK,MAAM;YACT,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAA;QAC3F,KAAK,OAAO;YACV,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAA;QAC1F;YACE,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAoC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC9E,KAAC,GAAG,IAAC,EAAE,EAAC,MAAM,iBAAa,MAAM,EAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,GAAI,CACzE,CAAA"}
|