@molecule/app-ui-react 4.14.0 → 4.15.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.
Files changed (175) hide show
  1. package/README.md +96 -118
  2. package/dist/components/Accordion.d.ts +1 -11
  3. package/dist/components/Accordion.d.ts.map +1 -1
  4. package/dist/components/Accordion.js +1 -82
  5. package/dist/components/Accordion.js.map +1 -1
  6. package/dist/components/Alert.d.ts +1 -25
  7. package/dist/components/Alert.d.ts.map +1 -1
  8. package/dist/components/Alert.js +1 -60
  9. package/dist/components/Alert.js.map +1 -1
  10. package/dist/components/Avatar.d.ts +1 -11
  11. package/dist/components/Avatar.d.ts.map +1 -1
  12. package/dist/components/Avatar.js +1 -28
  13. package/dist/components/Avatar.js.map +1 -1
  14. package/dist/components/Checkbox.d.ts +1 -11
  15. package/dist/components/Checkbox.d.ts.map +1 -1
  16. package/dist/components/Checkbox.js +1 -27
  17. package/dist/components/Checkbox.js.map +1 -1
  18. package/dist/components/Pagination.d.ts +1 -11
  19. package/dist/components/Pagination.d.ts.map +1 -1
  20. package/dist/components/Pagination.js +1 -79
  21. package/dist/components/Pagination.js.map +1 -1
  22. package/dist/components/RadioGroup.d.ts +1 -11
  23. package/dist/components/RadioGroup.d.ts.map +1 -1
  24. package/dist/components/RadioGroup.js +1 -35
  25. package/dist/components/RadioGroup.js.map +1 -1
  26. package/dist/components/Select.d.ts +1 -26
  27. package/dist/components/Select.d.ts.map +1 -1
  28. package/dist/components/Select.js +1 -71
  29. package/dist/components/Select.js.map +1 -1
  30. package/dist/components/Spinner.d.ts +1 -16
  31. package/dist/components/Spinner.d.ts.map +1 -1
  32. package/dist/components/Spinner.js +1 -29
  33. package/dist/components/Spinner.js.map +1 -1
  34. package/dist/components/Switch.d.ts +1 -11
  35. package/dist/components/Switch.d.ts.map +1 -1
  36. package/dist/components/Switch.js +1 -32
  37. package/dist/components/Switch.js.map +1 -1
  38. package/dist/components/Table.d.ts +1 -11
  39. package/dist/components/Table.d.ts.map +1 -1
  40. package/dist/components/Table.js +1 -57
  41. package/dist/components/Table.js.map +1 -1
  42. package/dist/components/Tabs.d.ts +1 -11
  43. package/dist/components/Tabs.d.ts.map +1 -1
  44. package/dist/components/Tabs.js +1 -75
  45. package/dist/components/Tabs.js.map +1 -1
  46. package/dist/components/Textarea.d.ts +1 -10
  47. package/dist/components/Textarea.d.ts.map +1 -1
  48. package/dist/components/Textarea.js +1 -27
  49. package/dist/components/Textarea.js.map +1 -1
  50. package/dist/components/Toast.d.ts +2 -14
  51. package/dist/components/Toast.d.ts.map +1 -1
  52. package/dist/components/Toast.js +8 -89
  53. package/dist/components/Toast.js.map +1 -1
  54. package/dist/elements/Anchor.d.ts +1 -1
  55. package/dist/elements/Box.d.ts +1 -15
  56. package/dist/elements/Box.d.ts.map +1 -1
  57. package/dist/elements/Box.js +1 -55
  58. package/dist/elements/Box.js.map +1 -1
  59. package/dist/elements/CheckField.d.ts +1 -16
  60. package/dist/elements/CheckField.d.ts.map +1 -1
  61. package/dist/elements/CheckField.js +1 -52
  62. package/dist/elements/CheckField.js.map +1 -1
  63. package/dist/elements/Image.d.ts +1 -16
  64. package/dist/elements/Image.d.ts.map +1 -1
  65. package/dist/elements/Image.js +1 -21
  66. package/dist/elements/Image.js.map +1 -1
  67. package/dist/elements/Pressable.d.ts +1 -16
  68. package/dist/elements/Pressable.d.ts.map +1 -1
  69. package/dist/elements/Pressable.js +1 -41
  70. package/dist/elements/Pressable.js.map +1 -1
  71. package/dist/elements/ScrollArea.d.ts +1 -15
  72. package/dist/elements/ScrollArea.d.ts.map +1 -1
  73. package/dist/elements/ScrollArea.js +1 -41
  74. package/dist/elements/ScrollArea.js.map +1 -1
  75. package/dist/elements/SelectField.d.ts +1 -10
  76. package/dist/elements/SelectField.d.ts.map +1 -1
  77. package/dist/elements/SelectField.js +1 -63
  78. package/dist/elements/SelectField.js.map +1 -1
  79. package/dist/elements/Svg.d.ts +1 -123
  80. package/dist/elements/Svg.d.ts.map +1 -1
  81. package/dist/elements/Svg.js +1 -179
  82. package/dist/elements/Svg.js.map +1 -1
  83. package/dist/elements/TableBox.d.ts +1 -15
  84. package/dist/elements/TableBox.d.ts.map +1 -1
  85. package/dist/elements/TableBox.js +1 -17
  86. package/dist/elements/TableBox.js.map +1 -1
  87. package/dist/elements/TableCell.d.ts +1 -15
  88. package/dist/elements/TableCell.d.ts.map +1 -1
  89. package/dist/elements/TableCell.js +1 -17
  90. package/dist/elements/TableCell.js.map +1 -1
  91. package/dist/elements/Text.d.ts +1 -18
  92. package/dist/elements/Text.d.ts.map +1 -1
  93. package/dist/elements/Text.js +1 -20
  94. package/dist/elements/Text.js.map +1 -1
  95. package/dist/elements/TextField.d.ts +1 -17
  96. package/dist/elements/TextField.d.ts.map +1 -1
  97. package/dist/elements/TextField.js +1 -104
  98. package/dist/elements/TextField.js.map +1 -1
  99. package/dist/elements/drag.d.ts +1 -14
  100. package/dist/elements/drag.d.ts.map +1 -1
  101. package/dist/elements/drag.js +1 -27
  102. package/dist/elements/drag.js.map +1 -1
  103. package/dist/elements/flow.d.ts +1 -16
  104. package/dist/elements/flow.d.ts.map +1 -1
  105. package/dist/elements/flow.js +1 -17
  106. package/dist/elements/flow.js.map +1 -1
  107. package/dist/elements/hover.d.ts +1 -9
  108. package/dist/elements/hover.d.ts.map +1 -1
  109. package/dist/elements/hover.js +1 -22
  110. package/dist/elements/hover.js.map +1 -1
  111. package/dist/elements/measure.d.ts +1 -24
  112. package/dist/elements/measure.d.ts.map +1 -1
  113. package/dist/elements/measure.js +1 -19
  114. package/dist/elements/measure.js.map +1 -1
  115. package/dist/elements/paste.d.ts +1 -4
  116. package/dist/elements/paste.d.ts.map +1 -1
  117. package/dist/elements/paste.js +1 -14
  118. package/dist/elements/paste.js.map +1 -1
  119. package/dist/elements/ref.d.ts +1 -15
  120. package/dist/elements/ref.d.ts.map +1 -1
  121. package/dist/elements/ref.js +1 -17
  122. package/dist/elements/ref.js.map +1 -1
  123. package/dist/elements/style.d.ts +1 -34
  124. package/dist/elements/style.d.ts.map +1 -1
  125. package/dist/elements/style.js +1 -50
  126. package/dist/elements/style.js.map +1 -1
  127. package/dist/elements/types.d.ts +1 -22
  128. package/dist/elements/types.d.ts.map +1 -1
  129. package/dist/elements/types.js +1 -6
  130. package/dist/elements/types.js.map +1 -1
  131. package/dist/elements/viewport.d.ts +1 -52
  132. package/dist/elements/viewport.d.ts.map +1 -1
  133. package/dist/elements/viewport.js +1 -103
  134. package/dist/elements/viewport.js.map +1 -1
  135. package/dist/index.native.d.ts +1 -0
  136. package/dist/index.native.d.ts.map +1 -1
  137. package/dist/index.native.js +1 -0
  138. package/dist/index.native.js.map +1 -1
  139. package/dist/kit.native.d.ts +12 -0
  140. package/dist/kit.native.d.ts.map +1 -0
  141. package/dist/kit.native.js +11 -0
  142. package/dist/kit.native.js.map +1 -0
  143. package/dist/kit.web.d.ts +39 -0
  144. package/dist/kit.web.d.ts.map +1 -0
  145. package/dist/kit.web.js +34 -0
  146. package/dist/kit.web.js.map +1 -0
  147. package/dist/platform/index.d.ts +1 -28
  148. package/dist/platform/index.d.ts.map +1 -1
  149. package/dist/platform/index.js +1 -179
  150. package/dist/platform/index.js.map +1 -1
  151. package/dist/utilities/initials.d.ts +1 -12
  152. package/dist/utilities/initials.d.ts.map +1 -1
  153. package/dist/utilities/initials.js +1 -22
  154. package/dist/utilities/initials.js.map +1 -1
  155. package/dist/utilities/isReactNode.d.ts +1 -15
  156. package/dist/utilities/isReactNode.d.ts.map +1 -1
  157. package/dist/utilities/isReactNode.js +1 -26
  158. package/dist/utilities/isReactNode.js.map +1 -1
  159. package/dist/utilities/mergeRefs.d.ts +1 -19
  160. package/dist/utilities/mergeRefs.d.ts.map +1 -1
  161. package/dist/utilities/mergeRefs.js +1 -33
  162. package/dist/utilities/mergeRefs.js.map +1 -1
  163. package/dist/utilities/renderIcon.d.ts +3 -17
  164. package/dist/utilities/renderIcon.d.ts.map +1 -1
  165. package/dist/utilities/renderIcon.js +6 -31
  166. package/dist/utilities/renderIcon.js.map +1 -1
  167. package/dist/utilities/rootProps.d.ts +1 -19
  168. package/dist/utilities/rootProps.d.ts.map +1 -1
  169. package/dist/utilities/rootProps.js +1 -18
  170. package/dist/utilities/rootProps.js.map +1 -1
  171. package/package.json +16 -8
  172. package/dist/platform/arrow.d.ts +0 -5
  173. package/dist/platform/arrow.d.ts.map +0 -1
  174. package/dist/platform/arrow.js +0 -49
  175. package/dist/platform/arrow.js.map +0 -1
@@ -1,23 +1,2 @@
1
- /**
2
- * Initials derivation for avatar fallbacks.
3
- *
4
- * @module
5
- */
6
- /**
7
- * Compute up-to-two-letter initials from a display name or email.
8
- *
9
- * @param value - The name or email to derive initials from.
10
- * @returns The uppercased initials, or `'?'` when no usable input is given.
11
- */
12
- export function getInitials(value) {
13
- if (!value)
14
- return '?';
15
- const cleaned = value.includes('@') ? value.split('@')[0] : value;
16
- const parts = cleaned.split(/[\s._-]+/).filter(Boolean);
17
- if (parts.length === 0)
18
- return '?';
19
- const first = parts[0]?.[0] ?? '';
20
- const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : '';
21
- return (first + last).toUpperCase().slice(0, 2) || '?';
22
- }
1
+ export { getInitials } from '@molecule/app-react-ui-kit-components/helpers';
23
2
  //# sourceMappingURL=initials.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"initials.js","sourceRoot":"","sources":["../../src/utilities/initials.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAgC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO,GAAG,CAAA;IACtB,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IACjE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACvD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IAClC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IACjC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACzE,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAA;AACxD,CAAC"}
1
+ {"version":3,"file":"initials.js","sourceRoot":"","sources":["../../src/utilities/initials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA"}
@@ -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;;;;GAIG;AAEH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAO9D"}
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;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAEhD;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC1E,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAC5D,IAAI,MAAM,CAAC,QAAQ,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU;QAAE,OAAO,IAAI,CAAA;IACzF,IAAI,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,IAAI,CAAA;IACpE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACrB,OAAO,IAAI,CAAA;AACb,CAAC"}
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;;;;GAIG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAExC,KAAK,GAAG,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,CAAA;AAQvE;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAc9D"}
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
- /** Updates either ref shape. React 18's types report callback results as void. */
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":"AASA,kFAAkF;AAClF,SAAS,QAAQ,CAAI,GAAW,EAAE,IAAc;IAC9C,IAAI,OAAO,GAAG,KAAK,UAAU;QAAE,OAAO,GAAG,CAAC,IAAI,CAAC,CAAA;IAC/C,IAAI,GAAG;QAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAA;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAI,GAAG,IAAc;IAC5C,OAAO,CAAC,IAAc,EAAE,EAAE;QACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;QACvD,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC;YAAE,OAAM;QACvF,2EAA2E;QAC3E,oDAAoD;QACpD,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAC1B,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAC/B,IAAI,OAAO,OAAO,KAAK,UAAU;oBAAE,OAAO,EAAE,CAAA;;oBACvC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YAC1B,CAAC,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
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
- import type React from 'react';
7
- import { type IconName } from '@molecule/app-icons';
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;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAG5D;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAsBjF"}
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
- * Renders an icon by name as an SVG element, on React DOM and React Native.
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
- * @param name - Icon name from the icon set
14
- * @param className - CSS class for sizing
15
- * @returns React SVG element
4
+ * @module
16
5
  */
17
- export function renderIcon(name, className) {
18
- const icon = getIcon(name);
19
- const canvas = {
20
- xmlns: 'http://www.w3.org/2000/svg',
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":";AAQA,OAAO,EAAE,OAAO,EAAiB,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAEtE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,SAAkB;IAC3D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,MAAM,GAAG;QACb,KAAK,EAAE,4BAA4B;QACnC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,KAAK;QAChB,SAAS;QACT,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,WAAW;QACpC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,cAAc;QACjC,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,cAAc,EAAE,IAAI,CAAC,cAAc;KACpC,CAAA;IACD,IAAI,IAAI,CAAC,GAAG;QAAE,OAAO,KAAC,SAAS,OAAK,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,GAAI,CAAA;IAChE,OAAO,CACL,KAAC,GAAG,OAAK,MAAM,YACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACxB,KAAC,IAAI,IAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAArD,CAAC,CAAwD,CACrE,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
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;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3D,IAAI,EAAE,CAAC,GACN,IAAI,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAGtD"}
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;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CACvB,IAAO;IAEP,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA;IACxC,OAAO,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA;AACzF,CAAC"}
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.14.0",
3
+ "version": "4.15.0",
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.2.0"
80
+ "@molecule/app-pointer-events-dom": "1.3.0",
81
+ "@molecule/app-react-ui-kit-components": "1.1.0"
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.15.0",
87
- "@molecule/app-ui": "^1.16.0",
88
- "@molecule/app-ui-react-native": "^2.2.0",
87
+ "@molecule/app-react": "^4.17.0 || ^5.0.0",
88
+ "@molecule/app-ui": "^1.17.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
- "@molecule/app-filesystem": "1.1.0",
94
+ "@molecule/app-filesystem": "1.1.1",
94
95
  "@molecule/app-i18n": "1.4.0",
95
96
  "@molecule/app-icons": "1.0.4",
96
- "@molecule/app-react": "4.19.0",
97
+ "@molecule/app-react": "5.0.0",
97
98
  "@molecule/app-routing": "1.5.3",
98
- "@molecule/app-ui-react-native": "2.2.0",
99
+ "@molecule/app-ui-react-native": "2.4.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
  }
@@ -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"}
@@ -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"}