@accelint/design-system 0.9.0 → 0.10.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.
Files changed (112) hide show
  1. package/dist/components/aria/index.js.map +1 -1
  2. package/dist/components/button/button.css.js.map +1 -1
  3. package/dist/components/button/index.js.map +1 -1
  4. package/dist/components/checkbox/checkbox.css.js.map +1 -1
  5. package/dist/components/checkbox/index.js.map +1 -1
  6. package/dist/components/chip/chip.css.js.map +1 -1
  7. package/dist/components/chip/index.js.map +1 -1
  8. package/dist/components/collection/index.js.map +1 -1
  9. package/dist/components/combo-box/combo-box.css.js.map +1 -1
  10. package/dist/components/combo-box/index.js.map +1 -1
  11. package/dist/components/date-field/date-field.css.js.map +1 -1
  12. package/dist/components/date-field/index.js.map +1 -1
  13. package/dist/components/date-input/date-input.css.js.map +1 -1
  14. package/dist/components/date-input/index.js +10 -0
  15. package/dist/components/date-input/index.js.map +1 -1
  16. package/dist/components/dialog/dialog.css.js.map +1 -1
  17. package/dist/components/dialog/index.js +3 -3
  18. package/dist/components/dialog/index.js.map +1 -1
  19. package/dist/components/dialog/types.d.ts +1 -1
  20. package/dist/components/drawer/drawer.css.js.map +1 -1
  21. package/dist/components/drawer/index.d.ts +1 -1
  22. package/dist/components/drawer/index.js.map +1 -1
  23. package/dist/components/element/index.js.map +1 -1
  24. package/dist/components/element/types.d.ts +3 -3
  25. package/dist/components/group/group.css.js.map +1 -1
  26. package/dist/components/group/index.js.map +1 -1
  27. package/dist/components/icon/icon.css.js.map +1 -1
  28. package/dist/components/icon/index.js.map +1 -1
  29. package/dist/components/index.d.ts +15 -15
  30. package/dist/components/index.js +6 -6
  31. package/dist/components/input/index.js.map +1 -1
  32. package/dist/components/input/input.css.js.map +1 -1
  33. package/dist/components/menu/index.js +3 -2
  34. package/dist/components/menu/index.js.map +1 -1
  35. package/dist/components/menu/menu.css.js.map +1 -1
  36. package/dist/components/merge-provider/index.js.map +1 -1
  37. package/dist/components/number-field/index.js.map +1 -1
  38. package/dist/components/number-field/number-field.css.js.map +1 -1
  39. package/dist/components/options/index.js +3 -2
  40. package/dist/components/options/index.js.map +1 -1
  41. package/dist/components/options/options.css.js.map +1 -1
  42. package/dist/components/picker/index.js.map +1 -1
  43. package/dist/components/picker/picker.css.js.map +1 -1
  44. package/dist/components/picker/picker.stories.css.js.map +1 -1
  45. package/dist/components/popover/index.js +3 -3
  46. package/dist/components/popover/index.js.map +1 -1
  47. package/dist/components/popover/popover.css.js.map +1 -1
  48. package/dist/components/popover/types.d.ts +1 -1
  49. package/dist/components/query-builder/action-element.js.map +1 -1
  50. package/dist/components/query-builder/constants.js.map +1 -1
  51. package/dist/components/query-builder/dataset-sample.js.map +1 -1
  52. package/dist/components/query-builder/group.js.map +1 -1
  53. package/dist/components/query-builder/index.js.map +1 -1
  54. package/dist/components/query-builder/query-builder.css.js.map +1 -1
  55. package/dist/components/query-builder/rule.js.map +1 -1
  56. package/dist/components/query-builder/utils.js.map +1 -1
  57. package/dist/components/query-builder/value-editor.js.map +1 -1
  58. package/dist/components/query-builder/value-selector.js.map +1 -1
  59. package/dist/components/radio/index.js.map +1 -1
  60. package/dist/components/radio/radio.css.js.map +1 -1
  61. package/dist/components/search-field/index.js.map +1 -1
  62. package/dist/components/search-field/search-field.css.js.map +1 -1
  63. package/dist/components/select/index.js.map +1 -1
  64. package/dist/components/select/select.css.js.map +1 -1
  65. package/dist/components/slider/index.d.ts +1 -1
  66. package/dist/components/slider/index.js +3 -0
  67. package/dist/components/slider/index.js.map +1 -1
  68. package/dist/components/slider/slider.css.js.map +1 -1
  69. package/dist/components/slider/types.d.ts +1 -1
  70. package/dist/components/switch/index.js.map +1 -1
  71. package/dist/components/switch/switch.css.js.map +1 -1
  72. package/dist/components/tabs/index.js.map +1 -1
  73. package/dist/components/tabs/tabs.css.js.map +1 -1
  74. package/dist/components/text-field/index.js.map +1 -1
  75. package/dist/components/text-field/text-field.css.js.map +1 -1
  76. package/dist/components/textarea/index.js.map +1 -1
  77. package/dist/components/textarea/textarea.css.js.map +1 -1
  78. package/dist/components/time-field/index.js.map +1 -1
  79. package/dist/components/time-field/time-field.css.js.map +1 -1
  80. package/dist/components/tooltip/index.js.map +1 -1
  81. package/dist/components/tooltip/tooltip.css.js.map +1 -1
  82. package/dist/components/tree/index.js.map +1 -1
  83. package/dist/components/tree/tree.css.js.map +1 -1
  84. package/dist/components/tree/utils.js.map +1 -1
  85. package/dist/hooks/index.d.ts +8 -8
  86. package/dist/hooks/use-collection-render/index.js.map +1 -1
  87. package/dist/hooks/use-context-props/index.js.map +1 -1
  88. package/dist/hooks/use-defaults/index.d.ts +4 -4
  89. package/dist/hooks/use-defaults/index.js.map +1 -1
  90. package/dist/hooks/use-propagating-press/index.js.map +1 -1
  91. package/dist/hooks/use-slot/index.js.map +1 -1
  92. package/dist/hooks/use-theme/index.js.map +1 -1
  93. package/dist/hooks/use-theme/use-theme.css.js.map +1 -1
  94. package/dist/hooks/use-tree/index.js +3 -0
  95. package/dist/hooks/use-tree/index.js.map +1 -1
  96. package/dist/hooks/use-tree/utils.js.map +1 -1
  97. package/dist/hooks/use-update-effect/index.js.map +1 -1
  98. package/dist/index.d.ts +15 -15
  99. package/dist/index.js +1 -1
  100. package/dist/ladle/actions.js.map +1 -1
  101. package/dist/styles/layers.css.js.map +1 -1
  102. package/dist/styles/surfaces.css.js.map +1 -1
  103. package/dist/styles/theme.css.js.map +1 -1
  104. package/dist/styles/typography.css.js.map +1 -1
  105. package/dist/test/setup.js +7 -7
  106. package/dist/test/setup.js.map +1 -1
  107. package/dist/types/use-tree.d.ts +1 -1
  108. package/dist/utils/css/index.js.map +1 -1
  109. package/dist/utils/events/index.js.map +1 -1
  110. package/dist/utils/props/index.js.map +1 -1
  111. package/dist/utils/validators/index.js.map +1 -1
  112. package/package.json +23 -23
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/textarea/index.tsx"],"names":["TextArea","RACTextAreaContext"],"mappings":";;;;;;;;;;;;;;;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ensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useFocusRing } from '@react-aria/focus';\nimport { useHover } from '@react-aria/interactions';\nimport { useControlledState } from '@react-stately/utils';\nimport {\n type FormEvent,\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n TextAreaContext as RACTextAreaContext,\n type TextAreaProps as RACTextAreaProps,\n} from 'react-aria-components';\nimport { useContextProps } from '../../hooks/use-context-props';\nimport { useDefaultProps } from '../../hooks/use-defaults';\nimport { useTheme } from '../../hooks/use-theme';\nimport { inputs } from '../../styles/typography.css';\nimport { inlineVars } from '../../utils/css';\nimport { mergeClassNames, mergeProps } from '../../utils/props';\nimport { textAreaClassNames, textAreaStateVars } from './textarea.css';\nimport type { TextAreaMapping, TextAreaProps } from './types';\n\nconst defaultMapping: TextAreaMapping = {\n font: inputs,\n};\n\nexport const TextAreaContext =\n createContext<ContextValue<TextAreaProps, HTMLTextAreaElement>>(null);\n\n/**\n * We implement a textarea as a content editable span to provide\n * improved UX, where the input area automatically grows with input\n * content length. This can be overriden by applying max-height\n * and overflow CSS, if desired.\n *\n * This also has the side effect of changing the target element in\n * the ref and event handlers. The normal `event.target.value` is not\n * available, and must be substituted with `event.currentTarget.textContent`\n */\nexport const TextArea = forwardRef(function TextArea(\n props: TextAreaProps,\n ref: ForwardedRef<HTMLTextAreaElement>,\n) {\n [props, ref] = useContextProps(props, ref, RACTextAreaContext);\n\n // Disallow props possibly provided by React Aria context\n // could be render props functions we don't want to support\n (props as RACTextAreaProps).className = undefined;\n (props as RACTextAreaProps).style = undefined;\n\n // Duplicate context prop merging to support React Aria's context\n // and our own which establishes a superset type for the props\n [props, ref] = useContextProps(props, ref, TextAreaContext);\n props = useDefaultProps(props, 'TextArea');\n\n const {\n classNames: classNamesProp,\n defaultValue = '',\n disabled: isDisabled = false,\n mapping: mappingProp,\n placeholder,\n readOnly: isReadOnly = false,\n required: isRequired = false,\n resize = 'none',\n size = 'lg',\n value: valueProp,\n onChange,\n onHoverStart,\n onHoverChange,\n onHoverEnd,\n 'aria-invalid': ariaInvalid,\n ...rest\n } = props;\n\n const [value, setValue] = useControlledState(valueProp, defaultValue);\n const isInvalid = !!ariaInvalid && ariaInvalid !== 'false';\n const isPlaceholder = !!placeholder && !value;\n const isEmpty = !value;\n\n const { isFocused, isFocusVisible, focusProps } = useFocusRing({\n autoFocus: props.autoFocus,\n isTextInput: true,\n });\n\n const { hoverProps, isHovered } = useHover({\n isDisabled,\n onHoverStart,\n onHoverChange,\n onHoverEnd,\n });\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(textAreaClassNames, theme.TextArea, classNamesProp, {\n textarea: mapping.font[size],\n }),\n [theme.TextArea, classNamesProp, mapping.font, size],\n );\n\n const mergedProps = useMemo(\n () => mergeProps(rest, focusProps, hoverProps),\n [focusProps, hoverProps, rest],\n );\n\n const style = useMemo(\n () =>\n inlineVars(textAreaStateVars, {\n resize,\n size,\n isDisabled,\n isEmpty,\n isFocused,\n isFocusVisible,\n isHovered,\n isInvalid,\n isPlaceholder,\n isReadOnly,\n isRequired,\n }),\n [\n resize,\n size,\n isDisabled,\n isEmpty,\n isFocused,\n isFocusVisible,\n isHovered,\n isInvalid,\n isPlaceholder,\n isReadOnly,\n isRequired,\n ],\n );\n\n const handleChange = useCallback(\n (event: FormEvent<HTMLSpanElement>) => {\n onChange?.(event);\n\n if (!event.defaultPrevented) {\n setValue(event.currentTarget.textContent ?? '');\n }\n },\n [onChange, setValue],\n );\n\n /**\n * In order to provide the UX of an \"input\" that auto grows in height\n * thats driven by content, we implement a content-editable span instead\n * of a textarea. However, this has the side effect that it must be\n * updated as an \"uncontrolled\" element, otherwise the cursor resets\n * to the beginning of the input area after every keystroke if the value\n * is passed in as \"children\"\n */\n useEffect(() => {\n if (typeof ref !== 'function' && ref?.current) {\n ref.current.textContent = `${value ?? ''}`;\n }\n }, [ref, value]);\n\n return (\n <div className={classNames?.container} style={style}>\n {/* biome-ignore lint/a11y/useFocusableInteractive: TODO: refactor */}\n <span\n {...mergedProps}\n {...hoverProps}\n ref={ref}\n className={classNames?.textarea}\n contentEditable={!(isDisabled || isReadOnly)}\n role='textbox'\n suppressContentEditableWarning\n onInput={handleChange}\n aria-invalid={ariaInvalid}\n data-placeholder={placeholder}\n />\n </div>\n );\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/textarea/index.tsx"],"names":["TextArea","RACTextAreaContext"],"mappings":";;;;;;;;;;;;;;;AAsCA,IAAM,cAAA,GAAkC;AAAA,EACtC,IAAA,EAAM;AACR,CAAA;AAEO,IAAM,eAAA,GACX,cAAgE,IAAI;AAY/D,IAAM,QAAA,GAAW,UAAA,CAAW,SAASA,SAAAA,CAC1C,OACA,GAAA,EACA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAA,CAAgB,KAAA,EAAO,KAAKC,iBAAkB,CAAA;AAI7D,EAAC,MAA2B,SAAA,GAAY,MAAA;AACxC,EAAC,MAA2B,KAAA,GAAQ,MAAA;AAIpC,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAA,CAAgB,KAAA,EAAO,KAAK,eAAe,CAAA;AAC1D,EAAA,KAAA,GAAQ,eAAA,CAAgB,OAAO,UAAU,CAAA;AAEzC,EAAA,MAAM;AAAA,IACJ,UAAA,EAAY,cAAA;AAAA,IACZ,YAAA,GAAe,EAAA;AAAA,IACf,UAAU,UAAA,GAAa,KAAA;AAAA,IACvB,OAAA,EAAS,WAAA;AA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C,GACF,EAAG,CAAC,GAAA,EAAK,KAAK,CAAC,CAAA;AAEf,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,EAAY,WAAW,KAAA,EAErC,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACE,GAAG,WAAA;AAAA,MACH,GAAG,UAAA;AAAA,MACJ,GAAA;AAAA,MACA,WAAW,UAAA,EAAY,QAAA;AAAA,MACvB,eAAA,EAAiB,EAAE,UAAA,IAAc,UAAA,CAAA;AAAA,MACjC,IAAA,EAAK,SAAA;AAAA,MACL,8BAAA,EAA8B,IAAA;AAAA,MAC9B,OAAA,EAAS,YAAA;AAAA,MACT,cAAA,EAAc,WAAA;AAAA,MACd,kBAAA,EAAkB;AAAA;AAAA,GACpB,EACF,CAAA;AAEJ,CAAC","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useFocusRing } from '@react-aria/focus';\nimport { useHover } from '@react-aria/interactions';\nimport { useControlledState } from '@react-stately/utils';\nimport {\n type FormEvent,\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n TextAreaContext as RACTextAreaContext,\n type TextAreaProps as RACTextAreaProps,\n} from 'react-aria-components';\nimport { useContextProps } from '../../hooks/use-context-props';\nimport { useDefaultProps } from '../../hooks/use-defaults';\nimport { useTheme } from '../../hooks/use-theme';\nimport { inputs } from '../../styles/typography.css';\nimport { inlineVars } from '../../utils/css';\nimport { mergeClassNames, mergeProps } from '../../utils/props';\nimport { textAreaClassNames, textAreaStateVars } from './textarea.css';\nimport type { TextAreaMapping, TextAreaProps } from './types';\n\nconst defaultMapping: TextAreaMapping = {\n font: inputs,\n};\n\nexport const TextAreaContext =\n createContext<ContextValue<TextAreaProps, HTMLTextAreaElement>>(null);\n\n/**\n * We implement a textarea as a content editable span to provide\n * improved UX, where the input area automatically grows with input\n * content length. This can be overriden by applying max-height\n * and overflow CSS, if desired.\n *\n * This also has the side effect of changing the target element in\n * the ref and event handlers. The normal `event.target.value` is not\n * available, and must be substituted with `event.currentTarget.textContent`\n */\nexport const TextArea = forwardRef(function TextArea(\n props: TextAreaProps,\n ref: ForwardedRef<HTMLTextAreaElement>,\n) {\n [props, ref] = useContextProps(props, ref, RACTextAreaContext);\n\n // Disallow props possibly provided by React Aria context\n // could be render props functions we don't want to support\n (props as RACTextAreaProps).className = undefined;\n (props as RACTextAreaProps).style = undefined;\n\n // Duplicate context prop merging to support React Aria's context\n // and our own which establishes a superset type for the props\n [props, ref] = useContextProps(props, ref, TextAreaContext);\n props = useDefaultProps(props, 'TextArea');\n\n const {\n classNames: classNamesProp,\n defaultValue = '',\n disabled: isDisabled = false,\n mapping: mappingProp,\n placeholder,\n readOnly: isReadOnly = false,\n required: isRequired = false,\n resize = 'none',\n size = 'lg',\n value: valueProp,\n onChange,\n onHoverStart,\n onHoverChange,\n onHoverEnd,\n 'aria-invalid': ariaInvalid,\n ...rest\n } = props;\n\n const [value, setValue] = useControlledState(valueProp, defaultValue);\n const isInvalid = !!ariaInvalid && ariaInvalid !== 'false';\n const isPlaceholder = !!placeholder && !value;\n const isEmpty = !value;\n\n const { isFocused, isFocusVisible, focusProps } = useFocusRing({\n autoFocus: props.autoFocus,\n isTextInput: true,\n });\n\n const { hoverProps, isHovered } = useHover({\n isDisabled,\n onHoverStart,\n onHoverChange,\n onHoverEnd,\n });\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(textAreaClassNames, theme.TextArea, classNamesProp, {\n textarea: mapping.font[size],\n }),\n [theme.TextArea, classNamesProp, mapping.font, size],\n );\n\n const mergedProps = useMemo(\n () => mergeProps(rest, focusProps, hoverProps),\n [focusProps, hoverProps, rest],\n );\n\n const style = useMemo(\n () =>\n inlineVars(textAreaStateVars, {\n resize,\n size,\n isDisabled,\n isEmpty,\n isFocused,\n isFocusVisible,\n isHovered,\n isInvalid,\n isPlaceholder,\n isReadOnly,\n isRequired,\n }),\n [\n resize,\n size,\n isDisabled,\n isEmpty,\n isFocused,\n isFocusVisible,\n isHovered,\n isInvalid,\n isPlaceholder,\n isReadOnly,\n isRequired,\n ],\n );\n\n const handleChange = useCallback(\n (event: FormEvent<HTMLSpanElement>) => {\n onChange?.(event);\n\n if (!event.defaultPrevented) {\n setValue(event.currentTarget.textContent ?? '');\n }\n },\n [onChange, setValue],\n );\n\n /**\n * In order to provide the UX of an \"input\" that auto grows in height\n * thats driven by content, we implement a content-editable span instead\n * of a textarea. However, this has the side effect that it must be\n * updated as an \"uncontrolled\" element, otherwise the cursor resets\n * to the beginning of the input area after every keystroke if the value\n * is passed in as \"children\"\n */\n useEffect(() => {\n if (typeof ref !== 'function' && ref?.current) {\n ref.current.textContent = `${value ?? ''}`;\n }\n }, [ref, value]);\n\n return (\n <div className={classNames?.container} style={style}>\n {/* biome-ignore lint/a11y/useFocusableInteractive: TODO: refactor */}\n <span\n {...mergedProps}\n {...hoverProps}\n ref={ref}\n className={classNames?.textarea}\n contentEditable={!(isDisabled || isReadOnly)}\n role='textbox'\n suppressContentEditableWarning\n onInput={handleChange}\n aria-invalid={ariaInvalid}\n data-placeholder={placeholder}\n />\n </div>\n );\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/textarea/textarea.css.ts"],"names":[],"mappings":";;;AAAO,IAAI,kBAAqB,GAAA,EAAC,SAAU,EAAA,iDAAA,EAAkD,UAAS,gDAAgD;AAC/I,IAAI,oBAAoB,EAAC,UAAA,EAAW,+BAA8B,MAAO,EAAA,yBAAA,EAA0B,OAAM,wBAAwB;AACjI,IAAI,iBAAoB,GAAA;AACxB,IAAI,oBAAoB,EAAC,QAAA,EAAS,2BAA4B,EAAA,KAAA,EAAM,0BAAyB,QAAS,EAAA,2BAAA,EAA4B,SAAU,EAAA,4BAAA,EAA6B,QAAO,yBAA0B,EAAA,SAAA,EAAU,8BAA6B,CAAE,EAAA,oBAAA,EAAqB,GAAE,oBAAoB;AAC1R,IAAA,iBAAA,GAAoB,EAAC,MAAO,EAAA,yBAAA,EAA0B,MAAK,uBAAwB,EAAA,UAAA,EAAW,6BAA8B,EAAA,OAAA,EAAQ,0BAA2B,EAAA,SAAA,EAAU,8BAA6B,cAAe,EAAA,iCAAA,EAAkC,SAAU,EAAA,4BAAA,EAA6B,SAAU,EAAA,4BAAA,EAA6B,eAAc,gCAAiC,EAAA,UAAA,EAAW,6BAA8B,EAAA,UAAA,EAAW,6BAA6B","file":"textarea.css.js","sourcesContent":["export var textAreaClassNames = {container:'textarea_textAreaClassNames_container__13oc1ofn',textarea:'textarea_textAreaClassNames_textarea__13oc1ofo'};\nexport var textAreaColorVars = {background:'var(--background__13oc1of1)',border:'var(--border__13oc1of2)',color:'var(--color__13oc1of3)'};\nexport var textAreaContainer = 'textarea_textAreaContainer__13oc1of0';\nexport var textAreaSpaceVars = {minWidth:'var(--minWidth__13oc1of4)',width:'var(--width__13oc1of5)',maxWidth:'var(--maxWidth__13oc1of6)',minHeight:'var(--minHeight__13oc1of7)',height:'var(--height__13oc1of8)',maxHeight:'var(--maxHeight__13oc1of9)',x:'var(--x__13oc1ofa)',y:'var(--y__13oc1ofb)'};\nexport var textAreaStateVars = {resize:'var(--resize__13oc1ofc)',size:'var(--size__13oc1ofd)',isDisabled:'var(--isDisabled__13oc1ofe)',isEmpty:'var(--isEmpty__13oc1off)',isFocused:'var(--isFocused__13oc1ofg)',isFocusVisible:'var(--isFocusVisible__13oc1ofh)',isHovered:'var(--isHovered__13oc1ofi)',isInvalid:'var(--isInvalid__13oc1ofj)',isPlaceholder:'var(--isPlaceholder__13oc1ofk)',isReadOnly:'var(--isReadOnly__13oc1ofl)',isRequired:'var(--isRequired__13oc1ofm)'};"]}
1
+ {"version":3,"sources":["../../../src/components/textarea/textarea.css.ts"],"names":[],"mappings":";;;AAAO,IAAI,kBAAA,GAAqB,EAAC,SAAA,EAAU,iDAAA,EAAkD,UAAS,gDAAA;AAC/F,IAAI,oBAAoB,EAAC,UAAA,EAAW,+BAA8B,MAAA,EAAO,yBAAA,EAA0B,OAAM,wBAAA;AACzG,IAAI,iBAAA,GAAoB;AACxB,IAAI,oBAAoB,EAAC,QAAA,EAAS,2BAAA,EAA4B,KAAA,EAAM,0BAAyB,QAAA,EAAS,2BAAA,EAA4B,SAAA,EAAU,4BAAA,EAA6B,QAAO,yBAAA,EAA0B,SAAA,EAAU,8BAA6B,CAAA,EAAE,oBAAA,EAAqB,GAAE,oBAAA;AAC1Q,IAAI,iBAAA,GAAoB,EAAC,MAAA,EAAO,yBAAA,EAA0B,MAAK,uBAAA,EAAwB,UAAA,EAAW,6BAAA,EAA8B,OAAA,EAAQ,0BAAA,EAA2B,SAAA,EAAU,8BAA6B,cAAA,EAAe,iCAAA,EAAkC,SAAA,EAAU,4BAAA,EAA6B,SAAA,EAAU,4BAAA,EAA6B,eAAc,gCAAA,EAAiC,UAAA,EAAW,6BAAA,EAA8B,UAAA,EAAW,6BAAA","file":"textarea.css.js","sourcesContent":["export var textAreaClassNames = {container:'textarea_textAreaClassNames_container__13oc1ofn',textarea:'textarea_textAreaClassNames_textarea__13oc1ofo'};\nexport var textAreaColorVars = {background:'var(--background__13oc1of1)',border:'var(--border__13oc1of2)',color:'var(--color__13oc1of3)'};\nexport var textAreaContainer = 'textarea_textAreaContainer__13oc1of0';\nexport var textAreaSpaceVars = {minWidth:'var(--minWidth__13oc1of4)',width:'var(--width__13oc1of5)',maxWidth:'var(--maxWidth__13oc1of6)',minHeight:'var(--minHeight__13oc1of7)',height:'var(--height__13oc1of8)',maxHeight:'var(--maxHeight__13oc1of9)',x:'var(--x__13oc1ofa)',y:'var(--y__13oc1ofb)'};\nexport var textAreaStateVars = {resize:'var(--resize__13oc1ofc)',size:'var(--size__13oc1ofd)',isDisabled:'var(--isDisabled__13oc1ofe)',isEmpty:'var(--isEmpty__13oc1off)',isFocused:'var(--isFocused__13oc1ofg)',isFocusVisible:'var(--isFocusVisible__13oc1ofh)',isHovered:'var(--isHovered__13oc1ofi)',isInvalid:'var(--isInvalid__13oc1ofj)',isPlaceholder:'var(--isPlaceholder__13oc1ofk)',isReadOnly:'var(--isReadOnly__13oc1ofl)',isRequired:'var(--isRequired__13oc1ofm)'};"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/time-field/index.tsx"],"names":["TimeField","RACTimeField"],"mappings":";;;;;;;;;;;;AAiDA,IAAM,cAAmC,GAAA;AAAA,EACvC,WAAa,EAAA;AAAA,IACX,IAAI,MAAO,CAAA,EAAA;AAAA,IACX,IAAI,MAAO,CAAA;AAAA,GACb;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAI,MAAO,CAAA,EAAA;AAAA,IACX,IAAI,MAAO,CAAA;AAAA,GACb;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,EAAA,EAAI,EAAE,IAAA,EAAM,IAAK,EAAA;AAAA,IACjB,EAAA,EAAI,EAAE,IAAA,EAAM,IAAK;AAAA;AAErB,CAAA;AAEA,IAAM,WAAc,GAAA,IAAA;AAEP,IAAA,gBAAA,GACX,cAAuE,IAAI;AAEtE,IAAM,SAAY,GAAA,UAAA,CAAW,SAASA,UAAAA,CAC3C,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,gBAAgB,CAAA;AAC3D,EAAQ,KAAA,GAAA,eAAA;AAAA,IACN,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,WAAY;AAAA;AACpD;AACF,OACF;AAAA,MACA,CAAC,qBAAuB,EAAA,EAAE,SAAW,EAAA,UAAA,EAAY,OAAO,CAAA;AAAA,MACxD,CAAC,WAAa,EAAA,EAAE,GAAG,OAAA,CAAQ,IAAK,CAAA,IAAI,CAAG,EAAA,UAAA,EAAY,UAAY,EAAA,IAAA,EAAM;AAAA,KACvE;AAAA,IACA,CAAC,UAAY,EAAA,IAAA,EAAM,OAAO;AAAA,GAC5B;AAEA,EAAA,MAAM,QAAW,GAAA,WAAA;AAAA,IACf,CAAC,WAAsC,KAAA;AACrC,MACE,uBAAA,GAAA,CAAC,YAAS,MACR,EAAA,QAAA,kBAAA,GAAA,CAAC,SAAI,SAAW,EAAA,UAAA,EAAY,SACzB,EAAA,QAAA,EAAA,eAAA,CAAgB,YAAc,EAAA;AAAA,QAC7B,GAAG,WAAA;AAAA,QACH,eAAiB,EAAA;AAAA,OAClB,GACH,CACF,EAAA,CAAA;AAAA,KAEJ;AAAA,IACA,CAAC,YAAc,EAAA,MAAA,EAAQ,UAAU;AAAA,GACnC;AAEA,EACE,uBAAA,GAAA;AAAA,IAACC,WAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MACA,WAAW,UAAY,EAAA,SAAA;AAAA,MACvB,KAAA;AAAA,MACA,KAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ,CAAC","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { TimeValue } from '@react-aria/datepicker';\nimport {\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n type FieldErrorProps,\n LabelContext,\n type LabelProps,\n Provider,\n TimeField as RACTimeField,\n type TextProps,\n} from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { bodies } from '../../styles';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport {\n AriaFieldErrorContext,\n type AriaLabelContext,\n AriaTextContext,\n} from '../aria';\nimport type { DateFieldRenderProps } from '../date-field/types';\nimport { DateInputContext } from '../date-input';\nimport type { DateInputProps } from '../date-input/types';\nimport { IconContext } from '../icon';\nimport type { IconProps } from '../icon/types';\nimport { timeFieldClassNames, timeFieldStateVars } from './time-field.css';\nimport type {\n TimeFieldMapping,\n TimeFieldProps,\n TimeFieldRenderProps,\n} from './types';\n\nconst defaultMapping: TimeFieldMapping = {\n description: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n error: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n icon: {\n sm: { size: 'xs' },\n lg: { size: 'md' },\n },\n};\n\nconst defaultSize = 'lg';\n\nexport const TimeFieldContext =\n createContext<ContextValue<TimeFieldProps<TimeValue>, HTMLDivElement>>(null);\n\nexport const TimeField = forwardRef(function TimeField<T extends TimeValue>(\n props: TimeFieldProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, TimeFieldContext);\n props = useDefaultProps(\n props as TimeFieldProps<TimeValue>,\n 'TimeField',\n ) as TimeFieldProps<T>;\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n mapping: mappingProp,\n size = defaultSize,\n value,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(timeFieldClassNames, theme.TimeField, classNamesProp, {\n description: mapping.description[size],\n error: mapping.error[size],\n }),\n [theme.TimeField, classNamesProp, mapping, size],\n );\n\n const style = useCallback(\n (renderProps: DateFieldRenderProps) =>\n inlineVars(timeFieldStateVars, {\n ...renderProps,\n size,\n }),\n [size],\n );\n\n const values = useMemo<\n [\n [typeof DateInputContext, ContextValue<DateInputProps, HTMLDivElement>],\n [typeof AriaLabelContext, ContextValue<LabelProps, HTMLLabelElement>],\n [typeof AriaTextContext, ContextValue<TextProps, HTMLElement>],\n [\n typeof AriaFieldErrorContext,\n ContextValue<FieldErrorProps, HTMLElement>,\n ],\n [typeof IconContext, ContextValue<IconProps, HTMLDivElement>],\n ]\n >(\n () => [\n [DateInputContext, { classNames: classNames?.input, size }],\n [LabelContext, { className: classNames?.label }],\n [\n AriaTextContext,\n {\n slots: {\n description: { className: classNames?.description },\n },\n },\n ],\n [AriaFieldErrorContext, { className: classNames?.error }],\n [IconContext, { ...mapping.icon[size], classNames: classNames?.icon }],\n ],\n [classNames, size, mapping],\n );\n\n const children = useCallback(\n (renderProps: TimeFieldRenderProps) => {\n return (\n <Provider values={values}>\n <div className={classNames?.timeField}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n defaultChildren: null,\n })}\n </div>\n </Provider>\n );\n },\n [childrenProp, values, classNames],\n );\n\n return (\n <RACTimeField\n {...rest}\n ref={ref}\n className={classNames?.container}\n style={style}\n value={value}\n >\n {children}\n </RACTimeField>\n );\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/time-field/index.tsx"],"names":["TimeField","RACTimeField"],"mappings":";;;;;;;;;;;;AAiDA,IAAM,cAAA,GAAmC;AAAA,EACvC,WAAA,EAAa;AAAA,IACX,IAAI,MAAA,CAAO,EAAA;AAAA,IACX,IAAI,MAAA,CAAO;AAAA,GACb;AAAA,EACA,KAAA,EAAO;AAAA,IACL,IAAI,MAAA,CAAO,EAAA;AAAA,IACX,IAAI,MAAA,CAAO;AAAA,GACb;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,EAAA,EAAI,EAAE,IAAA,E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":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { TimeValue } from '@react-aria/datepicker';\nimport {\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n type FieldErrorProps,\n LabelContext,\n type LabelProps,\n Provider,\n TimeField as RACTimeField,\n type TextProps,\n} from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { bodies } from '../../styles';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport {\n AriaFieldErrorContext,\n type AriaLabelContext,\n AriaTextContext,\n} from '../aria';\nimport type { DateFieldRenderProps } from '../date-field/types';\nimport { DateInputContext } from '../date-input';\nimport type { DateInputProps } from '../date-input/types';\nimport { IconContext } from '../icon';\nimport type { IconProps } from '../icon/types';\nimport { timeFieldClassNames, timeFieldStateVars } from './time-field.css';\nimport type {\n TimeFieldMapping,\n TimeFieldProps,\n TimeFieldRenderProps,\n} from './types';\n\nconst defaultMapping: TimeFieldMapping = {\n description: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n error: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n icon: {\n sm: { size: 'xs' },\n lg: { size: 'md' },\n },\n};\n\nconst defaultSize = 'lg';\n\nexport const TimeFieldContext =\n createContext<ContextValue<TimeFieldProps<TimeValue>, HTMLDivElement>>(null);\n\nexport const TimeField = forwardRef(function TimeField<T extends TimeValue>(\n props: TimeFieldProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, TimeFieldContext);\n props = useDefaultProps(\n props as TimeFieldProps<TimeValue>,\n 'TimeField',\n ) as TimeFieldProps<T>;\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n mapping: mappingProp,\n size = defaultSize,\n value,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(timeFieldClassNames, theme.TimeField, classNamesProp, {\n description: mapping.description[size],\n error: mapping.error[size],\n }),\n [theme.TimeField, classNamesProp, mapping, size],\n );\n\n const style = useCallback(\n (renderProps: DateFieldRenderProps) =>\n inlineVars(timeFieldStateVars, {\n ...renderProps,\n size,\n }),\n [size],\n );\n\n const values = useMemo<\n [\n [typeof DateInputContext, ContextValue<DateInputProps, HTMLDivElement>],\n [typeof AriaLabelContext, ContextValue<LabelProps, HTMLLabelElement>],\n [typeof AriaTextContext, ContextValue<TextProps, HTMLElement>],\n [\n typeof AriaFieldErrorContext,\n ContextValue<FieldErrorProps, HTMLElement>,\n ],\n [typeof IconContext, ContextValue<IconProps, HTMLDivElement>],\n ]\n >(\n () => [\n [DateInputContext, { classNames: classNames?.input, size }],\n [LabelContext, { className: classNames?.label }],\n [\n AriaTextContext,\n {\n slots: {\n description: { className: classNames?.description },\n },\n },\n ],\n [AriaFieldErrorContext, { className: classNames?.error }],\n [IconContext, { ...mapping.icon[size], classNames: classNames?.icon }],\n ],\n [classNames, size, mapping],\n );\n\n const children = useCallback(\n (renderProps: TimeFieldRenderProps) => {\n return (\n <Provider values={values}>\n <div className={classNames?.timeField}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n defaultChildren: null,\n })}\n </div>\n </Provider>\n );\n },\n [childrenProp, values, classNames],\n );\n\n return (\n <RACTimeField\n {...rest}\n ref={ref}\n className={classNames?.container}\n style={style}\n value={value}\n >\n {children}\n </RACTimeField>\n );\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/time-field/time-field.css.ts"],"names":[],"mappings":";;;AAAW,IAAA,mBAAA,GAAsB,EAAC,SAAA,EAAU,mDAAoD,EAAA,SAAA,EAAU,mDAAoD,EAAA,KAAA,EAAM,yEAA0E,EAAA,WAAA,EAAY,qDAAsD,EAAA,KAAA,EAAM,+CAA+C;AAC9V,IAAI,qBAAqB,EAAC,MAAA,EAAO,0BAAyB,WAAY,EAAA,EAAC,OAAM,mCAAmC,EAAA,EAAE,KAAM,EAAA,EAAC,OAAM,6BAA6B,EAAA,EAAE,OAAM,EAAC,KAAA,EAAM,+BAA8B;AACzM,IAAI,kBAAqB,GAAA;AACzB,IAAI,kBAAqB,GAAA,EAAC,CAAE,EAAA,mBAAA,EAAoB,CAAE,EAAA,mBAAA,EAAoB,GAAI,EAAA,qBAAA,EAAsB,QAAS,EAAA,0BAAA,EAA2B,KAAM,EAAA,uBAAA,EAAwB,UAAS,0BAA0B;AACrM,IAAI,kBAAqB,GAAA,EAAC,IAAK,EAAA,sBAAA,EAAuB,YAAW,4BAA6B,EAAA,SAAA,EAAU,2BAA4B,EAAA,SAAA,EAAU,6BAA4B,SAAU,EAAA,2BAAA,EAA4B,UAAW,EAAA,4BAAA,EAA6B,YAAW,4BAA4B","file":"time-field.css.js","sourcesContent":["export var timeFieldClassNames = {container:'time-field_timeFieldClassNames_container__hlv6r3i',timeField:'time-field_timeFieldClassNames_timeField__hlv6r3j',label:'time-field_timeFieldClassNames_label__hlv6r3k typography_label__j8fgabg',description:'time-field_timeFieldClassNames_description__hlv6r3l',error:'time-field_timeFieldClassNames_error__hlv6r3m'};\nexport var timeFieldColorVars = {border:'var(--border__hlv6r37)',description:{color:'var(--description-color__hlv6r38)'},error:{color:'var(--error-color__hlv6r39)'},label:{color:'var(--label-color__hlv6r3a)'}};\nexport var timeFieldContainer = 'time-field_timeFieldContainer__hlv6r30';\nexport var timeFieldSpaceVars = {x:'var(--x__hlv6r31)',y:'var(--y__hlv6r32)',gap:'var(--gap__hlv6r33)',minWidth:'var(--minWidth__hlv6r34)',width:'var(--width__hlv6r35)',maxWidth:'var(--maxWidth__hlv6r36)'};\nexport var timeFieldStateVars = {size:'var(--size__hlv6r3b)',isDisabled:'var(--isDisabled__hlv6r3c)',isFocused:'var(--isFocused__hlv6r3d)',isHovered:'var(--isHovered__hlv6r3e)',isInvalid:'var(--isInvalid__hlv6r3f)',isReadOnly:'var(--isReadOnly__hlv6r3g)',isRequired:'var(--isRequired__hlv6r3h)'};"]}
1
+ {"version":3,"sources":["../../../src/components/time-field/time-field.css.ts"],"names":[],"mappings":";;;AAAO,IAAI,mBAAA,GAAsB,EAAC,SAAA,EAAU,mDAAA,EAAoD,SAAA,EAAU,mDAAA,EAAoD,KAAA,EAAM,yEAAA,EAA0E,WAAA,EAAY,qDAAA,EAAsD,KAAA,EAAM,+CAAA;AAC/S,IAAI,qBAAqB,EAAC,MAAA,EAAO,0BAAyB,WAAA,EAAY,EAAC,OAAM,mCAAA,EAAmC,EAAE,KAAA,EAAM,EAAC,OAAM,6BAAA,EAA6B,EAAE,OAAM,EAAC,KAAA,EAAM,+BAA6B;AACxM,IAAI,kBAAA,GAAqB;AACzB,IAAI,kBAAA,GAAqB,EAAC,CAAA,EAAE,mBAAA,EAAoB,CAAA,EAAE,mBAAA,EAAoB,GAAA,EAAI,qBAAA,EAAsB,QAAA,EAAS,0BAAA,EAA2B,KAAA,EAAM,uBAAA,EAAwB,UAAS,0BAAA;AAC3K,IAAI,kBAAA,GAAqB,EAAC,IAAA,EAAK,sBAAA,EAAuB,YAAW,4BAAA,EAA6B,SAAA,EAAU,2BAAA,EAA4B,SAAA,EAAU,6BAA4B,SAAA,EAAU,2BAAA,EAA4B,UAAA,EAAW,4BAAA,EAA6B,YAAW,4BAAA","file":"time-field.css.js","sourcesContent":["export var timeFieldClassNames = {container:'time-field_timeFieldClassNames_container__hlv6r3i',timeField:'time-field_timeFieldClassNames_timeField__hlv6r3j',label:'time-field_timeFieldClassNames_label__hlv6r3k typography_label__j8fgabg',description:'time-field_timeFieldClassNames_description__hlv6r3l',error:'time-field_timeFieldClassNames_error__hlv6r3m'};\nexport var timeFieldColorVars = {border:'var(--border__hlv6r37)',description:{color:'var(--description-color__hlv6r38)'},error:{color:'var(--error-color__hlv6r39)'},label:{color:'var(--label-color__hlv6r3a)'}};\nexport var timeFieldContainer = 'time-field_timeFieldContainer__hlv6r30';\nexport var timeFieldSpaceVars = {x:'var(--x__hlv6r31)',y:'var(--y__hlv6r32)',gap:'var(--gap__hlv6r33)',minWidth:'var(--minWidth__hlv6r34)',width:'var(--width__hlv6r35)',maxWidth:'var(--maxWidth__hlv6r36)'};\nexport var timeFieldStateVars = {size:'var(--size__hlv6r3b)',isDisabled:'var(--isDisabled__hlv6r3c)',isFocused:'var(--isFocused__hlv6r3d)',isHovered:'var(--isHovered__hlv6r3e)',isInvalid:'var(--isInvalid__hlv6r3f)',isReadOnly:'var(--isReadOnly__hlv6r3g)',isRequired:'var(--isRequired__hlv6r3h)'};"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["Tooltip","RACTooltip","TooltipTarget"],"mappings":";;;;;;;;;;;;;AAsCA,IAAM,cAAiC,GAAA;AAAA,EACrC,MAAM,MAAO,CAAA;AACf,CAAA;AAEa,IAAA,cAAA,GACX,cAA0D,IAAI;AAEzD,IAAM,OAAU,GAAA,UAAA,CAAW,SAASA,QAAAA,CACzC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,cAAc,CAAA;AAEzD,EAAQ,KAAA,GAAA,eAAA,CAAgB,OAAO,SAAS,CAAA;AAExC,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA,YAAA;AAAA,IACV,UAAY,EAAA,cAAA;AAAA,IACZ,gBAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAS,EAAA,WAAA;AAAA,IACT,MAAA;AAAA,IACA,G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A,MACJ,GAAA;AAAA,MACA,SAAA,EAAW,YAAY,MAAQ,EAAA,MAAA;AAAA,MAE/B,QAAA,EAAU,YAAY,CAAI,GAAA,MAAA;AAAA,MAEzB;AAAA;AAAA,GAEL,EAAA,CAAA;AAEJ,CAAC","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useFocusable } from '@react-aria/focus';\nimport {\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n Tooltip as RACTooltip,\n type TooltipRenderProps,\n} from 'react-aria-components';\nimport { useContextProps } from '../../hooks/use-context-props';\nimport { useDefaultProps } from '../../hooks/use-defaults';\nimport { useTheme } from '../../hooks/use-theme';\nimport { bodies } from '../../styles/typography.css';\nimport { inlineVars } from '../../utils/css';\nimport { callRenderProps, mergeClassNames } from '../../utils/props';\nimport {\n tooltipClassNames,\n tooltipStateVars,\n tooltipTargetStateVars,\n} from './tooltip.css';\nimport type { TooltipMapping, TooltipProps, TooltipTargetProps } from './types';\n\nconst defaultMapping: TooltipMapping = {\n font: bodies.xs,\n};\n\nexport const TooltipContext =\n createContext<ContextValue<TooltipProps, HTMLDivElement>>(null);\n\nexport const Tooltip = forwardRef(function Tooltip(\n props: TooltipProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, TooltipContext);\n\n props = useDefaultProps(props, 'Tooltip');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n containerPadding,\n crossOffset,\n mapping: mappingProp,\n offset,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(tooltipClassNames, theme.Tooltip, classNamesProp, {\n tooltip: {\n container: theme.className,\n tooltip: mapping.font,\n },\n }),\n [theme.Tooltip, classNamesProp, theme.className, mapping],\n );\n\n const style = useCallback(\n ({ state, ...renderProps }: TooltipRenderProps) => ({\n ...theme.style,\n ...inlineVars(tooltipStateVars, {\n containerPadding,\n crossOffset,\n offset,\n ...renderProps,\n isOpen: state.isOpen,\n }),\n }),\n [theme.style, containerPadding, crossOffset, offset],\n );\n\n const children = useCallback(\n (renderProps: TooltipRenderProps) => (\n <div className={classNames?.tooltip?.tooltip}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n isOpen: renderProps.state.isOpen,\n })}\n </div>\n ),\n [classNames?.tooltip?.tooltip, childrenProp],\n );\n\n return (\n <RACTooltip\n {...rest}\n ref={ref}\n className={classNames?.tooltip?.container}\n style={style}\n >\n {children}\n </RACTooltip>\n );\n});\n\nexport const TooltipTargetContext =\n createContext<ContextValue<TooltipTargetProps, HTMLDivElement>>(null);\n\n/**\n * This target component is only needed if attempting to add a Tooltip\n * to a non-focusable element/component\n */\nexport const TooltipTarget = forwardRef(function TooltipTarget(\n props: TooltipTargetProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, TooltipTargetContext);\n\n props = useDefaultProps(props, 'TooltipTarget');\n\n const {\n children,\n classNames: classNamesProp,\n focusable = true,\n relative = 'self',\n } = props;\n\n const { focusableProps } = useFocusable({}, ref);\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(tooltipClassNames, theme.Tooltip, classNamesProp),\n [theme.Tooltip, classNamesProp],\n );\n\n const style = useMemo(\n () =>\n inlineVars(tooltipTargetStateVars, {\n focusable,\n relative,\n }),\n [focusable, relative],\n );\n\n return (\n <div className={classNames?.target?.container} style={style}>\n <div\n {...focusableProps}\n ref={ref}\n className={classNames?.target?.target}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={focusable ? 0 : undefined}\n >\n {children}\n </div>\n </div>\n );\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["Tooltip","RACTooltip","TooltipTarget"],"mappings":";;;;;;;;;;;;;AAsCA,IAAM,cAAA,GAAiC;AAAA,EACrC,MAAM,MAAA,CAAO;AACf,CAAA;AAEO,IAAM,cAAA,GACX,cAA0D,IAAI;AAEzD,IAAM,OAAA,GAAU,UAAA,CAAW,SAASA,QAAAA,CACzC,OACA,GAAA,EACA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAA,CAAgB,KAAA,EAAO,KAAK,cAAc,CAAA;AAEzD,EAAA,KAAA,GAAQ,eAAA,CAAgB,OAAO,SAAS,CAAA;AAExC,EAAA,MAAM;AAAA,IACJ,QAAA,EAAU,YAAA;AAAA,IACV,UAAA,EAAY,cAAA;AAAA,IACZ,gBAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA,EAAS,WAAA;AAAA,IACT,MAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,EAAA,MAAM,OAAA,GAAU,OAAA;AAAA,IACd,OAAO;AAAA,MACL,GAAG,cAAA;AAAA,MACH,GAAG;AAAA,KACL,CAAA;AAAA,IACA,CAAC,WAAW;AAAA,GACd;AAEA,EAAA,MAAM,UAAA,GAAa,OAAA;AAAA,IACjB,MACE,eAAA,CAAgB,iBAAA,EAAmB,KAAA,CAAM,SAAS,cAAA,EAAgB;AAAA,MAChE,OAAA,EAAS;AAAA,QACP,WAAW,KAAA,CAAM,SAAA;AAAA,QACjB,SAAS,OAAA,CAAQ;AAAA;AACnB,KACD,CAAA;AAAA,IACH,CAAC,KAAA,CAAM,OAAA,EAAS,cAAA,EAAg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AAM;AAAA,IACJ,QAAA;AAAA,IACA,UAAA,EAAY,cAAA;AAAA,IACZ,SAAA,GAAY,IAAA;AAAA,IACZ,QAAA,GAAW;AAAA,GACb,GAAI,KAAA;AAEJ,EAAA,MAAM,EAAE,cAAA,EAAe,GAAI,YAAA,CAAa,IAAI,GAAG,CAAA;AAC/C,EAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,EAAA,MAAM,UAAA,GAAa,OAAA;AAAA,IACjB,MAAM,eAAA,CAAgB,iBAAA,EAAmB,KAAA,CAAM,SAAS,cAAc,CAAA;AAAA,IACtE,CAAC,KAAA,CAAM,OAAA,EAAS,cAAc;AAAA,GAChC;AAEA,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,MACE,WAAW,sBAAA,EAAwB;AAAA,MACjC,SAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,IACH,CAAC,WAAW,QAAQ;AAAA,GACtB;AAEA,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,EAAY,MAAA,EAAQ,WAAW,KAAA,EAC7C,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,cAAA;AAAA,MACJ,GAAA;AAAA,MACA,SAAA,EAAW,YAAY,MAAA,EAAQ,MAAA;AAAA,MAE/B,QAAA,EAAU,YAAY,CAAA,GAAI,MAAA;AAAA,MAEzB;AAAA;AAAA,GACH,EACF,CAAA;AAEJ,CAAC","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useFocusable } from '@react-aria/focus';\nimport {\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n Tooltip as RACTooltip,\n type TooltipRenderProps,\n} from 'react-aria-components';\nimport { useContextProps } from '../../hooks/use-context-props';\nimport { useDefaultProps } from '../../hooks/use-defaults';\nimport { useTheme } from '../../hooks/use-theme';\nimport { bodies } from '../../styles/typography.css';\nimport { inlineVars } from '../../utils/css';\nimport { callRenderProps, mergeClassNames } from '../../utils/props';\nimport {\n tooltipClassNames,\n tooltipStateVars,\n tooltipTargetStateVars,\n} from './tooltip.css';\nimport type { TooltipMapping, TooltipProps, TooltipTargetProps } from './types';\n\nconst defaultMapping: TooltipMapping = {\n font: bodies.xs,\n};\n\nexport const TooltipContext =\n createContext<ContextValue<TooltipProps, HTMLDivElement>>(null);\n\nexport const Tooltip = forwardRef(function Tooltip(\n props: TooltipProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, TooltipContext);\n\n props = useDefaultProps(props, 'Tooltip');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n containerPadding,\n crossOffset,\n mapping: mappingProp,\n offset,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(tooltipClassNames, theme.Tooltip, classNamesProp, {\n tooltip: {\n container: theme.className,\n tooltip: mapping.font,\n },\n }),\n [theme.Tooltip, classNamesProp, theme.className, mapping],\n );\n\n const style = useCallback(\n ({ state, ...renderProps }: TooltipRenderProps) => ({\n ...theme.style,\n ...inlineVars(tooltipStateVars, {\n containerPadding,\n crossOffset,\n offset,\n ...renderProps,\n isOpen: state.isOpen,\n }),\n }),\n [theme.style, containerPadding, crossOffset, offset],\n );\n\n const children = useCallback(\n (renderProps: TooltipRenderProps) => (\n <div className={classNames?.tooltip?.tooltip}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n isOpen: renderProps.state.isOpen,\n })}\n </div>\n ),\n [classNames?.tooltip?.tooltip, childrenProp],\n );\n\n return (\n <RACTooltip\n {...rest}\n ref={ref}\n className={classNames?.tooltip?.container}\n style={style}\n >\n {children}\n </RACTooltip>\n );\n});\n\nexport const TooltipTargetContext =\n createContext<ContextValue<TooltipTargetProps, HTMLDivElement>>(null);\n\n/**\n * This target component is only needed if attempting to add a Tooltip\n * to a non-focusable element/component\n */\nexport const TooltipTarget = forwardRef(function TooltipTarget(\n props: TooltipTargetProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, TooltipTargetContext);\n\n props = useDefaultProps(props, 'TooltipTarget');\n\n const {\n children,\n classNames: classNamesProp,\n focusable = true,\n relative = 'self',\n } = props;\n\n const { focusableProps } = useFocusable({}, ref);\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(tooltipClassNames, theme.Tooltip, classNamesProp),\n [theme.Tooltip, classNamesProp],\n );\n\n const style = useMemo(\n () =>\n inlineVars(tooltipTargetStateVars, {\n focusable,\n relative,\n }),\n [focusable, relative],\n );\n\n return (\n <div className={classNames?.target?.container} style={style}>\n <div\n {...focusableProps}\n ref={ref}\n className={classNames?.target?.target}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={focusable ? 0 : undefined}\n >\n {children}\n </div>\n </div>\n );\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tooltip/tooltip.css.ts"],"names":[],"mappings":";;;AAAO,IAAI,iBAAoB,GAAA,EAAC,OAAQ,EAAA,EAAC,WAAU,sDAAuD,EAAA,OAAA,EAAQ,sGAAsG,EAAA,EAAE,QAAO,EAAC,SAAA,EAAU,qDAAsD,EAAA,MAAA,EAAO,oDAAmD;AACrV,IAAI,iBAAoB,GAAA,EAAC,OAAQ,EAAA,4CAAA,EAA6C,QAAO,2CAA2C;AAChI,IAAI,gBAAmB,GAAA,EAAC,CAAE,EAAA,mBAAA,EAAoB,GAAE,mBAAmB;AACnE,IAAI,gBAAmB,GAAA,EAAC,gBAAiB,EAAA,kCAAA,EAAmC,aAAY,6BAA8B,EAAA,MAAA,EAAO,wBAAyB,EAAA,SAAA,EAAU,6BAA4B,UAAW,EAAA,4BAAA,EAA6B,SAAU,EAAA,2BAAA,EAA4B,QAAO,wBAAwB;AACzS,IAAI,sBAAyB,GAAA,EAAC,SAAU,EAAA,2BAAA,EAA4B,UAAS,0BAA0B","file":"tooltip.css.js","sourcesContent":["export var tooltipClassNames = {tooltip:{container:'tooltip_tooltipClassNames_tooltip_container__sg5iyrd',tooltip:'tooltip_tooltipClassNames_tooltip_tooltip__sg5iyre surfaces_proud__15mw6jf5 surfaces_flush__15mw6jf4'},target:{container:'tooltip_tooltipClassNames_target_container__sg5iyrf',target:'tooltip_tooltipClassNames_target_target__sg5iyrg'}};\nexport var tooltipContainers = {tooltip:'tooltip_tooltipContainers_tooltip__sg5iyr0',target:'tooltip_tooltipContainers_target__sg5iyr1'};\nexport var tooltipSpaceVars = {x:'var(--x__sg5iyr2)',y:'var(--y__sg5iyr3)'};\nexport var tooltipStateVars = {containerPadding:'var(--containerPadding__sg5iyr4)',crossOffset:'var(--crossOffset__sg5iyr5)',offset:'var(--offset__sg5iyr6)',placement:'var(--placement__sg5iyr7)',isEntering:'var(--isEntering__sg5iyr8)',isExiting:'var(--isExiting__sg5iyr9)',isOpen:'var(--isOpen__sg5iyra)'};\nexport var tooltipTargetStateVars = {focusable:'var(--focusable__sg5iyrb)',relative:'var(--relative__sg5iyrc)'};"]}
1
+ {"version":3,"sources":["../../../src/components/tooltip/tooltip.css.ts"],"names":[],"mappings":";;;AAAO,IAAI,iBAAA,GAAoB,EAAC,OAAA,EAAQ,EAAC,WAAU,sDAAA,EAAuD,OAAA,EAAQ,sGAAA,EAAsG,EAAE,QAAO,EAAC,SAAA,EAAU,qDAAA,EAAsD,MAAA,EAAO,oDAAkD;AACpV,IAAI,iBAAA,GAAoB,EAAC,OAAA,EAAQ,4CAAA,EAA6C,QAAO,2CAAA;AACrF,IAAI,gBAAA,GAAmB,EAAC,CAAA,EAAE,mBAAA,EAAoB,GAAE,mBAAA;AAChD,IAAI,gBAAA,GAAmB,EAAC,gBAAA,EAAiB,kCAAA,EAAmC,aAAY,6BAAA,EAA8B,MAAA,EAAO,wBAAA,EAAyB,SAAA,EAAU,6BAA4B,UAAA,EAAW,4BAAA,EAA6B,SAAA,EAAU,2BAAA,EAA4B,QAAO,wBAAA;AACjR,IAAI,sBAAA,GAAyB,EAAC,SAAA,EAAU,2BAAA,EAA4B,UAAS,0BAAA","file":"tooltip.css.js","sourcesContent":["export var tooltipClassNames = {tooltip:{container:'tooltip_tooltipClassNames_tooltip_container__sg5iyrd',tooltip:'tooltip_tooltipClassNames_tooltip_tooltip__sg5iyre surfaces_proud__15mw6jf5 surfaces_flush__15mw6jf4'},target:{container:'tooltip_tooltipClassNames_target_container__sg5iyrf',target:'tooltip_tooltipClassNames_target_target__sg5iyrg'}};\nexport var tooltipContainers = {tooltip:'tooltip_tooltipContainers_tooltip__sg5iyr0',target:'tooltip_tooltipContainers_target__sg5iyr1'};\nexport var tooltipSpaceVars = {x:'var(--x__sg5iyr2)',y:'var(--y__sg5iyr3)'};\nexport var tooltipStateVars = {containerPadding:'var(--containerPadding__sg5iyr4)',crossOffset:'var(--crossOffset__sg5iyr5)',offset:'var(--offset__sg5iyr6)',placement:'var(--placement__sg5iyr7)',isEntering:'var(--isEntering__sg5iyr8)',isExiting:'var(--isExiting__sg5iyr9)',isOpen:'var(--isOpen__sg5iyra)'};\nexport var tooltipTargetStateVars = {focusable:'var(--focusable__sg5iyrb)',relative:'var(--relative__sg5iyrc)'};"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tree/index.tsx"],"names":["RACButtonContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+DA,IAAM,SAAY,GAAA;AAAA,EAChB,GAAK,E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EAAA,QAAA,kBAAA,GAAA,CAAC,QAAK,CACR,EAAA,CAAA;AAAA,0BAED,KAAI,EAAA,EAAA,SAAA,EAAW,YAAY,IAAM,EAAA,GAAA,EAC/B,0BAAgB,YAAc,EAAA;AAAA,QAC7B,GAAG,WAAA;AAAA,QACH;AAAA,OACD,CACH,EAAA,CAAA;AAAA,MACC,OAAA,IAAW,IAAK,CAAA,KAAA,KACd,CAAC,eAAA,IAAmB,IAAK,CAAA,KAAA,CAAM,UAC9B,CAAA,oBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,MAAA,EAAQ,cAChB,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,IAAI,IAAK,CAAA,GAAA;AAAA,UACT,OAAO,IAAK,CAAA,QAAA;AAAA,UACZ,KAAA,EAAO,KAAK,KAAM,CAAA,KAAA;AAAA,UAClB,YAAA,EAAY,KAAK,KAAM,CAAA,KAAA;AAAA,UAEtB,QAAA,EAAA;AAAA;AAAA,OAEL,EAAA;AAAA,KAAA,EAEN,CACF,EAAA,CAAA;AAAA,IAEF;AAAA,MACE,OAAA;AAAA,MACA,YAAY,IAAM,EAAA,IAAA;AAAA,MAClB,YAAY,IAAM,EAAA,GAAA;AAAA,MAClB,IAAA;AAAA,MACA,YAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,UAAY,EAAA,CAAC,CAAC,IAAA,CAAK,KAAM,CAAA,UAAA;AAAA,MACzB,SAAA,EAAW,YAAY,IAAM,EAAA,SAAA;AAAA,MAC7B,KAAA;AAAA,MACA,SAAA,EAAW,KAAK,KAAM,CAAA,KAAA;AAAA,MAErB;AAAA;AAAA,GACH;AAEJ","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { noop } from '@accelint/core';\nimport { usePress } from '@react-aria/interactions';\nimport type { Key } from '@react-types/shared';\nimport { createContext, useCallback, useContext, useMemo } from 'react';\nimport {\n type ContextValue,\n DEFAULT_SLOT,\n DropIndicator,\n type DropTarget,\n GridList,\n GridListItem,\n type GridListItemRenderProps,\n type GridListRenderProps,\n Provider,\n ButtonContext as RACButtonContext,\n type ButtonProps as RACButtonProps,\n type TextProps,\n useDragAndDrop,\n} from 'react-aria-components';\nimport { useDefaultProps } from '../../hooks/use-defaults';\nimport { useTheme } from '../../hooks/use-theme';\nimport { useTree } from '../../hooks/use-tree';\nimport { bodies } from '../../styles/typography.css';\nimport { inlineVars } from '../../utils/css';\nimport { callRenderProps, mergeClassNames } from '../../utils/props';\nimport { AriaTextContext } from '../aria';\nimport { Button, ButtonContext, ToggleButtonContext } from '../button';\nimport type { ButtonProps, ToggleButtonProps } from '../button/types';\nimport { CheckboxContext } from '../checkbox';\nimport type { CheckboxProps } from '../checkbox/types';\nimport { GroupContext } from '../group';\nimport type { GroupProps } from '../group/types';\nimport { Icon } from '../icon';\nimport { MergeProvider } from '../merge-provider';\nimport {\n treeClassNames,\n treeGroupStateVars,\n treeIndicatorStateVars,\n treeItemStateVars,\n treeStateVars,\n} from './tree.css';\nimport type {\n TreeGroupProps,\n TreeIndicatorRenderProps,\n TreeItemProps,\n TreeMapping,\n TreeProps,\n TreeStateContextValue,\n} from './types';\nimport { createDragAndDropHandlers } from './utils';\n\nconst emptyTree = {\n key: '',\n parentKey: '',\n children: [],\n value: { id: '', label: '' },\n};\n\nconst defaultMapping: TreeMapping = {\n actions: {\n sm: {},\n lg: {},\n },\n button: {\n sm: { size: 'sm', variant: 'icon' },\n lg: { size: 'md', variant: 'icon' },\n },\n description: {\n sm: bodies.sm,\n lg: bodies.md,\n },\n drag: {\n sm: {},\n lg: {},\n },\n expansion: {\n sm: {},\n lg: {},\n },\n visibility: {\n sm: {},\n lg: {},\n },\n};\n\nconst defaultSize = 'lg';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const TreeStateContext = createContext<TreeStateContextValue<any>>({\n allowsDragging: true,\n allowsExpansion: true,\n allowsVisibility: false,\n lookup: {},\n selectedKeys: new Set(),\n selectionMode: 'none',\n tree: emptyTree,\n actions: {\n append: noop,\n getItem: () => emptyTree,\n insert: noop,\n insertAfter: noop,\n insertBefore: noop,\n move: noop,\n prepend: noop,\n remove: noop,\n removeSelectedItems: noop,\n revertIsExpanded: noop,\n setSelectedKeys: noop,\n toggleIsExpanded: noop,\n toggleIsSelected: noop,\n toggleIsViewable: noop,\n update: noop,\n },\n});\n\nfunction defaultRenderEmptyState({ isDropTarget }: GridListRenderProps) {\n return isDropTarget ? 'Add to this group' : 'Nothing to see here';\n}\n\n/**\n * By default Tree only works as an uncontrolled input. However, if you need to use the Tree\n * as a controlled input (passing state changes to the \"nodes\" props), you will need to add a\n * \"key\" prop that is a hash of the \"nodes\" prop to trigger a rerender of the component and\n * abandon it's previous state. Unfortunately, the underlying hooks don't provide a good way\n * to update the internal state of the Tree onces it's been initialized.\n */\nexport function Tree<T>(props: TreeProps<T>) {\n props = useDefaultProps(props as TreeProps<unknown>, 'Tree') as TreeProps<T>;\n\n const {\n children: childrenProp,\n allowsDragging = false,\n allowsExpansion = true,\n allowsVisibility = false,\n classNames: classNamesProps,\n disabledBehavior = 'all',\n keyboardNavigationBehavior = 'arrow',\n mapping: mappingProp,\n nodes,\n provider,\n renderDragPreview,\n renderEmptyState: renderEmptyStateProp = defaultRenderEmptyState,\n selectionBehavior = 'replace',\n selectionMode = 'none',\n showTreeLines = true,\n size = defaultSize,\n onAction,\n onScroll,\n onSelectionChange,\n onUpdate,\n ...rest\n } = props;\n\n const state = useTree({\n allowsExpansion,\n allowsVisibility,\n nodes,\n selectionMode,\n onSelectionChange,\n onUpdate,\n });\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(treeClassNames, theme.Tree, classNamesProps, {\n item: {\n description: mapping.description[size],\n },\n }) ?? {},\n [theme.Tree, classNamesProps, mapping, size],\n );\n\n const renderEmptyState = useCallback(\n (renderProps: GridListRenderProps) => (\n <div className={classNames?.empty}>\n {renderEmptyStateProp(renderProps)}\n </div>\n ),\n [classNames?.empty, renderEmptyStateProp],\n );\n\n const context = useMemo<\n [[typeof TreeStateContext, TreeStateContextValue<T>]]\n >(\n () => [\n [\n TreeStateContext,\n {\n ...state,\n allowsDragging,\n classNames,\n disabledBehavior,\n keyboardNavigationBehavior,\n renderDragPreview,\n renderEmptyState,\n selectionBehavior,\n selectionMode,\n showTreeLines,\n size,\n onAction,\n onScroll,\n },\n ],\n ],\n [\n state,\n allowsDragging,\n classNames,\n disabledBehavior,\n keyboardNavigationBehavior,\n renderDragPreview,\n renderEmptyState,\n selectionBehavior,\n selectionMode,\n showTreeLines,\n size,\n onAction,\n onScroll,\n ],\n );\n\n const style = useMemo(\n () =>\n inlineVars(treeStateVars, {\n allowsDragging,\n allowsExpansion: state.allowsExpansion,\n allowsVisibility: state.allowsVisibility,\n showTreeLines,\n size,\n }),\n [\n allowsDragging,\n state.allowsExpansion,\n state.allowsVisibility,\n showTreeLines,\n size,\n ],\n );\n\n const children = useMemo(() => {\n const treeGroupProps = {\n ...rest,\n id: state.tree.key,\n nodes: state.tree.children,\n };\n\n return provider ? (\n callRenderProps(childrenProp, { ...state, treeGroupProps })\n ) : (\n <TreeGroup {...treeGroupProps}>{childrenProp}</TreeGroup>\n );\n }, [rest, provider, childrenProp, state]);\n\n return (\n <Provider values={context}>\n <div className={classNames?.tree?.container} style={style}>\n <div className={classNames?.tree?.tree}>{children}</div>\n </div>\n </Provider>\n );\n}\n\nexport function TreeGroup<T>({\n id,\n children,\n nodes,\n types = ['all'],\n ...rest\n}: TreeGroupProps<T>) {\n const {\n actions,\n allowsDragging,\n classNames,\n disabledBehavior,\n keyboardNavigationBehavior,\n lookup,\n renderDragPreview,\n renderEmptyState,\n selectedKeys,\n selectionBehavior,\n selectionMode,\n onAction,\n onScroll,\n } = useContext(TreeStateContext);\n\n const acceptedDragTypes = useMemo(\n () => types.map((type) => `tree-${type}`),\n [types],\n );\n\n // This function cannot be treated as a component and will throw errors if implemented as one (with hooks)\n const renderDropIndicator = useCallback(\n (target: DropTarget) => (\n <DropIndicator\n className={classNames?.indicator?.container}\n // eslint-disable-next-line react-perf/jsx-no-new-function-as-prop, react/jsx-no-bind\n style={(renderProps: TreeIndicatorRenderProps) =>\n inlineVars(treeIndicatorStateVars, {\n ...renderProps,\n dropPosition:\n 'dropPosition' in target ? target.dropPosition : 'root',\n })\n }\n target={target}\n >\n <div className={classNames?.indicator?.indicator} />\n </DropIndicator>\n ),\n [classNames?.indicator?.container, classNames?.indicator?.indicator],\n );\n\n const { dragAndDropHooks } = useDragAndDrop({\n isDisabled: !allowsDragging,\n renderDragPreview,\n renderDropIndicator,\n ...createDragAndDropHandlers(id, acceptedDragTypes, lookup, actions),\n });\n\n const style = useCallback(\n (renderProps: GridListRenderProps) =>\n inlineVars(treeGroupStateVars, { ...renderProps, count: nodes.length }),\n [nodes.length],\n );\n\n const indices = useMemo(\n () =>\n nodes.reduce<Record<Key, number>>((acc, node, index) => {\n acc[node.key] = index;\n\n return acc;\n }, {}),\n [nodes],\n );\n\n return (\n <GridList\n {...rest}\n className={classNames?.group}\n disabledBehavior={disabledBehavior}\n dragAndDropHooks={dragAndDropHooks}\n items={nodes}\n keyboardNavigationBehavior={keyboardNavigationBehavior}\n renderEmptyState={renderEmptyState}\n selectedKeys={selectedKeys}\n selectionBehavior={selectionBehavior}\n selectionMode={selectionMode}\n style={style}\n onAction={onAction}\n onScroll={onScroll}\n >\n {(item) => (\n <TreeItem\n index={indices[item.key] ?? -1}\n node={item}\n isFirstChild={indices[item.key] === 0}\n isLastChild={indices[item.key] === nodes.length - 1}\n >\n {children}\n </TreeItem>\n )}\n </GridList>\n );\n}\n\ntype TreeItemContexts = [\n [\n typeof ToggleButtonContext,\n ContextValue<ToggleButtonProps, HTMLButtonElement>,\n ],\n [typeof AriaTextContext, ContextValue<TextProps, HTMLSpanElement>],\n [\n typeof GroupContext,\n ContextValue<GroupProps<ButtonProps, HTMLButtonElement>, HTMLDivElement>,\n ],\n [typeof CheckboxContext, ContextValue<CheckboxProps, HTMLLabelElement>],\n [typeof ButtonContext, ContextValue<ButtonProps, HTMLButtonElement>],\n [typeof RACButtonContext, ContextValue<RACButtonProps, HTMLButtonElement>],\n];\n\nconst contextBlocker: TreeItemContexts = [\n [ToggleButtonContext, null],\n [AriaTextContext, null],\n [GroupContext, null],\n [CheckboxContext, null],\n [ButtonContext, null],\n [RACButtonContext, null],\n];\n\nexport function TreeItem<T>({\n children: childrenProp,\n index,\n mapping: mappingProp,\n node,\n isFirstChild,\n isLastChild,\n ...rest\n}: TreeItemProps<T>) {\n const {\n actions,\n allowsExpansion,\n classNames,\n size: sizeProp,\n } = useContext(TreeStateContext);\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const selection = useMemo(() => new Set([node.key]), [node.key]);\n\n const handleToggleExpansion = useCallback(\n () => actions.toggleIsExpanded(selection),\n [actions, selection],\n );\n\n const handleToggleSelection = useCallback(\n () => actions.toggleIsSelected(selection),\n [actions, selection],\n );\n\n const handleToggleVisibility = useCallback(\n () => actions.toggleIsViewable(selection),\n [actions, selection],\n );\n\n const { pressProps } = usePress({\n onPress: handleToggleExpansion,\n });\n\n const style = useCallback(\n (renderProps: GridListItemRenderProps) =>\n inlineVars(treeItemStateVars, {\n ...renderProps,\n count: node.children.length,\n index,\n isExpanded: 'nodes' in node.value ? !!node.value.isExpanded : false,\n isFirstChild,\n isGroup: 'nodes' in node.value,\n isLastChild,\n isViewable: !!node.value.isViewable,\n isVisible: !!node.value.isVisible,\n isReadOnly: !!node.value.isReadOnly,\n }),\n [node.children.length, node.value, index, isFirstChild, isLastChild],\n );\n\n const context = useMemo<TreeItemContexts>(() => {\n const size = sizeProp ?? defaultSize;\n const buttonProps = mapping.button[size] ?? {};\n\n return [\n [\n ToggleButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n expansion: {\n ...buttonProps,\n ...mapping.expansion[size],\n classNames: classNames?.item?.expansion,\n isSelected:\n 'nodes' in node.value ? !!node.value.isExpanded : undefined,\n onPress: handleToggleExpansion,\n },\n visibility: {\n ...buttonProps,\n ...mapping.visibility[size],\n classNames: classNames?.item?.visibility,\n isSelected: !!node.value.isViewable,\n isDisabled: !!node.value.isReadOnly,\n onPress: handleToggleVisibility,\n },\n },\n },\n ],\n [\n AriaTextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: {\n ...('nodes' in node.value ? pressProps : {}),\n className: classNames?.item?.description,\n children: node.value.label,\n },\n },\n },\n ],\n [\n GroupContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n actions: {\n classNames: classNames?.item?.actions,\n context: ButtonContext,\n values: buttonProps,\n },\n },\n },\n ],\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: {\n classNames: classNames?.item?.selection,\n onChange: handleToggleSelection,\n },\n },\n },\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...buttonProps,\n ...mapping.drag[size],\n classNames: classNames?.item?.drag,\n },\n // We use a non-interactive Button for the lines to try and simplify the\n // consistent use of space when rendered in alignment with other Buttons\n lines: {\n ...buttonProps,\n classNames: classNames?.item?.lines,\n isDisabled: true,\n },\n },\n },\n ],\n // Need to expand the RAC ButtonContext to allow for additional slots\n [RACButtonContext, { slots: { [DEFAULT_SLOT]: {}, lines: {} } }],\n ];\n }, [\n classNames?.item?.lines,\n classNames?.item?.expansion,\n classNames?.item?.visibility,\n classNames?.item?.description,\n classNames?.item?.actions,\n classNames?.item?.selection,\n classNames?.item?.drag,\n mapping,\n node,\n pressProps,\n sizeProp,\n handleToggleExpansion,\n handleToggleSelection,\n handleToggleVisibility,\n ]);\n\n /**\n * We need to block the above contexts from being passed into the TreeGroup\n * so that each TreeItem has a distinct context. We only use MergeProvider\n * for the above contexts because the GridListItem provides contexts that\n * we need to merge with\n */\n const children = useCallback(\n (renderProps: GridListItemRenderProps) => (\n <MergeProvider values={context}>\n <div className={classNames?.item?.item}>\n {node.parentKey && (\n <Button slot='lines'>\n <Icon />\n </Button>\n )}\n <div className={classNames?.item?.bar}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n node,\n })}\n </div>\n {'nodes' in node.value &&\n (!allowsExpansion || node.value.isExpanded) && (\n <Provider values={contextBlocker}>\n <TreeGroup\n id={node.key}\n nodes={node.children}\n types={node.value.types}\n aria-label={node.value.label}\n >\n {childrenProp}\n </TreeGroup>\n </Provider>\n )}\n </div>\n </MergeProvider>\n ),\n [\n context,\n classNames?.item?.item,\n classNames?.item?.bar,\n node,\n childrenProp,\n allowsExpansion,\n ],\n );\n\n return (\n <GridListItem\n {...rest}\n isDisabled={!!node.value.isReadOnly}\n className={classNames?.item?.container}\n style={style}\n textValue={node.value.label}\n >\n {children}\n </GridListItem>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/tree/index.tsx"],"names":["RACButtonContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+DA,IAAM,SAAA,GAAY;AAAA,EAChB,GAAA,EAAK,EAAA;AAAA,EACL,SAAA,EAAW,EAAA;AAAA,EACX,UAAU,EAAC;AAAA,EACX,KAAA,EAAO,EAAE,EAAA,EAAI,EAAA,EAAI,OAAO,EAAA;AAC1B,CAAA;AAEA,IAAM,cAAA,GAA8B;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AG,WAAA;AAAA,QACH;AAAA,OACD,CAAA,EACH,CAAA;AAAA,MACC,OAAA,IAAW,IAAA,CAAK,KAAA,KACd,CAAC,eAAA,IAAmB,IAAA,CAAK,KAAA,CAAM,UAAA,CAAA,oBAC9B,GAAA,CAAC,QAAA,EAAA,EAAS,MAAA,EAAQ,cAAA,EAChB,QAAA,kBAAA,GAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,IAAI,IAAA,CAAK,GAAA;AAAA,UACT,OAAO,IAAA,CAAK,QAAA;AAAA,UACZ,KAAA,EAAO,KAAK,KAAA,CAAM,KAAA;AAAA,UAClB,YAAA,EAAY,KAAK,KAAA,CAAM,KAAA;AAAA,UAEtB,QAAA,EAAA;AAAA;AAAA,OACH,EACF;AAAA,KAAA,EAEN,CAAA,EACF,CAAA;AAAA,IAEF;AAAA,MACE,OAAA;AAAA,MACA,YAAY,IAAA,EAAM,IAAA;AAAA,MAClB,YAAY,IAAA,EAAM,GAAA;AAAA,MAClB,IAAA;AAAA,MACA,YAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,UAAA,EAAY,CAAC,CAAC,IAAA,CAAK,KAAA,CAAM,UAAA;AAAA,MACzB,SAAA,EAAW,YAAY,IAAA,EAAM,SAAA;AAAA,MAC7B,KAAA;AAAA,MACA,SAAA,EAAW,KAAK,KAAA,CAAM,KAAA;AAAA,MAErB;AAAA;AAAA,GACH;AAEJ","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { noop } from '@accelint/core';\nimport { usePress } from '@react-aria/interactions';\nimport type { Key } from '@react-types/shared';\nimport { createContext, useCallback, useContext, useMemo } from 'react';\nimport {\n type ContextValue,\n DEFAULT_SLOT,\n DropIndicator,\n type DropTarget,\n GridList,\n GridListItem,\n type GridListItemRenderProps,\n type GridListRenderProps,\n Provider,\n ButtonContext as RACButtonContext,\n type ButtonProps as RACButtonProps,\n type TextProps,\n useDragAndDrop,\n} from 'react-aria-components';\nimport { useDefaultProps } from '../../hooks/use-defaults';\nimport { useTheme } from '../../hooks/use-theme';\nimport { useTree } from '../../hooks/use-tree';\nimport { bodies } from '../../styles/typography.css';\nimport { inlineVars } from '../../utils/css';\nimport { callRenderProps, mergeClassNames } from '../../utils/props';\nimport { AriaTextContext } from '../aria';\nimport { Button, ButtonContext, ToggleButtonContext } from '../button';\nimport type { ButtonProps, ToggleButtonProps } from '../button/types';\nimport { CheckboxContext } from '../checkbox';\nimport type { CheckboxProps } from '../checkbox/types';\nimport { GroupContext } from '../group';\nimport type { GroupProps } from '../group/types';\nimport { Icon } from '../icon';\nimport { MergeProvider } from '../merge-provider';\nimport {\n treeClassNames,\n treeGroupStateVars,\n treeIndicatorStateVars,\n treeItemStateVars,\n treeStateVars,\n} from './tree.css';\nimport type {\n TreeGroupProps,\n TreeIndicatorRenderProps,\n TreeItemProps,\n TreeMapping,\n TreeProps,\n TreeStateContextValue,\n} from './types';\nimport { createDragAndDropHandlers } from './utils';\n\nconst emptyTree = {\n key: '',\n parentKey: '',\n children: [],\n value: { id: '', label: '' },\n};\n\nconst defaultMapping: TreeMapping = {\n actions: {\n sm: {},\n lg: {},\n },\n button: {\n sm: { size: 'sm', variant: 'icon' },\n lg: { size: 'md', variant: 'icon' },\n },\n description: {\n sm: bodies.sm,\n lg: bodies.md,\n },\n drag: {\n sm: {},\n lg: {},\n },\n expansion: {\n sm: {},\n lg: {},\n },\n visibility: {\n sm: {},\n lg: {},\n },\n};\n\nconst defaultSize = 'lg';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const TreeStateContext = createContext<TreeStateContextValue<any>>({\n allowsDragging: true,\n allowsExpansion: true,\n allowsVisibility: false,\n lookup: {},\n selectedKeys: new Set(),\n selectionMode: 'none',\n tree: emptyTree,\n actions: {\n append: noop,\n getItem: () => emptyTree,\n insert: noop,\n insertAfter: noop,\n insertBefore: noop,\n move: noop,\n prepend: noop,\n remove: noop,\n removeSelectedItems: noop,\n revertIsExpanded: noop,\n setSelectedKeys: noop,\n toggleIsExpanded: noop,\n toggleIsSelected: noop,\n toggleIsViewable: noop,\n update: noop,\n },\n});\n\nfunction defaultRenderEmptyState({ isDropTarget }: GridListRenderProps) {\n return isDropTarget ? 'Add to this group' : 'Nothing to see here';\n}\n\n/**\n * By default Tree only works as an uncontrolled input. However, if you need to use the Tree\n * as a controlled input (passing state changes to the \"nodes\" props), you will need to add a\n * \"key\" prop that is a hash of the \"nodes\" prop to trigger a rerender of the component and\n * abandon it's previous state. Unfortunately, the underlying hooks don't provide a good way\n * to update the internal state of the Tree onces it's been initialized.\n */\nexport function Tree<T>(props: TreeProps<T>) {\n props = useDefaultProps(props as TreeProps<unknown>, 'Tree') as TreeProps<T>;\n\n const {\n children: childrenProp,\n allowsDragging = false,\n allowsExpansion = true,\n allowsVisibility = false,\n classNames: classNamesProps,\n disabledBehavior = 'all',\n keyboardNavigationBehavior = 'arrow',\n mapping: mappingProp,\n nodes,\n provider,\n renderDragPreview,\n renderEmptyState: renderEmptyStateProp = defaultRenderEmptyState,\n selectionBehavior = 'replace',\n selectionMode = 'none',\n showTreeLines = true,\n size = defaultSize,\n onAction,\n onScroll,\n onSelectionChange,\n onUpdate,\n ...rest\n } = props;\n\n const state = useTree({\n allowsExpansion,\n allowsVisibility,\n nodes,\n selectionMode,\n onSelectionChange,\n onUpdate,\n });\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(treeClassNames, theme.Tree, classNamesProps, {\n item: {\n description: mapping.description[size],\n },\n }) ?? {},\n [theme.Tree, classNamesProps, mapping, size],\n );\n\n const renderEmptyState = useCallback(\n (renderProps: GridListRenderProps) => (\n <div className={classNames?.empty}>\n {renderEmptyStateProp(renderProps)}\n </div>\n ),\n [classNames?.empty, renderEmptyStateProp],\n );\n\n const context = useMemo<\n [[typeof TreeStateContext, TreeStateContextValue<T>]]\n >(\n () => [\n [\n TreeStateContext,\n {\n ...state,\n allowsDragging,\n classNames,\n disabledBehavior,\n keyboardNavigationBehavior,\n renderDragPreview,\n renderEmptyState,\n selectionBehavior,\n selectionMode,\n showTreeLines,\n size,\n onAction,\n onScroll,\n },\n ],\n ],\n [\n state,\n allowsDragging,\n classNames,\n disabledBehavior,\n keyboardNavigationBehavior,\n renderDragPreview,\n renderEmptyState,\n selectionBehavior,\n selectionMode,\n showTreeLines,\n size,\n onAction,\n onScroll,\n ],\n );\n\n const style = useMemo(\n () =>\n inlineVars(treeStateVars, {\n allowsDragging,\n allowsExpansion: state.allowsExpansion,\n allowsVisibility: state.allowsVisibility,\n showTreeLines,\n size,\n }),\n [\n allowsDragging,\n state.allowsExpansion,\n state.allowsVisibility,\n showTreeLines,\n size,\n ],\n );\n\n const children = useMemo(() => {\n const treeGroupProps = {\n ...rest,\n id: state.tree.key,\n nodes: state.tree.children,\n };\n\n return provider ? (\n callRenderProps(childrenProp, { ...state, treeGroupProps })\n ) : (\n <TreeGroup {...treeGroupProps}>{childrenProp}</TreeGroup>\n );\n }, [rest, provider, childrenProp, state]);\n\n return (\n <Provider values={context}>\n <div className={classNames?.tree?.container} style={style}>\n <div className={classNames?.tree?.tree}>{children}</div>\n </div>\n </Provider>\n );\n}\n\nexport function TreeGroup<T>({\n id,\n children,\n nodes,\n types = ['all'],\n ...rest\n}: TreeGroupProps<T>) {\n const {\n actions,\n allowsDragging,\n classNames,\n disabledBehavior,\n keyboardNavigationBehavior,\n lookup,\n renderDragPreview,\n renderEmptyState,\n selectedKeys,\n selectionBehavior,\n selectionMode,\n onAction,\n onScroll,\n } = useContext(TreeStateContext);\n\n const acceptedDragTypes = useMemo(\n () => types.map((type) => `tree-${type}`),\n [types],\n );\n\n // This function cannot be treated as a component and will throw errors if implemented as one (with hooks)\n const renderDropIndicator = useCallback(\n (target: DropTarget) => (\n <DropIndicator\n className={classNames?.indicator?.container}\n // eslint-disable-next-line react-perf/jsx-no-new-function-as-prop, react/jsx-no-bind\n style={(renderProps: TreeIndicatorRenderProps) =>\n inlineVars(treeIndicatorStateVars, {\n ...renderProps,\n dropPosition:\n 'dropPosition' in target ? target.dropPosition : 'root',\n })\n }\n target={target}\n >\n <div className={classNames?.indicator?.indicator} />\n </DropIndicator>\n ),\n [classNames?.indicator?.container, classNames?.indicator?.indicator],\n );\n\n const { dragAndDropHooks } = useDragAndDrop({\n isDisabled: !allowsDragging,\n renderDragPreview,\n renderDropIndicator,\n ...createDragAndDropHandlers(id, acceptedDragTypes, lookup, actions),\n });\n\n const style = useCallback(\n (renderProps: GridListRenderProps) =>\n inlineVars(treeGroupStateVars, { ...renderProps, count: nodes.length }),\n [nodes.length],\n );\n\n const indices = useMemo(\n () =>\n nodes.reduce<Record<Key, number>>((acc, node, index) => {\n acc[node.key] = index;\n\n return acc;\n }, {}),\n [nodes],\n );\n\n return (\n <GridList\n {...rest}\n className={classNames?.group}\n disabledBehavior={disabledBehavior}\n dragAndDropHooks={dragAndDropHooks}\n items={nodes}\n keyboardNavigationBehavior={keyboardNavigationBehavior}\n renderEmptyState={renderEmptyState}\n selectedKeys={selectedKeys}\n selectionBehavior={selectionBehavior}\n selectionMode={selectionMode}\n style={style}\n onAction={onAction}\n onScroll={onScroll}\n >\n {(item) => (\n <TreeItem\n index={indices[item.key] ?? -1}\n node={item}\n isFirstChild={indices[item.key] === 0}\n isLastChild={indices[item.key] === nodes.length - 1}\n >\n {children}\n </TreeItem>\n )}\n </GridList>\n );\n}\n\ntype TreeItemContexts = [\n [\n typeof ToggleButtonContext,\n ContextValue<ToggleButtonProps, HTMLButtonElement>,\n ],\n [typeof AriaTextContext, ContextValue<TextProps, HTMLSpanElement>],\n [\n typeof GroupContext,\n ContextValue<GroupProps<ButtonProps, HTMLButtonElement>, HTMLDivElement>,\n ],\n [typeof CheckboxContext, ContextValue<CheckboxProps, HTMLLabelElement>],\n [typeof ButtonContext, ContextValue<ButtonProps, HTMLButtonElement>],\n [typeof RACButtonContext, ContextValue<RACButtonProps, HTMLButtonElement>],\n];\n\nconst contextBlocker: TreeItemContexts = [\n [ToggleButtonContext, null],\n [AriaTextContext, null],\n [GroupContext, null],\n [CheckboxContext, null],\n [ButtonContext, null],\n [RACButtonContext, null],\n];\n\nexport function TreeItem<T>({\n children: childrenProp,\n index,\n mapping: mappingProp,\n node,\n isFirstChild,\n isLastChild,\n ...rest\n}: TreeItemProps<T>) {\n const {\n actions,\n allowsExpansion,\n classNames,\n size: sizeProp,\n } = useContext(TreeStateContext);\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const selection = useMemo(() => new Set([node.key]), [node.key]);\n\n const handleToggleExpansion = useCallback(\n () => actions.toggleIsExpanded(selection),\n [actions, selection],\n );\n\n const handleToggleSelection = useCallback(\n () => actions.toggleIsSelected(selection),\n [actions, selection],\n );\n\n const handleToggleVisibility = useCallback(\n () => actions.toggleIsViewable(selection),\n [actions, selection],\n );\n\n const { pressProps } = usePress({\n onPress: handleToggleExpansion,\n });\n\n const style = useCallback(\n (renderProps: GridListItemRenderProps) =>\n inlineVars(treeItemStateVars, {\n ...renderProps,\n count: node.children.length,\n index,\n isExpanded: 'nodes' in node.value ? !!node.value.isExpanded : false,\n isFirstChild,\n isGroup: 'nodes' in node.value,\n isLastChild,\n isViewable: !!node.value.isViewable,\n isVisible: !!node.value.isVisible,\n isReadOnly: !!node.value.isReadOnly,\n }),\n [node.children.length, node.value, index, isFirstChild, isLastChild],\n );\n\n const context = useMemo<TreeItemContexts>(() => {\n const size = sizeProp ?? defaultSize;\n const buttonProps = mapping.button[size] ?? {};\n\n return [\n [\n ToggleButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n expansion: {\n ...buttonProps,\n ...mapping.expansion[size],\n classNames: classNames?.item?.expansion,\n isSelected:\n 'nodes' in node.value ? !!node.value.isExpanded : undefined,\n onPress: handleToggleExpansion,\n },\n visibility: {\n ...buttonProps,\n ...mapping.visibility[size],\n classNames: classNames?.item?.visibility,\n isSelected: !!node.value.isViewable,\n isDisabled: !!node.value.isReadOnly,\n onPress: handleToggleVisibility,\n },\n },\n },\n ],\n [\n AriaTextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: {\n ...('nodes' in node.value ? pressProps : {}),\n className: classNames?.item?.description,\n children: node.value.label,\n },\n },\n },\n ],\n [\n GroupContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n actions: {\n classNames: classNames?.item?.actions,\n context: ButtonContext,\n values: buttonProps,\n },\n },\n },\n ],\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: {\n classNames: classNames?.item?.selection,\n onChange: handleToggleSelection,\n },\n },\n },\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...buttonProps,\n ...mapping.drag[size],\n classNames: classNames?.item?.drag,\n },\n // We use a non-interactive Button for the lines to try and simplify the\n // consistent use of space when rendered in alignment with other Buttons\n lines: {\n ...buttonProps,\n classNames: classNames?.item?.lines,\n isDisabled: true,\n },\n },\n },\n ],\n // Need to expand the RAC ButtonContext to allow for additional slots\n [RACButtonContext, { slots: { [DEFAULT_SLOT]: {}, lines: {} } }],\n ];\n }, [\n classNames?.item?.lines,\n classNames?.item?.expansion,\n classNames?.item?.visibility,\n classNames?.item?.description,\n classNames?.item?.actions,\n classNames?.item?.selection,\n classNames?.item?.drag,\n mapping,\n node,\n pressProps,\n sizeProp,\n handleToggleExpansion,\n handleToggleSelection,\n handleToggleVisibility,\n ]);\n\n /**\n * We need to block the above contexts from being passed into the TreeGroup\n * so that each TreeItem has a distinct context. We only use MergeProvider\n * for the above contexts because the GridListItem provides contexts that\n * we need to merge with\n */\n const children = useCallback(\n (renderProps: GridListItemRenderProps) => (\n <MergeProvider values={context}>\n <div className={classNames?.item?.item}>\n {node.parentKey && (\n <Button slot='lines'>\n <Icon />\n </Button>\n )}\n <div className={classNames?.item?.bar}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n node,\n })}\n </div>\n {'nodes' in node.value &&\n (!allowsExpansion || node.value.isExpanded) && (\n <Provider values={contextBlocker}>\n <TreeGroup\n id={node.key}\n nodes={node.children}\n types={node.value.types}\n aria-label={node.value.label}\n >\n {childrenProp}\n </TreeGroup>\n </Provider>\n )}\n </div>\n </MergeProvider>\n ),\n [\n context,\n classNames?.item?.item,\n classNames?.item?.bar,\n node,\n childrenProp,\n allowsExpansion,\n ],\n );\n\n return (\n <GridListItem\n {...rest}\n isDisabled={!!node.value.isReadOnly}\n className={classNames?.item?.container}\n style={style}\n textValue={node.value.label}\n >\n {children}\n </GridListItem>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tree/tree.css.ts"],"names":[],"mappings":";;;AAAO,IAAI,cAAiB,GAAA,EAAC,IAAK,EAAA,EAAC,SAAU,EAAA,8CAAA,EAAgD,EAAA,KAAA,EAAM,qCAAsC,EAAA,KAAA,EAAM,qCAAsC,EAAA,SAAA,EAAU,EAAC,SAAA,EAAU,mDAAmD,EAAA,EAAE,IAAK,EAAA,EAAC,SAAU,EAAA,8CAAA,EAA+C,IAAK,EAAA,yCAAA,EAA0C,GAAI,EAAA,wCAAA,EAAyC,KAAM,EAAA,EAAC,SAAU,EAAA,oDAAA,EAAqD,MAAO,EAAA,iDAAA,EAAmD,EAAA,UAAA,EAAW,EAAC,SAAA,EAAU,yD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AAA,UAAA,EAAW,+BAA8B,UAAW,EAAA,6BAAA,EAA8B,WAAU,4BAA4B;AAC50B,IAAA,aAAA,GAAgB,EAAC,GAAI,EAAA,EAAC,GAAE,uBAAwB,EAAA,CAAA,EAAE,uBAAuB,EAAA,EAAE,WAAY,EAAA,EAAC,GAAE,+BAAgC,EAAA,CAAA,EAAE,iCAAiC,EAAA,KAAA,EAAM,EAAC,CAAE,EAAA,yBAAA,EAA0B,CAAE,EAAA,yBAAA,EAA0B;AAC5N,IAAA,aAAA,GAAgB,EAAC,cAAA,EAAe,gCAAiC,EAAA,eAAA,EAAgB,iCAAkC,EAAA,gBAAA,EAAiB,kCAAmC,EAAA,aAAA,EAAc,+BAAgC,EAAA,IAAA,EAAK,sBAAsB","file":"tree.css.js","sourcesContent":["export var treeClassNames = {tree:{container:'tree_treeClassNames_tree_container__kbtjn31c'},empty:'tree_treeClassNames_empty__kbtjn31d',group:'tree_treeClassNames_group__kbtjn31e',indicator:{indicator:'tree_treeClassNames_indicator_indicator__kbtjn31f'},item:{container:'tree_treeClassNames_item_container__kbtjn31g',item:'tree_treeClassNames_item_item__kbtjn31h',bar:'tree_treeClassNames_item_bar__kbtjn31i',lines:{container:'tree_treeClassNames_item_lines_container__kbtjn31j',button:'tree_treeClassNames_item_lines_button__kbtjn31k'},visibility:{container:'tree_treeClassNames_item_visibility_container__kbtjn31l'},expansion:{container:'tree_treeClassNames_item_expansion_container__kbtjn31m'},description:'tree_treeClassNames_item_description__kbtjn31n',actions:{container:'tree_treeClassNames_item_actions_container__kbtjn31o'},selection:{checkbox:{container:'tree_treeClassNames_item_selection_checkbox_container__kbtjn31p'}},drag:{container:'tree_treeClassNames_item_drag_container__kbtjn31q'}}};\nexport var treeColorVars = {bar:{background:'var(--bar-background__kbtjn33)',border:'var(--bar-border__kbtjn34)',color:'var(--bar-color__kbtjn35)'},indicator:{background:'var(--indicator-background__kbtjn36)',border:'var(--indicator-border__kbtjn37)',color:'var(--indicator-color__kbtjn38)'}};\nexport var treeContainers = {tree:'tree_treeContainers_tree__kbtjn30',group:'tree_treeContainers_group__kbtjn31',item:'tree_treeContainers_item__kbtjn32'};\nexport var treeGroupStateVars = {count:'var(--count__kbtjn3k)',layout:'var(--layout__kbtjn3l)',isDropTarget:'var(--isDropTarget__kbtjn3m)',isEmpty:'var(--isEmpty__kbtjn3n)',isFocused:'var(--isFocused__kbtjn3o)',isFocusVisible:'var(--isFocusVisible__kbtjn3p)'};\nexport var treeIndicatorStateVars = {dropPosition:'var(--dropPosition__kbtjn3q)',isDropTarget:'var(--isDropTarget__kbtjn3r)'};\nexport var treeItemStateVars = {allowsDragging:'var(--allowsDragging__kbtjn3s)',count:'var(--count__kbtjn3t)',index:'var(--index__kbtjn3u)',selectionMode:'var(--selectionMode__kbtjn3v)',selectionBehavior:'var(--selectionBehavior__kbtjn3w)',isDisabled:'var(--isDisabled__kbtjn3x)',isDragging:'var(--isDragging__kbtjn3y)',isDropTarget:'var(--isDropTarget__kbtjn3z)',isExpanded:'var(--isExpanded__kbtjn310)',isFirstChild:'var(--isFirstChild__kbtjn311)',isFocused:'var(--isFocused__kbtjn312)',isFocusVisible:'var(--isFocusVisible__kbtjn313)',isGroup:'var(--isGroup__kbtjn314)',isHovered:'var(--isHovered__kbtjn315)',isLastChild:'var(--isLastChild__kbtjn316)',isPressed:'var(--isPressed__kbtjn317)',isReadOnly:'var(--isReadOnly__kbtjn318)',isSelected:'var(--isSelected__kbtjn319)',isViewable:'var(--isViewable__kbtjn31a)',isVisible:'var(--isVisible__kbtjn31b)'};\nexport var treeSpaceVars = {bar:{x:'var(--bar-x__kbtjn39)',y:'var(--bar-y__kbtjn3a)'},description:{x:'var(--description-x__kbtjn3b)',y:'var(--description-y__kbtjn3c)'},empty:{x:'var(--empty-x__kbtjn3d)',y:'var(--empty-y__kbtjn3e)'}};\nexport var treeStateVars = {allowsDragging:'var(--allowsDragging__kbtjn3f)',allowsExpansion:'var(--allowsExpansion__kbtjn3g)',allowsVisibility:'var(--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,EAAU,2BAAA,EAA4B,gBAAe,gCAAA;AAC3N,IAAI,sBAAA,GAAyB,EAAC,YAAA,EAAa,8BAAA,EAA+B,cAAa,8BAAA;AACvF,IAAI,oBAAoB,EAAC,cAAA,EAAe,kCAAiC,KAAA,EAAM,uBAAA,EAAwB,OAAM,uBAAA,EAAwB,aAAA,EAAc,+BAAA,EAAgC,iBAAA,EAAkB,qCAAoC,UAAA,EAAW,4BAAA,EAA6B,YAAW,4BAAA,EAA6B,YAAA,EAAa,gCAA+B,UAAA,EAAW,6BAAA,EAA8B,YAAA,EAAa,+BAAA,EAAgC,WAAU,4BAAA,EAA6B,cAAA,EAAe,mCAAkC,OAAA,EAAQ,0BAAA,EAA2B,WAAU,4BAAA,EAA6B,WAAA,EAAY,gCAA+B,SAAA,EAAU,4BAAA,EAA6B,YAAW,6BAAA,EAA8B,UAAA,EAAW,+BAA8B,UAAA,EAAW,6BAAA,EAA8B,WAAU,4BAAA;AACpzB,IAAI,aAAA,GAAgB,EAAC,GAAA,EAAI,EAAC,GAAE,uBAAA,EAAwB,CAAA,EAAE,uBAAA,EAAuB,EAAE,WAAA,EAAY,EAAC,GAAE,+BAAA,EAAgC,CAAA,EAAE,iCAA+B,EAAE,KAAA,EAAM,EAAC,CAAA,EAAE,yBAAA,EAA0B,CAAA,EAAE,yBAAA,EAAyB;AAC/N,IAAI,aAAA,GAAgB,EAAC,cAAA,EAAe,gCAAA,EAAiC,eAAA,EAAgB,iCAAA,EAAkC,gBAAA,EAAiB,kCAAA,EAAmC,aAAA,EAAc,+BAAA,EAAgC,IAAA,EAAK,sBAAA","file":"tree.css.js","sourcesContent":["export var treeClassNames = {tree:{container:'tree_treeClassNames_tree_container__kbtjn31c'},empty:'tree_treeClassNames_empty__kbtjn31d',group:'tree_treeClassNames_group__kbtjn31e',indicator:{indicator:'tree_treeClassNames_indicator_indicator__kbtjn31f'},item:{container:'tree_treeClassNames_item_container__kbtjn31g',item:'tree_treeClassNames_item_item__kbtjn31h',bar:'tree_treeClassNames_item_bar__kbtjn31i',lines:{container:'tree_treeClassNames_item_lines_container__kbtjn31j',button:'tree_treeClassNames_item_lines_button__kbtjn31k'},visibility:{container:'tree_treeClassNames_item_visibility_container__kbtjn31l'},expansion:{container:'tree_treeClassNames_item_expansion_container__kbtjn31m'},description:'tree_treeClassNames_item_description__kbtjn31n',actions:{container:'tree_treeClassNames_item_actions_container__kbtjn31o'},selection:{checkbox:{container:'tree_treeClassNames_item_selection_checkbox_container__kbtjn31p'}},drag:{container:'tree_treeClassNames_item_drag_container__kbtjn31q'}}};\nexport var treeColorVars = {bar:{background:'var(--bar-background__kbtjn33)',border:'var(--bar-border__kbtjn34)',color:'var(--bar-color__kbtjn35)'},indicator:{background:'var(--indicator-background__kbtjn36)',border:'var(--indicator-border__kbtjn37)',color:'var(--indicator-color__kbtjn38)'}};\nexport var treeContainers = {tree:'tree_treeContainers_tree__kbtjn30',group:'tree_treeContainers_group__kbtjn31',item:'tree_treeContainers_item__kbtjn32'};\nexport var treeGroupStateVars = {count:'var(--count__kbtjn3k)',layout:'var(--layout__kbtjn3l)',isDropTarget:'var(--isDropTarget__kbtjn3m)',isEmpty:'var(--isEmpty__kbtjn3n)',isFocused:'var(--isFocused__kbtjn3o)',isFocusVisible:'var(--isFocusVisible__kbtjn3p)'};\nexport var treeIndicatorStateVars = {dropPosition:'var(--dropPosition__kbtjn3q)',isDropTarget:'var(--isDropTarget__kbtjn3r)'};\nexport var treeItemStateVars = {allowsDragging:'var(--allowsDragging__kbtjn3s)',count:'var(--count__kbtjn3t)',index:'var(--index__kbtjn3u)',selectionMode:'var(--selectionMode__kbtjn3v)',selectionBehavior:'var(--selectionBehavior__kbtjn3w)',isDisabled:'var(--isDisabled__kbtjn3x)',isDragging:'var(--isDragging__kbtjn3y)',isDropTarget:'var(--isDropTarget__kbtjn3z)',isExpanded:'var(--isExpanded__kbtjn310)',isFirstChild:'var(--isFirstChild__kbtjn311)',isFocused:'var(--isFocused__kbtjn312)',isFocusVisible:'var(--isFocusVisible__kbtjn313)',isGroup:'var(--isGroup__kbtjn314)',isHovered:'var(--isHovered__kbtjn315)',isLastChild:'var(--isLastChild__kbtjn316)',isPressed:'var(--isPressed__kbtjn317)',isReadOnly:'var(--isReadOnly__kbtjn318)',isSelected:'var(--isSelected__kbtjn319)',isViewable:'var(--isViewable__kbtjn31a)',isVisible:'var(--isVisible__kbtjn31b)'};\nexport var treeSpaceVars = {bar:{x:'var(--bar-x__kbtjn39)',y:'var(--bar-y__kbtjn3a)'},description:{x:'var(--description-x__kbtjn3b)',y:'var(--description-y__kbtjn3c)'},empty:{x:'var(--empty-x__kbtjn3d)',y:'var(--empty-y__kbtjn3e)'}};\nexport var treeStateVars = {allowsDragging:'var(--allowsDragging__kbtjn3f)',allowsExpansion:'var(--allowsExpansion__kbtjn3g)',allowsVisibility:'var(--allowsVisibility__kbtjn3h)',showTreeLines:'var(--showTreeLines__kbtjn3i)',size:'var(--size__kbtjn3j)'};"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/tree/utils.ts"],"names":[],"mappings":";;;AAsBO,SAAS,yBACd,CAAA,EAAA,EACA,iBACA,EAAA,MAAA,EACA,OACoB,EAAA;AACpB,EAAO,OAAA;AAAA,IACL,iBAAA;AAAA,IACA,gBAAA;AAAA,IACA,QAAA,EAAU,CAAC,IACT,KAAA,CAAC,GAAG,IAAI,CAAA,CAAE,GAAI,CAAA,CAAC,GAAQ,KAAA;AACrB,MAAM,MAAA,IAAA,GAAO,MAAO,CAAA,GAAG,CAAG,EAAA,KAAA;AAE1B,MAAA,IAAI,CAAC,IAAM,EAAA;AACT,QAAA,OAAO,EAAC;AAAA;AAGV,MAAM,MAAA,OAAA,GAAU,IAAK,CAAA,SAAA,CAAU,IAAI,CAAA;AAEnC,MAAO,OAAA;AAAA,QACL,KAAA;AAAA,QACA,MAAA,IAAU,IAAO,GAAA,IAAA,CAAK,IAAO,GAAA,MAAA;AAAA,QAC7B,GAAI,OAAW,IAAA,IAAA,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A,MAAM,qBAAsB,CAAA,IAAA,EAAM,iBAAiB,CAAA;AAEnE,EAAO,OAAA,OAAA,GACH,IAAK,CAAA,KAAA,CAAM,OAAO,CAAA,GAClB,QAAQ,MAAO,CAAA,IAAI,KAAM,CAAA,2BAA2B,CAAC,CAAA;AAC3D;AAEA,eAAsB,qBAAA,CACpB,MACA,iBACA,EAAA;AACA,EAAA,OAAO,MAAM,OAAQ,CAAA,GAAA;AAAA,IACnB,iBAAkB,CAAA,GAAA;AAAA,MAChB,OAAO,IAAA,KACJ,MAAM,IAAA,CAAK,OAAQ,CAAA,IAAI,CACxB,IAAA,OAAA,CAAQ,MAAO,CAAA,IAAI,KAAM,CAAA,kBAAkB,CAAC;AAAA;AAChD,GACF;AACF","file":"utils.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { isTextDropItem } from '@react-aria/dnd';\nimport type {\n DropItem,\n DropOperation,\n Key,\n TextDropItem,\n} from '@react-types/shared';\nimport type { DragAndDropOptions } from 'react-aria-components';\nimport type { TreeNode, UseTreeResult } from '../../types/use-tree';\n\nexport function createDragAndDropHandlers<T>(\n id: Key,\n acceptedDragTypes: string[],\n lookup: Record<Key, TreeNode<T>>,\n actions: UseTreeResult<T>['actions'],\n): DragAndDropOptions {\n return {\n acceptedDragTypes,\n getDropOperation,\n getItems: (keys: Set<Key>) =>\n [...keys].map((key) => {\n const node = lookup[key]?.value;\n\n if (!node) {\n return {};\n }\n\n const payload = JSON.stringify(node);\n\n return [\n 'all',\n 'type' in node ? node.type : undefined,\n ...('types' in node ? (node.types ?? []) : []),\n ].reduce<Record<string, string>>((acc, type) => {\n if (!type) return acc;\n\n acc[`tree-${type}`] = payload;\n\n return acc;\n }, {});\n }),\n onDragEnd: () => actions.revertIsExpanded(),\n onDragStart: ({ keys }) => actions.toggleIsExpanded(keys, false, true),\n onInsert: ({ items, target }) => {\n // Wrap async return function where void expected, fuck SQ\n (async () => {\n const processedItems = await processDroppedItems(\n items,\n acceptedDragTypes,\n );\n\n actions.remove(...processedItems.map((item) => item.id));\n\n if (target.dropPosition === 'before') {\n actions.insertBefore(target.key, ...processedItems);\n } else if (target.dropPosition === 'after') {\n actions.insertAfter(target.key, ...processedItems);\n }\n })();\n },\n onReorder({ keys, target }) {\n const values = Array.from(keys).flatMap((key) => {\n const value = lookup[key]?.value;\n\n if (value) {\n return [value];\n }\n\n return [];\n });\n\n actions.remove(...keys);\n\n if (target.dropPosition === 'before') {\n actions.insertBefore(target.key, ...values);\n } else if (target.dropPosition === 'after') {\n actions.insertAfter(target.key, ...values);\n }\n },\n onRootDrop: ({ items }) => {\n // See above, thanks SQ for ensuring high quality code\n (async () => {\n const processedItems = await processDroppedItems(\n items,\n acceptedDragTypes,\n );\n\n actions.remove(...processedItems.map((item) => item.id));\n\n actions.append(id, ...processedItems);\n })();\n },\n };\n}\n\nexport function getDropOperation(): DropOperation {\n return 'move';\n}\n\nexport async function processDroppedItems(\n items: DropItem[],\n acceptedDragTypes: string[],\n) {\n return await Promise.all(\n items\n .filter(isTextDropItem)\n .map((item) => processDroppedItem(item, acceptedDragTypes)),\n );\n}\n\nexport async function processDroppedItem(\n item: TextDropItem,\n acceptedDragTypes: string[],\n) {\n const payload = await getDroppedItemPayload(item, acceptedDragTypes);\n\n return payload\n ? JSON.parse(payload)\n : Promise.reject(new Error('No supported type payload'));\n}\n\nexport async function getDroppedItemPayload(\n item: TextDropItem,\n acceptedDragTypes: string[],\n) {\n return await Promise.any(\n acceptedDragTypes.map(\n async (type) =>\n (await item.getText(type)) ??\n Promise.reject(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,QAAA,MAAM,iBAAiB,MAAM,mBAAA;AAAA,UAC3B,KAAA;AAAA,UACA;AAAA,SACF;AAEA,QAAA,OAAA,CAAQ,MAAA,CAAO,GAAG,cAAA,CAAe,GAAA,CAAI,CAAC,IAAA,KAAS,IAAA,CAAK,EAAE,CAAC,CAAA;AAEvD,QAAA,OAAA,CAAQ,MAAA,CAAO,EAAA,EAAI,GAAG,cAAc,CAAA;AAAA,OACtC,GAAG;AAAA;AACL,GACF;AACF;AAEO,SAAS,gBAAA,GAAkC;AAChD,EAAA,OAAO,MAAA;AACT;AAEA,eAAsB,mBAAA,CACpB,OACA,iBAAA,EACA;AACA,EAAA,OAAO,MAAM,OAAA,CAAQ,GAAA;AAAA,IACnB,KAAA,CACG,MAAA,CAAO,cAAc,CAAA,CACrB,GAAA,CAAI,CAAC,IAAA,KAAS,kBAAA,CAAmB,IAAA,EAAM,iBAAiB,CAAC;AAAA,GAC9D;AACF;AAEA,eAAsB,kBAAA,CACpB,MACA,iBAAA,EACA;AACA,EAAA,MAAM,OAAA,GAAU,MAAM,qBAAA,CAAsB,IAAA,EAAM,iBAAiB,CAAA;AAEnE,EAAA,OAAO,OAAA,GACH,IAAA,CAAK,KAAA,CAAM,OAAO,CAAA,GAClB,QAAQ,MAAA,CAAO,IAAI,KAAA,CAAM,2BAA2B,CAAC,CAAA;AAC3D;AAEA,eAAsB,qBAAA,CACpB,MACA,iBAAA,EACA;AACA,EAAA,OAAO,MAAM,OAAA,CAAQ,GAAA;AAAA,IACnB,iBAAA,CAAkB,GAAA;AAAA,MAChB,OAAO,IAAA,KACJ,MAAM,IAAA,CAAK,OAAA,CAAQ,IAAI,CAAA,IACxB,OAAA,CAAQ,MAAA,CAAO,IAAI,KAAA,CAAM,kBAAkB,CAAC;AAAA;AAChD,GACF;AACF","file":"utils.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { isTextDropItem } from '@react-aria/dnd';\nimport type {\n DropItem,\n DropOperation,\n Key,\n TextDropItem,\n} from '@react-types/shared';\nimport type { DragAndDropOptions } from 'react-aria-components';\nimport type { TreeNode, UseTreeResult } from '../../types/use-tree';\n\nexport function createDragAndDropHandlers<T>(\n id: Key,\n acceptedDragTypes: string[],\n lookup: Record<Key, TreeNode<T>>,\n actions: UseTreeResult<T>['actions'],\n): DragAndDropOptions {\n return {\n acceptedDragTypes,\n getDropOperation,\n getItems: (keys: Set<Key>) =>\n [...keys].map((key) => {\n const node = lookup[key]?.value;\n\n if (!node) {\n return {};\n }\n\n const payload = JSON.stringify(node);\n\n return [\n 'all',\n 'type' in node ? node.type : undefined,\n ...('types' in node ? (node.types ?? []) : []),\n ].reduce<Record<string, string>>((acc, type) => {\n if (!type) return acc;\n\n acc[`tree-${type}`] = payload;\n\n return acc;\n }, {});\n }),\n onDragEnd: () => actions.revertIsExpanded(),\n onDragStart: ({ keys }) => actions.toggleIsExpanded(keys, false, true),\n onInsert: ({ items, target }) => {\n // Wrap async return function where void expected, fuck SQ\n (async () => {\n const processedItems = await processDroppedItems(\n items,\n acceptedDragTypes,\n );\n\n actions.remove(...processedItems.map((item) => item.id));\n\n if (target.dropPosition === 'before') {\n actions.insertBefore(target.key, ...processedItems);\n } else if (target.dropPosition === 'after') {\n actions.insertAfter(target.key, ...processedItems);\n }\n })();\n },\n onReorder({ keys, target }) {\n const values = Array.from(keys).flatMap((key) => {\n const value = lookup[key]?.value;\n\n if (value) {\n return [value];\n }\n\n return [];\n });\n\n actions.remove(...keys);\n\n if (target.dropPosition === 'before') {\n actions.insertBefore(target.key, ...values);\n } else if (target.dropPosition === 'after') {\n actions.insertAfter(target.key, ...values);\n }\n },\n onRootDrop: ({ items }) => {\n // See above, thanks SQ for ensuring high quality code\n (async () => {\n const processedItems = await processDroppedItems(\n items,\n acceptedDragTypes,\n );\n\n actions.remove(...processedItems.map((item) => item.id));\n\n actions.append(id, ...processedItems);\n })();\n },\n };\n}\n\nexport function getDropOperation(): DropOperation {\n return 'move';\n}\n\nexport async function processDroppedItems(\n items: DropItem[],\n acceptedDragTypes: string[],\n) {\n return await Promise.all(\n items\n .filter(isTextDropItem)\n .map((item) => processDroppedItem(item, acceptedDragTypes)),\n );\n}\n\nexport async function processDroppedItem(\n item: TextDropItem,\n acceptedDragTypes: string[],\n) {\n const payload = await getDroppedItemPayload(item, acceptedDragTypes);\n\n return payload\n ? JSON.parse(payload)\n : Promise.reject(new Error('No supported type payload'));\n}\n\nexport async function getDroppedItemPayload(\n item: TextDropItem,\n acceptedDragTypes: string[],\n) {\n return await Promise.any(\n acceptedDragTypes.map(\n async (type) =>\n (await item.getText(type)) ??\n Promise.reject(new Error('Unsupported type')),\n ),\n );\n}\n"]}
@@ -12,29 +12,28 @@ import '@react-types/shared';
12
12
  import 'react';
13
13
  import 'react-aria-components';
14
14
  import 'react/jsx-runtime';
15
- import '../components/slider/types.js';
16
- import 'type-fest';
17
- import '../types/generic.js';
18
- import '../types/react-aria.js';
19
- import '../components/group/types.js';
20
- import '../components/number-field/types.js';
21
- import '../types/props.js';
22
15
  import '../components/button/types.js';
16
+ import '../types/props.js';
17
+ import '../types/react-aria.js';
23
18
  import '../components/icon/types.js';
24
- import '../components/input/types.js';
25
19
  import '../components/checkbox/types.js';
20
+ import 'type-fest';
26
21
  import '../components/chip/types.js';
22
+ import '../types/generic.js';
27
23
  import '../components/combo-box/types.js';
24
+ import '../components/input/types.js';
28
25
  import '../components/options/types.js';
29
26
  import '../components/date-field/types.js';
30
27
  import '../components/date-input/types.js';
31
28
  import '@react-stately/datepicker';
32
29
  import '../components/dialog/types.js';
30
+ import '../components/group/types.js';
33
31
  import '../components/drawer/types.js';
34
32
  import '@react-aria/overlays';
35
33
  import '@react-stately/overlays';
36
34
  import '../components/tabs/types.js';
37
35
  import '../components/menu/types.js';
36
+ import '../components/number-field/types.js';
38
37
  import '../components/picker/types.js';
39
38
  import '../components/popover/types.js';
40
39
  import '../components/radio/types.js';
@@ -42,6 +41,7 @@ import '../components/select/types.js';
42
41
  import '../components/switch/types.js';
43
42
  import '../components/textarea/types.js';
44
43
  import '../components/search-field/types.js';
44
+ import '../components/slider/types.js';
45
45
  import '../components/text-field/types.js';
46
46
  import '../components/time-field/types.js';
47
47
  import '../components/tooltip/types.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/use-collection-render/index.tsx"],"names":[],"mappings":";;;;AAqBO,SAAS,mBAAA,CACd,UACA,EAAA,MAAA,EACA,mBACA,EAAA;AACA,EAAA,OAAO,iBAAkB,CAAA;AAAA;AAAA,IAEvB,OAAO,MAAS,GAAA,UAAA,CAAW,WAAa,CAAA,MAAA,CAAO,GAAG,CAAI,GAAA,UAAA;AAAA,IACtD,YAAA,EAAc,CAAC,mBAAmB,CAAA;AAAA,IAClC,SAAS,IAAM,EAAA;AAEb,MAAM,MAAA,QAAA,GAAW,IAAK,CAAA,MAAA,CAAQ,IAAI,CAAA;AAElC,MAAA,IAAI,CAAC,mBAAA,IAAuB,IAAK,CAAA,IAAA,KAAS,MAAQ,EAAA;AAChD,QAAO,OAAA,QAAA;AAAA;AAGT,MAAM,MAAA,EAAE,KAAQ,GAAA,IAAA;AAChB,MAAM,MAAA,QAAA,GAAW,UAAW,CAAA,WAAA,CAAY,GAAG,CAAA;AAE3C,MAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,QAAA,mBAAA,CAAoB,EAAE,IAAM,EAAA,MAAA,EAAQ,GAAK,EAAA,YAAA,EAAc,UAAU,CAAA;AAAA,QACjE,QAAA;AAAA,QAAA,CACC,QAAY,IAAA,IAAA,IACZ,UAAW,CAAA,OAAA,CAAQ,QAAQ,CAAG,EAAA,IAAA,KAAS,MACvC,KAAA,mBAAA,CAAoB,EAAE,IAAM,EAAA,MAAA,EAAQ,GAAK,EAAA,YAAA,EAAc,SAAS;AAAA,OACpE,EAAA,CAAA;AAAA;AAEJ,GACD,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useCachedChildren } from '@react-aria/collections';\nimport type { Collection, ItemDropTarget, Node } from '@react-types/shared';\nimport type { ReactNode } from 'react';\n\n/**\n * Copied from RAC, unexported hook: https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Collection.tsx#L148\n *\n * Hook serves as the basis of the root and branch renderers for Collections: https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Collection.tsx#L139\n */\nexport function useCollectionRender(\n collection: Collection<Node<unknown>>,\n parent: Node<unknown> | null,\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode,\n) {\n return useCachedChildren({\n // biome-ignore lint/style/noNonNullAssertion: intentional\n items: parent ? collection.getChildren!(parent.key) : collection,\n dependencies: [renderDropIndicator],\n children(node) {\n // biome-ignore lint/style/noNonNullAssertion: intentional\n const rendered = node.render!(node);\n\n if (!renderDropIndicator || node.type !== 'item') {\n return rendered;\n }\n\n const { key } = node;\n const keyAfter = collection.getKeyAfter(key);\n\n return (\n <>\n {renderDropIndicator({ type: 'item', key, dropPosition: 'before' })}\n {rendered}\n {(keyAfter == null ||\n collection.getItem(keyAfter)?.type !== 'item') &&\n renderDropIndicator({ type: 'item', key, dropPosition: 'after' })}\n </>\n );\n },\n });\n}\n"]}
1
+ {"version":3,"sources":["../../../src/hooks/use-collection-render/index.tsx"],"names":[],"mappings":";;;;AAqBO,SAAS,mBAAA,CACd,UAAA,EACA,MAAA,EACA,mBAAA,EACA;AACA,EAAA,OAAO,iBAAA,CAAkB;AAAA;AAAA,IAEvB,OAAO,MAAA,GAAS,UAAA,CAAW,WAAA,CAAa,MAAA,CAAO,GAAG,CAAA,GAAI,UAAA;AAAA,IACtD,YAAA,EAAc,CAAC,mBAAmB,CAAA;AAAA,IAClC,SAAS,IAAA,EAAM;AAEb,MAAA,MAAM,QAAA,GAAW,IAAA,CAAK,MAAA,CAAQ,IAAI,CAAA;AAElC,MAAA,IAAI,CAAC,mBAAA,IAAuB,IAAA,CAAK,IAAA,KAAS,MAAA,EAAQ;AAChD,QAAA,OAAO,QAAA;AAAA;AAGT,MAAA,MAAM,EAAE,KAAI,GAAI,IAAA;AAChB,MAAA,MAAM,QAAA,GAAW,UAAA,CAAW,WAAA,CAAY,GAAG,CAAA;AAE3C,MAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,QAAA,mBAAA,CAAoB,EAAE,IAAA,EAAM,MAAA,EAAQ,GAAA,EAAK,YAAA,EAAc,UAAU,CAAA;AAAA,QACjE,QAAA;AAAA,QAAA,CACC,QAAA,IAAY,IAAA,IACZ,UAAA,CAAW,OAAA,CAAQ,QAAQ,CAAA,EAAG,IAAA,KAAS,MAAA,KACvC,mBAAA,CAAoB,EAAE,IAAA,EAAM,MAAA,EAAQ,GAAA,EAAK,YAAA,EAAc,SAAS;AAAA,OAAA,EACpE,CAAA;AAAA;AAEJ,GACD,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useCachedChildren } from '@react-aria/collections';\nimport type { Collection, ItemDropTarget, Node } from '@react-types/shared';\nimport type { ReactNode } from 'react';\n\n/**\n * Copied from RAC, unexported hook: https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Collection.tsx#L148\n *\n * Hook serves as the basis of the root and branch renderers for Collections: https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Collection.tsx#L139\n */\nexport function useCollectionRender(\n collection: Collection<Node<unknown>>,\n parent: Node<unknown> | null,\n renderDropIndicator?: (target: ItemDropTarget) => ReactNode,\n) {\n return useCachedChildren({\n // biome-ignore lint/style/noNonNullAssertion: intentional\n items: parent ? collection.getChildren!(parent.key) : collection,\n dependencies: [renderDropIndicator],\n children(node) {\n // biome-ignore lint/style/noNonNullAssertion: intentional\n const rendered = node.render!(node);\n\n if (!renderDropIndicator || node.type !== 'item') {\n return rendered;\n }\n\n const { key } = node;\n const keyAfter = collection.getKeyAfter(key);\n\n return (\n <>\n {renderDropIndicator({ type: 'item', key, dropPosition: 'before' })}\n {rendered}\n {(keyAfter == null ||\n collection.getItem(keyAfter)?.type !== 'item') &&\n renderDropIndicator({ type: 'item', key, dropPosition: 'after' })}\n </>\n );\n },\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/use-context-props/index.ts"],"names":[],"mappings":";;;;;;AA8BO,SAAS,eAAA,CACd,KACA,EAAA,GAAA,EACA,OAC0B,EAAA;AAC1B,EAAA,MAAM,QAAS,iBAAkB,CAAA,OAAA,EAAS,KAAM,CAAA,IAAI,KAAK,EAAC;AAI1D,EAAA,MAAM,EAAE,GAAA,EAAK,UAAY,EAAA,GAAG,cAAiB,GAAA,KAAA;AAE7C,EAAO,OAAA;AAAA,IACL,UAAA,CAAW,cAA4B,KAAK,CAAA;AAAA,IAC5C,YAAA,CAAa,OAAQ,CAAA,MAAM,SAAU,CAAA,GAAA,EAAK,UAAU,CAAA,EAAG,CAAC,GAAA,EAAK,UAAU,CAAC,CAAC;AAAA,GAC3E;AACF","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { mergeRefs, useObjectRef } from '@react-aria/utils';\nimport {\n type Context,\n type ForwardedRef,\n type RefObject,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n type SlotProps,\n useSlottedContext,\n} from 'react-aria-components';\nimport { mergeProps } from '../../utils/props';\n\n/**\n * Reimplementation of React Aria's useContextProps, to utilize our own\n * mergeProps which handles renderProps and classNames\n */\nexport function useContextProps<T, U extends SlotProps, E extends Element>(\n props: T & SlotProps,\n ref: ForwardedRef<E>,\n context: Context<ContextValue<U, E>>,\n): [T, RefObject<E | null>] {\n const value = (useSlottedContext(context, props.slot) ?? {}) as Partial<T> & {\n ref?: ForwardedRef<E>;\n };\n\n const { ref: contextRef, ...contextProps } = value;\n\n return [\n mergeProps(contextProps as Partial<T>, props) as T,\n useObjectRef(useMemo(() => mergeRefs(ref, contextRef), [ref, contextRef])),\n ];\n}\n"]}
1
+ {"version":3,"sources":["../../../src/hooks/use-context-props/index.ts"],"names":[],"mappings":";;;;;;AA8BO,SAAS,eAAA,CACd,KAAA,EACA,GAAA,EACA,OAAA,EAC0B;AAC1B,EAAA,MAAM,QAAS,iBAAA,CAAkB,OAAA,EAAS,KAAA,CAAM,IAAI,KAAK,EAAC;AAI1D,EAAA,MAAM,EAAE,GAAA,EAAK,UAAA,EAAY,GAAG,cAAa,GAAI,KAAA;AAE7C,EAAA,OAAO;AAAA,IACL,UAAA,CAAW,cAA4B,KAAK,CAAA;AAAA,IAC5C,YAAA,CAAa,OAAA,CAAQ,MAAM,SAAA,CAAU,GAAA,EAAK,UAAU,CAAA,EAAG,CAAC,GAAA,EAAK,UAAU,CAAC,CAAC;AAAA,GAC3E;AACF","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { mergeRefs, useObjectRef } from '@react-aria/utils';\nimport {\n type Context,\n type ForwardedRef,\n type RefObject,\n useMemo,\n} from 'react';\nimport {\n type ContextValue,\n type SlotProps,\n useSlottedContext,\n} from 'react-aria-components';\nimport { mergeProps } from '../../utils/props';\n\n/**\n * Reimplementation of React Aria's useContextProps, to utilize our own\n * mergeProps which handles renderProps and classNames\n */\nexport function useContextProps<T, U extends SlotProps, E extends Element>(\n props: T & SlotProps,\n ref: ForwardedRef<E>,\n context: Context<ContextValue<U, E>>,\n): [T, RefObject<E | null>] {\n const value = (useSlottedContext(context, props.slot) ?? {}) as Partial<T> & {\n ref?: ForwardedRef<E>;\n };\n\n const { ref: contextRef, ...contextProps } = value;\n\n return [\n mergeProps(contextProps as Partial<T>, props) as T,\n useObjectRef(useMemo(() => mergeRefs(ref, contextRef), [ref, contextRef])),\n ];\n}\n"]}
@@ -1,5 +1,4 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SliderProps, SliderBarProps, SliderInputProps, SliderOutputProps, SliderThumbProps, SliderTrackProps } from '../../components/slider/types.js';
3
2
  import * as react_aria_components from 'react-aria-components';
4
3
  import { ButtonProps, LinkButtonProps, ToggleButtonProps } from '../../components/button/types.js';
5
4
  import { CheckboxProps, CheckboxGroupProps } from '../../components/checkbox/types.js';
@@ -22,19 +21,20 @@ import { SelectProps } from '../../components/select/types.js';
22
21
  import { SwitchProps } from '../../components/switch/types.js';
23
22
  import { TextAreaProps } from '../../components/textarea/types.js';
24
23
  import { SearchFieldProps } from '../../components/search-field/types.js';
24
+ import { SliderProps, SliderBarProps, SliderInputProps, SliderOutputProps, SliderThumbProps, SliderTrackProps } from '../../components/slider/types.js';
25
25
  import { TabProps, TabListProps, TabPanelProps, TabPanelsProps, TabsProps } from '../../components/tabs/types.js';
26
26
  import { TextFieldProps } from '../../components/text-field/types.js';
27
27
  import { TimeFieldProps } from '../../components/time-field/types.js';
28
28
  import { TooltipProps, TooltipTargetProps } from '../../components/tooltip/types.js';
29
29
  import { TreeProps } from '../../components/tree/types.js';
30
30
  import { DefaultsProviderProps, DefaultsContext } from './types.js';
31
- import 'type-fest';
32
- import '../../types/generic.js';
33
31
  import '../../types/react-aria.js';
34
32
  import 'react';
35
- import '../../components/group/types.js';
36
33
  import '@react-types/shared';
34
+ import 'type-fest';
35
+ import '../../types/generic.js';
37
36
  import '@react-stately/datepicker';
37
+ import '../../components/group/types.js';
38
38
  import '@react-aria/overlays';
39
39
  import '@react-stately/overlays';
40
40
  import '../../types/use-tree.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/use-defaults/index.tsx"],"names":[],"mappings":";;;;;AAgBA,IAAM,eAAA,GAAkB,aAA+B,CAAA,EAAE,CAAA;AAKlD,SAAS,WAAc,GAAA;AAC5B,EAAA,OAAO,WAAW,eAAe,CAAA;AACnC;AAMO,SAAS,eAAA,CAGd,OAAU,GAAW,EAAA;AACrB,EAAA,MAAM,WAAW,WAAY,EAAA;AAE7B,EAAA,MAAM,YAAe,GAAA,OAAA;AAAA,IACnB,MAAO,QAAA,CAAS,GAAG,CAAA,IAAK,EAAC;AAAA,IACzB,CAAC,UAAU,GAAG;AAAA,GAChB;AAEA,EAAO,OAAA,OAAA;AAAA,IACL,MAAM,UAAW,CAAA,YAAA,EAAc,KAAK,CAAA;AAAA,IACpC,CAAC,cAAc,KAAK;AAAA,GACtB;AACF;AAUO,SAAS,gBAAiB,CAAA;AAAA,EAC/B,QAAA;AAAA,EACA,QAAU,EAAA;AACZ,CAA0B,EAAA;AACxB,EAAA,MAAM,WAAW,WAAY,EAAA;AAE7B,EAAA,MAAM,OAAU,GAAA,OAAA;AAAA,IACd,OAAO,EAAE,GAAG,QAAA,EAAU,GAAG,YAAa,EAAA,CAAA;AAAA,IACtC,CAAC,UAAU,YAAY;AAAA,GACzB;AAEA,EAAM,MAAA,EAAE,UAAa,GAAA,eAAA;AAErB,EAAA,uBAAQ,GAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,OAAA,EAAU,QAAS,EAAA,CAAA;AAC7C","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { createContext, useContext, useMemo } from 'react';\nimport { mergeProps } from '../../utils/props';\nimport type { DefaultsContext, DefaultsProviderProps } from './types';\n\nconst defaultsContext = createContext<DefaultsContext>({});\n\n/**\n * Access globally established component prop defaults\n */\nexport function useDefaults() {\n return useContext(defaultsContext);\n}\n\n/**\n * Select default props from context and merge with provided props\n * with provided props taking precedence\n */\nexport function useDefaultProps<\n K extends keyof DefaultsContext,\n P extends DefaultsContext[K],\n>(props: P, key: K): P {\n const defaults = useDefaults();\n\n const defaultProps = useMemo(\n () => (defaults[key] ?? {}) as Partial<P>,\n [defaults, key],\n );\n\n return useMemo(\n () => mergeProps(defaultProps, props) as P,\n [defaultProps, props],\n );\n}\n\n/**\n * Set default props for any component, to be merged in with props at point\n * of implementation. Global defaults take lower priority than props from\n * composition context or props attached to instance\n *\n * Nested instances of this provider will shallow merge defaults from parent\n * context, with the defaults prop taking precedence\n */\nexport function DefaultsProvider({\n children,\n defaults: defaultsProp,\n}: DefaultsProviderProps) {\n const defaults = useDefaults();\n\n const context = useMemo(\n () => ({ ...defaults, ...defaultsProp }),\n [defaults, defaultsProp],\n );\n\n const { Provider } = defaultsContext;\n\n return <Provider value={context}>{children}</Provider>;\n}\n"]}
1
+ {"version":3,"sources":["../../../src/hooks/use-defaults/index.tsx"],"names":[],"mappings":";;;;;AAgBA,IAAM,eAAA,GAAkB,aAAA,CAA+B,EAAE,CAAA;AAKlD,SAAS,WAAA,GAAc;AAC5B,EAAA,OAAO,WAAW,eAAe,CAAA;AACnC;AAMO,SAAS,eAAA,CAGd,OAAU,GAAA,EAAW;AACrB,EAAA,MAAM,WAAW,WAAA,EAAY;AAE7B,EAAA,MAAM,YAAA,GAAe,OAAA;AAAA,IACnB,MAAO,QAAA,CAAS,GAAG,CAAA,IAAK,EAAC;AAAA,IACzB,CAAC,UAAU,GAAG;AAAA,GAChB;AAEA,EAAA,OAAO,OAAA;AAAA,IACL,MAAM,UAAA,CAAW,YAAA,EAAc,KAAK,CAAA;AAAA,IACpC,CAAC,cAAc,KAAK;AAAA,GACtB;AACF;AAUO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,QAAA;AAAA,EACA,QAAA,EAAU;AACZ,CAAA,EAA0B;AACxB,EAAA,MAAM,WAAW,WAAA,EAAY;AAE7B,EAAA,MAAM,OAAA,GAAU,OAAA;AAAA,IACd,OAAO,EAAE,GAAG,QAAA,EAAU,GAAG,YAAA,EAAa,CAAA;AAAA,IACtC,CAAC,UAAU,YAAY;AAAA,GACzB;AAEA,EAAA,MAAM,EAAE,UAAS,GAAI,eAAA;AAErB,EAAA,uBAAO,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAO,OAAA,EAAU,QAAA,EAAS,CAAA;AAC7C","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { createContext, useContext, useMemo } from 'react';\nimport { mergeProps } from '../../utils/props';\nimport type { DefaultsContext, DefaultsProviderProps } from './types';\n\nconst defaultsContext = createContext<DefaultsContext>({});\n\n/**\n * Access globally established component prop defaults\n */\nexport function useDefaults() {\n return useContext(defaultsContext);\n}\n\n/**\n * Select default props from context and merge with provided props\n * with provided props taking precedence\n */\nexport function useDefaultProps<\n K extends keyof DefaultsContext,\n P extends DefaultsContext[K],\n>(props: P, key: K): P {\n const defaults = useDefaults();\n\n const defaultProps = useMemo(\n () => (defaults[key] ?? {}) as Partial<P>,\n [defaults, key],\n );\n\n return useMemo(\n () => mergeProps(defaultProps, props) as P,\n [defaultProps, props],\n );\n}\n\n/**\n * Set default props for any component, to be merged in with props at point\n * of implementation. Global defaults take lower priority than props from\n * composition context or props attached to instance\n *\n * Nested instances of this provider will shallow merge defaults from parent\n * context, with the defaults prop taking precedence\n */\nexport function DefaultsProvider({\n children,\n defaults: defaultsProp,\n}: DefaultsProviderProps) {\n const defaults = useDefaults();\n\n const context = useMemo(\n () => ({ ...defaults, ...defaultsProp }),\n [defaults, defaultsProp],\n );\n\n const { Provider } = defaultsContext;\n\n return <Provider value={context}>{children}</Provider>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/use-propagating-press/index.ts"],"names":[],"mappings":";;;;;AAuBO,SAAS,oBAAoB,KAAuB,EAAA;AACzD,EAAO,OAAA,QAAA;AAAA,IACL,UAAA;AAAA,MACE;AAAA,QACE,OAAS,EAAA,mBAAA;AAAA,QACT,UAAY,EAAA,mBAAA;AAAA,QACZ,YAAc,EAAA,mBAAA;AAAA,QACd,SAAW,EAAA;AAAA,OACb;AAAA,MACA;AAAA;AACF,GACF;AACF","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { type PressHookProps, usePress } from '@react-aria/interactions';\nimport { continuePropagation } from '../../utils/events';\nimport { mergeProps } from '../../utils/props';\n\n/**\n * The default behavior of usePress is to stop all propagation of press events\n *\n * To allow the more typical behavior of event propagation by default, this hook\n * continues propagation of press events. This allows for nested press event\n * listeners to not block press event listeners higher in the heirarchy\n */\nexport function usePropagatingPress(props: PressHookProps) {\n return usePress(\n mergeProps(\n {\n onPress: continuePropagation,\n onPressEnd: continuePropagation,\n onPressStart: continuePropagation,\n onPressUp: continuePropagation,\n },\n props,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["../../../src/hooks/use-propagating-press/index.ts"],"names":[],"mappings":";;;;;AAuBO,SAAS,oBAAoB,KAAA,EAAuB;AACzD,EAAA,OAAO,QAAA;AAAA,IACL,UAAA;AAAA,MACE;AAAA,QACE,OAAA,EAAS,mBAAA;AAAA,QACT,UAAA,EAAY,mBAAA;AAAA,QACZ,YAAA,EAAc,mBAAA;AAAA,QACd,SAAA,EAAW;AAAA,OACb;AAAA,MACA;AAAA;AACF,GACF;AACF","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { type PressHookProps, usePress } from '@react-aria/interactions';\nimport { continuePropagation } from '../../utils/events';\nimport { mergeProps } from '../../utils/props';\n\n/**\n * The default behavior of usePress is to stop all propagation of press events\n *\n * To allow the more typical behavior of event propagation by default, this hook\n * continues propagation of press events. This allows for nested press event\n * listeners to not block press event listeners higher in the heirarchy\n */\nexport function usePropagatingPress(props: PressHookProps) {\n return usePress(\n mergeProps(\n {\n onPress: continuePropagation,\n onPressEnd: continuePropagation,\n onPressStart: continuePropagation,\n onPressUp: continuePropagation,\n },\n props,\n ),\n );\n}\n"]}