@backstage/ui 0.9.0-next.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/CHANGELOG.md +174 -0
  2. package/README.md +23 -0
  3. package/dist/components/Accordion/Accordion.esm.js +5 -4
  4. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  5. package/dist/components/Accordion/definition.esm.js +15 -0
  6. package/dist/components/Accordion/definition.esm.js.map +1 -0
  7. package/dist/components/Avatar/Avatar.esm.js +9 -5
  8. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  9. package/dist/components/Avatar/definition.esm.js +13 -0
  10. package/dist/components/Avatar/definition.esm.js.map +1 -0
  11. package/dist/components/Box/Box.esm.js +2 -1
  12. package/dist/components/Box/Box.esm.js.map +1 -1
  13. package/dist/components/Box/definition.esm.js +32 -0
  14. package/dist/components/Box/definition.esm.js.map +1 -0
  15. package/dist/components/Button/Button.esm.js +9 -5
  16. package/dist/components/Button/Button.esm.js.map +1 -1
  17. package/dist/components/Button/definition.esm.js +15 -0
  18. package/dist/components/Button/definition.esm.js.map +1 -0
  19. package/dist/components/ButtonIcon/ButtonIcon.esm.js +11 -6
  20. package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
  21. package/dist/components/ButtonIcon/definition.esm.js +10 -0
  22. package/dist/components/ButtonIcon/definition.esm.js.map +1 -0
  23. package/dist/components/ButtonLink/ButtonLink.esm.js +11 -6
  24. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  25. package/dist/components/ButtonLink/definition.esm.js +8 -0
  26. package/dist/components/ButtonLink/definition.esm.js.map +1 -0
  27. package/dist/components/Card/Card.esm.js +5 -4
  28. package/dist/components/Card/Card.esm.js.map +1 -1
  29. package/dist/components/Card/definition.esm.js +11 -0
  30. package/dist/components/Card/definition.esm.js.map +1 -0
  31. package/dist/components/Checkbox/Checkbox.esm.js +2 -1
  32. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  33. package/dist/components/Checkbox/definition.esm.js +12 -0
  34. package/dist/components/Checkbox/definition.esm.js.map +1 -0
  35. package/dist/components/Container/Container.esm.js +2 -1
  36. package/dist/components/Container/Container.esm.js.map +1 -1
  37. package/dist/components/Container/definition.esm.js +9 -0
  38. package/dist/components/Container/definition.esm.js.map +1 -0
  39. package/dist/components/Dialog/Dialog.esm.js +5 -4
  40. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  41. package/dist/components/Dialog/definition.esm.js +13 -0
  42. package/dist/components/Dialog/definition.esm.js.map +1 -0
  43. package/dist/components/FieldError/FieldError.esm.js +2 -1
  44. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  45. package/dist/components/FieldError/definition.esm.js +8 -0
  46. package/dist/components/FieldError/definition.esm.js.map +1 -0
  47. package/dist/components/FieldLabel/FieldLabel.esm.js +2 -1
  48. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  49. package/dist/components/FieldLabel/definition.esm.js +11 -0
  50. package/dist/components/FieldLabel/definition.esm.js.map +1 -0
  51. package/dist/components/Flex/Flex.esm.js +2 -1
  52. package/dist/components/Flex/Flex.esm.js.map +1 -1
  53. package/dist/components/Flex/definition.esm.js +28 -0
  54. package/dist/components/Flex/definition.esm.js.map +1 -0
  55. package/dist/components/Grid/Grid.esm.js +3 -2
  56. package/dist/components/Grid/Grid.esm.js.map +1 -1
  57. package/dist/components/Grid/definition.esm.js +32 -0
  58. package/dist/components/Grid/definition.esm.js.map +1 -0
  59. package/dist/components/Header/Header.esm.js +2 -1
  60. package/dist/components/Header/Header.esm.js.map +1 -1
  61. package/dist/components/Header/HeaderToolbar.esm.js +2 -1
  62. package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
  63. package/dist/components/Header/definition.esm.js +14 -0
  64. package/dist/components/Header/definition.esm.js.map +1 -0
  65. package/dist/components/HeaderPage/HeaderPage.esm.js +2 -1
  66. package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
  67. package/dist/components/HeaderPage/definition.esm.js +12 -0
  68. package/dist/components/HeaderPage/definition.esm.js.map +1 -0
  69. package/dist/components/Link/Link.esm.js +10 -6
  70. package/dist/components/Link/Link.esm.js.map +1 -1
  71. package/dist/components/Link/definition.esm.js +14 -0
  72. package/dist/components/Link/definition.esm.js.map +1 -0
  73. package/dist/components/Menu/Menu.esm.js +10 -9
  74. package/dist/components/Menu/Menu.esm.js.map +1 -1
  75. package/dist/components/Menu/definition.esm.js +23 -0
  76. package/dist/components/Menu/definition.esm.js.map +1 -0
  77. package/dist/components/Popover/definition.esm.js +8 -0
  78. package/dist/components/Popover/definition.esm.js.map +1 -0
  79. package/dist/components/RadioGroup/RadioGroup.esm.js +3 -2
  80. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  81. package/dist/components/RadioGroup/definition.esm.js +10 -0
  82. package/dist/components/RadioGroup/definition.esm.js.map +1 -0
  83. package/dist/components/SearchField/SearchField.esm.js +2 -1
  84. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  85. package/dist/components/SearchField/definition.esm.js +16 -0
  86. package/dist/components/SearchField/definition.esm.js.map +1 -0
  87. package/dist/components/Select/Select.esm.js +11 -6
  88. package/dist/components/Select/Select.esm.js.map +1 -1
  89. package/dist/components/Select/SelectContent.esm.js +2 -1
  90. package/dist/components/Select/SelectContent.esm.js.map +1 -1
  91. package/dist/components/Select/SelectListBox.esm.js +3 -2
  92. package/dist/components/Select/SelectListBox.esm.js.map +1 -1
  93. package/dist/components/Select/SelectTrigger.esm.js +2 -1
  94. package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
  95. package/dist/components/Select/definition.esm.js +23 -0
  96. package/dist/components/Select/definition.esm.js.map +1 -0
  97. package/dist/components/Skeleton/Skeleton.esm.js +2 -1
  98. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  99. package/dist/components/Skeleton/definition.esm.js +8 -0
  100. package/dist/components/Skeleton/definition.esm.js.map +1 -0
  101. package/dist/components/Switch/Switch.esm.js +2 -1
  102. package/dist/components/Switch/Switch.esm.js.map +1 -1
  103. package/dist/components/Switch/definition.esm.js +9 -0
  104. package/dist/components/Switch/definition.esm.js.map +1 -0
  105. package/dist/components/Table/components/Cell.esm.js +2 -1
  106. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  107. package/dist/components/Table/components/CellProfile.esm.js +5 -7
  108. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  109. package/dist/components/Table/components/Column.esm.js +2 -4
  110. package/dist/components/Table/components/Column.esm.js.map +1 -1
  111. package/dist/components/Table/components/Row.esm.js +2 -4
  112. package/dist/components/Table/components/Row.esm.js.map +1 -1
  113. package/dist/components/Table/components/Table.esm.js +2 -4
  114. package/dist/components/Table/components/Table.esm.js.map +1 -1
  115. package/dist/components/Table/components/TableBody.esm.js +2 -4
  116. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  117. package/dist/components/Table/components/TableHeader.esm.js +2 -4
  118. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  119. package/dist/components/Table/definition.esm.js +24 -0
  120. package/dist/components/Table/definition.esm.js.map +1 -0
  121. package/dist/components/TablePagination/TablePagination.esm.js +2 -1
  122. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  123. package/dist/components/TablePagination/definition.esm.js +11 -0
  124. package/dist/components/TablePagination/definition.esm.js.map +1 -0
  125. package/dist/components/Tabs/Tabs.esm.js +5 -4
  126. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  127. package/dist/components/Tabs/TabsIndicators.esm.js +2 -1
  128. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  129. package/dist/components/Tabs/definition.esm.js +14 -0
  130. package/dist/components/Tabs/definition.esm.js.map +1 -0
  131. package/dist/components/TagGroup/TagGroup.esm.js +3 -2
  132. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  133. package/dist/components/TagGroup/definition.esm.js +12 -0
  134. package/dist/components/TagGroup/definition.esm.js.map +1 -0
  135. package/dist/components/Text/Text.esm.js +10 -6
  136. package/dist/components/Text/Text.esm.js.map +1 -1
  137. package/dist/components/Text/definition.esm.js +14 -0
  138. package/dist/components/Text/definition.esm.js.map +1 -0
  139. package/dist/components/TextField/TextField.esm.js +2 -1
  140. package/dist/components/TextField/TextField.esm.js.map +1 -1
  141. package/dist/components/TextField/definition.esm.js +17 -0
  142. package/dist/components/TextField/definition.esm.js.map +1 -0
  143. package/dist/components/Tooltip/Tooltip.esm.js +2 -1
  144. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  145. package/dist/components/Tooltip/definition.esm.js +9 -0
  146. package/dist/components/Tooltip/definition.esm.js.map +1 -0
  147. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js +5 -1
  148. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js.map +1 -1
  149. package/dist/components/VisuallyHidden/definition.esm.js +8 -0
  150. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -0
  151. package/dist/hooks/useStyles.esm.js +1 -3
  152. package/dist/hooks/useStyles.esm.js.map +1 -1
  153. package/dist/index.d.ts +455 -362
  154. package/dist/index.esm.js +30 -1
  155. package/dist/index.esm.js.map +1 -1
  156. package/package.json +2 -2
  157. package/dist/utils/componentDefinitions.esm.js +0 -406
  158. package/dist/utils/componentDefinitions.esm.js.map +0 -1
@@ -0,0 +1,16 @@
1
+ const SearchFieldDefinition = {
2
+ classNames: {
3
+ root: "bui-SearchField",
4
+ clear: "bui-SearchFieldClear",
5
+ inputWrapper: "bui-SearchFieldInputWrapper",
6
+ input: "bui-SearchFieldInput",
7
+ inputIcon: "bui-SearchFieldInputIcon"
8
+ },
9
+ dataAttributes: {
10
+ startCollapsed: [true, false],
11
+ size: ["small", "medium"]
12
+ }
13
+ };
14
+
15
+ export { SearchFieldDefinition };
16
+ //# sourceMappingURL=definition.esm.js.map
@@ -0,0 +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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for SearchField\n * @public\n */\nexport const SearchFieldDefinition = {\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-SearchFieldClear',\n inputWrapper: 'bui-SearchFieldInputWrapper',\n input: 'bui-SearchFieldInput',\n inputIcon: 'bui-SearchFieldInputIcon',\n },\n dataAttributes: {\n startCollapsed: [true, false] as const,\n size: ['small', 'medium'] as const,\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,qBAAA,GAAwB;AAAA,EACnC,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,cAAA,EAAgB;AAAA,IACd,cAAA,EAAgB,CAAC,IAAA,EAAM,KAAK,CAAA;AAAA,IAC5B,IAAA,EAAM,CAAC,OAAA,EAAS,QAAQ;AAAA;AAE5B;;;;"}
@@ -3,6 +3,8 @@ import { forwardRef, useEffect } from 'react';
3
3
  import { Select as Select$1, Popover } from 'react-aria-components';
4
4
  import clsx from 'clsx';
5
5
  import { useStyles } from '../../hooks/useStyles.esm.js';
6
+ import { SelectDefinition } from './definition.esm.js';
7
+ import { PopoverDefinition } from '../Popover/definition.esm.js';
6
8
  import { FieldLabel } from '../FieldLabel/FieldLabel.esm.js';
7
9
  import { FieldError } from '../FieldError/FieldError.esm.js';
8
10
  import styles from './Select.module.css.esm.js';
@@ -11,12 +13,15 @@ import { SelectTrigger } from './SelectTrigger.esm.js';
11
13
  import { SelectContent } from './SelectContent.esm.js';
12
14
 
13
15
  const Select = forwardRef((props, ref) => {
14
- const { classNames: popoverClassNames } = useStyles("Popover");
15
- const { classNames, dataAttributes, cleanedProps } = useStyles("Select", {
16
- size: "small",
17
- placeholder: "Select an option",
18
- ...props
19
- });
16
+ const { classNames: popoverClassNames } = useStyles(PopoverDefinition);
17
+ const { classNames, dataAttributes, cleanedProps } = useStyles(
18
+ SelectDefinition,
19
+ {
20
+ size: "small",
21
+ placeholder: "Select an option",
22
+ ...props
23
+ }
24
+ );
20
25
  const {
21
26
  className,
22
27
  label,
@@ -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 clsx from 'clsx';\nimport { SelectProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport styles from './Select.module.css';\nimport stylesPopover from '../Popover/Popover.module.css';\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 { classNames: popoverClassNames } = useStyles('Popover');\n const { classNames, dataAttributes, cleanedProps } = useStyles('Select', {\n size: 'small',\n placeholder: 'Select an option',\n ...props,\n });\n\n const {\n className,\n label,\n description,\n options,\n icon,\n searchable,\n searchPlaceholder,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n isRequired,\n secondaryLabel,\n ...rest\n } = cleanedProps;\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={clsx(classNames.root, styles[classNames.root], className)}\n {...dataAttributes}\n ref={ref}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <SelectTrigger icon={icon} />\n <FieldError />\n <Popover\n className={clsx(\n popoverClassNames.root,\n stylesPopover[popoverClassNames.root],\n classNames.popover,\n styles[classNames.popover],\n )}\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,UAAA,EAAY,iBAAA,EAAkB,GAAI,UAAU,SAAS,CAAA;AAC7D,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,YAAA,EAAa,GAAI,UAAU,QAAA,EAAU;AAAA,IACvE,IAAA,EAAM,OAAA;AAAA,IACN,WAAA,EAAa,kBAAA;AAAA,IACb,GAAG;AAAA,GACJ,CAAA;AAED,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AA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C3B;AAAA,YACC,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 clsx from 'clsx';\nimport { SelectProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { SelectDefinition } from './definition';\nimport { PopoverDefinition } from '../Popover/definition';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport styles from './Select.module.css';\nimport stylesPopover from '../Popover/Popover.module.css';\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 { classNames: popoverClassNames } = useStyles(PopoverDefinition);\n const { classNames, dataAttributes, cleanedProps } = useStyles(\n SelectDefinition,\n {\n size: 'small',\n placeholder: 'Select an option',\n ...props,\n },\n );\n\n const {\n className,\n label,\n description,\n options,\n icon,\n searchable,\n searchPlaceholder,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n isRequired,\n secondaryLabel,\n ...rest\n } = cleanedProps;\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={clsx(classNames.root, styles[classNames.root], className)}\n {...dataAttributes}\n ref={ref}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <SelectTrigger icon={icon} />\n <FieldError />\n <Popover\n className={clsx(\n popoverClassNames.root,\n stylesPopover[popoverClassNames.root],\n classNames.popover,\n styles[classNames.popover],\n )}\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":";;;;;;;;;;;;;;AA+BO,MAAM,MAAA,GAAS,UAAA,CAGpB,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChB,EAAA,MAAM,EAAE,UAAA,EAAY,iBAAA,EAAkB,GAAI,UAAU,iBAAiB,CAAA;AACrE,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,YAAA,EAAa,GAAI,SAAA;AAAA,IACnD,gBAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,OAAA;AAAA,MACN,WAAA,EAAa,kBAAA;AAAA,MACb,GAAG;AAAA;AACL,GACF;AAEA,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,YAAA,EAAc,SAAA;AAAA,IACd,iBAAA,EAAmB,cAAA;AAAA,IACnB,UAAA;AAAA,IACA,cAAA;AAA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A,gBACA;AAAA;AAAA;AACF;AAAA;AACF;AAAA;AAAA,GACF;AAEJ,CAAC;AAED,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -4,6 +4,7 @@ import { useFilter } from 'react-aria';
4
4
  import { RiCloseCircleLine } from '@remixicon/react';
5
5
  import clsx from 'clsx';
6
6
  import { useStyles } from '../../hooks/useStyles.esm.js';
7
+ import { SelectDefinition } from './definition.esm.js';
7
8
  import { SelectListBox } from './SelectListBox.esm.js';
8
9
  import styles from './Select.module.css.esm.js';
9
10
 
@@ -13,7 +14,7 @@ function SelectContent({
13
14
  options
14
15
  }) {
15
16
  const { contains } = useFilter({ sensitivity: "base" });
16
- const { classNames } = useStyles("Select");
17
+ const { classNames } = useStyles(SelectDefinition);
17
18
  if (!searchable) {
18
19
  return /* @__PURE__ */ jsx(SelectListBox, { options });
19
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SelectContent.esm.js","sources":["../../../src/components/Select/SelectContent.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 Input,\n SearchField,\n Autocomplete,\n Button,\n} from 'react-aria-components';\nimport { useFilter } from 'react-aria';\nimport { RiCloseCircleLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport { SelectListBox } from './SelectListBox';\nimport styles from './Select.module.css';\nimport type { Option } from './types';\n\ninterface SelectContentProps {\n searchable?: boolean;\n searchPlaceholder?: string;\n options?: Array<Option>;\n}\n\nexport function SelectContent({\n searchable,\n searchPlaceholder = 'Search...',\n options,\n}: SelectContentProps) {\n const { contains } = useFilter({ sensitivity: 'base' });\n const { classNames } = useStyles('Select');\n\n if (!searchable) {\n return <SelectListBox options={options} />;\n }\n\n return (\n <Autocomplete filter={contains}>\n <SearchField\n autoFocus\n className={clsx(\n classNames.searchWrapper,\n styles[classNames.searchWrapper],\n )}\n >\n <Input\n placeholder={searchPlaceholder}\n className={clsx(classNames.search, styles[classNames.search])}\n />\n <Button\n className={clsx(\n classNames.searchClear,\n styles[classNames.searchClear],\n )}\n >\n <RiCloseCircleLine />\n </Button>\n </SearchField>\n <SelectListBox options={options} />\n </Autocomplete>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAoCO,SAAS,aAAA,CAAc;AAAA,EAC5B,UAAA;AAAA,EACA,iBAAA,GAAoB,WAAA;AAAA,EACpB;AACF,CAAA,EAAuB;AACrB,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,UAAU,EAAE,WAAA,EAAa,QAAQ,CAAA;AACtD,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,QAAQ,CAAA;AAEzC,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA,uBAAO,GAAA,CAAC,iBAAc,OAAA,EAAkB,CAAA;AAAA,EAC1C;AAEA,EAAA,uBACE,IAAA,CAAC,YAAA,EAAA,EAAa,MAAA,EAAQ,QAAA,EACpB,QAAA,EAAA;AAAA,oBAAA,IAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAS,IAAA;AAAA,QACT,SAAA,EAAW,IAAA;AAAA,UACT,UAAA,CAAW,aAAA;AAAA,UACX,MAAA,CAAO,WAAW,aAAa;AAAA,SACjC;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAA,EAAa,iBAAA;AAAA,cACb,WAAW,IAAA,CAAK,UAAA,CAAW,QAAQ,MAAA,CAAO,UAAA,CAAW,MAAM,CAAC;AAAA;AAAA,WAC9D;AAAA,0BACA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,IAAA;AAAA,gBACT,UAAA,CAAW,WAAA;AAAA,gBACX,MAAA,CAAO,WAAW,WAAW;AAAA,eAC/B;AAAA,cAEA,8BAAC,iBAAA,EAAA,EAAkB;AAAA;AAAA;AACrB;AAAA;AAAA,KACF;AAAA,oBACA,GAAA,CAAC,iBAAc,OAAA,EAAkB;AAAA,GAAA,EACnC,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"SelectContent.esm.js","sources":["../../../src/components/Select/SelectContent.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 Input,\n SearchField,\n Autocomplete,\n Button,\n} from 'react-aria-components';\nimport { useFilter } from 'react-aria';\nimport { RiCloseCircleLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport { SelectDefinition } from './definition';\nimport { SelectListBox } from './SelectListBox';\nimport styles from './Select.module.css';\nimport type { Option } from './types';\n\ninterface SelectContentProps {\n searchable?: boolean;\n searchPlaceholder?: string;\n options?: Array<Option>;\n}\n\nexport function SelectContent({\n searchable,\n searchPlaceholder = 'Search...',\n options,\n}: SelectContentProps) {\n const { contains } = useFilter({ sensitivity: 'base' });\n const { classNames } = useStyles(SelectDefinition);\n\n if (!searchable) {\n return <SelectListBox options={options} />;\n }\n\n return (\n <Autocomplete filter={contains}>\n <SearchField\n autoFocus\n className={clsx(\n classNames.searchWrapper,\n styles[classNames.searchWrapper],\n )}\n >\n <Input\n placeholder={searchPlaceholder}\n className={clsx(classNames.search, styles[classNames.search])}\n />\n <Button\n className={clsx(\n classNames.searchClear,\n styles[classNames.searchClear],\n )}\n >\n <RiCloseCircleLine />\n </Button>\n </SearchField>\n <SelectListBox options={options} />\n </Autocomplete>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;AAqCO,SAAS,aAAA,CAAc;AAAA,EAC5B,UAAA;AAAA,EACA,iBAAA,GAAoB,WAAA;AAAA,EACpB;AACF,CAAA,EAAuB;AACrB,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,UAAU,EAAE,WAAA,EAAa,QAAQ,CAAA;AACtD,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,gBAAgB,CAAA;AAEjD,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA,uBAAO,GAAA,CAAC,iBAAc,OAAA,EAAkB,CAAA;AAAA,EAC1C;AAEA,EAAA,uBACE,IAAA,CAAC,YAAA,EAAA,EAAa,MAAA,EAAQ,QAAA,EACpB,QAAA,EAAA;AAAA,oBAAA,IAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAS,IAAA;AAAA,QACT,SAAA,EAAW,IAAA;AAAA,UACT,UAAA,CAAW,aAAA;AAAA,UACX,MAAA,CAAO,WAAW,aAAa;AAAA,SACjC;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAA,EAAa,iBAAA;AAAA,cACb,WAAW,IAAA,CAAK,UAAA,CAAW,QAAQ,MAAA,CAAO,UAAA,CAAW,MAAM,CAAC;AAAA;AAAA,WAC9D;AAAA,0BACA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,IAAA;AAAA,gBACT,UAAA,CAAW,WAAA;AAAA,gBACX,MAAA,CAAO,WAAW,WAAW;AAAA,eAC/B;AAAA,cAEA,8BAAC,iBAAA,EAAA,EAAkB;AAAA;AAAA;AACrB;AAAA;AAAA,KACF;AAAA,oBACA,GAAA,CAAC,iBAAc,OAAA,EAAkB;AAAA,GAAA,EACnC,CAAA;AAEJ;;;;"}
@@ -3,14 +3,15 @@ import { ListBox, ListBoxItem, Text } from 'react-aria-components';
3
3
  import { RiCheckLine } from '@remixicon/react';
4
4
  import clsx from 'clsx';
5
5
  import { useStyles } from '../../hooks/useStyles.esm.js';
6
+ import { SelectDefinition } from './definition.esm.js';
6
7
  import styles from './Select.module.css.esm.js';
7
8
 
8
9
  const NoResults = () => {
9
- const { classNames } = useStyles("Select");
10
+ const { classNames } = useStyles(SelectDefinition);
10
11
  return /* @__PURE__ */ jsx("div", { className: clsx(classNames.noResults, styles[classNames.noResults]), children: "No results found." });
11
12
  };
12
13
  function SelectListBox({ options, ...props }) {
13
- const { classNames } = useStyles("Select", props);
14
+ const { classNames } = useStyles(SelectDefinition, props);
14
15
  return /* @__PURE__ */ jsx(
15
16
  ListBox,
16
17
  {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectListBox.esm.js","sources":["../../../src/components/Select/SelectListBox.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 { ListBox, ListBoxItem, Text } from 'react-aria-components';\nimport { RiCheckLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Select.module.css';\nimport type { Option } from './types';\n\ninterface SelectListBoxProps {\n options?: Array<Option>;\n}\n\nconst NoResults = () => {\n const { classNames } = useStyles('Select');\n\n return (\n <div className={clsx(classNames.noResults, styles[classNames.noResults])}>\n No results found.\n </div>\n );\n};\n\nexport function SelectListBox({ options, ...props }: SelectListBoxProps) {\n const { classNames } = useStyles('Select', props);\n return (\n <ListBox\n className={clsx(classNames.list, styles[classNames.list])}\n renderEmptyState={() => <NoResults />}\n >\n {options?.map(option => (\n <ListBoxItem\n key={option.value}\n id={option.value}\n textValue={option.label}\n className={clsx(classNames.item, styles[classNames.item])}\n isDisabled={option.disabled}\n >\n <div\n className={clsx(\n classNames.itemIndicator,\n styles[classNames.itemIndicator],\n )}\n >\n <RiCheckLine />\n </div>\n <Text\n slot=\"label\"\n className={clsx(classNames.itemLabel, styles[classNames.itemLabel])}\n >\n {option.label}\n </Text>\n </ListBoxItem>\n ))}\n </ListBox>\n );\n}\n"],"names":[],"mappings":";;;;;;;AA2BA,MAAM,YAAY,MAAM;AACtB,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,QAAQ,CAAA;AAEzC,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,SAAA,EAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC,CAAA,EAAG,QAAA,EAAA,mBAAA,EAE1E,CAAA;AAEJ,CAAA;AAEO,SAAS,aAAA,CAAc,EAAE,OAAA,EAAS,GAAG,OAAM,EAAuB;AACvE,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,UAAU,KAAK,CAAA;AAChD,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,MACxD,gBAAA,EAAkB,sBAAM,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA;AAAA,MAElC,QAAA,EAAA,OAAA,EAAS,IAAI,CAAA,MAAA,qBACZ,IAAA;AAAA,QAAC,WAAA;AAAA,QAAA;AAAA,UAEC,IAAI,MAAA,CAAO,KAAA;AAAA,UACX,WAAW,MAAA,CAAO,KAAA;AAAA,UAClB,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,UACxD,YAAY,MAAA,CAAO,QAAA;AAAA,UAEnB,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,aAAA;AAAA,kBACX,MAAA,CAAO,WAAW,aAAa;AAAA,iBACjC;AAAA,gBAEA,8BAAC,WAAA,EAAA,EAAY;AAAA;AAAA,aACf;AAAA,4BACA,GAAA;AAAA,cAAC,IAAA;AAAA,cAAA;AAAA,gBACC,IAAA,EAAK,OAAA;AAAA,gBACL,WAAW,IAAA,CAAK,UAAA,CAAW,WAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC,CAAA;AAAA,gBAEjE,QAAA,EAAA,MAAA,CAAO;AAAA;AAAA;AACV;AAAA,SAAA;AAAA,QAnBK,MAAA,CAAO;AAAA,OAqBf;AAAA;AAAA,GACH;AAEJ;;;;"}
1
+ {"version":3,"file":"SelectListBox.esm.js","sources":["../../../src/components/Select/SelectListBox.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 { ListBox, ListBoxItem, Text } from 'react-aria-components';\nimport { RiCheckLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport { SelectDefinition } from './definition';\nimport styles from './Select.module.css';\nimport type { Option } from './types';\n\ninterface SelectListBoxProps {\n options?: Array<Option>;\n}\n\nconst NoResults = () => {\n const { classNames } = useStyles(SelectDefinition);\n\n return (\n <div className={clsx(classNames.noResults, styles[classNames.noResults])}>\n No results found.\n </div>\n );\n};\n\nexport function SelectListBox({ options, ...props }: SelectListBoxProps) {\n const { classNames } = useStyles(SelectDefinition, props);\n return (\n <ListBox\n className={clsx(classNames.list, styles[classNames.list])}\n renderEmptyState={() => <NoResults />}\n >\n {options?.map(option => (\n <ListBoxItem\n key={option.value}\n id={option.value}\n textValue={option.label}\n className={clsx(classNames.item, styles[classNames.item])}\n isDisabled={option.disabled}\n >\n <div\n className={clsx(\n classNames.itemIndicator,\n styles[classNames.itemIndicator],\n )}\n >\n <RiCheckLine />\n </div>\n <Text\n slot=\"label\"\n className={clsx(classNames.itemLabel, styles[classNames.itemLabel])}\n >\n {option.label}\n </Text>\n </ListBoxItem>\n ))}\n </ListBox>\n );\n}\n"],"names":[],"mappings":";;;;;;;;AA4BA,MAAM,YAAY,MAAM;AACtB,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,gBAAgB,CAAA;AAEjD,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,SAAA,EAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC,CAAA,EAAG,QAAA,EAAA,mBAAA,EAE1E,CAAA;AAEJ,CAAA;AAEO,SAAS,aAAA,CAAc,EAAE,OAAA,EAAS,GAAG,OAAM,EAAuB;AACvE,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,kBAAkB,KAAK,CAAA;AACxD,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,MACxD,gBAAA,EAAkB,sBAAM,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA;AAAA,MAElC,QAAA,EAAA,OAAA,EAAS,IAAI,CAAA,MAAA,qBACZ,IAAA;AAAA,QAAC,WAAA;AAAA,QAAA;AAAA,UAEC,IAAI,MAAA,CAAO,KAAA;AAAA,UACX,WAAW,MAAA,CAAO,KAAA;AAAA,UAClB,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,UACxD,YAAY,MAAA,CAAO,QAAA;AAAA,UAEnB,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,aAAA;AAAA,kBACX,MAAA,CAAO,WAAW,aAAa;AAAA,iBACjC;AAAA,gBAEA,8BAAC,WAAA,EAAA,EAAY;AAAA;AAAA,aACf;AAAA,4BACA,GAAA;AAAA,cAAC,IAAA;AAAA,cAAA;AAAA,gBACC,IAAA,EAAK,OAAA;AAAA,gBACL,WAAW,IAAA,CAAK,UAAA,CAAW,WAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC,CAAA;AAAA,gBAEjE,QAAA,EAAA,MAAA,CAAO;AAAA;AAAA;AACV;AAAA,SAAA;AAAA,QAnBK,MAAA,CAAO;AAAA,OAqBf;AAAA;AAAA,GACH;AAEJ;;;;"}
@@ -3,10 +3,11 @@ import { Button, SelectValue } from 'react-aria-components';
3
3
  import { RiArrowDownSLine } from '@remixicon/react';
4
4
  import clsx from 'clsx';
5
5
  import { useStyles } from '../../hooks/useStyles.esm.js';
6
+ import { SelectDefinition } from './definition.esm.js';
6
7
  import styles from './Select.module.css.esm.js';
7
8
 
8
9
  function SelectTrigger({ icon }) {
9
- const { classNames } = useStyles("Select");
10
+ const { classNames } = useStyles(SelectDefinition);
10
11
  return /* @__PURE__ */ jsxs(Button, { className: clsx(classNames.trigger, styles[classNames.trigger]), children: [
11
12
  icon,
12
13
  /* @__PURE__ */ jsx(
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTrigger.esm.js","sources":["../../../src/components/Select/SelectTrigger.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 { ReactNode } from 'react';\nimport { Button, SelectValue } from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Select.module.css';\n\ninterface SelectTriggerProps {\n icon?: ReactNode;\n}\n\nexport function SelectTrigger({ icon }: SelectTriggerProps) {\n const { classNames } = useStyles('Select');\n\n return (\n <Button className={clsx(classNames.trigger, styles[classNames.trigger])}>\n {icon}\n <SelectValue\n className={clsx(classNames.value, styles[classNames.value])}\n />\n <div className={clsx(classNames.chevron, styles[classNames.chevron])}>\n <RiArrowDownSLine aria-hidden=\"true\" />\n </div>\n </Button>\n );\n}\n"],"names":[],"mappings":";;;;;;;AA2BO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAK,EAAuB;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,QAAQ,CAAA;AAEzC,EAAA,uBACE,IAAA,CAAC,MAAA,EAAA,EAAO,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,SAAS,MAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA,EACnE,QAAA,EAAA;AAAA,IAAA,IAAA;AAAA,oBACD,GAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAA,CAAK,UAAA,CAAW,OAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC;AAAA;AAAA,KAC5D;AAAA,oBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,IAAA,CAAK,WAAW,OAAA,EAAS,MAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA,EACjE,QAAA,kBAAA,GAAA,CAAC,gBAAA,EAAA,EAAiB,aAAA,EAAY,QAAO,CAAA,EACvC;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"SelectTrigger.esm.js","sources":["../../../src/components/Select/SelectTrigger.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 { ReactNode } from 'react';\nimport { Button, SelectValue } from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport { SelectDefinition } from './definition';\nimport styles from './Select.module.css';\n\ninterface SelectTriggerProps {\n icon?: ReactNode;\n}\n\nexport function SelectTrigger({ icon }: SelectTriggerProps) {\n const { classNames } = useStyles(SelectDefinition);\n\n return (\n <Button className={clsx(classNames.trigger, styles[classNames.trigger])}>\n {icon}\n <SelectValue\n className={clsx(classNames.value, styles[classNames.value])}\n />\n <div className={clsx(classNames.chevron, styles[classNames.chevron])}>\n <RiArrowDownSLine aria-hidden=\"true\" />\n </div>\n </Button>\n );\n}\n"],"names":[],"mappings":";;;;;;;;AA4BO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAK,EAAuB;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,gBAAgB,CAAA;AAEjD,EAAA,uBACE,IAAA,CAAC,MAAA,EAAA,EAAO,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,SAAS,MAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA,EACnE,QAAA,EAAA;AAAA,IAAA,IAAA;AAAA,oBACD,GAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAA,CAAK,UAAA,CAAW,OAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC;AAAA;AAAA,KAC5D;AAAA,oBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,IAAA,CAAK,WAAW,OAAA,EAAS,MAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA,EACjE,QAAA,kBAAA,GAAA,CAAC,gBAAA,EAAA,EAAiB,aAAA,EAAY,QAAO,CAAA,EACvC;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -0,0 +1,23 @@
1
+ const SelectDefinition = {
2
+ classNames: {
3
+ root: "bui-Select",
4
+ popover: "bui-SelectPopover",
5
+ trigger: "bui-SelectTrigger",
6
+ chevron: "bui-SelectTriggerChevron",
7
+ value: "bui-SelectValue",
8
+ list: "bui-SelectList",
9
+ item: "bui-SelectItem",
10
+ itemIndicator: "bui-SelectItemIndicator",
11
+ itemLabel: "bui-SelectItemLabel",
12
+ searchWrapper: "bui-SelectSearchWrapper",
13
+ search: "bui-SelectSearch",
14
+ searchClear: "bui-SelectSearchClear",
15
+ noResults: "bui-SelectNoResults"
16
+ },
17
+ dataAttributes: {
18
+ size: ["small", "medium"]
19
+ }
20
+ };
21
+
22
+ export { SelectDefinition };
23
+ //# sourceMappingURL=definition.esm.js.map
@@ -0,0 +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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Select\n * @public\n */\nexport const SelectDefinition = {\n classNames: {\n root: 'bui-Select',\n popover: 'bui-SelectPopover',\n trigger: 'bui-SelectTrigger',\n chevron: 'bui-SelectTriggerChevron',\n value: 'bui-SelectValue',\n list: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n searchWrapper: 'bui-SelectSearchWrapper',\n search: 'bui-SelectSearch',\n searchClear: 'bui-SelectSearchClear',\n noResults: 'bui-SelectNoResults',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,gBAAA,GAAmB;AAAA,EAC9B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,OAAA,EAAS,mBAAA;AAAA,IACT,OAAA,EAAS,0BAAA;AAAA,IACT,KAAA,EAAO,iBAAA;AAAA,IACP,IAAA,EAAM,gBAAA;AAAA,IACN,IAAA,EAAM,gBAAA;AAAA,IACN,aAAA,EAAe,yBAAA;AAAA,IACf,SAAA,EAAW,qBAAA;AAAA,IACX,aAAA,EAAe,yBAAA;AAAA,IACf,MAAA,EAAQ,kBAAA;AAAA,IACR,WAAA,EAAa,uBAAA;AAAA,IACb,SAAA,EAAW;AAAA,GACb;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,CAAC,OAAA,EAAS,QAAQ;AAAA;AAE5B;;;;"}
@@ -1,10 +1,11 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useStyles } from '../../hooks/useStyles.esm.js';
3
+ import { SkeletonDefinition } from './definition.esm.js';
3
4
  import styles from './Skeleton.module.css.esm.js';
4
5
  import clsx from 'clsx';
5
6
 
6
7
  const Skeleton = (props) => {
7
- const { classNames, cleanedProps } = useStyles("Skeleton", {
8
+ const { classNames, cleanedProps } = useStyles(SkeletonDefinition, {
8
9
  width: 80,
9
10
  height: 24,
10
11
  rounded: false,
@@ -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 { useStyles } from '../../hooks/useStyles';\nimport { SkeletonProps } from './types';\nimport styles from './Skeleton.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Skeleton = (props: SkeletonProps) => {\n const { classNames, cleanedProps } = useStyles('Skeleton', {\n width: 80,\n height: 24,\n rounded: false,\n ...props,\n });\n const { className, width, height, rounded, style, ...rest } = cleanedProps;\n\n return (\n <div\n className={clsx(classNames.root, styles[classNames.root], className)}\n data-rounded={rounded}\n style={{\n width,\n height,\n ...style,\n }}\n {...rest}\n />\n );\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAyB;AAChD,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,UAAU,UAAA,EAAY;AAAA,IACzD,KAAA,EAAO,EAAA;AAAA,IACP,MAAA,EAAQ,EAAA;AAAA,IACR,OAAA,EAAS,KAAA;AAAA,IACT,GAAG;AAAA,GACJ,CAAA;AACD,EAAA,MAAM,EAAE,WAAW,KAAA,EAAO,MAAA,EAAQ,SAAS,KAAA,EAAO,GAAG,MAAK,GAAI,YAAA;AAE9D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MACnE,cAAA,EAAc,OAAA;AAAA,MACd,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 { useStyles } from '../../hooks/useStyles';\nimport { SkeletonDefinition } from './definition';\nimport { SkeletonProps } from './types';\nimport styles from './Skeleton.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Skeleton = (props: SkeletonProps) => {\n const { classNames, cleanedProps } = useStyles(SkeletonDefinition, {\n width: 80,\n height: 24,\n rounded: false,\n ...props,\n });\n const { className, width, height, rounded, style, ...rest } = cleanedProps;\n\n return (\n <div\n className={clsx(classNames.root, styles[classNames.root], className)}\n data-rounded={rounded}\n style={{\n width,\n height,\n ...style,\n }}\n {...rest}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAyB;AAChD,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,UAAU,kBAAA,EAAoB;AAAA,IACjE,KAAA,EAAO,EAAA;AAAA,IACP,MAAA,EAAQ,EAAA;AAAA,IACR,OAAA,EAAS,KAAA;AAAA,IACT,GAAG;AAAA,GACJ,CAAA;AACD,EAAA,MAAM,EAAE,WAAW,KAAA,EAAO,MAAA,EAAQ,SAAS,KAAA,EAAO,GAAG,MAAK,GAAI,YAAA;AAE9D,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MACnE,cAAA,EAAc,OAAA;AAAA,MACd,KAAA,EAAO;AAAA,QACL,KAAA;AAAA,QACA,MAAA;AAAA,QACA,GAAG;AAAA,OACL;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
@@ -0,0 +1,8 @@
1
+ const SkeletonDefinition = {
2
+ classNames: {
3
+ root: "bui-Skeleton"
4
+ }
5
+ };
6
+
7
+ export { SkeletonDefinition };
8
+ //# sourceMappingURL=definition.esm.js.map
@@ -0,0 +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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Skeleton\n * @public\n */\nexport const SkeletonDefinition = {\n classNames: {\n root: 'bui-Skeleton',\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,kBAAA,GAAqB;AAAA,EAChC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA;AAEV;;;;"}
@@ -2,12 +2,13 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
3
  import { Switch as Switch$1 } from 'react-aria-components';
4
4
  import { useStyles } from '../../hooks/useStyles.esm.js';
5
+ import { SwitchDefinition } from './definition.esm.js';
5
6
  import styles from './Switch.module.css.esm.js';
6
7
  import clsx from 'clsx';
7
8
 
8
9
  const Switch = forwardRef(
9
10
  (props, ref) => {
10
- const { classNames, cleanedProps } = useStyles("Switch", props);
11
+ const { classNames, cleanedProps } = useStyles(SwitchDefinition, props);
11
12
  const { className, label, ...rest } = cleanedProps;
12
13
  return /* @__PURE__ */ jsxs(
13
14
  Switch$1,
@@ -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 { useStyles } from '../../hooks/useStyles';\nimport styles from './Switch.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const { classNames, cleanedProps } = useStyles('Switch', props);\n const { className, label, ...rest } = cleanedProps;\n\n return (\n <AriaSwitch\n className={clsx(classNames.root, styles[classNames.root], className)}\n ref={ref}\n {...rest}\n >\n <div\n className={clsx(classNames.indicator, styles[classNames.indicator])}\n />\n {label}\n </AriaSwitch>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\n"],"names":["AriaSwitch"],"mappings":";;;;;;;AAwBO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,UAAU,KAAK,CAAA;AAC9D,IAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,GAAG,MAAK,GAAI,YAAA;AAEtC,IAAA,uBACE,IAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QACnE,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,IAAA,CAAK,UAAA,CAAW,WAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC;AAAA;AAAA,WACpE;AAAA,UACC;AAAA;AAAA;AAAA,KACH;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 { useStyles } from '../../hooks/useStyles';\nimport { SwitchDefinition } from './definition';\nimport styles from './Switch.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const { classNames, cleanedProps } = useStyles(SwitchDefinition, props);\n const { className, label, ...rest } = cleanedProps;\n\n return (\n <AriaSwitch\n className={clsx(classNames.root, styles[classNames.root], className)}\n ref={ref}\n {...rest}\n >\n <div\n className={clsx(classNames.indicator, styles[classNames.indicator])}\n />\n {label}\n </AriaSwitch>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\n"],"names":["AriaSwitch"],"mappings":";;;;;;;;AAyBO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,kBAAkB,KAAK,CAAA;AACtE,IAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,GAAG,MAAK,GAAI,YAAA;AAEtC,IAAA,uBACE,IAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QACnE,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,IAAA,CAAK,UAAA,CAAW,WAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC;AAAA;AAAA,WACpE;AAAA,UACC;AAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -0,0 +1,9 @@
1
+ const SwitchDefinition = {
2
+ classNames: {
3
+ root: "bui-Switch",
4
+ indicator: "bui-SwitchIndicator"
5
+ }
6
+ };
7
+
8
+ export { SwitchDefinition };
9
+ //# sourceMappingURL=definition.esm.js.map
@@ -0,0 +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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Switch\n * @public\n */\nexport const SwitchDefinition = {\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,gBAAA,GAAmB;AAAA,EAC9B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,SAAA,EAAW;AAAA;AAEf;;;;"}
@@ -4,10 +4,11 @@ import { Text } from '../../Text/Text.esm.js';
4
4
  import { Link } from '../../Link/Link.esm.js';
5
5
  import { Cell as Cell$1 } from 'react-aria-components';
6
6
  import { useStyles } from '../../../hooks/useStyles.esm.js';
7
+ import { TableDefinition } from '../definition.esm.js';
7
8
  import styles from '../Table.module.css.esm.js';
8
9
 
9
10
  const Cell = (props) => {
10
- const { classNames, cleanedProps } = useStyles("Table", {
11
+ const { classNames, cleanedProps } = useStyles(TableDefinition, {
11
12
  color: "primary",
12
13
  ...props
13
14
  });
@@ -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 clsx from 'clsx';\nimport { Text } from '../../Text';\nimport { Link } from '../../Link';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport type { CellProps } from '../types';\nimport { useStyles } from '../../../hooks/useStyles';\nimport styles from '../Table.module.css';\n\n/** @public */\nconst Cell = (props: CellProps) => {\n const { classNames, cleanedProps } = useStyles<'Table', CellProps>('Table', {\n color: 'primary',\n ...props,\n });\n const { className, title, description, color, leadingIcon, href, ...rest } =\n cleanedProps;\n\n return (\n <ReactAriaCell\n className={clsx(classNames.cell, styles[classNames.cell], className)}\n {...rest}\n >\n <div\n className={clsx(\n classNames.cellContentWrapper,\n styles[classNames.cellContentWrapper],\n )}\n >\n {leadingIcon && (\n <div\n className={clsx(classNames.cellIcon, styles[classNames.cellIcon])}\n >\n {leadingIcon}\n </div>\n )}\n <div\n className={clsx(\n classNames.cellContent,\n styles[classNames.cellContent],\n )}\n >\n {href ? (\n <Link href={href} variant=\"body-medium\" color={color}>\n {title}\n </Link>\n ) : (\n <Text as=\"p\" variant=\"body-medium\" color={color}>\n {title}\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\nCell.displayName = 'Cell';\n\nexport { Cell };\n"],"names":["ReactAriaCell"],"mappings":";;;;;;;;AAyBA,MAAM,IAAA,GAAO,CAAC,KAAA,KAAqB;AACjC,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,UAA8B,OAAA,EAAS;AAAA,IAC1E,KAAA,EAAO,SAAA;AAAA,IACP,GAAG;AAAA,GACJ,CAAA;AACD,EAAA,MAAM,EAAE,WAAW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;AAEJ;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 clsx from 'clsx';\nimport { Text } from '../../Text';\nimport { Link } from '../../Link';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport type { CellProps } from '../types';\nimport { useStyles } from '../../../hooks/useStyles';\nimport { TableDefinition } from '../definition';\nimport styles from '../Table.module.css';\n\n/** @public */\nconst Cell = (props: CellProps) => {\n const { classNames, cleanedProps } = useStyles(TableDefinition, {\n color: 'primary' as const,\n ...props,\n });\n const { className, title, description, color, leadingIcon, href, ...rest } =\n cleanedProps;\n\n return (\n <ReactAriaCell\n className={clsx(classNames.cell, styles[classNames.cell], className)}\n {...rest}\n >\n <div\n className={clsx(\n classNames.cellContentWrapper,\n styles[classNames.cellContentWrapper],\n )}\n >\n {leadingIcon && (\n <div\n className={clsx(classNames.cellIcon, styles[classNames.cellIcon])}\n >\n {leadingIcon}\n </div>\n )}\n <div\n className={clsx(\n classNames.cellContent,\n styles[classNames.cellContent],\n )}\n >\n {href ? (\n <Link href={href} variant=\"body-medium\" color={color}>\n {title}\n </Link>\n ) : (\n <Text as=\"p\" variant=\"body-medium\" color={color}>\n {title}\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\nCell.displayName = 'Cell';\n\nexport { Cell };\n"],"names":["ReactA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G,GAAA,EAAI,OAAA,EAAQ,aAAA,EAAc,OAChC,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,kBAED,+BACC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAQ,aAAA,EAAc,KAAA,EAAM,aAC/B,QAAA,EAAA,WAAA,EACH;AAAA;AAAA;AAAA;AAEJ;AAAA;AAAA;AACF;AAAA,GACF;AAEJ;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
@@ -4,17 +4,15 @@ import { Text } from '../../Text/Text.esm.js';
4
4
  import { Link } from '../../Link/Link.esm.js';
5
5
  import { Avatar } from '../../Avatar/Avatar.esm.js';
6
6
  import { useStyles } from '../../../hooks/useStyles.esm.js';
7
+ import { TableDefinition } from '../definition.esm.js';
7
8
  import { Cell } from 'react-aria-components';
8
9
  import styles from '../Table.module.css.esm.js';
9
10
 
10
11
  const CellProfile = (props) => {
11
- const { classNames, cleanedProps } = useStyles(
12
- "Table",
13
- {
14
- color: "primary",
15
- ...props
16
- }
17
- );
12
+ const { classNames, cleanedProps } = useStyles(TableDefinition, {
13
+ color: "primary",
14
+ ...props
15
+ });
18
16
  const { className, src, name, href, description, color, ...rest } = cleanedProps;
19
17
  return /* @__PURE__ */ jsx(
20
18
  Cell,
@@ -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 clsx from 'clsx';\nimport { CellProfileProps } from '../types';\nimport { Text } from '../../Text/Text';\nimport { Link } from '../../Link/Link';\nimport { Avatar } from '../../Avatar';\nimport { useStyles } from '../../../hooks/useStyles';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport styles from '../Table.module.css';\n\n/** @public */\nexport const CellProfile = (props: CellProfileProps) => {\n const { classNames, cleanedProps } = useStyles<'Table', CellProfileProps>(\n 'Table',\n {\n color: 'primary',\n ...props,\n },\n );\n const { className, src, name, href, description, color, ...rest } =\n cleanedProps;\n\n return (\n <ReactAriaCell\n className={clsx(classNames.cell, styles[classNames.cell], className)}\n {...rest}\n >\n <div\n className={clsx(\n classNames.cellContentWrapper,\n styles[classNames.cellContentWrapper],\n )}\n >\n {src && name && (\n <Avatar src={src} name={name} size=\"x-small\" purpose=\"decoration\" />\n )}\n <div\n className={clsx(\n classNames.cellContent,\n styles[classNames.cellContent],\n )}\n >\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":";;;;;;;;;AA0BO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA4B;AACtD,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA;AAAA,IACnC,OAAA;AAAA,IACA;AAAA,MACE,KAAA,EAAO,SAAA;AAAA,MACP,GAAG;AAAA;AACL,GACF;AACA,EAAA,MAAM,EAAE,WAAW,GAAA,EAAK,IAAA,EAAM,MAAM,WAAA,EAAa,KAAA,EAAO,GAAG,IAAA,EAAK,GAC9D,YAAA;AAEF,EAAA,uBACE,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MAClE,GAAG,IAAA;AAAA,MAEJ,QAAA,kBAAA,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,IAAA;AAAA,YACT,UAAA,CAAW,kBAAA;AAAA,YACX,MAAA,CAAO,WAAW,kBAAkB;AAAA,WACtC;AAAA,UAEC,QAAA,EAAA;AAAA,YAAA,GAAA,IAAO,IAAA,wBACL,MAAA,EAAA,EAAO,GAAA,EAAU,MAAY,IAAA,EAAK,SAAA,EAAU,SAAQ,YAAA,EAAa,CAAA;AAAA,4BAEpE,IAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,WAAA;AAAA,kBACX,MAAA,CAAO,WAAW,WAAW;AAAA,iBAC/B;AAAA,gBAEC,QAAA,EAAA;AAAA,kBAAA,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,kBAED,+BACC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAQ,aAAA,EAAc,KAAA,EAAM,aAC/B,QAAA,EAAA,WAAA,EACH;AAAA;AAAA;AAAA;AAEJ;AAAA;AAAA;AACF;AAAA,GACF;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 clsx from 'clsx';\nimport { CellProfileProps } from '../types';\nimport { Text } from '../../Text/Text';\nimport { Link } from '../../Link/Link';\nimport { Avatar } from '../../Avatar';\nimport { useStyles } from '../../../hooks/useStyles';\nimport { TableDefinition } from '../definition';\nimport { Cell as ReactAriaCell } from 'react-aria-components';\nimport styles from '../Table.module.css';\n\n/** @public */\nexport const CellProfile = (props: CellProfileProps) => {\n const { classNames, cleanedProps } = useStyles(TableDefinition, {\n color: 'primary' as const,\n ...props,\n });\n const { className, src, name, href, description, color, ...rest } =\n cleanedProps;\n\n return (\n <ReactAriaCell\n className={clsx(classNames.cell, styles[classNames.cell], className)}\n {...rest}\n >\n <div\n className={clsx(\n classNames.cellContentWrapper,\n styles[classNames.cellContentWrapper],\n )}\n >\n {src && name && (\n <Avatar src={src} name={name} size=\"x-small\" purpose=\"decoration\" />\n )}\n <div\n className={clsx(\n classNames.cellContent,\n styles[classNames.cellContent],\n )}\n >\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":";;;;;;;;;;AA2BO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA4B;AACtD,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,UAAU,eAAA,EAAiB;AAAA,IAC9D,KAAA,EAAO,SAAA;AAAA,IACP,GAAG;AAAA,GACJ,CAAA;AACD,EAAA,MAAM,EAAE,WAAW,GAAA,EAAK,IAAA,EAAM,MAAM,WAAA,EAAa,KAAA,EAAO,GAAG,IAAA,EAAK,GAC9D,YAAA;AAEF,EAAA,uBACE,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MAClE,GAAG,IAAA;AAAA,MAEJ,QAAA,kBAAA,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,IAAA;AAAA,YACT,UAAA,CAAW,kBAAA;AAAA,YACX,MAAA,CAAO,WAAW,kBAAkB;AAAA,WACtC;AAAA,UAEC,QAAA,EAAA;AAAA,YAAA,GAAA,IAAO,IAAA,wBACL,MAAA,EAAA,EAAO,GAAA,EAAU,MAAY,IAAA,EAAK,SAAA,EAAU,SAAQ,YAAA,EAAa,CAAA;AAAA,4BAEpE,IAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,WAAA;AAAA,kBACX,MAAA,CAAO,WAAW,WAAW;AAAA,iBAC/B;AAAA,gBAEC,QAAA,EAAA;AAAA,kBAAA,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,kBAED,+BACC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAQ,aAAA,EAAc,KAAA,EAAM,aAC/B,QAAA,EAAA,WAAA,EACH;AAAA;AAAA;AAAA;AAEJ;AAAA;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
@@ -1,15 +1,13 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Column as Column$1 } from 'react-aria-components';
3
3
  import { useStyles } from '../../../hooks/useStyles.esm.js';
4
+ import { TableDefinition } from '../definition.esm.js';
4
5
  import styles from '../Table.module.css.esm.js';
5
6
  import clsx from 'clsx';
6
7
  import { RiArrowUpLine, RiArrowDownLine } from '@remixicon/react';
7
8
 
8
9
  const Column = (props) => {
9
- const { classNames, cleanedProps } = useStyles(
10
- "Table",
11
- props
12
- );
10
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
13
11
  const { children, ...rest } = cleanedProps;
14
12
  return /* @__PURE__ */ jsx(
15
13
  Column$1,
@@ -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 { useStyles } from '../../../hooks/useStyles';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\nimport { ColumnProps } from '../types';\nimport { RiArrowUpLine, RiArrowDownLine } from '@remixicon/react';\n\n/** @public */\nexport const Column = (props: ColumnProps) => {\n const { classNames, cleanedProps } = useStyles<'Table', ColumnProps>(\n 'Table',\n props,\n );\n const { children, ...rest } = cleanedProps;\n\n return (\n <ReactAriaColumn\n className={clsx(classNames.head, styles[classNames.head])}\n {...rest}\n >\n {({ allowsSorting, sortDirection }) => (\n <div\n className={clsx(\n classNames.headContent,\n styles[classNames.headContent],\n )}\n >\n {children}\n {allowsSorting && (\n <span\n aria-hidden=\"true\"\n className={clsx(\n classNames.headSortButton,\n styles[classNames.headSortButton],\n )}\n >\n {sortDirection === 'ascending' ? (\n <RiArrowUpLine size={16} />\n ) : (\n <RiArrowDownLine size={16} />\n )}\n </span>\n )}\n </div>\n )}\n </ReactAriaColumn>\n );\n};\n"],"names":["ReactAriaColumn"],"mappings":";;;;;;;AAwBO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA;AAAA,IACnC,OAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,IAAA,EAAK,GAAI,YAAA;AAE9B,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,MACvD,GAAG,IAAA;AAAA,MAEH,QAAA,EAAA,CAAC,EAAE,aAAA,EAAe,aAAA,EAAc,qBAC/B,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,IAAA;AAAA,YACT,UAAA,CAAW,WAAA;AAAA,YACX,MAAA,CAAO,WAAW,WAAW;AAAA,WAC/B;AAAA,UAEC,QAAA,EAAA;AAAA,YAAA,QAAA;AAAA,YACA,aAAA,oBACC,GAAA;AAAA,cAAC,MAAA;AAAA,cAAA;AAAA,gBACC,aAAA,EAAY,MAAA;AAAA,gBACZ,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,cAAA;AAAA,kBACX,MAAA,CAAO,WAAW,cAAc;AAAA,iBAClC;AAAA,gBAEC,QAAA,EAAA,aAAA,KAAkB,WAAA,mBACjB,GAAA,CAAC,aAAA,EAAA,EAAc,IAAA,EAAM,IAAI,CAAA,mBAEzB,GAAA,CAAC,eAAA,EAAA,EAAgB,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA;AAE/B;AAAA;AAAA;AAEJ;AAAA,GAEJ;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 { useStyles } from '../../../hooks/useStyles';\nimport { TableDefinition } from '../definition';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\nimport { ColumnProps } from '../types';\nimport { RiArrowUpLine, RiArrowDownLine } from '@remixicon/react';\n\n/** @public */\nexport const Column = (props: ColumnProps) => {\n const { classNames, cleanedProps } = useStyles(TableDefinition, props);\n const { children, ...rest } = cleanedProps;\n\n return (\n <ReactAriaColumn\n className={clsx(classNames.head, styles[classNames.head])}\n {...rest}\n >\n {({ allowsSorting, sortDirection }) => (\n <div\n className={clsx(\n classNames.headContent,\n styles[classNames.headContent],\n )}\n >\n {children}\n {allowsSorting && (\n <span\n aria-hidden=\"true\"\n className={clsx(\n classNames.headSortButton,\n styles[classNames.headSortButton],\n )}\n >\n {sortDirection === 'ascending' ? (\n <RiArrowUpLine size={16} />\n ) : (\n <RiArrowDownLine size={16} />\n )}\n </span>\n )}\n </div>\n )}\n </ReactAriaColumn>\n );\n};\n"],"names":["ReactAriaColumn"],"mappings":";;;;;;;;AAyBO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,iBAAiB,KAAK,CAAA;AACrE,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,IAAA,EAAK,GAAI,YAAA;AAE9B,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,MACvD,GAAG,IAAA;AAAA,MAEH,QAAA,EAAA,CAAC,EAAE,aAAA,EAAe,aAAA,EAAc,qBAC/B,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,IAAA;AAAA,YACT,UAAA,CAAW,WAAA;AAAA,YACX,MAAA,CAAO,WAAW,WAAW;AAAA,WAC/B;AAAA,UAEC,QAAA,EAAA;AAAA,YAAA,QAAA;AAAA,YACA,aAAA,oBACC,GAAA;AAAA,cAAC,MAAA;AAAA,cAAA;AAAA,gBACC,aAAA,EAAY,MAAA;AAAA,gBACZ,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,cAAA;AAAA,kBACX,MAAA,CAAO,WAAW,cAAc;AAAA,iBAClC;AAAA,gBAEC,QAAA,EAAA,aAAA,KAAkB,WAAA,mBACjB,GAAA,CAAC,aAAA,EAAA,EAAc,IAAA,EAAM,IAAI,CAAA,mBAEzB,GAAA,CAAC,eAAA,EAAA,EAAgB,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA;AAE/B;AAAA;AAAA;AAEJ;AAAA,GAEJ;AAEJ;;;;"}
@@ -1,16 +1,14 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useTableOptions, Row as Row$1, RouterProvider, Cell, Checkbox, Collection } from 'react-aria-components';
3
3
  import { useStyles } from '../../../hooks/useStyles.esm.js';
4
+ import { TableDefinition } from '../definition.esm.js';
4
5
  import { useNavigate, useHref } from 'react-router-dom';
5
6
  import { isExternalLink } from '../../../utils/isExternalLink.esm.js';
6
7
  import styles from '../Table.module.css.esm.js';
7
8
  import clsx from 'clsx';
8
9
 
9
10
  function Row(props) {
10
- const { classNames, cleanedProps } = useStyles(
11
- "Table",
12
- props
13
- );
11
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
14
12
  const { id, columns, children, href, ...rest } = cleanedProps;
15
13
  const navigate = useNavigate();
16
14
  const isExternal = isExternalLink(href);
@@ -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 RowProps,\n useTableOptions,\n Cell,\n Collection,\n Checkbox,\n RouterProvider,\n} from 'react-aria-components';\nimport { useStyles } from '../../../hooks/useStyles';\nimport { useNavigate } from 'react-router-dom';\nimport { useHref } from 'react-router-dom';\nimport { isExternalLink } from '../../../utils/isExternalLink';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport function Row<T extends object>(props: RowProps<T>) {\n const { classNames, cleanedProps } = useStyles<'Table', RowProps<T>>(\n 'Table',\n props,\n );\n const { id, columns, children, href, ...rest } = cleanedProps;\n const navigate = useNavigate();\n const isExternal = isExternalLink(href);\n\n let { selectionBehavior } = useTableOptions();\n\n const content = (\n <>\n {selectionBehavior === 'toggle' && (\n <Cell>\n <Checkbox slot=\"selection\" />\n </Cell>\n )}\n <Collection items={columns}>{children}</Collection>\n </>\n );\n\n if (isExternal) {\n return (\n <ReactAriaRow\n id={id}\n href={href}\n className={clsx(classNames.row, styles[classNames.row])}\n {...rest}\n >\n {content}\n </ReactAriaRow>\n );\n }\n\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <ReactAriaRow\n id={id}\n href={href}\n className={clsx(classNames.row, styles[classNames.row])}\n data-react-aria-pressable=\"true\"\n {...rest}\n >\n {content}\n </ReactAriaRow>\n </RouterProvider>\n );\n}\n"],"names":["ReactAriaRow"],"mappings":";;;;;;;;AAiCO,SAAS,IAAsB,KAAA,EAAoB;AACxD,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAA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"}
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 RowProps,\n useTableOptions,\n Cell,\n Collection,\n Checkbox,\n RouterProvider,\n} from 'react-aria-components';\nimport { useStyles } from '../../../hooks/useStyles';\nimport { TableDefinition } from '../definition';\nimport { useNavigate } from 'react-router-dom';\nimport { useHref } from 'react-router-dom';\nimport { isExternalLink } from '../../../utils/isExternalLink';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport function Row<T extends object>(props: RowProps<T>) {\n const { classNames, cleanedProps } = useStyles(TableDefinition, props);\n const { id, columns, children, href, ...rest } = cleanedProps;\n const navigate = useNavigate();\n const isExternal = isExternalLink(href);\n\n let { selectionBehavior } = useTableOptions();\n\n const content = (\n <>\n {selectionBehavior === 'toggle' && (\n <Cell>\n <Checkbox slot=\"selection\" />\n </Cell>\n )}\n <Collection items={columns}>{children}</Collection>\n </>\n );\n\n if (isExternal) {\n return (\n <ReactAriaRow\n id={id}\n href={href}\n className={clsx(classNames.row, styles[classNames.row])}\n {...rest}\n >\n {content}\n </ReactAriaRow>\n );\n }\n\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <ReactAriaRow\n id={id}\n href={href}\n className={clsx(classNames.row, styles[classNames.row])}\n data-react-aria-pressable=\"true\"\n {...rest}\n >\n {content}\n </ReactAriaRow>\n </RouterProvider>\n );\n}\n"],"names":["ReactAriaRow"],"mappings":";;;;;;;;;AAkCO,S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A,MAEH,QAAA,EAAA;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;;;;"}
@@ -1,14 +1,12 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useStyles } from '../../../hooks/useStyles.esm.js';
3
+ import { TableDefinition } from '../definition.esm.js';
3
4
  import { Table as Table$1 } from 'react-aria-components';
4
5
  import styles from '../Table.module.css.esm.js';
5
6
  import clsx from 'clsx';
6
7
 
7
8
  const Table = (props) => {
8
- const { classNames, cleanedProps } = useStyles(
9
- "Table",
10
- props
11
- );
9
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
12
10
  return /* @__PURE__ */ jsx(
13
11
  Table$1,
14
12
  {
@@ -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 { useStyles } from '../../../hooks/useStyles';\nimport {\n Table as ReactAriaTable,\n type TableProps,\n} from 'react-aria-components';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Table = (props: TableProps) => {\n const { classNames, cleanedProps } = useStyles<'Table', TableProps>(\n 'Table',\n props,\n );\n\n return (\n <ReactAriaTable\n className={clsx(classNames.table, styles[classNames.table])}\n aria-label=\"Data table\"\n {...cleanedProps}\n />\n );\n};\n"],"names":["ReactAriaTable"],"mappings":";;;;;;AAyBO,MAAM,KAAA,GAAQ,CAAC,KAAA,KAAsB;AAC1C,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA;AAAA,IACnC,OAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAACA,OAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,OAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,MAC1D,YAAA,EAAW,YAAA;AAAA,MACV,GAAG;AAAA;AAAA,GACN;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 { useStyles } from '../../../hooks/useStyles';\nimport { TableDefinition } from '../definition';\nimport {\n Table as ReactAriaTable,\n type TableProps,\n} from 'react-aria-components';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Table = (props: TableProps) => {\n const { classNames, cleanedProps } = useStyles(TableDefinition, props);\n\n return (\n <ReactAriaTable\n className={clsx(classNames.table, styles[classNames.table])}\n aria-label=\"Data table\"\n {...cleanedProps}\n />\n );\n};\n"],"names":["ReactAriaTable"],"mappings":";;;;;;;AA0BO,MAAM,KAAA,GAAQ,CAAC,KAAA,KAAsB;AAC1C,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,iBAAiB,KAAK,CAAA;AAErE,EAAA,uBACE,GAAA;AAAA,IAACA,OAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,OAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,MAC1D,YAAA,EAAW,YAAA;AAAA,MACV,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
@@ -1,14 +1,12 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { TableBody as TableBody$1 } from 'react-aria-components';
3
3
  import { useStyles } from '../../../hooks/useStyles.esm.js';
4
+ import { TableDefinition } from '../definition.esm.js';
4
5
  import styles from '../Table.module.css.esm.js';
5
6
  import clsx from 'clsx';
6
7
 
7
8
  const TableBody = (props) => {
8
- const { classNames, cleanedProps } = useStyles(
9
- "Table",
10
- props
11
- );
9
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
12
10
  return /* @__PURE__ */ jsx(
13
11
  TableBody$1,
14
12
  {
@@ -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 {\n TableBody as ReactAriaTableBody,\n type TableBodyProps,\n} from 'react-aria-components';\nimport { useStyles } from '../../../hooks/useStyles';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const TableBody = <T extends object>(props: TableBodyProps<T>) => {\n const { classNames, cleanedProps } = useStyles<'Table', TableBodyProps<T>>(\n 'Table',\n props,\n );\n\n return (\n <ReactAriaTableBody\n className={clsx(classNames.body, styles[classNames.body])}\n {...cleanedProps}\n />\n );\n};\n"],"names":["ReactAriaTableBody"],"mappings":";;;;;;AAyBO,MAAM,SAAA,GAAY,CAAmB,KAAA,KAA6B;AACvE,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA;AAAA,IACnC,OAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAACA,WAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
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 {\n TableBody as ReactAriaTableBody,\n type TableBodyProps,\n} from 'react-aria-components';\nimport { useStyles } from '../../../hooks/useStyles';\nimport { TableDefinition } from '../definition';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const TableBody = <T extends object>(props: TableBodyProps<T>) => {\n const { classNames, cleanedProps } = useStyles(TableDefinition, props);\n\n return (\n <ReactAriaTableBody\n className={clsx(classNames.body, styles[classNames.body])}\n {...cleanedProps}\n />\n );\n};\n"],"names":["ReactAriaTableBody"],"mappings":";;;;;;;AA0BO,MAAM,SAAA,GAAY,CAAmB,KAAA,KAA6B;AACvE,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,iBAAiB,KAAK,CAAA;AAErE,EAAA,uBACE,GAAA;AAAA,IAACA,WAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
@@ -2,15 +2,13 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useTableOptions, TableHeader as TableHeader$1, Checkbox, Collection } from 'react-aria-components';
3
3
  import { Column } from './Column.esm.js';
4
4
  import { useStyles } from '../../../hooks/useStyles.esm.js';
5
+ import { TableDefinition } from '../definition.esm.js';
5
6
  import styles from '../Table.module.css.esm.js';
6
7
  import clsx from 'clsx';
7
8
 
8
9
  const TableHeader = (props) => {
9
10
  let { selectionBehavior, selectionMode, allowsDragging } = useTableOptions();
10
- const { classNames, cleanedProps } = useStyles(
11
- "Table",
12
- props
13
- );
11
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
14
12
  const { columns, children, ...rest } = cleanedProps;
15
13
  return /* @__PURE__ */ jsxs(
16
14
  TableHeader$1,
@@ -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 type TableHeaderProps,\n Checkbox,\n} from 'react-aria-components';\nimport { Collection, useTableOptions } from 'react-aria-components';\nimport { Column } from './Column';\nimport { useStyles } from '../../../hooks/useStyles';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const TableHeader = <T extends object>(props: TableHeaderProps<T>) => {\n let { selectionBehavior, selectionMode, allowsDragging } = useTableOptions();\n\n const { classNames, cleanedProps } = useStyles<'Table', TableHeaderProps<T>>(\n 'Table',\n props,\n );\n const { columns, children, ...rest } = cleanedProps;\n\n return (\n <ReactAriaTableHeader\n className={clsx(classNames.header, styles[classNames.header])}\n {...rest}\n >\n {/* Add extra columns for drag and drop and selection. */}\n {allowsDragging && <Column />}\n {selectionBehavior === 'toggle' && (\n <Column>\n {selectionMode === 'multiple' && <Checkbox slot=\"selection\" />}\n </Column>\n )}\n <Collection items={columns}>{children}</Collection>\n </ReactAriaTableHeader>\n );\n};\n"],"names":["ReactAriaTableHeader"],"mappings":";;;;;;;AA4BO,MAAM,WAAA,GAAc,CAAmB,KAAA,KAA+B;AAC3E,EAAA,IAAI,EAAE,iBAAA,EAAmB,aAAA,EAAe,cAAA,KAAmB,eAAA,EAAgB;AAE3E,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA;AAAA,IACnC,OAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,GAAG,MAAK,GAAI,YAAA;AAEvC,EAAA,uBACE,IAAA;AAAA,IAACA,aAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,QAAQ,MAAA,CAAO,UAAA,CAAW,MAAM,CAAC,CAAA;AAAA,MAC3D,GAAG,IAAA;AAAA,MAGH,QAAA,EAAA;AAAA,QAAA,cAAA,wBAAmB,MAAA,EAAA,EAAO,CAAA;AAAA,QAC1B,iBAAA,KAAsB,QAAA,oBACrB,GAAA,CAAC,MAAA,EAAA,EACE,QAAA,EAAA,aAAA,KAAkB,8BAAc,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAK,WAAA,EAAY,CAAA,EAC9D,CAAA;AAAA,wBAEF,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAO,OAAA,EAAU,QAAA,EAAS;AAAA;AAAA;AAAA,GACxC;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 type TableHeaderProps,\n Checkbox,\n} from 'react-aria-components';\nimport { Collection, useTableOptions } from 'react-aria-components';\nimport { Column } from './Column';\nimport { useStyles } from '../../../hooks/useStyles';\nimport { TableDefinition } from '../definition';\nimport styles from '../Table.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const TableHeader = <T extends object>(props: TableHeaderProps<T>) => {\n let { selectionBehavior, selectionMode, allowsDragging } = useTableOptions();\n\n const { classNames, cleanedProps } = useStyles(TableDefinition, props);\n const { columns, children, ...rest } = cleanedProps;\n\n return (\n <ReactAriaTableHeader\n className={clsx(classNames.header, styles[classNames.header])}\n {...rest}\n >\n {/* Add extra columns for drag and drop and selection. */}\n {allowsDragging && <Column />}\n {selectionBehavior === 'toggle' && (\n <Column>\n {selectionMode === 'multiple' && <Checkbox slot=\"selection\" />}\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,EAAe,cAAA,KAAmB,eAAA,EAAgB;AAE3E,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,iBAAiB,KAAK,CAAA;AACrE,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,GAAG,MAAK,GAAI,YAAA;AAEvC,EAAA,uBACE,IAAA;AAAA,IAACA,aAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,QAAQ,MAAA,CAAO,UAAA,CAAW,MAAM,CAAC,CAAA;AAAA,MAC3D,GAAG,IAAA;AAAA,MAGH,QAAA,EAAA;AAAA,QAAA,cAAA,wBAAmB,MAAA,EAAA,EAAO,CAAA;AAAA,QAC1B,iBAAA,KAAsB,QAAA,oBACrB,GAAA,CAAC,MAAA,EAAA,EACE,QAAA,EAAA,aAAA,KAAkB,8BAAc,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAK,WAAA,EAAY,CAAA,EAC9D,CAAA;AAAA,wBAEF,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAO,OAAA,EAAU,QAAA,EAAS;AAAA;AAAA;AAAA,GACxC;AAEJ;;;;"}