@pibit.ai/cure-design-system 0.3.6 → 0.3.8

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 (303) hide show
  1. package/dist/foundations/dot-icon/index.d.ts +7 -0
  2. package/dist/foundations/dot-icon/index.d.ts.map +1 -0
  3. package/dist/foundations/dot-icon/index.js +10 -0
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +42 -36
  7. package/dist/patterns/table/TableWrapper.d.ts +6 -3
  8. package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
  9. package/dist/patterns/table/TableWrapper.js +80 -76
  10. package/dist/patterns/table/table.d.ts +5 -3
  11. package/dist/patterns/table/table.d.ts.map +1 -1
  12. package/dist/patterns/table/table.js +195 -173
  13. package/dist/patterns/tree-view/index.d.ts +2 -0
  14. package/dist/patterns/tree-view/index.d.ts.map +1 -0
  15. package/dist/patterns/tree-view/tree-view.d.ts +61 -0
  16. package/dist/patterns/tree-view/tree-view.d.ts.map +1 -0
  17. package/dist/patterns/tree-view/tree-view.js +167 -0
  18. package/dist/primitives/badge/badge-types.d.ts +17 -0
  19. package/dist/primitives/badge/badge-types.d.ts.map +1 -0
  20. package/dist/primitives/badge/badge-types.js +8 -0
  21. package/dist/primitives/badge/badge.d.ts +115 -22
  22. package/dist/primitives/badge/badge.d.ts.map +1 -1
  23. package/dist/primitives/badge/badge.js +272 -38
  24. package/dist/primitives/badge/index.d.ts +2 -1
  25. package/dist/primitives/badge/index.d.ts.map +1 -1
  26. package/dist/primitives/heading/heading.d.ts +1 -1
  27. package/dist/primitives/text/text.d.ts +1 -1
  28. package/dist/styles/components.css +1 -1
  29. package/package.json +2 -1
  30. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
  31. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -34
  32. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
  33. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
  34. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
  35. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
  36. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
  37. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
  38. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
  39. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
  40. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
  41. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
  42. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
  43. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
  44. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
  45. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -277
  46. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
  47. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
  48. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
  49. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
  50. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -131
  51. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
  52. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -23
  53. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -27
  54. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -34
  55. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
  56. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
  57. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
  58. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
  59. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
  60. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
  61. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
  62. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
  63. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
  64. package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -63
  65. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
  66. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -22
  67. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -66
  68. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
  69. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -38
  70. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
  71. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
  72. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
  73. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
  74. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
  75. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -20
  76. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
  77. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
  78. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
  79. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
  80. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
  81. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
  82. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
  83. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
  84. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
  85. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
  86. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
  87. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
  88. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
  89. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
  90. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
  91. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -106
  92. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -133
  93. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -109
  94. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -37
  95. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
  96. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
  97. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
  98. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
  99. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.js +0 -32
  100. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +0 -52
  101. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +0 -98
  102. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
  103. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
  104. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
  105. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
  106. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
  107. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -49
  108. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -30
  109. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
  110. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -69
  111. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -75
  112. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
  113. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
  114. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
  115. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
  116. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
  117. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
  118. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
  119. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -31
  120. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
  121. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
  122. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
  123. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
  124. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
  125. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
  126. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
  127. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-final-keyframe.js +0 -8
  128. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
  129. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
  130. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
  131. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -6
  132. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
  133. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
  134. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
  135. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
  136. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
  137. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
  138. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -24
  139. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
  140. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
  141. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
  142. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
  143. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
  144. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
  145. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
  146. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
  147. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -41
  148. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
  149. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
  150. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
  151. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -24
  152. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -33
  153. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -13
  154. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
  155. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
  156. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
  157. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
  158. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
  159. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -27
  160. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
  161. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
  162. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -52
  163. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -36
  164. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
  165. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
  166. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
  167. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -16
  168. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
  169. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -623
  170. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
  171. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -60
  172. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
  173. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
  174. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
  175. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
  176. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
  177. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
  178. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
  179. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
  180. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
  181. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
  182. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -247
  183. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
  184. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
  185. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
  186. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
  187. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
  188. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -38
  189. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -29
  190. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -37
  191. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
  192. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -14
  193. package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
  194. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
  195. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
  196. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
  197. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
  198. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
  199. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
  200. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  201. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -141
  202. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
  203. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
  204. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
  205. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
  206. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
  207. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
  208. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
  209. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
  210. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
  211. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
  212. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
  213. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
  214. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
  215. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
  216. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
  217. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
  218. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
  219. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
  220. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
  221. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
  222. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
  223. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
  224. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
  225. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
  226. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
  227. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
  228. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
  229. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
  230. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
  231. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
  232. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
  233. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
  234. package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -215
  235. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
  236. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
  237. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
  238. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
  239. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
  240. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
  241. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
  242. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
  243. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -49
  244. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
  245. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
  246. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -24
  247. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
  248. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -31
  249. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
  250. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
  251. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
  252. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
  253. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
  254. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
  255. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
  256. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
  257. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
  258. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
  259. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
  260. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
  261. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
  262. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
  263. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
  264. package/dist/node_modules/motion-utils/dist/es/array.js +0 -11
  265. package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
  266. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
  267. package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
  268. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
  269. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -18
  270. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
  271. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
  272. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
  273. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
  274. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
  275. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
  276. package/dist/node_modules/motion-utils/dist/es/errors.js +0 -15
  277. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
  278. package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
  279. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
  280. package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -6
  281. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
  282. package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
  283. package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
  284. package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
  285. package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
  286. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
  287. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
  288. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -6
  289. package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
  290. package/dist/patterns/tree/TreeDemo.d.ts +0 -7
  291. package/dist/patterns/tree/TreeDemo.d.ts.map +0 -1
  292. package/dist/patterns/tree/TreeStructure.d.ts +0 -14
  293. package/dist/patterns/tree/TreeStructure.d.ts.map +0 -1
  294. package/dist/patterns/tree/TreeStructure.js +0 -110
  295. package/dist/patterns/tree/constants.d.ts +0 -18
  296. package/dist/patterns/tree/constants.d.ts.map +0 -1
  297. package/dist/patterns/tree/helper.d.ts +0 -6
  298. package/dist/patterns/tree/helper.d.ts.map +0 -1
  299. package/dist/patterns/tree/helper.js +0 -21
  300. package/dist/patterns/tree/index.d.ts +0 -4
  301. package/dist/patterns/tree/index.d.ts.map +0 -1
  302. package/dist/patterns/tree/interface.d.ts +0 -9
  303. package/dist/patterns/tree/interface.d.ts.map +0 -1
@@ -1,95 +1,104 @@
1
- import { jsx as o, jsxs as u, Fragment as W } from "react/jsx-runtime";
2
- import { forwardRef as F, useContext as v, createContext as G, useState as N, isValidElement as O, useRef as L, useEffect as M, Children as q, cloneElement as I } from "react";
3
- import { Table as k, useTableOptions as x, Cell as T, TableBody as J, Column as z, Group as Q, TableHeader as X, Collection as A, Row as B } from "react-aria-components";
4
- import { cn as d } from "../../utils/cn.js";
1
+ import { jsx as o, jsxs as x, Fragment as V } from "react/jsx-runtime";
2
+ import { forwardRef as W, useContext as g, createContext as F, useState as T, isValidElement as A, useRef as G, useEffect as L, Children as M, cloneElement as I } from "react";
3
+ import { Table as B, useTableOptions as C, Cell as S, TableBody as J, Column as z, Group as Q, TableHeader as X, Collection as P, Row as O } from "react-aria-components";
4
+ import { cn as c } from "../../utils/cn.js";
5
5
  import { Badge as Y } from "../../primitives/badge/badge.js";
6
- import { Icon as S } from "../../primitives/icon/icon.js";
7
- import { Checkbox as P } from "../../primitives/checkbox/checkbox.js";
8
- const y = G({
6
+ import { Icon as w } from "../../primitives/icon/icon.js";
7
+ import { Checkbox as D } from "../../primitives/checkbox/checkbox.js";
8
+ const b = F({
9
9
  size: "md",
10
10
  expandedRows: /* @__PURE__ */ new Set(),
11
11
  toggleRow: () => {
12
12
  }
13
- }), D = F(
14
- ({ children: s, className: l, size: n = "md", ...c }, e) => {
15
- const a = L(null), [i, f] = N(!1), [h, t] = N(/* @__PURE__ */ new Set());
16
- M(() => {
17
- const r = a.current;
18
- if (!r) return;
19
- const p = () => {
20
- const { scrollWidth: R, clientWidth: C } = r;
21
- f(R > C);
13
+ }), E = W(
14
+ ({ children: r, className: n, size: i = "md", ...d }, e) => {
15
+ const s = G(null), [a, f] = T(!1), [p, l] = T(/* @__PURE__ */ new Set());
16
+ L(() => {
17
+ const t = s.current;
18
+ if (!t) return;
19
+ const u = () => {
20
+ const { scrollWidth: R, clientWidth: N } = t;
21
+ f(R > N);
22
22
  };
23
- p();
24
- const m = new ResizeObserver(p);
25
- return m.observe(r), () => {
26
- m.disconnect();
23
+ u();
24
+ const h = new ResizeObserver(u);
25
+ return h.observe(t), () => {
26
+ h.disconnect();
27
27
  };
28
28
  }, []);
29
- const b = (r) => {
30
- t((p) => {
31
- const m = new Set(p);
32
- return m.has(r) ? m.delete(r) : m.add(r), m;
29
+ const m = (t) => {
30
+ l((u) => {
31
+ const h = new Set(u);
32
+ return h.has(t) ? h.delete(t) : h.add(t), h;
33
33
  });
34
34
  };
35
- return /* @__PURE__ */ o(y.Provider, { value: { size: n, hasOverflow: i, expandedRows: h, toggleRow: b }, children: /* @__PURE__ */ o(
35
+ return /* @__PURE__ */ o(b.Provider, { value: { size: i, hasOverflow: a, expandedRows: p, toggleRow: m }, children: /* @__PURE__ */ o(
36
36
  "div",
37
37
  {
38
- ref: (r) => {
39
- a.current = r, typeof e == "function" ? e(r) : e && (e.current = r);
38
+ ref: (t) => {
39
+ s.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
40
40
  },
41
- ...c,
42
- className: d("overflow-hidden rounded-lg bg-primary", l),
43
- children: s
41
+ ...d,
42
+ className: c("overflow-hidden rounded-lg bg-primary", n),
43
+ children: r
44
44
  }
45
45
  ) });
46
46
  }
47
47
  );
48
- D.displayName = "TableCardRoot";
49
- const E = ({ title: s, badge: l, description: n, contentTrailing: c, className: e }) => {
50
- const { size: a } = v(y);
51
- return /* @__PURE__ */ u(
48
+ E.displayName = "TableCardRoot";
49
+ const _ = ({ title: r, badge: n, description: i, contentTrailing: d, className: e }) => {
50
+ const { size: s } = g(b);
51
+ return /* @__PURE__ */ x(
52
52
  "div",
53
53
  {
54
- className: d(
55
- "relative flex flex-col items-start gap-4 border-b border-border-secondary bg-primary px-4 md:flex-row",
56
- a === "sm" ? "py-2 md:px-4" : "py-3 md:px-6",
54
+ className: c(
55
+ "relative flex flex-col items-start gap-4 border-b border-tertiary bg-primary px-4 md:flex-row",
56
+ s === "sm" ? "py-2 md:px-4" : s === "xs" ? "py-0 md:px-3" : "py-3 md:px-6",
57
57
  e
58
58
  ),
59
59
  children: [
60
- /* @__PURE__ */ u("div", { className: "flex flex-1 flex-col gap-0.5", children: [
61
- /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
62
- /* @__PURE__ */ o("h2", { className: d("font-semibold text-primary", a === "sm" ? "text-md" : "text-lg"), children: s }),
63
- l ? O(l) ? l : /* @__PURE__ */ o(Y, { variant: "primary", size: "sm", children: l }) : null
60
+ /* @__PURE__ */ x("div", { className: "flex flex-1 flex-col gap-0.5", children: [
61
+ /* @__PURE__ */ x("div", { className: "flex items-center gap-2", children: [
62
+ /* @__PURE__ */ o(
63
+ "h2",
64
+ {
65
+ className: c(
66
+ "font-semibold text-primary",
67
+ s === "sm" ? "text-md" : s === "xs" ? "text-sm" : "text-lg"
68
+ ),
69
+ children: r
70
+ }
71
+ ),
72
+ n ? A(n) ? n : /* @__PURE__ */ o(Y, { color: "brand", size: "sm", children: n }) : null
64
73
  ] }),
65
- n && /* @__PURE__ */ o("p", { className: "text-sm text-tertiary", children: n })
74
+ i && /* @__PURE__ */ o("p", { className: c("text-tertiary", s === "xs" ? "text-xs" : "text-sm"), children: i })
66
75
  ] }),
67
- c
76
+ d
68
77
  ]
69
78
  }
70
79
  );
71
80
  };
72
- E.displayName = "TableCardHeader";
73
- const j = ({ className: s, size: l = "md", isEditable: n = !1, ...c }) => {
74
- const e = v(y), [a, i] = N(/* @__PURE__ */ new Set()), f = (e == null ? void 0 : e.expandedRows) ?? a, h = (e == null ? void 0 : e.toggleRow) ?? ((t) => {
75
- i((b) => {
76
- const r = new Set(b);
77
- return r.has(t) ? r.delete(t) : r.add(t), r;
81
+ _.displayName = "TableCardHeader";
82
+ const j = ({ className: r, size: n = "md", isEditable: i = !1, ...d }) => {
83
+ const e = g(b), [s, a] = T(/* @__PURE__ */ new Set()), f = (e == null ? void 0 : e.expandedRows) ?? s, p = (e == null ? void 0 : e.toggleRow) ?? ((l) => {
84
+ a((m) => {
85
+ const t = new Set(m);
86
+ return t.has(l) ? t.delete(l) : t.add(l), t;
78
87
  });
79
88
  });
80
89
  return /* @__PURE__ */ o(
81
- y.Provider,
90
+ b.Provider,
82
91
  {
83
92
  value: {
84
- size: (e == null ? void 0 : e.size) ?? l,
93
+ size: (e == null ? void 0 : e.size) ?? n,
85
94
  hasOverflow: e == null ? void 0 : e.hasOverflow,
86
95
  expandedRows: f,
87
- toggleRow: h
96
+ toggleRow: p
88
97
  },
89
- children: n ? /* @__PURE__ */ o(
98
+ children: i ? /* @__PURE__ */ o(
90
99
  "div",
91
100
  {
92
- onKeyDownCapture: (t) => {
101
+ onKeyDownCapture: (l) => {
93
102
  if ((/* @__PURE__ */ new Set([
94
103
  "ArrowLeft",
95
104
  "ArrowRight",
@@ -101,219 +110,232 @@ const j = ({ className: s, size: l = "md", isEditable: n = !1, ...c }) => {
101
110
  "PageDown",
102
111
  " "
103
112
  // space
104
- ])).has(t.key)) {
105
- const r = t.target;
106
- r && (r.closest('[contenteditable]:not([contenteditable="false"])') || r.closest("input, textarea") || r.closest('[role="textbox"]')) && t.stopPropagation();
113
+ ])).has(l.key)) {
114
+ const t = l.target;
115
+ t && (t.closest('[contenteditable]:not([contenteditable="false"])') || t.closest("input, textarea") || t.closest('[role="textbox"]')) && l.stopPropagation();
107
116
  }
108
117
  },
109
118
  children: /* @__PURE__ */ o(
110
- k,
119
+ B,
111
120
  {
112
- className: (t) => d("w-full overflow-x-hidden", typeof s == "function" ? s(t) : s),
113
- ...c
121
+ className: (l) => c(
122
+ "w-full overflow-x-hidden",
123
+ n === "xs" && "px-3 py-0",
124
+ typeof r == "function" ? r(l) : r
125
+ ),
126
+ ...d
114
127
  }
115
128
  )
116
129
  }
117
130
  ) : /* @__PURE__ */ o(
118
- k,
131
+ B,
119
132
  {
120
- className: (t) => d("w-full overflow-x-hidden", typeof s == "function" ? s(t) : s),
121
- ...c
133
+ className: (l) => c(
134
+ "w-full overflow-x-hidden",
135
+ n === "xs" && "px-3 py-0",
136
+ typeof r == "function" ? r(l) : r
137
+ ),
138
+ ...d
122
139
  }
123
140
  )
124
141
  }
125
142
  );
126
143
  };
127
144
  j.displayName = "Table";
128
- const K = ({
129
- columns: s,
130
- children: l,
131
- bordered: n = !1,
132
- hasExpandableRows: c = !1,
145
+ const q = ({
146
+ columns: r,
147
+ children: n,
148
+ bordered: i = !1,
149
+ hasExpandableRows: d = !1,
133
150
  className: e,
134
- ...a
151
+ ...s
135
152
  }) => {
136
- const { size: i } = v(y), { selectionBehavior: f, selectionMode: h } = x();
137
- return /* @__PURE__ */ u(
153
+ const { size: a } = g(b), { selectionBehavior: f, selectionMode: p } = C();
154
+ return /* @__PURE__ */ x(
138
155
  X,
139
156
  {
140
- ...a,
141
- className: (t) => d(
157
+ ...s,
158
+ className: (l) => c(
142
159
  "sticky top-0 z-30 bg-secondary_subtle rounded-lg h-9",
143
160
  // Row border—using an "after" pseudo-element to avoid the border taking up space.
144
- n && "[&>tr>th]:after:pointer-events-none [&>tr>th]:after:absolute [&>tr>th]:after:inset-x-0 [&>tr>th]:after:bottom-0 [&>tr>th]:after:h-px [&>tr>th]:after:bg-border-tertiary [&>tr>th]:focus-visible:after:bg-transparent",
145
- typeof e == "function" ? e(t) : e
161
+ i && "[&>tr>th]:after:pointer-events-none [&>tr>th]:after:absolute [&>tr>th]:after:inset-x-0 [&>tr>th]:after:bottom-0 [&>tr>th]:after:h-px [&>tr>th]:after:bg-border-tertiary [&>tr>th]:focus-visible:after:bg-transparent",
162
+ typeof e == "function" ? e(l) : e
146
163
  ),
147
164
  children: [
148
- c && /* @__PURE__ */ o(z, { className: d("relative p-0", i === "sm" ? "w-9" : "w-11") }),
149
- f === "toggle" && /* @__PURE__ */ o(z, { className: d("relative p-0", i === "sm" ? "w-9" : "w-11"), children: h === "multiple" && /* @__PURE__ */ o("div", { className: "flex items-start", children: /* @__PURE__ */ o(P, { slot: "selection" }) }) }),
150
- /* @__PURE__ */ o(A, { items: s, children: l })
165
+ d && /* @__PURE__ */ o(z, { className: c("relative p-0", a === "sm" || a === "xs" ? "w-9" : "w-11") }),
166
+ f === "toggle" && /* @__PURE__ */ o(z, { className: c("relative p-0", a === "sm" || a === "xs" ? "w-9" : "w-11"), children: p === "multiple" && /* @__PURE__ */ o("div", { className: "flex items-start", children: /* @__PURE__ */ o(D, { slot: "selection" }) }) }),
167
+ /* @__PURE__ */ o(P, { items: r, children: n })
151
168
  ]
152
169
  }
153
170
  );
154
171
  };
155
- K.displayName = "TableHeader";
156
- const $ = ({
157
- className: s,
158
- label: l,
159
- children: n,
160
- sticky: c,
161
- stickyOffset: e = 0,
172
+ q.displayName = "TableHeader";
173
+ const K = ({
174
+ className: r,
175
+ tooltip: n,
176
+ label: i,
177
+ children: d,
178
+ sticky: e,
179
+ stickyOffset: s = 0,
162
180
  headerCellClass: a,
163
- ...i
181
+ tooltipHeader: f = !1,
182
+ ...p
164
183
  }) => {
165
- const { selectionBehavior: f } = x(), { size: h } = v(y);
184
+ const { selectionBehavior: l } = C(), { size: m } = g(b);
166
185
  return /* @__PURE__ */ o(
167
186
  z,
168
187
  {
169
- ...i,
188
+ ...p,
170
189
  style: (t) => {
171
- const b = c ? {
190
+ const u = e ? {
172
191
  position: "sticky",
173
- [c]: e,
192
+ [e]: s,
174
193
  zIndex: 30
175
194
  } : {};
176
- return { ...typeof i.style == "function" ? i.style(t) : i.style || {}, ...b };
195
+ return { ...typeof p.style == "function" ? p.style(t) : p.style || {}, ...u };
177
196
  },
178
- className: (t) => d(
197
+ className: (t) => c(
179
198
  "relative p-0 outline-hidden focus-visible:z-1 focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-bg-primary focus-visible:ring-inset",
180
- h === "sm" && "px-4 py-2",
181
- h === "md" && "px-6 py-2",
182
- f === "toggle" && "nth-2:pl-3",
183
- c && "bg-secondary_subtle",
199
+ m === "xs" && "px-3 py-0",
200
+ m === "sm" && "px-4 py-2",
201
+ m === "md" && "px-6 py-2",
202
+ l === "toggle" && "nth-2:pl-3",
203
+ e && "bg-secondary",
184
204
  t.allowsSorting && "cursor-pointer",
185
- typeof s == "function" ? s(t) : s
205
+ typeof r == "function" ? r(t) : r
186
206
  ),
187
- children: (t) => /* @__PURE__ */ u(Q, { className: d("flex items-center gap-1", a), children: [
188
- /* @__PURE__ */ u("div", { className: "flex items-center gap-1 overflow-hidden", children: [
189
- l && /* @__PURE__ */ o("span", { className: "text-xs font-semibold whitespace-nowrap overflow-hidden text-ellipsis text-secondary", children: l }),
190
- typeof n == "function" ? n(t) : n
207
+ children: (t) => /* @__PURE__ */ x(Q, { className: c("flex items-center gap-1", a), children: [
208
+ /* @__PURE__ */ x("div", { className: "flex items-center gap-1 overflow-hidden", children: [
209
+ i && /* @__PURE__ */ o("span", { className: "text-xs font-medium whitespace-nowrap overflow-hidden text-ellipsis text-secondary", children: i }),
210
+ typeof d == "function" ? d(t) : d
191
211
  ] }),
212
+ n && /* @__PURE__ */ o(w, { name: "HelpCircle", size: 16, className: "text-fg-quaternary" }),
192
213
  t.allowsSorting && (t.sortDirection ? /* @__PURE__ */ o(
193
- S,
214
+ w,
194
215
  {
195
216
  name: "ArrowDown",
196
217
  size: 12,
197
- className: d(
198
- "stroke-[3px] text-secondary",
218
+ className: c(
219
+ "stroke-[3px] text-fg-quaternary",
199
220
  t.sortDirection === "ascending" && "rotate-180"
200
221
  )
201
222
  }
202
- ) : /* @__PURE__ */ o(S, { name: "ChevronSelectorVertical", size: 12, className: "text-secondary" }))
223
+ ) : /* @__PURE__ */ o(w, { name: "ChevronSelectorVertical", size: 12, className: "text-fg-quaternary" }))
203
224
  ] })
204
225
  }
205
226
  );
206
227
  };
207
- $.displayName = "TableHead";
208
- const U = ({
209
- columns: s,
210
- children: l,
211
- className: n,
212
- highlightSelectedRow: c = !0,
228
+ K.displayName = "TableHead";
229
+ const $ = ({
230
+ columns: r,
231
+ children: n,
232
+ className: i,
233
+ highlightSelectedRow: d = !0,
213
234
  isExpandable: e = !1,
214
- renderExpandedContent: a,
215
- ...i
235
+ renderExpandedContent: s,
236
+ ...a
216
237
  }) => {
217
- const { size: f, expandedRows: h, toggleRow: t } = v(y), { selectionBehavior: b } = x(), r = typeof i.id == "string" ? i.id : String(i.id), p = h.has(r), R = e ? /* @__PURE__ */ o(
238
+ const { size: f, expandedRows: p, toggleRow: l } = g(b), { selectionBehavior: m } = C(), t = typeof a.id == "string" ? a.id : String(a.id), u = p.has(t), R = e ? /* @__PURE__ */ o(
218
239
  "button",
219
240
  {
220
241
  type: "button",
221
- onClick: (g) => {
222
- g.stopPropagation(), t(r);
242
+ onClick: (y) => {
243
+ y.stopPropagation(), l(t);
223
244
  },
224
- className: d(
245
+ className: c(
225
246
  "flex items-center justify-center transition-transform duration-200 ease-in-out cursor-pointer hover:bg-secondary_subtle rounded p-1 flex-shrink-0 -ml-1 mr-2",
226
- p && "rotate-90"
247
+ u && "rotate-90"
227
248
  ),
228
- "aria-label": p ? "Collapse row" : "Expand row",
229
- children: /* @__PURE__ */ o(S, { name: "ChevronRight", size: 16, className: "text-secondary" })
249
+ "aria-label": u ? "Collapse row" : "Expand row",
250
+ children: /* @__PURE__ */ o(w, { name: "ChevronRight", size: 16, className: "text-secondary" })
230
251
  }
231
- ) : null, C = e ? (() => {
232
- const g = q.toArray(l);
233
- if (g.length > 0 && O(g[0])) {
234
- const H = g[0], _ = H.props;
252
+ ) : null, N = e ? (() => {
253
+ const y = M.toArray(n);
254
+ if (y.length > 0 && A(y[0])) {
255
+ const H = y[0], k = H.props;
235
256
  return [
236
257
  I(H, {
237
- ..._,
238
- children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
258
+ ...k,
259
+ children: /* @__PURE__ */ x("div", { className: "flex items-center gap-2", children: [
239
260
  R,
240
- _.children
261
+ k.children
241
262
  ] })
242
263
  }),
243
- ...g.slice(1)
264
+ ...y.slice(1)
244
265
  ];
245
266
  }
246
- return l;
247
- })() : l;
248
- return /* @__PURE__ */ u(W, { children: [
249
- /* @__PURE__ */ u(
250
- B,
267
+ return n;
268
+ })() : n;
269
+ return /* @__PURE__ */ x(V, { children: [
270
+ /* @__PURE__ */ x(
271
+ O,
251
272
  {
252
- ...i,
253
- className: (g) => d(
273
+ ...a,
274
+ className: (y) => c(
254
275
  "relative outline-focus-ring transition-colors after:pointer-events-none hover:bg-secondary_subtle focus-visible:outline-2 focus-visible:-outline-offset-2",
255
- f === "sm" ? "h-12" : "h-18",
256
- c && "selected:bg-secondary",
276
+ f === "xs" ? "h-10" : f === "sm" ? "h-12" : f === "md" ? "h-18" : "h-10",
277
+ d && "selected:bg-secondary",
257
278
  // Row border—using an "after" pseudo-element to avoid the border taking up space.
258
- !p && "[&>td]:after:absolute [&>td]:after:inset-x-0 [&>td]:after:bottom-0 [&>td]:after:h-px [&>td]:after:w-full [&>td]:after:bg-border-tertiary last:[&>td]:after:hidden [&>td]:focus-visible:after:opacity-0 focus-visible:[&>td]:after:opacity-0",
259
- typeof n == "function" ? n(g) : n
279
+ !u && "[&>td]:after:absolute [&>td]:after:inset-x-0 [&>td]:after:bottom-0 [&>td]:after:h-px [&>td]:after:w-full [&>td]:after:bg-border-tertiary last:[&>td]:after:hidden [&>td]:focus-visible:after:opacity-0 focus-visible:[&>td]:after:opacity-0",
280
+ typeof i == "function" ? i(y) : i
260
281
  ),
261
282
  children: [
262
- b === "toggle" && /* @__PURE__ */ o(T, { className: d("relative p-0", f === "sm" ? "w-9" : "w-11"), children: /* @__PURE__ */ o("div", { className: "flex items-end", children: /* @__PURE__ */ o(P, { className: "hidden", slot: "selection" }) }) }),
263
- /* @__PURE__ */ o(A, { items: s, children: C })
283
+ m === "toggle" && /* @__PURE__ */ o(S, { className: c("relative p-0", f === "sm" || f === "xs" ? "w-9" : "w-11"), children: /* @__PURE__ */ o("div", { className: "flex items-end", children: /* @__PURE__ */ o(D, { className: "hidden", slot: "selection" }) }) }),
284
+ /* @__PURE__ */ o(P, { items: r, children: N })
264
285
  ]
265
286
  }
266
287
  ),
267
- e && p && a && /* @__PURE__ */ o(B, { id: `${r}-expanded`, className: "relative bg-secondary_hover", children: /* @__PURE__ */ o(
268
- T,
288
+ e && u && s && /* @__PURE__ */ o(O, { id: `${t}-expanded`, className: "relative bg-secondary_subtle", children: /* @__PURE__ */ o(
289
+ S,
269
290
  {
270
291
  className: "p-0",
271
- colSpan: (s == null ? void 0 : s.length) || 0,
272
- children: /* @__PURE__ */ o("div", { className: d("w-full"), children: a(i.value) })
292
+ colSpan: (r == null ? void 0 : r.length) || 0,
293
+ children: /* @__PURE__ */ o("div", { className: c("w-full"), children: s(a.value) })
273
294
  }
274
295
  ) })
275
296
  ] });
276
297
  };
277
- U.displayName = "TableRow";
278
- const V = ({ className: s, children: l, sticky: n, stickyOffset: c = 0, ...e }) => {
279
- const { size: a } = v(y), { selectionBehavior: i } = x();
298
+ $.displayName = "TableRow";
299
+ const U = ({ className: r, children: n, sticky: i, stickyOffset: d = 0, ...e }) => {
300
+ const { size: s } = g(b), { selectionBehavior: a } = C();
280
301
  return /* @__PURE__ */ o(
281
- T,
302
+ S,
282
303
  {
283
304
  ...e,
284
305
  style: (f) => {
285
- const h = n ? {
306
+ const p = i ? {
286
307
  position: "sticky",
287
- [n]: c,
288
- zIndex: 20
308
+ [i]: d,
309
+ zIndex: 20,
310
+ backgroundColor: "white",
311
+ boxShadow: i === "right" ? "inset 2px 0 0px 0px var(--color-border-tertiary)" : "inset -2px 0 0px 0px var(--color-border-tertiary)"
289
312
  } : {};
290
- return { ...typeof e.style == "function" ? e.style(f) : e.style || {}, ...h };
313
+ return { ...typeof e.style == "function" ? e.style(f) : e.style || {}, ...p };
291
314
  },
292
- className: (f) => d(
293
- "relative text-sm text-secondary outline-focus-ring focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-2",
294
- a === "sm" && "p-0 px-4 py-2",
295
- a === "md" && "p-0 px-6 py-2",
296
- i === "toggle" && "nth-2:pl-3",
297
- n === "left" && "before:absolute before:top-0 before:right-0 before:h-full before:shadow-[4px_0_8px_2px_rgba(0,0,0,0.15)]",
298
- n === "right" && "z-[2000] bg-white hover:bg-inherit before:absolute before:top-0 before:left-0 before:h-full before:shadow-[-4px_0_8px_2px_rgba(0,0,0,0.15)]",
299
- typeof s == "function" ? s(f) : s
315
+ className: (f) => c(
316
+ "relative text-secondary outline-focus-ring focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-2",
317
+ s === "xs" && "p-0 px-3 py-0 text-xs",
318
+ s === "sm" && "p-0 px-4 py-2 text-sm",
319
+ s === "md" && "p-0 px-6 py-2 text-base",
320
+ a === "toggle" && "nth-2:pl-3",
321
+ typeof r == "function" ? r(f) : r
300
322
  ),
301
- children: l
323
+ children: n
302
324
  }
303
325
  );
304
326
  };
305
- V.displayName = "TableCell";
327
+ U.displayName = "TableCell";
306
328
  const le = {
307
- Root: D,
308
- Header: E
309
- }, w = j;
310
- w.Body = J;
311
- w.Cell = V;
312
- w.Head = $;
313
- w.Header = K;
314
- w.Row = U;
329
+ Root: E,
330
+ Header: _
331
+ }, v = j;
332
+ v.Body = J;
333
+ v.Cell = U;
334
+ v.Head = K;
335
+ v.Header = q;
336
+ v.Row = $;
315
337
  export {
316
- w as Table,
338
+ v as Table,
317
339
  le as TableCard,
318
- V as TableCell
340
+ U as TableCell
319
341
  };
@@ -0,0 +1,2 @@
1
+ export { TreeView, buildTreeViewNodes, type TreeViewNode, type TreeViewProps, type TreeViewBuildConfig } from './tree-view';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,61 @@
1
+ export interface TreeViewNode {
2
+ id: string;
3
+ label: string;
4
+ type: string;
5
+ children: TreeViewNode[];
6
+ metadata?: any;
7
+ isOpen?: boolean;
8
+ [key: string]: any;
9
+ }
10
+ export interface TreeViewProps {
11
+ /** Raw data array. The component converts it internally using `config`. */
12
+ data: Record<string, any>[];
13
+ /** Config that tells the component how to read your raw data. */
14
+ config: TreeViewBuildConfig;
15
+ /** Component to render the content area of each row (icon, label, etc.) */
16
+ CustomNode: React.FC<{
17
+ node: TreeViewNode;
18
+ isSelected: boolean;
19
+ }>;
20
+ /** Called when a parent row (with children) is clicked */
21
+ onNodeClick?: (node: TreeViewNode) => void;
22
+ /** ID of the currently selected node */
23
+ selectedNodeId?: string | null;
24
+ /** Show search input above the tree */
25
+ showSearch?: boolean;
26
+ /** Placeholder text for the search input */
27
+ searchPlaceholder?: string;
28
+ /** Class name(s) for the search wrapper (container around the input) */
29
+ searchClassName?: string;
30
+ /** Class name(s) for the search input element */
31
+ searchInputClassName?: string;
32
+ }
33
+ /**
34
+ * Config for building TreeViewNode[] from arbitrary data.
35
+ * Tells the build function which keys to use for label, children, and where to store the original node data.
36
+ */
37
+ export interface TreeViewBuildConfig {
38
+ /** Key in each source item that holds the node label */
39
+ labelKey: string;
40
+ /** Key in each source item that holds the children array */
41
+ childrenKey: string;
42
+ /** Key on the built node where the original source item is stored (default: "metadata") */
43
+ dataKey?: string;
44
+ /** Key in each source item for type (default: "type") */
45
+ typeKey?: string;
46
+ /** Key in each source item for id; if missing, a path-based id is generated */
47
+ idKey?: string;
48
+ /** Optional max depth to traverse (default: no limit) */
49
+ maxDepth?: number;
50
+ }
51
+ /**
52
+ * Converts any array of items into TreeViewNode[] using the given config.
53
+ * Uses config.labelKey for the label, config.childrenKey for the children array,
54
+ * and stores the original item on each node under config.dataKey (default "metadata").
55
+ */
56
+ export declare function buildTreeViewNodes<T extends Record<string, any>>(data: T[], config: TreeViewBuildConfig, parentPath?: string): TreeViewNode[];
57
+ export declare const TreeView: {
58
+ ({ data, config, CustomNode, onNodeClick, selectedNodeId, showSearch, searchPlaceholder, searchClassName, searchInputClassName, }: TreeViewProps): import("react/jsx-runtime").JSX.Element;
59
+ displayName: string;
60
+ };
61
+ //# sourceMappingURL=tree-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../../src/patterns/tree-view/tree-view.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC1B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IAC5B,iEAAiE;IACjE,MAAM,EAAE,mBAAmB,CAAC;IAC5B,2EAA2E;IAC3E,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAClE,0DAA0D;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,IAAI,EAAE,CAAC,EAAE,EACT,MAAM,EAAE,mBAAmB,EAC3B,UAAU,GAAE,MAAW,GACxB,YAAY,EAAE,CAuChB;AAqBD,eAAO,MAAM,QAAQ;uIAUlB,aAAa;;CAuDf,CAAC"}