@backstage/ui 0.6.0 → 0.7.0-next.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 +11 -0
- package/css/styles.css +92 -138
- package/dist/components/Avatar/Avatar.esm.js +29 -0
- package/dist/components/Avatar/Avatar.esm.js.map +1 -0
- package/dist/components/Box/Box.esm.js +34 -0
- package/dist/components/Box/Box.esm.js.map +1 -0
- package/dist/components/Box/Box.props.esm.js +7 -0
- package/dist/components/Box/Box.props.esm.js.map +1 -0
- package/dist/components/Button/Button.esm.js +41 -0
- package/dist/components/Button/Button.esm.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.esm.js +37 -0
- package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -0
- package/dist/components/ButtonLink/ButtonLink.esm.js +42 -0
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -0
- package/dist/components/Card/Card.esm.js +53 -0
- package/dist/components/Card/Card.esm.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.esm.js +74 -0
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.esm.js +50 -0
- package/dist/components/Collapsible/Collapsible.esm.js.map +1 -0
- package/dist/components/Container/Container.esm.js +35 -0
- package/dist/components/Container/Container.esm.js.map +1 -0
- package/dist/components/DataTable/DataTable.esm.js +26 -0
- package/dist/components/DataTable/DataTable.esm.js.map +1 -0
- package/dist/components/DataTable/Pagination/DataTablePagination.esm.js +84 -0
- package/dist/components/DataTable/Pagination/DataTablePagination.esm.js.map +1 -0
- package/dist/components/DataTable/Root/DataTableRoot.esm.js +24 -0
- package/dist/components/DataTable/Root/DataTableRoot.esm.js.map +1 -0
- package/dist/components/DataTable/Table/DataTableTable.esm.js +64 -0
- package/dist/components/DataTable/Table/DataTableTable.esm.js.map +1 -0
- package/dist/components/FieldError/FieldError.esm.js +22 -0
- package/dist/components/FieldError/FieldError.esm.js.map +1 -0
- package/dist/components/FieldLabel/FieldLabel.esm.js +27 -0
- package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -0
- package/dist/components/Flex/Flex.esm.js +26 -0
- package/dist/components/Flex/Flex.esm.js.map +1 -0
- package/dist/components/Flex/Flex.props.esm.js +31 -0
- package/dist/components/Flex/Flex.props.esm.js.map +1 -0
- package/dist/components/Grid/Grid.esm.js +43 -0
- package/dist/components/Grid/Grid.esm.js.map +1 -0
- package/dist/components/Grid/Grid.props.esm.js +58 -0
- package/dist/components/Grid/Grid.props.esm.js.map +1 -0
- package/dist/components/Header/Header.esm.js +46 -0
- package/dist/components/Header/Header.esm.js.map +1 -0
- package/dist/components/Header/HeaderToolbar.esm.js +132 -0
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -0
- package/dist/components/HeaderPage/HeaderPage.esm.js +57 -0
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -0
- package/dist/components/Icon/Icon.esm.js +29 -0
- package/dist/components/Icon/Icon.esm.js.map +1 -0
- package/dist/components/Icon/context.esm.js +10 -0
- package/dist/components/Icon/context.esm.js.map +1 -0
- package/dist/components/Icon/icons.esm.js +63 -0
- package/dist/components/Icon/icons.esm.js.map +1 -0
- package/dist/components/Icon/provider.esm.js +12 -0
- package/dist/components/Icon/provider.esm.js.map +1 -0
- package/dist/components/Link/Link.esm.js +67 -0
- package/dist/components/Link/Link.esm.js.map +1 -0
- package/dist/components/Menu/Combobox.esm.js +212 -0
- package/dist/components/Menu/Combobox.esm.js.map +1 -0
- package/dist/components/Menu/Menu.esm.js +224 -0
- package/dist/components/Menu/Menu.esm.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.esm.js +71 -0
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.esm.js +63 -0
- package/dist/components/ScrollArea/ScrollArea.esm.js.map +1 -0
- package/dist/components/SearchField/SearchField.esm.js +107 -0
- package/dist/components/SearchField/SearchField.esm.js.map +1 -0
- package/dist/components/Select/Select.esm.js +89 -0
- package/dist/components/Select/Select.esm.js.map +1 -0
- package/dist/components/Select/Select.styles.css.esm.js +7 -0
- package/dist/components/Select/Select.styles.css.esm.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.esm.js +22 -0
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -0
- package/dist/components/Switch/Switch.esm.js +18 -0
- package/dist/components/Switch/Switch.esm.js.map +1 -0
- package/dist/components/Table/Table.esm.js +68 -0
- package/dist/components/Table/Table.esm.js.map +1 -0
- package/dist/components/Table/TableCell/TableCell.esm.js +13 -0
- package/dist/components/Table/TableCell/TableCell.esm.js.map +1 -0
- package/dist/components/Table/TableCellLink/TableCellLink.esm.js +28 -0
- package/dist/components/Table/TableCellLink/TableCellLink.esm.js.map +1 -0
- package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js +40 -0
- package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js.map +1 -0
- package/dist/components/Table/TableCellText/TableCellText.esm.js +27 -0
- package/dist/components/Table/TableCellText/TableCellText.esm.js.map +1 -0
- package/dist/components/Tabs/Tabs.esm.js +139 -0
- package/dist/components/Tabs/Tabs.esm.js.map +1 -0
- package/dist/components/Tabs/TabsIndicators.esm.js +140 -0
- package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -0
- package/dist/components/Text/Text.esm.js +40 -0
- package/dist/components/Text/Text.esm.js.map +1 -0
- package/dist/components/TextField/TextField.esm.js +88 -0
- package/dist/components/TextField/TextField.esm.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.esm.js +34 -0
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -0
- package/dist/hooks/useBreakpoint.esm.js +43 -0
- package/dist/hooks/useBreakpoint.esm.js.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.esm.js +6 -0
- package/dist/hooks/useIsomorphicLayoutEffect.esm.js.map +1 -0
- package/dist/hooks/useMediaQuery.esm.js +44 -0
- package/dist/hooks/useMediaQuery.esm.js.map +1 -0
- package/dist/hooks/useStyles.esm.js +46 -0
- package/dist/hooks/useStyles.esm.js.map +1 -0
- package/dist/index.d.ts +1410 -0
- package/dist/index.esm.js +39 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +29 -0
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -0
- package/dist/props/display.props.esm.js +12 -0
- package/dist/props/display.props.esm.js.map +1 -0
- package/dist/props/gap-props.esm.js +15 -0
- package/dist/props/gap-props.esm.js.map +1 -0
- package/dist/props/height.props.esm.js +23 -0
- package/dist/props/height.props.esm.js.map +1 -0
- package/dist/props/margin.props.esm.js +54 -0
- package/dist/props/margin.props.esm.js.map +1 -0
- package/dist/props/padding.props.esm.js +54 -0
- package/dist/props/padding.props.esm.js.map +1 -0
- package/dist/props/position.props.esm.js +18 -0
- package/dist/props/position.props.esm.js.map +1 -0
- package/dist/props/prop-def.esm.js +4 -0
- package/dist/props/prop-def.esm.js.map +1 -0
- package/dist/props/spacing.props.esm.js +28 -0
- package/dist/props/spacing.props.esm.js.map +1 -0
- package/dist/props/width.props.esm.js +23 -0
- package/dist/props/width.props.esm.js.map +1 -0
- package/dist/utils/componentDefinitions.esm.js +272 -0
- package/dist/utils/componentDefinitions.esm.js.map +1 -0
- package/dist/utils/extractProps.esm.js +49 -0
- package/dist/utils/extractProps.esm.js.map +1 -0
- package/package.json +11 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @backstage/ui
|
|
2
2
|
|
|
3
|
+
## 0.7.0-next.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b0e47f3: **Breaking** We are upgrading our `Text` component to support all font sizes making the `Heading` component redundant. The new `Text` component introduces 4 sizes for title and 4 sizes for body text. All of these work in multiple colors and font weights. We improved the `as` prop to include all possible values. The `Link` component has also been updated to match the new `Text` component.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- e7ff178: Update styling of Tooltip element
|
|
12
|
+
- e0e886f: Adds onTabSelectionChange to ui header component.
|
|
13
|
+
|
|
3
14
|
## 0.6.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/css/styles.css
CHANGED
|
@@ -9191,8 +9191,8 @@
|
|
|
9191
9191
|
--bui-gray-6: #7b7b7b;
|
|
9192
9192
|
--bui-gray-7: #9e9e9e;
|
|
9193
9193
|
--bui-gray-8: #b4b4b4;
|
|
9194
|
-
--bui-bg:
|
|
9195
|
-
--bui-bg-surface-1:
|
|
9194
|
+
--bui-bg: #333;
|
|
9195
|
+
--bui-bg-surface-1: #424242;
|
|
9196
9196
|
--bui-bg-surface-2: var(--bui-gray-2);
|
|
9197
9197
|
--bui-bg-solid: #9cc9ff;
|
|
9198
9198
|
--bui-bg-solid-hover: #83b9fd;
|
|
@@ -9217,7 +9217,7 @@
|
|
|
9217
9217
|
--bui-fg-danger: #e22b2b;
|
|
9218
9218
|
--bui-fg-warning: #e36d05;
|
|
9219
9219
|
--bui-fg-success: #1db954;
|
|
9220
|
-
--bui-border: #
|
|
9220
|
+
--bui-border: #ffffff1f;
|
|
9221
9221
|
--bui-border-hover: #fff6;
|
|
9222
9222
|
--bui-border-pressed: #ffffff80;
|
|
9223
9223
|
--bui-border-disabled: #fff3;
|
|
@@ -9732,58 +9732,6 @@
|
|
|
9732
9732
|
display: flex;
|
|
9733
9733
|
}
|
|
9734
9734
|
|
|
9735
|
-
.bui-Heading {
|
|
9736
|
-
font-family: var(--bui-font-regular);
|
|
9737
|
-
color: var(--bui-fg-primary);
|
|
9738
|
-
margin: 0;
|
|
9739
|
-
padding: 0;
|
|
9740
|
-
line-height: 100%;
|
|
9741
|
-
}
|
|
9742
|
-
|
|
9743
|
-
.bui-Heading[data-variant="display"] {
|
|
9744
|
-
font-size: var(--bui-font-size-10);
|
|
9745
|
-
font-weight: var(--bui-font-weight-bold);
|
|
9746
|
-
}
|
|
9747
|
-
|
|
9748
|
-
.bui-Heading[data-variant="title1"] {
|
|
9749
|
-
font-size: var(--bui-font-size-9);
|
|
9750
|
-
font-weight: var(--bui-font-weight-bold);
|
|
9751
|
-
}
|
|
9752
|
-
|
|
9753
|
-
.bui-Heading[data-variant="title2"] {
|
|
9754
|
-
font-size: var(--bui-font-size-8);
|
|
9755
|
-
font-weight: var(--bui-font-weight-bold);
|
|
9756
|
-
}
|
|
9757
|
-
|
|
9758
|
-
.bui-Heading[data-variant="title3"] {
|
|
9759
|
-
font-size: var(--bui-font-size-7);
|
|
9760
|
-
font-weight: var(--bui-font-weight-bold);
|
|
9761
|
-
}
|
|
9762
|
-
|
|
9763
|
-
.bui-Heading[data-variant="title4"] {
|
|
9764
|
-
font-size: var(--bui-font-size-6);
|
|
9765
|
-
font-weight: var(--bui-font-weight-bold);
|
|
9766
|
-
}
|
|
9767
|
-
|
|
9768
|
-
.bui-Heading[data-variant="title5"] {
|
|
9769
|
-
font-size: var(--bui-font-size-5);
|
|
9770
|
-
font-weight: var(--bui-font-weight-bold);
|
|
9771
|
-
}
|
|
9772
|
-
|
|
9773
|
-
.bui-Heading[data-color="primary"] {
|
|
9774
|
-
color: var(--bui-fg-primary);
|
|
9775
|
-
}
|
|
9776
|
-
|
|
9777
|
-
.bui-Heading[data-color="secondary"] {
|
|
9778
|
-
color: var(--bui-fg-secondary);
|
|
9779
|
-
}
|
|
9780
|
-
|
|
9781
|
-
.bui-Heading[data-truncate] {
|
|
9782
|
-
text-overflow: ellipsis;
|
|
9783
|
-
white-space: nowrap;
|
|
9784
|
-
overflow: hidden;
|
|
9785
|
-
}
|
|
9786
|
-
|
|
9787
9735
|
.bui-Icon {
|
|
9788
9736
|
width: 1rem;
|
|
9789
9737
|
height: 1rem;
|
|
@@ -9795,72 +9743,17 @@
|
|
|
9795
9743
|
margin: 0;
|
|
9796
9744
|
padding: 0;
|
|
9797
9745
|
text-decoration-line: none;
|
|
9746
|
+
display: inline-block;
|
|
9798
9747
|
|
|
9799
9748
|
&:hover {
|
|
9800
9749
|
text-underline-offset: calc(.025em + 2px);
|
|
9801
9750
|
text-decoration-line: underline;
|
|
9802
9751
|
text-decoration-style: solid;
|
|
9803
9752
|
text-decoration-thickness: min(2px, max(1px, .05em));
|
|
9804
|
-
text-decoration-color: color-mix(in srgb,
|
|
9753
|
+
text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
|
|
9805
9754
|
}
|
|
9806
9755
|
}
|
|
9807
9756
|
|
|
9808
|
-
.bui-Link[data-variant="title-large"] {
|
|
9809
|
-
font-size: var(--bui-font-size-8);
|
|
9810
|
-
line-height: 140%;
|
|
9811
|
-
}
|
|
9812
|
-
|
|
9813
|
-
.bui-Link[data-variant="title-medium"] {
|
|
9814
|
-
font-size: var(--bui-font-size-7);
|
|
9815
|
-
line-height: 140%;
|
|
9816
|
-
}
|
|
9817
|
-
|
|
9818
|
-
.bui-Link[data-variant="title-small"] {
|
|
9819
|
-
font-size: var(--bui-font-size-6);
|
|
9820
|
-
line-height: 140%;
|
|
9821
|
-
}
|
|
9822
|
-
|
|
9823
|
-
.bui-Link[data-variant="title-x-small"] {
|
|
9824
|
-
font-size: var(--bui-font-size-5);
|
|
9825
|
-
line-height: 140%;
|
|
9826
|
-
}
|
|
9827
|
-
|
|
9828
|
-
.bui-Link[data-variant="body-large"] {
|
|
9829
|
-
font-size: var(--bui-font-size-4);
|
|
9830
|
-
line-height: 140%;
|
|
9831
|
-
}
|
|
9832
|
-
|
|
9833
|
-
.bui-Link[data-variant="body-medium"] {
|
|
9834
|
-
font-size: var(--bui-font-size-3);
|
|
9835
|
-
line-height: 140%;
|
|
9836
|
-
}
|
|
9837
|
-
|
|
9838
|
-
.bui-Link[data-variant="body-small"] {
|
|
9839
|
-
font-size: var(--bui-font-size-2);
|
|
9840
|
-
line-height: 140%;
|
|
9841
|
-
}
|
|
9842
|
-
|
|
9843
|
-
.bui-Link[data-variant="body-x-small"] {
|
|
9844
|
-
font-size: var(--bui-font-size-1);
|
|
9845
|
-
line-height: 140%;
|
|
9846
|
-
}
|
|
9847
|
-
|
|
9848
|
-
.bui-Link[data-weight="regular"] {
|
|
9849
|
-
font-weight: var(--bui-font-weight-regular);
|
|
9850
|
-
}
|
|
9851
|
-
|
|
9852
|
-
.bui-Link[data-weight="bold"] {
|
|
9853
|
-
font-weight: var(--bui-font-weight-bold);
|
|
9854
|
-
}
|
|
9855
|
-
|
|
9856
|
-
.bui-Link[data-color="primary"] {
|
|
9857
|
-
color: var(--bui-fg-primary);
|
|
9858
|
-
}
|
|
9859
|
-
|
|
9860
|
-
.bui-Link[data-color="secondary"] {
|
|
9861
|
-
color: var(--bui-fg-secondary);
|
|
9862
|
-
}
|
|
9863
|
-
|
|
9864
9757
|
.bui-MenuPositioner {
|
|
9865
9758
|
z-index: 100;
|
|
9866
9759
|
outline: 0;
|
|
@@ -10303,22 +10196,42 @@
|
|
|
10303
10196
|
padding: 0;
|
|
10304
10197
|
}
|
|
10305
10198
|
|
|
10306
|
-
.bui-Text[data-variant="
|
|
10307
|
-
font-size: var(--bui-font-size-
|
|
10199
|
+
.bui-Text[data-variant="title-large"] {
|
|
10200
|
+
font-size: var(--bui-font-size-8);
|
|
10201
|
+
line-height: 140%;
|
|
10202
|
+
}
|
|
10203
|
+
|
|
10204
|
+
.bui-Text[data-variant="title-medium"] {
|
|
10205
|
+
font-size: var(--bui-font-size-7);
|
|
10206
|
+
line-height: 140%;
|
|
10207
|
+
}
|
|
10208
|
+
|
|
10209
|
+
.bui-Text[data-variant="title-small"] {
|
|
10210
|
+
font-size: var(--bui-font-size-6);
|
|
10211
|
+
line-height: 140%;
|
|
10212
|
+
}
|
|
10213
|
+
|
|
10214
|
+
.bui-Text[data-variant="title-x-small"] {
|
|
10215
|
+
font-size: var(--bui-font-size-5);
|
|
10308
10216
|
line-height: 140%;
|
|
10309
10217
|
}
|
|
10310
10218
|
|
|
10311
|
-
.bui-Text[data-variant="
|
|
10219
|
+
.bui-Text[data-variant="body-large"] {
|
|
10312
10220
|
font-size: var(--bui-font-size-4);
|
|
10313
10221
|
line-height: 140%;
|
|
10314
10222
|
}
|
|
10315
10223
|
|
|
10316
|
-
.bui-Text[data-variant="
|
|
10224
|
+
.bui-Text[data-variant="body-medium"] {
|
|
10225
|
+
font-size: var(--bui-font-size-3);
|
|
10226
|
+
line-height: 140%;
|
|
10227
|
+
}
|
|
10228
|
+
|
|
10229
|
+
.bui-Text[data-variant="body-small"] {
|
|
10317
10230
|
font-size: var(--bui-font-size-2);
|
|
10318
10231
|
line-height: 140%;
|
|
10319
10232
|
}
|
|
10320
10233
|
|
|
10321
|
-
.bui-Text[data-variant="
|
|
10234
|
+
.bui-Text[data-variant="body-x-small"] {
|
|
10322
10235
|
font-size: var(--bui-font-size-1);
|
|
10323
10236
|
line-height: 140%;
|
|
10324
10237
|
}
|
|
@@ -10357,6 +10270,10 @@
|
|
|
10357
10270
|
overflow: hidden;
|
|
10358
10271
|
}
|
|
10359
10272
|
|
|
10273
|
+
.bui-Text[data-as="span"], .bui-Text[data-as="label"], .bui-Text[data-as="strong"], .bui-Text[data-as="em"], .bui-Text[data-as="small"] {
|
|
10274
|
+
display: inline-block;
|
|
10275
|
+
}
|
|
10276
|
+
|
|
10360
10277
|
.bui-TextField {
|
|
10361
10278
|
font-family: var(--bui-font-regular);
|
|
10362
10279
|
flex-direction: column;
|
|
@@ -10504,18 +10421,20 @@
|
|
|
10504
10421
|
}
|
|
10505
10422
|
|
|
10506
10423
|
.bui-Tooltip {
|
|
10507
|
-
background: var(--bui-bg-surface-
|
|
10424
|
+
background: var(--bui-bg-surface-1);
|
|
10425
|
+
border: 1px solid var(--bui-gray-3);
|
|
10508
10426
|
forced-color-adjust: none;
|
|
10509
10427
|
padding: var(--bui-space-2) var(--bui-space-3);
|
|
10510
10428
|
max-width: 240px;
|
|
10511
10429
|
font-size: var(--bui-font-size-3);
|
|
10512
10430
|
font-family: var(--bui-font-regular);
|
|
10513
10431
|
color: var(--bui-fg-primary);
|
|
10432
|
+
--tooltip-offset: var(--bui-space-3);
|
|
10514
10433
|
border-radius: 4px;
|
|
10515
10434
|
outline: none;
|
|
10516
10435
|
transition: transform .2s, opacity .2s;
|
|
10517
10436
|
transform: translate3d(0, 0, 0);
|
|
10518
|
-
box-shadow: 0
|
|
10437
|
+
box-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;
|
|
10519
10438
|
|
|
10520
10439
|
&[data-entering], &[data-exiting] {
|
|
10521
10440
|
transform: var(--origin);
|
|
@@ -10523,41 +10442,76 @@
|
|
|
10523
10442
|
}
|
|
10524
10443
|
|
|
10525
10444
|
&[data-placement="top"] {
|
|
10526
|
-
margin-bottom: var(--
|
|
10445
|
+
margin-bottom: var(--tooltip-offset);
|
|
10527
10446
|
--origin: translateY(4px);
|
|
10528
10447
|
}
|
|
10529
10448
|
|
|
10449
|
+
&[data-placement="right"] {
|
|
10450
|
+
margin-left: var(--tooltip-offset);
|
|
10451
|
+
--origin: translateX(-4px);
|
|
10452
|
+
}
|
|
10453
|
+
|
|
10530
10454
|
&[data-placement="bottom"] {
|
|
10531
|
-
margin-top: var(--
|
|
10455
|
+
margin-top: var(--tooltip-offset);
|
|
10532
10456
|
--origin: translateY(-4px);
|
|
10457
|
+
}
|
|
10533
10458
|
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10459
|
+
&[data-placement="left"] {
|
|
10460
|
+
margin-right: var(--tooltip-offset);
|
|
10461
|
+
--origin: translateX(4px);
|
|
10537
10462
|
}
|
|
10463
|
+
}
|
|
10538
10464
|
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
--
|
|
10465
|
+
.bui-TooltipArrow {
|
|
10466
|
+
& svg {
|
|
10467
|
+
--tooltip-arrow-overlap: -2px;
|
|
10468
|
+
display: block;
|
|
10469
|
+
|
|
10470
|
+
& path:first-child {
|
|
10471
|
+
fill: var(--bui-bg-surface-1);
|
|
10472
|
+
}
|
|
10542
10473
|
|
|
10543
|
-
&
|
|
10544
|
-
|
|
10474
|
+
& path:nth-child(2) {
|
|
10475
|
+
fill: var(--bui-gray-3);
|
|
10545
10476
|
}
|
|
10546
10477
|
}
|
|
10547
10478
|
|
|
10548
|
-
&[data-placement="
|
|
10549
|
-
margin-
|
|
10550
|
-
|
|
10479
|
+
&[data-placement="top"] svg {
|
|
10480
|
+
margin-top: var(--tooltip-arrow-overlap);
|
|
10481
|
+
}
|
|
10551
10482
|
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10483
|
+
&[data-placement="bottom"] svg {
|
|
10484
|
+
margin-bottom: var(--tooltip-arrow-overlap);
|
|
10485
|
+
transform: rotate(180deg);
|
|
10486
|
+
}
|
|
10487
|
+
|
|
10488
|
+
&[data-placement="right"] svg {
|
|
10489
|
+
margin-right: var(--tooltip-arrow-overlap);
|
|
10490
|
+
transform: rotate(90deg);
|
|
10491
|
+
}
|
|
10492
|
+
|
|
10493
|
+
&[data-placement="left"] svg {
|
|
10494
|
+
margin-left: var(--tooltip-arrow-overlap);
|
|
10495
|
+
transform: rotate(-90deg);
|
|
10555
10496
|
}
|
|
10556
10497
|
}
|
|
10557
10498
|
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10499
|
+
[data-theme="dark"] {
|
|
10500
|
+
& .bui-Tooltip {
|
|
10501
|
+
background: var(--bui-bg-surface-2);
|
|
10502
|
+
box-shadow: none;
|
|
10503
|
+
border: 1px solid var(--bui-gray-4);
|
|
10504
|
+
}
|
|
10505
|
+
|
|
10506
|
+
& .bui-TooltipArrow {
|
|
10507
|
+
& svg path:first-child {
|
|
10508
|
+
fill: var(--bui-bg-surface-2);
|
|
10509
|
+
}
|
|
10510
|
+
|
|
10511
|
+
& svg path:nth-child(2) {
|
|
10512
|
+
fill: var(--bui-gray-4);
|
|
10513
|
+
}
|
|
10514
|
+
}
|
|
10561
10515
|
}
|
|
10562
10516
|
|
|
10563
10517
|
.bui-ScrollAreaRoot {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Avatar as Avatar$1 } from '@base-ui-components/react/avatar';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
|
+
|
|
7
|
+
const Avatar = forwardRef((props, ref) => {
|
|
8
|
+
const { className, src, name, size = "medium", ...rest } = props;
|
|
9
|
+
const { classNames } = useStyles("Avatar", {
|
|
10
|
+
size
|
|
11
|
+
});
|
|
12
|
+
return /* @__PURE__ */ jsxs(
|
|
13
|
+
Avatar$1.Root,
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
className: clsx(classNames.root, className),
|
|
17
|
+
"data-size": size,
|
|
18
|
+
...rest,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Avatar$1.Image, { className: classNames.image, src }),
|
|
21
|
+
/* @__PURE__ */ jsx(Avatar$1.Fallback, { className: classNames.fallback, children: (name || "").split(" ").map((word) => word[0]).join("").toLocaleUpperCase("en-US").slice(0, 2) })
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
Avatar.displayName = Avatar$1.Root.displayName;
|
|
27
|
+
|
|
28
|
+
export { Avatar };
|
|
29
|
+
//# sourceMappingURL=Avatar.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.esm.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, ElementRef } from 'react';\nimport { Avatar as AvatarPrimitive } from '@base-ui-components/react/avatar';\nimport clsx from 'clsx';\nimport { AvatarProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Avatar = forwardRef<\n ElementRef<typeof AvatarPrimitive.Root>,\n AvatarProps\n>((props, ref) => {\n const { className, src, name, size = 'medium', ...rest } = props;\n const { classNames } = useStyles('Avatar', {\n size,\n });\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n data-size={size}\n {...rest}\n >\n <AvatarPrimitive.Image className={classNames.image} src={src} />\n <AvatarPrimitive.Fallback className={classNames.fallback}>\n {(name || '')\n .split(' ')\n .map(word => word[0])\n .join('')\n .toLocaleUpperCase('en-US')\n .slice(0, 2)}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n );\n});\n\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n"],"names":["AvatarPrimitive"],"mappings":";;;;;;AAuBO,MAAM,MAAS,GAAA,UAAA,CAGpB,CAAC,KAAA,EAAO,GAAQ,KAAA;AAChB,EAAM,MAAA,EAAE,WAAW,GAAK,EAAA,IAAA,EAAM,OAAO,QAAU,EAAA,GAAG,MAAS,GAAA,KAAA;AAC3D,EAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,QAAU,EAAA;AAAA,IACzC;AAAA,GACD,CAAA;AAED,EACE,uBAAA,IAAA;AAAA,IAACA,QAAgB,CAAA,IAAA;AAAA,IAAhB;AAAA,MACC,GAAA;AAAA,MACA,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,IAAA,EAAM,SAAS,CAAA;AAAA,MAC1C,WAAW,EAAA,IAAA;AAAA,MACV,GAAG,IAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA,CAACA,SAAgB,KAAhB,EAAA,EAAsB,SAAW,EAAA,UAAA,CAAW,OAAO,GAAU,EAAA,CAAA;AAAA,wBAC9D,GAAA,CAACA,QAAgB,CAAA,QAAA,EAAhB,EAAyB,SAAA,EAAW,UAAW,CAAA,QAAA,EAC5C,QAAQ,EAAA,CAAA,IAAA,IAAA,EAAA,EACP,KAAM,CAAA,GAAG,CACT,CAAA,GAAA,CAAI,CAAQ,IAAA,KAAA,IAAA,CAAK,CAAC,CAAC,CACnB,CAAA,IAAA,CAAK,EAAE,CAAA,CACP,iBAAkB,CAAA,OAAO,CACzB,CAAA,KAAA,CAAM,CAAG,EAAA,CAAC,CACf,EAAA;AAAA;AAAA;AAAA,GACF;AAEJ,CAAC;AAED,MAAO,CAAA,WAAA,GAAcA,SAAgB,IAAK,CAAA,WAAA;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { forwardRef, createElement } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { extractProps } from '../../utils/extractProps.esm.js';
|
|
4
|
+
import { spacingPropDefs } from '../../props/spacing.props.esm.js';
|
|
5
|
+
import { boxPropDefs } from './Box.props.esm.js';
|
|
6
|
+
import { widthPropDefs } from '../../props/width.props.esm.js';
|
|
7
|
+
import { heightPropDefs } from '../../props/height.props.esm.js';
|
|
8
|
+
import { positionPropDefs } from '../../props/position.props.esm.js';
|
|
9
|
+
import { displayPropDefs } from '../../props/display.props.esm.js';
|
|
10
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
11
|
+
|
|
12
|
+
const Box = forwardRef((props, ref) => {
|
|
13
|
+
const { children } = props;
|
|
14
|
+
const propDefs = {
|
|
15
|
+
...spacingPropDefs,
|
|
16
|
+
...widthPropDefs,
|
|
17
|
+
...heightPropDefs,
|
|
18
|
+
...positionPropDefs,
|
|
19
|
+
...displayPropDefs,
|
|
20
|
+
...boxPropDefs
|
|
21
|
+
};
|
|
22
|
+
const { classNames } = useStyles("Box");
|
|
23
|
+
const { className, style } = extractProps(props, propDefs);
|
|
24
|
+
return createElement(props.as || "div", {
|
|
25
|
+
ref,
|
|
26
|
+
className: clsx(classNames.root, className),
|
|
27
|
+
style,
|
|
28
|
+
children
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
Box.displayName = "Box";
|
|
32
|
+
|
|
33
|
+
export { Box };
|
|
34
|
+
//# sourceMappingURL=Box.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.esm.js","sources":["../../../src/components/Box/Box.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 { createElement, forwardRef } from 'react';\nimport { BoxProps } from './types';\nimport clsx from 'clsx';\nimport { extractProps } from '../../utils/extractProps';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { boxPropDefs } from './Box.props';\nimport { widthPropDefs } from '../../props/width.props';\nimport { heightPropDefs } from '../../props/height.props';\nimport { positionPropDefs } from '../../props/position.props';\nimport { displayPropDefs } from '../../props/display.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Box = forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { children } = props;\n\n const propDefs = {\n ...spacingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n ...positionPropDefs,\n ...displayPropDefs,\n ...boxPropDefs,\n };\n\n const { classNames } = useStyles('Box');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement(props.as || 'div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children,\n });\n});\n\nBox.displayName = 'Box';\n"],"names":[],"mappings":";;;;;;;;;;;AA6BO,MAAM,GAAM,GAAA,UAAA,CAAqC,CAAC,KAAA,EAAO,GAAQ,KAAA;AACtE,EAAM,MAAA,EAAE,UAAa,GAAA,KAAA;AAErB,EAAA,MAAM,QAAW,GAAA;AAAA,IACf,GAAG,eAAA;AAAA,IACH,GAAG,aAAA;AAAA,IACH,GAAG,cAAA;AAAA,IACH,GAAG,gBAAA;AAAA,IACH,GAAG,eAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,KAAK,CAAA;AACtC,EAAA,MAAM,EAAE,SAAW,EAAA,KAAA,EAAU,GAAA,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAO,OAAA,aAAA,CAAc,KAAM,CAAA,EAAA,IAAM,KAAO,EAAA;AAAA,IACtC,GAAA;AAAA,IACA,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH,CAAC;AAED,GAAA,CAAI,WAAc,GAAA,KAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.props.esm.js","sources":["../../../src/components/Box/Box.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 */\n\nimport type { PropDef, GetPropDefTypes } from '../../props/prop-def';\n\nconst as = ['div', 'span'] as const;\n\n/** @public */\nconst boxPropDefs = {\n as: { type: 'enum', values: as, default: 'div' },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\n/** @public */\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\n"],"names":[],"mappings":"AAkBA,MAAM,EAAA,GAAK,CAAC,KAAA,EAAO,MAAM,CAAA;AAGzB,MAAM,WAAc,GAAA;AAAA,EAClB,IAAI,EAAE,IAAA,EAAM,QAAQ,MAAQ,EAAA,EAAA,EAAI,SAAS,KAAM;AACjD;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Button as Button$1 } from 'react-aria-components';
|
|
5
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
|
+
|
|
7
|
+
const Button = forwardRef(
|
|
8
|
+
(props, ref) => {
|
|
9
|
+
const {
|
|
10
|
+
size = "small",
|
|
11
|
+
variant = "primary",
|
|
12
|
+
iconStart,
|
|
13
|
+
iconEnd,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
} = props;
|
|
18
|
+
const { classNames, dataAttributes } = useStyles("Button", {
|
|
19
|
+
size,
|
|
20
|
+
variant
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
Button$1,
|
|
24
|
+
{
|
|
25
|
+
className: clsx(classNames.root, className),
|
|
26
|
+
ref,
|
|
27
|
+
...dataAttributes,
|
|
28
|
+
...rest,
|
|
29
|
+
children: [
|
|
30
|
+
iconStart,
|
|
31
|
+
children,
|
|
32
|
+
iconEnd
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
Button.displayName = "Button";
|
|
39
|
+
|
|
40
|
+
export { Button };
|
|
41
|
+
//# sourceMappingURL=Button.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.esm.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport type { ButtonProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Button = forwardRef(\n (props: ButtonProps, ref: Ref<HTMLButtonElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n iconStart,\n iconEnd,\n children,\n className,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n return (\n <RAButton\n className={clsx(classNames.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {iconStart}\n {children}\n {iconEnd}\n </RAButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["RAButton"],"mappings":";;;;;;AAuBO,MAAM,MAAS,GAAA,UAAA;AAAA,EACpB,CAAC,OAAoB,GAAgC,KAAA;AACnD,IAAM,MAAA;AAAA,MACJ,IAAO,GAAA,OAAA;AAAA,MACP,OAAU,GAAA,SAAA;AAAA,MACV,SAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAG;AAAA,KACD,GAAA,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAY,cAAe,EAAA,GAAI,UAAU,QAAU,EAAA;AAAA,MACzD,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAED,IACE,uBAAA,IAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,IAAA,EAAM,SAAS,CAAA;AAAA,QAC1C,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,UACA,QAAA;AAAA,UACA;AAAA;AAAA;AAAA,KACH;AAAA;AAGN;AAEA,MAAA,CAAO,WAAc,GAAA,QAAA;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Button } from 'react-aria-components';
|
|
5
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
|
+
|
|
7
|
+
const ButtonIcon = forwardRef(
|
|
8
|
+
(props, ref) => {
|
|
9
|
+
const {
|
|
10
|
+
size = "small",
|
|
11
|
+
variant = "primary",
|
|
12
|
+
icon,
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
...rest
|
|
16
|
+
} = props;
|
|
17
|
+
const { classNames, dataAttributes } = useStyles("Button", {
|
|
18
|
+
size,
|
|
19
|
+
variant
|
|
20
|
+
});
|
|
21
|
+
const { classNames: classNamesButtonIcon } = useStyles("ButtonIcon");
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Button,
|
|
24
|
+
{
|
|
25
|
+
className: clsx(classNames.root, classNamesButtonIcon.root, className),
|
|
26
|
+
ref,
|
|
27
|
+
...dataAttributes,
|
|
28
|
+
...rest,
|
|
29
|
+
children: icon
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
ButtonIcon.displayName = "ButtonIcon";
|
|
35
|
+
|
|
36
|
+
export { ButtonIcon };
|
|
37
|
+
//# sourceMappingURL=ButtonIcon.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonIcon.esm.js","sources":["../../../src/components/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport type { ButtonIconProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const ButtonIcon = forwardRef(\n (props: ButtonIconProps, ref: Ref<HTMLButtonElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n icon,\n className,\n style,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n const { classNames: classNamesButtonIcon } = useStyles('ButtonIcon');\n\n return (\n <RAButton\n className={clsx(classNames.root, classNamesButtonIcon.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {icon}\n </RAButton>\n );\n },\n);\n\nButtonIcon.displayName = 'ButtonIcon';\n"],"names":["RAButton"],"mappings":";;;;;;AAuBO,MAAM,UAAa,GAAA,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAgC,KAAA;AACvD,IAAM,MAAA;AAAA,MACJ,IAAO,GAAA,OAAA;AAAA,MACP,OAAU,GAAA,SAAA;AAAA,MACV,IAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,GAAG;AAAA,KACD,GAAA,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAY,cAAe,EAAA,GAAI,UAAU,QAAU,EAAA;AAAA,MACzD,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAED,IAAA,MAAM,EAAE,UAAA,EAAY,oBAAqB,EAAA,GAAI,UAAU,YAAY,CAAA;AAEnE,IACE,uBAAA,GAAA;AAAA,MAACA,MAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAK,CAAA,UAAA,CAAW,IAAM,EAAA,oBAAA,CAAqB,MAAM,SAAS,CAAA;AAAA,QACrE,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA;AAAA;AAAA,KACH;AAAA;AAGN;AAEA,UAAA,CAAW,WAAc,GAAA,YAAA;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Link } from 'react-aria-components';
|
|
5
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
|
+
|
|
7
|
+
const ButtonLink = forwardRef(
|
|
8
|
+
(props, ref) => {
|
|
9
|
+
const {
|
|
10
|
+
size = "small",
|
|
11
|
+
variant = "primary",
|
|
12
|
+
iconStart,
|
|
13
|
+
iconEnd,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
} = props;
|
|
18
|
+
const { classNames, dataAttributes } = useStyles("Button", {
|
|
19
|
+
size,
|
|
20
|
+
variant
|
|
21
|
+
});
|
|
22
|
+
const { classNames: classNamesButtonLink } = useStyles("ButtonLink");
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
Link,
|
|
25
|
+
{
|
|
26
|
+
className: clsx(classNames.root, classNamesButtonLink.root, className),
|
|
27
|
+
ref,
|
|
28
|
+
...dataAttributes,
|
|
29
|
+
...rest,
|
|
30
|
+
children: [
|
|
31
|
+
iconStart,
|
|
32
|
+
children,
|
|
33
|
+
iconEnd
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
ButtonLink.displayName = "ButtonLink";
|
|
40
|
+
|
|
41
|
+
export { ButtonLink };
|
|
42
|
+
//# sourceMappingURL=ButtonLink.esm.js.map
|
|
@@ -0,0 +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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Link as RALink } from 'react-aria-components';\nimport type { ButtonLinkProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const ButtonLink = forwardRef(\n (props: ButtonLinkProps, ref: Ref<HTMLAnchorElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n iconStart,\n iconEnd,\n children,\n className,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n const { classNames: classNamesButtonLink } = useStyles('ButtonLink');\n\n return (\n <RALink\n className={clsx(classNames.root, classNamesButtonLink.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {iconStart}\n {children}\n {iconEnd}\n </RALink>\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink';\n"],"names":["RALink"],"mappings":";;;;;;AAuBO,MAAM,UAAa,GAAA,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAgC,KAAA;AACvD,IAAM,MAAA;AAAA,MACJ,IAAO,GAAA,OAAA;AAAA,MACP,OAAU,GAAA,SAAA;AAAA,MACV,SAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAG;AAAA,KACD,GAAA,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAY,cAAe,EAAA,GAAI,UAAU,QAAU,EAAA;AAAA,MACzD,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAED,IAAA,MAAM,EAAE,UAAA,EAAY,oBAAqB,EAAA,GAAI,UAAU,YAAY,CAAA;AAEnE,IACE,uBAAA,IAAA;AAAA,MAACA,IAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAK,CAAA,UAAA,CAAW,IAAM,EAAA,oBAAA,CAAqB,MAAM,SAAS,CAAA;AAAA,QACrE,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,UACA,QAAA;AAAA,UACA;AAAA;AAAA;AAAA,KACH;AAAA;AAGN;AAEA,UAAA,CAAW,WAAc,GAAA,YAAA;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { ScrollArea } from '../ScrollArea/ScrollArea.esm.js';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
|
+
|
|
7
|
+
const Card = forwardRef((props, ref) => {
|
|
8
|
+
const { className, ...rest } = props;
|
|
9
|
+
const { classNames } = useStyles("Card");
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { ref, className: clsx(classNames.root, className), ...rest });
|
|
11
|
+
});
|
|
12
|
+
forwardRef(
|
|
13
|
+
(props, ref) => {
|
|
14
|
+
const { className, ...rest } = props;
|
|
15
|
+
const { classNames } = useStyles("Card");
|
|
16
|
+
return /* @__PURE__ */ jsx("div", { ref, className: clsx(classNames.header, className), ...rest });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
forwardRef(
|
|
20
|
+
(props, ref) => {
|
|
21
|
+
const { children, className, ...rest } = props;
|
|
22
|
+
const { classNames } = useStyles("Card");
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
ScrollArea.Root,
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
className: clsx(classNames.body, className),
|
|
28
|
+
...rest,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, { style: { paddingInline: "var(--bui-space-3)" }, children }),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
ScrollArea.Scrollbar,
|
|
33
|
+
{
|
|
34
|
+
orientation: "vertical",
|
|
35
|
+
style: { margin: "0 0.25rem" },
|
|
36
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {})
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
forwardRef(
|
|
45
|
+
(props, ref) => {
|
|
46
|
+
const { className, ...rest } = props;
|
|
47
|
+
const { classNames } = useStyles("Card");
|
|
48
|
+
return /* @__PURE__ */ jsx("div", { ref, className: clsx(classNames.footer, className), ...rest });
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export { Card };
|
|
53
|
+
//# sourceMappingURL=Card.esm.js.map
|
|
@@ -0,0 +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 { ScrollArea } from '../ScrollArea';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.root, className)} {...rest} />\n );\n});\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.header, className)} {...rest} />\n );\n },\n);\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { children, className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <ScrollArea.Root\n ref={ref}\n className={clsx(classNames.body, className)}\n {...rest}\n >\n <ScrollArea.Viewport style={{ paddingInline: 'var(--bui-space-3)' }}>\n {children}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar\n orientation=\"vertical\"\n style={{ margin: '0 0.25rem' }}\n >\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n );\n },\n);\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.footer, className)} {...rest} />\n );\n },\n);\n"],"names":[],"mappings":";;;;;;AAgCO,MAAM,IAAO,GAAA,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAQ,KAAA;AACxE,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAS,GAAA,KAAA;AAC/B,EAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,MAAM,CAAA;AAEvC,EACE,uBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAU,SAAW,EAAA,IAAA,CAAK,WAAW,IAAM,EAAA,SAAS,CAAI,EAAA,GAAG,IAAM,EAAA,CAAA;AAE1E,CAAC;AAOyB,UAAA;AAAA,EACxB,CAAC,OAAO,GAAQ,KAAA;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAS,GAAA,KAAA;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,MAAM,CAAA;AAEvC,IACE,uBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAU,SAAW,EAAA,IAAA,CAAK,WAAW,MAAQ,EAAA,SAAS,CAAI,EAAA,GAAG,IAAM,EAAA,CAAA;AAAA;AAG9E;AAOwB,UAAA;AAAA,EACtB,CAAC,OAAO,GAAQ,KAAA;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAW,EAAA,GAAG,MAAS,GAAA,KAAA;AACzC,IAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,MAAM,CAAA;AAEvC,IACE,uBAAA,IAAA;AAAA,MAAC,UAAW,CAAA,IAAA;AAAA,MAAX;AAAA,QACC,GAAA;AAAA,QACA,SAAW,EAAA,IAAA,CAAK,UAAW,CAAA,IAAA,EAAM,SAAS,CAAA;AAAA,QACzC,GAAG,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAC,GAAA,CAAA,UAAA,CAAW,UAAX,EAAoB,KAAA,EAAO,EAAE,aAAe,EAAA,oBAAA,IAC1C,QACH,EAAA,CAAA;AAAA,0BACA,GAAA;AAAA,YAAC,UAAW,CAAA,SAAA;AAAA,YAAX;AAAA,cACC,WAAY,EAAA,UAAA;AAAA,cACZ,KAAA,EAAO,EAAE,MAAA,EAAQ,WAAY,EAAA;AAAA,cAE7B,QAAA,kBAAA,GAAA,CAAC,UAAW,CAAA,KAAA,EAAX,EAAiB;AAAA;AAAA;AACpB;AAAA;AAAA,KACF;AAAA;AAGN;AAO0B,UAAA;AAAA,EACxB,CAAC,OAAO,GAAQ,KAAA;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAS,GAAA,KAAA;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,MAAM,CAAA;AAEvC,IACE,uBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAU,SAAW,EAAA,IAAA,CAAK,WAAW,MAAQ,EAAA,SAAS,CAAI,EAAA,GAAG,IAAM,EAAA,CAAA;AAAA;AAG9E;;;;"}
|