@backstage/ui 0.14.0-next.0 → 0.14.0-next.2

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 (159) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  3. package/dist/components/Accordion/definition.esm.js +1 -0
  4. package/dist/components/Accordion/definition.esm.js.map +1 -1
  5. package/dist/components/Alert/definition.esm.js +1 -0
  6. package/dist/components/Alert/definition.esm.js.map +1 -1
  7. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  8. package/dist/components/Avatar/Avatar.module.css.esm.js +2 -2
  9. package/dist/components/Avatar/definition.esm.js +1 -0
  10. package/dist/components/Avatar/definition.esm.js.map +1 -1
  11. package/dist/components/Badge/Badge.esm.js +19 -0
  12. package/dist/components/Badge/Badge.esm.js.map +1 -0
  13. package/dist/components/Badge/Badge.module.css.esm.js +8 -0
  14. package/dist/components/Badge/Badge.module.css.esm.js.map +1 -0
  15. package/dist/components/Badge/definition.esm.js +27 -0
  16. package/dist/components/Badge/definition.esm.js.map +1 -0
  17. package/dist/components/Box/Box.esm.js.map +1 -1
  18. package/dist/components/Box/definition.esm.js +1 -0
  19. package/dist/components/Box/definition.esm.js.map +1 -1
  20. package/dist/components/Button/definition.esm.js +1 -0
  21. package/dist/components/Button/definition.esm.js.map +1 -1
  22. package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
  23. package/dist/components/ButtonIcon/definition.esm.js +1 -0
  24. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  25. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  26. package/dist/components/ButtonLink/definition.esm.js +2 -0
  27. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  28. package/dist/components/Card/definition.esm.js +2 -0
  29. package/dist/components/Card/definition.esm.js.map +1 -1
  30. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  31. package/dist/components/Checkbox/definition.esm.js +1 -0
  32. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  33. package/dist/components/CheckboxGroup/CheckboxGroup.esm.js +63 -0
  34. package/dist/components/CheckboxGroup/CheckboxGroup.esm.js.map +1 -0
  35. package/dist/components/CheckboxGroup/CheckboxGroup.module.css.esm.js +8 -0
  36. package/dist/components/CheckboxGroup/CheckboxGroup.module.css.esm.js.map +1 -0
  37. package/dist/components/CheckboxGroup/definition.esm.js +31 -0
  38. package/dist/components/CheckboxGroup/definition.esm.js.map +1 -0
  39. package/dist/components/Container/Container.esm.js.map +1 -1
  40. package/dist/components/Container/definition.esm.js +1 -0
  41. package/dist/components/Container/definition.esm.js.map +1 -1
  42. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  43. package/dist/components/Dialog/definition.esm.js +1 -0
  44. package/dist/components/Dialog/definition.esm.js.map +1 -1
  45. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  46. package/dist/components/FieldError/definition.esm.js +1 -0
  47. package/dist/components/FieldError/definition.esm.js.map +1 -1
  48. package/dist/components/FieldLabel/FieldLabel.esm.js +10 -2
  49. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  50. package/dist/components/FieldLabel/definition.esm.js +2 -0
  51. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  52. package/dist/components/Flex/Flex.esm.js.map +1 -1
  53. package/dist/components/Flex/definition.esm.js +1 -0
  54. package/dist/components/Flex/definition.esm.js.map +1 -1
  55. package/dist/components/FullPage/definition.esm.js +1 -0
  56. package/dist/components/FullPage/definition.esm.js.map +1 -1
  57. package/dist/components/Grid/definition.esm.js +1 -0
  58. package/dist/components/Grid/definition.esm.js.map +1 -1
  59. package/dist/components/Header/Header.esm.js +1 -1
  60. package/dist/components/Header/HeaderNav.esm.js +41 -15
  61. package/dist/components/Header/HeaderNav.esm.js.map +1 -1
  62. package/dist/components/Header/HeaderNav.module.css.esm.js +2 -2
  63. package/dist/components/Header/HeaderNavDefinition.esm.js +10 -2
  64. package/dist/components/Header/HeaderNavDefinition.esm.js.map +1 -1
  65. package/dist/components/Header/definition.esm.js +1 -0
  66. package/dist/components/Header/definition.esm.js.map +1 -1
  67. package/dist/components/Link/Link.esm.js.map +1 -1
  68. package/dist/components/Link/definition.esm.js +2 -0
  69. package/dist/components/Link/definition.esm.js.map +1 -1
  70. package/dist/components/List/definition.esm.js +2 -0
  71. package/dist/components/List/definition.esm.js.map +1 -1
  72. package/dist/components/Menu/Menu.esm.js +2 -2
  73. package/dist/components/Menu/Menu.esm.js.map +1 -1
  74. package/dist/components/Menu/definition.esm.js +3 -0
  75. package/dist/components/Menu/definition.esm.js.map +1 -1
  76. package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
  77. package/dist/components/PasswordField/definition.esm.js +1 -0
  78. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  79. package/dist/components/PluginHeader/definition.esm.js +1 -0
  80. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  81. package/dist/components/Popover/definition.esm.js +1 -0
  82. package/dist/components/Popover/definition.esm.js.map +1 -1
  83. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  84. package/dist/components/RadioGroup/definition.esm.js +1 -0
  85. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  86. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -1
  87. package/dist/components/SearchAutocomplete/definition.esm.js +2 -0
  88. package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -1
  89. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  90. package/dist/components/SearchField/definition.esm.js +1 -0
  91. package/dist/components/SearchField/definition.esm.js.map +1 -1
  92. package/dist/components/Select/Select.esm.js.map +1 -1
  93. package/dist/components/Select/definition.esm.js +1 -0
  94. package/dist/components/Select/definition.esm.js.map +1 -1
  95. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  96. package/dist/components/Skeleton/definition.esm.js +1 -0
  97. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  98. package/dist/components/Slider/Slider.esm.js +76 -0
  99. package/dist/components/Slider/Slider.esm.js.map +1 -0
  100. package/dist/components/Slider/Slider.module.css.esm.js +8 -0
  101. package/dist/components/Slider/Slider.module.css.esm.js.map +1 -0
  102. package/dist/components/Slider/definition.esm.js +31 -0
  103. package/dist/components/Slider/definition.esm.js.map +1 -0
  104. package/dist/components/Switch/Switch.esm.js.map +1 -1
  105. package/dist/components/Switch/definition.esm.js +1 -0
  106. package/dist/components/Switch/definition.esm.js.map +1 -1
  107. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  108. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  109. package/dist/components/Table/components/CellText.esm.js.map +1 -1
  110. package/dist/components/Table/components/Column.esm.js.map +1 -1
  111. package/dist/components/Table/components/Row.esm.js.map +1 -1
  112. package/dist/components/Table/components/Table.esm.js +2 -1
  113. package/dist/components/Table/components/Table.esm.js.map +1 -1
  114. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  115. package/dist/components/Table/components/TableBodySkeleton.esm.js +1 -0
  116. package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -1
  117. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  118. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  119. package/dist/components/Table/definition.esm.js +4 -0
  120. package/dist/components/Table/definition.esm.js.map +1 -1
  121. package/dist/components/Table/hooks/useCompletePagination.esm.js +10 -5
  122. package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
  123. package/dist/components/Table/hooks/useTable.esm.js +28 -22
  124. package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
  125. package/dist/components/TablePagination/TablePagination.esm.js +6 -4
  126. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  127. package/dist/components/TablePagination/definition.esm.js +3 -1
  128. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  129. package/dist/components/Tabs/Tabs.esm.js +4 -4
  130. package/dist/components/Tabs/Tabs.module.css.esm.js +2 -2
  131. package/dist/components/Tabs/TabsIndicators.esm.js +5 -1
  132. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  133. package/dist/components/Tabs/definition.esm.js +2 -0
  134. package/dist/components/Tabs/definition.esm.js.map +1 -1
  135. package/dist/components/TagGroup/definition.esm.js +2 -0
  136. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  137. package/dist/components/Text/Text.esm.js.map +1 -1
  138. package/dist/components/Text/definition.esm.js +1 -0
  139. package/dist/components/Text/definition.esm.js.map +1 -1
  140. package/dist/components/TextField/TextField.esm.js.map +1 -1
  141. package/dist/components/TextField/definition.esm.js +1 -0
  142. package/dist/components/TextField/definition.esm.js.map +1 -1
  143. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  144. package/dist/components/ToggleButton/definition.esm.js +1 -0
  145. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  146. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
  147. package/dist/components/ToggleButtonGroup/definition.esm.js +1 -0
  148. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  149. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  150. package/dist/components/Tooltip/definition.esm.js +1 -0
  151. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  152. package/dist/components/VisuallyHidden/definition.esm.js +1 -0
  153. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  154. package/dist/hooks/useDefinition/useDefinition.esm.js +12 -1
  155. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  156. package/dist/index.d.ts +436 -54
  157. package/dist/index.esm.js +6 -0
  158. package/dist/index.esm.js.map +1 -1
  159. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/SearchField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SearchFieldOwnProps } from './types';\nimport styles from './SearchField.module.css';\n\n/**\n * Component definition for SearchField\n * @public\n */\nexport const SearchFieldDefinition = defineComponent<SearchFieldOwnProps>()({\n styles,\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-SearchFieldClear',\n inputWrapper: 'bui-SearchFieldInputWrapper',\n input: 'bui-SearchFieldInput',\n inputIcon: 'bui-SearchFieldInputIcon',\n },\n bg: 'consumer',\n propDefs: {\n startCollapsed: { dataAttribute: true, default: false },\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: { default: 'Search' },\n label: {},\n description: {},\n secondaryLabel: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,qBAAA,GAAwB,iBAAqC,CAAE;AAAA,EAC1E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,iBAAA;AAAA,IACN,KAAA,EAAO,sBAAA;AAAA,IACP,YAAA,EAAc,6BAAA;AAAA,IACd,KAAA,EAAO,sBAAA;AAAA,IACP,SAAA,EAAW;AAAA,GACb;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,cAAA,EAAgB,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,KAAA,EAAM;AAAA,IACtD,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,MAAM,EAAC;AAAA,IACP,WAAA,EAAa,EAAE,OAAA,EAAS,QAAA,EAAS;AAAA,IACjC,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,gBAAgB;AAAC;AAErB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/SearchField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SearchFieldOwnProps } from './types';\nimport styles from './SearchField.module.css';\n\n/**\n * Component definition for SearchField\n * @public\n */\nexport const SearchFieldDefinition = defineComponent<SearchFieldOwnProps>()({\n styles,\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-SearchFieldClear',\n inputWrapper: 'bui-SearchFieldInputWrapper',\n input: 'bui-SearchFieldInput',\n inputIcon: 'bui-SearchFieldInputIcon',\n },\n bg: 'consumer',\n propDefs: {\n startCollapsed: { dataAttribute: true, default: false },\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: { default: 'Search' },\n label: {},\n description: {},\n secondaryLabel: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,qBAAA,GAAwB,iBAAqC,CAAE;AAAA,EAC1E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,iBAAA;AAAA,IACN,KAAA,EAAO,sBAAA;AAAA,IACP,YAAA,EAAc,6BAAA;AAAA,IACd,KAAA,EAAO,sBAAA;AAAA,IACP,SAAA,EAAW;AAAA,GACb;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,cAAA,EAAgB,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,KAAA,EAAM;AAAA,IACtD,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,MAAM,EAAC;AAAA,IACP,WAAA,EAAa,EAAE,OAAA,EAAS,QAAA,EAAS;AAAA,IACjC,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,gBAAgB;AAAC;AAErB,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Select.esm.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { Select as AriaSelect, Popover } from 'react-aria-components';\nimport { SelectProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SelectDefinition } from './definition';\nimport { PopoverDefinition } from '../Popover/definition';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport { SelectTrigger } from './SelectTrigger';\nimport { SelectContent } from './SelectContent';\n\n/** @public */\nexport const Select = forwardRef<\n HTMLDivElement,\n SelectProps<'single' | 'multiple'>\n>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n SelectDefinition,\n {\n placeholder: 'Select an option',\n ...props,\n },\n );\n const { ownProps: popoverOwnProps } = useDefinition(PopoverDefinition, {});\n\n const {\n classes,\n label,\n description,\n options,\n icon,\n searchable,\n searchPlaceholder,\n isRequired,\n secondaryLabel,\n } = ownProps;\n\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'Select requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const secondaryLabelText = secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <AriaSelect\n className={classes.root}\n {...dataAttributes}\n ref={ref}\n {...restProps}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <SelectTrigger icon={icon} />\n <FieldError />\n <Popover\n className={clsx(popoverOwnProps.classes.root, classes.popover)}\n {...dataAttributes}\n >\n <SelectContent\n searchable={searchable}\n searchPlaceholder={searchPlaceholder}\n options={options}\n />\n </Popover>\n </AriaSelect>\n );\n});\n\nSelect.displayName = 'Select';\n"],"names":["AriaSelect"],"mappings":";;;;;;;;;;;;;;AA6BO,MAAM,MAAA,GAAS,UAAA,CAGpB,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChB,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,gBAAA;AAAA,IACA;AAAA,MACE,WAAA,EAAa,kBAAA;AAAA,MACb,GAAG;AAAA;AACL,GACF;AACA,EAAA,MAAM,EAAE,QAAA,EAAU,eAAA,KAAoB,aAAA,CAAc,iBAAA,EAAmB,EAAE,CAAA;AAEzE,EAAA,MAAM;AAAA,IACJ,OAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,QAAA;AAEJ,EAAA,MAAM,SAAA,GAAY,UAAU,YAAY,CAAA;AACxC,EAAA,MAAM,cAAA,GAAiB,UAAU,iBAAiB,CAAA;AAElD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,KAAA,IAAS,CAAC,SAAA,IAAa,CAAC,cAAA,EAAgB;AAC3C,MAAA,OAAA,CAAQ,IAAA;AAAA,QACN;AAAA,OACF;AAAA,IACF;AAAA,EACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,EAAW,cAAc,CAAC,CAAA;AAErC,EAAA,MAAM,kBAAA,GAAqB,cAAA,KAAmB,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAExE,EAAA,uBACE,IAAA;AAAA,IAACA,QAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MAClB,GAAG,cAAA;AAAA,MACJ,GAAA;AAAA,MACC,GAAG,SAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,KAAA;AAAA,YACA,cAAA,EAAgB,kBAAA;AAAA,YAChB;AAAA;AAAA,SACF;AAAA,wBACA,GAAA,CAAC,iBAAc,IAAA,EAAY,CAAA;AAAA,4BAC1B,UAAA,EAAA,EAAW,CAAA;AAAA,wBACZ,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,WAAW,IAAA,CAAK,eAAA,CAAgB,OAAA,CAAQ,IAAA,EAAM,QAAQ,OAAO,CAAA;AAAA,YAC5D,GAAG,cAAA;AAAA,YAEJ,QAAA,kBAAA,GAAA;AAAA,cAAC,aAAA;AAAA,cAAA;AAAA,gBACC,UAAA;AAAA,gBACA,iBAAA;AAAA,gBACA;AAAA;AAAA;AACF;AAAA;AACF;AAAA;AAAA,GACF;AAEJ,CAAC;AAED,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
1
+ {"version":3,"file":"Select.esm.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { Select as AriaSelect, Popover } from 'react-aria-components';\nimport { SelectProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SelectDefinition } from './definition';\nimport { PopoverDefinition } from '../Popover/definition';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport { SelectTrigger } from './SelectTrigger';\nimport { SelectContent } from './SelectContent';\n\n/**\n * A dropdown picker for selecting one or multiple options from a list, with optional search filtering and inline error display.\n *\n * @public\n */\nexport const Select = forwardRef<\n HTMLDivElement,\n SelectProps<'single' | 'multiple'>\n>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n SelectDefinition,\n {\n placeholder: 'Select an option',\n ...props,\n },\n );\n const { ownProps: popoverOwnProps } = useDefinition(PopoverDefinition, {});\n\n const {\n classes,\n label,\n description,\n options,\n icon,\n searchable,\n searchPlaceholder,\n isRequired,\n secondaryLabel,\n } = ownProps;\n\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'Select requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const secondaryLabelText = secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <AriaSelect\n className={classes.root}\n {...dataAttributes}\n ref={ref}\n {...restProps}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <SelectTrigger icon={icon} />\n <FieldError />\n <Popover\n className={clsx(popoverOwnProps.classes.root, classes.popover)}\n {...dataAttributes}\n >\n <SelectContent\n searchable={searchable}\n searchPlaceholder={searchPlaceholder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AA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,KAAA;AAAA,YACA,cAAA,EAAgB,kBAAA;AAAA,YAChB;AAAA;AAAA,SACF;AAAA,wBACA,GAAA,CAAC,iBAAc,IAAA,EAAY,CAAA;AAAA,4BAC1B,UAAA,EAAA,EAAW,CAAA;AAAA,wBACZ,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,WAAW,IAAA,CAAK,eAAA,CAAgB,OAAA,CAAQ,IAAA,EAAM,QAAQ,OAAO,CAAA;AAAA,YAC5D,GAAG,cAAA;AAAA,YAEJ,QAAA,kBAAA,GAAA;AAAA,cAAC,aAAA;AAAA,cAAA;AAAA,gBACC,UAAA;AAAA,gBACA,iBAAA;AAAA,gBACA;AAAA;AAAA;AACF;AAAA;AACF;AAAA;AAAA,GACF;AAEJ,CAAC;AAED,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Select.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Select/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n SelectOwnProps,\n SelectTriggerOwnProps,\n SelectContentOwnProps,\n SelectListBoxOwnProps,\n} from './types';\nimport styles from './Select.module.css';\n\n/**\n * Component definition for Select\n * @public\n */\nexport const SelectDefinition = defineComponent<SelectOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Select',\n popover: 'bui-SelectPopover',\n },\n propDefs: {\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n options: {},\n searchable: {},\n searchPlaceholder: {},\n label: {},\n secondaryLabel: {},\n description: {},\n isRequired: {},\n className: {},\n },\n});\n\n/**\n * Component definition for SelectTrigger\n * @internal\n */\nexport const SelectTriggerDefinition = defineComponent<SelectTriggerOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectTrigger',\n chevron: 'bui-SelectTriggerChevron',\n value: 'bui-SelectValue',\n },\n bg: 'consumer',\n propDefs: {\n icon: {},\n },\n },\n);\n\n/**\n * Component definition for SelectContent\n * @internal\n */\nexport const SelectContentDefinition = defineComponent<SelectContentOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectSearchWrapper',\n search: 'bui-SelectSearch',\n searchClear: 'bui-SelectSearchClear',\n },\n propDefs: {\n searchable: {},\n searchPlaceholder: { default: 'Search...' },\n options: {},\n },\n },\n);\n\n/**\n * Component definition for SelectListBox\n * @internal\n */\nexport const SelectListBoxDefinition = defineComponent<SelectListBoxOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n noResults: 'bui-SelectNoResults',\n },\n propDefs: {\n options: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;AA6BO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,SAAS,EAAC;AAAA,IACV,YAAY,EAAC;AAAA,IACb,mBAAmB,EAAC;AAAA,IACpB,OAAO,EAAC;AAAA,IACR,gBAAgB,EAAC;AAAA,IACjB,aAAa,EAAC;AAAA,IACd,YAAY,EAAC;AAAA,IACb,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,OAAA,EAAS,0BAAA;AAAA,MACT,KAAA,EAAO;AAAA,KACT;AAAA,IACA,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU;AAAA,MACR,MAAM;AAAC;AACT;AAEJ;AAMO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,yBAAA;AAAA,MACN,MAAA,EAAQ,kBAAA;AAAA,MACR,WAAA,EAAa;AAAA,KACf;AAAA,IACA,QAAA,EAAU;AAAA,MACR,YAAY,EAAC;AAAA,MACb,iBAAA,EAAmB,EAAE,OAAA,EAAS,WAAA,EAAY;AAAA,MAC1C,SAAS;AAAC;AACZ;AAEJ;AAMO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,gBAAA;AAAA,MACN,IAAA,EAAM,gBAAA;AAAA,MACN,aAAA,EAAe,yBAAA;AAAA,MACf,SAAA,EAAW,qBAAA;AAAA,MACX,SAAA,EAAW;AAAA,KACb;AAAA,IACA,QAAA,EAAU;AAAA,MACR,SAAS;AAAC;AACZ;AAEJ;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Select/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n SelectOwnProps,\n SelectTriggerOwnProps,\n SelectContentOwnProps,\n SelectListBoxOwnProps,\n} from './types';\nimport styles from './Select.module.css';\n\n/**\n * Component definition for Select\n * @public\n */\nexport const SelectDefinition = defineComponent<SelectOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Select',\n popover: 'bui-SelectPopover',\n },\n propDefs: {\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n options: {},\n searchable: {},\n searchPlaceholder: {},\n label: {},\n secondaryLabel: {},\n description: {},\n isRequired: {},\n className: {},\n },\n});\n\n/**\n * Component definition for SelectTrigger\n * @internal\n */\nexport const SelectTriggerDefinition = defineComponent<SelectTriggerOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectTrigger',\n chevron: 'bui-SelectTriggerChevron',\n value: 'bui-SelectValue',\n },\n bg: 'consumer',\n propDefs: {\n icon: {},\n },\n },\n);\n\n/**\n * Component definition for SelectContent\n * @internal\n */\nexport const SelectContentDefinition = defineComponent<SelectContentOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectSearchWrapper',\n search: 'bui-SelectSearch',\n searchClear: 'bui-SelectSearchClear',\n },\n propDefs: {\n searchable: {},\n searchPlaceholder: { default: 'Search...' },\n options: {},\n },\n },\n);\n\n/**\n * Component definition for SelectListBox\n * @internal\n */\nexport const SelectListBoxDefinition = defineComponent<SelectListBoxOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n noResults: 'bui-SelectNoResults',\n },\n propDefs: {\n options: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;AA6BO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,SAAS,EAAC;AAAA,IACV,YAAY,EAAC;AAAA,IACb,mBAAmB,EAAC;AAAA,IACpB,OAAO,EAAC;AAAA,IACR,gBAAgB,EAAC;AAAA,IACjB,aAAa,EAAC;AAAA,IACd,YAAY,EAAC;AAAA,IACb,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,OAAA,EAAS,0BAAA;AAAA,MACT,KAAA,EAAO;AAAA,KACT;AAAA,IACA,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU;AAAA,MACR,MAAM;AAAC;AACT;AAEJ;AAMO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,yBAAA;AAAA,MACN,MAAA,EAAQ,kBAAA;AAAA,MACR,WAAA,EAAa;AAAA,KACf;AAAA,IACA,QAAA,EAAU;AAAA,MACR,YAAY,EAAC;AAAA,MACb,iBAAA,EAAmB,EAAE,OAAA,EAAS,WAAA,EAAY;AAAA,MAC1C,SAAS;AAAC;AACZ;AAEJ;AAMO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,gBAAA;AAAA,MACN,IAAA,EAAM,gBAAA;AAAA,MACN,aAAA,EAAe,yBAAA;AAAA,MACf,SAAA,EAAW,qBAAA;AAAA,MACX,SAAA,EAAW;AAAA,KACb;AAAA,IACA,QAAA,EAAU;AAAA,MACR,SAAS;AAAC;AACZ;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.esm.js","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SkeletonProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SkeletonDefinition } from './definition';\n\n/** @public */\nexport const Skeleton = (props: SkeletonProps) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n SkeletonDefinition,\n props,\n );\n const { classes, width, height, style } = ownProps;\n\n return (\n <div\n className={classes.root}\n {...dataAttributes}\n style={{\n width,\n height,\n ...style,\n }}\n {...restProps}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAqBO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAyB;AAChD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,kBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAA,EAAQ,OAAM,GAAI,QAAA;AAE1C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MAClB,GAAG,cAAA;AAAA,MACJ,KAAA,EAAO;AAAA,QACL,KAAA;AAAA,QACA,MAAA;AAAA,QACA,GAAG;AAAA,OACL;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
1
+ {"version":3,"file":"Skeleton.esm.js","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SkeletonProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SkeletonDefinition } from './definition';\n\n/**\n * A placeholder shape displayed while content is loading, matching the size and layout of the content it replaces.\n *\n * @public\n */\nexport const Skeleton = (props: SkeletonProps) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n SkeletonDefinition,\n props,\n );\n const { classes, width, height, style } = ownProps;\n\n return (\n <div\n className={classes.root}\n {...dataAttributes}\n style={{\n width,\n height,\n ...style,\n }}\n {...restProps}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAyBO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAyB;AAChD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,kBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAA,EAAQ,OAAM,GAAI,QAAA;AAE1C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MAClB,GAAG,cAAA;AAAA,MACJ,KAAA,EAAO;AAAA,QACL,KAAA;AAAA,QACA,MAAA;AAAA,QACA,GAAG;AAAA,OACL;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Skeleton.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Skeleton/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SkeletonOwnProps } from './types';\nimport styles from './Skeleton.module.css';\n\n/**\n * Component definition for Skeleton\n * @public\n */\nexport const SkeletonDefinition = defineComponent<SkeletonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Skeleton',\n },\n propDefs: {\n width: { default: 80 },\n height: { default: 24 },\n rounded: { dataAttribute: true, default: false },\n className: {},\n style: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,KAAA,EAAO,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,IACrB,MAAA,EAAQ,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,IACtB,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,KAAA,EAAM;AAAA,IAC/C,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC;AAEZ,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Skeleton/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SkeletonOwnProps } from './types';\nimport styles from './Skeleton.module.css';\n\n/**\n * Component definition for Skeleton\n * @public\n */\nexport const SkeletonDefinition = defineComponent<SkeletonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Skeleton',\n },\n propDefs: {\n width: { default: 80 },\n height: { default: 24 },\n rounded: { dataAttribute: true, default: false },\n className: {},\n style: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,KAAA,EAAO,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,IACrB,MAAA,EAAQ,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,IACtB,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,KAAA,EAAM;AAAA,IAC/C,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC;AAEZ,CAAC;;;;"}
@@ -0,0 +1,76 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import { forwardRef, useId, useEffect } from 'react';
3
+ import { Slider as Slider$1, SliderOutput, SliderTrack, SliderThumb } from 'react-aria-components';
4
+ import clsx from 'clsx';
5
+ import { FieldLabel } from '../FieldLabel/FieldLabel.esm.js';
6
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
7
+ import '../FieldLabel/FieldLabel.module.css.esm.js';
8
+ import { FieldError } from '../FieldError/FieldError.esm.js';
9
+ import '../FieldError/FieldError.module.css.esm.js';
10
+ import { SliderDefinition } from './definition.esm.js';
11
+
12
+ function SliderImpl(props, ref) {
13
+ const { ownProps, restProps } = useDefinition(SliderDefinition, props);
14
+ const { classes, className, label, secondaryLabel, description, isRequired } = ownProps;
15
+ const labelId = useId();
16
+ const descriptionId = useId();
17
+ useEffect(() => {
18
+ if (!label && !restProps["aria-label"] && !restProps["aria-labelledby"]) {
19
+ console.warn(
20
+ "Slider requires either a visible label, aria-label, or aria-labelledby for accessibility"
21
+ );
22
+ }
23
+ }, [label, restProps]);
24
+ const secondaryLabelText = secondaryLabel || (isRequired ? "Required" : null);
25
+ return /* @__PURE__ */ jsxs(
26
+ Slider$1,
27
+ {
28
+ className: clsx(classes.root, className),
29
+ "aria-labelledby": label ? labelId : void 0,
30
+ "aria-describedby": label && description ? descriptionId : void 0,
31
+ ...restProps,
32
+ ref,
33
+ children: [
34
+ label && /* @__PURE__ */ jsxs("div", { className: classes.header, children: [
35
+ /* @__PURE__ */ jsx(
36
+ FieldLabel,
37
+ {
38
+ id: labelId,
39
+ label,
40
+ secondaryLabel: secondaryLabelText,
41
+ description,
42
+ descriptionId: description ? descriptionId : void 0
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsx(SliderOutput, { className: classes.output, children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") })
46
+ ] }),
47
+ /* @__PURE__ */ jsx(SliderTrack, { className: classes.track, children: ({ state }) => {
48
+ const numThumbs = state.values.length;
49
+ let trackFillStyle;
50
+ if (numThumbs === 1) {
51
+ const percent = state.getThumbPercent(0);
52
+ const isVertical = state.orientation === "vertical";
53
+ trackFillStyle = isVertical ? { bottom: 0, height: `${percent * 100}%` } : { left: 0, width: `${percent * 100}%` };
54
+ } else {
55
+ const start = state.getThumbPercent(0);
56
+ const end = state.getThumbPercent(1);
57
+ const rangePercent = (end - start) * 100;
58
+ const isVertical = state.orientation === "vertical";
59
+ trackFillStyle = isVertical ? { bottom: `${start * 100}%`, height: `${rangePercent}%` } : { left: `${start * 100}%`, width: `${rangePercent}%` };
60
+ }
61
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
62
+ /* @__PURE__ */ jsx("div", { className: classes.trackFill, style: trackFillStyle }),
63
+ /* @__PURE__ */ jsx(SliderThumb, { index: 0, className: classes.thumb }),
64
+ numThumbs > 1 && /* @__PURE__ */ jsx(SliderThumb, { index: 1, className: classes.thumb })
65
+ ] });
66
+ } }),
67
+ /* @__PURE__ */ jsx(FieldError, {})
68
+ ]
69
+ }
70
+ );
71
+ }
72
+ const Slider = forwardRef(SliderImpl);
73
+ Slider.displayName = "Slider";
74
+
75
+ export { Slider };
76
+ //# sourceMappingURL=Slider.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.esm.js","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect, useId } from 'react';\nimport {\n Slider as AriaSlider,\n SliderTrack,\n SliderThumb,\n SliderOutput,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport type { SliderProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SliderDefinition } from './definition';\n\nfunction SliderImpl<T extends number | number[]>(\n props: SliderProps<T>,\n ref: React.ForwardedRef<HTMLDivElement>,\n) {\n const { ownProps, restProps } = useDefinition(SliderDefinition, props);\n const { classes, className, label, secondaryLabel, description, isRequired } =\n ownProps;\n\n const labelId = useId();\n const descriptionId = useId();\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'Slider requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps]);\n\n const secondaryLabelText = secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <AriaSlider\n className={clsx(classes.root, className)}\n aria-labelledby={label ? labelId : undefined}\n aria-describedby={label && description ? descriptionId : undefined}\n {...restProps}\n ref={ref}\n >\n {label && (\n <div className={classes.header}>\n <FieldLabel\n id={labelId}\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionId={description ? descriptionId : undefined}\n />\n <SliderOutput className={classes.output}>\n {({ state }) =>\n state.values\n .map((_, i) => state.getThumbValueLabel(i))\n .join(' – ')\n }\n </SliderOutput>\n </div>\n )}\n <SliderTrack className={classes.track}>\n {({ state }) => {\n const numThumbs = state.values.length;\n\n // Calculate track fill\n let trackFillStyle: React.CSSProperties;\n if (numThumbs === 1) {\n // Single thumb: fill from start to thumb\n const percent = state.getThumbPercent(0);\n const isVertical = state.orientation === 'vertical';\n trackFillStyle = isVertical\n ? { bottom: 0, height: `${percent * 100}%` }\n : { left: 0, width: `${percent * 100}%` };\n } else {\n // Range: fill between thumbs\n const start = state.getThumbPercent(0);\n const end = state.getThumbPercent(1);\n const rangePercent = (end - start) * 100;\n const isVertical = state.orientation === 'vertical';\n trackFillStyle = isVertical\n ? { bottom: `${start * 100}%`, height: `${rangePercent}%` }\n : { left: `${start * 100}%`, width: `${rangePercent}%` };\n }\n\n return (\n <>\n <div className={classes.trackFill} style={trackFillStyle} />\n <SliderThumb index={0} className={classes.thumb} />\n {numThumbs > 1 && (\n <SliderThumb index={1} className={classes.thumb} />\n )}\n </>\n );\n }}\n </SliderTrack>\n <FieldError />\n </AriaSlider>\n );\n}\n\n/**\n * A draggable input for selecting a numeric value or range within a defined interval, with an integrated label and value output.\n *\n * @public\n */\nexport const Slider = forwardRef(SliderImpl) as (<T extends number | number[]>(\n props: SliderProps<T> & { ref?: React.ForwardedRef<HTMLDivElement> },\n) => JSX.Element) & { displayName: string };\n\nSlider.displayName = 'Slider';\n"],"names":["AriaSlider"],"mappings":";;;;;;;;;;;AA8BA,SAAS,UAAA,CACP,OACA,GAAA,EACA;AACA,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,kBAAkB,KAAK,CAAA;AACrE,EAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,OAAO,cAAA,EAAgB,WAAA,EAAa,YAAW,GACzE,QAAA;AAEF,EAAA,MAAM,UAAU,KAAA,EAAM;AACtB,EAAA,MAAM,gBAAgB,KAAA,EAAM;AAE5B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,SAAS,CAAC,SAAA,CAAU,YAAY,CAAA,IAAK,CAAC,SAAA,CAAU,iBAAiB,CAAA,EAAG;AACvE,MAAA,OAAA,CAAQ,IAAA;AAAA,QACN;AAAA,OACF;AAAA,IACF;AAAA,EACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAS,CAAC,CAAA;AAErB,EAAA,MAAM,kBAAA,GAAqB,cAAA,KAAmB,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAExE,EAAA,uBACE,IAAA;AAAA,IAACA,QAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,IAAA,CAAK,OAAA,CAAQ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-0,0 +1,8 @@
1
+ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
+
3
+ var css_248z = "/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Slider_bui-Slider__85bc3f8b8e {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-2);\n width: 100%;\n color: var(--bui-fg-primary);\n\n &[data-orientation='vertical'] {\n height: 200px;\n width: auto;\n }\n }\n\n .Slider_bui-SliderHeader__85bc3f8b8e {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: var(--bui-space-3);\n }\n\n .Slider_bui-SliderOutput__85bc3f8b8e {\n font-size: var(--bui-font-size-2);\n font-weight: var(--bui-font-weight-medium);\n color: var(--bui-fg-secondary);\n white-space: nowrap;\n }\n\n .Slider_bui-SliderTrack__85bc3f8b8e {\n position: relative;\n height: 4px;\n width: 100%;\n background: var(--bui-bg-neutral-3);\n border-radius: var(--bui-radius-sm);\n cursor: pointer;\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n /* Vertical orientation */\n [data-orientation='vertical'] & {\n width: 4px;\n height: 100%;\n }\n }\n\n .Slider_bui-SliderTrackFill__85bc3f8b8e {\n position: absolute;\n top: 0;\n height: 100%;\n background: var(--bui-bg-solid);\n border-radius: var(--bui-radius-sm);\n pointer-events: none;\n\n /* Vertical orientation */\n [data-orientation='vertical'] & {\n width: 100%;\n height: auto;\n left: 0;\n right: 0;\n top: auto;\n }\n }\n\n .Slider_bui-SliderThumb__85bc3f8b8e {\n width: 20px;\n height: 20px;\n border-radius: 50%;\n background: var(--bui-bg-solid);\n border: 2px solid var(--bui-bg-solid);\n box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n cursor: grab;\n transition: transform 200ms;\n\n /* Fix: Ensure thumb is vertically centered on track */\n top: 50%;\n transform: translateY(-50%);\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n\n &[data-dragging] {\n cursor: grabbing;\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),\n 0 2px 4px -2px rgb(0 0 0 / 0.1);\n transform: translateY(-50%) scale(1.1);\n }\n\n /* Hover effect */\n &:hover:not([data-disabled]) {\n transform: translateY(-50%) scale(1.1);\n }\n }\n\n /* Improved disabled state */\n .Slider_bui-Slider__85bc3f8b8e[data-disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n\n & .Slider_bui-SliderTrack__85bc3f8b8e {\n background: var(--bui-bg-neutral-2);\n }\n\n & .Slider_bui-SliderTrackFill__85bc3f8b8e {\n background: var(--bui-bg-neutral-4);\n }\n\n & .Slider_bui-SliderThumb__85bc3f8b8e {\n cursor: not-allowed;\n background: var(--bui-bg-neutral-4);\n border-color: var(--bui-border-neutral);\n }\n }\n}\n";
4
+ var styles = {"bui-Slider":"Slider_bui-Slider__85bc3f8b8e","bui-SliderHeader":"Slider_bui-SliderHeader__85bc3f8b8e","bui-SliderOutput":"Slider_bui-SliderOutput__85bc3f8b8e","bui-SliderTrack":"Slider_bui-SliderTrack__85bc3f8b8e","bui-SliderTrackFill":"Slider_bui-SliderTrackFill__85bc3f8b8e","bui-SliderThumb":"Slider_bui-SliderThumb__85bc3f8b8e"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=Slider.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,31 @@
1
+ import 'react/jsx-runtime';
2
+ import 'clsx';
3
+ import '../../hooks/useBreakpoint.esm.js';
4
+ import '../../hooks/useBg.esm.js';
5
+ import '../../hooks/useDefinition/helpers.esm.js';
6
+ import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
8
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
+ import styles from './Slider.module.css.esm.js';
10
+
11
+ const SliderDefinition = defineComponent()({
12
+ styles,
13
+ classNames: {
14
+ root: "bui-Slider",
15
+ header: "bui-SliderHeader",
16
+ track: "bui-SliderTrack",
17
+ trackFill: "bui-SliderTrackFill",
18
+ thumb: "bui-SliderThumb",
19
+ output: "bui-SliderOutput"
20
+ },
21
+ propDefs: {
22
+ className: {},
23
+ label: {},
24
+ secondaryLabel: {},
25
+ description: {},
26
+ isRequired: {}
27
+ }
28
+ });
29
+
30
+ export { SliderDefinition };
31
+ //# sourceMappingURL=definition.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Slider/definition.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SliderOwnProps } from './types';\nimport styles from './Slider.module.css';\n\n/**\n * Component definition for Slider\n * @public\n */\nexport const SliderDefinition = defineComponent<SliderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Slider',\n header: 'bui-SliderHeader',\n track: 'bui-SliderTrack',\n trackFill: 'bui-SliderTrackFill',\n thumb: 'bui-SliderThumb',\n output: 'bui-SliderOutput',\n },\n propDefs: {\n className: {},\n label: {},\n secondaryLabel: {},\n description: {},\n isRequired: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,MAAA,EAAQ,kBAAA;AAAA,IACR,KAAA,EAAO,iBAAA;AAAA,IACP,SAAA,EAAW,qBAAA;AAAA,IACX,KAAA,EAAO,iBAAA;AAAA,IACP,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,OAAO,EAAC;AAAA,IACR,gBAAgB,EAAC;AAAA,IACjB,aAAa,EAAC;AAAA,IACd,YAAY;AAAC;AAEjB,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.esm.js","sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Switch as AriaSwitch } from 'react-aria-components';\nimport type { SwitchProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SwitchDefinition } from './definition';\n\n/** @public */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(SwitchDefinition, props);\n const { classes, label } = ownProps;\n\n return (\n <AriaSwitch className={classes.root} ref={ref} {...restProps}>\n <div className={classes.indicator} />\n {label}\n </AriaSwitch>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\n"],"names":["AriaSwitch"],"mappings":";;;;;;AAuBO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,kBAAkB,KAAK,CAAA;AACrE,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,QAAA;AAE3B,IAAA,4BACGA,QAAA,EAAA,EAAW,SAAA,EAAW,QAAQ,IAAA,EAAM,GAAA,EAAW,GAAG,SAAA,EACjD,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAW,CAAA;AAAA,MAClC;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
1
+ {"version":3,"file":"Switch.esm.js","sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Switch as AriaSwitch } from 'react-aria-components';\nimport type { SwitchProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SwitchDefinition } from './definition';\n\n/**\n * A toggle control for switching between on and off states, with an optional visible label.\n *\n * @public\n */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(SwitchDefinition, props);\n const { classes, label } = ownProps;\n\n return (\n <AriaSwitch className={classes.root} ref={ref} {...restProps}>\n <div className={classes.indicator} />\n {label}\n </AriaSwitch>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\n"],"names":["AriaSwitch"],"mappings":";;;;;;AA2BO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,kBAAkB,KAAK,CAAA;AACrE,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,QAAA;AAE3B,IAAA,4BACGA,QAAA,EAAA,EAAW,SAAA,EAAW,QAAQ,IAAA,EAAM,GAAA,EAAW,GAAG,SAAA,EACjD,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAW,CAAA;AAAA,MAClC;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Switch.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Switch/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SwitchOwnProps } from './types';\nimport styles from './Switch.module.css';\n\n/**\n * Component definition for Switch\n * @public\n */\nexport const SwitchDefinition = defineComponent<SwitchOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n propDefs: {\n label: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Switch/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SwitchOwnProps } from './types';\nimport styles from './Switch.module.css';\n\n/**\n * Component definition for Switch\n * @public\n */\nexport const SwitchDefinition = defineComponent<SwitchOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n propDefs: {\n label: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.esm.js","sources":["../../../../src/components/Table/components/Cell.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport type { CellProps } from '../types';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellDefinition } from '../definition';\n\n/** @public */\nconst Cell = (props: CellProps) => {\n const { ownProps, restProps } = useDefinition(CellDefinition, props);\n\n return <ReactAriaCell className={ownProps.classes.root} {...restProps} />;\n};\n\nCell.displayName = 'Cell';\n\nexport { Cell };\n"],"names":["ReactAriaCell"],"mappings":";;;;;AAsBA,MAAM,IAAA,GAAO,CAAC,KAAA,KAAqB;AACjC,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,gBAAgB,KAAK,CAAA;AAEnE,EAAA,2BAAQA,MAAA,EAAA,EAAc,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AACzE;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
1
+ {"version":3,"file":"Cell.esm.js","sources":["../../../../src/components/Table/components/Cell.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport type { CellProps } from '../types';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellDefinition } from '../definition';\n\n/**\n * A low-level table cell primitive for building custom cell content.\n * For standard use cases, prefer `CellText` or `CellProfile`.\n *\n * @public\n */\nconst Cell = (props: CellProps) => {\n const { ownProps, restProps } = useDefinition(CellDefinition, props);\n\n return <ReactAriaCell className={ownProps.classes.root} {...restProps} />;\n};\n\nCell.displayName = 'Cell';\n\nexport { Cell };\n"],"names":["ReactAriaCell"],"mappings":";;;;;AA2BA,MAAM,IAAA,GAAO,CAAC,KAAA,KAAqB;AACjC,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,gBAAgB,KAAK,CAAA;AAEnE,EAAA,2BAAQA,MAAA,EAAA,EAAc,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AACzE;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CellProfile.esm.js","sources":["../../../../src/components/Table/components/CellProfile.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CellProfileProps } from '../types';\nimport { Text } from '../../Text/Text';\nimport { Link } from '../../Link/Link';\nimport { Avatar } from '../../Avatar';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellProfileDefinition } from '../definition';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\n\n/** @public */\nexport const CellProfile = (props: CellProfileProps) => {\n const { ownProps, restProps } = useDefinition(CellProfileDefinition, props);\n const { classes, src, name, href, description, color } = ownProps;\n\n return (\n <ReactAriaCell className={classes.root} {...restProps}>\n <div className={classes.cellContentWrapper}>\n {src && name && (\n <Avatar src={src} name={name} size=\"x-small\" purpose=\"decoration\" />\n )}\n <div className={classes.cellContent}>\n {name && href ? (\n <Link href={href}>{name}</Link>\n ) : (\n <Text as=\"p\" variant=\"body-medium\" color={color}>\n {name}\n </Text>\n )}\n {description && (\n <Text variant=\"body-medium\" color=\"secondary\">\n {description}\n </Text>\n )}\n </div>\n </div>\n </ReactAriaCell>\n );\n};\n"],"names":["ReactAriaCell"],"mappings":";;;;;;;;;AAyBO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA4B;AACtD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,uBAAuB,KAAK,CAAA;AAC1E,EAAA,MAAM,EAAE,OAAA,EAAS,GAAA,EAAK,MAAM,IAAA,EAAM,WAAA,EAAa,OAAM,GAAI,QAAA;AAEzD,EAAA,uBACE,GAAA,CAACA,IAAA,EAAA,EAAc,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAC1C,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,kBAAA,EACrB,QAAA,EAAA;AAAA,IAAA,GAAA,IAAO,IAAA,wBACL,MAAA,EAAA,EAAO,GAAA,EAAU,MAAY,IAAA,EAAK,SAAA,EAAU,SAAQ,YAAA,EAAa,CAAA;AAAA,oBAEpE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA;AAAA,MAAA,IAAA,IAAQ,IAAA,mBACP,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA,mBAExB,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAG,GAAA,EAAI,OAAA,EAAQ,aAAA,EAAc,OAChC,QAAA,EAAA,IAAA,EACH,CAAA;AAAA,MAED,+BACC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAQ,aAAA,EAAc,KAAA,EAAM,aAC/B,QAAA,EAAA,WAAA,EACH;AAAA,KAAA,EAEJ;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"CellProfile.esm.js","sources":["../../../../src/components/Table/components/CellProfile.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CellProfileProps } from '../types';\nimport { Text } from '../../Text/Text';\nimport { Link } from '../../Link/Link';\nimport { Avatar } from '../../Avatar';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellProfileDefinition } from '../definition';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\n\n/**\n * A table cell that renders an avatar image alongside a name, with an optional description and link.\n *\n * @public\n */\nexport const CellProfile = (props: CellProfileProps) => {\n const { ownProps, restProps } = useDefinition(CellProfileDefinition, props);\n const { classes, src, name, href, description, color } = ownProps;\n\n return (\n <ReactAriaCell className={classes.root} {...restProps}>\n <div className={classes.cellContentWrapper}>\n {src && name && (\n <Avatar src={src} name={name} size=\"x-small\" purpose=\"decoration\" />\n )}\n <div className={classes.cellContent}>\n {name && href ? (\n <Link href={href}>{name}</Link>\n ) : (\n <Text as=\"p\" variant=\"body-medium\" color={color}>\n {name}\n </Text>\n )}\n {description && (\n <Text variant=\"body-medium\" color=\"secondary\">\n {description}\n </Text>\n )}\n </div>\n </div>\n </ReactAriaCell>\n );\n};\n"],"names":["ReactAriaCell"],"mappings":";;;;;;;;;AA6BO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA4B;AACtD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,uBAAuB,KAAK,CAAA;AAC1E,EAAA,MAAM,EAAE,OAAA,EAAS,GAAA,EAAK,MAAM,IAAA,EAAM,WAAA,EAAa,OAAM,GAAI,QAAA;AAEzD,EAAA,uBACE,GAAA,CAACA,IAAA,EAAA,EAAc,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAC1C,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,kBAAA,EACrB,QAAA,EAAA;AAAA,IAAA,GAAA,IAAO,IAAA,wBACL,MAAA,EAAA,EAAO,GAAA,EAAU,MAAY,IAAA,EAAK,SAAA,EAAU,SAAQ,YAAA,EAAa,CAAA;AAAA,oBAEpE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA;AAAA,MAAA,IAAA,IAAQ,IAAA,mBACP,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA,mBAExB,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAG,GAAA,EAAI,OAAA,EAAQ,aAAA,EAAc,OAChC,QAAA,EAAA,IAAA,EACH,CAAA;AAAA,MAED,+BACC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAQ,aAAA,EAAc,KAAA,EAAM,aAC/B,QAAA,EAAA,WAAA,EACH;AAAA,KAAA,EAEJ;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CellText.esm.js","sources":["../../../../src/components/Table/components/CellText.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Text } from '../../Text';\nimport { Link } from '../../Link';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport type { CellTextProps } from '../types';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellTextDefinition } from '../definition';\n\n/** @public */\nconst CellText = (props: CellTextProps) => {\n const { ownProps, restProps } = useDefinition(CellTextDefinition, props);\n const { classes, title, description, color, leadingIcon, href } = ownProps;\n\n return (\n <ReactAriaCell className={classes.root} {...restProps}>\n <div className={classes.cellContentWrapper}>\n {leadingIcon && <div className={classes.cellIcon}>{leadingIcon}</div>}\n <div className={classes.cellContent}>\n {href ? (\n <Link\n href={href}\n variant=\"body-medium\"\n color={color}\n truncate\n title={title}\n >\n {title}\n </Link>\n ) : (\n <Text\n as=\"p\"\n variant=\"body-medium\"\n color={color}\n truncate\n title={title}\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n variant=\"body-medium\"\n color=\"secondary\"\n truncate\n title={description}\n >\n {description}\n </Text>\n )}\n </div>\n </div>\n </ReactAriaCell>\n );\n};\n\nCellText.displayName = 'CellText';\n\nexport { CellText };\n"],"names":["ReactAriaCell"],"mappings":";;;;;;;;;AAwBA,MAAM,QAAA,GAAW,CAAC,KAAA,KAAyB;AACzC,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAA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AAS,WAAA,GAAc,UAAA;;;;"}
1
+ {"version":3,"file":"CellText.esm.js","sources":["../../../../src/components/Table/components/CellText.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Text } from '../../Text';\nimport { Link } from '../../Link';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport type { CellTextProps } from '../types';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { CellTextDefinition } from '../definition';\n\n/**\n * A table cell that renders a primary text title with an optional secondary description, leading icon, and link.\n *\n * @public\n */\nconst CellText = (props: CellTextProps) => {\n const { ownProps, restProps } = useDefinition(CellTextDefinition, props);\n const { classes, title, description, color, leadingIcon, href } = ownProps;\n\n return (\n <ReactAriaCell className={classes.root} {...restProps}>\n <div className={classes.cellContentWrapper}>\n {leadingIcon && <div className={classes.cellIcon}>{leadingIcon}</div>}\n <div className={classes.cellContent}>\n {href ? (\n <Link\n href={href}\n variant=\"body-medium\"\n color={color}\n truncate\n title={title}\n >\n {title}\n </Link>\n ) : (\n <Text\n as=\"p\"\n variant=\"body-medium\"\n color={color}\n truncate\n title={title}\n >\n {title}\n </Text>\n )}\n {description && (\n <Text\n variant=\"body-medium\"\n color=\"secondary\"\n truncate\n title={description}\n >\n {description}\n </Text>\n )}\n </div>\n </div>\n </ReactAriaCell>\n );\n};\n\nCellText.displayName = 'CellText';\n\nexport { CellText };\n"],"names":["ReactAriaCell"],"mappings":";;;;;;;;;AA4BA,MAAM,QAAA,GAAW,CAAC,KAAA,KAAyB;AACzC,EAAA,MAAM,EAAE,QAAA,EAAU,SA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AAA;AAEJ;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Column.esm.js","sources":["../../../../src/components/Table/components/Column.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Column as ReactAriaColumn } from 'react-aria-components';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { ColumnDefinition } from '../definition';\nimport { ColumnProps } from '../types';\nimport { RiArrowUpLine } from '@remixicon/react';\n\n/** @public */\nexport const Column = (props: ColumnProps) => {\n const { ownProps, restProps } = useDefinition(ColumnDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <ReactAriaColumn className={classes.root} {...restProps}>\n {({ allowsSorting }) => (\n <div className={classes.headContent}>\n <span className={classes.headLabel}>{children}</span>\n {allowsSorting && (\n <span aria-hidden=\"true\" className={classes.headSortButton}>\n <RiArrowUpLine size={16} />\n </span>\n )}\n </div>\n )}\n </ReactAriaColumn>\n );\n};\n"],"names":["ReactAriaColumn"],"mappings":";;;;;;AAuBO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,kBAAkB,KAAK,CAAA;AACrE,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,EAAA,uBACE,GAAA,CAACA,QAAA,EAAA,EAAgB,SAAA,EAAW,OAAA,CAAQ,MAAO,GAAG,SAAA,EAC3C,QAAA,EAAA,CAAC,EAAE,eAAc,qBAChB,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,WAAA,EACtB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAY,QAAA,EAAS,CAAA;AAAA,IAC7C,aAAA,oBACC,GAAA,CAAC,MAAA,EAAA,EAAK,aAAA,EAAY,MAAA,EAAO,SAAA,EAAW,OAAA,CAAQ,cAAA,EAC1C,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,IAAA,EAAM,EAAA,EAAI,CAAA,EAC3B;AAAA,GAAA,EAEJ,CAAA,EAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Column.esm.js","sources":["../../../../src/components/Table/components/Column.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Column as ReactAriaColumn } from 'react-aria-components';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { ColumnDefinition } from '../definition';\nimport { ColumnProps } from '../types';\nimport { RiArrowUpLine } from '@remixicon/react';\n\n/**\n * A table column header cell with an optional sort toggle and support for resizable widths.\n *\n * @public\n */\nexport const Column = (props: ColumnProps) => {\n const { ownProps, restProps } = useDefinition(ColumnDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <ReactAriaColumn className={classes.root} {...restProps}>\n {({ allowsSorting }) => (\n <div className={classes.headContent}>\n <span className={classes.headLabel}>{children}</span>\n {allowsSorting && (\n <span aria-hidden=\"true\" className={classes.headSortButton}>\n <RiArrowUpLine size={16} />\n </span>\n )}\n </div>\n )}\n </ReactAriaColumn>\n );\n};\n"],"names":["ReactAriaColumn"],"mappings":";;;;;;AA2BO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,kBAAkB,KAAK,CAAA;AACrE,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,EAAA,uBACE,GAAA,CAACA,QAAA,EAAA,EAAgB,SAAA,EAAW,OAAA,CAAQ,MAAO,GAAG,SAAA,EAC3C,QAAA,EAAA,CAAC,EAAE,eAAc,qBAChB,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,WAAA,EACtB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAY,QAAA,EAAS,CAAA;AAAA,IAC7C,aAAA,oBACC,GAAA,CAAC,MAAA,EAAA,EAAK,aAAA,EAAY,MAAA,EAAO,SAAA,EAAW,OAAA,CAAQ,cAAA,EAC1C,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,IAAA,EAAM,EAAA,EAAI,CAAA,EAC3B;AAAA,GAAA,EAEJ,CAAA,EAEJ,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Row.esm.js","sources":["../../../../src/components/Table/components/Row.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Row as ReactAriaRow,\n useTableOptions,\n Cell as ReactAriaCell,\n Collection,\n} from 'react-aria-components';\nimport { Checkbox } from '../../Checkbox';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { RowDefinition } from '../definition';\nimport type { RowProps } from '../types';\nimport { isExternalLink } from '../../../utils/linkUtils';\nimport clsx from 'clsx';\nimport { Flex } from '../../Flex';\n\n/** @public */\nexport function Row<T extends object>(props: RowProps<T>) {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n RowDefinition,\n props,\n );\n const { classes, columns, children, href } = ownProps;\n const isExternal = isExternalLink(href);\n const hasInternalHref = !!href && !isExternal;\n const hasExternalHref = !!href && isExternal;\n const hasInteraction = !!restProps.onAction || !!href;\n\n // Derive the effective target, defaulting to _blank for external links.\n const effectiveTarget = hasExternalHref ? '_blank' : restProps.target;\n // Always include noopener noreferrer when target=_blank, merging any\n // consumer-provided rel tokens to avoid reverse-tabnabbing risk.\n const effectiveRel =\n effectiveTarget === '_blank'\n ? [\n ...new Set([\n 'noopener',\n 'noreferrer',\n ...(restProps.rel?.split(/\\s+/).filter(Boolean) ?? []),\n ]),\n ].join(' ')\n : restProps.rel;\n\n const handlePress = hasInteraction\n ? () => {\n restProps.onAction?.();\n if (href) {\n analytics.captureEvent('click', href, {\n attributes: { to: String(href) },\n });\n }\n }\n : undefined;\n\n let { selectionBehavior, selectionMode } = useTableOptions();\n\n const content = (\n <>\n {selectionBehavior === 'toggle' && selectionMode === 'multiple' && (\n <ReactAriaCell className={clsx(classes.cell, classes.cellSelection)}>\n <Flex justify=\"center\" align=\"center\">\n <Checkbox slot=\"selection\" aria-label=\"Select row\" />\n </Flex>\n </ReactAriaCell>\n )}\n <Collection items={columns}>{children}</Collection>\n </>\n );\n\n return (\n <ReactAriaRow\n href={href}\n {...restProps}\n {...dataAttributes}\n target={effectiveTarget}\n rel={effectiveRel}\n className={clsx(classes.root, restProps.className)}\n data-react-aria-pressable={hasInternalHref ? 'true' : undefined}\n onAction={handlePress}\n >\n {content}\n </ReactAriaRow>\n );\n}\n"],"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AAc,GAAI,eAAA,EAAgB;AAE3D,EAAA,MAAM,0BACJ,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,iBAAA,KAAsB,QAAA,IAAY,aAAA,KAAkB,UAAA,oBACnD,GAAA,CAACA,IAAA,EAAA,EAAc,WAAW,IAAA,CAAK,OAAA,CAAQ,IAAA,EAAM,OAAA,CAAQ,aAAa,CAAA,EAChE,8BAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,QAAA,EAAS,KAAA,EAAM,QAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAK,WAAA,EAAY,YAAA,EAAW,YAAA,EAAa,CAAA,EACrD,CAAA,EACF,CAAA;AAAA,oBAEF,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAO,OAAA,EAAU,QAAA,EAAS;AAAA,GAAA,EACxC,CAAA;AAGF,EAAA,uBACE,GAAA;AAAA,IAACC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACC,GAAG,SAAA;AAAA,MACH,GAAG,cAAA;AAAA,MACJ,MAAA,EAAQ,eAAA;AAAA,MACR,GAAA,EAAK,YAAA;AAAA,MACL,SAAA,EAAW,IAAA,CAAK,OAAA,CAAQ,IAAA,EAAM,UAAU,SAAS,CAAA;AAAA,MACjD,2BAAA,EAA2B,kBAAkB,MAAA,GAAS,MAAA;AAAA,MACtD,QAAA,EAAU,WAAA;AAAA,MAET,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
1
+ {"version":3,"file":"Row.esm.js","sources":["../../../../src/components/Table/components/Row.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Row as ReactAriaRow,\n useTableOptions,\n Cell as ReactAriaCell,\n Collection,\n} from 'react-aria-components';\nimport { Checkbox } from '../../Checkbox';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { RowDefinition } from '../definition';\nimport type { RowProps } from '../types';\nimport { isExternalLink } from '../../../utils/linkUtils';\nimport clsx from 'clsx';\nimport { Flex } from '../../Flex';\n\n/**\n * A table row that can optionally act as a navigation link or trigger an action when clicked, with analytics tracking.\n *\n * @public\n */\nexport function Row<T extends object>(props: RowProps<T>) {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n RowDefinition,\n props,\n );\n const { classes, columns, children, href } = ownProps;\n const isExternal = isExternalLink(href);\n const hasInternalHref = !!href && !isExternal;\n const hasExternalHref = !!href && isExternal;\n const hasInteraction = !!restProps.onAction || !!href;\n\n // Derive the effective target, defaulting to _blank for external links.\n const effectiveTarget = hasExternalHref ? '_blank' : restProps.target;\n // Always include noopener noreferrer when target=_blank, merging any\n // consumer-provided rel tokens to avoid reverse-tabnabbing risk.\n const effectiveRel =\n effectiveTarget === '_blank'\n ? [\n ...new Set([\n 'noopener',\n 'noreferrer',\n ...(restProps.rel?.split(/\\s+/).filter(Boolean) ?? []),\n ]),\n ].join(' ')\n : restProps.rel;\n\n const handlePress = hasInteraction\n ? () => {\n restProps.onAction?.();\n if (href) {\n analytics.captureEvent('click', href, {\n attributes: { to: String(href) },\n });\n }\n }\n : undefined;\n\n let { selectionBehavior, selectionMode } = useTableOptions();\n\n const content = (\n <>\n {selectionBehavior === 'toggle' && selectionMode === 'multiple' && (\n <ReactAriaCell className={clsx(classes.cell, classes.cellSelection)}>\n <Flex justify=\"center\" align=\"center\">\n <Checkbox slot=\"selection\" aria-label=\"Select row\" />\n </Flex>\n </ReactAriaCell>\n )}\n <Collection items={columns}>{children}</Collection>\n </>\n );\n\n return (\n <ReactAriaRow\n href={href}\n {...restProps}\n {...dataAttributes}\n target={effectiveTarget}\n rel={effectiveRel}\n className={clsx(classes.root, restProps.className)}\n data-react-aria-pressable={hasInternalHref ? 'true' : undefined}\n onAction={handlePress}\n >\n {content}\n </ReactAriaRow>\n );\n}\n"],"names":["ReactAriaCell","ReactAriaRow"],"mappings":";;;;;;;;;;;AAmCO,SAAS,IAAsB,KAAA,EAAoB;AACxD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,WAAU,GAAI,aAAA;AAAA,IACzD,aAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,OAAA,EAAS,QAAA,EAAU,MAAK,GAAI,QAAA;AAC7C,EAAA,MAAM,UAAA,GAAa,eAAe,IAAI,CAAA;AACtC,EAAA,MAAM,eAAA,GAAkB,CAAC,CAAC,IAAA,IAAQ,CAAC,UAAA;AACnC,EAAA,MAAM,eAAA,GAAkB,CAAC,CAAC,IAAA,IAAQ,UAAA;AAClC,EAAA,MAAM,iBAAiB,CAAC,CAAC,SAAA,CAAU,QAAA,IAAY,CAAC,CAAC,IAAA;AAGjD,EAAA,MAAM,eAAA,GAAkB,eAAA,GAAkB,QAAA,GAAW,SAAA,CAAU,MAAA;AAG/D,EAAA,MAAM,YAAA,GACJ,oBAAoB,QAAA,GAChB;AAAA,IACE,uBAAO,GAAA,CAAI;AAAA,MACT,UAAA;AAAA,MACA,YAAA;AAAA,MACA,GAAI,UAAU,GAAA,EAAK,KAAA,CAAM,KAAK,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,IAAK;AAAC,KACrD;AAAA,GACH,CAAE,IAAA,CAAK,GAAG,CAAA,GACV,SAAA,CAAU,GAAA;AAEhB,EAAA,MAAM,WAAA,GAAc,iBAChB,MAAM;AACJ,IAAA,SAAA,CAAU,QAAA,IAAW;AACrB,IAAA,IAAI,IAAA,EAAM;AACR,MAAA,SAAA,CAAU,YAAA,CAAa,SAAS,IAA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izeOptions: pagination.showPageSizeOptions,
189
- getLabel: pagination.getLabel
189
+ getLabel: pagination.getLabel,
190
+ showPaginationLabel: pagination.showPaginationLabel
190
191
  }
191
192
  )
192
193
  ] });
@@ -1 +1 @@
1
- {"version":3,"file":"Table.esm.js","sources":["../../../../src/components/Table/components/Table.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useId } from 'react-aria';\nimport {\n type Key,\n ResizableTableContainer,\n Virtualizer,\n} from 'react-aria-components';\nimport { TableLayout } from '@react-stately/layout';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableWrapperDefinition } from '../definition';\nimport { TableRoot } from './TableRoot';\nimport { TableHeader } from './TableHeader';\nimport { TableBody } from './TableBody';\nimport { Row } from './Row';\nimport { Column } from './Column';\nimport { TablePagination } from '../../TablePagination';\nimport type {\n TableProps,\n TableItem,\n RowConfig,\n RowRenderFn,\n TablePaginationType,\n} from '../types';\nimport { useMemo } from 'react';\nimport { VisuallyHidden } from '../../VisuallyHidden';\nimport { Flex } from '../../Flex';\nimport { TableBodySkeleton } from './TableBodySkeleton';\n\nfunction isRowRenderFn<T extends TableItem>(\n rowConfig: RowConfig<T> | RowRenderFn<T> | undefined,\n): rowConfig is RowRenderFn<T> {\n return typeof rowConfig === 'function';\n}\n\nfunction useDisabledRows<T extends TableItem>({\n data,\n rowConfig,\n}: Pick<TableProps<T>, 'data' | 'rowConfig'>): Set<Key> | undefined {\n return useMemo(() => {\n if (!data || typeof rowConfig === 'function' || !rowConfig?.getIsDisabled) {\n return;\n }\n\n return data.reduce<Set<Key>>((set, item) => {\n const isDisabled = rowConfig.getIsDisabled?.(item);\n if (isDisabled) {\n set.add(String(item.id));\n }\n return set;\n }, new Set<Key>());\n }, [data, rowConfig]);\n}\n\nfunction useLiveRegionLabel(\n pagination: TablePaginationType,\n isStale: boolean,\n isLoading: boolean,\n hasData: boolean,\n): string {\n if (isLoading) {\n return 'Loading table data.';\n }\n\n if (!hasData || pagination.type === 'none') {\n return '';\n }\n\n const { pageSize, offset, totalCount, getLabel } = pagination;\n\n if (isStale) {\n return 'Loading table data.';\n }\n\n let liveRegionLabel = 'Table page loaded. ';\n\n if (getLabel) {\n liveRegionLabel += getLabel({ pageSize, offset, totalCount });\n } else if (offset !== undefined) {\n const fromCount = offset + 1;\n const toCount = Math.min(offset + pageSize, totalCount ?? 0);\n liveRegionLabel += `Showing ${fromCount} to ${toCount} of ${totalCount}`;\n }\n return liveRegionLabel;\n}\n\n/** @public */\nexport function Table<T extends TableItem>({\n columnConfig,\n data,\n loading = false,\n isStale = false,\n error,\n pagination,\n sort,\n rowConfig,\n selection,\n emptyState,\n className,\n style,\n virtualized,\n}: TableProps<T>) {\n const {\n ownProps: { classes },\n } = useDefinition(TableWrapperDefinition, { className });\n const liveRegionId = useId();\n\n const visibleColumns = useMemo(\n () => columnConfig.filter(col => !col.isHidden),\n [columnConfig],\n );\n const disabledRows = useDisabledRows({ data, rowConfig });\n\n const {\n mode: selectionMode,\n selected: selectedKeys,\n behavior: selectionBehavior,\n onSelectionChange,\n } = selection || {};\n\n const isInitialLoading = loading && !data;\n\n if (error) {\n return (\n <div className={classes.root} style={style}>\n Error: {error.message}\n </div>\n );\n }\n\n const liveRegionLabel = useLiveRegionLabel(\n pagination,\n isStale,\n isInitialLoading,\n data !== undefined,\n );\n\n const manualColumnSizing = columnConfig.some(\n col =>\n col.width != null ||\n col.minWidth != null ||\n col.maxWidth != null ||\n col.defaultWidth != null,\n );\n\n const wrapResizable = manualColumnSizing\n ? (elem: React.ReactNode) => (\n <ResizableTableContainer className={classes.resizableContainer}>\n {elem}\n </ResizableTableContainer>\n )\n : (elem: React.ReactNode) => <>{elem}</>;\n\n const layoutOptions =\n typeof virtualized === 'object' ? virtualized : undefined;\n\n const wrapVirtualized = (elem: React.ReactNode) =>\n virtualized ? (\n <Virtualizer layout={TableLayout} layoutOptions={layoutOptions}>\n {elem}\n </Virtualizer>\n ) : (\n elem\n );\n\n return (\n <div className={classes.root} style={style}>\n <VisuallyHidden aria-live=\"polite\" id={liveRegionId}>\n {liveRegionLabel}\n </VisuallyHidden>\n {wrapResizable(\n wrapVirtualized(\n <TableRoot\n {...(isInitialLoading\n ? {}\n : {\n selectionMode,\n selectionBehavior,\n selectedKeys,\n onSelectionChange,\n })}\n sortDescriptor={sort?.descriptor ?? undefined}\n onSortChange={sort?.onSortChange}\n disabledKeys={disabledRows}\n stale={isStale}\n loading={isInitialLoading}\n aria-describedby={liveRegionId}\n >\n <TableHeader columns={visibleColumns}>\n {column =>\n column.header ? (\n column.header()\n ) : (\n <Column\n id={column.id}\n isRowHeader={column.isRowHeader}\n allowsSorting={column.isSortable}\n width={column.width}\n defaultWidth={column.defaultWidth}\n minWidth={column.minWidth}\n maxWidth={column.maxWidth}\n >\n {column.label}\n </Column>\n )\n }\n </TableHeader>\n {isInitialLoading ? (\n <TableBodySkeleton columns={visibleColumns} />\n ) : (\n <TableBody\n items={data}\n dependencies={[visibleColumns]}\n renderEmptyState={\n emptyState ? () => <Flex p=\"3\">{emptyState}</Flex> : undefined\n }\n >\n {item => {\n const itemIndex = data?.indexOf(item) ?? -1;\n\n if (isRowRenderFn(rowConfig)) {\n return rowConfig({\n item,\n index: itemIndex,\n });\n }\n\n return (\n <Row\n id={String(item.id)}\n columns={visibleColumns}\n href={rowConfig?.getHref?.(item)}\n onAction={\n rowConfig?.onClick\n ? () => rowConfig?.onClick?.(item)\n : undefined\n }\n >\n {column => column.cell(item)}\n </Row>\n );\n }}\n </TableBody>\n )}\n </TableRoot>,\n ),\n )}\n {pagination.type === 'page' && (\n <TablePagination\n pageSize={pagination.pageSize}\n pageSizeOptions={pagination.pageSizeOptions}\n offset={pagination.offset}\n totalCount={pagination.totalCount}\n hasNextPage={pagination.hasNextPage}\n hasPreviousPage={pagination.hasPreviousPage}\n onNextPage={pagination.onNextPage}\n onPreviousPage={pagination.onPreviousPage}\n onPageSizeChange={pagination.onPageSizeChange}\n showPageSizeOptions={pagination.showPageSizeOptions}\n getLabel={pagination.getLabel}\n />\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CA,SAAS,cACP,SAAA,EAC6B;AAC7B,EAAA,OAAO,OAAO,SAAA,KAAc,UAAA;AAC9B;AAEA,SAAS,eAAA,CAAqC;AAAA,EAC5C,IAAA;AAAA,EACA;AACF,CAAA,EAAoE;AAClE,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,IAAI,CAAC,IAAA,IAAQ,OAAO,cAAc,UAAA,IAAc,CAAC,WAAW,aAAA,EAAe;AACzE,MAAA;AAAA,IACF;AAEA,IAAA,OAAO,IAAA,CAAK,MAAA,CAAiB,CAAC,GAAA,EAAK,IAAA,KAAS;AAC1C,MAAA,MAAM,UAAA,GAAa,SAAA,CAAU,aAAA,GAAgB,IAAI,CAAA;AACjD,MAAA,IAAI,UAAA,EAAY;AACd,QAAA,GAAA,CAAI,GAAA,CAAI,MAAA,CAAO,IAAA,CAAK,EAAE,CAAC,CAAA;AAAA,MACzB;AACA,MAAA,OAAO,GAAA;AAAA,IACT,CAAA,kBAAG,IAAI,GAAA,EAAU,CAAA;AAAA,EACnB,CAAA,EAAG,CAAC,IAAA,EAAM,SAAS,CAAC,CAAA;AACtB;AAEA,SAAS,kBAAA,CACP,UAAA,EACA,OAAA,EACA,SAAA,EACA,OAAA,EACQ;AACR,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,OAAO,qBAAA;AAAA,EACT;AAEA,EAAA,IAAI,CAAC,OAAA,IAAW,UAAA,CAAW,IAAA,KAAS,MAAA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UAAA,CAAW,UAAA;AAAA,QACvB,aAAa,UAAA,CAAW,WAAA;AAAA,QACxB,iBAAiB,UAAA,CAAW,eAAA;AAAA,QAC5B,YAAY,UAAA,CAAW,UAAA;AAAA,QACvB,gBAAgB,UAAA,CAAW,cAAA;AAAA,QAC3B,kBAAkB,UAAA,CAAW,gBAAA;AAAA,QAC7B,qBAAqB,UAAA,CAAW,mBAAA;AAAA,QAChC,UAAU,UAAA,CAAW;AAAA;AAAA;AACvB,GAAA,EAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Table.esm.js","sources":["../../../../src/components/Table/components/Table.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useId } from 'react-aria';\nimport {\n type Key,\n ResizableTableContainer,\n Virtualizer,\n} from 'react-aria-components';\nimport { TableLayout } from '@react-stately/layout';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableWrapperDefinition } from '../definition';\nimport { TableRoot } from './TableRoot';\nimport { TableHeader } from './TableHeader';\nimport { TableBody } from './TableBody';\nimport { Row } from './Row';\nimport { Column } from './Column';\nimport { TablePagination } from '../../TablePagination';\nimport type {\n TableProps,\n TableItem,\n RowConfig,\n RowRenderFn,\n TablePaginationType,\n} from '../types';\nimport { useMemo } from 'react';\nimport { VisuallyHidden } from '../../VisuallyHidden';\nimport { Flex } from '../../Flex';\nimport { TableBodySkeleton } from './TableBodySkeleton';\n\nfunction isRowRenderFn<T extends TableItem>(\n rowConfig: RowConfig<T> | RowRenderFn<T> | undefined,\n): rowConfig is RowRenderFn<T> {\n return typeof rowConfig === 'function';\n}\n\nfunction useDisabledRows<T extends TableItem>({\n data,\n rowConfig,\n}: Pick<TableProps<T>, 'data' | 'rowConfig'>): Set<Key> | undefined {\n return useMemo(() => {\n if (!data || typeof rowConfig === 'function' || !rowConfig?.getIsDisabled) {\n return;\n }\n\n return data.reduce<Set<Key>>((set, item) => {\n const isDisabled = rowConfig.getIsDisabled?.(item);\n if (isDisabled) {\n set.add(String(item.id));\n }\n return set;\n }, new Set<Key>());\n }, [data, rowConfig]);\n}\n\nfunction useLiveRegionLabel(\n pagination: TablePaginationType,\n isStale: boolean,\n isLoading: boolean,\n hasData: boolean,\n): string {\n if (isLoading) {\n return 'Loading table data.';\n }\n\n if (!hasData || pagination.type === 'none') {\n return '';\n }\n\n const { pageSize, offset, totalCount, getLabel } = pagination;\n\n if (isStale) {\n return 'Loading table data.';\n }\n\n let liveRegionLabel = 'Table page loaded. ';\n\n if (getLabel) {\n liveRegionLabel += getLabel({ pageSize, offset, totalCount });\n } else if (offset !== undefined) {\n const fromCount = offset + 1;\n const toCount = Math.min(offset + pageSize, totalCount ?? 0);\n liveRegionLabel += `Showing ${fromCount} to ${toCount} of ${totalCount}`;\n }\n return liveRegionLabel;\n}\n\n/**\n * A full-featured data table with built-in pagination, sorting, row selection, loading and error states, and optional virtualization.\n * Pair with `useTable` to manage data fetching and state, or pass `data`, `columnConfig`, and `pagination` directly for manual control.\n *\n * @public\n */\nexport function Table<T extends TableItem>({\n columnConfig,\n data,\n loading = false,\n isStale = false,\n error,\n pagination,\n sort,\n rowConfig,\n selection,\n emptyState,\n className,\n style,\n virtualized,\n}: TableProps<T>) {\n const {\n ownProps: { classes },\n } = useDefinition(TableWrapperDefinition, { className });\n const liveRegionId = useId();\n\n const visibleColumns = useMemo(\n () => columnConfig.filter(col => !col.isHidden),\n [columnConfig],\n );\n const disabledRows = useDisabledRows({ data, rowConfig });\n\n const {\n mode: selectionMode,\n selected: selectedKeys,\n behavior: selectionBehavior,\n onSelectionChange,\n } = selection || {};\n\n const isInitialLoading = loading && !data;\n\n if (error) {\n return (\n <div className={classes.root} style={style}>\n Error: {error.message}\n </div>\n );\n }\n\n const liveRegionLabel = useLiveRegionLabel(\n pagination,\n isStale,\n isInitialLoading,\n data !== undefined,\n );\n\n const manualColumnSizing = columnConfig.some(\n col =>\n col.width != null ||\n col.minWidth != null ||\n col.maxWidth != null ||\n col.defaultWidth != null,\n );\n\n const wrapResizable = manualColumnSizing\n ? (elem: React.ReactNode) => (\n <ResizableTableContainer className={classes.resizableContainer}>\n {elem}\n </ResizableTableContainer>\n )\n : (elem: React.ReactNode) => <>{elem}</>;\n\n const layoutOptions =\n typeof virtualized === 'object' ? virtualized : undefined;\n\n const wrapVirtualized = (elem: React.ReactNode) =>\n virtualized ? (\n <Virtualizer layout={TableLayout} layoutOptions={layoutOptions}>\n {elem}\n </Virtualizer>\n ) : (\n elem\n );\n\n return (\n <div className={classes.root} style={style}>\n <VisuallyHidden aria-live=\"polite\" id={liveRegionId}>\n {liveRegionLabel}\n </VisuallyHidden>\n {wrapResizable(\n wrapVirtualized(\n <TableRoot\n {...(isInitialLoading\n ? {}\n : {\n selectionMode,\n selectionBehavior,\n selectedKeys,\n onSelectionChange,\n })}\n sortDescriptor={sort?.descriptor ?? undefined}\n onSortChange={sort?.onSortChange}\n disabledKeys={disabledRows}\n stale={isStale}\n loading={isInitialLoading}\n aria-describedby={liveRegionId}\n >\n <TableHeader columns={visibleColumns}>\n {column =>\n column.header ? (\n column.header()\n ) : (\n <Column\n id={column.id}\n isRowHeader={column.isRowHeader}\n allowsSorting={column.isSortable}\n width={column.width}\n defaultWidth={column.defaultWidth}\n minWidth={column.minWidth}\n maxWidth={column.maxWidth}\n >\n {column.label}\n </Column>\n )\n }\n </TableHeader>\n {isInitialLoading ? (\n <TableBodySkeleton columns={visibleColumns} />\n ) : (\n <TableBody\n items={data}\n dependencies={[visibleColumns]}\n renderEmptyState={\n emptyState ? () => <Flex p=\"3\">{emptyState}</Flex> : undefined\n }\n >\n {item => {\n const itemIndex = data?.indexOf(item) ?? -1;\n\n if (isRowRenderFn(rowConfig)) {\n return rowConfig({\n item,\n index: itemIndex,\n });\n }\n\n return (\n <Row\n id={String(item.id)}\n columns={visibleColumns}\n href={rowConfig?.getHref?.(item)}\n onAction={\n rowConfig?.onClick\n ? () => rowConfig?.onClick?.(item)\n : undefined\n }\n >\n {column => column.cell(item)}\n </Row>\n );\n }}\n </TableBody>\n )}\n </TableRoot>,\n ),\n )}\n {pagination.type === 'page' && (\n <TablePagination\n pageSize={pagination.pageSize}\n pageSizeOptions={pagination.pageSizeOptions}\n offset={pagination.offset}\n totalCount={pagination.totalCount}\n hasNextPage={pagination.hasNextPage}\n hasPreviousPage={pagination.hasPreviousPage}\n onNextPage={pagination.onNextPage}\n onPreviousPage={pagination.onPreviousPage}\n onPageSizeChange={pagination.onPageSizeChange}\n showPageSizeOptions={pagination.showPageSizeOptions}\n getLabel={pagination.getLabel}\n showPaginationLabel={pagination.showPaginationLabel}\n />\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CA,SAAS,cACP,SAAA,EAC6B;AAC7B,EAAA,OAAO,OAAO,SAAA,KAAc,UAAA;AAC9B;AAEA,SAAS,eAAA,CAAqC;AAAA,EAC5C,IAAA;AAAA,EACA;AACF,CAAA,EAAoE;AAClE,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,IAAI,CAAC,IAAA,IAAQ,OAAO,cAAc,UAAA,IAAc,CAAC,WAAW,aAAA,EAAe;AACzE,MAAA;AAAA,IACF;AAEA,IAAA,OAAO,IAAA,CAAK,MAAA,CAAiB,CAAC,GAAA,EAAK,IAAA,KAAS;AAC1C,MAAA,MAAM,UAAA,GAAa,SAAA,CAAU,aAAA,GAAgB,IAAI,CAAA;AACjD,MAAA,IAAI,UAAA,EAAY;AACd,QAAA,GAAA,CAAI,GAAA,CAAI,MAAA,CAAO,IAAA,CAAK,EAAE,CAAC,CAAA;AAAA,MAC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,CAAA,MAAA,KAAU,MAAA,CAAO,IAAA,CAAK,IAAI;AAAA;AAAA,qBAC7B;AAAA,kBAEJ;AAAA;AAAA;AACF;AAAA;AAAA;AAEJ;AACF,KACF;AAAA,IACC,UAAA,CAAW,SAAS,MAAA,oBACnB,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,UAAU,UAAA,CAAW,QAAA;AAAA,QACrB,iBAAiB,UAAA,CAAW,eAAA;AAAA,QAC5B,QAAQ,UAAA,CAAW,MAAA;AAAA,QACnB,YAAY,UAAA,CAAW,UAAA;AAAA,QACvB,aAAa,UAAA,CAAW,WAAA;AAAA,QACxB,iBAAiB,UAAA,CAAW,eAAA;AAAA,QAC5B,YAAY,UAAA,CAAW,UAAA;AAAA,QACvB,gBAAgB,UAAA,CAAW,cAAA;AAAA,QAC3B,kBAAkB,UAAA,CAAW,gBAAA;AAAA,QAC7B,qBAAqB,UAAA,CAAW,mBAAA;AAAA,QAChC,UAAU,UAAA,CAAW,QAAA;AAAA,QACrB,qBAAqB,UAAA,CAAW;AAAA;AAAA;AAClC,GAAA,EAEJ,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.esm.js","sources":["../../../../src/components/Table/components/TableBody.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TableBody as ReactAriaTableBody } from 'react-aria-components';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableBodyDefinition } from '../definition';\nimport type { TableBodyProps } from '../types';\n\n/** @public */\nexport const TableBody = <T extends object>(props: TableBodyProps<T>) => {\n const { ownProps, restProps } = useDefinition(TableBodyDefinition, props);\n\n return (\n <ReactAriaTableBody className={ownProps.classes.root} {...restProps} />\n );\n};\n"],"names":["ReactAriaTableBody"],"mappings":";;;;;AAsBO,MAAM,SAAA,GAAY,CAAmB,KAAA,KAA6B;AACvE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,qBAAqB,KAAK,CAAA;AAExE,EAAA,2BACGA,WAAA,EAAA,EAAmB,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AAEzE;;;;"}
1
+ {"version":3,"file":"TableBody.esm.js","sources":["../../../../src/components/Table/components/TableBody.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TableBody as ReactAriaTableBody } from 'react-aria-components';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableBodyDefinition } from '../definition';\nimport type { TableBodyProps } from '../types';\n\n/**\n * The body section of a table that renders data rows from the provided items collection.\n *\n * @public\n */\nexport const TableBody = <T extends object>(props: TableBodyProps<T>) => {\n const { ownProps, restProps } = useDefinition(TableBodyDefinition, props);\n\n return (\n <ReactAriaTableBody className={ownProps.classes.root} {...restProps} />\n );\n};\n"],"names":["ReactAriaTableBody"],"mappings":";;;;;AA0BO,MAAM,SAAA,GAAY,CAAmB,KAAA,KAA6B;AACvE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,qBAAqB,KAAK,CAAA;AAExE,EAAA,2BACGA,WAAA,EAAA,EAAmB,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AAEzE;;;;"}
@@ -8,6 +8,7 @@ import '../../../hooks/useBreakpoint.esm.js';
8
8
  import '../../../hooks/useBg.esm.js';
9
9
  import '../../../hooks/useDefinition/helpers.esm.js';
10
10
  import '../../../analytics/useAnalytics.esm.js';
11
+ import 'react-router-dom';
11
12
  import '../../Skeleton/Skeleton.module.css.esm.js';
12
13
 
13
14
  const SKELETON_ROW_COUNT = 5;
@@ -1 +1 @@
1
- {"version":3,"file":"TableBodySkeleton.esm.js","sources":["../../../../src/components/Table/components/TableBodySkeleton.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TableBody } from './TableBody';\nimport { Row } from './Row';\nimport { Cell } from './Cell';\nimport { Skeleton } from '../../Skeleton';\nimport type { ColumnConfig, TableItem } from '../types';\n\nconst SKELETON_ROW_COUNT = 5;\nconst SKELETON_WIDTHS = ['75%', '50%', '60%', '45%', '70%'];\n\nconst skeletonItems = Array.from({ length: SKELETON_ROW_COUNT }, (_, i) => ({\n id: `skeleton-${i}`,\n}));\n\n/** @internal */\nexport function TableBodySkeleton<T extends TableItem>({\n columns,\n}: {\n columns: readonly ColumnConfig<T>[];\n}) {\n return (\n <TableBody items={skeletonItems} dependencies={[columns]}>\n {item => {\n const rowIndex = Number(item.id.split('-')[1]);\n return (\n <Row id={item.id} columns={columns}>\n {column => (\n <Cell key={column.id} aria-hidden=\"true\">\n <Skeleton\n width={\n SKELETON_WIDTHS[\n (rowIndex + columns.indexOf(column)) %\n SKELETON_WIDTHS.length\n ]\n }\n />\n </Cell>\n )}\n </Row>\n );\n }}\n </TableBody>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,MAAM,kBAAA,GAAqB,CAAA;AAC3B,MAAM,kBAAkB,CAAC,KAAA,EAAO,KAAA,EAAO,KAAA,EAAO,OAAO,KAAK,CAAA;AAE1D,MAAM,aAAA,GAAgB,MAAM,IAAA,CAAK,EAAE,QAAQ,kBAAA,EAAmB,EAAG,CAAC,CAAA,EAAG,CAAA,MAAO;AAAA,EAC1E,EAAA,EAAI,YAAY,CAAC,CAAA;AACnB,CAAA,CAAE,CAAA;AAGK,SAAS,iBAAA,CAAuC;AAAA,EACrD;AACF,CAAA,EAEG;AACD,EAAA,uBACE,GAAA,CAAC,aAAU,KAAA,EAAO,aAAA,EAAe,cAAc,CAAC,OAAO,GACpD,QAAA,EAAA,CAAA,IAAA,KAAQ;AACP,IAAA,MAAM,QAAA,GAAW,OAAO,IAAA,CAAK,EAAA,CAAG,MAAM,GAAG,CAAA,CAAE,CAAC,CAAC,CAAA;AAC7C,IAAA,uBACE,GAAA,CAAC,GAAA,EAAA,EAAI,EAAA,EAAI,IAAA,CAAK,EAAA,EAAI,SACf,QAAA,EAAA,CAAA,MAAA,qBACC,GAAA,CAAC,IAAA,EAAA,EAAqB,aAAA,EAAY,MAAA,EAChC,QAAA,kBAAA,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,KAAA,EACE,iBACG,QAAA,GAAW,OAAA,CAAQ,QAAQ,MAAM,CAAA,IAChC,gBAAgB,MACpB;AAAA;AAAA,KAEJ,EAAA,EARS,MAAA,CAAO,EASlB,CAAA,EAEJ,CAAA;AAAA,EAEJ,CAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TableBodySkeleton.esm.js","sources":["../../../../src/components/Table/components/TableBodySkeleton.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TableBody } from './TableBody';\nimport { Row } from './Row';\nimport { Cell } from './Cell';\nimport { Skeleton } from '../../Skeleton';\nimport type { ColumnConfig, TableItem } from '../types';\n\nconst SKELETON_ROW_COUNT = 5;\nconst SKELETON_WIDTHS = ['75%', '50%', '60%', '45%', '70%'];\n\nconst skeletonItems = Array.from({ length: SKELETON_ROW_COUNT }, (_, i) => ({\n id: `skeleton-${i}`,\n}));\n\n/** @internal */\nexport function TableBodySkeleton<T extends TableItem>({\n columns,\n}: {\n columns: readonly ColumnConfig<T>[];\n}) {\n return (\n <TableBody items={skeletonItems} dependencies={[columns]}>\n {item => {\n const rowIndex = Number(item.id.split('-')[1]);\n return (\n <Row id={item.id} columns={columns}>\n {column => (\n <Cell key={column.id} aria-hidden=\"true\">\n <Skeleton\n width={\n SKELETON_WIDTHS[\n (rowIndex + columns.indexOf(column)) %\n SKELETON_WIDTHS.length\n ]\n }\n />\n </Cell>\n )}\n </Row>\n );\n }}\n </TableBody>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAsBA,MAAM,kBAAA,GAAqB,CAAA;AAC3B,MAAM,kBAAkB,CAAC,KAAA,EAAO,KAAA,EAAO,KAAA,EAAO,OAAO,KAAK,CAAA;AAE1D,MAAM,aAAA,GAAgB,MAAM,IAAA,CAAK,EAAE,QAAQ,kBAAA,EAAmB,EAAG,CAAC,CAAA,EAAG,CAAA,MAAO;AAAA,EAC1E,EAAA,EAAI,YAAY,CAAC,CAAA;AACnB,CAAA,CAAE,CAAA;AAGK,SAAS,iBAAA,CAAuC;AAAA,EACrD;AACF,CAAA,EAEG;AACD,EAAA,uBACE,GAAA,CAAC,aAAU,KAAA,EAAO,aAAA,EAAe,cAAc,CAAC,OAAO,GACpD,QAAA,EAAA,CAAA,IAAA,KAAQ;AACP,IAAA,MAAM,QAAA,GAAW,OAAO,IAAA,CAAK,EAAA,CAAG,MAAM,GAAG,CAAA,CAAE,CAAC,CAAC,CAAA;AAC7C,IAAA,uBACE,GAAA,CAAC,GAAA,EAAA,EAAI,EAAA,EAAI,IAAA,CAAK,EAAA,EAAI,SACf,QAAA,EAAA,CAAA,MAAA,qBACC,GAAA,CAAC,IAAA,EAAA,EAAqB,aAAA,EAAY,MAAA,EAChC,QAAA,kBAAA,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,KAAA,EACE,iBACG,QAAA,GAAW,OAAA,CAAQ,QAAQ,MAAM,CAAA,IAChC,gBAAgB,MACpB;AAAA;AAAA,KAEJ,EAAA,EARS,MAAA,CAAO,EASlB,CAAA,EAEJ,CAAA;AAAA,EAEJ,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeader.esm.js","sources":["../../../../src/components/Table/components/TableHeader.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n TableHeader as ReactAriaTableHeader,\n Collection,\n useTableOptions,\n} from 'react-aria-components';\nimport { Checkbox } from '../../Checkbox';\nimport { Column } from './Column';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableHeaderDefinition } from '../definition';\nimport type { TableHeaderProps } from '../types';\nimport { Flex } from '../../Flex';\n\n/** @public */\nexport const TableHeader = <T extends object>(props: TableHeaderProps<T>) => {\n let { selectionBehavior, selectionMode } = useTableOptions();\n\n const { ownProps, restProps } = useDefinition(TableHeaderDefinition, props);\n const { classes, columns, children } = ownProps;\n\n return (\n <ReactAriaTableHeader className={classes.root} {...restProps}>\n {selectionBehavior === 'toggle' && selectionMode === 'multiple' && (\n <Column\n width={40}\n minWidth={40}\n maxWidth={40}\n className={classes.headSelection}\n >\n <Flex justify=\"center\" align=\"center\" aria-label=\"Row selection\">\n <Checkbox slot=\"selection\" aria-label=\"Select all\" />\n </Flex>\n </Column>\n )}\n <Collection items={columns}>{children}</Collection>\n </ReactAriaTableHeader>\n );\n};\n"],"names":["ReactAriaTableHeader"],"mappings":";;;;;;;;;;AA6BO,MAAM,WAAA,GAAc,CAAmB,KAAA,KAA+B;AAC3E,EAAA,IAAI,EAAE,iBAAA,EAAmB,aAAA,EAAc,GAAI,eAAA,EAAgB;AAE3D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,uBAAuB,KAAK,CAAA;AAC1E,EAAA,MAAM,EAAE,OAAA,EAAS,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAEvC,EAAA,4BACGA,aAAA,EAAA,EAAqB,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAChD,QAAA,EAAA;AAAA,IAAA,iBAAA,KAAsB,QAAA,IAAY,kBAAkB,UAAA,oBACnD,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,EAAA;AAAA,QACP,QAAA,EAAU,EAAA;AAAA,QACV,QAAA,EAAU,EAAA;AAAA,QACV,WAAW,OAAA,CAAQ,aAAA;AAAA,QAEnB,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,QAAA,EAAS,OAAM,QAAA,EAAS,YAAA,EAAW,eAAA,EAC/C,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAK,WAAA,EAAY,YAAA,EAAW,cAAa,CAAA,EACrD;AAAA;AAAA,KACF;AAAA,oBAEF,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAO,OAAA,EAAU,QAAA,EAAS;AAAA,GAAA,EACxC,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TableHeader.esm.js","sources":["../../../../src/components/Table/components/TableHeader.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n TableHeader as ReactAriaTableHeader,\n Collection,\n useTableOptions,\n} from 'react-aria-components';\nimport { Checkbox } from '../../Checkbox';\nimport { Column } from './Column';\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableHeaderDefinition } from '../definition';\nimport type { TableHeaderProps } from '../types';\nimport { Flex } from '../../Flex';\n\n/**\n * The header row of a table, rendering column labels and an optional select-all checkbox for toggle selection mode.\n *\n * @public\n */\nexport const TableHeader = <T extends object>(props: TableHeaderProps<T>) => {\n let { selectionBehavior, selectionMode } = useTableOptions();\n\n const { ownProps, restProps } = useDefinition(TableHeaderDefinition, props);\n const { classes, columns, children } = ownProps;\n\n return (\n <ReactAriaTableHeader className={classes.root} {...restProps}>\n {selectionBehavior === 'toggle' && selectionMode === 'multiple' && (\n <Column\n width={40}\n minWidth={40}\n maxWidth={40}\n className={classes.headSelection}\n >\n <Flex justify=\"center\" align=\"center\" aria-label=\"Row selection\">\n <Checkbox slot=\"selection\" aria-label=\"Select all\" />\n </Flex>\n </Column>\n )}\n <Collection items={columns}>{children}</Collection>\n </ReactAriaTableHeader>\n );\n};\n"],"names":["ReactAriaTableHeader"],"mappings":";;;;;;;;;;AAiCO,MAAM,WAAA,GAAc,CAAmB,KAAA,KAA+B;AAC3E,EAAA,IAAI,EAAE,iBAAA,EAAmB,aAAA,EAAc,GAAI,eAAA,EAAgB;AAE3D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,uBAAuB,KAAK,CAAA;AAC1E,EAAA,MAAM,EAAE,OAAA,EAAS,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAEvC,EAAA,4BACGA,aAAA,EAAA,EAAqB,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAChD,QAAA,EAAA;AAAA,IAAA,iBAAA,KAAsB,QAAA,IAAY,kBAAkB,UAAA,oBACnD,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,EAAA;AAAA,QACP,QAAA,EAAU,EAAA;AAAA,QACV,QAAA,EAAU,EAAA;AAAA,QACV,WAAW,OAAA,CAAQ,aAAA;AAAA,QAEnB,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,QAAA,EAAS,OAAM,QAAA,EAAS,YAAA,EAAW,eAAA,EAC/C,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAK,WAAA,EAAY,YAAA,EAAW,cAAa,CAAA,EACrD;AAAA;AAAA,KACF;AAAA,oBAEF,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAO,OAAA,EAAU,QAAA,EAAS;AAAA,GAAA,EACxC,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableRoot.esm.js","sources":["../../../../src/components/Table/components/TableRoot.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableDefinition } from '../definition';\nimport { Table as ReactAriaTable } from 'react-aria-components';\nimport { TableRootProps } from '../types';\n\n/** @public */\nexport const TableRoot = (props: TableRootProps) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TableDefinition,\n props,\n );\n\n return (\n <ReactAriaTable\n className={ownProps.classes.root}\n aria-label=\"Data table\"\n aria-busy={ownProps.stale || ownProps.loading}\n {...dataAttributes}\n {...restProps}\n />\n );\n};\n"],"names":["ReactAriaTable"],"mappings":";;;;;AAsBO,MAAM,SAAA,GAAY,CAAC,KAAA,KAA0B;AAClD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,eAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAACA,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA;AAAA,MAC5B,YAAA,EAAW,YAAA;AAAA,MACX,WAAA,EAAW,QAAA,CAAS,KAAA,IAAS,QAAA,CAAS,OAAA;AAAA,MACrC,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
1
+ {"version":3,"file":"TableRoot.esm.js","sources":["../../../../src/components/Table/components/TableRoot.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useDefinition } from '../../../hooks/useDefinition';\nimport { TableDefinition } from '../definition';\nimport { Table as ReactAriaTable } from 'react-aria-components';\nimport { TableRootProps } from '../types';\n\n/**\n * The low-level table root element for building custom table layouts from atomic components.\n * For most use cases, prefer the `Table` convenience wrapper.\n *\n * @public\n */\nexport const TableRoot = (props: TableRootProps) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TableDefinition,\n props,\n );\n\n return (\n <ReactAriaTable\n className={ownProps.classes.root}\n aria-label=\"Data table\"\n aria-busy={ownProps.stale || ownProps.loading}\n {...dataAttributes}\n {...restProps}\n />\n );\n};\n"],"names":["ReactAriaTable"],"mappings":";;;;;AA2BO,MAAM,SAAA,GAAY,CAAC,KAAA,KAA0B;AAClD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,eAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAACA,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA;AAAA,MAC5B,YAAA,EAAW,YAAA;AAAA,MACX,WAAA,EAAW,QAAA,CAAS,KAAA,IAAS,QAAA,CAAS,OAAA;AAAA,MACrC,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Table.module.css.esm.js';
9
10
 
@@ -47,6 +48,7 @@ const TableBodyDefinition = defineComponent()({
47
48
  });
48
49
  const RowDefinition = defineComponent()({
49
50
  styles,
51
+ resolveHref: true,
50
52
  analytics: true,
51
53
  bg: "consumer",
52
54
  classNames: {
@@ -85,6 +87,7 @@ const CellDefinition = defineComponent()({
85
87
  });
86
88
  const CellTextDefinition = defineComponent()({
87
89
  styles,
90
+ resolveHref: true,
88
91
  classNames: {
89
92
  root: "bui-TableCell",
90
93
  cellContentWrapper: "bui-TableCellContentWrapper",
@@ -102,6 +105,7 @@ const CellTextDefinition = defineComponent()({
102
105
  });
103
106
  const CellProfileDefinition = defineComponent()({
104
107
  styles,
108
+ resolveHref: true,
105
109
  classNames: {
106
110
  root: "bui-TableCell",
107
111
  cellContentWrapper: "bui-TableCellContentWrapper",