@mittwald/flow-react-components 1.2.0-next.2 → 1.2.0-next.20
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/MIGRATION.md +160 -8
- package/dist/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/css/all-layered.css +1 -1
- package/dist/css/all.css +1 -1
- package/dist/js/_virtual/_10.locale.mjs +3 -9
- package/dist/js/_virtual/_11.locale.mjs +9 -3
- package/dist/js/_virtual/_12.locale.mjs +3 -9
- package/dist/js/_virtual/_4.locale.mjs +9 -3
- package/dist/js/_virtual/_5.locale.mjs +3 -21
- package/dist/js/_virtual/_6.locale.mjs +21 -3
- package/dist/js/_virtual/_7.locale.mjs +3 -3
- package/dist/js/_virtual/_8.locale.mjs +3 -3
- package/dist/js/_virtual/_9.locale.mjs +3 -3
- package/dist/js/default.mjs +6 -5
- package/dist/js/packages/components/src/components/Badge/Badge.mjs +21 -2
- package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Badge/Badge.module.mjs +3 -1
- package/dist/js/packages/components/src/components/Badge/Badge.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Badge/components/ContextualHelpButton/ContextualHelpButton.mjs +25 -0
- package/dist/js/packages/components/src/components/Badge/components/ContextualHelpButton/ContextualHelpButton.mjs.map +1 -0
- package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs +34 -26
- package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs +40 -0
- package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs.map +1 -0
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/XAxis.mjs +3 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/XAxis.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs +2 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/context.mjs +11 -0
- package/dist/js/packages/components/src/components/CartesianChart/context.mjs.map +1 -0
- package/dist/js/packages/components/src/components/CartesianChart/types.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs +1 -1
- package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +1 -1
- package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs +1 -1
- package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs +1 -1
- package/dist/js/packages/components/src/components/Heading/Heading.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Label/Label.mjs +1 -1
- package/dist/js/packages/components/src/components/LightBox/LightBox.mjs +1 -1
- package/dist/js/packages/components/src/components/Link/Link.module.mjs +2 -2
- package/dist/js/packages/components/src/components/Link/Link.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs +1 -1
- package/dist/js/packages/components/src/components/List/model/item/ItemView.mjs +7 -0
- package/dist/js/packages/components/src/components/List/model/item/ItemView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Modal/Modal.mjs +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarValue.mjs +1 -1
- package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs +2 -1
- package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
- package/dist/js/packages/components/src/views/ContextualHelpTriggerView.mjs +16 -0
- package/dist/js/packages/components/src/views/ContextualHelpTriggerView.mjs.map +1 -0
- package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +6 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +6 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
- package/dist/types/components/Badge/Badge.browser.test.d.ts +2 -0
- package/dist/types/components/Badge/Badge.browser.test.d.ts.map +1 -0
- package/dist/types/components/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/Badge/components/ContextualHelpButton/ContextualHelpButton.d.ts +14 -0
- package/dist/types/components/Badge/components/ContextualHelpButton/ContextualHelpButton.d.ts.map +1 -0
- package/dist/types/components/Badge/components/ContextualHelpButton/index.d.ts +3 -0
- package/dist/types/components/Badge/components/ContextualHelpButton/index.d.ts.map +1 -0
- package/dist/types/components/Badge/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/Badge/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/CartesianChart.d.ts +12 -1
- package/dist/types/components/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/Bar/Bar.d.ts +19 -0
- package/dist/types/components/CartesianChart/components/Bar/Bar.d.ts.map +1 -0
- package/dist/types/components/CartesianChart/components/Bar/index.d.ts +3 -0
- package/dist/types/components/CartesianChart/components/Bar/index.d.ts.map +1 -0
- package/dist/types/components/CartesianChart/components/Bar/view.d.ts +8 -0
- package/dist/types/components/CartesianChart/components/Bar/view.d.ts.map +1 -0
- package/dist/types/components/CartesianChart/components/XAxis/XAxis.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/context.d.ts +8 -0
- package/dist/types/components/CartesianChart/context.d.ts.map +1 -0
- package/dist/types/components/CartesianChart/index.d.ts +1 -0
- package/dist/types/components/CartesianChart/index.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/stories/Default.stories.d.ts +4 -0
- package/dist/types/components/CartesianChart/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/types.d.ts +6 -0
- package/dist/types/components/CartesianChart/types.d.ts.map +1 -1
- package/dist/types/components/DonutChart/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/List/components/Items/components/Item/Item.d.ts.map +1 -1
- package/dist/types/components/List/model/item/ItemView.d.ts +5 -0
- package/dist/types/components/List/model/item/ItemView.d.ts.map +1 -1
- package/dist/types/components/List/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Modal/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/SegmentedControl/components/Segment/Segment.d.ts +2 -1
- package/dist/types/components/SegmentedControl/components/Segment/Segment.d.ts.map +1 -1
- package/dist/types/components/Select/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +6 -0
- package/dist/types/lib/theming/hooks/useDesignTokens.d.ts.map +1 -1
- package/dist/types/views/BarView.d.ts +5 -0
- package/dist/types/views/BarView.d.ts.map +1 -0
- package/package.json +9 -9
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@51592c7dce2c58889664b6822f25f6d1
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": {
|
|
6
|
-
|
|
7
|
-
"showMore": "Mehr anzeigen"
|
|
8
|
-
},
|
|
9
|
-
"en-US": {
|
|
10
|
-
"showLess": "Show less",
|
|
11
|
-
"showMore": "Show more"
|
|
12
|
-
}
|
|
5
|
+
"de-DE": { "copy": "Kopieren" },
|
|
6
|
+
"en-US": { "copy": "Copy" }
|
|
13
7
|
};
|
|
14
8
|
//#endregion
|
|
15
9
|
export { __locale_default as default };
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@cbc1b50fe3e51afbdb1b35a65308b79e
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": {
|
|
6
|
-
|
|
5
|
+
"de-DE": {
|
|
6
|
+
"showLess": "Weniger anzeigen",
|
|
7
|
+
"showMore": "Mehr anzeigen"
|
|
8
|
+
},
|
|
9
|
+
"en-US": {
|
|
10
|
+
"showLess": "Show less",
|
|
11
|
+
"showMore": "Show more"
|
|
12
|
+
}
|
|
7
13
|
};
|
|
8
14
|
//#endregion
|
|
9
15
|
export { __locale_default as default };
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@51dcf4944c990e2cbe26472300dae78d
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": {
|
|
6
|
-
|
|
7
|
-
"moreInformationAbout": "Weitere Informationen zu {subject}"
|
|
8
|
-
},
|
|
9
|
-
"en-US": {
|
|
10
|
-
"moreInformation": "More information",
|
|
11
|
-
"moreInformationAbout": "More information about {subject}"
|
|
12
|
-
}
|
|
5
|
+
"de-DE": { "showOptions": "Auswahlmöglichkeiten anzeigen" },
|
|
6
|
+
"en-US": { "showOptions": "Show options" }
|
|
13
7
|
};
|
|
14
8
|
//#endregion
|
|
15
9
|
export { __locale_default as default };
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@df0c8534e2e4f7c6c3d4365218df7347
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": {
|
|
6
|
-
|
|
5
|
+
"de-DE": {
|
|
6
|
+
"moreInformation": "Weitere Informationen",
|
|
7
|
+
"moreInformationAbout": "Weitere Informationen zu {subject}"
|
|
8
|
+
},
|
|
9
|
+
"en-US": {
|
|
10
|
+
"moreInformation": "More information",
|
|
11
|
+
"moreInformationAbout": "More information about {subject}"
|
|
12
|
+
}
|
|
7
13
|
};
|
|
8
14
|
//#endregion
|
|
9
15
|
export { __locale_default as default };
|
|
@@ -1,27 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@24d7079ce80a619bbdda6dfcc8289f94
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": {
|
|
6
|
-
|
|
7
|
-
"preset.lastWeek": "Letzte Woche",
|
|
8
|
-
"preset.lastYear": "Letztes Jahr",
|
|
9
|
-
"preset.thisMonth": "Diesen Monat",
|
|
10
|
-
"preset.thisWeek": "Diese Woche",
|
|
11
|
-
"preset.thisYear": "Dieses Jahr",
|
|
12
|
-
"preset.today": "Heute",
|
|
13
|
-
"preset.yesterday": "Gestern"
|
|
14
|
-
},
|
|
15
|
-
"en-US": {
|
|
16
|
-
"preset.lastMonth": "Last month",
|
|
17
|
-
"preset.lastWeek": "Last week",
|
|
18
|
-
"preset.lastYear": "Last year",
|
|
19
|
-
"preset.thisMonth": "This month",
|
|
20
|
-
"preset.thisWeek": "This week",
|
|
21
|
-
"preset.thisYear": "This year",
|
|
22
|
-
"preset.today": "Today",
|
|
23
|
-
"preset.yesterday": "Yesterday"
|
|
24
|
-
}
|
|
5
|
+
"de-DE": { "remove": "Entfernen" },
|
|
6
|
+
"en-US": { "remove": "Remove" }
|
|
25
7
|
};
|
|
26
8
|
//#endregion
|
|
27
9
|
export { __locale_default as default };
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@aaaa2422dd023a875e13abc0d3d178ce
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": {
|
|
6
|
-
|
|
5
|
+
"de-DE": {
|
|
6
|
+
"preset.lastMonth": "Letzten Monat",
|
|
7
|
+
"preset.lastWeek": "Letzte Woche",
|
|
8
|
+
"preset.lastYear": "Letztes Jahr",
|
|
9
|
+
"preset.thisMonth": "Diesen Monat",
|
|
10
|
+
"preset.thisWeek": "Diese Woche",
|
|
11
|
+
"preset.thisYear": "Dieses Jahr",
|
|
12
|
+
"preset.today": "Heute",
|
|
13
|
+
"preset.yesterday": "Gestern"
|
|
14
|
+
},
|
|
15
|
+
"en-US": {
|
|
16
|
+
"preset.lastMonth": "Last month",
|
|
17
|
+
"preset.lastWeek": "Last week",
|
|
18
|
+
"preset.lastYear": "Last year",
|
|
19
|
+
"preset.thisMonth": "This month",
|
|
20
|
+
"preset.thisWeek": "This week",
|
|
21
|
+
"preset.thisYear": "This year",
|
|
22
|
+
"preset.today": "Today",
|
|
23
|
+
"preset.yesterday": "Yesterday"
|
|
24
|
+
}
|
|
7
25
|
};
|
|
8
26
|
//#endregion
|
|
9
27
|
export { __locale_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@162914df08c90e5e10d2f78b03d9d768
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": { "
|
|
6
|
-
"en-US": { "
|
|
5
|
+
"de-DE": { "progressBar.of": "von" },
|
|
6
|
+
"en-US": { "progressBar.of": "of" }
|
|
7
7
|
};
|
|
8
8
|
//#endregion
|
|
9
9
|
export { __locale_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@3b9d9e153ad753f427f375d1275fbcad
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": { "
|
|
6
|
-
"en-US": { "
|
|
5
|
+
"de-DE": { "optional": "(optional)" },
|
|
6
|
+
"en-US": { "optional": "(optional)" }
|
|
7
7
|
};
|
|
8
8
|
//#endregion
|
|
9
9
|
export { __locale_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
//#region \0.locale.json@
|
|
3
|
+
//#region \0.locale.json@774f50b2495c87d6d13911bcd596e720
|
|
4
4
|
var __locale_default = {
|
|
5
|
-
"de-DE": { "
|
|
6
|
-
"en-US": { "
|
|
5
|
+
"de-DE": { "tooltip.progressBar.total": "Gesamt" },
|
|
6
|
+
"en-US": { "tooltip.progressBar.total": "Total" }
|
|
7
7
|
};
|
|
8
8
|
//#endregion
|
|
9
9
|
export { __locale_default as default };
|
package/dist/js/default.mjs
CHANGED
|
@@ -183,6 +183,10 @@ import { Popover } from "./packages/components/src/components/Popover/Popover.mj
|
|
|
183
183
|
import { Autocomplete } from "./packages/components/src/components/Autocomplete/Autocomplete.mjs";
|
|
184
184
|
import { Avatar } from "./packages/components/src/components/Avatar/Avatar.mjs";
|
|
185
185
|
import { AvatarStack } from "./packages/components/src/components/AvatarStack/AvatarStack.mjs";
|
|
186
|
+
import { DialogTrigger } from "./packages/components/src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.mjs";
|
|
187
|
+
import { MenuTrigger } from "./packages/components/src/components/OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs";
|
|
188
|
+
import { OverlayTrigger } from "./packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs";
|
|
189
|
+
import { ContextualHelpTrigger } from "./packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs";
|
|
186
190
|
import { Badge } from "./packages/components/src/components/Badge/Badge.mjs";
|
|
187
191
|
import { BigNumber } from "./packages/components/src/components/BigNumber/BigNumber.mjs";
|
|
188
192
|
import { Breadcrumb } from "./packages/components/src/components/Breadcrumb/Breadcrumb.mjs";
|
|
@@ -195,6 +199,7 @@ import { isDateRangeValue } from "./packages/components/src/components/Calendar/
|
|
|
195
199
|
import { Div } from "./packages/components/src/components/Div/Div.mjs";
|
|
196
200
|
import { AreaDot } from "./packages/components/src/components/CartesianChart/components/AreaDot/AreaDot.mjs";
|
|
197
201
|
import { Area, TypedArea } from "./packages/components/src/components/CartesianChart/components/Area/Area.mjs";
|
|
202
|
+
import { Bar, TypedBar } from "./packages/components/src/components/CartesianChart/components/Bar/Bar.mjs";
|
|
198
203
|
import { TypedXAxis } from "./packages/components/src/components/CartesianChart/components/XAxis/types.mjs";
|
|
199
204
|
import { XAxis } from "./packages/components/src/components/CartesianChart/components/XAxis/XAxis.mjs";
|
|
200
205
|
import { TypedYAxis } from "./packages/components/src/components/CartesianChart/components/YAxis/types.mjs";
|
|
@@ -233,13 +238,9 @@ import { ComponentDefaultsContext, ComponentDefaultsProvider, useComponentDefaul
|
|
|
233
238
|
import { Content } from "./packages/components/src/components/Content/Content.mjs";
|
|
234
239
|
import { ContextMenuContent } from "./packages/components/src/components/ContextMenu/components/ContextMenuContent/ContextMenuContent.mjs";
|
|
235
240
|
import { ContextMenu } from "./packages/components/src/components/ContextMenu/ContextMenu.mjs";
|
|
236
|
-
import { DialogTrigger } from "./packages/components/src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.mjs";
|
|
237
|
-
import { MenuTrigger } from "./packages/components/src/components/OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs";
|
|
238
|
-
import { OverlayTrigger } from "./packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs";
|
|
239
241
|
import { ContextMenuTrigger } from "./packages/components/src/components/ContextMenu/components/ContextMenuTrigger/ContextMenuTrigger.mjs";
|
|
240
242
|
import { ContextMenuSection } from "./packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs";
|
|
241
243
|
import { ContextualHelp } from "./packages/components/src/components/ContextualHelp/ContextualHelp.mjs";
|
|
242
|
-
import { ContextualHelpTrigger } from "./packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs";
|
|
243
244
|
import { CounterBadge } from "./packages/components/src/components/CounterBadge/CounterBadge.mjs";
|
|
244
245
|
import { Option } from "./packages/components/src/components/Option/Option.mjs";
|
|
245
246
|
import { CountryOptions } from "./packages/components/src/components/CountryOptions/CountryOptions.mjs";
|
|
@@ -334,4 +335,4 @@ import { TextField } from "./packages/components/src/components/TextField/TextFi
|
|
|
334
335
|
import { TimeField } from "./packages/components/src/components/TimeField/TimeField.mjs";
|
|
335
336
|
import { Truncate } from "./packages/components/src/components/Truncate/Truncate.mjs";
|
|
336
337
|
import { TunnelEntry } from "./packages/components/src/components/TunnelEntry/TunnelEntry.mjs";
|
|
337
|
-
export { AbortActionError, AccentBox, Accordion, Action, ActionBatch, ActionGroup, Activity, Alert, AlertBadge, AlertIcon, AlertText, Align, Area, AreaDot, Autocomplete, Avatar, AvatarStack, Badge, BigNumber, Breadcrumb, BrowserOnly, Button, CartesianChart, CartesianGrid, ChartGrid, ChartLegend, ChartTooltip, Chat, Checkbox, CheckboxButton, CheckboxGroup, ClearPropsContext, CodeBlock, CodeEditor, Color, ColumnLayout, Combine, ComboBox, ComponentDefaultsContext, ComponentDefaultsProvider, ComponentPropsContextProvider, Content, ContextMenu, ContextMenuContent, ContextMenuSection, ContextMenuTrigger, ContextualHelp, ContextualHelpTrigger, CopyButton, CounterBadge, CountryOptions, DatePicker, DateRangePicker, DeprecationWarningContext, DeprecationWarningProvider, DialogTrigger, Div, DonutChart, EmptyView, EmptyViewContainer, FieldDescription, FieldError, FileCard, FileCardList, FileDropZone, FileField, Flex, GridList, GridListItem, Header, HeaderNavigation, Heading, Icon, IconAI, IconAnalytics, IconApp, IconAscending, IconAttachment, IconAutoresponder, IconBackLink, IconBackup, IconBold, IconCamera, IconCertificate, IconChangelog, IconCheck, IconCheckboxChecked, IconCheckboxEmpty, IconCheckboxIndeterminate, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClose, IconCode, IconContainer, IconContextMenu, IconContextMenuVertical, IconContract, IconContractPartner, IconContributor, IconCopy, IconCronjob, IconCustomer, IconDanger, IconDashboard, IconDatabase, IconDate, IconDelete, IconDeliveryBox, IconDescending, IconDesktop, IconDirectory, IconDnsSubZone, IconDnsZone, IconDomain, IconDownload, IconEdit, IconEmail, IconEmailArchive, IconExtension, IconExternalLink, IconFailed, IconFeedback, IconFile, IconFilter, IconForwardAddress, IconForwardLink, IconHide, IconHome, IconImage, IconInfo, IconInvite, IconInvoice, IconItalic, IconKnowledgeHint, IconLanguage, IconLeadFyndr, IconLink, IconLock, IconLockOpen, IconLogout, IconMainUser, IconMarketplace, IconMaximize, IconMember, IconMenu, IconMinimize, IconMinus, IconMittwald, IconMobile, IconMonitoring, IconMove, IconNewsletter, IconNotification, IconNumber, IconOrder, IconOrderedList, IconPassword, IconPath, IconPause, IconPayment, IconPending, IconPicture, IconPlus, IconProject, IconQuote, IconRadioOff, IconRadioOn, IconRedo, IconRefresh, IconRegistry, IconSave, IconSearch, IconSecurity, IconSend, IconServer, IconSetProvider, IconSettings, IconShare, IconShow, IconSorting, IconSsh, IconSshKey, IconSshSftp, IconStack, IconStar, IconStarFilled, IconStart, IconStrikeThrough, IconSubdomain, IconSucceeded, IconSuccess, IconSupport, IconTerminate, IconTicket, IconTime, IconUnavailable, IconUndo, IconUnorderedList, IconUpload, IconUser, IconVhost, IconView, IconVolume, IconWarning, IllustratedMessage, Image, ImageCropper, Initials, InlineCode, IntlProvider, Kbd, Label, LabeledValue, LayoutCard, Legend, LegendItem, LightBox, LightBoxGallery, LightBoxGalleryItem, LightBoxTrigger, Line, Link, List, ListFilter, ListItem, ListItemView, ListItemViewContent, ListLoaderAsync, ListSorting, ListStaticData, ListSummary, LoadingSpinner, Markdown, MarkdownEditor, MenuItem, MenuTrigger, Message, MessageSeparator, MessageThread, Modal, ModalTrigger, Navigation, NavigationGroup, Notification, NotificationController, NotificationProvider, NumberField, Option, Overlay, OverlayContent, OverlayController, OverlayTrigger, PasswordCreationField, Popover, PopoverContent, PopoverTrigger, ProgressBar, PropsContextProvider, Radio, RadioButton, RadioGroup, RangeCalendar, Rating, RatingSegment, Render, RouterProvider, SearchField, Section, Segment, SegmentedControl, Select, Separator, SettingsProvider, Skeleton, SkeletonText, Slider, SortingFunctions, SuspenseTrigger, Switch, Tab, TabNavigation, TabTitle, Table, TableBody, TableCell, TableColumn, TableFooterRow, TableHeader, TableRow, Tabs, Text, TextArea, TextField, ThemedHtml, TimeField, Tooltip, TooltipTrigger, TranslationProvider, Truncate, TunnelEntry, TypedArea, TypedChartGrid, TypedChartLegend, TypedChartTooltip, TypedLine, TypedList, TypedListFilter, TypedListItem, TypedListLoaderAsync, TypedListSorting, TypedListStaticData, TypedXAxis, TypedYAxis, Wrap, XAxis, YAxis, abortAction, builtInComponentDefaults, dynamic, eventHandlerContext, flags, getRemoteEvent, getResolvedTheme, getTheme, iconCategories, isDateRangeValue, propsContext, setTheme, sortByDachFirst, themeHtmlAttribute, typedCartesianChart, typedList, useAriaAnnounceSuspense, useComponentDefaults, useControlledRemoteValueProps, useDesignTokens, useIsMounted, useLanguage, useList, useListMetadata, useLocalizedStringFormatter, useModalController, useNotificationController, useOnChange, useOverlayController, useProps, useTheme as useStoredTheme, useResolvedTheme as useTheme, useTranslationProvider, useWarnDeprecation };
|
|
338
|
+
export { AbortActionError, AccentBox, Accordion, Action, ActionBatch, ActionGroup, Activity, Alert, AlertBadge, AlertIcon, AlertText, Align, Area, AreaDot, Autocomplete, Avatar, AvatarStack, Badge, Bar, BigNumber, Breadcrumb, BrowserOnly, Button, CartesianChart, CartesianGrid, ChartGrid, ChartLegend, ChartTooltip, Chat, Checkbox, CheckboxButton, CheckboxGroup, ClearPropsContext, CodeBlock, CodeEditor, Color, ColumnLayout, Combine, ComboBox, ComponentDefaultsContext, ComponentDefaultsProvider, ComponentPropsContextProvider, Content, ContextMenu, ContextMenuContent, ContextMenuSection, ContextMenuTrigger, ContextualHelp, ContextualHelpTrigger, CopyButton, CounterBadge, CountryOptions, DatePicker, DateRangePicker, DeprecationWarningContext, DeprecationWarningProvider, DialogTrigger, Div, DonutChart, EmptyView, EmptyViewContainer, FieldDescription, FieldError, FileCard, FileCardList, FileDropZone, FileField, Flex, GridList, GridListItem, Header, HeaderNavigation, Heading, Icon, IconAI, IconAnalytics, IconApp, IconAscending, IconAttachment, IconAutoresponder, IconBackLink, IconBackup, IconBold, IconCamera, IconCertificate, IconChangelog, IconCheck, IconCheckboxChecked, IconCheckboxEmpty, IconCheckboxIndeterminate, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClose, IconCode, IconContainer, IconContextMenu, IconContextMenuVertical, IconContract, IconContractPartner, IconContributor, IconCopy, IconCronjob, IconCustomer, IconDanger, IconDashboard, IconDatabase, IconDate, IconDelete, IconDeliveryBox, IconDescending, IconDesktop, IconDirectory, IconDnsSubZone, IconDnsZone, IconDomain, IconDownload, IconEdit, IconEmail, IconEmailArchive, IconExtension, IconExternalLink, IconFailed, IconFeedback, IconFile, IconFilter, IconForwardAddress, IconForwardLink, IconHide, IconHome, IconImage, IconInfo, IconInvite, IconInvoice, IconItalic, IconKnowledgeHint, IconLanguage, IconLeadFyndr, IconLink, IconLock, IconLockOpen, IconLogout, IconMainUser, IconMarketplace, IconMaximize, IconMember, IconMenu, IconMinimize, IconMinus, IconMittwald, IconMobile, IconMonitoring, IconMove, IconNewsletter, IconNotification, IconNumber, IconOrder, IconOrderedList, IconPassword, IconPath, IconPause, IconPayment, IconPending, IconPicture, IconPlus, IconProject, IconQuote, IconRadioOff, IconRadioOn, IconRedo, IconRefresh, IconRegistry, IconSave, IconSearch, IconSecurity, IconSend, IconServer, IconSetProvider, IconSettings, IconShare, IconShow, IconSorting, IconSsh, IconSshKey, IconSshSftp, IconStack, IconStar, IconStarFilled, IconStart, IconStrikeThrough, IconSubdomain, IconSucceeded, IconSuccess, IconSupport, IconTerminate, IconTicket, IconTime, IconUnavailable, IconUndo, IconUnorderedList, IconUpload, IconUser, IconVhost, IconView, IconVolume, IconWarning, IllustratedMessage, Image, ImageCropper, Initials, InlineCode, IntlProvider, Kbd, Label, LabeledValue, LayoutCard, Legend, LegendItem, LightBox, LightBoxGallery, LightBoxGalleryItem, LightBoxTrigger, Line, Link, List, ListFilter, ListItem, ListItemView, ListItemViewContent, ListLoaderAsync, ListSorting, ListStaticData, ListSummary, LoadingSpinner, Markdown, MarkdownEditor, MenuItem, MenuTrigger, Message, MessageSeparator, MessageThread, Modal, ModalTrigger, Navigation, NavigationGroup, Notification, NotificationController, NotificationProvider, NumberField, Option, Overlay, OverlayContent, OverlayController, OverlayTrigger, PasswordCreationField, Popover, PopoverContent, PopoverTrigger, ProgressBar, PropsContextProvider, Radio, RadioButton, RadioGroup, RangeCalendar, Rating, RatingSegment, Render, RouterProvider, SearchField, Section, Segment, SegmentedControl, Select, Separator, SettingsProvider, Skeleton, SkeletonText, Slider, SortingFunctions, SuspenseTrigger, Switch, Tab, TabNavigation, TabTitle, Table, TableBody, TableCell, TableColumn, TableFooterRow, TableHeader, TableRow, Tabs, Text, TextArea, TextField, ThemedHtml, TimeField, Tooltip, TooltipTrigger, TranslationProvider, Truncate, TunnelEntry, TypedArea, TypedBar, TypedChartGrid, TypedChartLegend, TypedChartTooltip, TypedLine, TypedList, TypedListFilter, TypedListItem, TypedListLoaderAsync, TypedListSorting, TypedListStaticData, TypedXAxis, TypedYAxis, Wrap, XAxis, YAxis, abortAction, builtInComponentDefaults, dynamic, eventHandlerContext, flags, getRemoteEvent, getResolvedTheme, getTheme, iconCategories, isDateRangeValue, propsContext, setTheme, sortByDachFirst, themeHtmlAttribute, typedCartesianChart, typedList, useAriaAnnounceSuspense, useComponentDefaults, useControlledRemoteValueProps, useDesignTokens, useIsMounted, useLanguage, useList, useListMetadata, useLocalizedStringFormatter, useModalController, useNotificationController, useOnChange, useOverlayController, useProps, useTheme as useStoredTheme, useResolvedTheme as useTheme, useTranslationProvider, useWarnDeprecation };
|
|
@@ -6,16 +6,23 @@ import { alphaColors, isAlphaColor } from "../../lib/types/props.mjs";
|
|
|
6
6
|
import { IconClose } from "../Icon/components/icons/IconClose.mjs";
|
|
7
7
|
import { useLocalizedStringFormatter } from "../TranslationProvider/useLocalizedStringFormatter.mjs";
|
|
8
8
|
import { Button } from "../Button/Button.mjs";
|
|
9
|
+
import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExit.mjs";
|
|
9
10
|
import Badge_module_default from "./Badge.module.mjs";
|
|
10
|
-
import
|
|
11
|
+
import { ContextualHelpButton } from "./components/ContextualHelpButton/ContextualHelpButton.mjs";
|
|
12
|
+
import __locale_default from "../../../../../_virtual/_5.locale.mjs";
|
|
11
13
|
import clsx from "clsx";
|
|
12
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
15
|
[...alphaColors];
|
|
16
|
+
var contextualHelpTunnel = {
|
|
17
|
+
id: "contextualHelp",
|
|
18
|
+
component: "Badge"
|
|
19
|
+
};
|
|
14
20
|
/** @flr-generate all */
|
|
15
21
|
var Badge = flowComponent("Badge", (props) => {
|
|
16
22
|
const { children, className, color = "neutral", ref, onPress, onClose, isDisabled, ...rest } = props;
|
|
17
23
|
const stringFormatter = useLocalizedStringFormatter(__locale_default, "Badge");
|
|
18
24
|
const rootClassName = clsx(Badge_module_default.badge, Badge_module_default[color], isDisabled && Badge_module_default.disabled, className);
|
|
25
|
+
const buttonColor = isAlphaColor(color) ? color : "dark";
|
|
19
26
|
const propsContext = {
|
|
20
27
|
Label: {
|
|
21
28
|
elementType: "span",
|
|
@@ -36,6 +43,14 @@ var Badge = flowComponent("Badge", (props) => {
|
|
|
36
43
|
elementType: "span",
|
|
37
44
|
className: Badge_module_default.value
|
|
38
45
|
}
|
|
46
|
+
},
|
|
47
|
+
ContextualHelp: {
|
|
48
|
+
tunnel: contextualHelpTunnel,
|
|
49
|
+
wrapWith: /* @__PURE__ */ jsx(ContextualHelpButton, {
|
|
50
|
+
className: Badge_module_default.action,
|
|
51
|
+
color: buttonColor,
|
|
52
|
+
isDisabled
|
|
53
|
+
})
|
|
39
54
|
}
|
|
40
55
|
};
|
|
41
56
|
return /* @__PURE__ */ jsx(PropsContextProvider, {
|
|
@@ -56,10 +71,14 @@ var Badge = flowComponent("Badge", (props) => {
|
|
|
56
71
|
onPress,
|
|
57
72
|
children
|
|
58
73
|
}),
|
|
74
|
+
/* @__PURE__ */ jsx(UiComponentTunnelExit, {
|
|
75
|
+
id: contextualHelpTunnel.id,
|
|
76
|
+
component: "Badge"
|
|
77
|
+
}),
|
|
59
78
|
onClose && /* @__PURE__ */ jsx(Button, {
|
|
60
79
|
className: Badge_module_default.close,
|
|
61
80
|
size: "s",
|
|
62
|
-
color:
|
|
81
|
+
color: buttonColor,
|
|
63
82
|
variant: "plain",
|
|
64
83
|
onPress: onClose,
|
|
65
84
|
isDisabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.mjs","names":[],"sources":["../../../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Badge.module.scss\";\nimport clsx from \"clsx\";\nimport {\n alphaColors,\n isAlphaColor,\n type PropsWithClassName,\n} from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PressEvent } from \"@react-types/shared\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\n\nexport const badgeColors = [\n \"neutral\",\n \"blue\",\n \"navy\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"orange\",\n \"red\",\n ...alphaColors,\n] as const;\nexport type BadgeColors = (typeof badgeColors)[number];\n\nexport interface BadgeProps\n extends PropsWithChildren, FlowComponentProps, PropsWithClassName {\n /** Handler that is called when the badge is pressed. */\n onPress?: (e: PressEvent) => void;\n /** Handler that is called when the badges close icon is pressed. */\n onClose?: (e: PressEvent) => void;\n /** The color of the badge. @default \"neutral\" */\n color?: BadgeColors;\n /** Whether the badge is disabled. */\n isDisabled?: boolean;\n}\n\n/** @flr-generate all */\nexport const Badge = flowComponent(\"Badge\", (props) => {\n const {\n children,\n className,\n color = \"neutral\",\n ref,\n onPress,\n onClose,\n isDisabled,\n ...rest\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Badge\");\n\n const rootClassName = clsx(\n styles.badge,\n styles[color],\n isDisabled && styles.disabled,\n className,\n );\n\n const propsContext: PropsContext = {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n Button: {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName} {...rest} ref={ref}>\n {!onPress && <div className={styles.content}>{children}</div>}\n {onPress && (\n <Button\n isDisabled={isDisabled}\n unstyled\n className={styles.button}\n onPress={onPress}\n >\n {children}\n </Button>\n )}\n\n {onClose && (\n <Button\n className={styles.close}\n size=\"s\"\n color={
|
|
1
|
+
{"version":3,"file":"Badge.mjs","names":[],"sources":["../../../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Badge.module.scss\";\nimport clsx from \"clsx\";\nimport {\n alphaColors,\n isAlphaColor,\n type PropsWithClassName,\n} from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PressEvent } from \"@react-types/shared\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { ContextualHelpButton } from \"@/components/Badge/components/ContextualHelpButton\";\nimport locales from \"./locales/*.locale.json\";\n\nexport const badgeColors = [\n \"neutral\",\n \"blue\",\n \"navy\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"orange\",\n \"red\",\n ...alphaColors,\n] as const;\nexport type BadgeColors = (typeof badgeColors)[number];\n\nexport interface BadgeProps\n extends PropsWithChildren, FlowComponentProps, PropsWithClassName {\n /** Handler that is called when the badge is pressed. */\n onPress?: (e: PressEvent) => void;\n /** Handler that is called when the badges close icon is pressed. */\n onClose?: (e: PressEvent) => void;\n /** The color of the badge. @default \"neutral\" */\n color?: BadgeColors;\n /** Whether the badge is disabled. */\n isDisabled?: boolean;\n}\n\nconst contextualHelpTunnel = {\n id: \"contextualHelp\",\n component: \"Badge\",\n} as const;\n\n/** @flr-generate all */\nexport const Badge = flowComponent(\"Badge\", (props) => {\n const {\n children,\n className,\n color = \"neutral\",\n ref,\n onPress,\n onClose,\n isDisabled,\n ...rest\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Badge\");\n\n const rootClassName = clsx(\n styles.badge,\n styles[color],\n isDisabled && styles.disabled,\n className,\n );\n\n const buttonColor = isAlphaColor(color) ? color : \"dark\";\n\n const propsContext: PropsContext = {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n Button: {\n Label: {\n elementType: \"span\",\n className: styles.scope,\n unstyled: true,\n },\n Text: {\n elementType: \"span\",\n className: styles.value,\n },\n },\n ContextualHelp: {\n tunnel: contextualHelpTunnel,\n wrapWith: (\n <ContextualHelpButton\n className={styles.action}\n color={buttonColor}\n isDisabled={isDisabled}\n />\n ),\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName} {...rest} ref={ref}>\n {!onPress && <div className={styles.content}>{children}</div>}\n {onPress && (\n <Button\n isDisabled={isDisabled}\n unstyled\n className={styles.button}\n onPress={onPress}\n >\n {children}\n </Button>\n )}\n\n <UiComponentTunnelExit id={contextualHelpTunnel.id} component=\"Badge\" />\n\n {onClose && (\n <Button\n className={styles.close}\n size=\"s\"\n color={buttonColor}\n variant=\"plain\"\n onPress={onClose}\n isDisabled={isDisabled}\n aria-label={stringFormatter.format(\"remove\")}\n >\n <IconClose />\n </Button>\n )}\n </div>\n </PropsContextProvider>\n );\n});\n\nexport default Badge;\n"],"mappings":";;;;;;;;;;;;;;AAmB2B,CAUzB,GAAG,WACL;AAeA,IAAM,uBAAuB;CAC3B,IAAI;CACJ,WAAW;AACb;;AAGA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EACJ,UACA,WACA,QAAQ,WACR,KACA,SACA,SACA,YACA,GAAG,SACD;CAEJ,MAAM,kBAAkB,4BAA4B,kBAAS,OAAO;CAEpE,MAAM,gBAAgB,KACpB,qBAAO,OACP,qBAAO,QACP,cAAc,qBAAO,UACrB,SACF;CAEA,MAAM,cAAc,aAAa,KAAK,IAAI,QAAQ;CAElD,MAAM,eAA6B;EACjC,OAAO;GACL,aAAa;GACb,WAAW,qBAAO;GAClB,UAAU;EACZ;EACA,MAAM;GACJ,aAAa;GACb,WAAW,qBAAO;EACpB;EACA,QAAQ;GACN,OAAO;IACL,aAAa;IACb,WAAW,qBAAO;IAClB,UAAU;GACZ;GACA,MAAM;IACJ,aAAa;IACb,WAAW,qBAAO;GACpB;EACF;EACA,gBAAgB;GACd,QAAQ;GACR,UACE,oBAAC,sBAAD;IACE,WAAW,qBAAO;IAClB,OAAO;IACK;GACb,CAAA;EAEL;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,OAAD;GAAK,WAAW;GAAe,GAAI;GAAW;GAA9C,UAAA;IACG,CAAC,WAAW,oBAAC,OAAD;KAAK,WAAW,qBAAO;KAAU;IAAc,CAAA;IAC3D,WACC,oBAAC,QAAD;KACc;KACZ,UAAA;KACA,WAAW,qBAAO;KACT;KAER;IACK,CAAA;IAGV,oBAAC,uBAAD;KAAuB,IAAI,qBAAqB;KAAI,WAAU;IAAS,CAAA;IAEtE,WACC,oBAAC,QAAD;KACE,WAAW,qBAAO;KAClB,MAAK;KACL,OAAO;KACP,SAAQ;KACR,SAAS;KACG;KACZ,cAAY,gBAAgB,OAAO,QAAQ;KAE3C,UAAA,oBAAC,WAAD,CAAY,CAAA;IACN,CAAA;GAEP;;CACe,CAAA;AAE1B,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
var badge = "flow--badge";
|
|
5
5
|
var content = "flow--badge--content";
|
|
6
6
|
var button = "flow--badge--button";
|
|
7
|
+
var action = "flow--badge--action";
|
|
7
8
|
var close = "flow--badge--close";
|
|
8
9
|
var scope = "flow--badge--scope";
|
|
9
10
|
var value = "flow--badge--value";
|
|
@@ -23,6 +24,7 @@ var Badge_module_default = {
|
|
|
23
24
|
badge,
|
|
24
25
|
content,
|
|
25
26
|
button,
|
|
27
|
+
action,
|
|
26
28
|
close,
|
|
27
29
|
scope,
|
|
28
30
|
value,
|
|
@@ -42,6 +44,6 @@ var Badge_module_default = {
|
|
|
42
44
|
"light-static": "flow--badge--light-static"
|
|
43
45
|
};
|
|
44
46
|
//#endregion
|
|
45
|
-
export { badge, blue, button, close, content, dark, Badge_module_default as default, disabled, green, light, lilac, navy, neutral, orange, red, scope, teal, value, violet };
|
|
47
|
+
export { action, badge, blue, button, close, content, dark, Badge_module_default as default, disabled, green, light, lilac, navy, neutral, orange, red, scope, teal, value, violet };
|
|
46
48
|
|
|
47
49
|
//# sourceMappingURL=Badge.module.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.module.mjs","names":[],"sources":["../../../../../../../src/components/Badge/Badge.module.scss"],"sourcesContent":["@use \"@/styles/mixins/focus\";\n@use \"@/styles/mixins/ellipsis\";\n\n.badge {\n display: flex;\n width: fit-content;\n max-width: 100%;\n\n --badge-size: calc(var(--badge--line-height) + var(--badge--padding-y) * 2);\n --content-size: calc(var(--badge-size) - var(--badge--border-width) * 2);\n\n .content,\n .button {\n border-radius: var(--badge--corner-radius);\n border-width: var(--badge--border-width);\n border-style: var(--badge--border-style);\n font-size: var(--badge--font-size);\n font-weight: var(--badge--font-weight);\n padding: 0;\n display: flex;\n overflow: hidden;\n align-items: center;\n height: var(--badge-size);\n line-height: var(--content-size);\n padding-inline: var(--badge--padding-x);\n transition-property: background-color;\n transition-duration: var(--transition--duration--default);\n\n @include ellipsis.ellipsis();\n }\n\n .button,\n .close {\n @include focus.focus;\n }\n\n @extend .neutral;\n\n &:has(.close) {\n .button,\n .content {\n padding-inline-end: calc(var(--content-size) + var(--badge--spacing));\n }\n }\n\n &:has(.scope) {\n .content,\n .button {\n padding: 0;\n }\n\n .value {\n padding-inline: var(--badge--spacing) var(--badge--padding-x);\n }\n\n .scope {\n padding-inline: var(--badge--padding-x) var(--badge--spacing);\n height: 100%;\n flex-shrink: 0;\n }\n\n &:has(.close) {\n .button,\n .content {\n padding-inline-end: var(--content-size);\n\n .value {\n padding-inline-end: var(--badge--spacing);\n }\n }\n }\n }\n\n .close {\n height: var(--content-size);\n padding: calc(var(--badge--padding-y) - var(--badge--border-width));\n border-radius: 0;\n border-end-end-radius: var(--badge-size);\n border-start-end-radius: var(--badge-size);\n margin-inline-start: calc(\n
|
|
1
|
+
{"version":3,"file":"Badge.module.mjs","names":[],"sources":["../../../../../../../src/components/Badge/Badge.module.scss"],"sourcesContent":["@use \"@/styles/mixins/focus\";\n@use \"@/styles/mixins/ellipsis\";\n\n.badge {\n display: flex;\n width: fit-content;\n max-width: 100%;\n\n --badge-size: calc(var(--badge--line-height) + var(--badge--padding-y) * 2);\n --content-size: calc(var(--badge-size) - var(--badge--border-width) * 2);\n\n .content,\n .button {\n border-radius: var(--badge--corner-radius);\n border-width: var(--badge--border-width);\n border-style: var(--badge--border-style);\n font-size: var(--badge--font-size);\n font-weight: var(--badge--font-weight);\n padding: 0;\n display: flex;\n overflow: hidden;\n align-items: center;\n height: var(--badge-size);\n line-height: var(--content-size);\n padding-inline: var(--badge--padding-x);\n transition-property: background-color;\n transition-duration: var(--transition--duration--default);\n\n @include ellipsis.ellipsis();\n }\n\n .button,\n .action,\n .close {\n @include focus.focus;\n }\n\n @extend .neutral;\n\n &:has(.close),\n &:has(.action) {\n .button,\n .content {\n padding-inline-end: calc(var(--content-size) + var(--badge--spacing));\n }\n }\n\n &:has(.action):has(.close) {\n .button,\n .content {\n padding-inline-end: calc(var(--content-size) * 2 + var(--badge--spacing));\n }\n }\n\n &:has(.scope) {\n .content,\n .button {\n padding: 0;\n }\n\n .value {\n padding-inline: var(--badge--spacing) var(--badge--padding-x);\n }\n\n .scope {\n padding-inline: var(--badge--padding-x) var(--badge--spacing);\n height: 100%;\n flex-shrink: 0;\n }\n\n &:has(.close),\n &:has(.action) {\n .button,\n .content {\n padding-inline-end: var(--content-size);\n\n .value {\n padding-inline-end: var(--badge--spacing);\n }\n }\n }\n\n &:has(.action):has(.close) {\n .button,\n .content {\n padding-inline-end: calc(var(--content-size) * 2);\n }\n }\n }\n\n .action,\n .close {\n height: var(--content-size);\n padding: calc(var(--badge--padding-y) - var(--badge--border-width));\n border-radius: 0;\n margin-inline-start: calc(\n (var(--content-size) + var(--badge--border-width)) * -1\n );\n margin-top: var(--badge--border-width);\n }\n\n /* The trailing button rounds off the badge */\n .close,\n &:not(:has(.close)) .action {\n border-end-end-radius: var(--badge-size);\n border-start-end-radius: var(--badge-size);\n }\n\n &:has(.action):has(.close) {\n .action {\n margin-inline-start: calc(\n (var(--content-size) * 2 + var(--badge--border-width)) * -1\n );\n }\n\n .close {\n margin-inline-start: 0;\n }\n }\n\n /* Colors */\n\n @mixin color($color) {\n &:where(.#{$color}) {\n .content,\n .button {\n border-color: var(--badge--#{$color}-border-color);\n background-color: var(--badge--#{$color}-background-color--default);\n color: var(--badge--#{$color}-content-color);\n }\n\n &:not(.disabled) {\n .button {\n &:hover {\n background-color: var(--badge--#{$color}-background-color--hover);\n }\n\n &[data-pressed] {\n background-color: var(--badge--#{$color}-background-color--pressed);\n }\n }\n }\n\n .scope {\n background-color: var(--badge--#{$color}-scope-background-color);\n color: var(--badge--#{$color}-scope-content-color);\n }\n }\n }\n\n @include color(\"neutral\");\n @include color(\"blue\");\n @include color(\"navy\");\n @include color(\"violet\");\n @include color(\"teal\");\n @include color(\"lilac\");\n @include color(\"green\");\n @include color(\"orange\");\n @include color(\"red\");\n @include color(\"dark\");\n @include color(\"light\");\n @include color(\"dark-static\");\n @include color(\"light-static\");\n\n &.disabled {\n .content,\n .button {\n border-color: var(--badge--disabled-border-color);\n background-color: var(--badge--disabled-background-color);\n color: var(--badge--disabled-content-color);\n }\n\n .action,\n .close {\n color: var(--badge--disabled-content-color);\n }\n\n .scope {\n background-color: var(--badge--disabled-scope-background-color);\n color: var(--badge--disabled-scope-content-color);\n }\n }\n\n /* Alpha Colors Disabled */\n\n @mixin alphaColor($color) {\n &.#{$color}.disabled {\n .content,\n .button {\n border-color: var(--badge--disabled-#{$color}-border-color);\n background-color: var(--badge--disabled-#{$color}-background-color);\n color: var(--badge--disabled-#{$color}-content-color);\n }\n\n .action,\n .close {\n color: var(--badge--disabled-#{$color}-content-color);\n }\n\n .scope {\n background-color: var(\n --badge--disabled-#{$color}-scope-background-color\n );\n color: var(--badge--disabled-#{$color}-scope-content-color);\n }\n }\n }\n\n @include alphaColor(\"dark\");\n @include alphaColor(\"light\");\n @include alphaColor(\"dark-static\");\n @include alphaColor(\"light-static\");\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import ButtonView from "../../../../views/ButtonView.mjs";
|
|
4
|
+
import ContextualHelpTriggerView from "../../../../views/ContextualHelpTriggerView.mjs";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Badge/components/ContextualHelpButton/ContextualHelpButton.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Supplies the trigger button for a contextual help placed in a badge, so the
|
|
9
|
+
* consumer only writes the <ContextualHelp>. Icon and accessibility label come
|
|
10
|
+
* from the trigger.
|
|
11
|
+
*/
|
|
12
|
+
var ContextualHelpButton = (props) => {
|
|
13
|
+
const { className, color, isDisabled, children } = props;
|
|
14
|
+
return /* @__PURE__ */ jsxs(ContextualHelpTriggerView, { children: [/* @__PURE__ */ jsx(ButtonView, {
|
|
15
|
+
className,
|
|
16
|
+
color,
|
|
17
|
+
variant: "plain",
|
|
18
|
+
size: "s",
|
|
19
|
+
isDisabled
|
|
20
|
+
}), children] });
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ContextualHelpButton, ContextualHelpButton as default };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=ContextualHelpButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextualHelpButton.mjs","names":[],"sources":["../../../../../../../../../src/components/Badge/components/ContextualHelpButton/ContextualHelpButton.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type { AlphaColor, PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport ContextualHelpTriggerView from \"@/views/ContextualHelpTriggerView\";\n\ninterface Props extends PropsWithChildren, PropsWithClassName {\n color: AlphaColor;\n isDisabled?: boolean;\n}\n\n/**\n * Supplies the trigger button for a contextual help placed in a badge, so the\n * consumer only writes the <ContextualHelp>. Icon and accessibility label come\n * from the trigger.\n */\nexport const ContextualHelpButton: FC<Props> = (props) => {\n const { className, color, isDisabled, children } = props;\n\n return (\n <ContextualHelpTriggerView>\n <ButtonView\n className={className}\n color={color}\n variant=\"plain\"\n size=\"s\"\n isDisabled={isDisabled}\n />\n {children}\n </ContextualHelpTriggerView>\n );\n};\n\nexport default ContextualHelpButton;\n"],"mappings":";;;;;;;;;;;AAeA,IAAa,wBAAmC,UAAU;CACxD,MAAM,EAAE,WAAW,OAAO,YAAY,aAAa;CAEnD,OACE,qBAAC,2BAAD,EAAA,UAAA,CACE,oBAAC,YAAD;EACa;EACJ;EACP,SAAQ;EACR,MAAK;EACO;CACb,CAAA,GACA,QACwB,EAAA,CAAA;AAE/B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import { useLocalizedStringFormatter } from "../../../../TranslationProvider/useLocalizedStringFormatter.mjs";
|
|
4
|
-
import __locale_default from "../../../../../../../../_virtual/
|
|
4
|
+
import __locale_default from "../../../../../../../../_virtual/_6.locale.mjs";
|
|
5
5
|
import { useContext, useMemo } from "react";
|
|
6
6
|
import { RangeCalendarStateContext } from "react-aria-components";
|
|
7
7
|
import invariant from "invariant";
|
|
@@ -5,7 +5,9 @@ import { Wrap } from "../Wrap/Wrap.mjs";
|
|
|
5
5
|
import CartesianChart_module_default from "./CartesianChart.module.mjs";
|
|
6
6
|
import { useChartClipRect } from "./hooks/useChartClipRect.mjs";
|
|
7
7
|
import DivView from "../../views/DivView.mjs";
|
|
8
|
+
import { CartesianChartContextProvider } from "./context.mjs";
|
|
8
9
|
import { TypedArea } from "./components/Area/Area.mjs";
|
|
10
|
+
import { TypedBar } from "./components/Bar/Bar.mjs";
|
|
9
11
|
import { TypedXAxis } from "./components/XAxis/types.mjs";
|
|
10
12
|
import { TypedYAxis } from "./components/YAxis/types.mjs";
|
|
11
13
|
import { TypedChartGrid } from "./components/ChartGrid/ChartGrid.mjs";
|
|
@@ -19,7 +21,7 @@ import { ComposedChart, ResponsiveContainer } from "recharts";
|
|
|
19
21
|
//#region src/components/CartesianChart/CartesianChart.tsx
|
|
20
22
|
/** @flr-generate all */
|
|
21
23
|
var CartesianChart = (props) => {
|
|
22
|
-
const { children, data, className, height, flexGrow, emptyView, ...rest } = props;
|
|
24
|
+
const { children, data, className, height, flexGrow, emptyView, layout = "horizontal", ...rest } = props;
|
|
23
25
|
const warnDeprecation = useWarnDeprecation();
|
|
24
26
|
const { viewDimensions, ref: containerRef } = useChartClipRect();
|
|
25
27
|
const showEmptyView = !!((!data || data.length === 0) && emptyView);
|
|
@@ -30,32 +32,37 @@ var CartesianChart = (props) => {
|
|
|
30
32
|
if (!emptyView) return;
|
|
31
33
|
return null;
|
|
32
34
|
}, [emptyView]);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
width: 1,
|
|
43
|
-
height: 1
|
|
35
|
+
const contextValue = useMemo(() => ({ layout }), [layout]);
|
|
36
|
+
return /* @__PURE__ */ jsx(CartesianChartContextProvider, {
|
|
37
|
+
value: contextValue,
|
|
38
|
+
children: /* @__PURE__ */ jsx(Wrap, {
|
|
39
|
+
if: height,
|
|
40
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
41
|
+
style: {
|
|
42
|
+
height,
|
|
43
|
+
flex: flexGrow ? 1 : void 0
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
children: /* @__PURE__ */ jsx(ResponsiveContainer, {
|
|
46
|
+
initialDimension: {
|
|
47
|
+
width: 1,
|
|
48
|
+
height: 1
|
|
49
|
+
},
|
|
50
|
+
width: height ? void 0 : "100%",
|
|
51
|
+
aspect: height ? void 0 : 3,
|
|
52
|
+
ref: containerRef,
|
|
53
|
+
children: /* @__PURE__ */ jsxs(ComposedChart, {
|
|
54
|
+
data,
|
|
55
|
+
className: rootClassName,
|
|
56
|
+
layout,
|
|
57
|
+
...rest,
|
|
58
|
+
children: [children, showEmptyView && viewDimensions && /* @__PURE__ */ jsx("foreignObject", {
|
|
59
|
+
...viewDimensions,
|
|
60
|
+
children: /* @__PURE__ */ jsx(DivView, {
|
|
61
|
+
className: CartesianChart_module_default.emptyViewContainer,
|
|
62
|
+
children: emptyElement
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
})
|
|
59
66
|
})
|
|
60
67
|
})
|
|
61
68
|
})
|
|
@@ -64,6 +71,7 @@ var CartesianChart = (props) => {
|
|
|
64
71
|
var typedCartesianChart = () => ({
|
|
65
72
|
Chart: CartesianChart,
|
|
66
73
|
Area: TypedArea(),
|
|
74
|
+
Bar: TypedBar(),
|
|
67
75
|
XAxis: TypedXAxis(),
|
|
68
76
|
YAxis: TypedYAxis(),
|
|
69
77
|
Grid: TypedChartGrid(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.mjs","names":[],"sources":["../../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import { ComposedChart, ResponsiveContainer } from \"recharts\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FC,\n isValidElement,\n type PropsWithChildren,\n type ReactNode,\n useMemo,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport { useChartClipRect } from \"@/components/CartesianChart/hooks/useChartClipRect\";\nimport DivView from \"@/views/DivView\";\nimport Wrap from \"@/components/Wrap\";\nimport type {\n ChartDataValue,\n DataKeyProp,\n} from \"@/components/CartesianChart/types\";\nimport { TypedArea } from \"@/components/CartesianChart/components/Area\";\nimport { TypedXAxis } from \"@/components/CartesianChart/components/XAxis\";\nimport { TypedYAxis } from \"@/components/CartesianChart/components/YAxis\";\nimport { TypedChartGrid } from \"@/components/CartesianChart/components/ChartGrid\";\nimport { TypedChartLegend } from \"@/components/CartesianChart/components/ChartLegend\";\nimport { TypedChartTooltip } from \"@/components/CartesianChart/components/ChartTooltip\";\nimport { TypedLine } from \"@/components/CartesianChart/components/Line\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\n/** @deprecated Use a ReactNode instead */\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps<TData = ChartDataValue>\n extends\n Pick<\n ComponentProps<typeof ComposedChart>,\n \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n /** The data points rendered by the chart. */\n data?: TData[];\n\n /** The height of the chart. */\n height?: string;\n\n /** View that is provided when data is empty/undefined */\n emptyView?: ReactNode;\n\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {
|
|
1
|
+
{"version":3,"file":"CartesianChart.mjs","names":[],"sources":["../../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import { ComposedChart, ResponsiveContainer } from \"recharts\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FC,\n isValidElement,\n type PropsWithChildren,\n type ReactNode,\n useMemo,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport { useChartClipRect } from \"@/components/CartesianChart/hooks/useChartClipRect\";\nimport DivView from \"@/views/DivView\";\nimport Wrap from \"@/components/Wrap\";\nimport type {\n CartesianChartLayout,\n ChartDataValue,\n DataKeyProp,\n} from \"@/components/CartesianChart/types\";\nimport { CartesianChartContextProvider } from \"@/components/CartesianChart/context\";\nimport { TypedArea } from \"@/components/CartesianChart/components/Area\";\nimport { TypedBar } from \"@/components/CartesianChart/components/Bar\";\nimport { TypedXAxis } from \"@/components/CartesianChart/components/XAxis\";\nimport { TypedYAxis } from \"@/components/CartesianChart/components/YAxis\";\nimport { TypedChartGrid } from \"@/components/CartesianChart/components/ChartGrid\";\nimport { TypedChartLegend } from \"@/components/CartesianChart/components/ChartLegend\";\nimport { TypedChartTooltip } from \"@/components/CartesianChart/components/ChartTooltip\";\nimport { TypedLine } from \"@/components/CartesianChart/components/Line\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\n/** @deprecated Use a ReactNode instead */\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps<TData = ChartDataValue>\n extends\n Pick<\n ComponentProps<typeof ComposedChart>,\n \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n /** The data points rendered by the chart. */\n data?: TData[];\n\n /** The height of the chart. */\n height?: string;\n\n /**\n * The orientation of the axes and graphical items. `\"horizontal\"` puts the\n * category axis on the x-axis — bars grow upwards. `\"vertical\"` puts it on\n * the y-axis — bars grow to the side. `XAxis` and `YAxis` follow the layout\n * on their own; only the `dataKey` moves to whichever axis is the categorical\n * one.\n *\n * @default \"horizontal\"\n */\n layout?: CartesianChartLayout;\n\n /** View that is provided when data is empty/undefined */\n emptyView?: ReactNode;\n\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {\n children,\n data,\n className,\n height,\n flexGrow,\n emptyView,\n layout = \"horizontal\",\n ...rest\n } = props;\n const warnDeprecation = useWarnDeprecation();\n\n const { viewDimensions, ref: containerRef } = useChartClipRect();\n\n const showEmptyView = !!((!data || data.length === 0) && emptyView);\n const rootClassName = clsx(\n styles.cartesianChart,\n showEmptyView && styles.emptyView,\n className,\n );\n const usesDeprecatedEmptyView = !!emptyView && !isValidElement(emptyView);\n\n if (usesDeprecatedEmptyView) {\n warnDeprecation(\n \"CartesianChart: emptyView as a non-element is deprecated and will be removed in a future release. Please provide an element as emptyView.\",\n );\n }\n\n const emptyElement = useMemo(() => {\n if (isValidElement(emptyView)) {\n return emptyView;\n }\n\n if (!emptyView) {\n return;\n }\n\n return null;\n }, [emptyView]);\n\n const contextValue = useMemo(() => ({ layout }), [layout]);\n\n return (\n <CartesianChartContextProvider value={contextValue}>\n <Wrap if={height}>\n <div style={{ height, flex: flexGrow ? 1 : undefined }}>\n <ResponsiveContainer\n initialDimension={{\n // fix warning on initial render\n width: 1,\n height: 1,\n }}\n width={height ? undefined : \"100%\"}\n aspect={height ? undefined : 3}\n ref={containerRef}\n >\n <ComposedChart\n data={data}\n className={rootClassName}\n layout={layout}\n {...rest}\n >\n {children}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <DivView className={styles.emptyViewContainer}>\n {emptyElement}\n </DivView>\n </foreignObject>\n )}\n </ComposedChart>\n </ResponsiveContainer>\n </div>\n </Wrap>\n </CartesianChartContextProvider>\n );\n};\n\nexport const typedCartesianChart = <\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TData extends ChartDataValue<any> = ChartDataValue<any>,\n XAxisDataKey extends DataKeyProp<TData> = DataKeyProp<TData>,\n>() => ({\n Chart: CartesianChart as ComponentType<CartesianChartProps<TData>>,\n Area: TypedArea<TData>(),\n Bar: TypedBar<TData>(),\n XAxis: TypedXAxis<TData, XAxisDataKey>(),\n YAxis: TypedYAxis<TData>(),\n Grid: TypedChartGrid(),\n Legend: TypedChartLegend(),\n Tooltip: TypedChartTooltip<TData, XAxisDataKey>(),\n Line: TypedLine<TData>(),\n});\n\nexport default CartesianChart;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuEA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,MACA,WACA,QACA,UACA,WACA,SAAS,cACT,GAAG,SACD;CACJ,MAAM,kBAAkB,mBAAmB;CAE3C,MAAM,EAAE,gBAAgB,KAAK,iBAAiB,iBAAiB;CAE/D,MAAM,gBAAgB,CAAC,GAAG,CAAC,QAAQ,KAAK,WAAW,MAAM;CACzD,MAAM,gBAAgB,KACpB,8BAAO,gBACP,iBAAiB,8BAAO,WACxB,SACF;CAGA,IAFgC,CAAC,CAAC,aAAa,CAAC,eAAe,SAAS,GAGtE,gBACE,2IACF;CAGF,MAAM,eAAe,cAAc;EACjC,IAAI,eAAe,SAAS,GAC1B,OAAO;EAGT,IAAI,CAAC,WACH;EAGF,OAAO;CACT,GAAG,CAAC,SAAS,CAAC;CAEd,MAAM,eAAe,eAAe,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;CAEzD,OACE,oBAAC,+BAAD;EAA+B,OAAO;EACpC,UAAA,oBAAC,MAAD;GAAM,IAAI;GACR,UAAA,oBAAC,OAAD;IAAK,OAAO;KAAE;KAAQ,MAAM,WAAW,IAAI,KAAA;IAAU;IACnD,UAAA,oBAAC,qBAAD;KACE,kBAAkB;MAEhB,OAAO;MACP,QAAQ;KACV;KACA,OAAO,SAAS,KAAA,IAAY;KAC5B,QAAQ,SAAS,KAAA,IAAY;KAC7B,KAAK;KAEL,UAAA,qBAAC,eAAD;MACQ;MACN,WAAW;MACH;MACR,GAAI;MAJN,UAAA,CAMG,UACA,iBAAiB,kBAChB,oBAAC,iBAAD;OAAe,GAAI;OACjB,UAAA,oBAAC,SAAD;QAAS,WAAW,8BAAO;QACxB,UAAA;OACM,CAAA;MACI,CAAA,CAEJ;;IACI,CAAA;GAClB,CAAA;EACD,CAAA;CACuB,CAAA;AAEnC;AAEA,IAAa,6BAIL;CACN,OAAO;CACP,MAAM,UAAiB;CACvB,KAAK,SAAgB;CACrB,OAAO,WAAgC;CACvC,OAAO,WAAkB;CACzB,MAAM,eAAe;CACrB,QAAQ,iBAAiB;CACzB,SAAS,kBAAuC;CAChD,MAAM,UAAiB;AACzB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { useDesignTokens } from "../../../../lib/theming/hooks/useDesignTokens.mjs";
|
|
4
|
+
import { useCartesianChartContext } from "../../context.mjs";
|
|
5
|
+
import { isCategoricalColor } from "../../../../lib/tokens/isCategoricalColor.mjs";
|
|
6
|
+
import { isDataKeyWithLabel } from "../../types.mjs";
|
|
7
|
+
import "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import * as Recharts from "recharts";
|
|
10
|
+
//#region src/components/CartesianChart/components/Bar/Bar.tsx
|
|
11
|
+
/** @flr-generate all */
|
|
12
|
+
var Bar = (props) => {
|
|
13
|
+
const { color: colorFromProps = "sea-green", ...rest } = props;
|
|
14
|
+
const tokens = useDesignTokens();
|
|
15
|
+
const { layout } = useCartesianChartContext();
|
|
16
|
+
const color = isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps;
|
|
17
|
+
const cornerRadius = parseInt(tokens.bar["corner-radius"].value);
|
|
18
|
+
const radius = props.stackId !== void 0 ? 0 : layout === "vertical" ? [
|
|
19
|
+
0,
|
|
20
|
+
cornerRadius,
|
|
21
|
+
cornerRadius,
|
|
22
|
+
0
|
|
23
|
+
] : [
|
|
24
|
+
cornerRadius,
|
|
25
|
+
cornerRadius,
|
|
26
|
+
0,
|
|
27
|
+
0
|
|
28
|
+
];
|
|
29
|
+
return /* @__PURE__ */ jsx(Recharts.Bar, {
|
|
30
|
+
name: isDataKeyWithLabel(props) ? props.dataKeyLabel : props.dataKey,
|
|
31
|
+
...rest,
|
|
32
|
+
fill: color,
|
|
33
|
+
radius
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var TypedBar = () => Bar;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Bar, Bar as default, TypedBar };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=Bar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bar.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/Bar/Bar.tsx"],"sourcesContent":["import { type ComponentType, type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport {\n type ChartDataValue,\n type DataKeyProp,\n type DataKeyWithLabel,\n isDataKeyWithLabel,\n} from \"@/components/CartesianChart/types\";\nimport { useCartesianChartContext } from \"@/components/CartesianChart/context\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\ntype BarBaseProps = Pick<\n Recharts.BarProps,\n | \"className\"\n | \"stackId\"\n | \"key\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"unit\"\n | \"barSize\"\n | \"maxBarSize\"\n | \"minPointSize\"\n> & {\n /** The color of the bar. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n};\n\nexport interface BarPropsByDataKeyProp<\n TData extends ChartDataValue = ChartDataValue,\n> extends BarBaseProps {\n dataKey: DataKeyProp<TData>;\n}\n\nexport interface BarPropsByDataKey<\n TData extends ChartDataValue = ChartDataValue,\n>\n extends BarBaseProps, DataKeyWithLabel<TData> {}\n\nexport type BarProps<TData extends ChartDataValue = ChartDataValue> =\n BarPropsByDataKey<TData> | BarPropsByDataKeyProp<TData>;\n\n/** @flr-generate all */\nexport const Bar: FC<BarProps> = (props) => {\n const { color: colorFromProps = \"sea-green\", ...rest } = props;\n\n const tokens = useDesignTokens();\n const { layout } = useCartesianChartContext();\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps;\n\n const cornerRadius = parseInt(tokens.bar[\"corner-radius\"].value);\n const radius: Recharts.BarProps[\"radius\"] =\n props.stackId !== undefined\n ? 0\n : layout === \"vertical\"\n ? [0, cornerRadius, cornerRadius, 0]\n : [cornerRadius, cornerRadius, 0, 0];\n\n return (\n <Recharts.Bar\n name={isDataKeyWithLabel(props) ? props.dataKeyLabel : props.dataKey}\n {...rest}\n fill={color}\n radius={radius}\n />\n );\n};\n\nexport const TypedBar = <TData extends ChartDataValue = ChartDataValue>() =>\n Bar as ComponentType<BarPropsByDataKeyProp<TData>>;\n\nexport default Bar;\n"],"mappings":";;;;;;;;;;;AA4CA,IAAa,OAAqB,UAAU;CAC1C,MAAM,EAAE,OAAO,iBAAiB,aAAa,GAAG,SAAS;CAEzD,MAAM,SAAS,gBAAgB;CAC/B,MAAM,EAAE,WAAW,yBAAyB;CAE5C,MAAM,QAAQ,mBAAmB,cAAc,IAC3C,6BAA6B,eAAe,KAC5C;CAEJ,MAAM,eAAe,SAAS,OAAO,IAAI,gBAAgB,CAAC,KAAK;CAC/D,MAAM,SACJ,MAAM,YAAY,KAAA,IACd,IACA,WAAW,aACT;EAAC;EAAG;EAAc;EAAc;CAAC,IACjC;EAAC;EAAc;EAAc;EAAG;CAAC;CAEzC,OACE,oBAAC,SAAS,KAAV;EACE,MAAM,mBAAmB,KAAK,IAAI,MAAM,eAAe,MAAM;EAC7D,GAAI;EACJ,MAAM;EACE;CACT,CAAA;AAEL;AAEA,IAAa,iBACX"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useLocalizedStringFormatter } from "../../../TranslationProvider/useLocalizedStringFormatter.mjs";
|
|
4
4
|
import { ProgressBar } from "../../../ProgressBar/ProgressBar.mjs";
|
|
5
5
|
import { Label } from "../../../Label/Label.mjs";
|
|
6
|
-
import __locale_default from "../../../../../../../_virtual/
|
|
6
|
+
import __locale_default from "../../../../../../../_virtual/_9.locale.mjs";
|
|
7
7
|
import ChartTooltip_module_default from "./ChartTooltip.module.mjs";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import { usePromise } from "@mittwald/react-use-promise";
|