@backstage/ui 0.13.0-next.1 → 0.13.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/analytics/BUIProvider.esm.js +18 -0
- package/dist/analytics/BUIProvider.esm.js.map +1 -0
- package/dist/analytics/getNodeText.esm.js +21 -0
- package/dist/analytics/getNodeText.esm.js.map +1 -0
- package/dist/analytics/useAnalytics.esm.js +26 -0
- package/dist/analytics/useAnalytics.esm.js.map +1 -0
- package/dist/components/Accordion/definition.esm.js +1 -0
- package/dist/components/Accordion/definition.esm.js.map +1 -1
- package/dist/components/Alert/definition.esm.js +1 -0
- package/dist/components/Alert/definition.esm.js.map +1 -1
- package/dist/components/Avatar/definition.esm.js +1 -0
- package/dist/components/Avatar/definition.esm.js.map +1 -1
- package/dist/components/Box/definition.esm.js +1 -0
- package/dist/components/Box/definition.esm.js.map +1 -1
- package/dist/components/Button/definition.esm.js +1 -0
- package/dist/components/Button/definition.esm.js.map +1 -1
- package/dist/components/ButtonIcon/definition.esm.js +1 -0
- package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.esm.js +10 -1
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/ButtonLink/definition.esm.js +3 -0
- package/dist/components/ButtonLink/definition.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +66 -5
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Card/Card.module.css.esm.js +2 -2
- package/dist/components/Card/definition.esm.js +10 -2
- package/dist/components/Card/definition.esm.js.map +1 -1
- package/dist/components/Checkbox/definition.esm.js +1 -0
- package/dist/components/Checkbox/definition.esm.js.map +1 -1
- package/dist/components/Container/definition.esm.js +1 -0
- package/dist/components/Container/definition.esm.js.map +1 -1
- package/dist/components/Dialog/definition.esm.js +1 -0
- package/dist/components/Dialog/definition.esm.js.map +1 -1
- package/dist/components/FieldError/definition.esm.js +1 -0
- package/dist/components/FieldError/definition.esm.js.map +1 -1
- package/dist/components/FieldLabel/definition.esm.js +1 -0
- package/dist/components/FieldLabel/definition.esm.js.map +1 -1
- package/dist/components/Flex/Flex.esm.js +2 -1
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/definition.esm.js +1 -0
- package/dist/components/Flex/definition.esm.js.map +1 -1
- package/dist/components/FullPage/definition.esm.js +1 -0
- package/dist/components/FullPage/definition.esm.js.map +1 -1
- package/dist/components/Grid/Grid.esm.js +4 -2
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/definition.esm.js +1 -0
- package/dist/components/Grid/definition.esm.js.map +1 -1
- package/dist/components/{HeaderPage/HeaderPage.esm.js → Header/Header.esm.js} +6 -5
- package/dist/components/Header/Header.esm.js.map +1 -0
- package/dist/components/Header/Header.module.css.esm.js +8 -0
- package/dist/components/Header/Header.module.css.esm.js.map +1 -0
- package/dist/components/{HeaderPage → Header}/definition.esm.js +5 -3
- package/dist/components/Header/definition.esm.js.map +1 -0
- package/dist/components/Link/Link.esm.js +10 -1
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Link/definition.esm.js +3 -0
- package/dist/components/Link/definition.esm.js.map +1 -1
- package/dist/components/Menu/Menu.esm.js +19 -2
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/Menu/definition.esm.js +3 -0
- package/dist/components/Menu/definition.esm.js.map +1 -1
- package/dist/components/PasswordField/definition.esm.js +1 -0
- package/dist/components/PasswordField/definition.esm.js.map +1 -1
- package/dist/components/PluginHeader/PluginHeader.esm.js +3 -1
- package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
- package/dist/components/PluginHeader/definition.esm.js +1 -0
- package/dist/components/PluginHeader/definition.esm.js.map +1 -1
- package/dist/components/Popover/definition.esm.js +1 -0
- package/dist/components/Popover/definition.esm.js.map +1 -1
- package/dist/components/RadioGroup/definition.esm.js +1 -0
- package/dist/components/RadioGroup/definition.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
- package/dist/components/SearchField/definition.esm.js +2 -0
- package/dist/components/SearchField/definition.esm.js.map +1 -1
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Select/SelectTrigger.esm.js +5 -2
- package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
- package/dist/components/Select/definition.esm.js +2 -0
- package/dist/components/Select/definition.esm.js.map +1 -1
- package/dist/components/Skeleton/definition.esm.js +1 -0
- package/dist/components/Skeleton/definition.esm.js.map +1 -1
- package/dist/components/Switch/definition.esm.js +1 -0
- package/dist/components/Switch/definition.esm.js.map +1 -1
- package/dist/components/Table/Table.module.css.esm.js +2 -2
- package/dist/components/Table/components/Column.esm.js +1 -1
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js +14 -1
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js +1 -0
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/definition.esm.js +5 -1
- package/dist/components/Table/definition.esm.js.map +1 -1
- package/dist/components/TablePagination/definition.esm.js +1 -0
- package/dist/components/TablePagination/definition.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js +19 -3
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/definition.esm.js +4 -1
- package/dist/components/Tabs/definition.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +14 -1
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
- package/dist/components/TagGroup/definition.esm.js +3 -0
- package/dist/components/TagGroup/definition.esm.js.map +1 -1
- package/dist/components/Text/definition.esm.js +1 -0
- package/dist/components/Text/definition.esm.js.map +1 -1
- package/dist/components/TextField/TextField.module.css.esm.js +2 -2
- package/dist/components/TextField/definition.esm.js +2 -0
- package/dist/components/TextField/definition.esm.js.map +1 -1
- package/dist/components/ToggleButton/definition.esm.js +1 -0
- package/dist/components/ToggleButton/definition.esm.js.map +1 -1
- package/dist/components/ToggleButtonGroup/definition.esm.js +1 -0
- package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
- package/dist/components/Tooltip/definition.esm.js +1 -0
- package/dist/components/Tooltip/definition.esm.js.map +1 -1
- package/dist/components/VisuallyHidden/definition.esm.js +1 -0
- package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
- package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
- package/dist/hooks/useDefinition/useDefinition.esm.js +8 -1
- package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
- package/dist/index.d.ts +192 -18
- package/dist/index.esm.js +5 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +0 -1
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js +0 -8
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js.map +0 -1
- package/dist/components/HeaderPage/definition.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @backstage/ui
|
|
2
2
|
|
|
3
|
+
## 0.13.0-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- db92751: Added interactive support to the `Card` component. Pass `onPress` to make the entire card surface pressable, or `href` to make it navigate to a URL. A transparent overlay handles the interaction while nested buttons and links remain independently clickable.
|
|
8
|
+
- 12d8afe: Added analytics capabilities to the component library. Components with navigation behavior (Link, ButtonLink, Tab, MenuItem, Tag, Row) now fire analytics events on click when a `BUIProvider` is present.
|
|
9
|
+
|
|
10
|
+
New exports: `BUIProvider`, `useAnalytics`, `getNodeText`, and associated types (`AnalyticsTracker`, `UseAnalyticsFn`, `BUIProviderProps`, `AnalyticsEventAttributes`).
|
|
11
|
+
|
|
12
|
+
Components with analytics support now accept a `noTrack` prop to suppress event firing.
|
|
13
|
+
|
|
14
|
+
**Affected components:** Link, ButtonLink, Tab, MenuItem, Tag, Row
|
|
15
|
+
|
|
16
|
+
- 430d5ed: Fixed interactive cards so that CardBody can scroll when the card has a constrained height. Previously, the overlay element blocked scroll events.
|
|
17
|
+
|
|
18
|
+
**Affected components:** Card
|
|
19
|
+
|
|
20
|
+
- ad7c883: Deprecated the `HeaderPage` component name in favor of `Header`. The old `HeaderPage`, `HeaderPageProps`, `HeaderPageOwnProps`, `HeaderPageBreadcrumb`, and `HeaderPageDefinition` exports are still available as deprecated aliases.
|
|
21
|
+
- f42f4cc: Fixed Table column headers overflowing and wrapping when there is not enough space. Headers now truncate with ellipsis instead.
|
|
22
|
+
|
|
23
|
+
**Affected components:** Table
|
|
24
|
+
|
|
25
|
+
- fbd5c5a: Fixed Table rows showing a pointer cursor when not interactive. Rows now only show `cursor: pointer` when they have an `href`, are selectable, or are pressable.
|
|
26
|
+
|
|
27
|
+
**Affected components:** Table
|
|
28
|
+
|
|
29
|
+
- 7960d54: Added support for native HTML div attributes on the `Flex`, `Grid`, and `Grid.Item` components.
|
|
30
|
+
|
|
31
|
+
**Affected components:** Flex, Grid, Grid.Item
|
|
32
|
+
|
|
33
|
+
- 12d8afe: Fixed MenuItem `onAction` prop ordering so user-provided `onAction` handlers are chained rather than silently overwritten.
|
|
34
|
+
- bb66b86: The `Select` trigger now automatically adapts its background colour based on the parent background context.
|
|
35
|
+
|
|
36
|
+
**Affected components:** Select
|
|
37
|
+
|
|
38
|
+
- 934ac03: `SearchField` and `TextField` now automatically adapt their background color based on the parent bg context, stepping up one neutral level (e.g. neutral-1 → neutral-2) when placed on a neutral background. `TextField` also gains a focus ring using the `--bui-ring` token.
|
|
39
|
+
|
|
40
|
+
**Affected components:** SearchField, TextField
|
|
41
|
+
|
|
3
42
|
## 0.13.0-next.1
|
|
4
43
|
|
|
5
44
|
### Minor Changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { createVersionedValueMap } from '@backstage/version-bridge';
|
|
4
|
+
import { BUIContext } from './useAnalytics.esm.js';
|
|
5
|
+
|
|
6
|
+
function BUIProvider(props) {
|
|
7
|
+
const { useAnalytics, children } = props;
|
|
8
|
+
const value = useMemo(
|
|
9
|
+
() => createVersionedValueMap({
|
|
10
|
+
1: { useAnalytics }
|
|
11
|
+
}),
|
|
12
|
+
[useAnalytics]
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ jsx(BUIContext.Provider, { value, children });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { BUIProvider };
|
|
18
|
+
//# sourceMappingURL=BUIProvider.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BUIProvider.esm.js","sources":["../../src/analytics/BUIProvider.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo, type ReactNode } from 'react';\nimport { createVersionedValueMap } from '@backstage/version-bridge';\nimport { BUIContext } from './useAnalytics';\nimport type { UseAnalyticsFn } from './types';\n\n/** @public */\nexport type BUIProviderProps = {\n useAnalytics?: UseAnalyticsFn;\n children: ReactNode;\n};\n\n/**\n * Provides integration capabilities to all descendant BUI components.\n *\n * @example\n * ```tsx\n * import { BUIProvider } from '@backstage/ui';\n * import { useAnalytics as useBackstageAnalytics } from '@backstage/core-plugin-api';\n *\n * function App() {\n * return (\n * <BUIProvider useAnalytics={useBackstageAnalytics}>\n * <AppContent />\n * </BUIProvider>\n * );\n * }\n * ```\n *\n * @public\n */\nexport function BUIProvider(props: BUIProviderProps) {\n const { useAnalytics, children } = props;\n const value = useMemo(\n () =>\n createVersionedValueMap({\n 1: { useAnalytics },\n }),\n [useAnalytics],\n );\n return <BUIContext.Provider value={value}>{children}</BUIContext.Provider>;\n}\n"],"names":[],"mappings":";;;;;AA8CO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,MAAM,EAAE,YAAA,EAAc,QAAA,EAAS,GAAI,KAAA;AACnC,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,MACE,uBAAA,CAAwB;AAAA,MACtB,CAAA,EAAG,EAAE,YAAA;AAAa,KACnB,CAAA;AAAA,IACH,CAAC,YAAY;AAAA,GACf;AACA,EAAA,uBAAO,GAAA,CAAC,UAAA,CAAW,QAAA,EAAX,EAAoB,OAAe,QAAA,EAAS,CAAA;AACtD;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Children, isValidElement } from 'react';
|
|
2
|
+
|
|
3
|
+
function getNodeText(node) {
|
|
4
|
+
if (typeof node === "function") {
|
|
5
|
+
return void 0;
|
|
6
|
+
}
|
|
7
|
+
if (Array.isArray(node)) {
|
|
8
|
+
const text = Children.map(node, getNodeText)?.filter(Boolean).join(" ");
|
|
9
|
+
return text || void 0;
|
|
10
|
+
}
|
|
11
|
+
if (isValidElement(node)) {
|
|
12
|
+
return getNodeText(node.props.children);
|
|
13
|
+
}
|
|
14
|
+
if (typeof node === "string" || typeof node === "number") {
|
|
15
|
+
return String(node);
|
|
16
|
+
}
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { getNodeText };
|
|
21
|
+
//# sourceMappingURL=getNodeText.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNodeText.esm.js","sources":["../../src/analytics/getNodeText.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type ReactNode, isValidElement, Children } from 'react';\n\n/**\n * Recursively extracts text content from a React node tree.\n * Returns undefined if no text content is found (e.g. icon-only children\n * or render functions).\n *\n * @public\n */\nexport function getNodeText(\n node: ReactNode | ((...args: any[]) => ReactNode),\n): string | undefined {\n if (typeof node === 'function') {\n return undefined;\n }\n if (Array.isArray(node)) {\n const text = Children.map(node, getNodeText)?.filter(Boolean).join(' ');\n return text || undefined;\n }\n if (isValidElement(node)) {\n return getNodeText(node.props.children);\n }\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node);\n }\n return undefined;\n}\n"],"names":[],"mappings":";;AAyBO,SAAS,YACd,IAAA,EACoB;AACpB,EAAA,IAAI,OAAO,SAAS,UAAA,EAAY;AAC9B,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,EAAG;AACvB,IAAA,MAAM,IAAA,GAAO,QAAA,CAAS,GAAA,CAAI,IAAA,EAAM,WAAW,GAAG,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AACtE,IAAA,OAAO,IAAA,IAAQ,MAAA;AAAA,EACjB;AACA,EAAA,IAAI,cAAA,CAAe,IAAI,CAAA,EAAG;AACxB,IAAA,OAAO,WAAA,CAAY,IAAA,CAAK,KAAA,CAAM,QAAQ,CAAA;AAAA,EACxC;AACA,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,OAAO,SAAS,QAAA,EAAU;AACxD,IAAA,OAAO,OAAO,IAAI,CAAA;AAAA,EACpB;AACA,EAAA,OAAO,MAAA;AACT;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { createVersionedContext, useVersionedContext } from '@backstage/version-bridge';
|
|
3
|
+
|
|
4
|
+
const noopTracker = {
|
|
5
|
+
captureEvent: () => {
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
const noopUseAnalytics = () => noopTracker;
|
|
9
|
+
const BUIContext = createVersionedContext("bui");
|
|
10
|
+
function useAnalytics() {
|
|
11
|
+
const ctx = useVersionedContext("bui")?.atVersion(1);
|
|
12
|
+
const impl = ctx?.useAnalytics ?? noopUseAnalytics;
|
|
13
|
+
if (process.env.NODE_ENV !== "production") {
|
|
14
|
+
const prevImpl = useRef(impl);
|
|
15
|
+
if (prevImpl.current === noopUseAnalytics !== (impl === noopUseAnalytics)) {
|
|
16
|
+
throw new Error(
|
|
17
|
+
"@backstage/ui: The analytics hook changed between a noop and a real implementation. Ensure <BUIProvider> wraps all BUI components from first render."
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
prevImpl.current = impl;
|
|
21
|
+
}
|
|
22
|
+
return impl();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { BUIContext, noopTracker, useAnalytics };
|
|
26
|
+
//# sourceMappingURL=useAnalytics.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnalytics.esm.js","sources":["../../src/analytics/useAnalytics.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRef } from 'react';\nimport {\n createVersionedContext,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport type { AnalyticsTracker, UseAnalyticsFn } from './types';\n\n/** @internal */\nexport const noopTracker: AnalyticsTracker = {\n captureEvent: () => {},\n};\n\nconst noopUseAnalytics: UseAnalyticsFn = () => noopTracker;\n\n/** @internal */\nexport type BUIContextValue = {\n useAnalytics?: UseAnalyticsFn;\n};\n\n/** @internal */\nexport const BUIContext = createVersionedContext<{\n 1: BUIContextValue;\n}>('bui');\n\n/**\n * Returns an AnalyticsTracker for capturing analytics events.\n *\n * By default returns a noop tracker. When a `BUIProvider` is present\n * in the tree, returns the tracker provided by the consumer's hook.\n *\n * @public\n */\nexport function useAnalytics(): AnalyticsTracker {\n const ctx = useVersionedContext<{ 1: BUIContextValue }>('bui')?.atVersion(1);\n const impl = ctx?.useAnalytics ?? noopUseAnalytics;\n\n if (process.env.NODE_ENV !== 'production') {\n const prevImpl = useRef(impl);\n if (\n (prevImpl.current === noopUseAnalytics) !==\n (impl === noopUseAnalytics)\n ) {\n throw new Error(\n '@backstage/ui: The analytics hook changed between a noop and a real ' +\n 'implementation. Ensure <BUIProvider> wraps all BUI components from first render.',\n );\n }\n prevImpl.current = impl;\n }\n\n return impl();\n}\n"],"names":[],"mappings":";;;AAwBO,MAAM,WAAA,GAAgC;AAAA,EAC3C,cAAc,MAAM;AAAA,EAAC;AACvB;AAEA,MAAM,mBAAmC,MAAM,WAAA;AAQxC,MAAM,UAAA,GAAa,uBAEvB,KAAK;AAUD,SAAS,YAAA,GAAiC;AAC/C,EAAA,MAAM,GAAA,GAAM,mBAAA,CAA4C,KAAK,CAAA,EAAG,UAAU,CAAC,CAAA;AAC3E,EAAA,MAAM,IAAA,GAAO,KAAK,YAAA,IAAgB,gBAAA;AAElC,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,EAAc;AACzC,IAAA,MAAM,QAAA,GAAW,OAAO,IAAI,CAAA;AAC5B,IAAA,IACG,QAAA,CAAS,OAAA,KAAY,gBAAA,MACrB,IAAA,KAAS,gBAAA,CAAA,EACV;AACA,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,QAAA,CAAS,OAAA,GAAU,IAAA;AAAA,EACrB;AAEA,EAAA,OAAO,IAAA,EAAK;AACd;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Accordion.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Accordion/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n AccordionOwnProps,\n AccordionTriggerOwnProps,\n AccordionPanelOwnProps,\n AccordionGroupOwnProps,\n} from './types';\nimport styles from './Accordion.module.css';\n\n/**\n * Component definition for Accordion\n * @public\n */\nexport const AccordionDefinition = defineComponent<AccordionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Accordion',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true, default: 'neutral' },\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for AccordionTrigger\n * @public\n */\nexport const AccordionTriggerDefinition =\n defineComponent<AccordionTriggerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionTrigger',\n button: 'bui-AccordionTriggerButton',\n title: 'bui-AccordionTriggerTitle',\n subtitle: 'bui-AccordionTriggerSubtitle',\n icon: 'bui-AccordionTriggerIcon',\n },\n propDefs: {\n className: {},\n title: {},\n subtitle: {},\n children: {},\n },\n });\n\n/**\n * Component definition for AccordionPanel\n * @public\n */\nexport const AccordionPanelDefinition =\n defineComponent<AccordionPanelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionPanel',\n },\n propDefs: {\n className: {},\n },\n });\n\n/**\n * Component definition for AccordionGroup\n * @public\n */\nexport const AccordionGroupDefinition =\n defineComponent<AccordionGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionGroup',\n },\n propDefs: {\n className: {},\n allowsMultiple: { default: false },\n },\n });\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Accordion/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n AccordionOwnProps,\n AccordionTriggerOwnProps,\n AccordionPanelOwnProps,\n AccordionGroupOwnProps,\n} from './types';\nimport styles from './Accordion.module.css';\n\n/**\n * Component definition for Accordion\n * @public\n */\nexport const AccordionDefinition = defineComponent<AccordionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Accordion',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true, default: 'neutral' },\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for AccordionTrigger\n * @public\n */\nexport const AccordionTriggerDefinition =\n defineComponent<AccordionTriggerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionTrigger',\n button: 'bui-AccordionTriggerButton',\n title: 'bui-AccordionTriggerTitle',\n subtitle: 'bui-AccordionTriggerSubtitle',\n icon: 'bui-AccordionTriggerIcon',\n },\n propDefs: {\n className: {},\n title: {},\n subtitle: {},\n children: {},\n },\n });\n\n/**\n * Component definition for AccordionPanel\n * @public\n */\nexport const AccordionPanelDefinition =\n defineComponent<AccordionPanelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionPanel',\n },\n propDefs: {\n className: {},\n },\n });\n\n/**\n * Component definition for AccordionGroup\n * @public\n */\nexport const AccordionGroupDefinition =\n defineComponent<AccordionGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionGroup',\n },\n propDefs: {\n className: {},\n allowsMultiple: { default: false },\n },\n });\n"],"names":[],"mappings":";;;;;;;;;AA6BO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,0BAAA,GACX,iBAA0C,CAAE;AAAA,EAC1C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,sBAAA;AAAA,IACN,MAAA,EAAQ,4BAAA;AAAA,IACR,KAAA,EAAO,2BAAA;AAAA,IACP,QAAA,EAAU,8BAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,UAAU;AAAC;AAEf,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,cAAA,EAAgB,EAAE,OAAA,EAAS,KAAA;AAAM;AAErC,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Alert.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Alert/definition.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\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AlertOwnProps } from './types';\nimport styles from './Alert.module.css';\n\n/**\n * Component definition for Alert\n * @public\n */\nexport const AlertDefinition = defineComponent<AlertOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Alert',\n contentWrapper: 'bui-AlertContentWrapper',\n content: 'bui-AlertContent',\n title: 'bui-AlertTitle',\n description: 'bui-AlertDescription',\n icon: 'bui-AlertIcon',\n spinner: 'bui-AlertSpinner',\n actions: 'bui-AlertActions',\n },\n propDefs: {\n status: { dataAttribute: true, default: 'info' },\n loading: { dataAttribute: true },\n icon: {},\n customActions: {},\n title: {},\n description: {},\n className: {},\n style: {},\n },\n utilityProps: ['m', 'mb', 'ml', 'mr', 'mt', 'mx', 'my'],\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Alert/definition.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\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AlertOwnProps } from './types';\nimport styles from './Alert.module.css';\n\n/**\n * Component definition for Alert\n * @public\n */\nexport const AlertDefinition = defineComponent<AlertOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Alert',\n contentWrapper: 'bui-AlertContentWrapper',\n content: 'bui-AlertContent',\n title: 'bui-AlertTitle',\n description: 'bui-AlertDescription',\n icon: 'bui-AlertIcon',\n spinner: 'bui-AlertSpinner',\n actions: 'bui-AlertActions',\n },\n propDefs: {\n status: { dataAttribute: true, default: 'info' },\n loading: { dataAttribute: true },\n icon: {},\n customActions: {},\n title: {},\n description: {},\n className: {},\n style: {},\n },\n utilityProps: ['m', 'mb', 'ml', 'mr', 'mt', 'mx', 'my'],\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,eAAA,GAAkB,iBAA+B,CAAE;AAAA,EAC9D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,WAAA;AAAA,IACN,cAAA,EAAgB,yBAAA;AAAA,IAChB,OAAA,EAAS,kBAAA;AAAA,IACT,KAAA,EAAO,gBAAA;AAAA,IACP,WAAA,EAAa,sBAAA;AAAA,IACb,IAAA,EAAM,eAAA;AAAA,IACN,OAAA,EAAS,kBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,MAAA,EAAO;AAAA,IAC/C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,MAAM,EAAC;AAAA,IACP,eAAe,EAAC;AAAA,IAChB,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,GAAA,EAAK,IAAA,EAAM,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,IAAI;AACxD,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Avatar.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Avatar/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AvatarOwnProps } from './types';\nimport styles from './Avatar.module.css';\n\n/**\n * Component definition for Avatar\n * @public\n */\nexport const AvatarDefinition = defineComponent<AvatarOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'medium' },\n purpose: { default: 'informative' },\n src: {},\n name: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Avatar/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AvatarOwnProps } from './types';\nimport styles from './Avatar.module.css';\n\n/**\n * Component definition for Avatar\n * @public\n */\nexport const AvatarDefinition = defineComponent<AvatarOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'medium' },\n purpose: { default: 'informative' },\n src: {},\n name: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,KAAA,EAAO,iBAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,QAAA,EAAS;AAAA,IAC/C,OAAA,EAAS,EAAE,OAAA,EAAS,aAAA,EAAc;AAAA,IAClC,KAAK,EAAC;AAAA,IACN,MAAM,EAAC;AAAA,IACP,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Box.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Box/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { BoxOwnProps } from './types';\nimport styles from './Box.module.css';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = defineComponent<BoxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Box',\n },\n bg: 'provider',\n propDefs: {\n as: { default: 'div' },\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'position',\n 'display',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n ],\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Box/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { BoxOwnProps } from './types';\nimport styles from './Box.module.css';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = defineComponent<BoxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Box',\n },\n bg: 'provider',\n propDefs: {\n as: { default: 'div' },\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'position',\n 'display',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,KAAA,EAAM;AAAA,IACrB,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Button.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Button/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonOwnProps } from './types';\nimport styles from './Button.module.css';\n\n/**\n * Component definition for Button\n * @public\n */\nexport const ButtonDefinition = defineComponent<ButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Button',\n content: 'bui-ButtonContent',\n spinner: 'bui-ButtonSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n destructive: { dataAttribute: true },\n loading: { dataAttribute: true },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Button/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonOwnProps } from './types';\nimport styles from './Button.module.css';\n\n/**\n * Component definition for Button\n * @public\n */\nexport const ButtonDefinition = defineComponent<ButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Button',\n content: 'bui-ButtonContent',\n spinner: 'bui-ButtonSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n destructive: { dataAttribute: true },\n loading: { dataAttribute: true },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,WAAA,EAAa,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACnC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './ButtonIcon.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/ButtonIcon/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonIconOwnProps } from './types';\nimport styles from './ButtonIcon.module.css';\n\n/**\n * Component definition for ButtonIcon\n * @public\n */\nexport const ButtonIconDefinition = defineComponent<ButtonIconOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonIcon',\n content: 'bui-ButtonIconContent',\n spinner: 'bui-ButtonIconSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n loading: { dataAttribute: true },\n icon: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/ButtonIcon/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonIconOwnProps } from './types';\nimport styles from './ButtonIcon.module.css';\n\n/**\n * Component definition for ButtonIcon\n * @public\n */\nexport const ButtonIconDefinition = defineComponent<ButtonIconOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonIcon',\n content: 'bui-ButtonIconContent',\n spinner: 'bui-ButtonIconSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n loading: { dataAttribute: true },\n icon: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,OAAA,EAAS,uBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,MAAM,EAAC;AAAA,IACP,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -4,14 +4,22 @@ import { Link } from 'react-aria-components';
|
|
|
4
4
|
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
5
5
|
import { ButtonLinkDefinition } from './definition.esm.js';
|
|
6
6
|
import { InternalLinkProvider } from '../InternalLinkProvider/InternalLinkProvider.esm.js';
|
|
7
|
+
import { getNodeText } from '../../analytics/getNodeText.esm.js';
|
|
7
8
|
|
|
8
9
|
const ButtonLink = forwardRef(
|
|
9
10
|
(props, ref) => {
|
|
10
|
-
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
11
|
+
const { ownProps, restProps, dataAttributes, analytics } = useDefinition(
|
|
11
12
|
ButtonLinkDefinition,
|
|
12
13
|
props
|
|
13
14
|
);
|
|
14
15
|
const { classes, iconStart, iconEnd, children } = ownProps;
|
|
16
|
+
const handlePress = (e) => {
|
|
17
|
+
restProps.onPress?.(e);
|
|
18
|
+
const text = restProps["aria-label"] ?? getNodeText(children) ?? String(restProps.href ?? "");
|
|
19
|
+
analytics.captureEvent("click", text, {
|
|
20
|
+
attributes: { to: String(restProps.href ?? "") }
|
|
21
|
+
});
|
|
22
|
+
};
|
|
15
23
|
return /* @__PURE__ */ jsx(InternalLinkProvider, { href: restProps.href, children: /* @__PURE__ */ jsx(
|
|
16
24
|
Link,
|
|
17
25
|
{
|
|
@@ -19,6 +27,7 @@ const ButtonLink = forwardRef(
|
|
|
19
27
|
ref,
|
|
20
28
|
...dataAttributes,
|
|
21
29
|
...restProps,
|
|
30
|
+
onPress: handlePress,
|
|
22
31
|
children: /* @__PURE__ */ jsxs("span", { className: classes.content, children: [
|
|
23
32
|
iconStart,
|
|
24
33
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonLink.esm.js","sources":["../../../src/components/ButtonLink/ButtonLink.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, Ref } from 'react';\nimport { Link as RALink } from 'react-aria-components';\nimport type { ButtonLinkProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ButtonLinkDefinition } from './definition';\nimport { InternalLinkProvider } from '../InternalLinkProvider';\n\n/** @public */\nexport const ButtonLink = forwardRef(\n (props: ButtonLinkProps, ref: Ref<HTMLAnchorElement>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ButtonLinkDefinition,\n props,\n );\n const { classes, iconStart, iconEnd, children } = ownProps;\n\n return (\n <InternalLinkProvider href={restProps.href}>\n <RALink\n className={classes.root}\n ref={ref}\n {...dataAttributes}\n {...restProps}\n >\n <span className={classes.content}>\n {iconStart}\n {children}\n {iconEnd}\n </span>\n </RALink>\n </InternalLinkProvider>\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink';\n"],"names":["RALink"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonLink.esm.js","sources":["../../../src/components/ButtonLink/ButtonLink.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, Ref } from 'react';\nimport { Link as RALink } from 'react-aria-components';\nimport type { ButtonLinkProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ButtonLinkDefinition } from './definition';\nimport { InternalLinkProvider } from '../InternalLinkProvider';\nimport { getNodeText } from '../../analytics/getNodeText';\n\n/** @public */\nexport const ButtonLink = forwardRef(\n (props: ButtonLinkProps, ref: Ref<HTMLAnchorElement>) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n ButtonLinkDefinition,\n props,\n );\n const { classes, iconStart, iconEnd, children } = ownProps;\n\n const handlePress: typeof restProps.onPress = e => {\n restProps.onPress?.(e);\n const text =\n restProps['aria-label'] ??\n getNodeText(children) ??\n String(restProps.href ?? '');\n analytics.captureEvent('click', text, {\n attributes: { to: String(restProps.href ?? '') },\n });\n };\n\n return (\n <InternalLinkProvider href={restProps.href}>\n <RALink\n className={classes.root}\n ref={ref}\n {...dataAttributes}\n {...restProps}\n onPress={handlePress}\n >\n <span className={classes.content}>\n {iconStart}\n {children}\n {iconEnd}\n </span>\n </RALink>\n </InternalLinkProvider>\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink';\n"],"names":["RALink"],"mappings":";;;;;;;;AAyBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAgC;AACvD,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,WAAU,GAAI,aAAA;AAAA,MACzD,oBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,OAAA,EAAS,UAAS,GAAI,QAAA;AAElD,IAAA,MAAM,cAAwC,CAAA,CAAA,KAAK;AACjD,MAAA,SAAA,CAAU,UAAU,CAAC,CAAA;AACrB,MAAA,MAAM,IAAA,GACJ,SAAA,CAAU,YAAY,CAAA,IACtB,WAAA,CAAY,QAAQ,CAAA,IACpB,MAAA,CAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAC7B,MAAA,SAAA,CAAU,YAAA,CAAa,SAAS,IAAA,EAAM;AAAA,QACpC,YAAY,EAAE,EAAA,EAAI,OAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAAE,OAChD,CAAA;AAAA,IACH,CAAA;AAEA,IAAA,uBACE,GAAA,CAAC,oBAAA,EAAA,EAAqB,IAAA,EAAM,SAAA,CAAU,IAAA,EACpC,QAAA,kBAAA,GAAA;AAAA,MAACA,IAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QACnB,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QACJ,OAAA,EAAS,WAAA;AAAA,QAET,QAAA,kBAAA,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OAAA,EACtB,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,UACA,QAAA;AAAA,UACA;AAAA,SAAA,EACH;AAAA;AAAA,KACF,EACF,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './ButtonLink.module.css.esm.js';
|
|
8
9
|
|
|
@@ -13,7 +14,9 @@ const ButtonLinkDefinition = defineComponent()({
|
|
|
13
14
|
content: "bui-ButtonLinkContent"
|
|
14
15
|
},
|
|
15
16
|
bg: "consumer",
|
|
17
|
+
analytics: true,
|
|
16
18
|
propDefs: {
|
|
19
|
+
noTrack: {},
|
|
17
20
|
size: { dataAttribute: true, default: "small" },
|
|
18
21
|
variant: { dataAttribute: true, default: "primary" },
|
|
19
22
|
iconStart: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/ButtonLink/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonLinkOwnProps } from './types';\nimport styles from './ButtonLink.module.css';\n\n/**\n * Component definition for ButtonLink\n * @public\n */\nexport const ButtonLinkDefinition = defineComponent<ButtonLinkOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonLink',\n content: 'bui-ButtonLinkContent',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/ButtonLink/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonLinkOwnProps } from './types';\nimport styles from './ButtonLink.module.css';\n\n/**\n * Component definition for ButtonLink\n * @public\n */\nexport const ButtonLinkDefinition = defineComponent<ButtonLinkOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonLink',\n content: 'bui-ButtonLinkContent',\n },\n bg: 'consumer',\n analytics: true,\n propDefs: {\n noTrack: {},\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -1,24 +1,85 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useRef, useCallback } from 'react';
|
|
3
|
+
import { Button } from 'react-aria-components';
|
|
3
4
|
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
4
5
|
import { CardDefinition, CardHeaderDefinition, CardBodyDefinition, CardFooterDefinition } from './definition.esm.js';
|
|
5
6
|
import { Box } from '../Box/Box.esm.js';
|
|
7
|
+
import { Link } from '../Link/Link.esm.js';
|
|
8
|
+
import '../Link/Link.module.css.esm.js';
|
|
6
9
|
|
|
10
|
+
const INTERACTIVE_ELEMENT_SELECTOR = 'a[href],button,input,select,textarea,[role="button"],[role="link"],[tabindex]:not([tabindex="-1"])';
|
|
7
11
|
const Card = forwardRef((props, ref) => {
|
|
8
12
|
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
9
13
|
CardDefinition,
|
|
10
14
|
props
|
|
11
15
|
);
|
|
12
|
-
const {
|
|
13
|
-
|
|
16
|
+
const {
|
|
17
|
+
classes,
|
|
18
|
+
children,
|
|
19
|
+
onPress,
|
|
20
|
+
href,
|
|
21
|
+
label,
|
|
22
|
+
target: linkTarget,
|
|
23
|
+
rel,
|
|
24
|
+
download
|
|
25
|
+
} = ownProps;
|
|
26
|
+
const isInteractive = !!(onPress || href);
|
|
27
|
+
const triggerRef = useRef(null);
|
|
28
|
+
const handleClick = useCallback(
|
|
29
|
+
(e) => {
|
|
30
|
+
if (!isInteractive || !triggerRef.current) return;
|
|
31
|
+
if (triggerRef.current.contains(e.target)) return;
|
|
32
|
+
const targetNode = e.target;
|
|
33
|
+
const targetElement = targetNode instanceof Element ? targetNode : targetNode?.parentElement;
|
|
34
|
+
if (targetElement?.closest(INTERACTIVE_ELEMENT_SELECTOR)) return;
|
|
35
|
+
if (window.getSelection()?.toString()) return;
|
|
36
|
+
triggerRef.current.dispatchEvent(
|
|
37
|
+
new MouseEvent("click", {
|
|
38
|
+
bubbles: false,
|
|
39
|
+
cancelable: true,
|
|
40
|
+
ctrlKey: e.ctrlKey,
|
|
41
|
+
metaKey: e.metaKey,
|
|
42
|
+
shiftKey: e.shiftKey
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
[isInteractive]
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
14
49
|
Box,
|
|
15
50
|
{
|
|
51
|
+
as: "article",
|
|
16
52
|
bg: "neutral",
|
|
17
53
|
ref,
|
|
18
54
|
className: classes.root,
|
|
55
|
+
"data-interactive": isInteractive || void 0,
|
|
19
56
|
...dataAttributes,
|
|
20
57
|
...restProps,
|
|
21
|
-
|
|
58
|
+
onClick: isInteractive ? handleClick : void 0,
|
|
59
|
+
children: [
|
|
60
|
+
href && /* @__PURE__ */ jsx(
|
|
61
|
+
Link,
|
|
62
|
+
{
|
|
63
|
+
ref: triggerRef,
|
|
64
|
+
className: classes.trigger,
|
|
65
|
+
href,
|
|
66
|
+
target: linkTarget,
|
|
67
|
+
rel,
|
|
68
|
+
download,
|
|
69
|
+
"aria-label": label
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
onPress && !href && /* @__PURE__ */ jsx(
|
|
73
|
+
Button,
|
|
74
|
+
{
|
|
75
|
+
ref: triggerRef,
|
|
76
|
+
className: classes.trigger,
|
|
77
|
+
onPress,
|
|
78
|
+
"aria-label": label
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
children
|
|
82
|
+
]
|
|
22
83
|
}
|
|
23
84
|
);
|
|
24
85
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.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 } from 'react';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n CardDefinition,\n CardHeaderDefinition,\n CardBodyDefinition,\n CardFooterDefinition,\n} from './definition';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\nimport { Box } from '../Box/Box';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n CardDefinition,\n props,\n );\n const {
|
|
1
|
+
{"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.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, useCallback, useRef } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n CardDefinition,\n CardHeaderDefinition,\n CardBodyDefinition,\n CardFooterDefinition,\n} from './definition';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\nimport { Box } from '../Box/Box';\nimport { Link } from '../Link';\n\nconst INTERACTIVE_ELEMENT_SELECTOR =\n 'a[href],button,input,select,textarea,[role=\"button\"],[role=\"link\"],[tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n CardDefinition,\n props,\n );\n const {\n classes,\n children,\n onPress,\n href,\n label,\n target: linkTarget,\n rel,\n download,\n } = ownProps;\n const isInteractive = !!(onPress || href);\n\n const triggerRef = useRef<HTMLAnchorElement | HTMLButtonElement>(null);\n\n const handleClick = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isInteractive || !triggerRef.current) return;\n\n // Don't delegate if the click target is the trigger itself\n if (triggerRef.current.contains(e.target as Node)) return;\n\n // Don't delegate if the user clicked a nested interactive element\n const targetNode = e.target as Node | null;\n const targetElement =\n targetNode instanceof Element ? targetNode : targetNode?.parentElement;\n if (targetElement?.closest(INTERACTIVE_ELEMENT_SELECTOR)) return;\n\n // Don't delegate if the user is selecting text\n if (window.getSelection()?.toString()) return;\n\n triggerRef.current.dispatchEvent(\n new MouseEvent('click', {\n bubbles: false,\n cancelable: true,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n }),\n );\n },\n [isInteractive],\n );\n\n return (\n <Box\n as=\"article\"\n bg=\"neutral\"\n ref={ref}\n className={classes.root}\n data-interactive={isInteractive || undefined}\n {...dataAttributes}\n {...restProps}\n onClick={isInteractive ? handleClick : undefined}\n >\n {href && (\n <Link\n ref={triggerRef as React.Ref<HTMLAnchorElement>}\n className={classes.trigger}\n href={href}\n target={linkTarget}\n rel={rel}\n download={download}\n aria-label={label}\n />\n )}\n {onPress && !href && (\n <RAButton\n ref={triggerRef as React.Ref<HTMLButtonElement>}\n className={classes.trigger}\n onPress={onPress}\n aria-label={label}\n />\n )}\n {children}\n </Box>\n );\n});\n\nCard.displayName = 'Card';\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardHeaderDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardHeader.displayName = 'CardHeader';\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardBodyDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardBody.displayName = 'CardBody';\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardFooterDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardFooter.displayName = 'CardFooter';\n"],"names":["RAButton"],"mappings":";;;;;;;;;AAkCA,MAAM,4BAAA,GACJ,oGAAA;AAOK,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM;AAAA,IACJ,OAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA,EAAQ,UAAA;AAAA,IACR,GAAA;AAAA,IACA;AAAA,GACF,GAAI,QAAA;AACJ,EAAA,MAAM,aAAA,GAAgB,CAAC,EAAE,OAAA,IAAW,IAAA,CAAA;AAEpC,EAAA,MAAM,UAAA,GAAa,OAA8C,IAAI,CAAA;AAErE,EAAA,MAAM,WAAA,GAAc,WAAA;AAAA,IAClB,CAAC,CAAA,KAAwC;AACvC,MAAA,IAAI,CAAC,aAAA,IAAiB,CAAC,UAAA,CAAW,OAAA,EAAS;AAG3C,MAAA,IAAI,UAAA,CAAW,OAAA,CAAQ,QAAA,CAAS,CAAA,CAAE,MAAc,CAAA,EAAG;AAGnD,MAAA,MAAM,aAAa,CAAA,CAAE,MAAA;AACrB,MAAA,MAAM,aAAA,GACJ,UAAA,YAAsB,OAAA,GAAU,UAAA,GAAa,UAAA,EAAY,aAAA;AAC3D,MAAA,IAAI,aAAA,EAAe,OAAA,CAAQ,4BAA4B,CAAA,EAAG;AAG1D,MAAA,IAAI,MAAA,CAAO,YAAA,EAAa,EAAG,QAAA,EAAS,EAAG;AAEvC,MAAA,UAAA,CAAW,OAAA,CAAQ,aAAA;AAAA,QACjB,IAAI,WAAW,OAAA,EAAS;AAAA,UACtB,OAAA,EAAS,KAAA;AAAA,UACT,UAAA,EAAY,IAAA;AAAA,UACZ,SAAS,CAAA,CAAE,OAAA;AAAA,UACX,SAAS,CAAA,CAAE,OAAA;AAAA,UACX,UAAU,CAAA,CAAE;AAAA,SACb;AAAA,OACH;AAAA,IACF,CAAA;AAAA,IACA,CAAC,aAAa;AAAA,GAChB;AAEA,EAAA,uBACE,IAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,EAAA,EAAG,SAAA;AAAA,MACH,EAAA,EAAG,SAAA;AAAA,MACH,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,oBAAkB,aAAA,IAAiB,MAAA;AAAA,MAClC,GAAG,cAAA;AAAA,MACH,GAAG,SAAA;AAAA,MACJ,OAAA,EAAS,gBAAgB,WAAA,GAAc,MAAA;AAAA,MAEtC,QAAA,EAAA;AAAA,QAAA,IAAA,oBACC,GAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAK,UAAA;AAAA,YACL,WAAW,OAAA,CAAQ,OAAA;AAAA,YACnB,IAAA;AAAA,YACA,MAAA,EAAQ,UAAA;AAAA,YACR,GAAA;AAAA,YACA,QAAA;AAAA,YACA,YAAA,EAAY;AAAA;AAAA,SACd;AAAA,QAED,OAAA,IAAW,CAAC,IAAA,oBACX,GAAA;AAAA,UAACA,MAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAK,UAAA;AAAA,YACL,WAAW,OAAA,CAAQ,OAAA;AAAA,YACnB,OAAA;AAAA,YACA,YAAA,EAAY;AAAA;AAAA,SACd;AAAA,QAED;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;AAOZ,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AACzE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAAC,SAAI,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WACzC,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;AAOlB,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,oBAAoB,KAAK,CAAA;AACvE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAAC,SAAI,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WACzC,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;AAOhB,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AACzE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAAC,SAAI,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WACzC,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*\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@layer tokens, base, components, utilities;\n\n@layer components {\n .Card_bui-
|
|
4
|
-
var styles = {"bui-Card":"Card_bui-
|
|
3
|
+
var css_248z = "/*\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@layer tokens, base, components, utilities;\n\n@layer components {\n .Card_bui-Card__a35e7cb59d {\n display: flex;\n flex-direction: column;\n border-radius: var(--bui-radius-3);\n color: var(--bui-fg-primary);\n overflow: auto;\n min-height: 0;\n width: 100%;\n position: relative;\n padding: var(--bui-space-3);\n }\n\n .Card_bui-Card__a35e7cb59d[data-bg='neutral-1'] {\n --bui-card-bg: var(--bui-bg-neutral-1);\n }\n\n .Card_bui-Card__a35e7cb59d[data-bg='neutral-2'] {\n --bui-card-bg: var(--bui-bg-neutral-2);\n }\n\n .Card_bui-Card__a35e7cb59d[data-bg='neutral-3'] {\n --bui-card-bg: var(--bui-bg-neutral-3);\n }\n\n .Card_bui-Card__a35e7cb59d:has(.Card_bui-CardHeader__a35e7cb59d, .Card_bui-CardBody__a35e7cb59d, .Card_bui-CardFooter__a35e7cb59d) {\n padding: 0;\n }\n\n /*\n * Cursor and hover tint are applied at the card level so they cover the\n * entire surface.\n */\n .Card_bui-Card__a35e7cb59d[data-interactive] {\n cursor: pointer;\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, currentColor 5%, transparent);\n border-radius: inherit;\n pointer-events: none;\n z-index: 3;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n\n &:hover::after {\n opacity: 1;\n }\n }\n\n .Card_bui-Card__a35e7cb59d[data-interactive]:has(.Card_bui-CardTrigger__a35e7cb59d:focus-visible) {\n outline: 2px solid var(--bui-ring);\n outline-offset: -2px;\n }\n\n .Card_bui-CardTrigger__a35e7cb59d {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n border: 0;\n }\n\n .Card_bui-CardHeader__a35e7cb59d {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n\n .Card_bui-CardBody__a35e7cb59d {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n\n @keyframes Card_bui-card-body-shadow__a35e7cb59d {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .Card_bui-Card__a35e7cb59d:has(.Card_bui-CardHeader__a35e7cb59d) .Card_bui-CardBody__a35e7cb59d {\n padding-block-start: 0;\n\n &::before {\n content: '';\n position: sticky;\n top: 0;\n display: block;\n height: 1.5rem;\n margin-bottom: -1.5rem;\n background: linear-gradient(\n to bottom,\n var(--bui-card-bg),\n rgb(from var(--bui-card-bg) r g b / 0)\n );\n pointer-events: none;\n opacity: 0;\n animation: Card_bui-card-body-shadow__a35e7cb59d linear both;\n animation-timeline: scroll();\n animation-range: 0px 2.5rem;\n }\n }\n\n .Card_bui-Card__a35e7cb59d:has(.Card_bui-CardFooter__a35e7cb59d) .Card_bui-CardBody__a35e7cb59d {\n padding-block-end: 0;\n\n &::after {\n content: '';\n position: sticky;\n bottom: 0;\n display: block;\n height: 1.5rem;\n margin-top: -1.5rem;\n background: linear-gradient(\n to top,\n var(--bui-card-bg),\n rgb(from var(--bui-card-bg) r g b / 0)\n );\n pointer-events: none;\n opacity: 0;\n animation: Card_bui-card-body-shadow__a35e7cb59d linear forwards,\n Card_bui-card-body-shadow__a35e7cb59d linear forwards reverse;\n animation-timeline: scroll(), scroll();\n animation-range: 0px 1px, calc(100% - 2.5rem) 100%;\n }\n }\n\n .Card_bui-CardFooter__a35e7cb59d {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Card":"Card_bui-Card__a35e7cb59d","bui-CardHeader":"Card_bui-CardHeader__a35e7cb59d","bui-CardBody":"Card_bui-CardBody__a35e7cb59d","bui-CardFooter":"Card_bui-CardFooter__a35e7cb59d","bui-CardTrigger":"Card_bui-CardTrigger__a35e7cb59d","bui-card-body-shadow":"Card_bui-card-body-shadow__a35e7cb59d"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -3,17 +3,25 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Card.module.css.esm.js';
|
|
8
9
|
|
|
9
10
|
const CardDefinition = defineComponent()({
|
|
10
11
|
styles,
|
|
11
12
|
classNames: {
|
|
12
|
-
root: "bui-Card"
|
|
13
|
+
root: "bui-Card",
|
|
14
|
+
trigger: "bui-CardTrigger"
|
|
13
15
|
},
|
|
14
16
|
propDefs: {
|
|
15
17
|
children: {},
|
|
16
|
-
className: {}
|
|
18
|
+
className: {},
|
|
19
|
+
onPress: {},
|
|
20
|
+
href: {},
|
|
21
|
+
label: {},
|
|
22
|
+
target: {},
|
|
23
|
+
rel: {},
|
|
24
|
+
download: {}
|
|
17
25
|
}
|
|
18
26
|
});
|
|
19
27
|
const CardHeaderDefinition = defineComponent()({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Card/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n CardOwnProps,\n CardHeaderOwnProps,\n CardBodyOwnProps,\n CardFooterOwnProps,\n} from './types';\nimport styles from './Card.module.css';\n\n/**\n * Component definition for Card\n * @public\n */\nexport const CardDefinition = defineComponent<CardOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Card',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardHeader\n * @public\n */\nexport const CardHeaderDefinition = defineComponent<CardHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardHeader',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardBody\n * @public\n */\nexport const CardBodyDefinition = defineComponent<CardBodyOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardBody',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardFooter\n * @public\n */\nexport const CardFooterDefinition = defineComponent<CardFooterOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardFooter',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Card/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n CardOwnProps,\n CardHeaderOwnProps,\n CardBodyOwnProps,\n CardFooterOwnProps,\n} from './types';\nimport styles from './Card.module.css';\n\n/**\n * Component definition for Card\n * @public\n */\nexport const CardDefinition = defineComponent<CardOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Card',\n trigger: 'bui-CardTrigger',\n },\n propDefs: {\n children: {},\n className: {},\n onPress: {},\n href: {},\n label: {},\n target: {},\n rel: {},\n download: {},\n },\n});\n\n/**\n * Component definition for CardHeader\n * @public\n */\nexport const CardHeaderDefinition = defineComponent<CardHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardHeader',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardBody\n * @public\n */\nexport const CardBodyDefinition = defineComponent<CardBodyOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardBody',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardFooter\n * @public\n */\nexport const CardFooterDefinition = defineComponent<CardFooterOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardFooter',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AA6BO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,UAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,OAAO,EAAC;AAAA,IACR,QAAQ,EAAC;AAAA,IACT,KAAK,EAAC;AAAA,IACN,UAAU;AAAC;AAEf,CAAC;AAMM,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Checkbox.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Checkbox/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { CheckboxOwnProps } from './types';\nimport styles from './Checkbox.module.css';\n\n/**\n * Component definition for Checkbox\n * @public\n */\nexport const CheckboxDefinition = defineComponent<CheckboxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Checkbox',\n indicator: 'bui-CheckboxIndicator',\n },\n propDefs: {\n selected: { dataAttribute: true },\n indeterminate: { dataAttribute: true },\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Checkbox/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { CheckboxOwnProps } from './types';\nimport styles from './Checkbox.module.css';\n\n/**\n * Component definition for Checkbox\n * @public\n */\nexport const CheckboxDefinition = defineComponent<CheckboxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Checkbox',\n indicator: 'bui-CheckboxIndicator',\n },\n propDefs: {\n selected: { dataAttribute: true },\n indeterminate: { dataAttribute: true },\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,cAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,QAAA,EAAU;AAAA,IACR,QAAA,EAAU,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAChC,aAAA,EAAe,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACrC,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Container.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Container/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ContainerOwnProps } from './types';\nimport styles from './Container.module.css';\n\n/**\n * Component definition for Container\n * @public\n */\nexport const ContainerDefinition = defineComponent<ContainerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Container',\n },\n propDefs: {\n children: {},\n className: {},\n style: {},\n },\n utilityProps: ['my', 'mt', 'mb', 'py', 'pt', 'pb', 'display'],\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Container/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ContainerOwnProps } from './types';\nimport styles from './Container.module.css';\n\n/**\n * Component definition for Container\n * @public\n */\nexport const ContainerDefinition = defineComponent<ContainerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Container',\n },\n propDefs: {\n children: {},\n className: {},\n style: {},\n },\n utilityProps: ['my', 'mt', 'mb', 'py', 'pt', 'pb', 'display'],\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,IAAA,EAAM,IAAA,EAAM,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,SAAS;AAC9D,CAAC;;;;"}
|