@mittwald/flow-react-components 0.2.0-alpha.645 → 0.2.0-alpha.647
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 +8 -0
- package/dist/assets/doc-properties.json +44989 -44490
- package/dist/js/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/components/src/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/js/components/src/components/Action/Action.mjs +8 -0
- package/dist/js/components/src/components/Action/Action.mjs.map +1 -1
- package/dist/js/components/src/components/Action/models/ActionExecution.mjs +2 -2
- package/dist/js/components/src/components/Action/models/ActionExecution.mjs.map +1 -1
- package/dist/js/components/src/components/Action/models/getExecutionFunction.mjs +2 -8
- package/dist/js/components/src/components/Action/models/getExecutionFunction.mjs.map +1 -1
- package/dist/js/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
- package/dist/js/components/src/components/Alert/Alert.mjs.map +1 -1
- package/dist/js/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
- package/dist/js/components/src/components/AlertText/AlertText.mjs.map +1 -1
- package/dist/js/components/src/components/Align/Align.mjs.map +1 -1
- package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/dist/js/components/src/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/js/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
- package/dist/js/components/src/components/Badge/Badge.mjs.map +1 -1
- package/dist/js/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/dist/js/components/src/components/Button/Button.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/components/Area/Area.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/components/ChartTooltip/TooltipContent.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/components/Line/Line.mjs.map +1 -1
- package/dist/js/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
- package/dist/js/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/dist/js/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
- package/dist/js/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
- package/dist/js/components/src/components/Content/Content.mjs.map +1 -1
- package/dist/js/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
- package/dist/js/components/src/components/CopyButton/CopyButton.mjs +1 -1
- package/dist/js/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
- package/dist/js/components/src/components/CounterBadge/CounterBadge.mjs.map +1 -1
- package/dist/js/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
- package/dist/js/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
- package/dist/js/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
- package/dist/js/components/src/components/Div/Div.mjs.map +1 -1
- package/dist/js/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
- package/dist/js/components/src/components/DonutChart/components/Donut.mjs.map +1 -1
- package/dist/js/components/src/components/FieldError/FieldError.mjs.map +1 -1
- package/dist/js/components/src/components/FileCard/FileCard.mjs.map +1 -1
- package/dist/js/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
- package/dist/js/components/src/components/FileField/FileField.mjs.map +1 -1
- package/dist/js/components/src/components/Flex/Flex.mjs.map +1 -1
- package/dist/js/components/src/components/Header/Header.mjs.map +1 -1
- package/dist/js/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
- package/dist/js/components/src/components/Icon/Icon.mjs.map +1 -1
- package/dist/js/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
- package/dist/js/components/src/components/Image/Image.mjs.map +1 -1
- package/dist/js/components/src/components/Initials/Initials.mjs.map +1 -1
- package/dist/js/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
- package/dist/js/components/src/components/Label/Label.mjs.map +1 -1
- package/dist/js/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
- package/dist/js/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
- package/dist/js/components/src/components/LightBox/LightBox.mjs.map +1 -1
- package/dist/js/components/src/components/Link/Link.mjs.map +1 -1
- package/dist/js/components/src/components/List/List.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/ListSummary/ListSummary.mjs.map +1 -1
- package/dist/js/components/src/components/List/model/types.mjs.map +1 -1
- package/dist/js/components/src/components/Markdown/Markdown.mjs.map +1 -1
- package/dist/js/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
- package/dist/js/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
- package/dist/js/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
- package/dist/js/components/src/components/Message/Message.mjs.map +1 -1
- package/dist/js/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/components/src/components/Navigation/Navigation.mjs.map +1 -1
- package/dist/js/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
- package/dist/js/components/src/components/Notification/Notification.mjs.map +1 -1
- package/dist/js/components/src/components/NumberField/NumberField.mjs.map +1 -1
- package/dist/js/components/src/components/Option/Option.mjs.map +1 -1
- package/dist/js/components/src/components/Options/Options.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
- package/dist/js/components/src/components/OverlayTrigger/OverlayTrigger.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs +1 -1
- package/dist/js/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
- package/dist/js/components/src/components/Popover/Popover.mjs.map +1 -1
- package/dist/js/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
- package/dist/js/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
- package/dist/js/components/src/components/ProgressBar/components/ProgressBarValue.mjs.map +1 -1
- package/dist/js/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
- package/dist/js/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
- package/dist/js/components/src/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/components/src/components/Section/Section.mjs.map +1 -1
- package/dist/js/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/js/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
- package/dist/js/components/src/components/Select/Select.mjs.map +1 -1
- package/dist/js/components/src/components/Slider/Slider.mjs.map +1 -1
- package/dist/js/components/src/components/Switch/Switch.mjs.map +1 -1
- package/dist/js/components/src/components/Table/components/TableCell/TableCell.mjs.map +1 -1
- package/dist/js/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
- package/dist/js/components/src/components/Tabs/Tabs.mjs.map +1 -1
- package/dist/js/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
- package/dist/js/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
- package/dist/js/components/src/components/Text/Text.mjs.map +1 -1
- package/dist/js/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/components/src/components/TextField/TextField.mjs.map +1 -1
- package/dist/js/components/src/components/TextFieldBase/TextFieldBase.mjs.map +1 -1
- package/dist/js/components/src/components/TimeField/TimeField.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
- package/dist/js/components/src/lib/remote/useControlledRemoteValueProps.mjs +1 -1
- package/dist/js/components/src/lib/remote/useControlledRemoteValueProps.mjs.map +1 -1
- package/dist/types/components/AccentBox/AccentBox.d.ts.map +1 -1
- package/dist/types/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/types/components/Action/Action.d.ts.map +1 -1
- package/dist/types/components/Action/models/getExecutionFunction.d.ts.map +1 -1
- package/dist/types/components/Action/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Action/stories/EdgeCases.stories.d.ts.map +1 -1
- package/dist/types/components/Action/types.d.ts +0 -1
- package/dist/types/components/Action/types.d.ts.map +1 -1
- package/dist/types/components/ActionGroup/ActionGroup.d.ts.map +1 -1
- package/dist/types/components/ActionGroup/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Alert/Alert.d.ts.map +1 -1
- package/dist/types/components/AlertBadge/AlertBadge.d.ts.map +1 -1
- package/dist/types/components/AlertText/AlertText.d.ts.map +1 -1
- package/dist/types/components/Align/Align.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/dist/types/components/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/components/Button/Button.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/Area/Area.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartTooltip/ChartTooltip.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipContent.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/Line/Line.d.ts.map +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/components/CheckboxButton/CheckboxButton.d.ts.map +1 -1
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/types/components/ColumnLayout/ColumnLayout.d.ts.map +1 -1
- package/dist/types/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/types/components/Content/Content.d.ts.map +1 -1
- package/dist/types/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/types/components/CopyButton/CopyButton.d.ts.map +1 -1
- package/dist/types/components/CounterBadge/CounterBadge.d.ts.map +1 -1
- package/dist/types/components/CountryOptions/CountryOptions.d.ts.map +1 -1
- package/dist/types/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/Div/Div.d.ts.map +1 -1
- package/dist/types/components/DonutChart/DonutChart.d.ts.map +1 -1
- package/dist/types/components/DonutChart/components/Donut.d.ts.map +1 -1
- package/dist/types/components/FieldError/FieldError.d.ts.map +1 -1
- package/dist/types/components/FileCard/FileCard.d.ts.map +1 -1
- package/dist/types/components/FileDropZone/FileDropZone.d.ts.map +1 -1
- package/dist/types/components/FileField/FileField.d.ts.map +1 -1
- package/dist/types/components/Flex/Flex.d.ts.map +1 -1
- package/dist/types/components/Header/Header.d.ts.map +1 -1
- package/dist/types/components/HeaderNavigation/HeaderNavigation.d.ts.map +1 -1
- package/dist/types/components/Icon/Icon.d.ts.map +1 -1
- package/dist/types/components/IllustratedMessage/IllustratedMessage.d.ts.map +1 -1
- package/dist/types/components/Image/Image.d.ts.map +1 -1
- package/dist/types/components/Initials/Initials.d.ts.map +1 -1
- package/dist/types/components/InlineCode/InlineCode.d.ts.map +1 -1
- package/dist/types/components/Label/Label.d.ts.map +1 -1
- package/dist/types/components/LabeledValue/LabeledValue.d.ts.map +1 -1
- package/dist/types/components/LayoutCard/LayoutCard.d.ts.map +1 -1
- package/dist/types/components/LightBox/LightBox.d.ts.map +1 -1
- package/dist/types/components/Link/Link.d.ts.map +1 -1
- package/dist/types/components/List/List.d.ts.map +1 -1
- package/dist/types/components/List/components/ListSummary/ListSummary.d.ts.map +1 -1
- package/dist/types/components/List/model/table/types.d.ts.map +1 -1
- package/dist/types/components/List/model/types.d.ts.map +1 -1
- package/dist/types/components/Markdown/Markdown.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/components/ToolbarButton.d.ts.map +1 -1
- package/dist/types/components/MenuItem/MenuItem.d.ts.map +1 -1
- package/dist/types/components/Message/Message.d.ts.map +1 -1
- package/dist/types/components/MessageThread/components/MessageSeparator/MessageSeparator.d.ts.map +1 -1
- package/dist/types/components/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.d.ts.map +1 -1
- package/dist/types/components/Notification/Notification.d.ts.map +1 -1
- package/dist/types/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/types/components/Option/Option.d.ts.map +1 -1
- package/dist/types/components/Options/Options.d.ts.map +1 -1
- package/dist/types/components/Overlay/components/OverlayContent.d.ts.map +1 -1
- package/dist/types/components/OverlayTrigger/OverlayTrigger.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
- package/dist/types/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/Popover/components/PopoverContent/PopoverContent.d.ts.map +1 -1
- package/dist/types/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/types/components/ProgressBar/components/ProgressBarValue.d.ts.map +1 -1
- package/dist/types/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/types/components/RadioGroup/components/Radio/Radio.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.d.ts.map +1 -1
- package/dist/types/components/Section/Section.d.ts.map +1 -1
- package/dist/types/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/types/components/SegmentedControl/components/Segment/Segment.d.ts.map +1 -1
- package/dist/types/components/Select/Select.d.ts.map +1 -1
- package/dist/types/components/Slider/Slider.d.ts.map +1 -1
- package/dist/types/components/Switch/Switch.d.ts.map +1 -1
- package/dist/types/components/Table/components/TableCell/TableCell.d.ts.map +1 -1
- package/dist/types/components/Table/components/TableColumn/TableColumn.d.ts.map +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/components/Tabs/components/Tab/Tab.d.ts.map +1 -1
- package/dist/types/components/Tabs/components/TabTitle/TabTitle.d.ts.map +1 -1
- package/dist/types/components/Text/Text.d.ts.map +1 -1
- package/dist/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/types/components/TextField/TextField.d.ts.map +1 -1
- package/dist/types/components/TextFieldBase/TextFieldBase.d.ts.map +1 -1
- package/dist/types/components/TimeField/TimeField.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
- package/package.json +41 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentBox.mjs","sources":["../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AccentBoxProps\n extends
|
|
1
|
+
{"version":3,"file":"AccentBox.mjs","sources":["../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AccentBoxProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"article\">,\n PropsWithClassName,\n FlowComponentProps {\n color?: \"blue\" | \"green\" | \"gradient\" | \"neutral\";\n}\n\n/** @flr-generate all */\nexport const AccentBox = flowComponent(\n \"AccentBox\",\n (props) => {\n const { color = \"blue\", children, elementType = \"div\", className } = props;\n\n const rootClassName = clsx(styles.accentBox, className, styles[color]);\n\n const Element = elementType;\n\n const contentColor = color === \"green\" ? \"dark\" : undefined;\n\n const propsContext: PropsContext = {\n Link: {\n color: contentColor,\n },\n Text: {\n color: contentColor,\n },\n Heading: {\n color: contentColor,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element className={rootClassName}>{children}</Element>\n </PropsContextProvider>\n );\n },\n { type: \"layout\" },\n);\n\nexport default AccentBox;\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,SAAA,GAAY,aAAA;AAAA,EACvB,WAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,KAAA,GAAQ,MAAA,EAAQ,UAAU,WAAA,GAAc,KAAA,EAAO,WAAU,GAAI,KAAA;AAErE,IAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,WAAW,SAAA,EAAW,MAAA,CAAO,KAAK,CAAC,CAAA;AAErE,IAAA,MAAM,OAAA,GAAU,WAAA;AAEhB,IAAA,MAAM,YAAA,GAAe,KAAA,KAAU,OAAA,GAAU,MAAA,GAAS,MAAA;AAElD,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO;AAAA,OACT;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO;AAAA,OACT;AAAA,MACA,OAAA,EAAS;AAAA,QACP,KAAA,EAAO;AAAA;AACT,KACF;AAEA,IAAA,uBACE,GAAA,CAAC,wBAAqB,KAAA,EAAO,YAAA,EAC3B,8BAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,aAAA,EAAgB,QAAA,EAAS,CAAA,EAC/C,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA,EAAE,MAAM,QAAA;AACV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.mjs","sources":["../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useId, useState } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./Accordion.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { Activity } from \"@/components/Activity\";\n\nexport interface AccordionProps
|
|
1
|
+
{"version":3,"file":"Accordion.mjs","sources":["../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useId, useState } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./Accordion.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { Activity } from \"@/components/Activity\";\n\nexport interface AccordionProps extends PropsWithChildren<\n ComponentProps<\"div\">\n> {\n /** Whether the accordion should be initially expanded. */\n defaultExpanded?: boolean;\n /** The visual variant of the accordion. @default \"default\" */\n variant?: \"default\" | \"outline\";\n}\n\n/** @flr-generate all */\nexport const Accordion: FC<AccordionProps> = (props) => {\n const {\n children,\n className,\n defaultExpanded = false,\n variant = \"default\",\n ...rest\n } = props;\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n const rootClassName = clsx(\n styles.accordion,\n expanded && styles.expanded,\n className,\n variant === \"outline\" && styles.outline,\n );\n\n const headerId = useId();\n const contentId = useId();\n\n const headerButton = (children: ReactNode) => (\n <Button\n tunnelId={null}\n unstyled\n aria-expanded={expanded}\n className={styles.headerButton}\n onPress={() => setExpanded((expanded) => !expanded)}\n aria-controls={contentId}\n >\n {children}\n <IconChevronDown className={styles.chevron} />\n </Button>\n );\n\n const propsContext: PropsContext = {\n Content: {\n className: styles.contentInner,\n tunnelId: \"content\",\n },\n Heading: {\n className: styles.header,\n level: 4,\n size: \"xs\",\n children: dynamic((props) => headerButton(props.children)),\n },\n Label: {\n className: styles.header,\n children: dynamic((props) => headerButton(props.children)),\n },\n };\n\n return (\n <div {...rest} className={rootClassName}>\n <PropsContextProvider props={propsContext} dependencies={[expanded]}>\n <TunnelProvider>\n {children}\n <div\n aria-labelledby={headerId}\n id={contentId}\n role=\"region\"\n hidden={!expanded}\n className={styles.content}\n >\n <Activity isActive={expanded} inactiveDelay={1000}>\n <TunnelExit id=\"content\" />\n </Activity>\n </div>\n </TunnelProvider>\n </PropsContextProvider>\n </div>\n );\n};\n\nexport default Accordion;\n"],"names":["children","expanded","props"],"mappings":";;;;;;;;;;;;;;;AAqBO,MAAM,SAAA,GAAgC,CAAC,KAAA,KAAU;AACtD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA,GAAkB,KAAA;AAAA,IAClB,OAAA,GAAU,SAAA;AAAA,IACV,GAAG;AAAA,GACL,GAAI,KAAA;AACJ,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,eAAe,CAAA;AAExD,EAAA,MAAM,aAAA,GAAg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AAA,EAAM,WAAW,aAAA,EACxB,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,cAAc,YAAA,EAAc,CAAC,QAAQ,CAAA,EAChE,+BAAC,cAAA,EAAA,EACE,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,oBACD,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,iBAAA,EAAiB,QAAA;AAAA,QACjB,EAAA,EAAI,SAAA;AAAA,QACJ,IAAA,EAAK,QAAA;AAAA,QACL,QAAQ,CAAC,QAAA;AAAA,QACT,WAAW,MAAA,CAAO,OAAA;AAAA,QAElB,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,QAAA,EAAU,QAAA,EAAU,aAAA,EAAe,KAC3C,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAG,SAAA,EAAU,CAAA,EAC3B;AAAA;AAAA;AACF,GAAA,EACF,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -48,6 +48,14 @@ const Action = flowComponent(
|
|
|
48
48
|
actionModel: actionModelFromProps,
|
|
49
49
|
...actionProps
|
|
50
50
|
} = props;
|
|
51
|
+
if ("action" in actionProps && typeof actionProps.action === "function") {
|
|
52
|
+
console.warn(
|
|
53
|
+
"The 'action' prop is now deprecated. Use 'onAction' instead."
|
|
54
|
+
);
|
|
55
|
+
if ("onAction" in actionProps === false) {
|
|
56
|
+
actionProps.onAction = actionProps.action;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
51
59
|
const newActionModel = ActionModel.useNew(actionProps);
|
|
52
60
|
const actionModel = actionModelFromProps ?? newActionModel;
|
|
53
61
|
const propsContext = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.mjs","sources":["../../../../../../src/components/Action/Action.tsx"],"sourcesContent":["import { ActionModel as ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { ActionContextProvider } from \"@/components/Action/context\";\nimport { useActionStateContext } from \"@/components/Action/models/ActionStateContext\";\nimport { useConfirmationModalButtonSlot } from \"@/components/Action/hooks/useConfirmationModalButtonSlot\";\nimport { useActionButtonState } from \"@/components/Action/hooks/useActionButtonState\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nconst actionButtonContext: ComponentPropsContext<\"Button\"> = {\n onPress: dynamic((props) => {\n const action = ActionModel.use();\n const confirmAction = ActionModel.useConfirmationAction();\n const isConfirmationButton =\n useConfirmationModalButtonSlot(props) === \"primary\";\n const isAbortButton = useConfirmationModalButtonSlot(props) === \"abort\";\n if (isAbortButton) {\n return action.confirmationModalController.close;\n }\n return isConfirmationButton ? confirmAction.execute : action.execute;\n }),\n\n isPending: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isPending ?? actionState === \"isPending\";\n }),\n\n isSucceeded: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isSucceeded ?? actionState === \"isSucceeded\";\n }),\n\n isFailed: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isFailed ?? actionState === \"isFailed\";\n }),\n\n \"aria-disabled\": dynamic((props) => {\n const state = useActionButtonState(props);\n const someActionInContextIsBusy = useActionStateContext().useIsBusy();\n return (\n props[\"aria-disabled\"] ??\n (state === \"isExecuting\" || someActionInContextIsBusy)\n );\n }),\n};\n\nexport const Action = flowComponent(\n \"Action\",\n (props) => {\n const {\n children,\n actionModel: actionModelFromProps,\n ...actionProps\n } = props;\n const newActionModel = ActionModel.useNew(actionProps);\n const actionModel = actionModelFromProps ?? newActionModel;\n\n const propsContext: PropsContext = {\n Button: actionButtonContext,\n\n Link: {\n onPress: dynamic(() => ActionModel.use().execute),\n },\n\n MenuItem: {\n onAction: dynamic(() => ActionModel.use().execute),\n },\n\n Modal: {\n slot: dynamic((props) => {\n const { slot } = props;\n const action = ActionModel.use();\n action.needsConfirmation = slot === \"actionConfirm\";\n return slot;\n }),\n isDismissable: dynamic((props) => {\n const action = ActionModel.use();\n const actionState = action.state.useValue();\n return actionState === \"isExecuting\" || actionState === \"isPending\"\n ? false\n : props.isDismissable;\n }),\n controller: dynamic(() => {\n const action = ActionModel.use();\n return action.needsConfirmation\n ? action.confirmationModalController\n : action.getOverlayController(\"Modal\");\n }),\n ActionGroup: {\n Button: actionButtonContext,\n },\n },\n };\n\n return (\n <ActionContextProvider value={actionModel}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ActionContextProvider>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Action;\n"],"names":["props"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Action.mjs","sources":["../../../../../../src/components/Action/Action.tsx"],"sourcesContent":["import { ActionModel as ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { ActionContextProvider } from \"@/components/Action/context\";\nimport { useActionStateContext } from \"@/components/Action/models/ActionStateContext\";\nimport { useConfirmationModalButtonSlot } from \"@/components/Action/hooks/useConfirmationModalButtonSlot\";\nimport { useActionButtonState } from \"@/components/Action/hooks/useActionButtonState\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { ActionFn } from \"@/components/Action/types\";\n\nconst actionButtonContext: ComponentPropsContext<\"Button\"> = {\n onPress: dynamic((props) => {\n const action = ActionModel.use();\n const confirmAction = ActionModel.useConfirmationAction();\n const isConfirmationButton =\n useConfirmationModalButtonSlot(props) === \"primary\";\n const isAbortButton = useConfirmationModalButtonSlot(props) === \"abort\";\n if (isAbortButton) {\n return action.confirmationModalController.close;\n }\n return isConfirmationButton ? confirmAction.execute : action.execute;\n }),\n\n isPending: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isPending ?? actionState === \"isPending\";\n }),\n\n isSucceeded: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isSucceeded ?? actionState === \"isSucceeded\";\n }),\n\n isFailed: dynamic((props) => {\n const actionState = useActionButtonState(props);\n return props.isFailed ?? actionState === \"isFailed\";\n }),\n\n \"aria-disabled\": dynamic((props) => {\n const state = useActionButtonState(props);\n const someActionInContextIsBusy = useActionStateContext().useIsBusy();\n return (\n props[\"aria-disabled\"] ??\n (state === \"isExecuting\" || someActionInContextIsBusy)\n );\n }),\n};\n\nexport const Action = flowComponent(\n \"Action\",\n (props) => {\n const {\n children,\n actionModel: actionModelFromProps,\n ...actionProps\n } = props;\n\n if (\"action\" in actionProps && typeof actionProps.action === \"function\") {\n console.warn(\n \"The 'action' prop is now deprecated. Use 'onAction' instead.\",\n );\n if (\"onAction\" in actionProps === false) {\n actionProps.onAction = actionProps.action as ActionFn;\n }\n }\n\n const newActionModel = ActionModel.useNew(actionProps);\n const actionModel = actionModelFromProps ?? newActionModel;\n\n const propsContext: PropsContext = {\n Button: actionButtonContext,\n\n Link: {\n onPress: dynamic(() => ActionModel.use().execute),\n },\n\n MenuItem: {\n onAction: dynamic(() => ActionModel.use().execute),\n },\n\n Modal: {\n slot: dynamic((props) => {\n const { slot } = props;\n const action = ActionModel.use();\n action.needsConfirmation = slot === \"actionConfirm\";\n return slot;\n }),\n isDismissable: dynamic((props) => {\n const action = ActionModel.use();\n const actionState = action.state.useValue();\n return actionState === \"isExecuting\" || actionState === \"isPending\"\n ? false\n : props.isDismissable;\n }),\n controller: dynamic(() => {\n const action = ActionModel.use();\n return action.needsConfirmation\n ? action.confirmationModalController\n : action.getOverlayController(\"Modal\");\n }),\n ActionGroup: {\n Button: actionButtonContext,\n },\n },\n };\n\n return (\n <ActionContextProvider value={actionModel}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ActionContextProvider>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Action;\n"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T,CAAC,CAAA;AAAA,QACD,aAAA,EAAe,OAAA,CAAQ,CAACA,MAAAA,KAAU;AAChC,UAAA,MAAM,MAAA,GAAS,YAAY,GAAA,EAAI;AAC/B,UAAA,MAAM,WAAA,GAAc,MAAA,CAAO,KAAA,CAAM,QAAA,EAAS;AAC1C,UAAA,OAAO,WAAA,KAAgB,aAAA,IAAiB,WAAA,KAAgB,WAAA,GACpD,QACAA,MAAAA,CAAM,aAAA;AAAA,QACZ,CAAC,CAAA;AAAA,QACD,UAAA,EAAY,QAAQ,MAAM;AACxB,UAAA,MAAM,MAAA,GAAS,YAAY,GAAA,EAAI;AAC/B,UAAA,OAAO,OAAO,iBAAA,GACV,MAAA,CAAO,2BAAA,GACP,MAAA,CAAO,qBAAqB,OAAO,CAAA;AAAA,QACzC,CAAC,CAAA;AAAA,QACD,WAAA,EAAa;AAAA,UACX,MAAA,EAAQ;AAAA;AACV;AACF,KACF;AAEA,IAAA,uBACE,GAAA,CAAC,yBAAsB,KAAA,EAAO,WAAA,EAC5B,8BAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EACH,CAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -24,7 +24,7 @@ class ActionExecution {
|
|
|
24
24
|
);
|
|
25
25
|
let skipCount = 0;
|
|
26
26
|
while (currentAction) {
|
|
27
|
-
const {
|
|
27
|
+
const { onAction, break: $break, skip } = currentAction.actionProps;
|
|
28
28
|
if (currentAction.needsConfirmation) {
|
|
29
29
|
currentBatch.addAction(currentAction);
|
|
30
30
|
break;
|
|
@@ -42,7 +42,7 @@ class ActionExecution {
|
|
|
42
42
|
if ($break) {
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
45
|
-
if (
|
|
45
|
+
if (onAction) {
|
|
46
46
|
currentBatch.addAction(currentAction);
|
|
47
47
|
} else {
|
|
48
48
|
batches.push(currentBatch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionExecution.mjs","sources":["../../../../../../../src/components/Action/models/ActionExecution.tsx"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { ActionExecutionBatch } from \"@/components/Action/models/ActionExecutionBatch\";\n\nexport class ActionExecution {\n private readonly action: ActionModel;\n\n public constructor(action: ActionModel) {\n this.action = action;\n }\n\n public execute = (...args: unknown[]): void => {\n const batches = this.getBatchedActions();\n\n const executeAllBatches = async () => {\n for (const batch of batches) {\n await batch.executeBatch(args);\n }\n };\n\n void executeAllBatches().catch((error) => console.error(error));\n };\n\n private getBatchedActions = (): ActionExecutionBatch[] => {\n let currentAction: ActionModel | undefined = this.action;\n\n const batches: ActionExecutionBatch[] = [];\n let currentBatch: ActionExecutionBatch = new ActionExecutionBatch(\n this.action,\n );\n\n let skipCount = 0;\n\n while (currentAction) {\n const {
|
|
1
|
+
{"version":3,"file":"ActionExecution.mjs","sources":["../../../../../../../src/components/Action/models/ActionExecution.tsx"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport { ActionExecutionBatch } from \"@/components/Action/models/ActionExecutionBatch\";\n\nexport class ActionExecution {\n private readonly action: ActionModel;\n\n public constructor(action: ActionModel) {\n this.action = action;\n }\n\n public execute = (...args: unknown[]): void => {\n const batches = this.getBatchedActions();\n\n const executeAllBatches = async () => {\n for (const batch of batches) {\n await batch.executeBatch(args);\n }\n };\n\n void executeAllBatches().catch((error) => console.error(error));\n };\n\n private getBatchedActions = (): ActionExecutionBatch[] => {\n let currentAction: ActionModel | undefined = this.action;\n\n const batches: ActionExecutionBatch[] = [];\n let currentBatch: ActionExecutionBatch = new ActionExecutionBatch(\n this.action,\n );\n\n let skipCount = 0;\n\n while (currentAction) {\n const { onAction, break: $break, skip } = currentAction.actionProps;\n\n if (currentAction.needsConfirmation) {\n currentBatch.addAction(currentAction);\n break;\n }\n\n if (skip) {\n skipCount = skip === true ? 1 : skip;\n currentAction = currentAction.parentAction;\n continue;\n }\n\n if (skipCount > 0) {\n currentAction = currentAction.parentAction;\n skipCount--;\n continue;\n }\n\n if ($break) {\n break;\n }\n\n if (onAction) {\n currentBatch.addAction(currentAction);\n } else {\n batches.push(currentBatch);\n currentBatch = new ActionExecutionBatch(this.action);\n currentBatch.addAction(currentAction);\n }\n\n currentAction = currentAction.parentAction;\n }\n\n batches.push(currentBatch);\n return batches;\n };\n}\n"],"names":[],"mappings":";;AAGO,MAAM,eAAA,CAAgB;AAAA,EACV,MAAA;AAAA,EAEV,YAAY,MAAA,EAAqB;AACtC,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AAAA,EAEO,OAAA,GAAU,IAAI,IAAA,KAA0B;AAC7C,IAAA,MAAM,OAAA,GAAU,KAAK,iBAAA,EAAkB;AAEvC,IAAA,MAAM,oBAAoB,YAAY;AACpC,MAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC3B,QAAA,MAAM,KAAA,CAAM,aAAa,IAAI,CAAA;AAAA,MAC/B;AAAA,IACF,CAAA;AAEA,IAAA,KAAK,iBAAA,GAAoB,KAAA,CAAM,CAAC,UAAU,OAAA,CAAQ,KAAA,CAAM,KAAK,CAAC,CAAA;AAAA,EAChE,CAAA;AAAA,EAEQ,oBAAoB,MAA8B;AACxD,IAAA,IAAI,gBAAyC,IAAA,CAAK,MAAA;AAElD,IAAA,MAAM,UAAkC,EAAC;AACzC,IAAA,IAAI,eAAqC,IAAI,oBAAA;AAAA,MAC3C,IAAA,CAAK;AAAA,KACP;AAEA,IAAA,IAAI,SAAA,GAAY,CAAA;AAEhB,IAAA,OAAO,aAAA,EAAe;AACpB,MAAA,MAAM,EAAE,QAAA,EAAU,KAAA,EAAO,MAAA,EAAQ,IAAA,KAAS,aAAA,CAAc,WAAA;AAExD,MAAA,IAAI,cAAc,iBAAA,EAAmB;AACnC,QAAA,YAAA,CAAa,UAAU,aAAa,CAAA;AACpC,QAAA;AAAA,MACF;AAEA,MAAA,IAAI,IAAA,EAAM;AACR,QAAA,SAAA,GAAY,IAAA,KAAS,OAAO,CAAA,GAAI,IAAA;AAChC,QAAA,aAAA,GAAgB,aAAA,CAAc,YAAA;AAC9B,QAAA;AAAA,MACF;AAEA,MAAA,IAAI,YAAY,CAAA,EAAG;AACjB,QAAA,aAAA,GAAgB,aAAA,CAAc,YAAA;AAC9B,QAAA,SAAA,EAAA;AACA,QAAA;AAAA,MACF;AAEA,MAAA,IAAI,MAAA,EAAQ;AACV,QAAA;AAAA,MACF;AAEA,MAAA,IAAI,QAAA,EAAU;AACZ,QAAA,YAAA,CAAa,UAAU,aAAa,CAAA;AAAA,MACtC,CAAA,MAAO;AACL,QAAA,OAAA,CAAQ,KAAK,YAAY,CAAA;AACzB,QAAA,YAAA,GAAe,IAAI,oBAAA,CAAqB,IAAA,CAAK,MAAM,CAAA;AACnD,QAAA,YAAA,CAAa,UAAU,aAAa,CAAA;AAAA,MACtC;AAEA,MAAA,aAAA,GAAgB,aAAA,CAAc,YAAA;AAAA,IAChC;AAEA,IAAA,OAAA,CAAQ,KAAK,YAAY,CAAA;AACzB,IAAA,OAAO,OAAA;AAAA,EACT,CAAA;AACF;;;;"}
|
|
@@ -12,14 +12,8 @@ function getExecutionFunction(action) {
|
|
|
12
12
|
}
|
|
13
13
|
return from;
|
|
14
14
|
};
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
onAction: actionFn = actionProp,
|
|
18
|
-
toggleOverlay,
|
|
19
|
-
closeOverlay,
|
|
20
|
-
openOverlay
|
|
21
|
-
} = action.actionProps;
|
|
22
|
-
const maybeAction = actionFn ? actionFn : openOverlay ? getOverlayController(openOverlay)?.open : closeOverlay ? getOverlayController(closeOverlay)?.close : toggleOverlay ? getOverlayController(toggleOverlay)?.toggle : voidAction;
|
|
15
|
+
const { onAction, toggleOverlay, closeOverlay, openOverlay } = action.actionProps;
|
|
16
|
+
const maybeAction = onAction ? onAction : openOverlay ? getOverlayController(openOverlay)?.open : closeOverlay ? getOverlayController(closeOverlay)?.close : toggleOverlay ? getOverlayController(toggleOverlay)?.toggle : voidAction;
|
|
23
17
|
return maybeAction ?? voidAction;
|
|
24
18
|
}
|
|
25
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExecutionFunction.mjs","sources":["../../../../../../../src/components/Action/models/getExecutionFunction.ts"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { ActionFn } from \"@/components/Action\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nconst voidAction = () => {\n // do nothing\n};\n\nexport function getExecutionFunction(action: ActionModel): ActionFn {\n if (action.needsConfirmation) {\n return action.confirmationModalController.open;\n }\n\n const getOverlayController = (\n from: OverlayController | FlowComponentName,\n ): OverlayController | undefined => {\n if (typeof from === \"string\") {\n return action.getOverlayController(from);\n }\n return from;\n };\n\n const {
|
|
1
|
+
{"version":3,"file":"getExecutionFunction.mjs","sources":["../../../../../../../src/components/Action/models/getExecutionFunction.ts"],"sourcesContent":["import type { ActionModel } from \"@/components/Action/models/ActionModel\";\nimport type { ActionFn } from \"@/components/Action\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nconst voidAction = () => {\n // do nothing\n};\n\nexport function getExecutionFunction(action: ActionModel): ActionFn {\n if (action.needsConfirmation) {\n return action.confirmationModalController.open;\n }\n\n const getOverlayController = (\n from: OverlayController | FlowComponentName,\n ): OverlayController | undefined => {\n if (typeof from === \"string\") {\n return action.getOverlayController(from);\n }\n return from;\n };\n\n const { onAction, toggleOverlay, closeOverlay, openOverlay } =\n action.actionProps;\n\n const maybeAction = onAction\n ? onAction\n : openOverlay\n ? getOverlayController(openOverlay)?.open\n : closeOverlay\n ? getOverlayController(closeOverlay)?.close\n : toggleOverlay\n ? getOverlayController(toggleOverlay)?.toggle\n : voidAction;\n\n return maybeAction ?? voidAction;\n}\n"],"names":[],"mappings":"AAKA,MAAM,aAAa,MAAM;AAEzB,CAAA;AAEO,SAAS,qBAAqB,MAAA,EAA+B;AAClE,EAAA,IAAI,OAAO,iBAAA,EAAmB;AAC5B,IAAA,OAAO,OAAO,2BAAA,CAA4B,IAAA;AAAA,EAC5C;AAEA,EAAA,MAAM,oBAAA,GAAuB,CAC3B,IAAA,KACkC;AAClC,IAAA,IAAI,OAAO,SAAS,QAAA,EAAU;AAC5B,MAAA,OAAO,MAAA,CAAO,qBAAqB,IAAI,CAAA;AAAA,IACzC;AACA,IAAA,OAAO,IAAA;AAAA,EACT,CAAA;AAEA,EAAA,MAAM,EAAE,QAAA,EAAU,aAAA,EAAe,YAAA,EAAc,WAAA,KAC7C,MAAA,CAAO,WAAA;AAET,EAAA,MAAM,cAAc,QAAA,GAChB,QAAA,GACA,WAAA,GACE,oBAAA,CAAqB,WAAW,CAAA,EAAG,IAAA,GACnC,YAAA,GACE,oBAAA,CAAqB,YAAY,CAAA,EAAG,KAAA,GACpC,gBACE,oBAAA,CAAqB,aAAa,GAAG,MAAA,GACrC,UAAA;AAEV,EAAA,OAAO,WAAA,IAAe,UAAA;AACxB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionGroup.mjs","sources":["../../../../../../src/components/ActionGroup/ActionGroup.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ActionGroup.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { ActionStateContextProvider } from \"@/components/Action/models/ActionStateContext\";\nimport { getActionGroupSlot } from \"@/components/ActionGroup/lib/getActionGroupSlot\";\n\nexport interface ActionGroupProps\n extends
|
|
1
|
+
{"version":3,"file":"ActionGroup.mjs","sources":["../../../../../../src/components/ActionGroup/ActionGroup.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ActionGroup.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { ActionStateContextProvider } from \"@/components/Action/models/ActionStateContext\";\nimport { getActionGroupSlot } from \"@/components/ActionGroup/lib/getActionGroupSlot\";\n\nexport interface ActionGroupProps\n extends\n PropsWithChildren,\n FlowComponentProps<HTMLDivElement>,\n PropsWithClassName {\n /** The spacing between the buttons inside the action group. @default \"m\" */\n spacing?: \"s\" | \"m\";\n}\n\n/** @flr-generate all */\nexport const ActionGroup = flowComponent(\n \"ActionGroup\",\n (props) => {\n const {\n children,\n className,\n ref,\n\n spacing = \"s\",\n ...rest\n } = props;\n\n const rootClassName = clsx(styles.actionGroup, className, styles[spacing]);\n\n const propsContext: PropsContext = {\n Button: {\n slot: dynamic((props) => getActionGroupSlot(props)),\n className: dynamic((props) => {\n const slot = getActionGroupSlot(props);\n return clsx(props.className, styles[slot]);\n }),\n },\n Switch: {\n labelPosition: \"leading\",\n className: dynamic((props) => {\n return clsx(props.className, props.slot && styles[props.slot]);\n }),\n },\n Link: {\n className: dynamic((props) => {\n return clsx(props.className, props.slot && styles[props.slot]);\n }),\n },\n };\n\n return (\n <ActionStateContextProvider>\n <PropsContextProvider props={propsContext}>\n <TunnelProvider>\n <div {...rest} className={rootClassName} ref={ref} role=\"group\">\n {children}\n </div>\n </TunnelProvider>\n </PropsContextProvider>\n </ActionStateContextProvider>\n );\n },\n {\n type: \"layout\",\n },\n);\n\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,GAAA,CAAC,8BACC,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,OAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,kBACC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,IAAA,EAAM,SAAA,EAAW,eAAe,GAAA,EAAU,IAAA,EAAK,SACrD,QAAA,EACH,CAAA,EACF,GACF,CAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.mjs","sources":["../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Alert.module.scss\";\n\nexport interface AlertProps\n extends
|
|
1
|
+
{"version":3,"file":"Alert.mjs","sources":["../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Alert.module.scss\";\n\nexport interface AlertProps\n extends\n PropsWithChildren<ComponentProps<\"aside\">>,\n PropsWithStatus,\n FlowComponentProps<HTMLElement> {}\n\n/** @flr-generate all */\nexport const Alert = flowComponent(\"Alert\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const rootClassName = clsx(styles.alert, styles[status], className);\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 3,\n size: \"s\",\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Content: {\n className: styles.content,\n Button: {\n size: \"s\",\n },\n ActionGroup: {\n Button: {\n size: \"s\",\n },\n },\n },\n };\n\n return (\n <aside {...rest} className={rootClassName} ref={ref}>\n <PropsContextProvider props={propsContext} dependencies={[status]}>\n {children}\n </PropsContextProvider>\n </aside>\n );\n});\n\nexport default Alert;\n"],"names":["props"],"mappings":";;;;;;;;;AAiBO,MAAM,KAAA,GAAQ,aAAA,CAAc,OAAA,EAAS,CAAC,KAAA,KAAU;AACrD,EAAA,MAAM,EAAE,UAAU,SAAA,EAAW,MAAA,GAAS,QAAQ,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAE/D,EAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,OAAO,MAAA,CAAO,MAAM,GAAG,SAAS,CAAA;AAElE,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,OAAA,EAAS;AAAA,MACP,WAAW,MAAA,CAAO,OAAA;AAAA,MAClB,KAAA,EAAO,CAAA;AAAA,MACP,IAAA,EAAM,GAAA;AAAA,MACN,QAAA,EAAU,OAAA,CAAQ,CAACA,MAAAA,qBACjB,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,MAAA,EAAgB,SAAA,EAAW,MAAA,CAAO,IAAA,EAAM,CAAA;AAAA,QAClDA,MAAAA,CAAM;AAAA,OAAA,EACT,CACD;AAAA,KACH;AAAA,IACA,OAAA,EAAS;AAAA,MACP,WAAW,MAAA,CAAO,OAAA;AAAA,MAClB,MAAA,EAAQ;AAAA,QACN,IAAA,EAAM;AAAA,OACR;AAAA,MACA,WAAA,EAAa;AAAA,QACX,MAAA,EAAQ;AAAA,UACN,IAAA,EAAM;AAAA;AACR;AACF;AACF,GACF;AAEA,EAAA,2BACG,OAAA,EAAA,EAAO,GAAG,IAAA,EAAM,SAAA,EAAW,eAAe,GAAA,EACzC,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,cAAc,YAAA,EAAc,CAAC,MAAM,CAAA,EAC7D,UACH,CAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertBadge.mjs","sources":["../../../../../../src/components/AlertBadge/AlertBadge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./AlertBadge.module.scss\";\nimport clsx from \"clsx\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport { Text } from \"@/components/Text\";\nimport type { PropsWithStatus, PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlertBadgeProps\n extends
|
|
1
|
+
{"version":3,"file":"AlertBadge.mjs","sources":["../../../../../../src/components/AlertBadge/AlertBadge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./AlertBadge.module.scss\";\nimport clsx from \"clsx\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport { Text } from \"@/components/Text\";\nimport type { PropsWithStatus, PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlertBadgeProps\n extends\n PropsWithChildren,\n PropsWithStatus,\n FlowComponentProps<HTMLDivElement>,\n PropsWithClassName {}\n\n/** @flr-generate all */\nexport const AlertBadge = flowComponent(\"AlertBadge\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const rootClassName = clsx(styles.alertBadge, styles[status], className);\n\n return (\n <div className={rootClassName} {...rest} ref={ref}>\n <AlertIcon size=\"s\" status={status} />\n <Text className={styles.text}>{children}</Text>\n </div>\n );\n});\n\nexport default AlertBadge;\n"],"names":[],"mappings":";;;;;;;AAiBO,MAAM,UAAA,GAAa,aAAA,CAAc,YAAA,EAAc,CAAC,KAAA,KAAU;AAC/D,EAAA,MAAM,EAAE,UAAU,SAAA,EAAW,MAAA,GAAS,QAAQ,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAE/D,EAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,YAAY,MAAA,CAAO,MAAM,GAAG,SAAS,CAAA;AAEvE,EAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,aAAA,EAAgB,GAAG,MAAM,GAAA,EACvC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,IAAA,EAAK,GAAA,EAAI,MAAA,EAAgB,CAAA;AAAA,oBACpC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAW,MAAA,CAAO,MAAO,QAAA,EAAS;AAAA,GAAA,EAC1C,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertText.mjs","sources":["../../../../../../src/components/AlertText/AlertText.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithClassName, Status } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AlertText.module.scss\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AlertTextProps\n extends PropsWithClassName
|
|
1
|
+
{"version":3,"file":"AlertText.mjs","sources":["../../../../../../src/components/AlertText/AlertText.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithClassName, Status } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AlertText.module.scss\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AlertTextProps\n extends PropsWithClassName, PropsWithChildren, FlowComponentProps {\n status?: Status | \"unavailable\";\n}\n\n/** @flr-generate all */\nexport const AlertText = flowComponent(\"AlertText\", (props) => {\n const { className, children, status = \"info\" } = props;\n\n const rootClassName = clsx(styles.alertText, styles[status], className);\n\n return (\n <span className={rootClassName}>\n <PropsContextProvider props={{ Icon: { size: \"s\" } }}>\n <AlertIcon status={status} className={styles.icon} />\n </PropsContextProvider>\n <>{children}</>\n </span>\n );\n});\n\nexport default AlertText;\n"],"names":[],"mappings":";;;;;;;;AAiBO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM,EAAE,SAAA,EAAW,QAAA,EAAU,MAAA,GAAS,QAAO,GAAI,KAAA;AAEjD,EAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,WAAW,MAAA,CAAO,MAAM,GAAG,SAAS,CAAA;AAEtE,EAAA,uBACE,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,aAAA,EACf,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,EAAE,IAAA,EAAM,EAAE,IAAA,EAAM,GAAA,EAAI,EAAE,EACjD,8BAAC,SAAA,EAAA,EAAU,MAAA,EAAgB,SAAA,EAAW,MAAA,CAAO,MAAM,CAAA,EACrD,CAAA;AAAA,oCACG,QAAA,EAAS;AAAA,GAAA,EACd,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Align.mjs","sources":["../../../../../../src/components/Align/Align.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Align.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlignProps\n extends PropsWithChildren
|
|
1
|
+
{"version":3,"file":"Align.mjs","sources":["../../../../../../src/components/Align/Align.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Align.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlignProps\n extends PropsWithChildren, PropsWithClassName, FlowComponentProps {}\n\n/** @flr-generate all */\nexport const Align = flowComponent(\n \"Align\",\n (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.align, className);\n\n const propsContext: PropsContext = {\n Text: { className: styles.text },\n Button: { className: styles.button },\n Avatar: { className: styles.avatar, size: \"m\" },\n CopyButton: { size: \"s\", className: styles.copyButton },\n Icon: { size: \"s\", className: styles.icon },\n ContextualHelpTrigger: {\n Button: {\n className: styles.contextualHelpTriggerButton,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>{children}</div>\n </PropsContextProvider>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default Align;\n"],"names":[],"mappings":";;;;;;;AAaO,MAAM,KAAA,GAAQ,aAAA;AAAA,EACnB,OAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,KAAA;AAEhC,IAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,KAAA,EAAO,SAAS,CAAA;AAElD,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,IAAA,EAAM,EAAE,SAAA,EAAW,MAAA,CAAO,IAAA,EAAK;AAAA,MAC/B,MAAA,EAAQ,EAAE,SAAA,EAAW,MAAA,CAAO,MAAA,EAAO;AAAA,MACnC,QAAQ,EAAE,SAAA,EAAW,MAAA,CAAO,MAAA,EAAQ,MAAM,GAAA,EAAI;AAAA,MAC9C,YAAY,EAAE,IAAA,EAAM,GAAA,EAAK,SAAA,EAAW,OAAO,UAAA,EAAW;AAAA,MACtD,MAAM,EAAE,IAAA,EAAM,GAAA,EAAK,SAAA,EAAW,OAAO,IAAA,EAAK;AAAA,MAC1C,qBAAA,EAAuB;AAAA,QACrB,MAAA,EAAQ;AAAA,UACN,WAAW,MAAA,CAAO;AAAA;AACpB;AACF,KACF;AAEA,IAAA,uBACE,GAAA,CAAC,wBAAqB,KAAA,EAAO,YAAA,EAC3B,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,aAAA,EAAgB,QAAA,EAAS,CAAA,EAC3C,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.mjs","sources":["../../../../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import { useRef, type PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport Options from \"@/components/Options\";\nimport { TunnelExit } from \"@mittwald/react-tunnel\";\nimport locales from \"./locales/*.locale.json\";\nimport Text from \"@/components/Text\";\nimport styles from \"./Autocomplete.module.scss\";\nimport {\n UNSAFE_PortalProvider,\n useFocusWithin,\n useLocalizedStringFormatter,\n useObjectRef,\n} from \"react-aria\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { isFocused } from \"@/lib/form/isFocused\";\nimport { emitElementValueChange } from \"@/lib/react/emitElementValueChange\";\n\nexport interface AutocompleteProps\n extends
|
|
1
|
+
{"version":3,"file":"Autocomplete.mjs","sources":["../../../../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import { useRef, type PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport Options from \"@/components/Options\";\nimport { TunnelExit } from \"@mittwald/react-tunnel\";\nimport locales from \"./locales/*.locale.json\";\nimport Text from \"@/components/Text\";\nimport styles from \"./Autocomplete.module.scss\";\nimport {\n UNSAFE_PortalProvider,\n useFocusWithin,\n useLocalizedStringFormatter,\n useObjectRef,\n} from \"react-aria\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { isFocused } from \"@/lib/form/isFocused\";\nimport { emitElementValueChange } from \"@/lib/react/emitElementValueChange\";\n\nexport interface AutocompleteProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps<HTMLInputElement>,\n Omit<\n Aria.AutocompleteProps,\n \"children\" | \"onInputChange\" | \"inputValue\" | \"defaultInputValue\" | \"ref\"\n > {}\n\n/** @flr-generate all */\nexport const Autocomplete = flowComponent(\"Autocomplete\", (props) => {\n const { children, ref, ...rest } = props;\n\n const inputRef = useObjectRef(ref);\n\n const { contains } = Aria.useFilter({ sensitivity: \"base\" });\n const stringFormatter = useLocalizedStringFormatter(locales);\n const container = useRef(null);\n\n const optionsOverlayController = useOverlayController(\"Popover\", {\n reuseControllerFromContext: false,\n });\n\n const focusWithin = useFocusWithin({\n onBlurWithin: optionsOverlayController.close,\n });\n\n const renderEmptyState = () => (\n <Text className={styles.empty}>\n {stringFormatter.format(\"autocomplete.empty\")}\n </Text>\n );\n\n const handleInputChange = (value: string) => {\n if (value === \"\") {\n optionsOverlayController.close();\n } else if (isFocused(inputRef.current)) {\n optionsOverlayController.open();\n }\n };\n\n const handleOptionAction = (key: Aria.Key) => {\n const value = String(key);\n if (inputRef.current) {\n emitElementValueChange(inputRef.current, value);\n }\n optionsOverlayController.close();\n };\n\n const inputProps: SearchFieldProps & TextFieldProps = {\n onKeyDown: (e) => {\n if (e.key === \"Enter\" && optionsOverlayController.isOpen) {\n e.preventDefault();\n }\n },\n ref: inputRef,\n onChange: handleInputChange,\n };\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const propsContext: PropsContext = {\n SearchField: inputProps,\n TextField: inputProps,\n Option: {\n tunnelId: \"options\",\n },\n Popover: {\n className: styles.popover,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div {...fieldProps}>\n <FieldErrorCaptureContext>\n <PropsContextProvider\n props={propsContext}\n dependencies={[optionsOverlayController]}\n >\n <div {...focusWithin.focusWithinProps} ref={container}>\n <UNSAFE_PortalProvider getContainer={() => container.current}>\n <Aria.Autocomplete\n filter={contains}\n disableAutoFocusFirst\n {...rest}\n >\n {children}\n <Options\n onAction={handleOptionAction}\n triggerRef={inputRef}\n controller={optionsOverlayController}\n renderEmptyState={renderEmptyState}\n isNonModal\n placement=\"bottom start\"\n >\n <TunnelExit id=\"options\" />\n </Options>\n </Aria.Autocomplete>\n </UNSAFE_PortalProvider>\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureCont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C,IAAA,CAAK,YAAA;AAAA,UAAL;AAAA,YACC,MAAA,EAAQ,QAAA;AAAA,YACR,qBAAA,EAAqB,IAAA;AAAA,YACpB,GAAG,IAAA;AAAA,YAEH,QAAA,EAAA;AAAA,cAAA,QAAA;AAAA,8BACD,GAAA;AAAA,gBAAC,OAAA;AAAA,gBAAA;AAAA,kBACC,QAAA,EAAU,kBAAA;AAAA,kBACV,UAAA,EAAY,QAAA;AAAA,kBACZ,UAAA,EAAY,wBAAA;AAAA,kBACZ,gBAAA;AAAA,kBACA,UAAA,EAAU,IAAA;AAAA,kBACV,SAAA,EAAU,cAAA;AAAA,kBAEV,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAG,SAAA,EAAU;AAAA;AAAA;AAC3B;AAAA;AAAA,WAEJ,CAAA,EACF;AAAA;AAAA,KACF,EACF,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.mjs","sources":["../../../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Avatar.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName, Status } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport type { avatarColors } from \"@/components/Avatar/avatarColors\";\n\nexport type AvatarColors = (typeof avatarColors)[number];\n\nexport interface AvatarProps\n extends PropsWithChildren
|
|
1
|
+
{"version":3,"file":"Avatar.mjs","sources":["../../../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Avatar.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName, Status } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { AlertIcon } from \"@/components/AlertIcon\";\nimport type { avatarColors } from \"@/components/Avatar/avatarColors\";\n\nexport type AvatarColors = (typeof avatarColors)[number];\n\nexport interface AvatarProps\n extends PropsWithChildren, PropsWithClassName, FlowComponentProps {\n /** The size of the avatar. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n /** The color of icons and initials inside the avatar. */\n color?: AvatarColors;\n /**\n * Adds status icon and color to the avatar. May only be used if the status is\n * explained by an element (like text or label) nearby.\n */\n status?: Status;\n}\n\n/** @flr-generate all */\nexport const Avatar = flowComponent(\"Avatar\", (props) => {\n const { children, className, color, size = \"m\", status, ref } = props;\n\n const rootClassName = clsx(\n styles.avatar,\n styles[`size-${size}`],\n className,\n !status && styles[color ?? \"blue\"],\n status && styles[status],\n );\n\n const useDynamicColor = color === undefined && status === undefined;\n\n const propsContext: PropsContext = {\n Initials: {\n className: styles.initials,\n useDynamicColor,\n },\n Icon: {\n className: styles.icon,\n },\n };\n\n return (\n <div className={rootClassName} ref={ref}>\n <PropsContextProvider props={propsContext}>\n {!status && children}\n {status && <AlertIcon className={styles.icon} status={status} />}\n </PropsContextProvider>\n </div>\n );\n});\n\nexport default Avatar;\n"],"names":[],"mappings":";;;;;;;;AA2BO,MAAM,MAAA,GAAS,aAAA,CAAc,QAAA,EAAU,CAAC,KAAA,KAAU;AACvD,EAAA,MAAM,EAAE,UAAU,SAAA,EAAW,KAAA,EAAO,OAAO,GAAA,EAAK,MAAA,EAAQ,KAAI,GAAI,KAAA;AAEhE,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,MAAA;AAAA,IACP,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,IACrB,SAAA;AAAA,IACA,CAAC,MAAA,IAAU,MAAA,CAAO,KAAA,IAAS,MAAM,CAAA;AAAA,IACjC,MAAA,IAAU,OAAO,MAAM;AAAA,GACzB;AAEA,EAAA,MAAM,eAAA,GAAkB,KAAA,KAAU,MAAA,IAAa,MAAA,KAAW,MAAA;AAE1D,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,QAAA,EAAU;AAAA,MACR,WAAW,MAAA,CAAO,QAAA;AAAA,MAClB;AAAA,KACF;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,WAAW,MAAA,CAAO;AAAA;AACpB,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,SAAI,SAAA,EAAW,aAAA,EAAe,KAC7B,QAAA,kBAAA,IAAA,CAAC,oBAAA,EAAA,EAAqB,OAAO,YAAA,EAC1B,QAAA,EAAA;AAAA,IAAA,CAAC,MAAA,IAAU,QAAA;AAAA,IACX,0BAAU,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,MAAA,CAAO,MAAM,MAAA,EAAgB;AAAA,GAAA,EAChE,CAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarStack.mjs","sources":["../../../../../../src/components/AvatarStack/AvatarStack.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { Children } from \"react\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./AvatarStack.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { Avatar } from \"@/components/Avatar\";\nimport { Wrap } from \"@/components/Wrap\";\n\nexport interface AvatarStackProps\n extends PropsWithClassName
|
|
1
|
+
{"version":3,"file":"AvatarStack.mjs","sources":["../../../../../../src/components/AvatarStack/AvatarStack.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { Children } from \"react\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./AvatarStack.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { Avatar } from \"@/components/Avatar\";\nimport { Wrap } from \"@/components/Wrap\";\n\nexport interface AvatarStackProps\n extends PropsWithClassName, PropsWithChildren {\n /**\n * The total count of items, as avatars should only be displayed for the first\n * view\n */\n totalCount?: number;\n /** The onPress action of the additional items count element */\n onCountPress?: () => void;\n /** The size of the avatars inside the stack. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n}\n\n/** @flr-generate all */\nexport const AvatarStack: FC<AvatarStackProps> = (props) => {\n const {\n className,\n children,\n totalCount = 0,\n size = \"m\",\n onCountPress,\n } = props;\n\n const avatarCount = Children.count(children);\n\n const additionalItemsCount = totalCount - avatarCount;\n\n const rootClassName = clsx(\n styles.avatarStack,\n styles[`size-${size}`],\n className,\n );\n\n const propsContext: PropsContext = {\n Avatar: { className: styles.avatar, size },\n Button: {\n className: styles.avatar,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>\n {children}\n {additionalItemsCount > 0 && (\n <Wrap if={onCountPress}>\n <Button onPress={onCountPress}>\n <Avatar size={size}>+{additionalItemsCount}</Avatar>\n </Button>\n </Wrap>\n )}\n </div>\n </PropsContextProvider>\n );\n};\n\nexport default AvatarStack;\n"],"names":[],"mappings":";;;;;;;;;;AAyBO,MAAM,WAAA,GAAoC,CAAC,KAAA,KAAU;AAC1D,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA,GAAa,CAAA;AAAA,IACb,IAAA,GAAO,GAAA;AAAA,IACP;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,WAAA,GAAc,QAAA,CAAS,KAAA,CAAM,QAAQ,CAAA;AAE3C,EAAA,MAAM,uBAAuB,UAAA,GAAa,WAAA;AAE1C,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,WAAA;AAAA,IACP,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,IACrB;AAAA,GACF;AAEA,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ,EAAE,SAAA,EAAW,MAAA,CAAO,QAAQ,IAAA,EAAK;AAAA,IACzC,MAAA,EAAQ;AAAA,MACN,WAAW,MAAA,CAAO;AAAA;AACpB,GACF;AAEA,EAAA,2BACG,oBAAA,EAAA,EAAqB,KAAA,EAAO,cAC3B,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAW,aAAA,EACb,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,oBAAA,GAAuB,CAAA,oBACtB,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAI,YAAA,EACR,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,OAAA,EAAS,YAAA,EACf,QAAA,kBAAA,IAAA,CAAC,MAAA,EAAA,EAAO,IAAA,EAAY,QAAA,EAAA;AAAA,MAAA,GAAA;AAAA,MAAE;AAAA,KAAA,EAAqB,GAC7C,CAAA,EACF;AAAA,GAAA,EAEJ,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.mjs","sources":["../../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Badge.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } 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\";\n\nexport const badgeColors = [\n \"neutral\",\n \"blue\",\n \"navy\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"orange\",\n \"red\",\n \"dark\",\n \"light\",\n] as const;\nexport type BadgeColors = (typeof badgeColors)[number];\n\nexport interface BadgeProps\n extends PropsWithChildren
|
|
1
|
+
{"version":3,"file":"Badge.mjs","sources":["../../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Badge.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } 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\";\n\nexport const badgeColors = [\n \"neutral\",\n \"blue\",\n \"navy\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"orange\",\n \"red\",\n \"dark\",\n \"light\",\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 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 {onClose && (\n <Button\n className={styles.close}\n size=\"s\"\n color={color === \"light\" ? \"light\" : \"dark\"}\n variant=\"plain\"\n onPress={onClose}\n isDisabled={isDisabled}\n >\n <IconClose />\n </Button>\n )}\n </div>\n </PropsContextProvider>\n );\n});\n\nexport default Badge;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuCO,MAAM,KAAA,GAAQ,aAAA,CAAc,OAAA,EAAS,CAAC,KAAA,KAAU;AACrD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA,GAAQ,SAAA;AAAA,IACR,GAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,KAAA;AAAA,IACP,OAAO,KAAK,CAAA;AAAA,IACZ,cAAc,MAAA,CAAO,QAAA;AAAA,IACrB;AAAA,GACF;AAEA,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,KAAA,EAAO;AAAA,MACL,WAAA,EAAa,MAAA;AAAA,MACb,WAAW,MAAA,CAAO,KAAA;AAAA,MAClB,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,WAAA,EAAa,MAAA;AAAA,MACb,WAAW,MAAA,CAAO;AAAA,KACpB;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO;AAAA,QACL,WAAA,EAAa,MAAA;AAAA,QACb,WAAW,MAAA,CAAO,KAAA;AAAA,QAClB,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,WAAA,EAAa,MAAA;AAAA,QACb,WAAW,MAAA,CAAO;AAAA;AACpB;AACF,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,IAAA,CAAC,SAAI,SAAA,EAAW,aAAA,EAAgB,GAAG,IAAA,EAAM,GAAA,EACtC,QAAA,EAAA;AAAA,IAAA,CAAC,2BAAW,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,SAAU,QAAA,EAAS,CAAA;AAAA,IACtD,OAAA,oBACC,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,UAAA;AAAA,QACA,QAAA,EAAQ,IAAA;AAAA,QACR,WAAW,MAAA,CAAO,MAAA;AAAA,QAClB,OAAA;AAAA,QAEC;AAAA;AAAA,KACH;AAAA,IAED,OAAA,oBACC,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,WAAW,MAAA,CAAO,KAAA;AAAA,QAClB,IAAA,EAAK,GAAA;AAAA,QACL,KAAA,EAAO,KAAA,KAAU,OAAA,GAAU,OAAA,GAAU,MAAA;AAAA,QACrC,OAAA,EAAQ,OAAA;AAAA,QACR,OAAA,EAAS,OAAA;AAAA,QACT,UAAA;AAAA,QAEA,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA;AACb,GAAA,EAEJ,CAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.mjs","sources":["../../../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Breadcrumb.module.scss\";\nimport clsx from \"clsx\";\nimport type { BreadcrumbItemProps } from \"./components/BreadcrumbItem\";\nimport { BreadcrumbItem } from \"./components/BreadcrumbItem\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface BreadcrumbProps\n extends
|
|
1
|
+
{"version":3,"file":"Breadcrumb.mjs","sources":["../../../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Breadcrumb.module.scss\";\nimport clsx from \"clsx\";\nimport type { BreadcrumbItemProps } from \"./components/BreadcrumbItem\";\nimport { BreadcrumbItem } from \"./components/BreadcrumbItem\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface BreadcrumbProps\n extends\n Omit<Aria.BreadcrumbsProps<BreadcrumbItemProps>, \"children\">,\n PropsWithChildren {\n /** The color of the breadcrumb. @default \"primary\" */\n color?: \"primary\" | \"dark\" | \"light\";\n}\n\n/** @flr-generate all */\nexport const Breadcrumb: FC<BreadcrumbProps> = (props) => {\n const { children, className, color = \"primary\", ...rest } = props;\n\n const rootClassName = clsx(styles.breadcrumb, styles[color], className);\n\n const propsContext: PropsContext = {\n Link: {\n unstyled: true,\n className: styles.link,\n wrapWith: <BreadcrumbItem />,\n },\n };\n\n return (\n <Aria.Breadcrumbs {...rest} className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Aria.Breadcrumbs>\n );\n};\n\nexport default Breadcrumb;\n"],"names":[],"mappings":";;;;;;;;AAkBO,MAAM,UAAA,GAAkC,CAAC,KAAA,KAAU;AACxD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,QAAQ,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AAE5D,EAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,YAAY,MAAA,CAAO,KAAK,GAAG,SAAS,CAAA;AAEtE,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,IAAA,EAAM;AAAA,MACJ,QAAA,EAAU,IAAA;AAAA,MACV,WAAW,MAAA,CAAO,IAAA;AAAA,MAClB,QAAA,sBAAW,cAAA,EAAA,EAAe;AAAA;AAC5B,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,IAAA,CAAK,WAAA,EAAL,EAAkB,GAAG,IAAA,EAAM,SAAA,EAAW,aAAA,EACrC,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,UACH,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.mjs","sources":["../../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Button.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { IconFailed, IconSucceeded } from \"@/components/Icon/components/icons\";\nimport { Wrap } from \"@/components/Wrap\";\nimport { Text } from \"@/components/Text\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport LoadingSpinner from \"@/components/LoadingSpinner/LoadingSpinner\";\nimport { useAriaAnnounceActionState } from \"@/components/Action/lib/ariaLive\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\n\nexport interface ButtonProps\n extends
|
|
1
|
+
{"version":3,"file":"Button.mjs","sources":["../../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Button.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { IconFailed, IconSucceeded } from \"@/components/Icon/components/icons\";\nimport { Wrap } from \"@/components/Wrap\";\nimport { Text } from \"@/components/Text\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport LoadingSpinner from \"@/components/LoadingSpinner/LoadingSpinner\";\nimport { useAriaAnnounceActionState } from \"@/components/Action/lib/ariaLive\";\nimport { extractTextFromFirstChild } from \"@/lib/react/remote\";\n\nexport interface ButtonProps\n extends\n PropsWithChildren<Aria.ButtonProps>,\n FlowComponentProps<HTMLButtonElement> {\n /** Slot for button placement in action groups. */\n slot?: string;\n /** The color of the button. @default \"primary\" */\n color?: \"primary\" | \"accent\" | \"secondary\" | \"danger\" | \"dark\" | \"light\";\n /** The visual variant of the button. @default \"solid\" */\n variant?: \"plain\" | \"solid\" | \"soft\" | \"outline\";\n /** The size of the button. @default \"m\" */\n size?: \"m\" | \"s\";\n /** Disables button but keeps it focusable. */\n \"aria-disabled\"?: boolean;\n /** Whether the button is in a pending state. */\n isPending?: boolean;\n /** Whether the button is in a succeeded state. */\n isSucceeded?: boolean;\n /** Whether the button is in a failed state. */\n isFailed?: boolean;\n /** Whether the button is in a read only state. */\n isReadOnly?: boolean;\n /** @internal */\n unstyled?: boolean;\n /** @internal */\n ariaSlot?: string | null;\n}\n\nconst disablePendingProps = (props: ButtonProps) => {\n if (\n props.isPending ||\n props.isSucceeded ||\n props.isFailed ||\n props[\"aria-disabled\"] ||\n props.isReadOnly\n ) {\n props = { ...props };\n props.onPress = undefined;\n props.onPressStart = undefined;\n props.onPressEnd = undefined;\n props.onPressChange = undefined;\n props.onPressUp = undefined;\n props.onKeyDown = undefined;\n props.onKeyUp = undefined;\n props.type = \"button\";\n }\n\n return props;\n};\n\n/** @flr-generate all */\nexport const Button = flowComponent(\"Button\", (props) => {\n props = disablePendingProps(props);\n\n const {\n color = \"primary\",\n variant = \"solid\",\n children,\n className,\n size = \"m\",\n isPending,\n isSucceeded,\n isFailed,\n \"aria-disabled\": ariaDisabled,\n ref,\n slot: ignoredSlotProp,\n ariaSlot: slot,\n unstyled,\n isReadOnly,\n ...restProps\n } = props;\n\n const rootClassName = unstyled\n ? className\n : clsx(\n styles.button,\n isPending && styles.isPending,\n isSucceeded && styles.isSucceeded,\n isFailed && styles.isFailed,\n styles[`size-${size}`],\n styles[color],\n styles[variant],\n className,\n /**\n * Workaround warning: The Aria.Button does not support \"aria-disabled\"\n * by now, so this Button will be visually disabled via CSS.\n */\n ariaDisabled && styles.ariaDisabled,\n );\n\n useAriaAnnounceActionState(\n isPending\n ? \"isPending\"\n : isSucceeded\n ? \"isSucceeded\"\n : isFailed\n ? \"isFailed\"\n : \"isIdle\",\n );\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n \"aria-hidden\": true,\n size,\n },\n Text: {\n className: styles.text,\n },\n Avatar: {\n className: styles.avatar,\n },\n CounterBadge: {\n className: styles.counterBadge,\n },\n Image: {\n className: styles.image,\n },\n };\n\n const StateIconComponent = isSucceeded\n ? IconSucceeded\n : isFailed\n ? IconFailed\n : isPending\n ? LoadingSpinner\n : undefined;\n\n const stateIcon = StateIconComponent && (\n <StateIconComponent\n size={size}\n className={styles.stateIcon}\n status={isFailed ? \"danger\" : isSucceeded ? \"success\" : undefined}\n />\n );\n\n const isStringContent = extractTextFromFirstChild(children) !== undefined;\n\n return (\n <Aria.Button\n className={rootClassName}\n ref={ref}\n slot={slot}\n {...(isReadOnly === true ? { \"data-readonly\": true } : {})}\n {...restProps}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={!unstyled}>\n <span className={styles.content}>\n <Wrap if={isStringContent}>\n <Text className={styles.text}>{children}</Text>\n </Wrap>\n </span>\n </Wrap>\n </PropsContextProvider>\n {stateIcon}\n </Aria.Button>\n );\n});\n\nexport default Button;\n"],"names":[],"mappings":";;;;;;;;;;;;;;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AAA,MACC,SAAA,EAAW,aAAA;AAAA,MACX,GAAA;AAAA,MACA,IAAA;AAAA,MACC,GAAI,UAAA,KAAe,IAAA,GAAO,EAAE,eAAA,EAAiB,IAAA,KAAS,EAAC;AAAA,MACvD,GAAG,SAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAI,CAAC,QAAA,EACT,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,MAAA,CAAO,OAAA,EACtB,8BAAC,IAAA,EAAA,EAAK,EAAA,EAAI,eAAA,EACR,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAW,MAAA,CAAO,IAAA,EAAO,QAAA,EAAS,CAAA,EAC1C,CAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAAA,QACC;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import * as Recharts from \"recharts\";\nimport React, {\n Children,\n useEffect,\n useRef,\n useState,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type ReactElement,\n type SVGProps,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport Wrap from \"../Wrap\";\nimport { CartesianGrid } from \"../public\";\n\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof Recharts.ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps\n extends
|
|
1
|
+
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import * as Recharts from \"recharts\";\nimport React, {\n Children,\n useEffect,\n useRef,\n useState,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type ReactElement,\n type SVGProps,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport Wrap from \"../Wrap\";\nimport { CartesianGrid } from \"../public\";\n\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof Recharts.ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps\n extends\n Pick<\n ComponentProps<typeof Recharts.ComposedChart>,\n \"data\" | \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n height?: string;\n /** View that is provided when data is empty/undefined */\n emptyView?: React.ComponentType<CartesianChartEmptyViewProps>;\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: EmptyView,\n ...rest\n } = props;\n const rootClassName = clsx(styles.cartesianChart, className);\n\n const otherChildren: ReactElement[] = [];\n const gridChildren: ReactElement[] = [];\n\n Children.forEach(children, (child) => {\n if (!child) return;\n const element = child as ReactElement;\n\n if (element.type === CartesianGrid) {\n gridChildren.push(element);\n } else {\n otherChildren.push(element);\n }\n });\n\n const showEmptyView = (!data || data.length === 0) && EmptyView;\n\n const chartContainerRef = useRef<HTMLDivElement>(null);\n const [viewDimensions, setViewDimensions] = useState<Partial<\n SVGProps<SVGForeignObjectElement>\n > | null>(null);\n\n // resizing the foreignObject for the EmptyView on size changes\n useEffect(() => {\n if (showEmptyView) {\n const updateDimensions = () => {\n const svg = chartContainerRef.current?.querySelector(\n \"svg\",\n ) as SVGSVGElement | null;\n if (!svg) return;\n\n const clip = svg.querySelector(\"clipPath rect\");\n if (clip) {\n const x = parseFloat(clip.getAttribute(\"x\") ?? \"0\");\n const y = parseFloat(clip.getAttribute(\"y\") ?? \"0\");\n const width = parseFloat(clip.getAttribute(\"width\") ?? \"0\");\n const height = parseFloat(clip.getAttribute(\"height\") ?? \"0\");\n setViewDimensions({ x, y, width, height });\n }\n };\n\n updateDimensions();\n\n const container = chartContainerRef.current;\n const observer = new ResizeObserver(updateDimensions);\n if (container) observer.observe(container);\n\n return () => {\n observer.disconnect();\n };\n }\n }, [showEmptyView, chartContainerRef.current]);\n\n return (\n <Wrap if={height}>\n <div\n style={{ height, flex: flexGrow ? 1 : undefined }}\n ref={chartContainerRef}\n >\n <Recharts.ResponsiveContainer\n initialDimension={{\n // fix warning on initial render\n width: 1,\n height: 1,\n }}\n >\n <Recharts.ComposedChart\n data={data}\n className={rootClassName}\n {...rest}\n >\n {!showEmptyView && gridChildren}\n {otherChildren}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <div className={styles.emptyViewContainer}>\n <EmptyView data={data} />\n </div>\n </foreignObject>\n )}\n </Recharts.ComposedChart>\n </Recharts.ResponsiveContainer>\n </div>\n </Wrap>\n );\n};\n\nexport default CartesianChart;\n"],"names":["height"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCO,MAAM,cAAA,GAA0C,CAAC,KAAA,KAAU;AAChE,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,IAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA,EAAW,SAAA;AAAA,IACX,GAAG;AAAA,GACL,GAAI,KAAA;AACJ,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,cAAA,EAAgB,SAAS,CAAA;AAE3D,EAAA,MAAM,gBAAgC,EAAC;AACvC,EAAA,MAAM,eAA+B,EAAC;AAEtC,EAAA,QAAA,CAAS,OAAA,CAAQ,QAAA,EAAU,CAAC,KAAA,KAAU;AACpC,IAAA,IAAI,CAAC,KAAA,EAAO;AACZ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J;AAAA;AACF;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/Area/Area.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport tokens from \"@mittwald/flow-design-tokens/variables.json\";\nimport { AreaDot } from \"../AreaDot\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\nexport interface AreaProps
|
|
1
|
+
{"version":3,"file":"Area.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/Area/Area.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport tokens from \"@mittwald/flow-design-tokens/variables.json\";\nimport { AreaDot } from \"../AreaDot\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\nexport interface AreaProps extends Pick<\n Recharts.AreaProps,\n | \"className\"\n | \"dataKey\"\n | \"stackId\"\n | \"fillOpacity\"\n | \"key\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"type\"\n | \"unit\"\n> {\n /** The color of the area. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Area: FC<AreaProps> = (props) => {\n const {\n color: colorFromProps = \"sea-green\",\n stackId = 1,\n fillOpacity = 1,\n ...rest\n } = props;\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps;\n\n return (\n <Recharts.Area\n stackId={stackId}\n fillOpacity={fillOpacity}\n {...rest}\n activeDot={<AreaDot color={color} />}\n fill={color}\n stroke={tokens.area[\"border-color\"].value}\n strokeWidth={tokens.area[\"border-width\"].value}\n />\n );\n};\n\nexport default Area;\n"],"names":[],"mappings":";;;;;;;AAwBO,MAAM,IAAA,GAAsB,CAAC,KAAA,KAAU;AAC5C,EAAA,MAAM;AAAA,IACJ,OAAO,cAAA,GAAiB,WAAA;AAAA,IACxB,OAAA,GAAU,CAAA;AAAA,IACV,WAAA,GAAc,CAAA;AAAA,IACd,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,QAAQ,kBAAA,CAAmB,cAAc,CAAA,GAC3C,CAAA,0BAAA,EAA6B,cAAc,CAAA,CAAA,CAAA,GAC3C,cAAA;AAEJ,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA,CAAS,IAAA;AAAA,IAAT;AAAA,MACC,OAAA;AAAA,MACA,WAAA;AAAA,MACC,GAAG,IAAA;AAAA,MACJ,SAAA,kBAAW,GAAA,CAAC,OAAA,EAAA,EAAQ,KAAA,EAAc,CAAA;AAAA,MAClC,IAAA,EAAM,KAAA;AAAA,MACN,MAAA,EAAQ,MAAA,CAAO,IAAA,CAAK,cAAc,CAAA,CAAE,KAAA;AAAA,MACpC,WAAA,EAAa,MAAA,CAAO,IAAA,CAAK,cAAc,CAAA,CAAE;AAAA;AAAA,GAC3C;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTooltip.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/ChartTooltip/ChartTooltip.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport type {\n NameType,\n ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\";\nimport { TooltipContent } from \"./TooltipContent\";\n\nexport type TooltipLineFormatter = (\n value: ValueType,\n name: NameType,\n index: number,\n unit?: string | number,\n) => string;\n\nexport type TooltipHeadingFormatter = (\n title: string | number | undefined,\n) => string;\n\nexport interface WithTooltipFormatters {\n /**\n * A formatter function for the lines in the tooltip. Can be used for purposes\n * like translations.\n */\n formatter?: TooltipLineFormatter;\n /**\n * A formatter function for the heading of the tooltip. Can be used for\n * purposes like translations.\n */\n headingFormatter?: TooltipHeadingFormatter;\n}\n\nexport interface ChartTooltipProps\n extends
|
|
1
|
+
{"version":3,"file":"ChartTooltip.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/ChartTooltip/ChartTooltip.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport type {\n NameType,\n ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\";\nimport { TooltipContent } from \"./TooltipContent\";\n\nexport type TooltipLineFormatter = (\n value: ValueType,\n name: NameType,\n index: number,\n unit?: string | number,\n) => string;\n\nexport type TooltipHeadingFormatter = (\n title: string | number | undefined,\n) => string;\n\nexport interface WithTooltipFormatters {\n /**\n * A formatter function for the lines in the tooltip. Can be used for purposes\n * like translations.\n */\n formatter?: TooltipLineFormatter;\n /**\n * A formatter function for the heading of the tooltip. Can be used for\n * purposes like translations.\n */\n headingFormatter?: TooltipHeadingFormatter;\n}\n\nexport interface ChartTooltipProps\n extends\n Pick<\n Recharts.TooltipProps<ValueType, NameType>,\n \"wrapperClassName\" | \"allowEscapeViewBox\"\n >,\n WithTooltipFormatters {}\n\n/** @flr-generate all */\nexport const ChartTooltip: FC<ChartTooltipProps> = (props) => {\n const { formatter, headingFormatter, ...rest } = props;\n return (\n <Recharts.Tooltip\n {...rest}\n content={(props) => {\n const {\n formatter: ignoredFormatter,\n labelFormatter: ignoredLabelFormatter,\n ...rest\n } = props;\n\n return (\n <TooltipContent\n formatter={formatter}\n headingFormatter={headingFormatter}\n {...rest}\n />\n );\n }}\n cursor={false}\n />\n );\n};\n\nexport default ChartTooltip;\n"],"names":["props","rest"],"mappings":";;;;AAyCO,MAAM,YAAA,GAAsC,CAAC,KAAA,KAAU;AAC5D,EAAA,MAAM,EAAE,SAAA,EAAW,gBAAA,EAAkB,GAAG,MAAK,GAAI,KAAA;AACjD,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA,CAAS,OAAA;AAAA,IAAT;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,OAAA,EAAS,CAACA,MAAAA,KAAU;AAClB,QAAA,MAAM;AAAA,UACJ,SAAA,EAAW,gBAAA;AAAA,UACX,cAAA,EAAgB,qBAAA;AAAA,UAChB,GAAGC;AAAA,SACL,GAAID,MAAAA;AAEJ,QAAA,uBACE,GAAA;AAAA,UAAC,cAAA;AAAA,UAAA;AAAA,YACC,SAAA;AAAA,YACA,gBAAA;AAAA,YACC,GAAGC;AAAA;AAAA,SACN;AAAA,MAEJ,CAAA;AAAA,MACA,MAAA,EAAQ;AAAA;AAAA,GACV;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContent.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipContent.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport Heading from \"@/components/Heading\";\nimport { LegendItem } from \"@/components/Legend/components/LegendItem\";\nimport type * as Recharts from \"recharts\";\nimport type {\n NameType,\n ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\";\nimport type { WithTooltipFormatters } from \"./ChartTooltip\";\nimport styles from \"./ChartTooltip.module.scss\";\n\ninterface TooltipContentProps\n extends
|
|
1
|
+
{"version":3,"file":"TooltipContent.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipContent.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport Heading from \"@/components/Heading\";\nimport { LegendItem } from \"@/components/Legend/components/LegendItem\";\nimport type * as Recharts from \"recharts\";\nimport type {\n NameType,\n ValueType,\n} from \"recharts/types/component/DefaultTooltipContent\";\nimport type { WithTooltipFormatters } from \"./ChartTooltip\";\nimport styles from \"./ChartTooltip.module.scss\";\n\ninterface TooltipContentProps\n extends\n Pick<\n Recharts.TooltipContentProps<ValueType, NameType>,\n \"active\" | \"payload\" | \"label\" | \"wrapperClassName\"\n >,\n WithTooltipFormatters {}\n\nexport const TooltipContent = (props: TooltipContentProps) => {\n const {\n active,\n payload,\n formatter,\n headingFormatter,\n label,\n wrapperClassName,\n } = props;\n const className = clsx(wrapperClassName, styles.tooltip);\n\n if (active && payload && payload.length) {\n return (\n <div className={className}>\n <Heading level={4}>\n {headingFormatter ? headingFormatter(label) : label}\n </Heading>\n {payload\n .filter((i) => i.fill !== \"none\")\n .map((i, index) => (\n <LegendItem color={i.fill} key={i.dataKey}>\n {formatter\n ? formatter(i.value, i.dataKey, index, i.unit)\n : `${i.dataKey}: ${i.value} ${i.unit ? ` ${i.unit}` : \"\"}`}\n </LegendItem>\n ))}\n </div>\n );\n }\n\n return null;\n};\n"],"names":[],"mappings":";;;;;;AAmBO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAA+B;AAC5D,EAAA,MAAM;AAAA,IACJ,MAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,gBAAA;AAAA,IACA,KAAA;AAAA,IACA;AAAA,GACF,GAAI,KAAA;AACJ,EAAA,MAAM,SAAA,GAAY,IAAA,CAAK,gBAAA,EAAkB,MAAA,CAAO,OAAO,CAAA;AAEvD,EAAA,IAAI,MAAA,IAAU,OAAA,IAAW,OAAA,CAAQ,MAAA,EAAQ;AACvC,IAAA,uBACE,IAAA,CAAC,SAAI,SAAA,EACH,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,WAAQ,KAAA,EAAO,CAAA,EACb,6BAAmB,gBAAA,CAAiB,KAAK,IAAI,KAAA,EAChD,CAAA;AAAA,MACC,OAAA,CACE,OAAO,CAAC,CAAA,KAAM,EAAE,IAAA,KAAS,MAAM,EAC/B,GAAA,CAAI,CAAC,GAAG,KAAA,qBACP,GAAA,CAAC,cAAW,KAAA,EAAO,CAAA,CAAE,MAClB,QAAA,EAAA,SAAA,GACG,SAAA,CAAU,EAAE,KAAA,EAAO,CAAA,CAAE,SAAS,KAAA,EAAO,CAAA,CAAE,IAAI,CAAA,GAC3C,CAAA,EAAG,EAAE,OAAO,CAAA,EAAA,EAAK,EAAE,KAAK,CAAA,CAAA,EAAI,EAAE,IAAA,GAAO,CAAA,CAAA,EAAI,EAAE,IAAI,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA,EAAA,EAH5B,CAAA,CAAE,OAIlC,CACD;AAAA,KAAA,EACL,CAAA;AAAA,EAEJ;AAEA,EAAA,OAAO,IAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Line.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/Line/Line.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport tokens from \"@mittwald/flow-design-tokens/variables.json\";\nimport { AreaDot } from \"../AreaDot\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\nexport interface LineProps
|
|
1
|
+
{"version":3,"file":"Line.mjs","sources":["../../../../../../../../src/components/CartesianChart/components/Line/Line.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport tokens from \"@mittwald/flow-design-tokens/variables.json\";\nimport { AreaDot } from \"../AreaDot\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\nexport interface LineProps extends Pick<\n Recharts.LineProps,\n \"className\" | \"dataKey\" | \"key\" | \"xAxisId\" | \"yAxisId\" | \"type\" | \"unit\"\n> {\n /** The color of the line. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Line: FC<LineProps> = (props) => {\n const { color: colorFromProps = \"sea-green\", ...rest } = props;\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps;\n\n return (\n <Recharts.Line\n {...rest}\n fill={color}\n activeDot={<AreaDot color={color} />}\n dot={false}\n stroke={color}\n strokeWidth={tokens.line[\"border-width\"].value}\n />\n );\n};\n\nexport default Line;\n"],"names":[],"mappings":";;;;;;;AAgBO,MAAM,IAAA,GAAsB,CAAC,KAAA,KAAU;AAC5C,EAAA,MAAM,EAAE,KAAA,EAAO,cAAA,GAAiB,WAAA,EAAa,GAAG,MAAK,GAAI,KAAA;AAEzD,EAAA,MAAM,QAAQ,kBAAA,CAAmB,cAAc,CAAA,GAC3C,CAAA,0BAAA,EAA6B,cAAc,CAAA,CAAA,CAAA,GAC3C,cAAA;AAEJ,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA,CAAS,IAAA;AAAA,IAAT;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,IAAA,EAAM,KAAA;AAAA,MACN,SAAA,kBAAW,GAAA,CAAC,OAAA,EAAA,EAAQ,KAAA,EAAc,CAAA;AAAA,MAClC,GAAA,EAAK,KAAA;AAAA,MACL,MAAA,EAAQ,KAAA;AAAA,MACR,WAAA,EAAa,MAAA,CAAO,IAAA,CAAK,cAAc,CAAA,CAAE;AAAA;AAAA,GAC3C;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.mjs","sources":["../../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import {\n IconCheckboxChecked,\n IconCheckboxEmpty,\n IconCheckboxIndeterminate,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport clsx from \"clsx\";\nimport type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Checkbox.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useObjectRef } from \"react-aria\";\n\nexport interface CheckboxProps\n extends
|
|
1
|
+
{"version":3,"file":"Checkbox.mjs","sources":["../../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import {\n IconCheckboxChecked,\n IconCheckboxEmpty,\n IconCheckboxIndeterminate,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport clsx from \"clsx\";\nimport type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Checkbox.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useObjectRef } from \"react-aria\";\n\nexport interface CheckboxProps\n extends\n PropsWithChildren<\n Omit<Aria.CheckboxProps, \"children\" | \"ref\" | \"inputRef\">\n >,\n FlowComponentProps<HTMLInputElement> {\n inputClassName?: string;\n}\n\n/** @flr-generate all */\nexport const Checkbox = flowComponent(\"Checkbox\", (props) => {\n const { children, className, ref, inputClassName, ...rest } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const inputRef = useObjectRef(ref);\n\n return (\n <div\n {...fieldProps}\n className={clsx(styles.checkbox, className, fieldProps.className)}\n >\n <FieldErrorCaptureContext>\n <Aria.Checkbox\n {...rest}\n inputRef={inputRef}\n className={clsx(inputClassName, styles.input)}\n >\n {({ isSelected, isIndeterminate }) => (\n <PropsContextProvider props={fieldPropsContext}>\n {isSelected ? (\n <IconCheckboxChecked className={styles.icon} />\n ) : isIndeterminate ? (\n <IconCheckboxIndeterminate className={styles.icon} />\n ) : (\n <IconCheckboxEmpty className={styles.icon} />\n )}\n {children}\n </PropsContextProvider>\n )}\n </Aria.Checkbox>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default Checkbox;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAyBO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,KAAK,cAAA,EAAgB,GAAG,MAAK,GAAI,KAAA;AAE9D,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,kBAAkB,KAAK,CAAA;AAE3B,EAAA,MAAM,QAAA,GAAW,aAAa,GAAG,CAAA;AAEjC,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,UAAA;AAAA,MACJ,WAAW,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,SAAA,EAAW,WAAW,SAAS,CAAA;AAAA,MAEhE,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,wBAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,UAAC,IAAA,CAAK,QAAA;AAAA,UAAL;AAAA,YACE,GAAG,IAAA;AAAA,YACJ,QAAA;AAAA,YACA,SAAA,EAAW,IAAA,CAAK,cAAA,EAAgB,MAAA,CAAO,KAAK,CAAA;AAAA,YAE3C,QAAA,EAAA,CAAC,EAAE,UAAA,EAAY,eAAA,uBACd,IAAA,CAAC,oBAAA,EAAA,EAAqB,OAAO,iBAAA,EAC1B,QAAA,EAAA;AAAA,cAAA,UAAA,uBACE,mBAAA,EAAA,EAAoB,SAAA,EAAW,MAAA,CAAO,IAAA,EAAM,IAC3C,eAAA,mBACF,GAAA,CAAC,yBAAA,EAAA,EAA0B,SAAA,EAAW,OAAO,IAAA,EAAM,CAAA,uBAElD,iBAAA,EAAA,EAAkB,SAAA,EAAW,OAAO,IAAA,EAAM,CAAA;AAAA,cAE5C;AAAA,aAAA,EACH;AAAA;AAAA,SAEJ,EACF,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA;AAAA;AAAA,GAClB;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxButton.mjs","sources":["../../../../../../src/components/CheckboxButton/CheckboxButton.tsx"],"sourcesContent":["import styles from \"./CheckboxButton.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport { Checkbox } from \"@/components/Checkbox\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface CheckboxButtonProps\n extends CheckboxProps
|
|
1
|
+
{"version":3,"file":"CheckboxButton.mjs","sources":["../../../../../../src/components/CheckboxButton/CheckboxButton.tsx"],"sourcesContent":["import styles from \"./CheckboxButton.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport { Checkbox } from \"@/components/Checkbox\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface CheckboxButtonProps\n extends CheckboxProps, FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const CheckboxButton = flowComponent(\"CheckboxButton\", (props) => {\n const { children, className, inputClassName, ...rest } = props;\n\n const {\n fieldPropsContext,\n fieldProps,\n FieldErrorView,\n FieldErrorCaptureContext,\n } = useFieldComponent(props);\n\n const mergedPropsContext: PropsContext = {\n Text: {\n className: styles.label,\n },\n Content: {\n className: styles.content,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div\n {...fieldProps}\n className={clsx(fieldProps.className, styles.checkboxButton, className)}\n >\n <FieldErrorCaptureContext>\n <Checkbox {...rest} inputClassName={clsx(inputClassName, styles.input)}>\n <PropsContextProvider props={mergedPropsContext}>\n {children}\n </PropsContextProvider>\n </Checkbox>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default CheckboxButton;\n"],"names":[],"mappings":";;;;;;;;;AAcO,MAAM,cAAA,GAAiB,aAAA,CAAc,gBAAA,EAAkB,CAAC,KAAA,KAAU;AACvE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,GAAG,MAAK,GAAI,KAAA;AAEzD,EAAA,MAAM;AAAA,IACJ,iBAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACF,GAAI,kBAAkB,KAAK,CAAA;AAE3B,EAAA,MAAM,kBAAA,GAAmC;AAAA,IACvC,IAAA,EAAM;AAAA,MACJ,WAAW,MAAA,CAAO;AAAA,KACpB;AAAA,IACA,OAAA,EAAS;AAAA,MACP,WAAW,MAAA,CAAO;AAAA,KACpB;AAAA,IACA,GAAG;AAAA,GACL;AAEA,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,UAAA;AAAA,MACJ,WAAW,IAAA,CAAK,UAAA,CAAW,SAAA,EAAW,MAAA,CAAO,gBAAgB,SAAS,CAAA;AAAA,MAEtE,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,4BACC,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAU,GAAG,IAAA,EAAM,gBAAgB,IAAA,CAAK,cAAA,EAAgB,MAAA,CAAO,KAAK,GACnE,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,OAAO,kBAAA,EAC1B,QAAA,EACH,GACF,CAAA,EACF,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA;AAAA;AAAA,GAClB;AAEJ,CAAC;;;;"}
|