@razorpay/blade 11.19.1 → 11.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/build/lib/native/components/Accordion/AccordionItem.js +1 -1
  2. package/build/lib/native/components/Accordion/AccordionItem.js.map +1 -1
  3. package/build/lib/native/components/Collapsible/Collapsible.js +1 -1
  4. package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
  5. package/build/lib/native/components/Collapsible/CollapsibleBody.js +1 -1
  6. package/build/lib/native/components/Collapsible/CollapsibleBody.js.map +1 -1
  7. package/build/lib/native/components/Collapsible/CollapsibleBodyContent.native.js +1 -1
  8. package/build/lib/native/components/Collapsible/CollapsibleBodyContent.native.js.map +1 -1
  9. package/build/lib/native/components/Collapsible/CollapsibleLink.js +8 -1
  10. package/build/lib/native/components/Collapsible/CollapsibleLink.js.map +1 -1
  11. package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
  12. package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
  13. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +1 -1
  14. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
  15. package/build/lib/native/components/SideNav/SideNav.native.js +17 -0
  16. package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -0
  17. package/build/lib/native/components/SideNav/SideNavBody.native.js +17 -0
  18. package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -0
  19. package/build/lib/native/components/SideNav/SideNavFooter.native.js +17 -0
  20. package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -0
  21. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +17 -0
  22. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -0
  23. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +17 -0
  24. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -0
  25. package/build/lib/native/components/SideNav/SideNavLevel.native.js +17 -0
  26. package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -0
  27. package/build/lib/native/components/SideNav/SideNavSection.native.js +17 -0
  28. package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -0
  29. package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +1 -1
  30. package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  31. package/build/lib/native/components/index.js +7 -0
  32. package/build/lib/native/components/index.js.map +1 -1
  33. package/build/lib/native/tokens/global/size.js +1 -1
  34. package/build/lib/native/tokens/global/size.js.map +1 -1
  35. package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
  36. package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
  37. package/build/lib/web/development/components/Accordion/AccordionItem.js +1 -0
  38. package/build/lib/web/development/components/Accordion/AccordionItem.js.map +1 -1
  39. package/build/lib/web/development/components/Collapsible/Collapsible.js +4 -2
  40. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  41. package/build/lib/web/development/components/Collapsible/CollapsibleBody.js +4 -1
  42. package/build/lib/web/development/components/Collapsible/CollapsibleBody.js.map +1 -1
  43. package/build/lib/web/development/components/Collapsible/CollapsibleBodyContent.web.js +4 -2
  44. package/build/lib/web/development/components/Collapsible/CollapsibleBodyContent.web.js.map +1 -1
  45. package/build/lib/web/development/components/Collapsible/CollapsibleLink.js +16 -4
  46. package/build/lib/web/development/components/Collapsible/CollapsibleLink.js.map +1 -1
  47. package/build/lib/web/development/components/Collapsible/commonStyles.js +5 -1
  48. package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
  49. package/build/lib/web/development/components/DatePicker/Calendar.web.js +9 -5
  50. package/build/lib/web/development/components/DatePicker/Calendar.web.js.map +1 -1
  51. package/build/lib/web/development/components/DatePicker/CalendarStyles.web.js +40 -33
  52. package/build/lib/web/development/components/DatePicker/CalendarStyles.web.js.map +1 -1
  53. package/build/lib/web/development/components/DatePicker/DateInput.web.js +2 -1
  54. package/build/lib/web/development/components/DatePicker/DateInput.web.js.map +1 -1
  55. package/build/lib/web/development/components/DatePicker/DatePicker.web.js +5 -5
  56. package/build/lib/web/development/components/DatePicker/DatePicker.web.js.map +1 -1
  57. package/build/lib/web/development/components/DatePicker/shiftTimezone.js +39 -0
  58. package/build/lib/web/development/components/DatePicker/shiftTimezone.js.map +1 -0
  59. package/build/lib/web/development/components/DatePicker/useControlledDates.js +5 -8
  60. package/build/lib/web/development/components/DatePicker/useControlledDates.js.map +1 -1
  61. package/build/lib/web/development/components/DatePicker/utils.js +33 -1
  62. package/build/lib/web/development/components/DatePicker/utils.js.map +1 -1
  63. package/build/lib/web/development/components/Drawer/Drawer.web.js +25 -10
  64. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  65. package/build/lib/web/development/components/Drawer/DrawerContext.js +3 -1
  66. package/build/lib/web/development/components/Drawer/DrawerContext.js.map +1 -1
  67. package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js +26 -4
  68. package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
  69. package/build/lib/web/development/components/Drawer/StackProvider.js +21 -12
  70. package/build/lib/web/development/components/Drawer/StackProvider.js.map +1 -1
  71. package/build/lib/web/development/components/Drawer/index.js +1 -1
  72. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +3 -0
  73. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  74. package/build/lib/web/development/components/SideNav/SideNav.web.js +360 -0
  75. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -0
  76. package/build/lib/web/development/components/SideNav/SideNavBody.web.js +17 -0
  77. package/build/lib/web/development/components/SideNav/SideNavBody.web.js.map +1 -0
  78. package/build/lib/web/development/components/SideNav/SideNavContext.js +23 -0
  79. package/build/lib/web/development/components/SideNav/SideNavContext.js.map +1 -0
  80. package/build/lib/web/development/components/SideNav/SideNavFooter.web.js +55 -0
  81. package/build/lib/web/development/components/SideNav/SideNavFooter.web.js.map +1 -0
  82. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js +66 -0
  83. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -0
  84. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js +348 -0
  85. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -0
  86. package/build/lib/web/development/components/SideNav/SideNavItems/TooltipifyNavItem.js +22 -0
  87. package/build/lib/web/development/components/SideNav/SideNavItems/TooltipifyNavItem.js.map +1 -0
  88. package/build/lib/web/development/components/SideNav/SideNavLevel.web.js +65 -0
  89. package/build/lib/web/development/components/SideNav/SideNavLevel.web.js.map +1 -0
  90. package/build/lib/web/development/components/SideNav/SideNavSection.web.js +141 -0
  91. package/build/lib/web/development/components/SideNav/SideNavSection.web.js.map +1 -0
  92. package/build/lib/web/development/components/SideNav/index.js +8 -0
  93. package/build/lib/web/development/components/SideNav/index.js.map +1 -0
  94. package/build/lib/web/development/components/SideNav/tokens.js +33 -0
  95. package/build/lib/web/development/components/SideNav/tokens.js.map +1 -0
  96. package/build/lib/web/development/components/SkipNav/SkipNav.web.js +11 -3
  97. package/build/lib/web/development/components/SkipNav/SkipNav.web.js.map +1 -1
  98. package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +1 -1
  99. package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  100. package/build/lib/web/development/components/index.js +9 -1
  101. package/build/lib/web/development/components/index.js.map +1 -1
  102. package/build/lib/web/development/tokens/global/size.js +6 -0
  103. package/build/lib/web/development/tokens/global/size.js.map +1 -1
  104. package/build/lib/web/development/utils/metaAttribute/metaConstants.js +1 -0
  105. package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
  106. package/build/lib/web/production/components/Accordion/AccordionItem.js +1 -0
  107. package/build/lib/web/production/components/Accordion/AccordionItem.js.map +1 -1
  108. package/build/lib/web/production/components/Collapsible/Collapsible.js +4 -2
  109. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  110. package/build/lib/web/production/components/Collapsible/CollapsibleBody.js +4 -1
  111. package/build/lib/web/production/components/Collapsible/CollapsibleBody.js.map +1 -1
  112. package/build/lib/web/production/components/Collapsible/CollapsibleBodyContent.web.js +4 -2
  113. package/build/lib/web/production/components/Collapsible/CollapsibleBodyContent.web.js.map +1 -1
  114. package/build/lib/web/production/components/Collapsible/CollapsibleLink.js +16 -4
  115. package/build/lib/web/production/components/Collapsible/CollapsibleLink.js.map +1 -1
  116. package/build/lib/web/production/components/Collapsible/commonStyles.js +5 -1
  117. package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
  118. package/build/lib/web/production/components/DatePicker/Calendar.web.js +9 -5
  119. package/build/lib/web/production/components/DatePicker/Calendar.web.js.map +1 -1
  120. package/build/lib/web/production/components/DatePicker/CalendarStyles.web.js +40 -33
  121. package/build/lib/web/production/components/DatePicker/CalendarStyles.web.js.map +1 -1
  122. package/build/lib/web/production/components/DatePicker/DateInput.web.js +2 -1
  123. package/build/lib/web/production/components/DatePicker/DateInput.web.js.map +1 -1
  124. package/build/lib/web/production/components/DatePicker/DatePicker.web.js +5 -5
  125. package/build/lib/web/production/components/DatePicker/DatePicker.web.js.map +1 -1
  126. package/build/lib/web/production/components/DatePicker/shiftTimezone.js +39 -0
  127. package/build/lib/web/production/components/DatePicker/shiftTimezone.js.map +1 -0
  128. package/build/lib/web/production/components/DatePicker/useControlledDates.js +5 -8
  129. package/build/lib/web/production/components/DatePicker/useControlledDates.js.map +1 -1
  130. package/build/lib/web/production/components/DatePicker/utils.js +33 -1
  131. package/build/lib/web/production/components/DatePicker/utils.js.map +1 -1
  132. package/build/lib/web/production/components/Drawer/Drawer.web.js +25 -10
  133. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  134. package/build/lib/web/production/components/Drawer/DrawerContext.js +3 -1
  135. package/build/lib/web/production/components/Drawer/DrawerContext.js.map +1 -1
  136. package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js +26 -4
  137. package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
  138. package/build/lib/web/production/components/Drawer/StackProvider.js +21 -12
  139. package/build/lib/web/production/components/Drawer/StackProvider.js.map +1 -1
  140. package/build/lib/web/production/components/Drawer/index.js +1 -1
  141. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +3 -0
  142. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  143. package/build/lib/web/production/components/SideNav/SideNav.web.js +360 -0
  144. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -0
  145. package/build/lib/web/production/components/SideNav/SideNavBody.web.js +17 -0
  146. package/build/lib/web/production/components/SideNav/SideNavBody.web.js.map +1 -0
  147. package/build/lib/web/production/components/SideNav/SideNavContext.js +23 -0
  148. package/build/lib/web/production/components/SideNav/SideNavContext.js.map +1 -0
  149. package/build/lib/web/production/components/SideNav/SideNavFooter.web.js +55 -0
  150. package/build/lib/web/production/components/SideNav/SideNavFooter.web.js.map +1 -0
  151. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js +66 -0
  152. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -0
  153. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js +348 -0
  154. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -0
  155. package/build/lib/web/production/components/SideNav/SideNavItems/TooltipifyNavItem.js +22 -0
  156. package/build/lib/web/production/components/SideNav/SideNavItems/TooltipifyNavItem.js.map +1 -0
  157. package/build/lib/web/production/components/SideNav/SideNavLevel.web.js +65 -0
  158. package/build/lib/web/production/components/SideNav/SideNavLevel.web.js.map +1 -0
  159. package/build/lib/web/production/components/SideNav/SideNavSection.web.js +141 -0
  160. package/build/lib/web/production/components/SideNav/SideNavSection.web.js.map +1 -0
  161. package/build/lib/web/production/components/SideNav/index.js +8 -0
  162. package/build/lib/web/production/components/SideNav/index.js.map +1 -0
  163. package/build/lib/web/production/components/SideNav/tokens.js +33 -0
  164. package/build/lib/web/production/components/SideNav/tokens.js.map +1 -0
  165. package/build/lib/web/production/components/SkipNav/SkipNav.web.js +11 -3
  166. package/build/lib/web/production/components/SkipNav/SkipNav.web.js.map +1 -1
  167. package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +1 -1
  168. package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  169. package/build/lib/web/production/components/index.js +9 -1
  170. package/build/lib/web/production/components/index.js.map +1 -1
  171. package/build/lib/web/production/tokens/global/size.js +6 -0
  172. package/build/lib/web/production/tokens/global/size.js.map +1 -1
  173. package/build/lib/web/production/utils/metaAttribute/metaConstants.js +1 -0
  174. package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
  175. package/build/types/components/index.d.ts +1455 -1227
  176. package/build/types/components/index.native.d.ts +245 -36
  177. package/build/types/tokens/index.d.ts +6 -0
  178. package/build/types/tokens/index.native.d.ts +6 -0
  179. package/package.json +4 -4
@@ -19,7 +19,7 @@ import { CollapsibleBody } from '../Collapsible/CollapsibleBody.js';
19
19
  import { getComponentId } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
20
20
  import { jsx, jsxs } from 'react/jsx-runtime';
21
21
 
22
- var AccordionItem=function AccordionItem(_ref){var title=_ref.title,description=_ref.description,icon=_ref.icon,children=_ref.children,isDisabled=_ref.isDisabled,_index=_ref._index,testID=_ref.testID;var _useAccordion=useAccordion(),expandedIndex=_useAccordion.expandedIndex,onExpandChange=_useAccordion.onExpandChange,defaultExpandedIndex=_useAccordion.defaultExpandedIndex,variant=_useAccordion.variant,numberOfItems=_useAccordion.numberOfItems;var isExpanded=expandedIndex===_index;var isDefaultExpanded=defaultExpandedIndex===_index;var isDeprecatedAPI=Boolean(title)||Boolean(description)||Boolean(icon);var _React$Children$toArr=React__default.Children.toArray(children),_React$Children$toArr2=_slicedToArray(_React$Children$toArr,2),header=_React$Children$toArr2[0],body=_React$Children$toArr2[1];if(!isDeprecatedAPI){var headerComponentId=getComponentId(header);var bodyComponentId=getComponentId(body);if(headerComponentId!==componentIds.AccordionItemHeader&&bodyComponentId!==componentIds.AccordionItemBody){throwBladeError({message:'AccordionItem only allows AccordionItemHeader as first component and AccordionItemBody as second. Check Accordion documentation',moduleName:'AccordionItem'});}}var isLastItem=_index!==undefined&&_index<numberOfItems-1;var handleExpandChange=function handleExpandChange(_ref2){var isExpanded=_ref2.isExpanded;if(isExpanded&&typeof _index!=='undefined'){onExpandChange(_index);}else {onExpandChange(-1);}};return jsx(AccordionItemContext.Provider,{value:{index:_index,isDisabled:isDisabled},children:jsxs(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.AccordionItem,testID:testID}),{children:[jsxs(Collapsible,{isExpanded:isExpanded,defaultIsExpanded:isDefaultExpanded,onExpandChange:handleExpandChange,_shouldApplyWidthRestrictions:false,children:[jsx(AccordionButton,{index:_index,icon:icon,title:title,header:header,isDisabled:isDisabled,isDeprecatedAPI:isDeprecatedAPI}),jsx(CollapsibleBody,{width:isReactNative()||!isDeprecatedAPI?'100%':undefined,children:isDeprecatedAPI?jsx(AccordionItemBody,{_description:description,children:children}):body})]}),isLastItem||variant==='transparent'?jsx(Divider,{}):null]}))});};
22
+ var AccordionItem=function AccordionItem(_ref){var title=_ref.title,description=_ref.description,icon=_ref.icon,children=_ref.children,isDisabled=_ref.isDisabled,_index=_ref._index,testID=_ref.testID;var _useAccordion=useAccordion(),expandedIndex=_useAccordion.expandedIndex,onExpandChange=_useAccordion.onExpandChange,defaultExpandedIndex=_useAccordion.defaultExpandedIndex,variant=_useAccordion.variant,numberOfItems=_useAccordion.numberOfItems;var isExpanded=expandedIndex===_index;var isDefaultExpanded=defaultExpandedIndex===_index;var isDeprecatedAPI=Boolean(title)||Boolean(description)||Boolean(icon);var _React$Children$toArr=React__default.Children.toArray(children),_React$Children$toArr2=_slicedToArray(_React$Children$toArr,2),header=_React$Children$toArr2[0],body=_React$Children$toArr2[1];if(!isDeprecatedAPI){var headerComponentId=getComponentId(header);var bodyComponentId=getComponentId(body);if(headerComponentId!==componentIds.AccordionItemHeader&&bodyComponentId!==componentIds.AccordionItemBody){throwBladeError({message:'AccordionItem only allows AccordionItemHeader as first component and AccordionItemBody as second. Check Accordion documentation',moduleName:'AccordionItem'});}}var isLastItem=_index!==undefined&&_index<numberOfItems-1;var handleExpandChange=function handleExpandChange(_ref2){var isExpanded=_ref2.isExpanded;if(isExpanded&&typeof _index!=='undefined'){onExpandChange(_index);}else {onExpandChange(-1);}};return jsx(AccordionItemContext.Provider,{value:{index:_index,isDisabled:isDisabled},children:jsxs(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.AccordionItem,testID:testID}),{children:[jsxs(Collapsible,{isExpanded:isExpanded,defaultIsExpanded:isDefaultExpanded,onExpandChange:handleExpandChange,_shouldApplyWidthRestrictions:false,_dangerouslyDisableValidations:true,children:[jsx(AccordionButton,{index:_index,icon:icon,title:title,header:header,isDisabled:isDisabled,isDeprecatedAPI:isDeprecatedAPI}),jsx(CollapsibleBody,{width:isReactNative()||!isDeprecatedAPI?'100%':undefined,children:isDeprecatedAPI?jsx(AccordionItemBody,{_description:description,children:children}):body})]}),isLastItem||variant==='transparent'?jsx(Divider,{}):null]}))});};
23
23
 
24
24
  export { AccordionItem };
25
25
  //# sourceMappingURL=AccordionItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionItem.js","sources":["../../../../../src/components/Accordion/AccordionItem.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport React from 'react';\nimport { AccordionButton } from './AccordionButton';\nimport { AccordionItemContext, useAccordion } from './AccordionContext';\nimport { AccordionItemBody } from './AccordionItemBody';\nimport { componentIds } from './componentIds';\nimport { Divider } from '~components/Divider';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { isReactNative } from '~utils';\nimport { Collapsible } from '~components/Collapsible/Collapsible';\nimport { CollapsibleBody } from '~components/Collapsible';\nimport type { TestID } from '~utils/types';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype AccordionItemProps = {\n /**\n * Title text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n title?: string;\n\n /**\n * Body text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n description?: string;\n\n /**\n * Renders a Blade icon as title prefix (requires `showNumberPrefix={false}`)\n *\n * @deprecated Use `leading={<StarIcon size=\"large\" />}` on AccordionItemHeader instead\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n icon?: IconComponent;\n\n /**\n * Slot, renders any custom content\n */\n children?: ReactNode | ReactNode[];\n\n /**\n * Disabled state of the item\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * **Internal:** used for determining numbering, you don't need to pass this,\n * instead pass `showNumberPrefix` to root `Accordion`\n */\n _index?: number;\n} & TestID;\n\nconst AccordionItem = ({\n title,\n description,\n icon,\n children,\n isDisabled,\n _index,\n testID,\n}: AccordionItemProps): ReactElement => {\n const {\n expandedIndex,\n onExpandChange,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n } = useAccordion();\n const isExpanded = expandedIndex === _index;\n const isDefaultExpanded = defaultExpandedIndex === _index;\n const isDeprecatedAPI = Boolean(title) || Boolean(description) || Boolean(icon);\n const [header, body] = React.Children.toArray(children);\n\n if (!isDeprecatedAPI) {\n // Only doing validation in new API. Deprecated API allows everything as AccordionItem children\n const headerComponentId = getComponentId(header);\n const bodyComponentId = getComponentId(body);\n\n if (\n headerComponentId !== componentIds.AccordionItemHeader &&\n bodyComponentId !== componentIds.AccordionItemBody\n ) {\n throwBladeError({\n message:\n 'AccordionItem only allows AccordionItemHeader as first component and AccordionItemBody as second. Check Accordion documentation',\n moduleName: 'AccordionItem',\n });\n }\n }\n\n const isLastItem = _index !== undefined && _index < numberOfItems - 1;\n\n const handleExpandChange = ({ isExpanded }: { isExpanded: boolean }): void => {\n if (isExpanded && typeof _index !== 'undefined') {\n onExpandChange(_index);\n } else {\n onExpandChange(-1);\n }\n };\n\n return (\n <AccordionItemContext.Provider\n value={{\n index: _index,\n isDisabled,\n }}\n >\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItem, testID })}>\n <Collapsible\n isExpanded={isExpanded}\n defaultIsExpanded={isDefaultExpanded}\n onExpandChange={handleExpandChange}\n // Accordion has its own width restrictions\n _shouldApplyWidthRestrictions={false}\n >\n <AccordionButton\n index={_index}\n icon={icon}\n title={title}\n header={header}\n isDisabled={isDisabled}\n isDeprecatedAPI={isDeprecatedAPI}\n />\n <CollapsibleBody\n // Just React Native things, need this 100% so collapsed content flows correctly inside Accordion\n // In new API, AccordionItemBody takes 100% width to avoid issues like this - https://github.com/razorpay/blade/pull/1814\n width={isReactNative() || !isDeprecatedAPI ? '100%' : undefined}\n >\n {isDeprecatedAPI ? (\n <AccordionItemBody _description={description}>{children}</AccordionItemBody>\n ) : (\n body\n )}\n </CollapsibleBody>\n </Collapsible>\n {isLastItem || variant === 'transparent' ? <Divider /> : null}\n </BaseBox>\n </AccordionItemContext.Provider>\n );\n};\n\nexport type { AccordionItemProps };\nexport { AccordionItem };\n"],"names":["AccordionItem","_ref","title","description","icon","children","isDisabled","_index","testID","_useAccordion","useAccordion","expandedIndex","onExpandChange","defaultExpandedIndex","variant","numberOfItems","isExpanded","isDefaultExpanded","isDeprecatedAPI","Boolean","_React$Children$toArr","React","Children","toArray","_React$Children$toArr2","_slicedToArray","header","body","headerComponentId","getComponentId","bodyComponentId","componentIds","AccordionItemHeader","AccordionItemBody","throwBladeError","message","moduleName","isLastItem","undefined","handleExpandChange","_ref2","_jsx","AccordionItemContext","Provider","value","index","_jsxs","BaseBox","Object","assign","metaAttribute","name","MetaConstants","Collapsible","defaultIsExpanded","_shouldApplyWidthRestrictions","AccordionButton","CollapsibleBody","width","isReactNative","_description","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgEM,IAAAA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAQqB,CAAA,IAPtCC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,IAAI,CAAAH,IAAA,CAAJG,IAAI,CACJC,QAAQ,CAAAJ,IAAA,CAARI,QAAQ,CACRC,UAAU,CAAAL,IAAA,CAAVK,UAAU,CACVC,MAAM,CAAAN,IAAA,CAANM,MAAM,CACNC,MAAM,CAAAP,IAAA,CAANO,MAAM,CAEN,IAAAC,aAAA,CAMIC,YAAY,EAAE,CALhBC,aAAa,CAAAF,aAAA,CAAbE,aAAa,CACbC,cAAc,CAAAH,aAAA,CAAdG,cAAc,CACdC,oBAAoB,CAAAJ,aAAA,CAApBI,oBAAoB,CACpBC,OAAO,CAAAL,aAAA,CAAPK,OAAO,CACPC,aAAa,CAAAN,aAAA,CAAbM,aAAa,CAEf,IAAMC,UAAU,CAAGL,aAAa,GAAKJ,MAAM,CAC3C,IAAMU,iBAAiB,CAAGJ,oBAAoB,GAAKN,MAAM,CACzD,IAAMW,eAAe,CAAGC,OAAO,CAACjB,KAAK,CAAC,EAAIiB,OAAO,CAAChB,WAAW,CAAC,EAAIgB,OAAO,CAACf,IAAI,CAAC,CAC/E,IAAAgB,qBAAA,CAAuBC,cAAK,CAACC,QAAQ,CAACC,OAAO,CAAClB,QAAQ,CAAC,CAAAmB,sBAAA,CAAAC,cAAA,CAAAL,qBAAA,CAAA,CAAA,CAAA,CAAhDM,MAAM,CAAAF,sBAAA,CAAA,CAAA,CAAA,CAAEG,IAAI,CAAAH,sBAAA,CAAA,CAAA,CAAA,CAEnB,GAAI,CAACN,eAAe,CAAE,CAEpB,I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XF,KAAK,CAAEA,KAAM,CACbwB,MAAM,CAAEA,MAAO,CACfpB,UAAU,CAAEA,UAAW,CACvBY,eAAe,CAAEA,eAAgB,CAClC,CAAC,CACFuB,GAAA,CAACgB,eAAe,EAGdC,KAAK,CAAEC,aAAa,EAAE,EAAI,CAACzC,eAAe,CAAG,MAAM,CAAGoB,SAAU,CAAAjC,QAAA,CAE/Da,eAAe,CACduB,GAAA,CAACR,iBAAiB,CAAA,CAAC2B,YAAY,CAAEzD,WAAY,CAAAE,QAAA,CAAEA,QAAQ,CAAoB,CAAC,CAE5EsB,IACD,CACc,CAAC,CACP,CAAA,CAAC,CACbU,UAAU,EAAIvB,OAAO,GAAK,aAAa,CAAG2B,GAAA,CAACoB,OAAO,CAAE,EAAA,CAAC,CAAG,IAAI,CACtD,CAAA,CAAA,CAAC,CACmB,CAAC,CAEpC;;;;"}
1
+ {"version":3,"file":"AccordionItem.js","sources":["../../../../../src/components/Accordion/AccordionItem.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport React from 'react';\nimport { AccordionButton } from './AccordionButton';\nimport { AccordionItemContext, useAccordion } from './AccordionContext';\nimport { AccordionItemBody } from './AccordionItemBody';\nimport { componentIds } from './componentIds';\nimport { Divider } from '~components/Divider';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { isReactNative } from '~utils';\nimport { Collapsible } from '~components/Collapsible/Collapsible';\nimport { CollapsibleBody } from '~components/Collapsible';\nimport type { TestID } from '~utils/types';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype AccordionItemProps = {\n /**\n * Title text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n title?: string;\n\n /**\n * Body text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n description?: string;\n\n /**\n * Renders a Blade icon as title prefix (requires `showNumberPrefix={false}`)\n *\n * @deprecated Use `leading={<StarIcon size=\"large\" />}` on AccordionItemHeader instead\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n icon?: IconComponent;\n\n /**\n * Slot, renders any custom content\n */\n children?: ReactNode | ReactNode[];\n\n /**\n * Disabled state of the item\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * **Internal:** used for determining numbering, you don't need to pass this,\n * instead pass `showNumberPrefix` to root `Accordion`\n */\n _index?: number;\n} & TestID;\n\nconst AccordionItem = ({\n title,\n description,\n icon,\n children,\n isDisabled,\n _index,\n testID,\n}: AccordionItemProps): ReactElement => {\n const {\n expandedIndex,\n onExpandChange,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n } = useAccordion();\n const isExpanded = expandedIndex === _index;\n const isDefaultExpanded = defaultExpandedIndex === _index;\n const isDeprecatedAPI = Boolean(title) || Boolean(description) || Boolean(icon);\n const [header, body] = React.Children.toArray(children);\n\n if (!isDeprecatedAPI) {\n // Only doing validation in new API. Deprecated API allows everything as AccordionItem children\n const headerComponentId = getComponentId(header);\n const bodyComponentId = getComponentId(body);\n\n if (\n headerComponentId !== componentIds.AccordionItemHeader &&\n bodyComponentId !== componentIds.AccordionItemBody\n ) {\n throwBladeError({\n message:\n 'AccordionItem only allows AccordionItemHeader as first component and AccordionItemBody as second. Check Accordion documentation',\n moduleName: 'AccordionItem',\n });\n }\n }\n\n const isLastItem = _index !== undefined && _index < numberOfItems - 1;\n\n const handleExpandChange = ({ isExpanded }: { isExpanded: boolean }): void => {\n if (isExpanded && typeof _index !== 'undefined') {\n onExpandChange(_index);\n } else {\n onExpandChange(-1);\n }\n };\n\n return (\n <AccordionItemContext.Provider\n value={{\n index: _index,\n isDisabled,\n }}\n >\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItem, testID })}>\n <Collapsible\n isExpanded={isExpanded}\n defaultIsExpanded={isDefaultExpanded}\n onExpandChange={handleExpandChange}\n // Accordion has its own width restrictions\n _shouldApplyWidthRestrictions={false}\n _dangerouslyDisableValidations={true}\n >\n <AccordionButton\n index={_index}\n icon={icon}\n title={title}\n header={header}\n isDisabled={isDisabled}\n isDeprecatedAPI={isDeprecatedAPI}\n />\n <CollapsibleBody\n // Just React Native things, need this 100% so collapsed content flows correctly inside Accordion\n // In new API, AccordionItemBody takes 100% width to avoid issues like this - https://github.com/razorpay/blade/pull/1814\n width={isReactNative() || !isDeprecatedAPI ? '100%' : undefined}\n >\n {isDeprecatedAPI ? (\n <AccordionItemBody _description={description}>{children}</AccordionItemBody>\n ) : (\n body\n )}\n </CollapsibleBody>\n </Collapsible>\n {isLastItem || variant === 'transparent' ? <Divider /> : null}\n </BaseBox>\n </AccordionItemContext.Provider>\n );\n};\n\nexport type { AccordionItemProps };\nexport { AccordionItem };\n"],"names":["AccordionItem","_ref","title","description","icon","children","isDisabled","_index","testID","_useAccordion","useAccordion","expandedIndex","onExpandChange","defaultExpandedIndex","variant","numberOfItems","isExpanded","isDefaultExpanded","isDeprecatedAPI","Boolean","_React$Children$toArr","React","Children","toArray","_React$Children$toArr2","_slicedToArray","header","body","headerComponentId","getComponentId","bodyComponentId","componentIds","AccordionItemHeader","AccordionItemBody","throwBladeError","message","moduleName","isLastItem","undefined","handleExpandChange","_ref2","_jsx","AccordionItemContext","Provider","value","index","_jsxs","BaseBox","Object","assign","metaAttribute","name","MetaConstants","Collapsible","defaultIsExpanded","_shouldApplyWidthRestrictions","_dangerouslyDisableValidations","AccordionButton","CollapsibleBody","width","isReactNative","_description","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgEM,IAAAA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAQqB,CAAA,IAPtCC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,IA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iB,CAAA,CAAC4B,YAAY,CAAE1D,WAAY,CAAAE,QAAA,CAAEA,QAAQ,CAAoB,CAAC,CAE5EsB,IACD,CACc,CAAC,CACP,CAAA,CAAC,CACbU,UAAU,EAAIvB,OAAO,GAAK,aAAa,CAAG2B,GAAA,CAACqB,OAAO,CAAE,EAAA,CAAC,CAAG,IAAI,CACtD,CAAA,CAAA,CAAC,CACmB,CAAC,CAEpC;;;;"}
@@ -18,7 +18,7 @@ import { useId } from '../../utils/useId.js';
18
18
  import { isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
19
19
  import { jsx } from 'react/jsx-runtime';
20
20
 
21
- var _excluded=["children","direction","defaultIsExpanded","isExpanded","onExpandChange","testID","_shouldApplyWidthRestrictions"];var MIN_WIDTH=makeSize(size[200]);var Collapsible=function Collapsible(_ref){var children=_ref.children,_ref$direction=_ref.direction,direction=_ref$direction===void 0?'bottom':_ref$direction,_ref$defaultIsExpande=_ref.defaultIsExpanded,defaultIsExpanded=_ref$defaultIsExpande===void 0?false:_ref$defaultIsExpande,isExpanded=_ref.isExpanded,onExpandChange=_ref.onExpandChange,testID=_ref.testID,_ref$_shouldApplyWidt=_ref._shouldApplyWidthRestrictions,_shouldApplyWidthRestrictions=_ref$_shouldApplyWidt===void 0?true:_ref$_shouldApplyWidt,styledProps=_objectWithoutProperties(_ref,_excluded);var _useState=useState(isExpanded!=null?isExpanded:defaultIsExpanded),_useState2=_slicedToArray(_useState,2),isBodyExpanded=_useState2[0],setIsBodyExpanded=_useState2[1];var collapsibleBodyId=useId(MetaConstants.CollapsibleBody);var initialDefaultExpanded=useRef(Boolean(defaultIsExpanded||isExpanded));var handleExpandChange=useCallback(function(nextIsExpanded){if(typeof isExpanded!=='undefined'){onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}else {setIsBodyExpanded(nextIsExpanded);onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}},[onExpandChange,isExpanded]);var contextValue=useMemo(function(){return {isExpanded:isExpanded!=null?isExpanded:isBodyExpanded,onExpandChange:handleExpandChange,defaultIsExpanded:initialDefaultExpanded.current,direction:direction,collapsibleBodyId:collapsibleBodyId};},[isBodyExpanded,direction,handleExpandChange,isExpanded,collapsibleBodyId]);if(__DEV__){Children.forEach(children,function(child){if(!(isValidAllowedChildren(child,MetaConstants.CollapsibleBody)||isValidAllowedChildren(child,MetaConstants.CollapsibleButton)||isValidAllowedChildren(child,MetaConstants.CollapsibleLink)||isValidAllowedChildren(child,MetaConstants.AccordionButton))){throwBladeError({message:`only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,moduleName:'Collapsible'});}});}return jsx(CollapsibleContext.Provider,{value:contextValue,children:jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.Collapsible,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseBox,{display:"flex",flexDirection:direction==='bottom'?'column':'column-reverse',alignItems:"flex-start",minWidth:_shouldApplyWidthRestrictions?MIN_WIDTH:makeSize(size[0]),maxWidth:_shouldApplyWidthRestrictions?MAX_WIDTH:MAX_WIDTH_NO_RESTRICTIONS,children:children})}))});};
21
+ var _excluded=["children","direction","defaultIsExpanded","isExpanded","onExpandChange","testID","_shouldApplyWidthRestrictions","_dangerouslyDisableValidations"];var MIN_WIDTH=makeSize(size[200]);var Collapsible=function Collapsible(_ref){var children=_ref.children,_ref$direction=_ref.direction,direction=_ref$direction===void 0?'bottom':_ref$direction,_ref$defaultIsExpande=_ref.defaultIsExpanded,defaultIsExpanded=_ref$defaultIsExpande===void 0?false:_ref$defaultIsExpande,isExpanded=_ref.isExpanded,onExpandChange=_ref.onExpandChange,testID=_ref.testID,_ref$_shouldApplyWidt=_ref._shouldApplyWidthRestrictions,_shouldApplyWidthRestrictions=_ref$_shouldApplyWidt===void 0?true:_ref$_shouldApplyWidt,_ref$_dangerouslyDisa=_ref._dangerouslyDisableValidations,_dangerouslyDisableValidations=_ref$_dangerouslyDisa===void 0?false:_ref$_dangerouslyDisa,styledProps=_objectWithoutProperties(_ref,_excluded);var _useState=useState(isExpanded!=null?isExpanded:defaultIsExpanded),_useState2=_slicedToArray(_useState,2),isBodyExpanded=_useState2[0],setIsBodyExpanded=_useState2[1];var collapsibleBodyId=useId(MetaConstants.CollapsibleBody);var initialDefaultExpanded=useRef(Boolean(defaultIsExpanded||isExpanded));var handleExpandChange=useCallback(function(nextIsExpanded){if(typeof isExpanded!=='undefined'){onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}else {setIsBodyExpanded(nextIsExpanded);onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}},[onExpandChange,isExpanded]);var contextValue=useMemo(function(){return {isExpanded:isExpanded!=null?isExpanded:isBodyExpanded,onExpandChange:handleExpandChange,defaultIsExpanded:initialDefaultExpanded.current,direction:direction,collapsibleBodyId:collapsibleBodyId};},[isBodyExpanded,direction,handleExpandChange,isExpanded,collapsibleBodyId]);if(__DEV__){Children.forEach(children,function(child){if(!(isValidAllowedChildren(child,MetaConstants.CollapsibleBody)||isValidAllowedChildren(child,MetaConstants.CollapsibleButton)||isValidAllowedChildren(child,MetaConstants.CollapsibleLink))&&!_dangerouslyDisableValidations){throwBladeError({message:`only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,moduleName:'Collapsible'});}});}return jsx(CollapsibleContext.Provider,{value:contextValue,children:jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.Collapsible,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseBox,{display:"flex",flexDirection:direction==='bottom'?'column':'column-reverse',alignItems:"flex-start",minWidth:_shouldApplyWidthRestrictions?MIN_WIDTH:makeSize(size[0]),maxWidth:_shouldApplyWidthRestrictions?MAX_WIDTH:MAX_WIDTH_NO_RESTRICTIONS,children:children})}))});};
22
22
 
23
23
  export { Collapsible };
24
24
  //# sourceMappingURL=Collapsible.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Collapsible.js","sources":["../../../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { Children, useCallback, useRef, useState, useMemo } from 'react';\n\nimport type { CollapsibleContextState } from './CollapsibleContext';\nimport { CollapsibleContext } from './CollapsibleContext';\nimport { MAX_WIDTH, MAX_WIDTH_NO_RESTRICTIONS } from './styles';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { makeSize } from '~utils';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype CollapsibleProps = {\n /**\n * Composes `CollapsibleButton`, `CollapsibleLink`, `CollapsibleBody`\n */\n children: ReactNode;\n\n /**\n * Direction in which the content expands\n *\n * @default bottom\n */\n direction?: 'bottom' | 'top';\n\n /**\n * Expands the collapsible content by default (uncontrolled)\n *\n * @default false\n */\n defaultIsExpanded?: boolean;\n\n /**\n * Expands the collapsible content (controlled)\n *\n * @default undefined\n */\n isExpanded?: boolean;\n\n /**\n * Callback for change in collapsible's expanded state\n *\n * @default undefined\n */\n onExpandChange?: ({ isExpanded }: { isExpanded: boolean }) => void;\n\n /**\n * **Internal**: used to override responsive width restrictions\n */\n _shouldApplyWidthRestrictions?: boolean;\n} & TestID &\n StyledPropsBlade;\n\nconst MIN_WIDTH: BoxProps['minWidth'] = makeSize(size[200]);\n\nconst Collapsible = ({\n children,\n direction = 'bottom',\n defaultIsExpanded = false,\n isExpanded,\n onExpandChange,\n testID,\n _shouldApplyWidthRestrictions = true,\n ...styledProps\n}: CollapsibleProps): ReactElement => {\n const [isBodyExpanded, setIsBodyExpanded] = useState(isExpanded ?? defaultIsExpanded);\n const collapsibleBodyId = useId(MetaConstants.CollapsibleBody);\n\n /**\n * Maintain a ref to the initial value of `defaultExpanded || isExpanded` so changing it has no effect.\n * This will help in determining the correct initial height of collapsing body content\n */\n const initialDefaultExpanded = useRef(Boolean(defaultIsExpanded || isExpanded));\n\n const handleExpandChange = useCallback(\n (nextIsExpanded: boolean) => {\n if (typeof isExpanded !== 'undefined') {\n // controlled\n onExpandChange?.({ isExpanded: nextIsExpanded });\n } else {\n // uncontrolled\n setIsBodyExpanded(nextIsExpanded);\n onExpandChange?.({ isExpanded: nextIsExpanded });\n }\n },\n [onExpandChange, isExpanded],\n );\n\n const contextValue = useMemo<CollapsibleContextState>(\n () => ({\n // controlled behavior if isExpanded is provided\n isExpanded: isExpanded ?? isBodyExpanded,\n onExpandChange: handleExpandChange,\n defaultIsExpanded: initialDefaultExpanded.current,\n direction,\n collapsibleBodyId,\n }),\n [isBodyExpanded, direction, handleExpandChange, isExpanded, collapsibleBodyId],\n );\n\n if (__DEV__) {\n Children.forEach(children, (child) => {\n if (\n !(\n isValidAllowedChildren(child, MetaConstants.CollapsibleBody) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleButton) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleLink) ||\n isValidAllowedChildren(child, MetaConstants.AccordionButton)\n )\n ) {\n throwBladeError({\n message: `only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,\n moduleName: 'Collapsible',\n });\n }\n });\n }\n\n return (\n <CollapsibleContext.Provider value={contextValue}>\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Collapsible, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={direction === 'bottom' ? 'column' : 'column-reverse'}\n alignItems=\"flex-start\"\n minWidth={_shouldApplyWidthRestrictions ? MIN_WIDTH : makeSize(size[0])}\n maxWidth={_shouldApplyWidthRestrictions ? MAX_WIDTH : MAX_WIDTH_NO_RESTRICTIONS}\n >\n {children}\n </BaseBox>\n </BaseBox>\n </CollapsibleContext.Provider>\n );\n};\n\nexport type { CollapsibleProps };\nexport { Collapsible };\n"],"names":["MIN_WIDTH","makeSize","size","Collapsible","_ref","children","_ref$direction","direction","_ref$defaultIsExpande","defaultIsExpanded","isExpanded","onExpandChange","testID","_ref$_shouldApplyWidt","_shouldApplyWidthRestrictions","styledProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isBodyExpanded","setIsBodyExpanded","collapsibleBodyId","useId","MetaConstants","CollapsibleBody","initialDefaultExpanded","useRef","Boolean","handleExpandChange","useCallback","nextIsExpanded","contextValue","useMemo","current","__DEV__","Children","forEach","child","isValidAllowedChildren","CollapsibleButton","CollapsibleLink","AccordionButton","throwBladeError","message","moduleName","_jsx","CollapsibleContext","Provider","value","BaseBox","Object","assign","metaAttribute","name","getStyledProps","display","flexDirection","alignItems","minWidth","maxWidth","MAX_WIDTH","MAX_WIDTH_NO_RESTRICTIONS"],"mappings":";;;;;;;;;;;;;;;;;;;;kIA2DA,IAAMA,SAA+B,CAAGC,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC,CAErD,IAAAC,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CASqB,CARpC,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAAC,cAAA,CAAAF,IAAA,CACRG,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,cAAA,CAAAE,qBAAA,CAAAJ,IAAA,CACpBK,iBAAiB,CAAjBA,iBAAiB,CAAAD,qBAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,qBAAA,CACzBE,UAAU,CAAAN,IAAA,CAAVM,UAAU,CACVC,cAAc,CAAAP,IAAA,CAAdO,cAAc,CACdC,MAAM,CAAAR,IAAA,CAANQ,MAAM,CAAAC,qBAAA,CAAAT,IAAA,CACNU,6BAA6B,CAA7BA,6BAA6B,CAAAD,qBAAA,GAAG,KAAA,CAAA,CAAA,IAAI,CAAAA,qBAAA,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components/Collapsible/Collapsible.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { Children, useCallback, useRef, useState, useMemo } from 'react';\n\nimport type { CollapsibleContextState } from './CollapsibleContext';\nimport { CollapsibleContext } from './CollapsibleContext';\nimport { MAX_WIDTH, MAX_WIDTH_NO_RESTRICTIONS } from './styles';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { makeSize } from '~utils';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype CollapsibleProps = {\n /**\n * Composes `CollapsibleButton`, `CollapsibleLink`, `CollapsibleBody`\n */\n children: ReactNode;\n\n /**\n * Direction in which the content expands\n *\n * @default bottom\n */\n direction?: 'bottom' | 'top';\n\n /**\n * Expands the collapsible content by default (uncontrolled)\n *\n * @default false\n */\n defaultIsExpanded?: boolean;\n\n /**\n * Expands the collapsible content (controlled)\n *\n * @default undefined\n */\n isExpanded?: boolean;\n\n /**\n * Callback for change in collapsible's expanded state\n *\n * @default undefined\n */\n onExpandChange?: ({ isExpanded }: { isExpanded: boolean }) => void;\n\n /**\n * **Internal**: disables trigger validations. Used for AccordionButton and SideNavLink internally\n */\n _dangerouslyDisableValidations?: boolean;\n /**\n * **Internal**: used to override responsive width restrictions\n */\n _shouldApplyWidthRestrictions?: boolean;\n} & TestID &\n StyledPropsBlade;\n\nconst MIN_WIDTH: BoxProps['minWidth'] = makeSize(size[200]);\n\nconst Collapsible = ({\n children,\n direction = 'bottom',\n defaultIsExpanded = false,\n isExpanded,\n onExpandChange,\n testID,\n _shouldApplyWidthRestrictions = true,\n _dangerouslyDisableValidations = false,\n ...styledProps\n}: CollapsibleProps): ReactElement => {\n const [isBodyExpanded, setIsBodyExpanded] = useState(isExpanded ?? defaultIsExpanded);\n const collapsibleBodyId = useId(MetaConstants.CollapsibleBody);\n\n /**\n * Maintain a ref to the initial value of `defaultExpanded || isExpanded` so changing it has no effect.\n * This will help in determining the correct initial height of collapsing body content\n */\n const initialDefaultExpanded = useRef(Boolean(defaultIsExpanded || isExpanded));\n\n const handleExpandChange = useCallback(\n (nextIsExpanded: boolean) => {\n if (typeof isExpanded !== 'undefined') {\n // controlled\n onExpandChange?.({ isExpanded: nextIsExpanded });\n } else {\n // uncontrolled\n setIsBodyExpanded(nextIsExpanded);\n onExpandChange?.({ isExpanded: nextIsExpanded });\n }\n },\n [onExpandChange, isExpanded],\n );\n\n const contextValue = useMemo<CollapsibleContextState>(\n () => ({\n // controlled behavior if isExpanded is provided\n isExpanded: isExpanded ?? isBodyExpanded,\n onExpandChange: handleExpandChange,\n defaultIsExpanded: initialDefaultExpanded.current,\n direction,\n collapsibleBodyId,\n }),\n [isBodyExpanded, direction, handleExpandChange, isExpanded, collapsibleBodyId],\n );\n\n if (__DEV__) {\n Children.forEach(children, (child) => {\n if (\n !(\n isValidAllowedChildren(child, MetaConstants.CollapsibleBody) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleButton) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleLink)\n ) &&\n !_dangerouslyDisableValidations\n ) {\n throwBladeError({\n message: `only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,\n moduleName: 'Collapsible',\n });\n }\n });\n }\n\n return (\n <CollapsibleContext.Provider value={contextValue}>\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Collapsible, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={direction === 'bottom' ? 'column' : 'column-reverse'}\n alignItems=\"flex-start\"\n minWidth={_shouldApplyWidthRestrictions ? MIN_WIDTH : makeSize(size[0])}\n maxWidth={_shouldApplyWidthRestrictions ? MAX_WIDTH : MAX_WIDTH_NO_RESTRICTIONS}\n >\n {children}\n </BaseBox>\n </BaseBox>\n </CollapsibleContext.Provider>\n );\n};\n\nexport type { CollapsibleProps };\nexport { Collapsible };\n"],"names":["MIN_WIDTH","makeSize","size","Collapsible","_ref","children","_ref$direction","direction","_ref$defaultIsExpande","defaultIsExpanded","isExpanded","onExpandChange","testID","_ref$_shouldApplyWidt","_shouldApplyWidthRestrictions","_ref$_dangerouslyDisa","_dangerouslyDisableValidations","styledProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isBodyExpanded","setIsBodyExpanded","collapsibleBodyId","useId","MetaConstants","CollapsibleBody","initialDefaultExpanded","useRef","Boolean","handleExpandChange","useCallback","nextIsExpanded","contextValue","useMemo","current","__DEV__","Children","forEach","child","isValidAllowedChildren","CollapsibleButton","CollapsibleLink","throwBladeError","message","moduleName","_jsx","CollapsibleContext","Provider","value","BaseBox","Object","assign","metaAttribute","name","getStyledProps","display","flexDirection","alignItems","minWidth","maxWidth","MAX_WIDTH","MAX_WIDTH_NO_RESTRICTIONS"],"mappings":";;;;;;;;;;;;;;;;;;;;mKA+DA,IAAMA,SAA+B,CAAGC,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC,CAErD,IAAAC,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAUqB,CATpC,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAAC,cAAA,CAAAF,IAAA,CACRG,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,cAAA,CAAAE,qBAAA,CAAAJ,IAAA,CACpBK,iBAAiB,CAAjBA,iBAAiB,CAAAD,qBAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,qBAAA,CACzBE,UAAU,CAAAN,IAAA,CAAVM,UAAU,CACVC,cAAc,CAAAP,IAAA,CAAdO,cAAc,CACdC,MAAM,CAAAR,IAAA,CAANQ,MAAM,CAAAC,q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CAAE,CACxE6D,QAAQ,CAAEjD,6BAA6B,CAAGkD,SAAS,CAAGC,yBAA0B,CAAA5D,QAAA,CAE/EA,QAAQ,CACF,CAAC,CACH,CAAA,CAAC,CACiB,CAAC,CAElC;;;;"}
@@ -7,7 +7,7 @@ import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native
7
7
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
8
8
  import { jsx } from 'react/jsx-runtime';
9
9
 
10
- var _CollapsibleBody=function _CollapsibleBody(_ref){var children=_ref.children,testID=_ref.testID,width=_ref.width;var _useCollapsible=useCollapsible(),collapsibleBodyId=_useCollapsible.collapsibleBodyId,isExpanded=_useCollapsible.isExpanded;return jsx(BaseBox,Object.assign({id:collapsibleBodyId,width:width},makeAccessible({role:'region',hidden:!isExpanded}),metaAttribute({name:MetaConstants.CollapsibleBody,testID:testID}),{children:jsx(CollapsibleBodyContent,{children:children})}));};var CollapsibleBody=assignWithoutSideEffects(_CollapsibleBody,{componentId:MetaConstants.CollapsibleBody});
10
+ var _CollapsibleBody=function _CollapsibleBody(_ref){var children=_ref.children,testID=_ref.testID,width=_ref.width,_ref$_hasMargin=_ref._hasMargin,_hasMargin=_ref$_hasMargin===void 0?true:_ref$_hasMargin;var _useCollapsible=useCollapsible(),collapsibleBodyId=_useCollapsible.collapsibleBodyId,isExpanded=_useCollapsible.isExpanded;return jsx(BaseBox,Object.assign({id:collapsibleBodyId,width:width},makeAccessible({role:'region',hidden:!isExpanded}),metaAttribute({name:MetaConstants.CollapsibleBody,testID:testID}),{children:jsx(CollapsibleBodyContent,{_hasMargin:_hasMargin,children:children})}));};var CollapsibleBody=assignWithoutSideEffects(_CollapsibleBody,{componentId:MetaConstants.CollapsibleBody});
11
11
 
12
12
  export { CollapsibleBody };
13
13
  //# sourceMappingURL=CollapsibleBody.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleBody.js","sources":["../../../../../src/components/Collapsible/CollapsibleBody.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { CollapsibleBodyContent } from './CollapsibleBodyContent';\nimport { useCollapsible } from './CollapsibleContext';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype CollapsibleBodyProps = {\n children: ReactNode;\n width?: BaseBoxProps['width'];\n} & TestID;\n\nconst _CollapsibleBody = ({ children, testID, width }: CollapsibleBodyProps): ReactElement => {\n const { collapsibleBodyId, isExpanded } = useCollapsible();\n return (\n <BaseBox\n id={collapsibleBodyId}\n width={width}\n {...makeAccessible({ role: 'region', hidden: !isExpanded })}\n {...metaAttribute({ name: MetaConstants.CollapsibleBody, testID })}\n >\n <CollapsibleBodyContent>{children}</CollapsibleBodyContent>\n </BaseBox>\n );\n};\n\nconst CollapsibleBody = assignWithoutSideEffects(_CollapsibleBody, {\n componentId: MetaConstants.CollapsibleBody,\n});\n\nexport type { CollapsibleBodyProps };\nexport { CollapsibleBody };\n"],"names":["_CollapsibleBody","_ref","children","testID","width","_useCollapsible","useCollapsible","collapsibleBodyId","isExpanded","_jsx","BaseBox","Object","assign","id","makeAccessible","role","hidden","metaAttribute","name","MetaConstants","CollapsibleBody","CollapsibleBodyContent","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;AAeA,IAAMA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAAwE,CAAlE,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CAAEC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACjD,IAAAC,eAAA,CAA0CC,cAAc,EAAE,CAAlDC,iBAAiB,CAAAF,eAAA,CAAjBE,iBAAiB,CAAEC,UAAU,CAAAH,eAAA,CAAVG,UAAU,CACrC,OACEC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CAAA,CACNC,EAAE,CAAEN,iBAAkB,CACtBH,KAAK,CAAEA,KAAM,CAAA,CACTU,cAAc,CAAC,CAAEC,IAAI,CAAE,QAAQ,CAAEC,MAAM,CAAE,CAACR,UAAW,CAAC,CAAC,CACvDS,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,eAAe,CAAEjB,MAAM,CAANA,MAAO,CAAC,CAAC,CAAAD,CAAAA,QAAA,CAElEO,GAAA,CAACY,sBAAsB,CAAA,CAAAnB,QAAA,CAAEA,QAAQ,CAAyB,CAAC,CACpD,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAkB,eAAe,CAAGE,wBAAwB,CAACtB,gBAAgB,CAAE,CACjEuB,WAAW,CAAEJ,aAAa,CAACC,eAC7B,CAAC;;;;"}
1
+ {"version":3,"file":"CollapsibleBody.js","sources":["../../../../../src/components/Collapsible/CollapsibleBody.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { CollapsibleBodyContent } from './CollapsibleBodyContent';\nimport { useCollapsible } from './CollapsibleContext';\nimport type { CollapsibleBodyProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\nconst _CollapsibleBody = ({\n children,\n testID,\n width,\n _hasMargin = true,\n}: CollapsibleBodyProps): ReactElement => {\n const { collapsibleBodyId, isExpanded } = useCollapsible();\n return (\n <BaseBox\n id={collapsibleBodyId}\n width={width}\n {...makeAccessible({ role: 'region', hidden: !isExpanded })}\n {...metaAttribute({ name: MetaConstants.CollapsibleBody, testID })}\n >\n <CollapsibleBodyContent _hasMargin={_hasMargin}>{children}</CollapsibleBodyContent>\n </BaseBox>\n );\n};\n\nconst CollapsibleBody = assignWithoutSideEffects(_CollapsibleBody, {\n componentId: MetaConstants.CollapsibleBody,\n});\n\nexport type { CollapsibleBodyProps };\nexport { CollapsibleBody };\n"],"names":["_CollapsibleBody","_ref","children","testID","width","_ref$_hasMargin","_hasMargin","_useCollapsible","useCollapsible","collapsibleBodyId","isExpanded","_jsx","BaseBox","Object","assign","id","makeAccessible","role","hidden","metaAttribute","name","MetaConstants","CollapsibleBody","CollapsibleBodyContent","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;AASA,IAAMA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAKoB,CAAA,IAJxCC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACNC,KAAK,CAAAH,IAAA,CAALG,KAAK,CAAAC,eAAA,CAAAJ,IAAA,CACLK,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAG,KAAA,CAAA,CAAA,IAAI,CAAAA,eAAA,CAEjB,IAAAE,eAAA,CAA0CC,cAAc,EAAE,CAAlDC,iBAAiB,CAAAF,eAAA,CAAjBE,iBAAiB,CAAEC,UAAU,CAAAH,eAAA,CAAVG,UAAU,CACrC,OACEC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CACNC,CAAAA,EAAE,CAAEN,iBAAkB,CACtBL,KAAK,CAAEA,KAAM,EACTY,cAAc,CAAC,CAAEC,IAAI,CAAE,QAAQ,CAAEC,MAAM,CAAE,CAACR,UAAW,CAAC,CAAC,CACvDS,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,eAAe,CAAEnB,MAAM,CAANA,MAAO,CAAC,CAAC,CAAA,CAAAD,QAAA,CAElES,GAAA,CAACY,sBAAsB,CAAA,CAACjB,UAAU,CAAEA,UAAW,CAAAJ,QAAA,CAAEA,QAAQ,CAAyB,CAAC,CAC5E,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAoB,eAAe,CAAGE,wBAAwB,CAACxB,gBAAgB,CAAE,CACjEyB,WAAW,CAAEJ,aAAa,CAACC,eAC7B,CAAC;;;;"}
@@ -14,7 +14,7 @@ import { castNativeType } from '../../utils/platform/castUtils.js';
14
14
  import '../BottomSheet/BottomSheetStack.js';
15
15
  import { jsx } from 'react/jsx-runtime';
16
16
 
17
- var AnimatedStyledCollapsibleBodyContent=styled(Animated.View)(function(){return {overflow:'hidden'};});var CollapsibleBodyContent=function CollapsibleBodyContent(_ref){var children=_ref.children;var _useCollapsible=useCollapsible(),isExpanded=_useCollapsible.isExpanded,direction=_useCollapsible.direction;var _useTheme=useTheme(),theme=_useTheme.theme;var opacity=useSharedValue(getOpacity({isExpanded:isExpanded}));var height=useSharedValue(isExpanded?undefined:0);var _useState=useState(0),_useState2=_slicedToArray(_useState,2),layoutHeight=_useState2[0],setLayoutHeight=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),isAnimating=_useState4[0],setIsAnimating=_useState4[1];var onAnimationComplete=useCallback(function(){requestAnimationFrame(function(){return setIsAnimating(false);});},[]);var duration=castNativeType(getTransitionDuration(theme));var easing=castNativeType(getTransitionEasing(theme));useEffect(function(){setIsAnimating(true);opacity.value=withTiming(getOpacity({isExpanded:isExpanded}),{duration:duration,easing:easing});height.value=withTiming(isExpanded&&layoutHeight?layoutHeight:0,{duration:duration,easing:easing},function(isComplete){if(isComplete){runOnJS(onAnimationComplete)();}});},[isExpanded,opacity,duration,easing,height,layoutHeight,onAnimationComplete]);var animatedStyles=useAnimatedStyle(function(){return {opacity:opacity.value,height:height.value};});var onLayout=useCallback(function(event){if(isAnimating){if(event.nativeEvent.layout.height>layoutHeight){setLayoutHeight(event.nativeEvent.layout.height);}}else if(event.nativeEvent.layout.height!==layoutHeight){setLayoutHeight(event.nativeEvent.layout.height);}},[layoutHeight,isAnimating]);return jsx(AnimatedStyledCollapsibleBodyContent,{isExpanded:isExpanded,style:animatedStyles,children:jsx(View,{onLayout:onLayout,style:isExpanded||isAnimating?nativeStyles.collapsibleBodyExpanded:nativeStyles.collapsibleBodyCollapsed,children:jsx(Box,Object.assign({},getCollapsibleBodyContentBoxProps({direction:direction}),{children:children}))})});};
17
+ var AnimatedStyledCollapsibleBodyContent=styled(Animated.View)(function(){return {overflow:'hidden'};});var CollapsibleBodyContent=function CollapsibleBodyContent(_ref){var children=_ref.children,_hasMargin=_ref._hasMargin;var _useCollapsible=useCollapsible(),isExpanded=_useCollapsible.isExpanded,direction=_useCollapsible.direction;var _useTheme=useTheme(),theme=_useTheme.theme;var opacity=useSharedValue(getOpacity({isExpanded:isExpanded}));var height=useSharedValue(isExpanded?undefined:0);var _useState=useState(0),_useState2=_slicedToArray(_useState,2),layoutHeight=_useState2[0],setLayoutHeight=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),isAnimating=_useState4[0],setIsAnimating=_useState4[1];var onAnimationComplete=useCallback(function(){requestAnimationFrame(function(){return setIsAnimating(false);});},[]);var duration=castNativeType(getTransitionDuration(theme));var easing=castNativeType(getTransitionEasing(theme));useEffect(function(){setIsAnimating(true);opacity.value=withTiming(getOpacity({isExpanded:isExpanded}),{duration:duration,easing:easing});height.value=withTiming(isExpanded&&layoutHeight?layoutHeight:0,{duration:duration,easing:easing},function(isComplete){if(isComplete){runOnJS(onAnimationComplete)();}});},[isExpanded,opacity,duration,easing,height,layoutHeight,onAnimationComplete]);var animatedStyles=useAnimatedStyle(function(){return {opacity:opacity.value,height:height.value};});var onLayout=useCallback(function(event){if(isAnimating){if(event.nativeEvent.layout.height>layoutHeight){setLayoutHeight(event.nativeEvent.layout.height);}}else if(event.nativeEvent.layout.height!==layoutHeight){setLayoutHeight(event.nativeEvent.layout.height);}},[layoutHeight,isAnimating]);return jsx(AnimatedStyledCollapsibleBodyContent,{isExpanded:isExpanded,style:animatedStyles,children:jsx(View,{onLayout:onLayout,style:isExpanded||isAnimating?nativeStyles.collapsibleBodyExpanded:nativeStyles.collapsibleBodyCollapsed,children:jsx(Box,Object.assign({},getCollapsibleBodyContentBoxProps({direction:direction,_hasMargin:_hasMargin}),{children:children}))})});};
18
18
 
19
19
  export { CollapsibleBodyContent };
20
20
  //# sourceMappingURL=CollapsibleBodyContent.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleBodyContent.native.js","sources":["../../../../../src/components/Collapsible/CollapsibleBodyContent.native.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback, useEffect, useState } from 'react';\nimport styled from 'styled-components/native';\nimport Animated, {\n runOnJS,\n useAnimatedStyle,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated';\nimport type { LayoutChangeEvent, ViewStyle } from 'react-native';\nimport { View } from 'react-native';\nimport type { CollapsibleBodyContentProps } from './types';\nimport { useCollapsible } from './CollapsibleContext';\nimport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n} from './commonStyles';\nimport { nativeStyles } from './styles.native';\nimport { Box } from '~components/Box';\nimport { useTheme } from '~components/BladeProvider';\nimport { castNativeType } from '~utils';\n\ntype AnimatedStyledCollapsibleBodyContentProps = {\n isExpanded: boolean;\n};\n\nconst AnimatedStyledCollapsibleBodyContent = styled(\n Animated.View,\n)<AnimatedStyledCollapsibleBodyContentProps>(() => {\n return {\n overflow: 'hidden',\n };\n});\n\nconst CollapsibleBodyContent = ({ children }: CollapsibleBodyContentProps): ReactElement => {\n const { isExpanded, direction } = useCollapsible();\n const { theme } = useTheme();\n\n const opacity = useSharedValue(getOpacity({ isExpanded }));\n\n // `undefined` implies no height restrictions which is analogous to `auto` on web\n const height = useSharedValue(isExpanded ? undefined : 0);\n const [layoutHeight, setLayoutHeight] = useState(0);\n\n // Keeps track of running animation to control absolute / relative positioning and handling layout event\n const [isAnimating, setIsAnimating] = useState(false);\n const onAnimationComplete = useCallback((): void => {\n // Only mark the animation complete before the next repaint, otherwise, sometimes leads to state update delays when you try to quickly toggle multiple times\n requestAnimationFrame(() => setIsAnimating(false));\n }, []);\n\n const duration = castNativeType(getTransitionDuration(theme));\n const easing = castNativeType(getTransitionEasing(theme));\n\n useEffect(() => {\n setIsAnimating(true);\n\n opacity.value = withTiming(getOpacity({ isExpanded }), { duration, easing });\n height.value = withTiming(\n // Animates the height to the measured value\n isExpanded && layoutHeight ? layoutHeight : 0,\n { duration, easing },\n (isComplete) => {\n // Only run this if the animation ran uninterrupted, for eg collapsing the content before it expanded fully\n if (isComplete) {\n // The callback `onAnimationComplete` has to be declared outside this, on JS thread\n runOnJS(onAnimationComplete)();\n }\n },\n );\n }, [isExpanded, opacity, duration, easing, height, layoutHeight, onAnimationComplete]);\n\n const animatedStyles = useAnimatedStyle(\n (): ViewStyle => {\n return {\n opacity: opacity.value,\n height: height.value,\n };\n },\n );\n\n /**\n * Tracks the height of content so we can animate height to and from 0 to the content's height.\n * **Note:** We can't animate height from 0 to auto or vice-versa.\n */\n const onLayout: (event: LayoutChangeEvent) => void = useCallback(\n (event) => {\n if (isAnimating) {\n if (event.nativeEvent.layout.height > layoutHeight) {\n /**\n * During animation, we set `layoutHeight` if the native event's layout height is larger.\n *\n * The greater than comparison is needed because sometimes the native event's layout height is smaller than actual content height 🤯\n * For example, this happens if you try to render a lengthy `Text` that wraps onto multiple lines.\n * In this case the initial native event's layout height only counts height of `Text` as if it were single line.\n * So, when the `Text` actually renders on screen and wraps, another `nativeEvent` is triggered which gives us the actual content height.\n * `nativeEvent` is triggered multiple times during animation but we only set `layoutHeight` if the height value is greater, hence the check.\n */\n setLayoutHeight(event.nativeEvent.layout.height);\n }\n } else if (event.nativeEvent.layout.height !== layoutHeight) {\n /**\n * When not animating, we set `layoutHeight` anytime `nativeEvent` layout height changes.\n * This handles userland dynamic content inside the slot.\n */\n setLayoutHeight(event.nativeEvent.layout.height);\n }\n },\n [layoutHeight, isAnimating],\n );\n\n return (\n <AnimatedStyledCollapsibleBodyContent isExpanded={isExpanded} style={animatedStyles}>\n <View\n onLayout={onLayout}\n /**\n * This View is positioned absolute in collapsed state so `onLayout` can capture the height of the content.\n * During animation, it's positioned relative so height related animation can happen, pushing adjacent content down or up.\n */\n style={\n isExpanded || isAnimating\n ? nativeStyles.collapsibleBodyExpanded\n : nativeStyles.collapsibleBodyCollapsed\n }\n >\n <Box {...getCollapsibleBodyContentBoxProps({ direction })}>{children}</Box>\n </View>\n </AnimatedStyledCollapsibleBodyContent>\n );\n};\n\nexport { CollapsibleBodyContent };\n"],"names":["AnimatedStyledCollapsibleBodyContent","styled","Animated","View","overflow","CollapsibleBodyContent","_ref","children","_useCollapsible","useCollapsible","isExpanded","direction","_useTheme","useTheme","theme","opacity","useSharedValue","getOpacity","height","undefined","_useState","useState","_useState2","_slicedToArray","layoutHeight","setLayoutHeight","_useState3","_useState4","isAnimating","setIsAnimating","onAnimationComplete","useCallback","requestAnimationFrame","duration","castNativeType","getTransitionDuration","easing","getTransitionEasing","useEffect","value","withTiming","isComplete","runOnJS","animatedStyles","useAnimatedStyle","onLayout","event","nativeEvent","layout","_jsx","style","nativeStyles","collapsibleBodyExpanded","collapsibleBodyCollapsed","Box","Object","assign","getCollapsibleBodyContentBoxProps"],"mappings":";;;;;;;;;;;;;;;;AA4BA,IAAMA,oCAAoC,CAAGC,MAAM,CACjDC,QAAQ,CAACC,IACX,CAAC,CAA4C,UAAM,CACjD,OAAO,CACLC,QAAQ,CAAE,QACZ,CAAC,CACH,CAAC,CAAC,CAEI,IAAAC,sBAAsB,CAAG,SAAzBA,sBAAsBA,CAAAC,IAAA,CAAgE,CAAA,IAA1DC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACxC,IAAAC,eAAA,CAAkCC,cAAc,EAAE,CAA1CC,UAAU,CAAAF,eAAA,CAAVE,UAAU,CAAEC,SAAS,CAAAH,eAAA,CAATG,SAAS,CAC7B,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CAEb,IAAMC,OAAO,CAAGC,cAAc,CAACC,UAAU,CAAC,CAAEP,UAAU,CAAVA,UAAW,CAAC,C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J,QAAA,CAAGA,QAAQ,CAAA,CAAM,CAAC,CACvE,CAAC,CAC6B,CAAC,CAE3C;;;;"}
1
+ {"version":3,"file":"CollapsibleBodyContent.native.js","sources":["../../../../../src/components/Collapsible/CollapsibleBodyContent.native.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback, useEffect, useState } from 'react';\nimport styled from 'styled-components/native';\nimport Animated, {\n runOnJS,\n useAnimatedStyle,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated';\nimport type { LayoutChangeEvent, ViewStyle } from 'react-native';\nimport { View } from 'react-native';\nimport type { CollapsibleBodyContentProps } from './types';\nimport { useCollapsible } from './CollapsibleContext';\nimport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n} from './commonStyles';\nimport { nativeStyles } from './styles.native';\nimport { Box } from '~components/Box';\nimport { useTheme } from '~components/BladeProvider';\nimport { castNativeType } from '~utils';\n\ntype AnimatedStyledCollapsibleBodyContentProps = {\n isExpanded: boolean;\n};\n\nconst AnimatedStyledCollapsibleBodyContent = styled(\n Animated.View,\n)<AnimatedStyledCollapsibleBodyContentProps>(() => {\n return {\n overflow: 'hidden',\n };\n});\n\nconst CollapsibleBodyContent = ({\n children,\n _hasMargin,\n}: CollapsibleBodyContentProps): ReactElement => {\n const { isExpanded, direction } = useCollapsible();\n const { theme } = useTheme();\n\n const opacity = useSharedValue(getOpacity({ isExpanded }));\n\n // `undefined` implies no height restrictions which is analogous to `auto` on web\n const height = useSharedValue(isExpanded ? undefined : 0);\n const [layoutHeight, setLayoutHeight] = useState(0);\n\n // Keeps track of running animation to control absolute / relative positioning and handling layout event\n const [isAnimating, setIsAnimating] = useState(false);\n const onAnimationComplete = useCallback((): void => {\n // Only mark the animation complete before the next repaint, otherwise, sometimes leads to state update delays when you try to quickly toggle multiple times\n requestAnimationFrame(() => setIsAnimating(false));\n }, []);\n\n const duration = castNativeType(getTransitionDuration(theme));\n const easing = castNativeType(getTransitionEasing(theme));\n\n useEffect(() => {\n setIsAnimating(true);\n\n opacity.value = withTiming(getOpacity({ isExpanded }), { duration, easing });\n height.value = withTiming(\n // Animates the height to the measured value\n isExpanded && layoutHeight ? layoutHeight : 0,\n { duration, easing },\n (isComplete) => {\n // Only run this if the animation ran uninterrupted, for eg collapsing the content before it expanded fully\n if (isComplete) {\n // The callback `onAnimationComplete` has to be declared outside this, on JS thread\n runOnJS(onAnimationComplete)();\n }\n },\n );\n }, [isExpanded, opacity, duration, easing, height, layoutHeight, onAnimationComplete]);\n\n const animatedStyles = useAnimatedStyle(\n (): ViewStyle => {\n return {\n opacity: opacity.value,\n height: height.value,\n };\n },\n );\n\n /**\n * Tracks the height of content so we can animate height to and from 0 to the content's height.\n * **Note:** We can't animate height from 0 to auto or vice-versa.\n */\n const onLayout: (event: LayoutChangeEvent) => void = useCallback(\n (event) => {\n if (isAnimating) {\n if (event.nativeEvent.layout.height > layoutHeight) {\n /**\n * During animation, we set `layoutHeight` if the native event's layout height is larger.\n *\n * The greater than comparison is needed because sometimes the native event's layout height is smaller than actual content height 🤯\n * For example, this happens if you try to render a lengthy `Text` that wraps onto multiple lines.\n * In this case the initial native event's layout height only counts height of `Text` as if it were single line.\n * So, when the `Text` actually renders on screen and wraps, another `nativeEvent` is triggered which gives us the actual content height.\n * `nativeEvent` is triggered multiple times during animation but we only set `layoutHeight` if the height value is greater, hence the check.\n */\n setLayoutHeight(event.nativeEvent.layout.height);\n }\n } else if (event.nativeEvent.layout.height !== layoutHeight) {\n /**\n * When not animating, we set `layoutHeight` anytime `nativeEvent` layout height changes.\n * This handles userland dynamic content inside the slot.\n */\n setLayoutHeight(event.nativeEvent.layout.height);\n }\n },\n [layoutHeight, isAnimating],\n );\n\n return (\n <AnimatedStyledCollapsibleBodyContent isExpanded={isExpanded} style={animatedStyles}>\n <View\n onLayout={onLayout}\n /**\n * This View is positioned absolute in collapsed state so `onLayout` can capture the height of the content.\n * During animation, it's positioned relative so height related animation can happen, pushing adjacent content down or up.\n */\n style={\n isExpanded || isAnimating\n ? nativeStyles.collapsibleBodyExpanded\n : nativeStyles.collapsibleBodyCollapsed\n }\n >\n <Box {...getCollapsibleBodyContentBoxProps({ direction, _hasMargin })}>{children}</Box>\n </View>\n </AnimatedStyledCollapsibleBodyContent>\n );\n};\n\nexport { CollapsibleBodyContent };\n"],"names":["AnimatedStyledCollapsibleBodyContent","styled","Animated","View","overflow","CollapsibleBodyContent","_ref","children","_hasMargin","_useCollapsible","useCollapsible","isExpanded","direction","_useTheme","useTheme","theme","opacity","useSharedValue","getOpacity","height","undefined","_useState","useState","_useState2","_slicedToArray","layoutHeight","setLayoutHeight","_useState3","_useState4","isAnimating","setIsAnimating","onAnimationComplete","useCallback","requestAnimationFrame","duration","castNativeType","getTransitionDuration","easing","getTransitionEasing","useEffect","value","withTiming","isComplete","runOnJS","animatedStyles","useAnimatedStyle","onLayout","event","nativeEvent","layout","_jsx","style","nativeStyles","collapsibleBodyExpanded","collapsibleBodyCollapsed","Box","Object","assign","getCollapsibleBodyContentBoxProps"],"mappings":";;;;;;;;;;;;;;;;AA4BA,IAAMA,oCAAoC,CAAGC,MAAM,CACjDC,QAAQ,CAACC,IACX,CAAC,CAA4C,UAAM,CACjD,OAAO,CACLC,QAAQ,CAAE,QACZ,CAAC,CACH,CAAC,CAAC,CAEI,IAAAC,sBAAsB,CAAG,SAAzBA,sBAAsBA,CAAAC,IAAA,CAGqB,CAF/C,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CAEV,IAAAC,eAAA,CAAkCC,cAAc,EAAE,CAA1CC,UAAU,CAAAF,eAAA,CAAVE,UAAU,CAAEC,SAAS,CAAAH,eAAA,CAATG,SAAS,CAC7B,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CAEb,IAAMC,OAAO,CAAGC,cAAc,CAACC,UAAU,CAAC,CAAEP,UA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CAATA,SAAS,CAAEJ,UAAU,CAAVA,UAAW,CAAC,CAAC,CAAA,CAAAD,QAAA,CAAGA,QAAQ,CAAA,CAAM,CAAC,CACnF,CAAC,CAC6B,CAAC,CAE3C;;;;"}
@@ -1,3 +1,4 @@
1
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
1
2
  import { useCallback } from 'react';
2
3
  import { useCollapsible } from './CollapsibleContext.js';
3
4
  import { CollapsibleChevronIcon } from './CollapsibleChevronIcon.native.js';
@@ -5,9 +6,15 @@ import '@babel/runtime/helpers/defineProperty';
5
6
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
6
7
  import BaseLink from '../Link/BaseLink/BaseLink.js';
7
8
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
9
+ import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
10
+ import '@babel/runtime/helpers/slicedToArray';
11
+ import 'react-native';
12
+ import '../../tokens/global/typography.js';
13
+ import '../../tokens/global/motion.js';
14
+ import '../BladeProvider/useTheme.js';
8
15
  import { jsx } from 'react/jsx-runtime';
9
16
 
10
- var _CollapsibleLink=function _CollapsibleLink(_ref){var children=_ref.children,size=_ref.size,isDisabled=_ref.isDisabled,testID=_ref.testID,accessibilityLabel=_ref.accessibilityLabel;var _useCollapsible=useCollapsible(),onExpandChange=_useCollapsible.onExpandChange,isExpanded=_useCollapsible.isExpanded,collapsibleBodyId=_useCollapsible.collapsibleBodyId;var toggleIsExpanded=useCallback(function(){return onExpandChange(!isExpanded);},[onExpandChange,isExpanded]);return jsx(BaseLink,{variant:"button",size:size,icon:CollapsibleChevronIcon,iconPosition:"right",isDisabled:isDisabled,testID:testID,onClick:toggleIsExpanded,accessibilityProps:{label:accessibilityLabel,controls:collapsibleBodyId,expanded:isExpanded},children:children});};var CollapsibleLink=assignWithoutSideEffects(_CollapsibleLink,{componentId:MetaConstants.CollapsibleLink});
17
+ var _excluded=["children","size","color","isDisabled","testID","accessibilityLabel"];var _CollapsibleLink=function _CollapsibleLink(_ref){var children=_ref.children,size=_ref.size,_ref$color=_ref.color,color=_ref$color===void 0?'primary':_ref$color,isDisabled=_ref.isDisabled,testID=_ref.testID,accessibilityLabel=_ref.accessibilityLabel,styledProps=_objectWithoutProperties(_ref,_excluded);var _useCollapsible=useCollapsible(),onExpandChange=_useCollapsible.onExpandChange,isExpanded=_useCollapsible.isExpanded,collapsibleBodyId=_useCollapsible.collapsibleBodyId;var toggleIsExpanded=useCallback(function(){return onExpandChange(!isExpanded);},[onExpandChange,isExpanded]);return jsx(BaseLink,Object.assign({variant:"button",size:size,color:color,icon:CollapsibleChevronIcon,iconPosition:"right",isDisabled:isDisabled,testID:testID,onClick:toggleIsExpanded,accessibilityProps:{label:accessibilityLabel,controls:collapsibleBodyId,expanded:isExpanded}},getStyledProps(styledProps),{children:children}));};var CollapsibleLink=assignWithoutSideEffects(_CollapsibleLink,{componentId:MetaConstants.CollapsibleLink});
11
18
 
12
19
  export { CollapsibleLink };
13
20
  //# sourceMappingURL=CollapsibleLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleLink.js","sources":["../../../../../src/components/Collapsible/CollapsibleLink.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback } from 'react';\nimport { useCollapsible } from './CollapsibleContext';\nimport { CollapsibleChevronIcon } from './CollapsibleChevronIcon';\nimport type { LinkProps } from '~components/Link';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype CollapsibleLinkProps = Pick<\n LinkProps,\n 'size' | 'isDisabled' | 'testID' | 'accessibilityLabel' | 'children'\n>;\n\nconst _CollapsibleLink = ({\n children,\n size,\n isDisabled,\n testID,\n accessibilityLabel,\n}: CollapsibleLinkProps): ReactElement => {\n const { onExpandChange, isExpanded, collapsibleBodyId } = useCollapsible();\n\n const toggleIsExpanded = useCallback(() => onExpandChange(!isExpanded), [\n onExpandChange,\n isExpanded,\n ]);\n\n return (\n <BaseLink\n variant=\"button\"\n size={size}\n icon={CollapsibleChevronIcon}\n iconPosition=\"right\"\n isDisabled={isDisabled}\n testID={testID}\n onClick={toggleIsExpanded}\n accessibilityProps={{\n label: accessibilityLabel,\n controls: collapsibleBodyId,\n expanded: isExpanded,\n }}\n >\n {children}\n </BaseLink>\n );\n};\n\nconst CollapsibleLink = assignWithoutSideEffects(_CollapsibleLink, {\n componentId: MetaConstants.CollapsibleLink,\n});\n\nexport type { CollapsibleLinkProps };\nexport { CollapsibleLink };\n"],"names":["_CollapsibleLink","_ref","children","size","isDisabled","testID","accessibilityLabel","_useCollapsible","useCollapsible","onExpandChange","isExpanded","collapsibleBodyId","toggleIsExpanded","useCallback","_jsx","BaseLink","variant","icon","CollapsibleChevronIcon","iconPosition","onClick","accessibilityProps","label","controls","expanded","CollapsibleLink","assignWithoutSideEffects","componentId","MetaConstants"],"mappings":";;;;;;;;;AAcA,IAAMA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAMoB,KALxCC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CACJC,UAAU,CAAAH,IAAA,CAAVG,UAAU,CACVC,MAAM,CAAAJ,IAAA,CAANI,MAAM,CACNC,kBAAkB,CAAAL,IAAA,CAAlBK,kBAAkB,CAElB,IAAAC,eAAA,CAA0DC,cAAc,EAAE,CAAlEC,cAAc,CAAAF,eAAA,CAAdE,cAAc,CAAEC,UAAU,CAAAH,eAAA,CAAVG,UAAU,CAAEC,iBAAiB,CAAAJ,eAAA,CAAjBI,iBAAiB,CAErD,IAAMC,gBAAgB,CAAGC,WAAW,CAAC,kBAAMJ,cAAc,CAAC,CAACC,UAAU,CAAC,CAAE,CAAA,CAAA,CACtED,cAAc,CACdC,UAAU,CACX,CAAC,CAEF,OACEI,GAAA,CAACC,QAAQ,CAAA,CACPC,OAAO,CAAC,QAAQ,CAChBb,IAAI,CAAEA,IAAK,CACXc,IAAI,CAAEC,sBAAuB,CAC7BC,YAAY,CAAC,OAAO,CACpBf,UAAU,CAAEA,UAAW,CACvBC,MAAM,CAAEA,MAAO,CACfe,OAAO,CAAER,gBAAiB,CAC1BS,kBAAkB,CAAE,CAClBC,KAAK,CAAEhB,kBAAkB,CACzBiB,QAAQ,CAAEZ,iBAAiB,CAC3Ba,QAAQ,CAAEd,UACZ,CAAE,CAAAR,QAAA,CAEDA,QAAQ,CACD,CAAC,CAEf,CAAC,CAEK,IAAAuB,eAAe,CAAGC,wBAAwB,CAAC1B,gBAAgB,CAAE,CACjE2B,WAAW,CAAEC,aAAa,CAACH,eAC7B,CAAC;;;;"}
1
+ {"version":3,"file":"CollapsibleLink.js","sources":["../../../../../src/components/Collapsible/CollapsibleLink.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback } from 'react';\nimport { useCollapsible } from './CollapsibleContext';\nimport { CollapsibleChevronIcon } from './CollapsibleChevronIcon';\nimport type { LinkProps } from '~components/Link';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\n\ntype CollapsibleLinkProps = Pick<\n LinkProps,\n 'color' | 'size' | 'isDisabled' | 'testID' | 'accessibilityLabel' | 'children'\n> &\n StyledPropsBlade;\n\nconst _CollapsibleLink = ({\n children,\n size,\n color = 'primary',\n isDisabled,\n testID,\n accessibilityLabel,\n ...styledProps\n}: CollapsibleLinkProps): ReactElement => {\n const { onExpandChange, isExpanded, collapsibleBodyId } = useCollapsible();\n\n const toggleIsExpanded = useCallback(() => onExpandChange(!isExpanded), [\n onExpandChange,\n isExpanded,\n ]);\n\n return (\n <BaseLink\n variant=\"button\"\n size={size}\n color={color}\n icon={CollapsibleChevronIcon}\n iconPosition=\"right\"\n isDisabled={isDisabled}\n testID={testID}\n onClick={toggleIsExpanded}\n accessibilityProps={{\n label: accessibilityLabel,\n controls: collapsibleBodyId,\n expanded: isExpanded,\n }}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseLink>\n );\n};\n\nconst CollapsibleLink = assignWithoutSideEffects(_CollapsibleLink, {\n componentId: MetaConstants.CollapsibleLink,\n});\n\nexport type { CollapsibleLinkProps };\nexport { CollapsibleLink };\n"],"names":["_CollapsibleLink","_ref","children","size","_ref$color","color","isDisabled","testID","accessibilityLabel","styledProps","_objectWithoutProperties","_excluded","_useCollapsible","useCollapsible","onExpandChange","isExpanded","collapsibleBodyId","toggleIsExpanded","useCallback","_jsx","BaseLink","Object","assign","variant","icon","CollapsibleChevronIcon","iconPosition","onClick","accessibilityProps","label","controls","expanded","getStyledProps","CollapsibleLink","assignWithoutSideEffects","componentId","MetaConstants"],"mappings":";;;;;;;;;;;;;;;;qFAiBA,IAAMA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAQoB,CAAA,IAPxCC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAAAC,UAAA,CAAAH,IAAA,CACJI,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAG,KAAA,CAAA,CAAA,SAAS,CAAAA,UAAA,CACjBE,UAAU,CAAAL,IAAA,CAAVK,UAAU,CACVC,MAAM,CAAAN,IAAA,CAANM,MAAM,CACNC,kBAAkB,CAAAP,IAAA,CAAlBO,kBAAkB,CACfC,WAAW,CAAAC,wBAAA,CAAAT,IAAA,CAAAU,SAAA,CAAA,CAEd,IAAAC,eAAA,CAA0DC,cAAc,EAAE,CAAlEC,cAAc,CAAAF,eAAA,CAAdE,cAAc,CAAEC,UAAU,CAAAH,eAAA,CAAVG,UAAU,CAAEC,iBAAiB,CAAAJ,eAAA,CAAjBI,iBAAiB,CAErD,IAAMC,gBAAgB,CAAGC,WAAW,CAAC,UAAA,CAAA,OAAMJ,cAAc,CAAC,CAACC,UAAU,CAAC,CAAA,CAAA,CAAE,CACtED,cAAc,CACdC,UAAU,CACX,CAAC,CAEF,OACEI,GAAA,CAACC,QAAQ,CAAAC,MAAA,CAAAC,MAAA,CACPC,CAAAA,OAAO,CAAC,QAAQ,CAChBpB,IAAI,CAAEA,IAAK,CACXE,KAAK,CAAEA,KAAM,CACbmB,IAAI,CAAEC,sBAAuB,CAC7BC,YAAY,CAAC,OAAO,CACpBpB,UAAU,CAAEA,UAAW,CACvBC,MAAM,CAAEA,MAAO,CACfoB,OAAO,CAAEV,gBAAiB,CAC1BW,kBAAkB,CAAE,CAClBC,KAAK,CAAErB,kBAAkB,CACzBsB,QAAQ,CAAEd,iBAAiB,CAC3Be,QAAQ,CAAEhB,UACZ,CAAE,CAAA,CACEiB,cAAc,CAACvB,WAAW,CAAC,EAAAP,QAAA,CAE9BA,QAAQ,CAAA,CACD,CAAC,CAEf,CAAC,CAEK,IAAA+B,eAAe,CAAGC,wBAAwB,CAAClC,gBAAgB,CAAE,CACjEmC,WAAW,CAAEC,aAAa,CAACH,eAC7B,CAAC;;;;"}
@@ -4,7 +4,7 @@ import 'react';
4
4
  import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.native.js';
5
5
  import '../BladeProvider/useTheme.js';
6
6
 
7
- var getCollapsibleBodyContentBoxProps=function getCollapsibleBodyContentBoxProps(_ref){var direction=_ref.direction;return {marginTop:direction==='bottom'?'spacing.5':'spacing.0',marginBottom:direction==='top'?'spacing.5':'spacing.0'};};var getOpacity=function getOpacity(_ref2){var isExpanded=_ref2.isExpanded;return isExpanded?1:0.8;};var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration.xmoderate);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard.effective;};var getCollapsibleChevronIconTransforms=function getCollapsibleChevronIconTransforms(){return {transformExpanded:-180,transformCollapsed:0};};
7
+ var getCollapsibleBodyContentBoxProps=function getCollapsibleBodyContentBoxProps(_ref){var direction=_ref.direction,_hasMargin=_ref._hasMargin;if(!_hasMargin){return {};}return {marginTop:direction==='bottom'?'spacing.5':'spacing.0',marginBottom:direction==='top'?'spacing.5':'spacing.0'};};var getOpacity=function getOpacity(_ref2){var isExpanded=_ref2.isExpanded;return isExpanded?1:0.8;};var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration.xmoderate);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard.effective;};var getCollapsibleChevronIconTransforms=function getCollapsibleChevronIconTransforms(){return {transformExpanded:-180,transformCollapsed:0};};
8
8
 
9
9
  export { getCollapsibleBodyContentBoxProps, getCollapsibleChevronIconTransforms, getOpacity, getTransitionDuration, getTransitionEasing };
10
10
  //# sourceMappingURL=commonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commonStyles.js","sources":["../../../../../src/components/Collapsible/commonStyles.ts"],"sourcesContent":["import type { CollapsibleProps } from './Collapsible';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\nimport { makeMotionTime } from '~utils';\n\nconst getCollapsibleBodyContentBoxProps = ({\n direction,\n}: {\n direction: CollapsibleProps['direction'];\n}): BoxProps => ({\n /**\n * Need a margin inside the outside wrapper so this is\n * included in height calculations and prevents jank\n */\n marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0',\n marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0',\n});\n\nconst getOpacity = ({ isExpanded }: { isExpanded: boolean }): number => (isExpanded ? 1 : 0.8);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration.xmoderate);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard.effective;\n\nconst getCollapsibleChevronIconTransforms = (): {\n transformExpanded: number;\n transformCollapsed: number;\n} => ({ transformExpanded: -180, transformCollapsed: 0 });\n\nexport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n getCollapsibleChevronIconTransforms,\n};\n"],"names":["getCollapsibleBodyContentBoxProps","_ref","direction","marginTop","marginBottom","getOpacity","_ref2","isExpanded","getTransitionDuration","theme","makeMotionTime","motion","duration","xmoderate","getTransitionEasing","easing","standard","effective","getCollapsibleChevronIconTransforms","transformExpanded","transformCollapsed"],"mappings":";;;;;;AAKM,IAAAA,iCAAiC,CAAG,SAApCA,iCAAiCA,CAAAC,IAAA,CACrC,CAAA,IAAAC,SAAS,CAAAD,IAAA,CAATC,SAAS,CAGM,OAAA,CAKfC,SAAS,CAAED,SAAS,GAAK,QAAQ,CAAG,WAAW,CAAG,WAAW,CAC7DE,YAAY,CAAEF,SAAS,GAAK,KAAK,CAAG,WAAW,CAAG,WACpD,CAAC,GAEK,IAAAG,UAAU,CAAG,SAAbA,UAAUA,CAAAC,KAAA,CAAA,CAAA,IAAMC,UAAU,CAAAD,KAAA,CAAVC,UAAU,QAAyCA,UAAU,CAAG,CAAC,CAAG,GAAG,CAAC,EAGxF,IAAAC,qBAAqB,CAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,SAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAG/F,EAAM,IAAAC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIL,KAAY,CAAA,CAAA,OAAKA,KAAK,CAACE,MAAM,CAACI,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAA,EAE9E,IAAAC,mCAAmC,CAAG,SAAtCA,mCAAmCA,EAAA,CAAA,OAGnC,CAAEC,iBAAiB,CAAE,CAAC,GAAG,CAAEC,kBAAkB,CAAE,CAAE,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"commonStyles.js","sources":["../../../../../src/components/Collapsible/commonStyles.ts"],"sourcesContent":["import type { CollapsibleProps } from './Collapsible';\nimport type { CollapsibleBodyProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\nimport { makeMotionTime } from '~utils';\n\nconst getCollapsibleBodyContentBoxProps = ({\n direction,\n _hasMargin,\n}: {\n direction: CollapsibleProps['direction'];\n _hasMargin: CollapsibleBodyProps['_hasMargin'];\n}): BoxProps => {\n if (!_hasMargin) {\n return {};\n }\n\n return {\n /**\n * Need a margin inside the outside wrapper so this is\n * included in height calculations and prevents jank\n */\n marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0',\n marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0',\n };\n};\n\nconst getOpacity = ({ isExpanded }: { isExpanded: boolean }): number => (isExpanded ? 1 : 0.8);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration.xmoderate);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard.effective;\n\nconst getCollapsibleChevronIconTransforms = (): {\n transformExpanded: number;\n transformCollapsed: number;\n} => ({ transformExpanded: -180, transformCollapsed: 0 });\n\nexport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n getCollapsibleChevronIconTransforms,\n};\n"],"names":["getCollapsibleBodyContentBoxProps","_ref","direction","_hasMargin","marginTop","marginBottom","getOpacity","_ref2","isExpanded","getTransitionDuration","theme","makeMotionTime","motion","duration","xmoderate","getTransitionEasing","easing","standard","effective","getCollapsibleChevronIconTransforms","transformExpanded","transformCollapsed"],"mappings":";;;;;;AAMM,IAAAA,iCAAiC,CAAG,SAApCA,iCAAiCA,CAAAC,IAAA,CAMvB,CAAA,IALdC,SAAS,CAAAD,IAAA,CAATC,SAAS,CACTC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CAKV,GAAI,CAACA,UAAU,CAAE,CACf,OAAO,EAAE,CACX,CAEA,OAAO,CAKLC,SAAS,CAAEF,SAAS,GAAK,QAAQ,CAAG,WAAW,CAAG,WAAW,CAC7DG,YAAY,CAAEH,SAAS,GAAK,KAAK,CAAG,WAAW,CAAG,WACpD,CAAC,CACH,EAEM,IAAAI,UAAU,CAAG,SAAbA,UAAUA,CAAAC,KAAA,MAAMC,UAAU,CAAAD,KAAA,CAAVC,UAAU,CAAyC,OAAAA,UAAU,CAAG,CAAC,CAAG,GAAG,CAAC,EAGxF,IAAAC,qBAAqB,CAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,CAAA,CAAA,OAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAG/F,EAAM,IAAAC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIL,KAAY,SAAKA,KAAK,CAACE,MAAM,CAACI,MAAM,CAACC,QAAQ,CAACC,SAAS,CAEpF,EAAM,IAAAC,mCAAmC,CAAG,SAAtCA,mCAAmCA,UAGnC,CAAEC,iBAAiB,CAAE,CAAC,GAAG,CAAEC,kBAAkB,CAAE,CAAE,CAAC,CAAC;;;;"}
@@ -25,7 +25,7 @@ import '@babel/runtime/helpers/defineProperty';
25
25
  import Svg from '../Icons/_Svg/Svg/Svg.native.js';
26
26
  import getBaseTextStyles from '../Typography/BaseText/getBaseTextStyles.js';
27
27
 
28
- var pulseAnimation={opacityInitial:1,opacityMid:0.65,opacityFinal:1};var StyledSVGText=styled(Text)(function(_ref){var theme=_ref.theme,size=_ref.size,weight=_ref.weight;var textProps=getTextProps({variant:'body',size:size,weight:weight});return Object.assign({},getBaseTextStyles(Object.assign({theme:theme},textProps)),{strokeWidth:0,fill:getIn(theme.colors,textProps.color)});});var CircularProgressBarFilled=function CircularProgressBarFilled(_ref2){var progressPercent=_ref2.progressPercent,fillColor=_ref2.fillColor,backgroundColor=_ref2.backgroundColor,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,label=_ref2.label,_ref2$showPercentage=_ref2.showPercentage,showPercentage=_ref2$showPercentage===void 0?true:_ref2$showPercentage,isMeter=_ref2.isMeter,motionEasing=_ref2.motionEasing,pulseMotionDuration=_ref2.pulseMotionDuration,pulseMotionDelay=_ref2.pulseMotionDelay,fillMotionDuration=_ref2.fillMotionDuration;var _getCircularProgressS=getCircularProgressSVGTokens({size:size,progressPercent:progressPercent}),sqSize=_getCircularProgressS.sqSize,strokeWidth=_getCircularProgressS.strokeWidth,radius=_getCircularProgressS.radius,viewBox=_getCircularProgressS.viewBox,dashArray=_getCircularProgressS.dashArray,dashOffset=_getCircularProgressS.dashOffset;var AnimatedCircle=Animated.createAnimatedComponent(Circle);var animatedOpacity=useSharedValue(pulseAnimation.opacityInitial);var animatedStrokeDashoffset=useSharedValue(dashOffset);var _useTheme=useTheme(),theme=_useTheme.theme;var fillAndPulseEasing=getIn(theme.motion,motionEasing);var pulseDuration=castNativeType(makeMotionTime(getIn(theme.motion,pulseMotionDuration)))/2;useEffect(function(){var fillDuration=castNativeType(makeMotionTime(getIn(theme.motion,fillMotionDuration)));animatedStrokeDashoffset.value=withTiming(dashOffset,{duration:fillDuration,easing:fillAndPulseEasing});return function(){cancelAnimation(animatedStrokeDashoffset);};},[dashOffset,animatedStrokeDashoffset,fillMotionDuration,theme,fillAndPulseEasing]);useEffect(function(){var pulsatingAnimationTimingConfig={duration:pulseDuration,easing:fillAndPulseEasing};if(!isMeter){animatedOpacity.value=withDelay(castNativeType(makeMotionTime(getIn(theme.motion,pulseMotionDelay))),withRepeat(withSequence(withTiming(pulseAnimation.opacityMid,pulsatingAnimationTimingConfig),withTiming(pulseAnimation.opacityFinal,pulsatingAnimationTimingConfig)),-1));}return function(){cancelAnimation(animatedOpacity);};},[animatedOpacity,fillAndPulseEasing,pulseDuration,pulseMotionDelay,theme,isMeter]);var firstIndicatorStyles=useAnimatedStyle(function(){return {strokeDashoffset:animatedStrokeDashoffset.value,opacity:progressPercent<100?animatedOpacity.value:1};});return jsxs(BaseBox,{display:"flex",width:"fit-content",alignItems:"center",children:[jsxs(Svg,{width:String(sqSize),height:String(sqSize),viewBox:viewBox,children:[jsx(Circle,{fill:"none",stroke:backgroundColor,cx:String(sqSize/2),cy:String(sqSize/2),r:String(radius),strokeWidth:`${strokeWidth}px`}),jsx(AnimatedCircle,{fill:"none",stroke:fillColor,cx:sqSize/2,cy:sqSize/2,r:radius,strokeWidth:`${strokeWidth}px`,transform:`rotate(-90 ${sqSize/2} ${sqSize/2})`,strokeDasharray:dashArray,strokeDashoffset:dashOffset,style:firstIndicatorStyles}),showPercentage&&size!=='small'&&jsx(StyledSVGText,{size:circularProgressSizeTokens[size].percentTextSize,weight:"semibold",x:"50%",y:"50%",textAnchor:"middle",dy:".5em",children:`${progressPercent}%`})]}),jsx(CircularProgressLabel,{progressPercent:progressPercent,size:size,label:label,showPercentage:showPercentage})]});};
28
+ var pulseAnimation={opacityInitial:1,opacityMid:0.65,opacityFinal:1};var StyledSVGText=styled(Text)(function(_ref){var theme=_ref.theme,size=_ref.size,weight=_ref.weight;var textProps=getTextProps({variant:'body',size:size,weight:weight});return Object.assign({},getBaseTextStyles(Object.assign({theme:theme},textProps)),{strokeWidth:0,fill:textProps.color==='currentColor'?textProps.color:getIn(theme.colors,textProps.color)});});var CircularProgressBarFilled=function CircularProgressBarFilled(_ref2){var progressPercent=_ref2.progressPercent,fillColor=_ref2.fillColor,backgroundColor=_ref2.backgroundColor,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,label=_ref2.label,_ref2$showPercentage=_ref2.showPercentage,showPercentage=_ref2$showPercentage===void 0?true:_ref2$showPercentage,isMeter=_ref2.isMeter,motionEasing=_ref2.motionEasing,pulseMotionDuration=_ref2.pulseMotionDuration,pulseMotionDelay=_ref2.pulseMotionDelay,fillMotionDuration=_ref2.fillMotionDuration;var _getCircularProgressS=getCircularProgressSVGTokens({size:size,progressPercent:progressPercent}),sqSize=_getCircularProgressS.sqSize,strokeWidth=_getCircularProgressS.strokeWidth,radius=_getCircularProgressS.radius,viewBox=_getCircularProgressS.viewBox,dashArray=_getCircularProgressS.dashArray,dashOffset=_getCircularProgressS.dashOffset;var AnimatedCircle=Animated.createAnimatedComponent(Circle);var animatedOpacity=useSharedValue(pulseAnimation.opacityInitial);var animatedStrokeDashoffset=useSharedValue(dashOffset);var _useTheme=useTheme(),theme=_useTheme.theme;var fillAndPulseEasing=getIn(theme.motion,motionEasing);var pulseDuration=castNativeType(makeMotionTime(getIn(theme.motion,pulseMotionDuration)))/2;useEffect(function(){var fillDuration=castNativeType(makeMotionTime(getIn(theme.motion,fillMotionDuration)));animatedStrokeDashoffset.value=withTiming(dashOffset,{duration:fillDuration,easing:fillAndPulseEasing});return function(){cancelAnimation(animatedStrokeDashoffset);};},[dashOffset,animatedStrokeDashoffset,fillMotionDuration,theme,fillAndPulseEasing]);useEffect(function(){var pulsatingAnimationTimingConfig={duration:pulseDuration,easing:fillAndPulseEasing};if(!isMeter){animatedOpacity.value=withDelay(castNativeType(makeMotionTime(getIn(theme.motion,pulseMotionDelay))),withRepeat(withSequence(withTiming(pulseAnimation.opacityMid,pulsatingAnimationTimingConfig),withTiming(pulseAnimation.opacityFinal,pulsatingAnimationTimingConfig)),-1));}return function(){cancelAnimation(animatedOpacity);};},[animatedOpacity,fillAndPulseEasing,pulseDuration,pulseMotionDelay,theme,isMeter]);var firstIndicatorStyles=useAnimatedStyle(function(){return {strokeDashoffset:animatedStrokeDashoffset.value,opacity:progressPercent<100?animatedOpacity.value:1};});return jsxs(BaseBox,{display:"flex",width:"fit-content",alignItems:"center",children:[jsxs(Svg,{width:String(sqSize),height:String(sqSize),viewBox:viewBox,children:[jsx(Circle,{fill:"none",stroke:backgroundColor,cx:String(sqSize/2),cy:String(sqSize/2),r:String(radius),strokeWidth:`${strokeWidth}px`}),jsx(AnimatedCircle,{fill:"none",stroke:fillColor,cx:sqSize/2,cy:sqSize/2,r:radius,strokeWidth:`${strokeWidth}px`,transform:`rotate(-90 ${sqSize/2} ${sqSize/2})`,strokeDasharray:dashArray,strokeDashoffset:dashOffset,style:firstIndicatorStyles}),showPercentage&&size!=='small'&&jsx(StyledSVGText,{size:circularProgressSizeTokens[size].percentTextSize,weight:"semibold",x:"50%",y:"50%",textAnchor:"middle",dy:".5em",children:`${progressPercent}%`})]}),jsx(CircularProgressLabel,{progressPercent:progressPercent,size:size,label:label,showPercentage:showPercentage})]});};
29
29
 
30
30
  export { CircularProgressBarFilled };
31
31
  //# sourceMappingURL=CircularProgressBar.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CircularProgressBar.native.js","sources":["../../../../../src/components/ProgressBar/CircularProgressBar.native.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport styled from 'styled-components/native';\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport { Text as SVGText, Circle } from 'react-native-svg';\nimport type { CircularProgressBarFilledProps } from './types';\nimport { circularProgressSizeTokens, getCircularProgressSVGTokens } from './progressBarTokens';\nimport { CircularProgressLabel } from './CircularProgressLabel';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport type { TextProps } from '~components/Typography';\nimport { getTextProps } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { castNativeType } from '~utils';\nimport { Svg } from '~components/Icons/_Svg';\nimport getBaseTextStyles from '~components/Typography/BaseText/getBaseTextStyles';\n\nconst pulseAnimation = {\n opacityInitial: 1,\n opacityMid: 0.65,\n opacityFinal: 1,\n};\n\nconst StyledSVGText = styled(SVGText)<Pick<TextProps<{ variant: 'body' }>, 'size' | 'weight'>>(\n ({ theme, size, weight }) => {\n const textProps = getTextProps({ variant: 'body', size, weight });\n\n return {\n ...getBaseTextStyles({ theme, ...textProps }),\n strokeWidth: 0,\n fill: getIn(theme.colors, textProps.color!),\n };\n },\n);\n\nconst CircularProgressBarFilled = ({\n progressPercent,\n fillColor,\n backgroundColor,\n size = 'small',\n label,\n showPercentage = true,\n isMeter,\n motionEasing,\n pulseMotionDuration,\n pulseMotionDelay,\n fillMotionDuration,\n}: CircularProgressBarFilledProps): React.ReactElement => {\n const {\n sqSize,\n strokeWidth,\n radius,\n viewBox,\n dashArray,\n dashOffset,\n } = getCircularProgressSVGTokens({ size, progressPercent });\n\n const AnimatedCircle = Animated.createAnimatedComponent(Circle);\n const animatedOpacity = useSharedValue(pulseAnimation.opacityInitial);\n const animatedStrokeDashoffset = useSharedValue(dashOffset);\n const { theme } = useTheme();\n const fillAndPulseEasing = getIn(theme.motion, motionEasing);\n const pulseDuration =\n castNativeType(makeMotionTime(getIn(theme.motion, pulseMotionDuration))) / 2;\n\n // Trigger animation for progress fill\n useEffect(() => {\n const fillDuration = castNativeType(makeMotionTime(getIn(theme.motion, fillMotionDuration)));\n animatedStrokeDashoffset.value = withTiming(dashOffset, {\n duration: fillDuration,\n easing: fillAndPulseEasing,\n });\n return () => {\n cancelAnimation(animatedStrokeDashoffset);\n };\n }, [dashOffset, animatedStrokeDashoffset, fillMotionDuration, theme, fillAndPulseEasing]);\n\n // Trigger pulsating animation\n useEffect(() => {\n const pulsatingAnimationTimingConfig = {\n duration: pulseDuration,\n easing: fillAndPulseEasing,\n };\n if (!isMeter) {\n animatedOpacity.value = withDelay(\n castNativeType(makeMotionTime(getIn(theme.motion, pulseMotionDelay))),\n withRepeat(\n withSequence(\n withTiming(pulseAnimation.opacityMid, pulsatingAnimationTimingConfig),\n withTiming(pulseAnimation.opacityFinal, pulsatingAnimationTimingConfig),\n ),\n -1,\n ),\n );\n }\n\n return () => {\n cancelAnimation(animatedOpacity);\n };\n }, [animatedOpacity, fillAndPulseEasing, pulseDuration, pulseMotionDelay, theme, isMeter]);\n\n const firstIndicatorStyles = useAnimatedStyle(() => {\n return {\n strokeDashoffset: animatedStrokeDashoffset.value,\n opacity: progressPercent < 100 ? animatedOpacity.value : 1,\n };\n });\n\n return (\n <BaseBox display=\"flex\" width=\"fit-content\" alignItems=\"center\">\n <Svg width={String(sqSize)} height={String(sqSize)} viewBox={viewBox}>\n <Circle\n fill=\"none\"\n stroke={backgroundColor}\n cx={String(sqSize / 2)}\n cy={String(sqSize / 2)}\n r={String(radius)}\n strokeWidth={`${strokeWidth}px`}\n />\n\n <AnimatedCircle\n fill=\"none\"\n stroke={fillColor}\n cx={sqSize / 2}\n cy={sqSize / 2}\n r={radius}\n strokeWidth={`${strokeWidth}px`}\n // Start progress marker at 12 O'Clock\n transform={`rotate(-90 ${sqSize / 2} ${sqSize / 2})`}\n strokeDasharray={dashArray}\n strokeDashoffset={dashOffset}\n style={firstIndicatorStyles}\n />\n\n {showPercentage && size !== 'small' && (\n <StyledSVGText\n size={circularProgressSizeTokens[size].percentTextSize}\n weight=\"semibold\"\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dy=\".5em\"\n >\n {`${progressPercent}%`}\n </StyledSVGText>\n )}\n </Svg>\n\n <CircularProgressLabel\n progressPercent={progressPercent}\n size={size}\n label={label}\n showPercentage={showPercentage}\n />\n </BaseBox>\n );\n};\n\nexport { CircularProgressBarFilled };\n"],"names":["pulseAnimation","opacityInitial","opacityMid","opacityFinal","StyledSVGText","styled","SVGText","_ref","theme","size","weight","textProps","getTextProps","variant","Object","assign","getBaseTextStyles","strokeWidth","fill","getIn","colors","color","CircularProgressBarFilled","_ref2","progressPercent","fillColor","backgroundColor","_ref2$size","label","_ref2$showPercentage","showPercentage","isMeter","motionEasing","pulseMotionDuration","pulseMotionDelay","fillMotionDuration","_getCircularProgressS","getCircularProgressSVGTokens","sqSize","radius","viewBox","dashArray","dashOffset","AnimatedCircle","Animated","createAnimatedComponent","Circle","animatedOpacity","useSharedValue","animatedStrokeDashoffset","_useTheme","useTheme","fillAndPulseEasing","motion","pulseDuration","castNativeType","makeMotionTime","useEffect","fillDuration","value","withTiming","duration","easing","cancelAnimation","pulsatingAnimationTimingConfig","withDelay","withRepeat","withSequence","firstIndicatorStyles","useAnimatedStyle","strokeDashoffset","opacity","_jsxs","BaseBox","display","width","alignItems","children","Svg","String","height","_jsx","stroke","cx","cy","r","transform","strokeDasharray","style","circularProgressSizeTokens","percentTextSize","x","y","textAnchor","dy","CircularProgressLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAMA,cAAc,CAAG,CACrBC,cAAc,CAAE,CAAC,CACjBC,UAAU,CAAE,IAAI,CAChBC,YAAY,CAAE,CAChB,CAAC,CAED,IAAMC,aAAa,CAAGC,MAAM,CAACC,IAAO,CAAC,CACnC,SAAAC,IAAA,CAA6B,KAA1BC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAAEC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACpB,IAAMC,SAAS,CAAGC,YAAY,CAAC,CAAEC,OAAO,CAAE,MAAM,CAAEJ,IAAI,CAAJA,IAAI,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAEjE,OAAAI,MAAA,CAAAC,MAAA,CAAA,EAAA,CACKC,iBAAiB,CAAAF,MAAA,CAAAC,MAAA,CAAGP,CAAAA,KAAK,CAALA,KAAK,CAAA,CAAKG,SAAS,CAAE,CAAC,EAC7CM,WAAW,CAAE,CAAC,CACdC,IAAI,CAAEC,KAAK,CAACX,KAAK,CAACY,MAAM,CAAET,SAAS,CAACU,KAAM,CAAC,CAAA,CAAA,CAE/C,CACF,CAAC,CAEK,IAAAC,yBAAyB,CAAG,SAA5BA,yBAAyBA,CAAAC,KAAA,CAY2B,CAAA,IAXxDC,eAAe,CAAAD,KAAA,CAAfC,eAAe,CACfC,SAAS,CAAAF,KAAA,CAATE,SAAS,CACTC,eAAe,CAAAH,KAAA,CAAfG,eAAe,CAAAC,UAAA,CAAAJ,KAAA,CACfd,IAAI,CAAJA,IAAI,CAAAkB,UAAA,UAAG,OAAO,CAAAA,UAAA,CACdC,KAAK,CAAAL,KAAA,CAALK,KAAK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CAAC,CAAC,KAAK,CACPC,CAAC,CAAC,KAAK,CACPC,UAAU,CAAC,QAAQ,CACnBC,EAAE,CAAC,MAAM,CAAAjB,QAAA,CAEP,CAAA,EAAErD,eAAgB,CAAA,CAAA,CAAE,CACT,CAChB,CAAA,CACE,CAAC,CAENyD,GAAA,CAACc,qBAAqB,CACpBvE,CAAAA,eAAe,CAAEA,eAAgB,CACjCf,IAAI,CAAEA,IAAK,CACXmB,KAAK,CAAEA,KAAM,CACbE,cAAc,CAAEA,cAAe,CAChC,CAAC,CAAA,CACK,CAAC,CAEd;;;;"}
1
+ {"version":3,"file":"CircularProgressBar.native.js","sources":["../../../../../src/components/ProgressBar/CircularProgressBar.native.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport styled from 'styled-components/native';\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport { Text as SVGText, Circle } from 'react-native-svg';\nimport type { CircularProgressBarFilledProps } from './types';\nimport { circularProgressSizeTokens, getCircularProgressSVGTokens } from './progressBarTokens';\nimport { CircularProgressLabel } from './CircularProgressLabel';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport type { TextProps } from '~components/Typography';\nimport { getTextProps } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { castNativeType } from '~utils';\nimport { Svg } from '~components/Icons/_Svg';\nimport getBaseTextStyles from '~components/Typography/BaseText/getBaseTextStyles';\n\nconst pulseAnimation = {\n opacityInitial: 1,\n opacityMid: 0.65,\n opacityFinal: 1,\n};\n\nconst StyledSVGText = styled(SVGText)<Pick<TextProps<{ variant: 'body' }>, 'size' | 'weight'>>(\n ({ theme, size, weight }) => {\n const textProps = getTextProps({ variant: 'body', size, weight });\n\n return {\n ...getBaseTextStyles({ theme, ...textProps }),\n strokeWidth: 0,\n fill:\n textProps.color === 'currentColor'\n ? textProps.color\n : getIn(theme.colors, textProps.color!),\n };\n },\n);\n\nconst CircularProgressBarFilled = ({\n progressPercent,\n fillColor,\n backgroundColor,\n size = 'small',\n label,\n showPercentage = true,\n isMeter,\n motionEasing,\n pulseMotionDuration,\n pulseMotionDelay,\n fillMotionDuration,\n}: CircularProgressBarFilledProps): React.ReactElement => {\n const {\n sqSize,\n strokeWidth,\n radius,\n viewBox,\n dashArray,\n dashOffset,\n } = getCircularProgressSVGTokens({ size, progressPercent });\n\n const AnimatedCircle = Animated.createAnimatedComponent(Circle);\n const animatedOpacity = useSharedValue(pulseAnimation.opacityInitial);\n const animatedStrokeDashoffset = useSharedValue(dashOffset);\n const { theme } = useTheme();\n const fillAndPulseEasing = getIn(theme.motion, motionEasing);\n const pulseDuration =\n castNativeType(makeMotionTime(getIn(theme.motion, pulseMotionDuration))) / 2;\n\n // Trigger animation for progress fill\n useEffect(() => {\n const fillDuration = castNativeType(makeMotionTime(getIn(theme.motion, fillMotionDuration)));\n animatedStrokeDashoffset.value = withTiming(dashOffset, {\n duration: fillDuration,\n easing: fillAndPulseEasing,\n });\n return () => {\n cancelAnimation(animatedStrokeDashoffset);\n };\n }, [dashOffset, animatedStrokeDashoffset, fillMotionDuration, theme, fillAndPulseEasing]);\n\n // Trigger pulsating animation\n useEffect(() => {\n const pulsatingAnimationTimingConfig = {\n duration: pulseDuration,\n easing: fillAndPulseEasing,\n };\n if (!isMeter) {\n animatedOpacity.value = withDelay(\n castNativeType(makeMotionTime(getIn(theme.motion, pulseMotionDelay))),\n withRepeat(\n withSequence(\n withTiming(pulseAnimation.opacityMid, pulsatingAnimationTimingConfig),\n withTiming(pulseAnimation.opacityFinal, pulsatingAnimationTimingConfig),\n ),\n -1,\n ),\n );\n }\n\n return () => {\n cancelAnimation(animatedOpacity);\n };\n }, [animatedOpacity, fillAndPulseEasing, pulseDuration, pulseMotionDelay, theme, isMeter]);\n\n const firstIndicatorStyles = useAnimatedStyle(() => {\n return {\n strokeDashoffset: animatedStrokeDashoffset.value,\n opacity: progressPercent < 100 ? animatedOpacity.value : 1,\n };\n });\n\n return (\n <BaseBox display=\"flex\" width=\"fit-content\" alignItems=\"center\">\n <Svg width={String(sqSize)} height={String(sqSize)} viewBox={viewBox}>\n <Circle\n fill=\"none\"\n stroke={backgroundColor}\n cx={String(sqSize / 2)}\n cy={String(sqSize / 2)}\n r={String(radius)}\n strokeWidth={`${strokeWidth}px`}\n />\n\n <AnimatedCircle\n fill=\"none\"\n stroke={fillColor}\n cx={sqSize / 2}\n cy={sqSize / 2}\n r={radius}\n strokeWidth={`${strokeWidth}px`}\n // Start progress marker at 12 O'Clock\n transform={`rotate(-90 ${sqSize / 2} ${sqSize / 2})`}\n strokeDasharray={dashArray}\n strokeDashoffset={dashOffset}\n style={firstIndicatorStyles}\n />\n\n {showPercentage && size !== 'small' && (\n <StyledSVGText\n size={circularProgressSizeTokens[size].percentTextSize}\n weight=\"semibold\"\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dy=\".5em\"\n >\n {`${progressPercent}%`}\n </StyledSVGText>\n )}\n </Svg>\n\n <CircularProgressLabel\n progressPercent={progressPercent}\n size={size}\n label={label}\n showPercentage={showPercentage}\n />\n </BaseBox>\n );\n};\n\nexport { CircularProgressBarFilled };\n"],"names":["pulseAnimation","opacityInitial","opacityMid","opacityFinal","StyledSVGText","styled","SVGText","_ref","theme","size","weight","textProps","getTextProps","variant","Object","assign","getBaseTextStyles","strokeWidth","fill","color","getIn","colors","CircularProgressBarFilled","_ref2","progressPercent","fillColor","backgroundColor","_ref2$size","label","_ref2$showPercentage","showPercentage","isMeter","motionEasing","pulseMotionDuration","pulseMotionDelay","fillMotionDuration","_getCircularProgressS","getCircularProgressSVGTokens","sqSize","radius","viewBox","dashArray","dashOffset","AnimatedCircle","Animated","createAnimatedComponent","Circle","animatedOpacity","useSharedValue","animatedStrokeDashoffset","_useTheme","useTheme","fillAndPulseEasing","motion","pulseDuration","castNativeType","makeMotionTime","useEffect","fillDuration","value","withTiming","duration","easing","cancelAnimation","pulsatingAnimationTimingConfig","withDelay","withRepeat","withSequence","firstIndicatorStyles","useAnimatedStyle","strokeDashoffset","opacity","_jsxs","BaseBox","display","width","alignItems","children","Svg","String","height","_jsx","stroke","cx","cy","r","transform","strokeDasharray","style","circularProgressSizeTokens","percentTextSize","x","y","textAnchor","dy","CircularProgressLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAMA,cAAc,CAAG,CACrBC,cAAc,CAAE,CAAC,CACjBC,UAAU,CAAE,IAAI,CAChBC,YAAY,CAAE,CAChB,CAAC,CAED,IAAMC,aAAa,CAAGC,MAAM,CAACC,IAAO,CAAC,CACnC,SAAAC,IAAA,CAA6B,CAAA,IAA1BC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAAEC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACpB,IAAMC,SAAS,CAAGC,YAAY,CAAC,CAAEC,OAAO,CAAE,MAAM,CAAEJ,IAAI,CAAJA,IAAI,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAEjE,OAAAI,MAAA,CAAAC,MAAA,CACKC,EAAAA,CAAAA,iBAAiB,CAAAF,MAAA,CAAAC,MAAA,CAAA,CAAGP,KAAK,CAALA,KAAK,CAAKG,CAAAA,SAAS,CAAE,CAAC,CAC7CM,CAAAA,WAAW,CAAE,CAAC,CACdC,IAAI,CACFP,SAAS,CAACQ,KAAK,GAAK,cAAc,CAC9BR,SAAS,CAACQ,KAAK,CACfC,KAAK,CAACZ,KAAK,CAACa,MAAM,CAAEV,SAAS,CAACQ,KAAM,CAAC,CAE/C,CAAA,CAAA,CACF,CAAC,CAEK,IAAAG,yBAAyB,CAAG,SAA5BA,yBAAyBA,CAAAC,KAAA,CAY2B,CAAA,IAXxDC,eAAe,CAAAD,KAAA,CAAfC,eAAe,CACfC,SAAS,CAAAF,KAAA,CA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pB,oBAAqB,CAC7B,CAAC,CAEDtC,cAAc,EAAIrB,IAAI,GAAK,OAAO,EACjCwE,GAAA,CAAC7E,aAAa,CAAA,CACZK,IAAI,CAAEgF,0BAA0B,CAAChF,IAAI,CAAC,CAACiF,eAAgB,CACvDhF,MAAM,CAAC,UAAU,CACjBiF,CAAC,CAAC,KAAK,CACPC,CAAC,CAAC,KAAK,CACPC,UAAU,CAAC,QAAQ,CACnBC,EAAE,CAAC,MAAM,CAAAjB,QAAA,CAEP,CAAA,EAAErD,eAAgB,CAAA,CAAA,CAAE,CACT,CAChB,CAAA,CACE,CAAC,CAENyD,GAAA,CAACc,qBAAqB,CACpBvE,CAAAA,eAAe,CAAEA,eAAgB,CACjCf,IAAI,CAAEA,IAAK,CACXmB,KAAK,CAAEA,KAAM,CACbE,cAAc,CAAEA,cAAe,CAChC,CAAC,CAAA,CACK,CAAC,CAEd;;;;"}
@@ -0,0 +1,17 @@
1
+ import '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../Typography/BaseText/BaseText.native.js';
3
+ import 'react';
4
+ import { throwBladeError } from '../../utils/logger/logger.js';
5
+ import '@babel/runtime/helpers/slicedToArray';
6
+ import 'react-native';
7
+ import '../../tokens/global/typography.js';
8
+ import '../../tokens/global/motion.js';
9
+ import '../BladeProvider/useTheme.js';
10
+ import { jsx } from 'react/jsx-runtime';
11
+ import { Text } from '../Typography/Text/Text.js';
12
+ import '../Typography/Code/Code.js';
13
+
14
+ var SideNav=function SideNav(_props){throwBladeError({message:'SideNav is not yet implemented for native',moduleName:'SideNav'});return jsx(Text,{children:"SideNav Component is not available for Native mobile apps."});};
15
+
16
+ export { SideNav };
17
+ //# sourceMappingURL=SideNav.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNav.native.js","sources":["../../../../../src/components/SideNav/SideNav.native.tsx"],"sourcesContent":["import type { SideNavProps } from './types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst SideNav = (_props: SideNavProps): React.ReactElement => {\n throwBladeError({\n message: 'SideNav is not yet implemented for native',\n moduleName: 'SideNav',\n });\n\n return <Text>SideNav Component is not available for Native mobile apps.</Text>;\n};\n\nexport { SideNav };\n"],"names":["SideNav","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,OAAO,CAAG,SAAVA,OAAOA,CAAIC,MAAoB,CAAyB,CAC5DC,eAAe,CAAC,CACdC,OAAO,CAAE,2CAA2C,CACpDC,UAAU,CAAE,SACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,4DAA0D,CAAM,CAAC,CAChF;;;;"}
@@ -0,0 +1,17 @@
1
+ import '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../Typography/BaseText/BaseText.native.js';
3
+ import 'react';
4
+ import { throwBladeError } from '../../utils/logger/logger.js';
5
+ import '@babel/runtime/helpers/slicedToArray';
6
+ import 'react-native';
7
+ import '../../tokens/global/typography.js';
8
+ import '../../tokens/global/motion.js';
9
+ import '../BladeProvider/useTheme.js';
10
+ import { jsx } from 'react/jsx-runtime';
11
+ import { Text } from '../Typography/Text/Text.js';
12
+ import '../Typography/Code/Code.js';
13
+
14
+ var SideNavBody=function SideNavBody(_props){throwBladeError({message:'SideNavBody is not yet implemented for native',moduleName:'SideNavBody'});return jsx(Text,{children:"SideNavBody Component is not available for Native mobile apps."});};
15
+
16
+ export { SideNavBody };
17
+ //# sourceMappingURL=SideNavBody.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavBody.native.js","sources":["../../../../../src/components/SideNav/SideNavBody.native.tsx"],"sourcesContent":["import type { SideNavBodyProps } from './types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst SideNavBody = (_props: SideNavBodyProps): React.ReactElement => {\n throwBladeError({\n message: 'SideNavBody is not yet implemented for native',\n moduleName: 'SideNavBody',\n });\n\n return <Text>SideNavBody Component is not available for Native mobile apps.</Text>;\n};\n\nexport { SideNavBody };\n"],"names":["SideNavBody","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,WAAW,CAAG,SAAdA,WAAWA,CAAIC,MAAwB,CAAyB,CACpEC,eAAe,CAAC,CACdC,OAAO,CAAE,+CAA+C,CACxDC,UAAU,CAAE,aACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,gEAA8D,CAAM,CAAC,CACpF;;;;"}
@@ -0,0 +1,17 @@
1
+ import '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../Typography/BaseText/BaseText.native.js';
3
+ import 'react';
4
+ import { throwBladeError } from '../../utils/logger/logger.js';
5
+ import '@babel/runtime/helpers/slicedToArray';
6
+ import 'react-native';
7
+ import '../../tokens/global/typography.js';
8
+ import '../../tokens/global/motion.js';
9
+ import '../BladeProvider/useTheme.js';
10
+ import { jsx } from 'react/jsx-runtime';
11
+ import { Text } from '../Typography/Text/Text.js';
12
+ import '../Typography/Code/Code.js';
13
+
14
+ var SideNavFooter=function SideNavFooter(_props){throwBladeError({message:'SideNavFooter is not yet implemented for native',moduleName:'SideNavFooter'});return jsx(Text,{children:"SideNavFooter Component is not available for Native mobile apps."});};
15
+
16
+ export { SideNavFooter };
17
+ //# sourceMappingURL=SideNavFooter.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavFooter.native.js","sources":["../../../../../src/components/SideNav/SideNavFooter.native.tsx"],"sourcesContent":["import type { SideNavFooterProps } from './types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst SideNavFooter = (_props: SideNavFooterProps): React.ReactElement => {\n throwBladeError({\n message: 'SideNavFooter is not yet implemented for native',\n moduleName: 'SideNavFooter',\n });\n\n return <Text>SideNavFooter Component is not available for Native mobile apps.</Text>;\n};\n\nexport { SideNavFooter };\n"],"names":["SideNavFooter","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,aAAa,CAAG,SAAhBA,aAAaA,CAAIC,MAA0B,CAAyB,CACxEC,eAAe,CAAC,CACdC,OAAO,CAAE,iDAAiD,CAC1DC,UAAU,CAAE,eACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,kEAAgE,CAAM,CAAC,CACtF;;;;"}
@@ -0,0 +1,17 @@
1
+ import '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../../Typography/BaseText/BaseText.native.js';
3
+ import 'react';
4
+ import { throwBladeError } from '../../../utils/logger/logger.js';
5
+ import '@babel/runtime/helpers/slicedToArray';
6
+ import 'react-native';
7
+ import '../../../tokens/global/typography.js';
8
+ import '../../../tokens/global/motion.js';
9
+ import '../../BladeProvider/useTheme.js';
10
+ import { jsx } from 'react/jsx-runtime';
11
+ import { Text } from '../../Typography/Text/Text.js';
12
+ import '../../Typography/Code/Code.js';
13
+
14
+ var SideNavItem=function SideNavItem(_props){throwBladeError({message:'SideNavItem is not yet implemented for native',moduleName:'SideNavItem'});return jsx(Text,{children:"SideNavItem Component is not available for Native mobile apps."});};
15
+
16
+ export { SideNavItem };
17
+ //# sourceMappingURL=SideNavItem.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavItem.native.js","sources":["../../../../../../src/components/SideNav/SideNavItems/SideNavItem.native.tsx"],"sourcesContent":["import type { SideNavItemProps } from '../types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst SideNavItem = (_props: SideNavItemProps): React.ReactElement => {\n throwBladeError({\n message: 'SideNavItem is not yet implemented for native',\n moduleName: 'SideNavItem',\n });\n\n return <Text>SideNavItem Component is not available for Native mobile apps.</Text>;\n};\n\nexport { SideNavItem };\n"],"names":["SideNavItem","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,WAAW,CAAG,SAAdA,WAAWA,CAAIC,MAAwB,CAAyB,CACpEC,eAAe,CAAC,CACdC,OAAO,CAAE,+CAA+C,CACxDC,UAAU,CAAE,aACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,gEAA8D,CAAM,CAAC,CACpF;;;;"}
@@ -0,0 +1,17 @@
1
+ import '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../../Typography/BaseText/BaseText.native.js';
3
+ import 'react';
4
+ import { throwBladeError } from '../../../utils/logger/logger.js';
5
+ import '@babel/runtime/helpers/slicedToArray';
6
+ import 'react-native';
7
+ import '../../../tokens/global/typography.js';
8
+ import '../../../tokens/global/motion.js';
9
+ import '../../BladeProvider/useTheme.js';
10
+ import { jsx } from 'react/jsx-runtime';
11
+ import { Text } from '../../Typography/Text/Text.js';
12
+ import '../../Typography/Code/Code.js';
13
+
14
+ var SideNavLink=function SideNavLink(_props){throwBladeError({message:'SideNavLink is not yet implemented for native',moduleName:'SideNavLink'});return jsx(Text,{children:"SideNavLink Component is not available for Native mobile apps."});};
15
+
16
+ export { SideNavLink };
17
+ //# sourceMappingURL=SideNavLink.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavLink.native.js","sources":["../../../../../../src/components/SideNav/SideNavItems/SideNavLink.native.tsx"],"sourcesContent":["import type { SideNavLinkProps } from '../types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst SideNavLink = (_props: SideNavLinkProps): React.ReactElement => {\n throwBladeError({\n message: 'SideNavLink is not yet implemented for native',\n moduleName: 'SideNavLink',\n });\n\n return <Text>SideNavLink Component is not available for Native mobile apps.</Text>;\n};\n\nexport { SideNavLink };\n"],"names":["SideNavLink","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,WAAW,CAAG,SAAdA,WAAWA,CAAIC,MAAwB,CAAyB,CACpEC,eAAe,CAAC,CACdC,OAAO,CAAE,+CAA+C,CACxDC,UAAU,CAAE,aACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,gEAA8D,CAAM,CAAC,CACpF;;;;"}
@@ -0,0 +1,17 @@
1
+ import '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../Typography/BaseText/BaseText.native.js';
3
+ import 'react';
4
+ import { throwBladeError } from '../../utils/logger/logger.js';
5
+ import '@babel/runtime/helpers/slicedToArray';
6
+ import 'react-native';
7
+ import '../../tokens/global/typography.js';
8
+ import '../../tokens/global/motion.js';
9
+ import '../BladeProvider/useTheme.js';
10
+ import { jsx } from 'react/jsx-runtime';
11
+ import { Text } from '../Typography/Text/Text.js';
12
+ import '../Typography/Code/Code.js';
13
+
14
+ var SideNavLevel=function SideNavLevel(_props){throwBladeError({message:'SideNavLevel is not yet implemented for native',moduleName:'SideNavLevel'});return jsx(Text,{children:"SideNavLevel Component is not available for Native mobile apps."});};
15
+
16
+ export { SideNavLevel };
17
+ //# sourceMappingURL=SideNavLevel.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideNavLevel.native.js","sources":["../../../../../src/components/SideNav/SideNavLevel.native.tsx"],"sourcesContent":["import type { SideNavLevelProps } from './types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst SideNavLevel = (_props: SideNavLevelProps): React.ReactElement => {\n throwBladeError({\n message: 'SideNavLevel is not yet implemented for native',\n moduleName: 'SideNavLevel',\n });\n\n return <Text>SideNavLevel Component is not available for Native mobile apps.</Text>;\n};\n\nexport { SideNavLevel };\n"],"names":["SideNavLevel","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,YAAY,CAAG,SAAfA,YAAYA,CAAIC,MAAyB,CAAyB,CACtEC,eAAe,CAAC,CACdC,OAAO,CAAE,gDAAgD,CACzDC,UAAU,CAAE,cACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,iEAA+D,CAAM,CAAC,CACrF;;;;"}
@@ -0,0 +1,17 @@
1
+ import '@babel/runtime/helpers/objectWithoutProperties';
2
+ import '../Typography/BaseText/BaseText.native.js';
3
+ import 'react';
4
+ import { throwBladeError } from '../../utils/logger/logger.js';
5
+ import '@babel/runtime/helpers/slicedToArray';
6
+ import 'react-native';
7
+ import '../../tokens/global/typography.js';
8
+ import '../../tokens/global/motion.js';
9
+ import '../BladeProvider/useTheme.js';
10
+ import { jsx } from 'react/jsx-runtime';
11
+ import { Text } from '../Typography/Text/Text.js';
12
+ import '../Typography/Code/Code.js';
13
+
14
+ var SideNavSection=function SideNavSection(_props){throwBladeError({message:'SideNavSection is not yet implemented for native',moduleName:'SideNavSection'});return jsx(Text,{children:"SideNavSection Component is not available for Native mobile apps."});};
15
+
16
+ export { SideNavSection };
17
+ //# sourceMappingURL=SideNavSection.native.js.map