@backstage/ui 0.7.0-next.3 → 0.7.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.
- package/CHANGELOG.md +23 -0
- package/css/styles.css +259 -176
- package/dist/components/Avatar/Avatar.esm.js.map +1 -1
- package/dist/components/Box/Box.esm.js.map +1 -1
- package/dist/components/Box/Box.props.esm.js.map +1 -1
- package/dist/components/Button/Button.esm.js.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +4 -4
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.esm.js +5 -8
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Collapsible/Collapsible.esm.js.map +1 -1
- package/dist/components/Container/Container.esm.js.map +1 -1
- package/dist/components/FieldError/FieldError.esm.js.map +1 -1
- package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/Flex.props.esm.js.map +1 -1
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/Grid.props.esm.js.map +1 -1
- package/dist/components/Header/Header.esm.js +1 -10
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/HeaderToolbar.esm.js +3 -34
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +30 -93
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
- package/dist/components/Icon/Icon.esm.js.map +1 -1
- package/dist/components/Icon/context.esm.js.map +1 -1
- package/dist/components/Icon/icons.esm.js +1 -1
- package/dist/components/Icon/icons.esm.js.map +1 -1
- package/dist/components/Icon/provider.esm.js.map +1 -1
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Menu/Menu.esm.js +144 -202
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Table/components/Cell.esm.js.map +1 -1
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBody.esm.js.map +1 -1
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.esm.js +5 -8
- package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +62 -0
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -0
- package/dist/components/Text/Text.esm.js.map +1 -1
- package/dist/components/TextField/TextField.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/hooks/useBreakpoint.esm.js.map +1 -1
- package/dist/hooks/useIsomorphicLayoutEffect.esm.js.map +1 -1
- package/dist/hooks/useMediaQuery.esm.js.map +1 -1
- package/dist/hooks/useStyles.esm.js.map +1 -1
- package/dist/index.d.ts +137 -72
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/props/display.props.esm.js.map +1 -1
- package/dist/props/gap-props.esm.js.map +1 -1
- package/dist/props/height.props.esm.js.map +1 -1
- package/dist/props/margin.props.esm.js.map +1 -1
- package/dist/props/padding.props.esm.js.map +1 -1
- package/dist/props/position.props.esm.js.map +1 -1
- package/dist/props/prop-def.esm.js.map +1 -1
- package/dist/props/spacing.props.esm.js.map +1 -1
- package/dist/props/width.props.esm.js.map +1 -1
- package/dist/utils/componentDefinitions.esm.js +25 -26
- package/dist/utils/componentDefinitions.esm.js.map +1 -1
- package/dist/utils/extractProps.esm.js.map +1 -1
- package/dist/utils/isExternalLink.esm.js.map +1 -1
- package/package.json +3 -15
- package/dist/components/Menu/Combobox.esm.js +0 -214
- package/dist/components/Menu/Combobox.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.props.esm.js","sources":["../../src/props/spacing.props.ts"],"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 */\nimport { paddingPropDefs } from './padding.props';\nimport { marginPropDefs } from './margin.props';\n\nexport const spacingValues = [\n '0.5',\n '1',\n '1.5',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n];\n\nexport const spacingPropDefs = {\n ...paddingPropDefs(spacingValues),\n ...marginPropDefs(spacingValues),\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,
|
|
1
|
+
{"version":3,"file":"spacing.props.esm.js","sources":["../../src/props/spacing.props.ts"],"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 */\nimport { paddingPropDefs } from './padding.props';\nimport { marginPropDefs } from './margin.props';\n\nexport const spacingValues = [\n '0.5',\n '1',\n '1.5',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n];\n\nexport const spacingPropDefs = {\n ...paddingPropDefs(spacingValues),\n ...marginPropDefs(spacingValues),\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,aAAA,GAAgB;AAAA,EAC3B,KAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,GAAG,gBAAgB,aAAa,CAAA;AAAA,EAChC,GAAG,eAAe,aAAa;AACjC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"width.props.esm.js","sources":["../../src/props/width.props.ts"],"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 */\nimport type { GetPropDefTypes, PropDef } from './prop-def';\n\n/** @public */\nconst widthPropDefs = {\n width: {\n type: 'string',\n className: 'bui-w',\n customProperties: ['--width'],\n responsive: true,\n },\n minWidth: {\n type: 'string',\n className: 'bui-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n maxWidth: {\n type: 'string',\n className: 'bui-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\n/** @public */\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n"],"names":[],"mappings":"AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"width.props.esm.js","sources":["../../src/props/width.props.ts"],"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 */\nimport type { GetPropDefTypes, PropDef } from './prop-def';\n\n/** @public */\nconst widthPropDefs = {\n width: {\n type: 'string',\n className: 'bui-w',\n customProperties: ['--width'],\n responsive: true,\n },\n minWidth: {\n type: 'string',\n className: 'bui-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n maxWidth: {\n type: 'string',\n className: 'bui-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\n/** @public */\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n"],"names":[],"mappings":"AAkBA,MAAM,aAAA,GAAgB;AAAA,EACpB,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,OAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,SAAS,CAAA;AAAA,IAC5B,UAAA,EAAY;AAAA,GACd;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,WAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,aAAa,CAAA;AAAA,IAChC,UAAA,EAAY;AAAA,GACd;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,WAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,aAAa,CAAA;AAAA,IAChC,UAAA,EAAY;AAAA;AAEhB;;;;"}
|
|
@@ -90,10 +90,6 @@ const componentDefinitions = {
|
|
|
90
90
|
toolbarControls: "bui-HeaderToolbarControls",
|
|
91
91
|
toolbarIcon: "bui-HeaderToolbarIcon",
|
|
92
92
|
toolbarName: "bui-HeaderToolbarName",
|
|
93
|
-
breadcrumbs: "bui-HeaderBreadcrumbs",
|
|
94
|
-
breadcrumb: "bui-HeaderBreadcrumb",
|
|
95
|
-
breadcrumbLink: "bui-HeaderBreadcrumbLink",
|
|
96
|
-
breadcrumbSeparator: "bui-HeaderBreadcrumbSeparator",
|
|
97
93
|
tabsWrapper: "bui-HeaderTabsWrapper"
|
|
98
94
|
}
|
|
99
95
|
},
|
|
@@ -101,15 +97,9 @@ const componentDefinitions = {
|
|
|
101
97
|
classNames: {
|
|
102
98
|
root: "bui-HeaderPage",
|
|
103
99
|
content: "bui-HeaderPageContent",
|
|
104
|
-
tabsWrapper: "bui-HeaderPageTabsWrapper",
|
|
105
|
-
controls: "bui-HeaderPageControls",
|
|
106
|
-
sticky: "bui-HeaderPageSticky",
|
|
107
|
-
stickyWrapper: "bui-HeaderPageStickyWrapper",
|
|
108
|
-
stickyContent: "bui-HeaderPageStickyContent",
|
|
109
100
|
breadcrumbs: "bui-HeaderPageBreadcrumbs",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
breadcrumbSeparator: "bui-HeaderPageBreadcrumbSeparator"
|
|
101
|
+
tabsWrapper: "bui-HeaderPageTabsWrapper",
|
|
102
|
+
controls: "bui-HeaderPageControls"
|
|
113
103
|
}
|
|
114
104
|
},
|
|
115
105
|
Heading: {
|
|
@@ -145,21 +135,21 @@ const componentDefinitions = {
|
|
|
145
135
|
},
|
|
146
136
|
Menu: {
|
|
147
137
|
classNames: {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
138
|
+
root: "bui-Menu",
|
|
139
|
+
popover: "bui-MenuPopover",
|
|
140
|
+
content: "bui-MenuContent",
|
|
141
|
+
section: "bui-MenuSection",
|
|
142
|
+
sectionHeader: "bui-MenuSectionHeader",
|
|
153
143
|
item: "bui-MenuItem",
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
144
|
+
itemListBox: "bui-MenuItemListBox",
|
|
145
|
+
itemListBoxCheck: "bui-MenuItemListBoxCheck",
|
|
146
|
+
itemContent: "bui-MenuItemContent",
|
|
147
|
+
itemArrow: "bui-MenuItemArrow",
|
|
148
|
+
separator: "bui-MenuSeparator",
|
|
149
|
+
searchField: "bui-MenuSearchField",
|
|
150
|
+
searchFieldInput: "bui-MenuSearchFieldInput",
|
|
151
|
+
searchFieldClear: "bui-MenuSearchFieldClear",
|
|
152
|
+
emptyState: "bui-MenuEmptyState"
|
|
163
153
|
}
|
|
164
154
|
},
|
|
165
155
|
Popover: {
|
|
@@ -248,6 +238,15 @@ const componentDefinitions = {
|
|
|
248
238
|
panel: "bui-TabPanel"
|
|
249
239
|
}
|
|
250
240
|
},
|
|
241
|
+
TagGroup: {
|
|
242
|
+
classNames: {
|
|
243
|
+
group: "bui-TagGroup",
|
|
244
|
+
list: "bui-TagList",
|
|
245
|
+
tag: "bui-Tag",
|
|
246
|
+
tagIcon: "bui-TagIcon",
|
|
247
|
+
tagRemoveButton: "bui-TagRemoveButton"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
251
250
|
Text: {
|
|
252
251
|
classNames: {
|
|
253
252
|
root: "bui-Text"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentDefinitions.esm.js","sources":["../../src/utils/componentDefinitions.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 definitions for the Backstage UI library\n * @public\n */\nexport const componentDefinitions = {\n Avatar: {\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n },\n },\n Box: {\n classNames: {\n root: 'bui-Box',\n },\n },\n Button: {\n classNames: {\n root: 'bui-Button',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n variant: ['primary', 'secondary', 'tertiary'] as const,\n },\n },\n ButtonIcon: {\n classNames: {\n root: 'bui-ButtonIcon',\n },\n },\n ButtonLink: {\n classNames: {\n root: 'bui-ButtonLink',\n },\n },\n Card: {\n classNames: {\n root: 'bui-Card',\n header: 'bui-CardHeader',\n body: 'bui-CardBody',\n footer: 'bui-CardFooter',\n },\n },\n Checkbox: {\n classNames: {\n root: 'bui-CheckboxRoot',\n label: 'bui-CheckboxLabel',\n indicator: 'bui-CheckboxIndicator',\n },\n dataAttributes: {\n checked: [true, false] as const,\n },\n },\n Collapsible: {\n classNames: {\n root: 'bui-CollapsibleRoot',\n trigger: 'bui-CollapsibleTrigger',\n panel: 'bui-CollapsiblePanel',\n },\n },\n Container: {\n classNames: {\n root: 'bui-Container',\n },\n },\n FieldLabel: {\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n },\n Flex: {\n classNames: {\n root: 'bui-Flex',\n },\n },\n Grid: {\n classNames: {\n root: 'bui-Grid',\n item: 'bui-GridItem',\n },\n },\n Header: {\n classNames: {\n toolbar: 'bui-HeaderToolbar',\n toolbarWrapper: 'bui-HeaderToolbarWrapper',\n toolbarContent: 'bui-HeaderToolbarContent',\n toolbarControls: 'bui-HeaderToolbarControls',\n toolbarIcon: 'bui-HeaderToolbarIcon',\n toolbarName: 'bui-HeaderToolbarName',\n breadcrumbs: 'bui-HeaderBreadcrumbs',\n breadcrumb: 'bui-HeaderBreadcrumb',\n breadcrumbLink: 'bui-HeaderBreadcrumbLink',\n breadcrumbSeparator: 'bui-HeaderBreadcrumbSeparator',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n },\n },\n HeaderPage: {\n classNames: {\n root: 'bui-HeaderPage',\n content: 'bui-HeaderPageContent',\n tabsWrapper: 'bui-HeaderPageTabsWrapper',\n controls: 'bui-HeaderPageControls',\n sticky: 'bui-HeaderPageSticky',\n stickyWrapper: 'bui-HeaderPageStickyWrapper',\n stickyContent: 'bui-HeaderPageStickyContent',\n breadcrumbs: 'bui-HeaderPageBreadcrumbs',\n breadcrumb: 'bui-HeaderPageBreadcrumb',\n breadcrumbLink: 'bui-HeaderPageBreadcrumbLink',\n breadcrumbSeparator: 'bui-HeaderPageBreadcrumbSeparator',\n },\n },\n Heading: {\n classNames: {\n root: 'bui-Heading',\n },\n dataAttributes: {\n variant: ['title1', 'title2', 'title3', 'subtitle'] as const,\n color: ['primary', 'secondary', 'muted'] as const,\n truncate: [true, false] as const,\n },\n },\n Icon: {\n classNames: {\n root: 'bui-Icon',\n },\n },\n Link: {\n classNames: {\n root: 'bui-Link',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n },\n },\n List: {\n classNames: {\n root: 'bui-List',\n row: 'bui-ListRow',\n label: 'bui-ListLabel',\n },\n },\n Menu: {\n classNames: {\n trigger: 'bui-MenuTrigger',\n backdrop: 'bui-MenuBackdrop',\n positioner: 'bui-MenuPositioner',\n popup: 'bui-MenuPopup',\n arrow: 'bui-MenuArrow',\n item: 'bui-MenuItem',\n group: 'bui-MenuGroup',\n groupLabel: 'bui-MenuGroupLabel',\n radioGroup: 'bui-MenuRadioGroup',\n radioItem: 'bui-MenuRadioItem',\n radioItemIndicator: 'bui-MenuRadioItemIndicator',\n checkboxItem: 'bui-MenuCheckboxItem',\n checkboxItemIndicator: 'bui-MenuCheckboxItemIndicator',\n submenuTrigger: 'bui-MenuSubmenuTrigger',\n separator: 'bui-MenuSeparator',\n },\n },\n Popover: {\n classNames: {\n root: 'bui-Popover',\n },\n },\n RadioGroup: {\n classNames: {\n root: 'bui-RadioGroup',\n content: 'bui-RadioGroupContent',\n radio: 'bui-Radio',\n },\n },\n ScrollArea: {\n classNames: {\n root: 'bui-ScrollAreaRoot',\n viewport: 'bui-ScrollAreaViewport',\n scrollbar: 'bui-ScrollAreaScrollbar',\n thumb: 'bui-ScrollAreaThumb',\n },\n },\n SearchField: {\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-InputClear',\n },\n dataAttributes: {\n startCollapsed: [true, false] as const,\n },\n },\n Select: {\n classNames: {\n root: 'bui-Select',\n trigger: 'bui-SelectTrigger',\n value: 'bui-SelectValue',\n icon: 'bui-SelectIcon',\n list: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n },\n Skeleton: {\n classNames: {\n root: 'bui-Skeleton',\n },\n },\n Switch: {\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n },\n Table: {\n classNames: {\n table: 'bui-Table',\n header: 'bui-TableHeader',\n body: 'bui-TableBody',\n row: 'bui-TableRow',\n head: 'bui-TableHead',\n headSortButton: 'bui-TableHeadSortButton',\n caption: 'bui-TableCaption',\n cell: 'bui-TableCell',\n cellContentWrapper: 'bui-TableCellContentWrapper',\n cellContent: 'bui-TableCellContent',\n cellIcon: 'bui-TableCellIcon',\n cellProfileAvatar: 'bui-TableCellProfileAvatar',\n cellProfileAvatarImage: 'bui-TableCellProfileAvatarImage',\n cellProfileAvatarFallback: 'bui-TableCellProfileAvatarFallback',\n cellProfileName: 'bui-TableCellProfileName',\n cellProfileLink: 'bui-TableCellProfileLink',\n },\n },\n Tabs: {\n classNames: {\n tabs: 'bui-Tabs',\n tabList: 'bui-TabList',\n tabListWrapper: 'bui-TabListWrapper',\n tab: 'bui-Tab',\n tabActive: 'bui-TabActive',\n tabHovered: 'bui-TabHovered',\n panel: 'bui-TabPanel',\n },\n },\n Text: {\n classNames: {\n root: 'bui-Text',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const,\n truncate: [true, false] as const,\n },\n },\n TextField: {\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n },\n dataAttributes: {\n invalid: [true, false] as const,\n disabled: [true, false] as const,\n },\n },\n Tooltip: {\n classNames: {\n tooltip: 'bui-Tooltip',\n arrow: 'bui-TooltipArrow',\n },\n },\n} as const satisfies Record<string, ComponentDefinition>;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAAuB,GAAA;AAAA,EAClC,MAAQ,EAAA;AAAA,IACN,UAAY,EAAA;AAAA,MACV,IAAM,EAAA,gBAAA;AAAA,MACN,KAAO,EAAA,iBAAA;AAAA,MACP,QAAU,EAAA;AAAA,KACZ;AA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c,EAAA,kBAAA;AAAA,MACd,KAAO,EAAA,WAAA;AAAA,MACP,SAAW,EAAA;AAAA,KACb;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,OAAA,EAAS,CAAC,IAAA,EAAM,KAAK,CAAA;AAAA,MACrB,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,MACV,OAAS,EAAA,aAAA;AAAA,MACT,KAAO,EAAA;AAAA;AACT;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"componentDefinitions.esm.js","sources":["../../src/utils/componentDefinitions.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 definitions for the Backstage UI library\n * @public\n */\nexport const componentDefinitions = {\n Avatar: {\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n },\n },\n Box: {\n classNames: {\n root: 'bui-Box',\n },\n },\n Button: {\n classNames: {\n root: 'bui-Button',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n variant: ['primary', 'secondary', 'tertiary'] as const,\n },\n },\n ButtonIcon: {\n classNames: {\n root: 'bui-ButtonIcon',\n },\n },\n ButtonLink: {\n classNames: {\n root: 'bui-ButtonLink',\n },\n },\n Card: {\n classNames: {\n root: 'bui-Card',\n header: 'bui-CardHeader',\n body: 'bui-CardBody',\n footer: 'bui-CardFooter',\n },\n },\n Checkbox: {\n classNames: {\n root: 'bui-CheckboxRoot',\n label: 'bui-CheckboxLabel',\n indicator: 'bui-CheckboxIndicator',\n },\n dataAttributes: {\n checked: [true, false] as const,\n },\n },\n Collapsible: {\n classNames: {\n root: 'bui-CollapsibleRoot',\n trigger: 'bui-CollapsibleTrigger',\n panel: 'bui-CollapsiblePanel',\n },\n },\n Container: {\n classNames: {\n root: 'bui-Container',\n },\n },\n FieldLabel: {\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n },\n Flex: {\n classNames: {\n root: 'bui-Flex',\n },\n },\n Grid: {\n classNames: {\n root: 'bui-Grid',\n item: 'bui-GridItem',\n },\n },\n Header: {\n classNames: {\n toolbar: 'bui-HeaderToolbar',\n toolbarWrapper: 'bui-HeaderToolbarWrapper',\n toolbarContent: 'bui-HeaderToolbarContent',\n toolbarControls: 'bui-HeaderToolbarControls',\n toolbarIcon: 'bui-HeaderToolbarIcon',\n toolbarName: 'bui-HeaderToolbarName',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n },\n },\n HeaderPage: {\n classNames: {\n root: 'bui-HeaderPage',\n content: 'bui-HeaderPageContent',\n breadcrumbs: 'bui-HeaderPageBreadcrumbs',\n tabsWrapper: 'bui-HeaderPageTabsWrapper',\n controls: 'bui-HeaderPageControls',\n },\n },\n Heading: {\n classNames: {\n root: 'bui-Heading',\n },\n dataAttributes: {\n variant: ['title1', 'title2', 'title3', 'subtitle'] as const,\n color: ['primary', 'secondary', 'muted'] as const,\n truncate: [true, false] as const,\n },\n },\n Icon: {\n classNames: {\n root: 'bui-Icon',\n },\n },\n Link: {\n classNames: {\n root: 'bui-Link',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n },\n },\n List: {\n classNames: {\n root: 'bui-List',\n row: 'bui-ListRow',\n label: 'bui-ListLabel',\n },\n },\n Menu: {\n classNames: {\n root: 'bui-Menu',\n popover: 'bui-MenuPopover',\n content: 'bui-MenuContent',\n section: 'bui-MenuSection',\n sectionHeader: 'bui-MenuSectionHeader',\n item: 'bui-MenuItem',\n itemListBox: 'bui-MenuItemListBox',\n itemListBoxCheck: 'bui-MenuItemListBoxCheck',\n itemContent: 'bui-MenuItemContent',\n itemArrow: 'bui-MenuItemArrow',\n separator: 'bui-MenuSeparator',\n searchField: 'bui-MenuSearchField',\n searchFieldInput: 'bui-MenuSearchFieldInput',\n searchFieldClear: 'bui-MenuSearchFieldClear',\n emptyState: 'bui-MenuEmptyState',\n },\n },\n Popover: {\n classNames: {\n root: 'bui-Popover',\n },\n },\n RadioGroup: {\n classNames: {\n root: 'bui-RadioGroup',\n content: 'bui-RadioGroupContent',\n radio: 'bui-Radio',\n },\n },\n ScrollArea: {\n classNames: {\n root: 'bui-ScrollAreaRoot',\n viewport: 'bui-ScrollAreaViewport',\n scrollbar: 'bui-ScrollAreaScrollbar',\n thumb: 'bui-ScrollAreaThumb',\n },\n },\n SearchField: {\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-InputClear',\n },\n dataAttributes: {\n startCollapsed: [true, false] as const,\n },\n },\n Select: {\n classNames: {\n root: 'bui-Select',\n trigger: 'bui-SelectTrigger',\n value: 'bui-SelectValue',\n icon: 'bui-SelectIcon',\n list: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n },\n Skeleton: {\n classNames: {\n root: 'bui-Skeleton',\n },\n },\n Switch: {\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n },\n Table: {\n classNames: {\n table: 'bui-Table',\n header: 'bui-TableHeader',\n body: 'bui-TableBody',\n row: 'bui-TableRow',\n head: 'bui-TableHead',\n headSortButton: 'bui-TableHeadSortButton',\n caption: 'bui-TableCaption',\n cell: 'bui-TableCell',\n cellContentWrapper: 'bui-TableCellContentWrapper',\n cellContent: 'bui-TableCellContent',\n cellIcon: 'bui-TableCellIcon',\n cellProfileAvatar: 'bui-TableCellProfileAvatar',\n cellProfileAvatarImage: 'bui-TableCellProfileAvatarImage',\n cellProfileAvatarFallback: 'bui-TableCellProfileAvatarFallback',\n cellProfileName: 'bui-TableCellProfileName',\n cellProfileLink: 'bui-TableCellProfileLink',\n },\n },\n Tabs: {\n classNames: {\n tabs: 'bui-Tabs',\n tabList: 'bui-TabList',\n tabListWrapper: 'bui-TabListWrapper',\n tab: 'bui-Tab',\n tabActive: 'bui-TabActive',\n tabHovered: 'bui-TabHovered',\n panel: 'bui-TabPanel',\n },\n },\n TagGroup: {\n classNames: {\n group: 'bui-TagGroup',\n list: 'bui-TagList',\n tag: 'bui-Tag',\n tagIcon: 'bui-TagIcon',\n tagRemoveButton: 'bui-TagRemoveButton',\n },\n },\n Text: {\n classNames: {\n root: 'bui-Text',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const,\n truncate: [true, false] as const,\n },\n },\n TextField: {\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n },\n dataAttributes: {\n invalid: [true, false] as const,\n disabled: [true, false] as const,\n },\n },\n Tooltip: {\n classNames: {\n tooltip: 'bui-Tooltip',\n arrow: 'bui-TooltipArrow',\n },\n },\n} as const satisfies Record<string, ComponentDefinition>;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAAA,GAAuB;AAAA,EAClC,MAAA,EAAQ;AAAA,IACN,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,gBAAA;AAAA,MACN,KAAA,EAAO,iBAAA;AAAA,MACP,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,cAAA,EAAgB;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A,EAAM,KAAK,CAAA;AAAA,MACrB,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,OAAA,EAAS;AAAA,IACP,UAAA,EAAY;AAAA,MACV,OAAA,EAAS,aAAA;AAAA,MACT,KAAA,EAAO;AAAA;AACT;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractProps.esm.js","sources":["../../src/utils/extractProps.ts"],"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\ntype BasePropDef = {\n type: string;\n values?: readonly unknown[];\n default?: unknown;\n required?: boolean;\n className?: string;\n responsive?: true;\n customProperties?: string[];\n};\n\nexport function extractProps(\n props: {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n as?: keyof JSX.IntrinsicElements;\n [key: string]: any;\n },\n propDefs: { [name in string]: BasePropDef },\n) {\n let className: string[] = (props.className || '').split(' ');\n let style: React.CSSProperties = { ...props.style };\n\n for (const key in propDefs) {\n const propDef = propDefs[key];\n\n // Check if the prop is present or has a default value\n if (!Object.hasOwn(props, key) && !propDef.hasOwnProperty('default')) {\n continue; // Skip processing if neither is present\n }\n\n const value = Object.hasOwn(props, key)\n ? (props[key] as unknown)\n : propDefs[key].default;\n const propDefsValues = propDef.values;\n const propDefsCustomProperties = propDef.customProperties;\n const propDefsClassName = propDef.className;\n const isResponsive = propDef.responsive;\n\n const handleValue = (val: unknown, prefix: string = '') => {\n // Skip adding class name if the key is \"as\"\n if (key === 'as') return;\n\n if (propDefsValues?.includes(val)) {\n className.push(`${prefix}${propDefsClassName}-${val}`);\n } else {\n if (propDefsCustomProperties) {\n for (const customProperty of propDefsCustomProperties) {\n const customPropertyKey =\n isResponsive && prefix\n ? `${customProperty}-${prefix.slice(0, -1)}`\n : customProperty;\n style[customPropertyKey as keyof typeof style] = val as any;\n }\n }\n className.push(`${prefix}${propDefsClassName}`);\n }\n };\n\n if (isResponsive && typeof value === 'object' && value !== null) {\n const breakpointValues = value as { [key: string]: unknown };\n // Handle responsive object values\n for (const breakpoint in breakpointValues) {\n const prefix = breakpoint === 'initial' ? '' : `${breakpoint}:`;\n handleValue(breakpointValues[breakpoint], prefix);\n }\n } else {\n handleValue(value);\n }\n }\n\n // Ensure keys from props that are defined in propDefs are removed\n const cleanedProps = Object.keys(props).reduce((acc, key) => {\n if (!propDefs.hasOwnProperty(key)) {\n acc[key] = props[key];\n }\n return acc;\n }, {} as { [key: string]: any });\n\n const newClassNames = className\n .filter(name => name && name.trim() !== '')\n .join(' ');\n\n return { ...cleanedProps, className: newClassNames, style };\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractProps.esm.js","sources":["../../src/utils/extractProps.ts"],"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\ntype BasePropDef = {\n type: string;\n values?: readonly unknown[];\n default?: unknown;\n required?: boolean;\n className?: string;\n responsive?: true;\n customProperties?: string[];\n};\n\nexport function extractProps(\n props: {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n as?: keyof JSX.IntrinsicElements;\n [key: string]: any;\n },\n propDefs: { [name in string]: BasePropDef },\n) {\n let className: string[] = (props.className || '').split(' ');\n let style: React.CSSProperties = { ...props.style };\n\n for (const key in propDefs) {\n const propDef = propDefs[key];\n\n // Check if the prop is present or has a default value\n if (!Object.hasOwn(props, key) && !propDef.hasOwnProperty('default')) {\n continue; // Skip processing if neither is present\n }\n\n const value = Object.hasOwn(props, key)\n ? (props[key] as unknown)\n : propDefs[key].default;\n const propDefsValues = propDef.values;\n const propDefsCustomProperties = propDef.customProperties;\n const propDefsClassName = propDef.className;\n const isResponsive = propDef.responsive;\n\n const handleValue = (val: unknown, prefix: string = '') => {\n // Skip adding class name if the key is \"as\"\n if (key === 'as') return;\n\n if (propDefsValues?.includes(val)) {\n className.push(`${prefix}${propDefsClassName}-${val}`);\n } else {\n if (propDefsCustomProperties) {\n for (const customProperty of propDefsCustomProperties) {\n const customPropertyKey =\n isResponsive && prefix\n ? `${customProperty}-${prefix.slice(0, -1)}`\n : customProperty;\n style[customPropertyKey as keyof typeof style] = val as any;\n }\n }\n className.push(`${prefix}${propDefsClassName}`);\n }\n };\n\n if (isResponsive && typeof value === 'object' && value !== null) {\n const breakpointValues = value as { [key: string]: unknown };\n // Handle responsive object values\n for (const breakpoint in breakpointValues) {\n const prefix = breakpoint === 'initial' ? '' : `${breakpoint}:`;\n handleValue(breakpointValues[breakpoint], prefix);\n }\n } else {\n handleValue(value);\n }\n }\n\n // Ensure keys from props that are defined in propDefs are removed\n const cleanedProps = Object.keys(props).reduce((acc, key) => {\n if (!propDefs.hasOwnProperty(key)) {\n acc[key] = props[key];\n }\n return acc;\n }, {} as { [key: string]: any });\n\n const newClassNames = className\n .filter(name => name && name.trim() !== '')\n .join(' ');\n\n return { ...cleanedProps, className: newClassNames, style };\n}\n"],"names":[],"mappings":"AA0BO,SAAS,YAAA,CACd,OAOA,QAAA,EACA;AACA,EAAA,IAAI,SAAA,GAAA,CAAuB,KAAA,CAAM,SAAA,IAAa,EAAA,EAAI,MAAM,GAAG,CAAA;AAC3D,EAAA,IAAI,KAAA,GA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ACA,QAAA,SAAA,CAAU,IAAA,CAAK,CAAA,EAAG,MAAM,CAAA,EAAG,iBAAiB,CAAA,CAAE,CAAA;AAAA,MAChD;AAAA,IACF,CAAA;AAEA,IAAA,IAAI,YAAA,IAAgB,OAAO,KAAA,KAAU,QAAA,IAAY,UAAU,IAAA,EAAM;AAC/D,MAAA,MAAM,gBAAA,GAAmB,KAAA;AAEzB,MAAA,KAAA,MAAW,cAAc,gBAAA,EAAkB;AACzC,QAAA,MAAM,MAAA,GAAS,UAAA,KAAe,SAAA,GAAY,EAAA,GAAK,GAAG,UAAU,CAAA,CAAA,CAAA;AAC5D,QAAA,WAAA,CAAY,gBAAA,CAAiB,UAAU,CAAA,EAAG,MAAM,CAAA;AAAA,MAClD;AAAA,IACF,CAAA,MAAO;AACL,MAAA,WAAA,CAAY,KAAK,CAAA;AAAA,IACnB;AAAA,EACF;AAGA,EAAA,MAAM,YAAA,GAAe,OAAO,IAAA,CAAK,KAAK,EAAE,MAAA,CAAO,CAAC,KAAK,GAAA,KAAQ;AAC3D,IAAA,IAAI,CAAC,QAAA,CAAS,cAAA,CAAe,GAAG,CAAA,EAAG;AACjC,MAAA,GAAA,CAAI,GAAG,CAAA,GAAI,KAAA,CAAM,GAAG,CAAA;AAAA,IACtB;AACA,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,EAAG,EAA4B,CAAA;AAE/B,EAAA,MAAM,aAAA,GAAgB,SAAA,CACnB,MAAA,CAAO,CAAA,IAAA,KAAQ,IAAA,IAAQ,IAAA,CAAK,IAAA,EAAK,KAAM,EAAE,CAAA,CACzC,IAAA,CAAK,GAAG,CAAA;AAEX,EAAA,OAAO,EAAE,GAAG,YAAA,EAAc,SAAA,EAAW,eAAe,KAAA,EAAM;AAC5D;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isExternalLink.esm.js","sources":["../../src/utils/isExternalLink.ts"],"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\n/**\n * Determines if a link is external.\n * @param href - The href of the link.\n * @returns True if the link is external, false otherwise.\n * @internal\n */\nexport function isExternalLink(href?: string): boolean {\n if (!href) return false;\n\n // Check if it's an absolute URL with protocol\n if (href.startsWith('http://') || href.startsWith('https://')) {\n return true;\n }\n\n // Check if it's a protocol-relative URL\n if (href.startsWith('//')) {\n return true;\n }\n\n // Check if it's a mailto: or tel: link\n if (href.startsWith('mailto:') || href.startsWith('tel:')) {\n return true;\n }\n\n return false;\n}\n"],"names":[],"mappings":"AAsBO,SAAS,eAAe,
|
|
1
|
+
{"version":3,"file":"isExternalLink.esm.js","sources":["../../src/utils/isExternalLink.ts"],"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\n/**\n * Determines if a link is external.\n * @param href - The href of the link.\n * @returns True if the link is external, false otherwise.\n * @internal\n */\nexport function isExternalLink(href?: string): boolean {\n if (!href) return false;\n\n // Check if it's an absolute URL with protocol\n if (href.startsWith('http://') || href.startsWith('https://')) {\n return true;\n }\n\n // Check if it's a protocol-relative URL\n if (href.startsWith('//')) {\n return true;\n }\n\n // Check if it's a mailto: or tel: link\n if (href.startsWith('mailto:') || href.startsWith('tel:')) {\n return true;\n }\n\n return false;\n}\n"],"names":[],"mappings":"AAsBO,SAAS,eAAe,IAAA,EAAwB;AACrD,EAAA,IAAI,CAAC,MAAM,OAAO,KAAA;AAGlB,EAAA,IAAI,KAAK,UAAA,CAAW,SAAS,KAAK,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG;AAC7D,IAAA,OAAO,IAAA;AAAA,EACT;AAGA,EAAA,IAAI,IAAA,CAAK,UAAA,CAAW,IAAI,CAAA,EAAG;AACzB,IAAA,OAAO,IAAA;AAAA,EACT;AAGA,EAAA,IAAI,KAAK,UAAA,CAAW,SAAS,KAAK,IAAA,CAAK,UAAA,CAAW,MAAM,CAAA,EAAG;AACzD,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,KAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/ui",
|
|
3
|
-
"version": "0.7.0
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library"
|
|
6
6
|
},
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "yarn build:app && yarn build:css",
|
|
31
|
-
"build-storybook": "storybook build",
|
|
32
31
|
"build:app": "backstage-cli package build",
|
|
33
32
|
"build:css": "node scripts/build-css.mjs",
|
|
34
33
|
"build:css:watch": "node scripts/build-css.mjs --watch",
|
|
@@ -36,33 +35,22 @@
|
|
|
36
35
|
"lint": "backstage-cli package lint",
|
|
37
36
|
"prepack": "backstage-cli package prepack",
|
|
38
37
|
"postpack": "backstage-cli package postpack",
|
|
39
|
-
"start": "concurrently \"yarn build:css:watch\" \"yarn storybook\"",
|
|
40
|
-
"storybook": "storybook dev -p 6006",
|
|
41
38
|
"test": "backstage-cli package test"
|
|
42
39
|
},
|
|
43
40
|
"dependencies": {
|
|
44
41
|
"@base-ui-components/react": "1.0.0-alpha.7",
|
|
45
|
-
"@gsap/react": "^2.1.2",
|
|
46
42
|
"@remixicon/react": "^4.6.0",
|
|
43
|
+
"@storybook/test": "^8.6.12",
|
|
47
44
|
"@tanstack/react-table": "^8.21.3",
|
|
48
45
|
"clsx": "^2.1.1",
|
|
49
|
-
"gsap": "^3.13.0",
|
|
50
46
|
"react-aria-components": "^1.10.1"
|
|
51
47
|
},
|
|
52
48
|
"devDependencies": {
|
|
53
|
-
"@backstage/cli": "0.34.0
|
|
54
|
-
"@storybook/addon-essentials": "^8.6.12",
|
|
55
|
-
"@storybook/addon-interactions": "^8.6.12",
|
|
56
|
-
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
57
|
-
"@storybook/addon-webpack5-compiler-swc": "^3.0.0",
|
|
58
|
-
"@storybook/blocks": "^8.6.12",
|
|
49
|
+
"@backstage/cli": "^0.34.0",
|
|
59
50
|
"@storybook/react": "^8.6.12",
|
|
60
|
-
"@storybook/react-webpack5": "^8.6.12",
|
|
61
|
-
"@storybook/test": "^8.6.12",
|
|
62
51
|
"@types/react": "^18.0.0",
|
|
63
52
|
"@types/react-dom": "^18.0.0",
|
|
64
53
|
"chalk": "^5.4.1",
|
|
65
|
-
"concurrently": "^9.2.0",
|
|
66
54
|
"eslint-plugin-storybook": "^0.12.0",
|
|
67
55
|
"glob": "^11.0.1",
|
|
68
56
|
"globals": "^15.11.0",
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef, useState, useMemo, useCallback, useRef, useEffect } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import '../Icon/context.esm.js';
|
|
5
|
-
import '../Box/Box.esm.js';
|
|
6
|
-
import '../Grid/Grid.esm.js';
|
|
7
|
-
import '../Flex/Flex.esm.js';
|
|
8
|
-
import '../Container/Container.esm.js';
|
|
9
|
-
import '../Avatar/Avatar.esm.js';
|
|
10
|
-
import '../Button/Button.esm.js';
|
|
11
|
-
import '../Card/Card.esm.js';
|
|
12
|
-
import '../Collapsible/Collapsible.esm.js';
|
|
13
|
-
import '../FieldLabel/FieldLabel.esm.js';
|
|
14
|
-
import '../Header/HeaderToolbar.esm.js';
|
|
15
|
-
import '../Tabs/Tabs.esm.js';
|
|
16
|
-
import '../HeaderPage/HeaderPage.esm.js';
|
|
17
|
-
import '@remixicon/react';
|
|
18
|
-
import { Icon } from '../Icon/Icon.esm.js';
|
|
19
|
-
import '../ButtonIcon/ButtonIcon.esm.js';
|
|
20
|
-
import '../ButtonLink/ButtonLink.esm.js';
|
|
21
|
-
import '../Checkbox/Checkbox.esm.js';
|
|
22
|
-
import '../RadioGroup/RadioGroup.esm.js';
|
|
23
|
-
import 'react-aria-components';
|
|
24
|
-
import 'react-router-dom';
|
|
25
|
-
import '../Table/components/Cell.esm.js';
|
|
26
|
-
import '../Text/Text.esm.js';
|
|
27
|
-
import '../Link/Link.esm.js';
|
|
28
|
-
import '@base-ui-components/react/avatar';
|
|
29
|
-
import '../TextField/TextField.esm.js';
|
|
30
|
-
import '../Tooltip/Tooltip.esm.js';
|
|
31
|
-
import './Menu.esm.js';
|
|
32
|
-
import '../ScrollArea/ScrollArea.esm.js';
|
|
33
|
-
import '../SearchField/SearchField.esm.js';
|
|
34
|
-
import '../Select/Select.esm.js';
|
|
35
|
-
import '../Switch/Switch.esm.js';
|
|
36
|
-
import { useId } from 'react-aria';
|
|
37
|
-
|
|
38
|
-
const getListboxItemId = (listboxId, optionValue) => `${listboxId}-option-${optionValue}`;
|
|
39
|
-
function ComboboxItem({
|
|
40
|
-
option,
|
|
41
|
-
optionIndex,
|
|
42
|
-
value,
|
|
43
|
-
activeOptionIndex,
|
|
44
|
-
onItemActive,
|
|
45
|
-
onItemSelect,
|
|
46
|
-
listboxId
|
|
47
|
-
}) {
|
|
48
|
-
const isSelected = value?.includes(option.value) ?? false;
|
|
49
|
-
const isHighlighted = optionIndex === activeOptionIndex;
|
|
50
|
-
const itemId = getListboxItemId(listboxId, option.value);
|
|
51
|
-
const itemRef = useRef(null);
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (isHighlighted && itemRef.current) {
|
|
54
|
-
itemRef.current.scrollIntoView({ block: "nearest" });
|
|
55
|
-
}
|
|
56
|
-
}, [isHighlighted]);
|
|
57
|
-
return /* @__PURE__ */ jsxs(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
ref: itemRef,
|
|
61
|
-
className: "bui-SubmenuComboboxItem",
|
|
62
|
-
id: itemId,
|
|
63
|
-
role: "option",
|
|
64
|
-
"aria-selected": isSelected,
|
|
65
|
-
"data-highlighted": isHighlighted ? true : void 0,
|
|
66
|
-
"data-selected": isSelected ? true : void 0,
|
|
67
|
-
"data-disabled": option.disabled ? true : void 0,
|
|
68
|
-
onMouseOver: () => !option.disabled && onItemActive(optionIndex),
|
|
69
|
-
onClick: () => !option.disabled && onItemSelect(option.value),
|
|
70
|
-
children: [
|
|
71
|
-
/* @__PURE__ */ jsx("div", { className: "bui-SubmenuComboboxItemCheckbox", children: isSelected && /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true", name: "check", size: 12 }) }),
|
|
72
|
-
/* @__PURE__ */ jsx("div", { className: "bui-SubmenuComboboxItemLabel", children: option.label })
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
const Combobox = forwardRef(
|
|
78
|
-
(props, ref) => {
|
|
79
|
-
const {
|
|
80
|
-
options,
|
|
81
|
-
value,
|
|
82
|
-
onValueChange,
|
|
83
|
-
multiselect = false,
|
|
84
|
-
className,
|
|
85
|
-
...rest
|
|
86
|
-
} = props;
|
|
87
|
-
const triggerId = useId();
|
|
88
|
-
const listboxId = `${triggerId}-listbox`;
|
|
89
|
-
const [filterString, setFilterString] = useState("");
|
|
90
|
-
const [activeOptionIndex, setActiveOptionIndex] = useState(0);
|
|
91
|
-
const filteredOptions = useMemo(() => {
|
|
92
|
-
if (!filterString) return options;
|
|
93
|
-
const lowerFilterString = filterString.toLocaleLowerCase("en-US");
|
|
94
|
-
return options.filter(
|
|
95
|
-
(option) => option.label.toLocaleLowerCase("en-US").includes(lowerFilterString)
|
|
96
|
-
);
|
|
97
|
-
}, [filterString, options]);
|
|
98
|
-
const activeDescendantId = activeOptionIndex >= 0 && filteredOptions.length > 0 ? getListboxItemId(listboxId, filteredOptions[activeOptionIndex].value) : void 0;
|
|
99
|
-
const handleValueChange = useCallback(
|
|
100
|
-
(toggledValue) => {
|
|
101
|
-
let newValue;
|
|
102
|
-
if (multiselect) {
|
|
103
|
-
newValue = value?.includes(toggledValue) ? value.filter((v) => v !== toggledValue) : [...value ?? [], toggledValue];
|
|
104
|
-
} else {
|
|
105
|
-
newValue = value?.includes(toggledValue) ? [] : [toggledValue];
|
|
106
|
-
}
|
|
107
|
-
onValueChange?.(newValue);
|
|
108
|
-
},
|
|
109
|
-
[multiselect, onValueChange, value]
|
|
110
|
-
);
|
|
111
|
-
const handleSearchChange = useCallback(
|
|
112
|
-
(e) => {
|
|
113
|
-
setFilterString(e.target.value);
|
|
114
|
-
setActiveOptionIndex(0);
|
|
115
|
-
e.preventDefault();
|
|
116
|
-
},
|
|
117
|
-
[]
|
|
118
|
-
);
|
|
119
|
-
const handleKeyDown = useCallback(
|
|
120
|
-
(e) => {
|
|
121
|
-
let wasEscapeKey = false;
|
|
122
|
-
switch (e.key) {
|
|
123
|
-
case "ArrowDown":
|
|
124
|
-
e.preventDefault();
|
|
125
|
-
setActiveOptionIndex(
|
|
126
|
-
(prev) => Math.min(prev + 1, filteredOptions.length - 1)
|
|
127
|
-
);
|
|
128
|
-
break;
|
|
129
|
-
case "ArrowUp":
|
|
130
|
-
e.preventDefault();
|
|
131
|
-
setActiveOptionIndex((prev) => Math.max(prev - 1, 0));
|
|
132
|
-
break;
|
|
133
|
-
case "Home":
|
|
134
|
-
e.preventDefault();
|
|
135
|
-
setActiveOptionIndex(0);
|
|
136
|
-
break;
|
|
137
|
-
case "End":
|
|
138
|
-
e.preventDefault();
|
|
139
|
-
setActiveOptionIndex(Math.max(filteredOptions.length - 1, 0));
|
|
140
|
-
break;
|
|
141
|
-
case "Enter":
|
|
142
|
-
e.preventDefault();
|
|
143
|
-
if (activeOptionIndex >= 0 && !filteredOptions[activeOptionIndex].disabled) {
|
|
144
|
-
handleValueChange(filteredOptions[activeOptionIndex].value);
|
|
145
|
-
}
|
|
146
|
-
break;
|
|
147
|
-
case "Escape":
|
|
148
|
-
wasEscapeKey = true;
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
if (!wasEscapeKey) {
|
|
152
|
-
e.stopPropagation();
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
[filteredOptions, activeOptionIndex, handleValueChange]
|
|
156
|
-
);
|
|
157
|
-
return /* @__PURE__ */ jsxs(
|
|
158
|
-
"div",
|
|
159
|
-
{
|
|
160
|
-
ref,
|
|
161
|
-
role: "combobox",
|
|
162
|
-
className: clsx("bui-MenuCombobox", className),
|
|
163
|
-
...rest,
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ jsx(
|
|
166
|
-
"input",
|
|
167
|
-
{
|
|
168
|
-
className: "bui-SubmenuComboboxSearch",
|
|
169
|
-
type: "text",
|
|
170
|
-
role: "combobox",
|
|
171
|
-
placeholder: "Filter...",
|
|
172
|
-
"aria-labelledby": triggerId,
|
|
173
|
-
"aria-controls": listboxId,
|
|
174
|
-
"aria-autocomplete": "list",
|
|
175
|
-
"aria-activedescendant": activeDescendantId,
|
|
176
|
-
"aria-expanded": "true",
|
|
177
|
-
"aria-haspopup": "listbox",
|
|
178
|
-
value: filterString,
|
|
179
|
-
onKeyDown: handleKeyDown,
|
|
180
|
-
onChange: handleSearchChange
|
|
181
|
-
}
|
|
182
|
-
),
|
|
183
|
-
/* @__PURE__ */ jsx(
|
|
184
|
-
"div",
|
|
185
|
-
{
|
|
186
|
-
role: "listbox",
|
|
187
|
-
id: listboxId,
|
|
188
|
-
tabIndex: -1,
|
|
189
|
-
"aria-multiselectable": multiselect ? true : void 0,
|
|
190
|
-
className: "bui-SubmenuComboboxItems",
|
|
191
|
-
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "bui-SubmenuComboboxNoResults", children: "No results found" }) : filteredOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
192
|
-
ComboboxItem,
|
|
193
|
-
{
|
|
194
|
-
option,
|
|
195
|
-
optionIndex: index,
|
|
196
|
-
value,
|
|
197
|
-
activeOptionIndex,
|
|
198
|
-
onItemActive: setActiveOptionIndex,
|
|
199
|
-
onItemSelect: handleValueChange,
|
|
200
|
-
listboxId
|
|
201
|
-
},
|
|
202
|
-
option.value
|
|
203
|
-
))
|
|
204
|
-
}
|
|
205
|
-
)
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
Combobox.displayName = "Combobox";
|
|
212
|
-
|
|
213
|
-
export { Combobox };
|
|
214
|
-
//# sourceMappingURL=Combobox.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.esm.js","sources":["../../../src/components/Menu/Combobox.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 forwardRef,\n useState,\n useMemo,\n useCallback,\n ChangeEvent,\n KeyboardEvent,\n useRef,\n useEffect,\n} from 'react';\nimport clsx from 'clsx';\nimport { MenuComboboxOption, MenuComboboxProps } from './types';\nimport { Icon } from '../..';\nimport { useId } from 'react-aria';\n\nconst getListboxItemId = (listboxId: string, optionValue: string): string =>\n `${listboxId}-option-${optionValue}`;\n\n// Internal component for rendering individual items\nfunction ComboboxItem({\n option,\n optionIndex,\n value,\n activeOptionIndex,\n onItemActive,\n onItemSelect,\n listboxId,\n}: {\n option: MenuComboboxOption;\n optionIndex: number;\n value?: string[];\n activeOptionIndex: number;\n onItemActive: (index: number) => void;\n onItemSelect: (value: string) => void;\n listboxId: string;\n}) {\n const isSelected = value?.includes(option.value) ?? false;\n const isHighlighted = optionIndex === activeOptionIndex;\n const itemId = getListboxItemId(listboxId, option.value);\n\n const itemRef = useRef<HTMLDivElement>(null);\n\n // Scroll the item into view when it becomes highlighted\n useEffect(() => {\n if (isHighlighted && itemRef.current) {\n itemRef.current.scrollIntoView({ block: 'nearest' });\n }\n }, [isHighlighted]);\n\n return (\n <div\n ref={itemRef}\n className=\"bui-SubmenuComboboxItem\"\n id={itemId}\n role=\"option\"\n aria-selected={isSelected}\n data-highlighted={isHighlighted ? true : undefined}\n data-selected={isSelected ? true : undefined}\n data-disabled={option.disabled ? true : undefined}\n onMouseOver={() => !option.disabled && onItemActive(optionIndex)}\n onClick={() => !option.disabled && onItemSelect(option.value)}\n >\n <div className=\"bui-SubmenuComboboxItemCheckbox\">\n {isSelected && <Icon aria-hidden=\"true\" name=\"check\" size={12} />}\n </div>\n <div className=\"bui-SubmenuComboboxItemLabel\">{option.label}</div>\n </div>\n );\n}\n\n/** @public */\nexport const Combobox = forwardRef<HTMLDivElement, MenuComboboxProps>(\n (props, ref) => {\n const {\n options,\n value,\n onValueChange,\n multiselect = false,\n className,\n ...rest\n } = props;\n\n const triggerId = useId();\n const listboxId = `${triggerId}-listbox`;\n\n // State management\n const [filterString, setFilterString] = useState<string>('');\n const [activeOptionIndex, setActiveOptionIndex] = useState<number>(0);\n\n // Filter options based on input\n const filteredOptions = useMemo(() => {\n if (!filterString) return options;\n const lowerFilterString = filterString.toLocaleLowerCase('en-US');\n return options.filter(option =>\n option.label.toLocaleLowerCase('en-US').includes(lowerFilterString),\n );\n }, [filterString, options]);\n\n // Get the active descendant ID for accessibility\n const activeDescendantId =\n activeOptionIndex >= 0 && filteredOptions.length > 0\n ? getListboxItemId(listboxId, filteredOptions[activeOptionIndex].value)\n : undefined;\n\n const handleValueChange = useCallback(\n (toggledValue: string) => {\n let newValue: string[];\n if (multiselect) {\n newValue = value?.includes(toggledValue)\n ? value.filter(v => v !== toggledValue)\n : [...(value ?? []), toggledValue];\n } else {\n newValue = value?.includes(toggledValue) ? [] : [toggledValue];\n }\n\n onValueChange?.(newValue);\n },\n [multiselect, onValueChange, value],\n );\n\n const handleSearchChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n setFilterString(e.target.value);\n setActiveOptionIndex(0);\n e.preventDefault();\n },\n [],\n );\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n let wasEscapeKey = false;\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n setActiveOptionIndex(prev =>\n Math.min(prev + 1, filteredOptions.length - 1),\n );\n break;\n case 'ArrowUp':\n e.preventDefault();\n setActiveOptionIndex(prev => Math.max(prev - 1, 0));\n break;\n case 'Home':\n e.preventDefault();\n setActiveOptionIndex(0);\n break;\n case 'End':\n e.preventDefault();\n setActiveOptionIndex(Math.max(filteredOptions.length - 1, 0));\n break;\n case 'Enter':\n e.preventDefault();\n if (\n activeOptionIndex >= 0 &&\n !filteredOptions[activeOptionIndex].disabled\n ) {\n handleValueChange(filteredOptions[activeOptionIndex].value);\n }\n break;\n case 'Escape':\n // The Menu component should handle this\n wasEscapeKey = true;\n break;\n default:\n break;\n }\n\n if (!wasEscapeKey) {\n // Stop propagation so Menu components don't prevent the input from updating\n e.stopPropagation();\n }\n },\n [filteredOptions, activeOptionIndex, handleValueChange],\n );\n\n return (\n <div\n ref={ref}\n role=\"combobox\"\n className={clsx('bui-MenuCombobox', className)}\n {...rest}\n >\n <input\n className=\"bui-SubmenuComboboxSearch\"\n type=\"text\"\n role=\"combobox\"\n placeholder=\"Filter...\"\n aria-labelledby={triggerId}\n aria-controls={listboxId}\n aria-autocomplete=\"list\"\n aria-activedescendant={activeDescendantId}\n aria-expanded=\"true\"\n aria-haspopup=\"listbox\"\n value={filterString}\n onKeyDown={handleKeyDown}\n onChange={handleSearchChange}\n />\n <div\n role=\"listbox\"\n id={listboxId}\n tabIndex={-1}\n aria-multiselectable={multiselect ? true : undefined}\n className=\"bui-SubmenuComboboxItems\"\n >\n {filteredOptions.length === 0 ? (\n <div className=\"bui-SubmenuComboboxNoResults\">No results found</div>\n ) : (\n filteredOptions.map((option, index) => (\n <ComboboxItem\n key={option.value}\n option={option}\n optionIndex={index}\n value={value}\n activeOptionIndex={activeOptionIndex}\n onItemActive={setActiveOptionIndex}\n onItemSelect={handleValueChange}\n listboxId={listboxId}\n />\n ))\n )}\n </div>\n </div>\n );\n },\n);\nCombobox.displayName = 'Combobox';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,mBAAmB,CAAC,SAAA,EAAmB,gBAC3C,CAAG,EAAA,SAAS,WAAW,WAAW,CAAA,CAAA;AAGpC,SAAS,YAAa,CAAA;AAAA,EACpB,MAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,iBAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAQG,EAAA;AACD,EAAA,MAAM,UAAa,GAAA,KAAA,EAAO,QAAS,CAAA,MAAA,CAAO,KAAK,CAAK,IAAA,KAAA;AACpD,EAAA,MAAM,gBAAgB,WAAgB,KAAA,iBAAA;AACtC,EAAA,MAAM,MAAS,GAAA,gBAAA,CAAiB,SAAW,EAAA,MAAA,CAAO,KAAK,CAAA;AAEvD,EAAM,MAAA,OAAA,GAAU,OAAuB,IAAI,CAAA;AAG3C,EAAA,SAAA,CAAU,MAAM;AACd,IAAI,IAAA,aAAA,IAAiB,QAAQ,OAAS,EAAA;AACpC,MAAA,OAAA,CAAQ,OA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