@mittwald/flow-react-components 1.2.0-next.48 → 1.2.0-next.49

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.
Files changed (26) hide show
  1. package/AGENTS.md +18 -0
  2. package/dist/assets/component-index.json +1 -1
  3. package/dist/assets/doc-properties.json +1 -1
  4. package/dist/js/default.mjs +2 -1
  5. package/dist/js/internal.mjs +2 -1
  6. package/dist/js/packages/components/src/components/Label/Label.mjs +21 -23
  7. package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs +9 -12
  9. package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs +2 -12
  11. package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs +9 -5
  13. package/dist/js/packages/components/src/components/OverlayTrigger/OverlayTrigger.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.mjs +17 -4
  15. package/dist/js/packages/components/src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.mjs.map +1 -1
  16. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs +38 -70
  17. package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
  18. package/dist/js/packages/components/src/components/propTypes/index.mjs +1 -0
  19. package/dist/js/packages/components/src/components/propTypes/index.mjs.map +1 -1
  20. package/dist/js/packages/components/src/lib/propsContext/overlayTriggerTunnel.mjs +34 -0
  21. package/dist/js/packages/components/src/lib/propsContext/overlayTriggerTunnel.mjs.map +1 -0
  22. package/dist/types/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.d.ts +6 -2
  23. package/dist/types/components/propTypes/index.d.ts +2 -1
  24. package/dist/types/lib/propsContext/index.d.ts +1 -0
  25. package/dist/types/lib/propsContext/overlayTriggerTunnel.d.ts +24 -0
  26. package/package.json +9 -9
@@ -6,6 +6,7 @@ import { PropsContextProvider } from "./packages/components/src/lib/propsContext
6
6
  import { ComponentPropsContextProvider } from "./packages/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs";
7
7
  import { ClearPropsContext } from "./packages/components/src/lib/propsContext/components/ClearPropsContext.mjs";
8
8
  import dynamic from "./packages/components/src/lib/propsContext/dynamicProps/dynamic.mjs";
9
+ import overlayTriggersTunneledTo from "./packages/components/src/lib/propsContext/overlayTriggerTunnel.mjs";
9
10
  import { AccentBox } from "./packages/components/src/components/AccentBox/AccentBox.mjs";
10
11
  import { IconSetProvider } from "./packages/components/src/components/Icon/components/IconSetProvider.mjs";
11
12
  import { DeprecationWarningContext, DeprecationWarningProvider, useWarnDeprecation } from "./packages/components/src/components/DeprecationWarningProvider/DeprecationWarningProvider.mjs";
@@ -335,4 +336,4 @@ import { TextField } from "./packages/components/src/components/TextField/TextFi
335
336
  import { TimeField } from "./packages/components/src/components/TimeField/TimeField.mjs";
336
337
  import { Truncate } from "./packages/components/src/components/Truncate/Truncate.mjs";
337
338
  import { TunnelEntry } from "./packages/components/src/components/TunnelEntry/TunnelEntry.mjs";
338
- export { AbortActionError, AccentBox, Accordion, Action, ActionBatch, ActionGroup, Activity, Alert, AlertBadge, AlertIcon, AlertText, Align, Area, AreaDot, Autocomplete, Avatar, AvatarStack, Badge, Bar, BigNumber, Breadcrumb, BrowserOnly, Button, CartesianChart, CartesianGrid, ChartGrid, ChartLegend, ChartTooltip, Chat, Checkbox, CheckboxButton, CheckboxGroup, ClearPropsContext, CodeBlock, CodeEditor, Color, ColumnLayout, Combine, ComboBox, ComponentDefaultsContext, ComponentDefaultsProvider, ComponentPropsContextProvider, Content, ContextMenu, ContextMenuContent, ContextMenuSection, ContextMenuTrigger, ContextualHelp, ContextualHelpTrigger, CopyButton, CounterBadge, CountryOptions, DatePicker, DateRangePicker, DeprecationWarningContext, DeprecationWarningProvider, DialogTrigger, Div, DonutChart, EmptyView, EmptyViewContainer, FieldDescription, FieldError, FileCard, FileCardList, FileDropZone, FileField, Flex, GridList, GridListItem, Header, HeaderNavigation, Heading, Icon, IconAI, IconAnalytics, IconApp, IconAscending, IconAttachment, IconAutoresponder, IconBackLink, IconBackup, IconBold, IconCamera, IconCertificate, IconChangelog, IconCheck, IconCheckboxChecked, IconCheckboxEmpty, IconCheckboxIndeterminate, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClose, IconCode, IconContainer, IconContextMenu, IconContextMenuVertical, IconContract, IconContractPartner, IconContributor, IconCopy, IconCronjob, IconCustomer, IconDanger, IconDashboard, IconDatabase, IconDate, IconDelete, IconDeliveryBox, IconDescending, IconDesktop, IconDirectory, IconDnsSubZone, IconDnsZone, IconDomain, IconDownload, IconEdit, IconEmail, IconEmailArchive, IconExtension, IconExternalLink, IconFailed, IconFeedback, IconFile, IconFilter, IconForwardAddress, IconForwardLink, IconHide, IconHome, IconImage, IconInfo, IconInvite, IconInvoice, IconItalic, IconKnowledgeHint, IconLanguage, IconLeadFyndr, IconLink, IconLock, IconLockOpen, IconLogout, IconMainUser, IconMarketplace, IconMaximize, IconMember, IconMenu, IconMinimize, IconMinus, IconMittwald, IconMobile, IconMonitoring, IconMove, IconNewsletter, IconNotification, IconNumber, IconOrder, IconOrderedList, IconPassword, IconPath, IconPause, IconPayment, IconPending, IconPicture, IconPlus, IconProject, IconQuote, IconRadioOff, IconRadioOn, IconRedo, IconRefresh, IconRegistry, IconSave, IconSearch, IconSecurity, IconSend, IconServer, IconSetProvider, IconSettings, IconShare, IconShow, IconSorting, IconSsh, IconSshKey, IconSshSftp, IconStack, IconStar, IconStarFilled, IconStart, IconStrikeThrough, IconSubdomain, IconSucceeded, IconSuccess, IconSupport, IconTerminate, IconTicket, IconTime, IconUnavailable, IconUndo, IconUnorderedList, IconUpload, IconUser, IconVhost, IconView, IconVolume, IconWarning, IllustratedMessage, Image, ImageCropper, Initials, InlineCode, IntlProvider, Kbd, Label, LabeledValue, LayoutCard, Legend, LegendItem, LightBox, LightBoxGallery, LightBoxGalleryItem, LightBoxTrigger, Line, Link, List, ListFilter, ListItem, ListItemView, ListItemViewContent, ListLoaderAsync, ListSorting, ListStaticData, ListSummary, LoadingSpinner, Markdown, MarkdownEditor, MenuItem, MenuTrigger, Message, MessageSeparator, MessageThread, Modal, ModalTrigger, Navigation, NavigationGroup, Notification, NotificationController, NotificationProvider, NumberField, Option, Overlay, OverlayContent, OverlayController, OverlayTrigger, PasswordCreationField, Popover, PopoverContent, PopoverTrigger, ProgressBar, PropsContextProvider, Radio, RadioButton, RadioGroup, RangeCalendar, Rating, RatingSegment, Render, RouterProvider, SearchField, Section, Segment, SegmentedControl, Select, Separator, SettingsProvider, Skeleton, SkeletonText, Slider, SortingFunctions, SuspenseTrigger, Switch, Tab, TabNavigation, TabTitle, Table, TableBody, TableCell, TableColumn, TableFooterRow, TableHeader, TableRow, Tabs, Text, TextArea, TextField, ThemedHtml, TimeField, Tooltip, TooltipTrigger, TranslationProvider, Truncate, TunnelEntry, TypedArea, TypedBar, TypedChartGrid, TypedChartLegend, TypedChartTooltip, TypedLine, TypedList, TypedListFilter, TypedListItem, TypedListLoaderAsync, TypedListSorting, TypedListStaticData, TypedXAxis, TypedYAxis, Wrap, XAxis, YAxis, abortAction, builtInComponentDefaults, dynamic, eventHandlerContext, flags, getRemoteEvent, getResolvedTheme, getTheme, iconCategories, isDateRangeValue, propsContext, setTheme, sortByDachFirst, themeHtmlAttribute, typedCartesianChart, typedList, useAriaAnnounceSuspense, useComponentDefaults, useControlledRemoteValueProps, useDesignTokens, useIsMounted, useLanguage, useList, useListMetadata, useLocalizedStringFormatter, useModalController, useNotificationController, useOnChange, useOverlayController, useProps, useTheme as useStoredTheme, useResolvedTheme as useTheme, useTranslationProvider, useWarnDeprecation };
339
+ export { AbortActionError, AccentBox, Accordion, Action, ActionBatch, ActionGroup, Activity, Alert, AlertBadge, AlertIcon, AlertText, Align, Area, AreaDot, Autocomplete, Avatar, AvatarStack, Badge, Bar, BigNumber, Breadcrumb, BrowserOnly, Button, CartesianChart, CartesianGrid, ChartGrid, ChartLegend, ChartTooltip, Chat, Checkbox, CheckboxButton, CheckboxGroup, ClearPropsContext, CodeBlock, CodeEditor, Color, ColumnLayout, Combine, ComboBox, ComponentDefaultsContext, ComponentDefaultsProvider, ComponentPropsContextProvider, Content, ContextMenu, ContextMenuContent, ContextMenuSection, ContextMenuTrigger, ContextualHelp, ContextualHelpTrigger, CopyButton, CounterBadge, CountryOptions, DatePicker, DateRangePicker, DeprecationWarningContext, DeprecationWarningProvider, DialogTrigger, Div, DonutChart, EmptyView, EmptyViewContainer, FieldDescription, FieldError, FileCard, FileCardList, FileDropZone, FileField, Flex, GridList, GridListItem, Header, HeaderNavigation, Heading, Icon, IconAI, IconAnalytics, IconApp, IconAscending, IconAttachment, IconAutoresponder, IconBackLink, IconBackup, IconBold, IconCamera, IconCertificate, IconChangelog, IconCheck, IconCheckboxChecked, IconCheckboxEmpty, IconCheckboxIndeterminate, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClose, IconCode, IconContainer, IconContextMenu, IconContextMenuVertical, IconContract, IconContractPartner, IconContributor, IconCopy, IconCronjob, IconCustomer, IconDanger, IconDashboard, IconDatabase, IconDate, IconDelete, IconDeliveryBox, IconDescending, IconDesktop, IconDirectory, IconDnsSubZone, IconDnsZone, IconDomain, IconDownload, IconEdit, IconEmail, IconEmailArchive, IconExtension, IconExternalLink, IconFailed, IconFeedback, IconFile, IconFilter, IconForwardAddress, IconForwardLink, IconHide, IconHome, IconImage, IconInfo, IconInvite, IconInvoice, IconItalic, IconKnowledgeHint, IconLanguage, IconLeadFyndr, IconLink, IconLock, IconLockOpen, IconLogout, IconMainUser, IconMarketplace, IconMaximize, IconMember, IconMenu, IconMinimize, IconMinus, IconMittwald, IconMobile, IconMonitoring, IconMove, IconNewsletter, IconNotification, IconNumber, IconOrder, IconOrderedList, IconPassword, IconPath, IconPause, IconPayment, IconPending, IconPicture, IconPlus, IconProject, IconQuote, IconRadioOff, IconRadioOn, IconRedo, IconRefresh, IconRegistry, IconSave, IconSearch, IconSecurity, IconSend, IconServer, IconSetProvider, IconSettings, IconShare, IconShow, IconSorting, IconSsh, IconSshKey, IconSshSftp, IconStack, IconStar, IconStarFilled, IconStart, IconStrikeThrough, IconSubdomain, IconSucceeded, IconSuccess, IconSupport, IconTerminate, IconTicket, IconTime, IconUnavailable, IconUndo, IconUnorderedList, IconUpload, IconUser, IconVhost, IconView, IconVolume, IconWarning, IllustratedMessage, Image, ImageCropper, Initials, InlineCode, IntlProvider, Kbd, Label, LabeledValue, LayoutCard, Legend, LegendItem, LightBox, LightBoxGallery, LightBoxGalleryItem, LightBoxTrigger, Line, Link, List, ListFilter, ListItem, ListItemView, ListItemViewContent, ListLoaderAsync, ListSorting, ListStaticData, ListSummary, LoadingSpinner, Markdown, MarkdownEditor, MenuItem, MenuTrigger, Message, MessageSeparator, MessageThread, Modal, ModalTrigger, Navigation, NavigationGroup, Notification, NotificationController, NotificationProvider, NumberField, Option, Overlay, OverlayContent, OverlayController, OverlayTrigger, PasswordCreationField, Popover, PopoverContent, PopoverTrigger, ProgressBar, PropsContextProvider, Radio, RadioButton, RadioGroup, RangeCalendar, Rating, RatingSegment, Render, RouterProvider, SearchField, Section, Segment, SegmentedControl, Select, Separator, SettingsProvider, Skeleton, SkeletonText, Slider, SortingFunctions, SuspenseTrigger, Switch, Tab, TabNavigation, TabTitle, Table, TableBody, TableCell, TableColumn, TableFooterRow, TableHeader, TableRow, Tabs, Text, TextArea, TextField, ThemedHtml, TimeField, Tooltip, TooltipTrigger, TranslationProvider, Truncate, TunnelEntry, TypedArea, TypedBar, TypedChartGrid, TypedChartLegend, TypedChartTooltip, TypedLine, TypedList, TypedListFilter, TypedListItem, TypedListLoaderAsync, TypedListSorting, TypedListStaticData, TypedXAxis, TypedYAxis, Wrap, XAxis, YAxis, abortAction, builtInComponentDefaults, dynamic, eventHandlerContext, flags, getRemoteEvent, getResolvedTheme, getTheme, iconCategories, isDateRangeValue, overlayTriggersTunneledTo, propsContext, setTheme, sortByDachFirst, themeHtmlAttribute, typedCartesianChart, typedList, useAriaAnnounceSuspense, useComponentDefaults, useControlledRemoteValueProps, useDesignTokens, useIsMounted, useLanguage, useList, useListMetadata, useLocalizedStringFormatter, useModalController, useNotificationController, useOnChange, useOverlayController, useProps, useTheme as useStoredTheme, useResolvedTheme as useTheme, useTranslationProvider, useWarnDeprecation };
@@ -6,8 +6,9 @@ import { PropsContextProvider } from "./packages/components/src/lib/propsContext
6
6
  import { ComponentUsageProvider, ViewCompositionReset, markViewComponents, useReportComponentUsage } from "./packages/components/src/components/ComponentUsageProvider/ComponentUsageProvider.mjs";
7
7
  import { flowComponent } from "./packages/components/src/lib/componentFactory/flowComponent.mjs";
8
8
  import dynamic from "./packages/components/src/lib/propsContext/dynamicProps/dynamic.mjs";
9
+ import overlayTriggersTunneledTo from "./packages/components/src/lib/propsContext/overlayTriggerTunnel.mjs";
9
10
  import { alphaColors, isAlphaColor, statusTypes } from "./packages/components/src/lib/types/props.mjs";
10
11
  import { ControlledNotification } from "./packages/components/src/components/NotificationProvider/ControlledNotification.mjs";
11
12
  import { ViewComponentContextProvider } from "./packages/components/src/lib/viewComponentContext/ViewComponentContextProvider.mjs";
12
13
  import { flowComponentStatus, getFlowComponentStatus } from "./packages/components/src/status/componentStatus.mjs";
13
- export { ComponentUsageProvider, ControlledNotification, PropsContextProvider, ViewComponentContextProvider, ViewCompositionReset, alphaColors, dynamic, flowComponent, flowComponentStatus, getFlowComponentStatus, isAlphaColor, isFlowComponentName, markViewComponents, propsContext, statusTypes, useReportComponentUsage };
14
+ export { ComponentUsageProvider, ControlledNotification, PropsContextProvider, ViewComponentContextProvider, ViewCompositionReset, alphaColors, dynamic, flowComponent, flowComponentStatus, getFlowComponentStatus, isAlphaColor, isFlowComponentName, markViewComponents, overlayTriggersTunneledTo, propsContext, statusTypes, useReportComponentUsage };
@@ -2,6 +2,7 @@
2
2
  /* */
3
3
  import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
4
4
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
+ import overlayTriggersTunneledTo from "../../lib/propsContext/overlayTriggerTunnel.mjs";
5
6
  import { useLocalizedStringFormatter } from "../TranslationProvider/useLocalizedStringFormatter.mjs";
6
7
  import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExit.mjs";
7
8
  import Label_module_default from "./Label.module.mjs";
@@ -20,30 +21,27 @@ var Label = flowComponent("Label", (props) => {
20
21
  className: Label_module_default.optional,
21
22
  children: stringFormatter.format("optional")
22
23
  });
23
- return /* @__PURE__ */ jsx(PropsContextProvider, {
24
- props: {
25
- ContextualHelpTrigger: {
26
- tunnel: {
27
- id: "contextualHelp",
28
- component: "Label"
29
- },
30
- Button: { tunnel: null }
31
- },
32
- Button: {
33
- tunnel: {
34
- id: "right",
35
- component: "Label"
36
- },
37
- size: "s"
38
- },
39
- Action: {
40
- tunnel: {
41
- id: "right",
42
- component: "Label"
43
- },
44
- Button: { tunnel: null }
45
- }
24
+ const rightTunnel = {
25
+ id: "right",
26
+ component: "Label"
27
+ };
28
+ const propsContext = {
29
+ ...overlayTriggersTunneledTo(rightTunnel),
30
+ ContextualHelpTrigger: { tunnel: {
31
+ id: "contextualHelp",
32
+ component: "Label"
33
+ } },
34
+ Button: {
35
+ tunnel: rightTunnel,
36
+ size: "s"
46
37
  },
38
+ Action: {
39
+ tunnel: rightTunnel,
40
+ Button: { tunnel: null }
41
+ }
42
+ };
43
+ return /* @__PURE__ */ jsx(PropsContextProvider, {
44
+ props: propsContext,
47
45
  children: /* @__PURE__ */ jsxs(Aria.Label, {
48
46
  ...rest,
49
47
  className: rootClassName,
@@ -1 +1 @@
1
- {"version":3,"file":"Label.mjs","names":[],"sources":["../../../../../../../src/components/Label/Label.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport styles from \"./Label.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface LabelProps\n extends\n PropsWithChildren<Omit<Aria.LabelProps, \"children\">>,\n FlowComponentProps<HTMLLabelElement> {\n /** Whether the label should show an \"optional\" indicator. */\n optional?: boolean;\n /** Whether the label should be displayed as disabled. */\n isDisabled?: boolean;\n /** @internal */\n unstyled?: boolean;\n}\n\n/** @flr-generate all */\nexport const Label = flowComponent(\"Label\", (props) => {\n const {\n children,\n className,\n optional,\n isDisabled,\n ref,\n unstyled = false,\n ...rest\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Label\");\n\n const rootClassName = unstyled\n ? className\n : clsx(styles.label, isDisabled && styles.disabled, className);\n\n const optionalMarker = (\n <span className={styles.optional}>\n {stringFormatter.format(\"optional\")}\n </span>\n );\n\n const propsContext: PropsContext = {\n ContextualHelpTrigger: {\n tunnel: {\n id: \"contextualHelp\",\n component: \"Label\",\n },\n Button: {\n tunnel: null,\n },\n },\n Button: {\n tunnel: {\n id: \"right\",\n component: \"Label\",\n },\n size: \"s\",\n },\n Action: {\n tunnel: {\n id: \"right\",\n component: \"Label\",\n },\n Button: {\n tunnel: null,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Aria.Label {...rest} className={rootClassName} ref={ref}>\n {children}\n {optional && optionalMarker}\n <UiComponentTunnelExit id=\"contextualHelp\" component=\"Label\">\n {(children) => {\n if (React.Children.count(children) >= 1) {\n return children;\n }\n\n return undefined;\n }}\n </UiComponentTunnelExit>\n <UiComponentTunnelExit id=\"right\" component=\"Label\">\n {(children) => {\n if (React.Children.count(children) >= 1) {\n return <div className={styles.right}>{children}</div>;\n }\n\n return undefined;\n }}\n </UiComponentTunnelExit>\n </Aria.Label>\n </PropsContextProvider>\n );\n});\n\nexport default Label;\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EACJ,UACA,WACA,UACA,YACA,KACA,WAAW,OACX,GAAG,SACD;CAEJ,MAAM,kBAAkB,4BAA4B,kBAAS,OAAO;CAEpE,MAAM,gBAAgB,WAClB,YACA,KAAK,qBAAO,OAAO,cAAc,qBAAO,UAAU,SAAS;CAE/D,MAAM,iBACJ,oBAAC,QAAD;EAAM,WAAW,qBAAO;EACrB,UAAA,gBAAgB,OAAO,UAAU;CAC9B,CAAA;CA+BR,OACE,oBAAC,sBAAD;EAAsB,OAAO;GA5B7B,uBAAuB;IACrB,QAAQ;KACN,IAAI;KACJ,WAAW;IACb;IACA,QAAQ,EACN,QAAQ,KACV;GACF;GACA,QAAQ;IACN,QAAQ;KACN,IAAI;KACJ,WAAW;IACb;IACA,MAAM;GACR;GACA,QAAQ;IACN,QAAQ;KACN,IAAI;KACJ,WAAW;IACb;IACA,QAAQ,EACN,QAAQ,KACV;GACF;EAI6B;EAC3B,UAAA,qBAAC,KAAK,OAAN;GAAY,GAAI;GAAM,WAAW;GAAoB;GAArD,UAAA;IACG;IACA,YAAY;IACb,oBAAC,uBAAD;KAAuB,IAAG;KAAiB,WAAU;KACjD,WAAA,aAAa;MACb,IAAI,MAAM,SAAS,MAAM,QAAQ,KAAK,GACpC,OAAO;KAIX;IACqB,CAAA;IACvB,oBAAC,uBAAD;KAAuB,IAAG;KAAQ,WAAU;KACxC,WAAA,aAAa;MACb,IAAI,MAAM,SAAS,MAAM,QAAQ,KAAK,GACpC,OAAO,oBAAC,OAAD;OAAK,WAAW,qBAAO;OAAQ;MAAc,CAAA;KAIxD;IACqB,CAAA;GACb;;CACQ,CAAA;AAE1B,CAAC"}
1
+ {"version":3,"file":"Label.mjs","names":[],"sources":["../../../../../../../src/components/Label/Label.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport styles from \"./Label.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport {\n overlayTriggersTunneledTo,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface LabelProps\n extends\n PropsWithChildren<Omit<Aria.LabelProps, \"children\">>,\n FlowComponentProps<HTMLLabelElement> {\n /** Whether the label should show an \"optional\" indicator. */\n optional?: boolean;\n /** Whether the label should be displayed as disabled. */\n isDisabled?: boolean;\n /** @internal */\n unstyled?: boolean;\n}\n\n/** @flr-generate all */\nexport const Label = flowComponent(\"Label\", (props) => {\n const {\n children,\n className,\n optional,\n isDisabled,\n ref,\n unstyled = false,\n ...rest\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Label\");\n\n const rootClassName = unstyled\n ? className\n : clsx(styles.label, isDisabled && styles.disabled, className);\n\n const optionalMarker = (\n <span className={styles.optional}>\n {stringFormatter.format(\"optional\")}\n </span>\n );\n\n const rightTunnel = {\n id: \"right\",\n component: \"Label\",\n } as const;\n\n const propsContext: PropsContext = {\n ...overlayTriggersTunneledTo(rightTunnel),\n // The contextual help sits next to the label text, not with the actions.\n ContextualHelpTrigger: {\n tunnel: {\n id: \"contextualHelp\",\n component: \"Label\",\n },\n },\n Button: {\n tunnel: rightTunnel,\n size: \"s\",\n },\n Action: {\n tunnel: rightTunnel,\n Button: {\n tunnel: null,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Aria.Label {...rest} className={rootClassName} ref={ref}>\n {children}\n {optional && optionalMarker}\n <UiComponentTunnelExit id=\"contextualHelp\" component=\"Label\">\n {(children) => {\n if (React.Children.count(children) >= 1) {\n return children;\n }\n\n return undefined;\n }}\n </UiComponentTunnelExit>\n <UiComponentTunnelExit id=\"right\" component=\"Label\">\n {(children) => {\n if (React.Children.count(children) >= 1) {\n return <div className={styles.right}>{children}</div>;\n }\n\n return undefined;\n }}\n </UiComponentTunnelExit>\n </Aria.Label>\n </PropsContextProvider>\n );\n});\n\nexport default Label;\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EACJ,UACA,WACA,UACA,YACA,KACA,WAAW,OACX,GAAG,SACD;CAEJ,MAAM,kBAAkB,4BAA4B,kBAAS,OAAO;CAEpE,MAAM,gBAAgB,WAClB,YACA,KAAK,qBAAO,OAAO,cAAc,qBAAO,UAAU,SAAS;CAE/D,MAAM,iBACJ,oBAAC,QAAD;EAAM,WAAW,qBAAO;EACrB,UAAA,gBAAgB,OAAO,UAAU;CAC9B,CAAA;CAGR,MAAM,cAAc;EAClB,IAAI;EACJ,WAAW;CACb;CAEA,MAAM,eAA6B;EACjC,GAAG,0BAA0B,WAAW;EAExC,uBAAuB,EACrB,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,QAAQ;GACN,QAAQ;GACR,MAAM;EACR;EACA,QAAQ;GACN,QAAQ;GACR,QAAQ,EACN,QAAQ,KACV;EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,KAAK,OAAN;GAAY,GAAI;GAAM,WAAW;GAAoB;GAArD,UAAA;IACG;IACA,YAAY;IACb,oBAAC,uBAAD;KAAuB,IAAG;KAAiB,WAAU;KACjD,WAAA,aAAa;MACb,IAAI,MAAM,SAAS,MAAM,QAAQ,KAAK,GACpC,OAAO;KAIX;IACqB,CAAA;IACvB,oBAAC,uBAAD;KAAuB,IAAG;KAAQ,WAAU;KACxC,WAAA,aAAa;MACb,IAAI,MAAM,SAAS,MAAM,QAAQ,KAAK,GACpC,OAAO,oBAAC,OAAD;OAAK,WAAW,qBAAO;OAAQ;MAAc,CAAA;KAIxD;IACqB,CAAA;GACb;;CACQ,CAAA;AAE1B,CAAC"}
@@ -3,6 +3,7 @@
3
3
  import { PropsContextProvider } from "../../../../lib/propsContext/components/PropsContextProvider.mjs";
4
4
  import { flowComponent } from "../../../../lib/componentFactory/flowComponent.mjs";
5
5
  import dynamic from "../../../../lib/propsContext/dynamicProps/dynamic.mjs";
6
+ import overlayTriggersTunneledTo from "../../../../lib/propsContext/overlayTriggerTunnel.mjs";
6
7
  import { UiComponentTunnelExit } from "../../../UiComponentTunnel/UiComponentTunnelExit.mjs";
7
8
  import { OptionsButton } from "../Items/components/Item/components/OptionsButton/OptionsButton.mjs";
8
9
  import ListItemView_module_default from "./ListItemView.module.mjs";
@@ -13,27 +14,23 @@ import { jsx } from "react/jsx-runtime";
13
14
  var ListItemView = flowComponent("ListItemView", (props) => {
14
15
  const { children, s, m, l } = props;
15
16
  const list = useList();
17
+ const buttonTunnel = {
18
+ id: "button",
19
+ component: "ListItemView"
20
+ };
16
21
  const propsContext = {
22
+ ...overlayTriggersTunneledTo(buttonTunnel),
17
23
  ContextMenu: {
18
- tunnel: {
19
- id: "button",
20
- component: "ListItemView"
21
- },
24
+ tunnel: buttonTunnel,
22
25
  placement: "bottom right",
23
26
  wrapWith: /* @__PURE__ */ jsx(OptionsButton, { className: ListItemView_module_default.action })
24
27
  },
25
28
  Button: {
26
- tunnel: {
27
- id: "button",
28
- component: "ListItemView"
29
- },
29
+ tunnel: buttonTunnel,
30
30
  size: dynamic(() => useList().viewMode.isTiles ? "s" : "m")
31
31
  },
32
32
  ActionGroup: {
33
- tunnel: {
34
- id: "button",
35
- component: "ListItemView"
36
- },
33
+ tunnel: buttonTunnel,
37
34
  Button: { tunnel: null }
38
35
  },
39
36
  Avatar: { tunnel: {
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemView.mjs","names":[],"sources":["../../../../../../../../../src/components/List/components/ListItemView/ListItemView.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ListItemView.module.scss\";\nimport ListItemViewContentView from \"@/views/ListItemViewContentView\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { OptionsButton } from \"@/components/List/components/Items/components/Item/components/OptionsButton\";\nimport { useList } from \"@/components/List\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport type ListItemViewProps = PropsWithChildren &\n Pick<ColumnLayoutProps, \"s\" | \"m\" | \"l\">;\n\nexport const ListItemView = flowComponent(\n \"ListItemView\",\n (props: ListItemViewProps) => {\n const { children, s, m, l } = props;\n const list = useList();\n\n const propsContext: PropsContext = {\n ContextMenu: {\n tunnel: {\n id: \"button\",\n component: \"ListItemView\",\n },\n placement: \"bottom right\",\n wrapWith: <OptionsButton className={styles.action} />,\n },\n Button: {\n tunnel: {\n id: \"button\",\n component: \"ListItemView\",\n },\n size: dynamic(() => (useList().viewMode.isTiles ? \"s\" : \"m\")),\n },\n ActionGroup: {\n tunnel: {\n id: \"button\",\n component: \"ListItemView\",\n },\n Button: {\n tunnel: null,\n },\n },\n Avatar: {\n tunnel: {\n id: \"avatar\",\n component: \"ListItemView\",\n },\n },\n Heading: {\n tunnel: {\n id: \"title\",\n component: \"ListItemView\",\n },\n },\n Text: {\n tunnel: {\n id: \"text\",\n component: \"ListItemView\",\n },\n },\n Content: {\n tunnel: dynamic((p) =>\n p.slot === \"bottom\"\n ? {\n id: \"bottom\",\n component: \"ListItemView\",\n }\n : undefined,\n ),\n },\n Checkbox: {\n tunnel: {\n id: \"checkbox\",\n component: \"ListItemView\",\n },\n },\n };\n\n return (\n <ListItemViewContentView\n viewMode={list.viewMode.value}\n title={<UiComponentTunnelExit id=\"title\" component=\"ListItemView\" />}\n avatar={<UiComponentTunnelExit id=\"avatar\" component=\"ListItemView\" />}\n button={<UiComponentTunnelExit id=\"button\" component=\"ListItemView\" />}\n subTitle={<UiComponentTunnelExit id=\"text\" component=\"ListItemView\" />}\n bottom={<UiComponentTunnelExit id=\"bottom\" component=\"ListItemView\" />}\n checkbox={\n <UiComponentTunnelExit id=\"checkbox\" component=\"ListItemView\" />\n }\n s={s}\n m={m}\n l={l}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ListItemViewContentView>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ListItemView;\n"],"mappings":";;;;;;;;;;;;AAiBA,IAAa,eAAe,cAC1B,iBACC,UAA6B;CAC5B,MAAM,EAAE,UAAU,GAAG,GAAG,MAAM;CAC9B,MAAM,OAAO,QAAQ;CAErB,MAAM,eAA6B;EACjC,aAAa;GACX,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,WAAW;GACX,UAAU,oBAAC,eAAD,EAAe,WAAW,4BAAO,OAAS,CAAA;EACtD;EACA,QAAQ;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM,cAAe,QAAQ,CAAC,CAAC,SAAS,UAAU,MAAM,GAAI;EAC9D;EACA,aAAa;GACX,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,QAAQ,EACN,QAAQ,KACV;EACF;EACA,QAAQ,EACN,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,SAAS,EACP,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,MAAM,EACJ,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,SAAS,EACP,QAAQ,SAAS,MACf,EAAE,SAAS,WACP;GACE,IAAI;GACJ,WAAW;EACb,IACA,KAAA,CACN,EACF;EACA,UAAU,EACR,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;CACF;CAEA,OACE,oBAAC,yBAAD;EACE,UAAU,KAAK,SAAS;EACxB,OAAO,oBAAC,uBAAD;GAAuB,IAAG;GAAQ,WAAU;EAAgB,CAAA;EACnE,QAAQ,oBAAC,uBAAD;GAAuB,IAAG;GAAS,WAAU;EAAgB,CAAA;EACrE,QAAQ,oBAAC,uBAAD;GAAuB,IAAG;GAAS,WAAU;EAAgB,CAAA;EACrE,UAAU,oBAAC,uBAAD;GAAuB,IAAG;GAAO,WAAU;EAAgB,CAAA;EACrE,QAAQ,oBAAC,uBAAD;GAAuB,IAAG;GAAS,WAAU;EAAgB,CAAA;EACrE,UACE,oBAAC,uBAAD;GAAuB,IAAG;GAAW,WAAU;EAAgB,CAAA;EAE9D;EACA;EACA;EAEH,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACC,CAAA;AAE7B,GACA,EACE,MAAM,SACR,CACF"}
1
+ {"version":3,"file":"ListItemView.mjs","names":[],"sources":["../../../../../../../../../src/components/List/components/ListItemView/ListItemView.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ListItemView.module.scss\";\nimport ListItemViewContentView from \"@/views/ListItemViewContentView\";\nimport {\n dynamic,\n overlayTriggersTunneledTo,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { OptionsButton } from \"@/components/List/components/Items/components/Item/components/OptionsButton\";\nimport { useList } from \"@/components/List\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport type ListItemViewProps = PropsWithChildren &\n Pick<ColumnLayoutProps, \"s\" | \"m\" | \"l\">;\n\nexport const ListItemView = flowComponent(\n \"ListItemView\",\n (props: ListItemViewProps) => {\n const { children, s, m, l } = props;\n const list = useList();\n\n const buttonTunnel = {\n id: \"button\",\n component: \"ListItemView\",\n } as const;\n\n const propsContext: PropsContext = {\n ...overlayTriggersTunneledTo(buttonTunnel),\n ContextMenu: {\n tunnel: buttonTunnel,\n placement: \"bottom right\",\n wrapWith: <OptionsButton className={styles.action} />,\n },\n Button: {\n tunnel: buttonTunnel,\n size: dynamic(() => (useList().viewMode.isTiles ? \"s\" : \"m\")),\n },\n ActionGroup: {\n tunnel: buttonTunnel,\n Button: {\n tunnel: null,\n },\n },\n Avatar: {\n tunnel: {\n id: \"avatar\",\n component: \"ListItemView\",\n },\n },\n Heading: {\n tunnel: {\n id: \"title\",\n component: \"ListItemView\",\n },\n },\n Text: {\n tunnel: {\n id: \"text\",\n component: \"ListItemView\",\n },\n },\n Content: {\n tunnel: dynamic((p) =>\n p.slot === \"bottom\"\n ? {\n id: \"bottom\",\n component: \"ListItemView\",\n }\n : undefined,\n ),\n },\n Checkbox: {\n tunnel: {\n id: \"checkbox\",\n component: \"ListItemView\",\n },\n },\n };\n\n return (\n <ListItemViewContentView\n viewMode={list.viewMode.value}\n title={<UiComponentTunnelExit id=\"title\" component=\"ListItemView\" />}\n avatar={<UiComponentTunnelExit id=\"avatar\" component=\"ListItemView\" />}\n button={<UiComponentTunnelExit id=\"button\" component=\"ListItemView\" />}\n subTitle={<UiComponentTunnelExit id=\"text\" component=\"ListItemView\" />}\n bottom={<UiComponentTunnelExit id=\"bottom\" component=\"ListItemView\" />}\n checkbox={\n <UiComponentTunnelExit id=\"checkbox\" component=\"ListItemView\" />\n }\n s={s}\n m={m}\n l={l}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </ListItemViewContentView>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ListItemView;\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAa,eAAe,cAC1B,iBACC,UAA6B;CAC5B,MAAM,EAAE,UAAU,GAAG,GAAG,MAAM;CAC9B,MAAM,OAAO,QAAQ;CAErB,MAAM,eAAe;EACnB,IAAI;EACJ,WAAW;CACb;CAEA,MAAM,eAA6B;EACjC,GAAG,0BAA0B,YAAY;EACzC,aAAa;GACX,QAAQ;GACR,WAAW;GACX,UAAU,oBAAC,eAAD,EAAe,WAAW,4BAAO,OAAS,CAAA;EACtD;EACA,QAAQ;GACN,QAAQ;GACR,MAAM,cAAe,QAAQ,CAAC,CAAC,SAAS,UAAU,MAAM,GAAI;EAC9D;EACA,aAAa;GACX,QAAQ;GACR,QAAQ,EACN,QAAQ,KACV;EACF;EACA,QAAQ,EACN,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,SAAS,EACP,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,MAAM,EACJ,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,SAAS,EACP,QAAQ,SAAS,MACf,EAAE,SAAS,WACP;GACE,IAAI;GACJ,WAAW;EACb,IACA,KAAA,CACN,EACF;EACA,UAAU,EACR,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;CACF;CAEA,OACE,oBAAC,yBAAD;EACE,UAAU,KAAK,SAAS;EACxB,OAAO,oBAAC,uBAAD;GAAuB,IAAG;GAAQ,WAAU;EAAgB,CAAA;EACnE,QAAQ,oBAAC,uBAAD;GAAuB,IAAG;GAAS,WAAU;EAAgB,CAAA;EACrE,QAAQ,oBAAC,uBAAD;GAAuB,IAAG;GAAS,WAAU;EAAgB,CAAA;EACrE,UAAU,oBAAC,uBAAD;GAAuB,IAAG;GAAO,WAAU;EAAgB,CAAA;EACrE,QAAQ,oBAAC,uBAAD;GAAuB,IAAG;GAAS,WAAU;EAAgB,CAAA;EACrE,UACE,oBAAC,uBAAD;GAAuB,IAAG;GAAW,WAAU;EAAgB,CAAA;EAE9D;EACA;EACA;EAEH,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACC,CAAA;AAE7B,GACA,EACE,MAAM,SACR,CACF"}
@@ -2,6 +2,7 @@
2
2
  /* */
3
3
  import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
4
4
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
+ import overlayTriggersTunneledTo from "../../lib/propsContext/overlayTriggerTunnel.mjs";
5
6
  import { useControlledHostValueProps } from "../../lib/remote/useControlledHostValueProps.mjs";
6
7
  import { Markdown } from "../Markdown/Markdown.mjs";
7
8
  import MarkdownEditor_module_default from "./MarkdownEditor.module.mjs";
@@ -26,24 +27,13 @@ var MarkdownEditor = flowComponent("MarkdownEditor", (props) => {
26
27
  const toolbarActionsDisabled = isDisabled || mode === "preview";
27
28
  const rootClassName = clsx(MarkdownEditor_module_default.markdownEditor, MarkdownEditor_module_default[`mode-${mode}`], className);
28
29
  const toolbarActionsPropsContext = {
30
+ ...overlayTriggersTunneledTo(toolbarActionsTunnel),
29
31
  Button: {
30
32
  tunnel: toolbarActionsTunnel,
31
33
  size: "s",
32
34
  variant: "plain",
33
35
  color: "dark",
34
36
  isDisabled: toolbarActionsDisabled
35
- },
36
- ContextMenuTrigger: {
37
- tunnel: toolbarActionsTunnel,
38
- Button: { tunnel: null }
39
- },
40
- ModalTrigger: {
41
- tunnel: toolbarActionsTunnel,
42
- Button: { tunnel: null }
43
- },
44
- PopoverTrigger: {
45
- tunnel: toolbarActionsTunnel,
46
- Button: { tunnel: null }
47
37
  }
48
38
  };
49
39
  const handleKeyDown = (event) => {
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownEditor.mjs","names":[],"sources":["../../../../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"sourcesContent":["import { type ComponentType, type KeyboardEventHandler, useState } from \"react\";\nimport styles from \"./MarkdownEditor.module.scss\";\nimport {\n Markdown as DefaultMarkdown,\n type MarkdownProps,\n} from \"@/components/Markdown\";\nimport { TextArea, type TextAreaProps } from \"@/components/TextArea\";\nimport { Toolbar } from \"@/components/MarkdownEditor/components/Toolbar\";\nimport clsx from \"clsx\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport {\n modifyValueByMarkdownSyntax,\n scrollToCursor,\n} from \"@/components/MarkdownEditor/lib/modifyValueByMarkdownSyntax\";\nimport {\n type InsertType,\n modifyValueByType,\n} from \"@/components/MarkdownEditor/lib/modifyValueByType\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport type MarkdownEditorMode = \"editor\" | \"preview\";\n\nconst toolbarActionsTunnel = {\n id: \"toolbarActions\",\n component: \"MarkdownEditor\",\n} as const;\n\nexport interface MarkdownEditorProps\n extends TextAreaProps, Pick<MarkdownProps, \"headingOffset\"> {\n /**\n * Allows replacing the markdown preview renderer implementation. Defaults to\n * the internal `Markdown` component.\n */\n markdownComponent?: ComponentType<MarkdownProps>;\n}\n\n/** @flr-generate all */\nexport const MarkdownEditor = flowComponent(\"MarkdownEditor\", (props) => {\n const {\n isDisabled,\n isReadOnly,\n children,\n className,\n rows = 5,\n autoResizeMaxRows,\n headingOffset,\n markdownComponent: MarkdownComponent = DefaultMarkdown,\n value,\n onChange,\n ref,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const inputRef = useObjectRef(ref);\n const [mode, setMode] = useState<MarkdownEditorMode>(\"editor\");\n const toolbarActionsDisabled = isDisabled || mode === \"preview\";\n\n const rootClassName = clsx(\n styles.markdownEditor,\n styles[`mode-${mode}`],\n className,\n );\n\n const toolbarActionsPropsContext: PropsContext = {\n Button: {\n tunnel: toolbarActionsTunnel,\n size: \"s\",\n variant: \"plain\",\n color: \"dark\",\n isDisabled: toolbarActionsDisabled,\n },\n ContextMenuTrigger: {\n tunnel: toolbarActionsTunnel,\n Button: { tunnel: null },\n },\n ModalTrigger: {\n tunnel: toolbarActionsTunnel,\n Button: { tunnel: null },\n },\n PopoverTrigger: {\n tunnel: toolbarActionsTunnel,\n Button: { tunnel: null },\n },\n };\n\n const handleKeyDown: KeyboardEventHandler = (event) => {\n if (event.key !== \"Enter\") {\n return;\n }\n\n const modifyParams = modifyValueByMarkdownSyntax(value, inputRef);\n if (!modifyParams) {\n return;\n }\n\n const { newValue, newSelectionStart, newSelectionEnd } = modifyParams;\n\n requestAnimationFrame(() => {\n if (inputRef.current) {\n inputRef.current.value = newValue;\n inputRef.current?.setSelectionRange(newSelectionStart, newSelectionEnd);\n scrollToCursor(newValue, inputRef.current);\n }\n });\n\n event.preventDefault();\n onChange(newValue);\n };\n\n const handleToolButtonPressed = (type: InsertType) => {\n const { newValue, newSelectionStart, newSelectionEnd } = modifyValueByType(\n value,\n type,\n inputRef,\n );\n\n requestAnimationFrame(() => {\n if (inputRef.current) {\n inputRef.current.value = newValue;\n inputRef.current.setSelectionRange(newSelectionStart, newSelectionEnd);\n inputRef.current.focus();\n }\n });\n\n onChange(newValue);\n };\n\n return (\n <div className={rootClassName}>\n <TextArea\n {...rest}\n aria-hidden={mode === \"preview\"}\n isReadOnly={isReadOnly || mode === \"preview\"}\n isDisabled={isDisabled}\n ref={inputRef}\n value={value}\n rows={rows}\n autoResizeMaxRows={autoResizeMaxRows}\n onChange={onChange}\n onKeyDown={handleKeyDown}\n >\n <PropsContextProvider\n props={toolbarActionsPropsContext}\n dependencies={[toolbarActionsDisabled]}\n >\n {children}\n {mode === \"preview\" && (\n <MarkdownComponent\n headingOffset={headingOffset}\n className={styles.markdown}\n style={{\n height: inputRef.current?.offsetHeight,\n }}\n >\n {value}\n </MarkdownComponent>\n )}\n <Toolbar\n currentMode={mode}\n isDisabled={isDisabled}\n onModeChange={setMode}\n onToolPressed={handleToolButtonPressed}\n />\n </PropsContextProvider>\n </TextArea>\n </div>\n );\n});\n\nexport default MarkdownEditor;\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,IAAM,uBAAuB;CAC3B,IAAI;CACJ,WAAW;AACb;;AAYA,IAAa,iBAAiB,cAAc,mBAAmB,UAAU;CACvE,MAAM,EACJ,YACA,YACA,UACA,WACA,OAAO,GACP,mBACA,eACA,mBAAmB,oBAAoB,UACvC,OACA,UACA,KACA,GAAG,SACD,4BAA4B,OAAO,EAAE;CAEzC,MAAM,WAAW,aAAa,GAAG;CACjC,MAAM,CAAC,MAAM,WAAW,SAA6B,QAAQ;CAC7D,MAAM,yBAAyB,cAAc,SAAS;CAEtD,MAAM,gBAAgB,KACpB,8BAAO,gBACP,8BAAO,QAAQ,SACf,SACF;CAEA,MAAM,6BAA2C;EAC/C,QAAQ;GACN,QAAQ;GACR,MAAM;GACN,SAAS;GACT,OAAO;GACP,YAAY;EACd;EACA,oBAAoB;GAClB,QAAQ;GACR,QAAQ,EAAE,QAAQ,KAAK;EACzB;EACA,cAAc;GACZ,QAAQ;GACR,QAAQ,EAAE,QAAQ,KAAK;EACzB;EACA,gBAAgB;GACd,QAAQ;GACR,QAAQ,EAAE,QAAQ,KAAK;EACzB;CACF;CAEA,MAAM,iBAAuC,UAAU;EACrD,IAAI,MAAM,QAAQ,SAChB;EAGF,MAAM,eAAe,4BAA4B,OAAO,QAAQ;EAChE,IAAI,CAAC,cACH;EAGF,MAAM,EAAE,UAAU,mBAAmB,oBAAoB;EAEzD,4BAA4B;GAC1B,IAAI,SAAS,SAAS;IACpB,SAAS,QAAQ,QAAQ;IACzB,SAAS,SAAS,kBAAkB,mBAAmB,eAAe;IACtE,eAAe,UAAU,SAAS,OAAO;GAC3C;EACF,CAAC;EAED,MAAM,eAAe;EACrB,SAAS,QAAQ;CACnB;CAEA,MAAM,2BAA2B,SAAqB;EACpD,MAAM,EAAE,UAAU,mBAAmB,oBAAoB,kBACvD,OACA,MACA,QACF;EAEA,4BAA4B;GAC1B,IAAI,SAAS,SAAS;IACpB,SAAS,QAAQ,QAAQ;IACzB,SAAS,QAAQ,kBAAkB,mBAAmB,eAAe;IACrE,SAAS,QAAQ,MAAM;GACzB;EACF,CAAC;EAED,SAAS,QAAQ;CACnB;CAEA,OACE,oBAAC,OAAD;EAAK,WAAW;EACd,UAAA,oBAAC,UAAD;GACE,GAAI;GACJ,eAAa,SAAS;GACtB,YAAY,cAAc,SAAS;GACvB;GACZ,KAAK;GACE;GACD;GACa;GACT;GACV,WAAW;GAEX,UAAA,qBAAC,sBAAD;IACE,OAAO;IACP,cAAc,CAAC,sBAAsB;IAFvC,UAAA;KAIG;KACA,SAAS,aACR,oBAAC,mBAAD;MACiB;MACf,WAAW,8BAAO;MAClB,OAAO,EACL,QAAQ,SAAS,SAAS,aAC5B;MAEC,UAAA;KACgB,CAAA;KAErB,oBAAC,SAAD;MACE,aAAa;MACD;MACZ,cAAc;MACd,eAAe;KAChB,CAAA;IACmB;;EACd,CAAA;CACP,CAAA;AAET,CAAC"}
1
+ {"version":3,"file":"MarkdownEditor.mjs","names":[],"sources":["../../../../../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"sourcesContent":["import { type ComponentType, type KeyboardEventHandler, useState } from \"react\";\nimport styles from \"./MarkdownEditor.module.scss\";\nimport {\n Markdown as DefaultMarkdown,\n type MarkdownProps,\n} from \"@/components/Markdown\";\nimport { TextArea, type TextAreaProps } from \"@/components/TextArea\";\nimport { Toolbar } from \"@/components/MarkdownEditor/components/Toolbar\";\nimport clsx from \"clsx\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport {\n modifyValueByMarkdownSyntax,\n scrollToCursor,\n} from \"@/components/MarkdownEditor/lib/modifyValueByMarkdownSyntax\";\nimport {\n type InsertType,\n modifyValueByType,\n} from \"@/components/MarkdownEditor/lib/modifyValueByType\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport {\n overlayTriggersTunneledTo,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\n\nexport type MarkdownEditorMode = \"editor\" | \"preview\";\n\nconst toolbarActionsTunnel = {\n id: \"toolbarActions\",\n component: \"MarkdownEditor\",\n} as const;\n\nexport interface MarkdownEditorProps\n extends TextAreaProps, Pick<MarkdownProps, \"headingOffset\"> {\n /**\n * Allows replacing the markdown preview renderer implementation. Defaults to\n * the internal `Markdown` component.\n */\n markdownComponent?: ComponentType<MarkdownProps>;\n}\n\n/** @flr-generate all */\nexport const MarkdownEditor = flowComponent(\"MarkdownEditor\", (props) => {\n const {\n isDisabled,\n isReadOnly,\n children,\n className,\n rows = 5,\n autoResizeMaxRows,\n headingOffset,\n markdownComponent: MarkdownComponent = DefaultMarkdown,\n value,\n onChange,\n ref,\n ...rest\n } = useControlledHostValueProps(props, \"\");\n\n const inputRef = useObjectRef(ref);\n const [mode, setMode] = useState<MarkdownEditorMode>(\"editor\");\n const toolbarActionsDisabled = isDisabled || mode === \"preview\";\n\n const rootClassName = clsx(\n styles.markdownEditor,\n styles[`mode-${mode}`],\n className,\n );\n\n const toolbarActionsPropsContext: PropsContext = {\n ...overlayTriggersTunneledTo(toolbarActionsTunnel),\n Button: {\n tunnel: toolbarActionsTunnel,\n size: \"s\",\n variant: \"plain\",\n color: \"dark\",\n isDisabled: toolbarActionsDisabled,\n },\n };\n\n const handleKeyDown: KeyboardEventHandler = (event) => {\n if (event.key !== \"Enter\") {\n return;\n }\n\n const modifyParams = modifyValueByMarkdownSyntax(value, inputRef);\n if (!modifyParams) {\n return;\n }\n\n const { newValue, newSelectionStart, newSelectionEnd } = modifyParams;\n\n requestAnimationFrame(() => {\n if (inputRef.current) {\n inputRef.current.value = newValue;\n inputRef.current?.setSelectionRange(newSelectionStart, newSelectionEnd);\n scrollToCursor(newValue, inputRef.current);\n }\n });\n\n event.preventDefault();\n onChange(newValue);\n };\n\n const handleToolButtonPressed = (type: InsertType) => {\n const { newValue, newSelectionStart, newSelectionEnd } = modifyValueByType(\n value,\n type,\n inputRef,\n );\n\n requestAnimationFrame(() => {\n if (inputRef.current) {\n inputRef.current.value = newValue;\n inputRef.current.setSelectionRange(newSelectionStart, newSelectionEnd);\n inputRef.current.focus();\n }\n });\n\n onChange(newValue);\n };\n\n return (\n <div className={rootClassName}>\n <TextArea\n {...rest}\n aria-hidden={mode === \"preview\"}\n isReadOnly={isReadOnly || mode === \"preview\"}\n isDisabled={isDisabled}\n ref={inputRef}\n value={value}\n rows={rows}\n autoResizeMaxRows={autoResizeMaxRows}\n onChange={onChange}\n onKeyDown={handleKeyDown}\n >\n <PropsContextProvider\n props={toolbarActionsPropsContext}\n dependencies={[toolbarActionsDisabled]}\n >\n {children}\n {mode === \"preview\" && (\n <MarkdownComponent\n headingOffset={headingOffset}\n className={styles.markdown}\n style={{\n height: inputRef.current?.offsetHeight,\n }}\n >\n {value}\n </MarkdownComponent>\n )}\n <Toolbar\n currentMode={mode}\n isDisabled={isDisabled}\n onModeChange={setMode}\n onToolPressed={handleToolButtonPressed}\n />\n </PropsContextProvider>\n </TextArea>\n </div>\n );\n});\n\nexport default MarkdownEditor;\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,IAAM,uBAAuB;CAC3B,IAAI;CACJ,WAAW;AACb;;AAYA,IAAa,iBAAiB,cAAc,mBAAmB,UAAU;CACvE,MAAM,EACJ,YACA,YACA,UACA,WACA,OAAO,GACP,mBACA,eACA,mBAAmB,oBAAoB,UACvC,OACA,UACA,KACA,GAAG,SACD,4BAA4B,OAAO,EAAE;CAEzC,MAAM,WAAW,aAAa,GAAG;CACjC,MAAM,CAAC,MAAM,WAAW,SAA6B,QAAQ;CAC7D,MAAM,yBAAyB,cAAc,SAAS;CAEtD,MAAM,gBAAgB,KACpB,8BAAO,gBACP,8BAAO,QAAQ,SACf,SACF;CAEA,MAAM,6BAA2C;EAC/C,GAAG,0BAA0B,oBAAoB;EACjD,QAAQ;GACN,QAAQ;GACR,MAAM;GACN,SAAS;GACT,OAAO;GACP,YAAY;EACd;CACF;CAEA,MAAM,iBAAuC,UAAU;EACrD,IAAI,MAAM,QAAQ,SAChB;EAGF,MAAM,eAAe,4BAA4B,OAAO,QAAQ;EAChE,IAAI,CAAC,cACH;EAGF,MAAM,EAAE,UAAU,mBAAmB,oBAAoB;EAEzD,4BAA4B;GAC1B,IAAI,SAAS,SAAS;IACpB,SAAS,QAAQ,QAAQ;IACzB,SAAS,SAAS,kBAAkB,mBAAmB,eAAe;IACtE,eAAe,UAAU,SAAS,OAAO;GAC3C;EACF,CAAC;EAED,MAAM,eAAe;EACrB,SAAS,QAAQ;CACnB;CAEA,MAAM,2BAA2B,SAAqB;EACpD,MAAM,EAAE,UAAU,mBAAmB,oBAAoB,kBACvD,OACA,MACA,QACF;EAEA,4BAA4B;GAC1B,IAAI,SAAS,SAAS;IACpB,SAAS,QAAQ,QAAQ;IACzB,SAAS,QAAQ,kBAAkB,mBAAmB,eAAe;IACrE,SAAS,QAAQ,MAAM;GACzB;EACF,CAAC;EAED,SAAS,QAAQ;CACnB;CAEA,OACE,oBAAC,OAAD;EAAK,WAAW;EACd,UAAA,oBAAC,UAAD;GACE,GAAI;GACJ,eAAa,SAAS;GACtB,YAAY,cAAc,SAAS;GACvB;GACZ,KAAK;GACE;GACD;GACa;GACT;GACV,WAAW;GAEX,UAAA,qBAAC,sBAAD;IACE,OAAO;IACP,cAAc,CAAC,sBAAsB;IAFvC,UAAA;KAIG;KACA,SAAS,aACR,oBAAC,mBAAD;MACiB;MACf,WAAW,8BAAO;MAClB,OAAO,EACL,QAAQ,SAAS,SAAS,aAC5B;MAEC,UAAA;KACgB,CAAA;KAErB,oBAAC,SAAD;MACE,aAAa;MACD;MACZ,cAAc;MACd,eAAe;KAChB,CAAA;IACmB;;EACd,CAAA;CACP,CAAA;AAET,CAAC"}
@@ -15,11 +15,15 @@ var OverlayTrigger = (props) => {
15
15
  const isOpen = overlayController.useIsOpen();
16
16
  const isContentSuspended = overlayController.useIsContentSuspended();
17
17
  const isPending = useIsPendingWithWait(isContentSuspended);
18
- const propsContext = { Button: {
19
- onPress: overlayController.open,
20
- isPending,
21
- isDisabled: Boolean(buttonPropsContext?.isDisabled) || isContentSuspended
22
- } };
18
+ const propsContext = {
19
+ Button: {
20
+ onPress: overlayController.open,
21
+ isPending,
22
+ isDisabled: Boolean(buttonPropsContext?.isDisabled) || isContentSuspended,
23
+ tunnel: null
24
+ },
25
+ DialogTrigger: { tunnel: null }
26
+ };
23
27
  return /* @__PURE__ */ jsx(OverlayContextProvider, {
24
28
  type: overlayType,
25
29
  controller: overlayController,
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayTrigger.mjs","names":[],"sources":["../../../../../../../src/components/OverlayTrigger/OverlayTrigger.tsx"],"sourcesContent":["import type { ComponentType, FC, PropsWithChildren, ReactNode } from \"react\";\nimport { OverlayController } from \"@/lib/controller\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { useIsPendingWithWait } from \"@/components/Action/hooks/useIsPendingWithWait\";\n\ntype AriaComponentType = ComponentType<{\n isOpen?: boolean;\n children: ReactNode;\n}>;\n\nexport interface OverlayTriggerProps\n extends FlowComponentProps, PropsWithChildren {\n /** Whether the overlay should be open initially. */\n isDefaultOpen?: boolean;\n /** A controller to control the state of the overlay. */\n controller?: OverlayController;\n}\n\ninterface Props extends OverlayTriggerProps {\n overlayType: FlowComponentName;\n component: AriaComponentType;\n}\n\nexport const OverlayTrigger: FC<Props> = (props) => {\n const {\n overlayType,\n isDefaultOpen = false,\n component: AriaOverlayTrigger,\n children,\n controller: controllerFromProps,\n } = props;\n const buttonPropsContext = useComponentPropsContext(\"Button\");\n\n const newOverlayController = OverlayController.useNew({ isDefaultOpen });\n const overlayController = controllerFromProps ?? newOverlayController;\n const isOpen = overlayController.useIsOpen();\n const isContentSuspended = overlayController.useIsContentSuspended();\n const isPending = useIsPendingWithWait(isContentSuspended);\n\n const propsContext: PropsContext = {\n Button: {\n onPress: overlayController.open,\n isPending,\n isDisabled: Boolean(buttonPropsContext?.isDisabled) || isContentSuspended,\n },\n };\n\n return (\n <OverlayContextProvider type={overlayType} controller={overlayController}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isPending, overlayController]}\n >\n <AriaOverlayTrigger isOpen={isOpen}>{children}</AriaOverlayTrigger>\n </PropsContextProvider>\n </OverlayContextProvider>\n );\n};\n\nexport default OverlayTrigger;\n"],"mappings":";;;;;;;;;AA4BA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EACJ,aACA,gBAAgB,OAChB,WAAW,oBACX,UACA,YAAY,wBACV;CACJ,MAAM,qBAAqB,yBAAyB,QAAQ;CAE5D,MAAM,uBAAuB,kBAAkB,OAAO,EAAE,cAAc,CAAC;CACvE,MAAM,oBAAoB,uBAAuB;CACjD,MAAM,SAAS,kBAAkB,UAAU;CAC3C,MAAM,qBAAqB,kBAAkB,sBAAsB;CACnE,MAAM,YAAY,qBAAqB,kBAAkB;CAEzD,MAAM,eAA6B,EACjC,QAAQ;EACN,SAAS,kBAAkB;EAC3B;EACA,YAAY,QAAQ,oBAAoB,UAAU,KAAK;CACzD,EACF;CAEA,OACE,oBAAC,wBAAD;EAAwB,MAAM;EAAa,YAAY;EACrD,UAAA,oBAAC,sBAAD;GACE,OAAO;GACP,cAAc,CAAC,WAAW,iBAAiB;GAE3C,UAAA,oBAAC,oBAAD;IAA4B;IAAS;GAA6B,CAAA;EAC9C,CAAA;CACA,CAAA;AAE5B"}
1
+ {"version":3,"file":"OverlayTrigger.mjs","names":[],"sources":["../../../../../../../src/components/OverlayTrigger/OverlayTrigger.tsx"],"sourcesContent":["import type { ComponentType, FC, PropsWithChildren, ReactNode } from \"react\";\nimport { OverlayController } from \"@/lib/controller\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { useIsPendingWithWait } from \"@/components/Action/hooks/useIsPendingWithWait\";\n\ntype AriaComponentType = ComponentType<{\n isOpen?: boolean;\n children: ReactNode;\n}>;\n\nexport interface OverlayTriggerProps\n extends FlowComponentProps, PropsWithChildren {\n /** Whether the overlay should be open initially. */\n isDefaultOpen?: boolean;\n /** A controller to control the state of the overlay. */\n controller?: OverlayController;\n}\n\ninterface Props extends OverlayTriggerProps {\n overlayType: FlowComponentName;\n component: AriaComponentType;\n}\n\nexport const OverlayTrigger: FC<Props> = (props) => {\n const {\n overlayType,\n isDefaultOpen = false,\n component: AriaOverlayTrigger,\n children,\n controller: controllerFromProps,\n } = props;\n const buttonPropsContext = useComponentPropsContext(\"Button\");\n\n const newOverlayController = OverlayController.useNew({ isDefaultOpen });\n const overlayController = controllerFromProps ?? newOverlayController;\n const isOpen = overlayController.useIsOpen();\n const isContentSuspended = overlayController.useIsContentSuspended();\n const isPending = useIsPendingWithWait(isContentSuspended);\n\n const propsContext: PropsContext = {\n Button: {\n onPress: overlayController.open,\n isPending,\n isDisabled: Boolean(buttonPropsContext?.isDisabled) || isContentSuspended,\n /*\n * The button is the react-aria trigger. react-aria hands the press\n * handling, the trigger ref and `aria-haspopup`/`aria-expanded`/\n * `aria-controls` down through a `PressResponder`, which only reaches its\n * own subtree — so a surrounding props context must not tunnel the button\n * out of the trigger. Such a context has to tunnel the trigger as a whole\n * instead (`overlayTriggersTunneledTo`).\n */\n tunnel: null,\n },\n /*\n * The aria trigger this renders is the host-side identity of every trigger\n * that is not `@flr-generate` (see `overlayTriggersTunneledTo`), so a\n * tunneling props context targets it as well. Here it is already inside the\n * trigger the author wrote — tunneling it again would send the same subtree\n * into the exit twice.\n */\n DialogTrigger: {\n tunnel: null,\n },\n };\n\n return (\n <OverlayContextProvider type={overlayType} controller={overlayController}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isPending, overlayController]}\n >\n <AriaOverlayTrigger isOpen={isOpen}>{children}</AriaOverlayTrigger>\n </PropsContextProvider>\n </OverlayContextProvider>\n );\n};\n\nexport default OverlayTrigger;\n"],"mappings":";;;;;;;;;AA4BA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EACJ,aACA,gBAAgB,OAChB,WAAW,oBACX,UACA,YAAY,wBACV;CACJ,MAAM,qBAAqB,yBAAyB,QAAQ;CAE5D,MAAM,uBAAuB,kBAAkB,OAAO,EAAE,cAAc,CAAC;CACvE,MAAM,oBAAoB,uBAAuB;CACjD,MAAM,SAAS,kBAAkB,UAAU;CAC3C,MAAM,qBAAqB,kBAAkB,sBAAsB;CACnE,MAAM,YAAY,qBAAqB,kBAAkB;CAEzD,MAAM,eAA6B;EACjC,QAAQ;GACN,SAAS,kBAAkB;GAC3B;GACA,YAAY,QAAQ,oBAAoB,UAAU,KAAK;GASvD,QAAQ;EACV;EAQA,eAAe,EACb,QAAQ,KACV;CACF;CAEA,OACE,oBAAC,wBAAD;EAAwB,MAAM;EAAa,YAAY;EACrD,UAAA,oBAAC,sBAAD;GACE,OAAO;GACP,cAAc,CAAC,WAAW,iBAAiB;GAE3C,UAAA,oBAAC,oBAAD;IAA4B;IAAS;GAA6B,CAAA;EAC9C,CAAA;CACA,CAAA;AAE5B"}
@@ -1,12 +1,25 @@
1
1
  "use client"
2
2
  /* */
3
+ import { PropsContextProvider } from "../../../../lib/propsContext/components/PropsContextProvider.mjs";
4
+ import { flowComponent } from "../../../../lib/componentFactory/flowComponent.mjs";
3
5
  import { jsx } from "react/jsx-runtime";
4
6
  import * as Aria from "react-aria-components";
5
7
  //#region src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.tsx
6
- /** @flr-generate all */
7
- var DialogTrigger = (props) => {
8
- return /* @__PURE__ */ jsx(Aria.DialogTrigger, { ...props });
9
- };
8
+ var propsContext = { Button: { tunnel: null } };
9
+ /**
10
+ * @flr-generate all
11
+ * @flr-provider
12
+ */
13
+ var DialogTrigger = flowComponent("DialogTrigger", (props) => {
14
+ const { children, ...rest } = props;
15
+ return /* @__PURE__ */ jsx(Aria.DialogTrigger, {
16
+ ...rest,
17
+ children: /* @__PURE__ */ jsx(PropsContextProvider, {
18
+ props: propsContext,
19
+ children
20
+ })
21
+ });
22
+ }, { type: "provider" });
10
23
  //#endregion
11
24
  export { DialogTrigger, DialogTrigger as default };
12
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTrigger.mjs","names":[],"sources":["../../../../../../../../../src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { ComponentProps, FC } from \"react\";\n\nexport type DialogTriggerProps = ComponentProps<typeof Aria.DialogTrigger>;\n\n/** @flr-generate all */\nexport const DialogTrigger: FC<DialogTriggerProps> = (props) => {\n return <Aria.DialogTrigger {...props} />;\n};\n\nexport default DialogTrigger;\n"],"mappings":";;;;;;AAMA,IAAa,iBAAyC,UAAU;CAC9D,OAAO,oBAAC,KAAK,eAAN,EAAoB,GAAI,MAAQ,CAAA;AACzC"}
1
+ {"version":3,"file":"DialogTrigger.mjs","names":[],"sources":["../../../../../../../../../src/components/OverlayTrigger/components/DialogTrigger/DialogTrigger.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { ComponentProps, FC } from \"react\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\n\nexport type DialogTriggerProps = ComponentProps<typeof Aria.DialogTrigger> &\n FlowComponentProps;\n\n/*\n * `OverlayTrigger` pins the trigger button in the local tree, but its props\n * context does not reach the host: `ModalTrigger`, `PopoverTrigger` and\n * `LightBoxTrigger` are not `@flr-generate`, so a remote tree emits this\n * trigger's view and the host materialises a `DialogTrigger` with no\n * `OverlayTrigger` around it. Pinning the button here is what makes the\n * invariant hold on both sides — see `overlayTriggersTunneledTo`.\n */\nconst propsContext: PropsContext = {\n Button: {\n tunnel: null,\n },\n};\n\n/**\n * @flr-generate all\n * @flr-provider\n */\nexport const DialogTrigger: FC<DialogTriggerProps> = flowComponent(\n \"DialogTrigger\",\n (props) => {\n const { children, ...rest } = props;\n\n return (\n <Aria.DialogTrigger {...rest}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Aria.DialogTrigger>\n );\n },\n { type: \"provider\" },\n);\n\nexport default DialogTrigger;\n"],"mappings":";;;;;;;AAoBA,IAAM,eAA6B,EACjC,QAAQ,EACN,QAAQ,KACV,EACF;;;;;AAMA,IAAa,gBAAwC,cACnD,kBACC,UAAU;CACT,MAAM,EAAE,UAAU,GAAG,SAAS;CAE9B,OACE,oBAAC,KAAK,eAAN;EAAoB,GAAI;EACtB,UAAA,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA;CACJ,CAAA;AAExB,GACA,EAAE,MAAM,WAAW,CACrB"}
@@ -2,6 +2,7 @@
2
2
  /* */
3
3
  import { PropsContextProvider } from "../../../../lib/propsContext/components/PropsContextProvider.mjs";
4
4
  import { flowComponent } from "../../../../lib/componentFactory/flowComponent.mjs";
5
+ import overlayTriggersTunneledTo from "../../../../lib/propsContext/overlayTriggerTunnel.mjs";
5
6
  import { UiComponentTunnelExit } from "../../../UiComponentTunnel/UiComponentTunnelExit.mjs";
6
7
  import SectionHeader_module_default from "./SectionHeader.module.mjs";
7
8
  import clsx from "clsx";
@@ -10,80 +11,47 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
11
  var SectionHeader = flowComponent("SectionHeader", (props) => {
11
12
  const { children, className, ref } = props;
12
13
  const rootClassName = clsx(SectionHeader_module_default.sectionHeader, className);
14
+ const actionsTunnel = {
15
+ id: "actions",
16
+ component: "SectionHeader"
17
+ };
18
+ const propsContext = {
19
+ ...overlayTriggersTunneledTo(actionsTunnel),
20
+ Switch: {
21
+ labelPosition: "leading",
22
+ tunnel: actionsTunnel
23
+ },
24
+ Button: {
25
+ size: "s",
26
+ tunnel: actionsTunnel
27
+ },
28
+ ActionGroup: {
29
+ preserveOrder: true,
30
+ size: "s",
31
+ tunnel: actionsTunnel,
32
+ Button: { tunnel: null },
33
+ Switch: { tunnel: null },
34
+ Link: { tunnel: null }
35
+ },
36
+ FileField: {
37
+ tunnel: actionsTunnel,
38
+ Button: { size: "s" }
39
+ },
40
+ Action: {
41
+ tunnel: actionsTunnel,
42
+ Button: { tunnel: null }
43
+ },
44
+ Heading: { level: 2 },
45
+ Link: {
46
+ size: "s",
47
+ tunnel: actionsTunnel
48
+ }
49
+ };
13
50
  return /* @__PURE__ */ jsx("header", {
14
51
  ref,
15
52
  className: rootClassName,
16
53
  children: /* @__PURE__ */ jsxs(PropsContextProvider, {
17
- props: {
18
- Switch: {
19
- labelPosition: "leading",
20
- tunnel: {
21
- id: "actions",
22
- component: "SectionHeader"
23
- }
24
- },
25
- Button: {
26
- size: "s",
27
- tunnel: {
28
- id: "actions",
29
- component: "SectionHeader"
30
- }
31
- },
32
- ActionGroup: {
33
- preserveOrder: true,
34
- size: "s",
35
- tunnel: {
36
- id: "actions",
37
- component: "SectionHeader"
38
- },
39
- Button: { tunnel: null },
40
- Switch: { tunnel: null },
41
- Link: { tunnel: null }
42
- },
43
- FileField: {
44
- tunnel: {
45
- id: "actions",
46
- component: "SectionHeader"
47
- },
48
- Button: { size: "s" }
49
- },
50
- ContextMenuTrigger: {
51
- tunnel: {
52
- id: "actions",
53
- component: "SectionHeader"
54
- },
55
- Button: { tunnel: null }
56
- },
57
- PopoverTrigger: {
58
- tunnel: {
59
- id: "actions",
60
- component: "SectionHeader"
61
- },
62
- Button: { tunnel: null }
63
- },
64
- ContextualHelpTrigger: {
65
- tunnel: {
66
- id: "actions",
67
- component: "SectionHeader"
68
- },
69
- Button: { tunnel: null }
70
- },
71
- Action: {
72
- tunnel: {
73
- id: "actions",
74
- component: "SectionHeader"
75
- },
76
- Button: { tunnel: null }
77
- },
78
- Heading: { level: 2 },
79
- Link: {
80
- size: "s",
81
- tunnel: {
82
- id: "actions",
83
- component: "SectionHeader"
84
- }
85
- }
86
- },
54
+ props: propsContext,
87
55
  children: [children, /* @__PURE__ */ jsx("div", {
88
56
  className: SectionHeader_module_default.actions,
89
57
  children: /* @__PURE__ */ jsx(UiComponentTunnelExit, {
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.mjs","names":[],"sources":["../../../../../../../../../src/components/Section/components/SectionHeader/SectionHeader.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, RefAttributes } from \"react\";\nimport styles from \"./SectionHeader.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 { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport type SectionHeaderProps = PropsWithChildren &\n PropsWithClassName &\n RefAttributes<HTMLHeadingElement>;\n\nexport const SectionHeader: FC<SectionHeaderProps> = flowComponent(\n \"SectionHeader\",\n (props) => {\n const { children, className, ref } = props;\n\n const rootClassName = clsx(styles.sectionHeader, className);\n\n const propsContext: PropsContext = {\n Switch: {\n labelPosition: \"leading\",\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n },\n Button: {\n size: \"s\",\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n Button: {\n tunnel: null,\n },\n Switch: {\n tunnel: null,\n },\n Link: {\n tunnel: null,\n },\n },\n FileField: {\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n Button: { size: \"s\" },\n },\n ContextMenuTrigger: {\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n Button: {\n tunnel: null,\n },\n },\n PopoverTrigger: {\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n Button: {\n tunnel: null,\n },\n },\n ContextualHelpTrigger: {\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n Button: {\n tunnel: null,\n },\n },\n Action: {\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n Button: {\n tunnel: null,\n },\n },\n Heading: {\n level: 2,\n },\n Link: {\n size: \"s\",\n tunnel: {\n id: \"actions\",\n component: \"SectionHeader\",\n },\n },\n };\n\n return (\n <header ref={ref} className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n {children}\n <div className={styles.actions}>\n <UiComponentTunnelExit id=\"actions\" component=\"SectionHeader\" />\n </div>\n </PropsContextProvider>\n </header>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default SectionHeader;\n"],"mappings":";;;;;;;;;AAaA,IAAa,gBAAwC,cACnD,kBACC,UAAU;CACT,MAAM,EAAE,UAAU,WAAW,QAAQ;CAErC,MAAM,gBAAgB,KAAK,6BAAO,eAAe,SAAS;CAyF1D,OACE,oBAAC,UAAD;EAAa;EAAK,WAAW;EAC3B,UAAA,qBAAC,sBAAD;GAAsB,OAAO;IAxF/B,QAAQ;KACN,eAAe;KACf,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;IACF;IACA,QAAQ;KACN,MAAM;KACN,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;IACF;IACA,aAAa;KACX,eAAe;KACf,MAAM;KACN,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;KACA,QAAQ,EACN,QAAQ,KACV;KACA,QAAQ,EACN,QAAQ,KACV;KACA,MAAM,EACJ,QAAQ,KACV;IACF;IACA,WAAW;KACT,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;KACA,QAAQ,EAAE,MAAM,IAAI;IACtB;IACA,oBAAoB;KAClB,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;KACA,QAAQ,EACN,QAAQ,KACV;IACF;IACA,gBAAgB;KACd,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;KACA,QAAQ,EACN,QAAQ,KACV;IACF;IACA,uBAAuB;KACrB,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;KACA,QAAQ,EACN,QAAQ,KACV;IACF;IACA,QAAQ;KACN,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;KACA,QAAQ,EACN,QAAQ,KACV;IACF;IACA,SAAS,EACP,OAAO,EACT;IACA,MAAM;KACJ,MAAM;KACN,QAAQ;MACN,IAAI;MACJ,WAAW;KACb;IACF;GAK+B;GAA7B,UAAA,CACG,UACD,oBAAC,OAAD;IAAK,WAAW,6BAAO;IACrB,UAAA,oBAAC,uBAAD;KAAuB,IAAG;KAAU,WAAU;IAAiB,CAAA;GAC5D,CAAA,CACe;;CAChB,CAAA;AAEZ,GACA,EACE,MAAM,SACR,CACF"}
1
+ {"version":3,"file":"SectionHeader.mjs","names":[],"sources":["../../../../../../../../../src/components/Section/components/SectionHeader/SectionHeader.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, RefAttributes } from \"react\";\nimport styles from \"./SectionHeader.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport {\n overlayTriggersTunneledTo,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport type SectionHeaderProps = PropsWithChildren &\n PropsWithClassName &\n RefAttributes<HTMLHeadingElement>;\n\nexport const SectionHeader: FC<SectionHeaderProps> = flowComponent(\n \"SectionHeader\",\n (props) => {\n const { children, className, ref } = props;\n\n const rootClassName = clsx(styles.sectionHeader, className);\n\n const actionsTunnel = {\n id: \"actions\",\n component: \"SectionHeader\",\n } as const;\n\n const propsContext: PropsContext = {\n ...overlayTriggersTunneledTo(actionsTunnel),\n Switch: {\n labelPosition: \"leading\",\n tunnel: actionsTunnel,\n },\n Button: {\n size: \"s\",\n tunnel: actionsTunnel,\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n tunnel: actionsTunnel,\n Button: {\n tunnel: null,\n },\n Switch: {\n tunnel: null,\n },\n Link: {\n tunnel: null,\n },\n },\n FileField: {\n tunnel: actionsTunnel,\n Button: { size: \"s\" },\n },\n Action: {\n tunnel: actionsTunnel,\n Button: {\n tunnel: null,\n },\n },\n Heading: {\n level: 2,\n },\n Link: {\n size: \"s\",\n tunnel: actionsTunnel,\n },\n };\n\n return (\n <header ref={ref} className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n {children}\n <div className={styles.actions}>\n <UiComponentTunnelExit id=\"actions\" component=\"SectionHeader\" />\n </div>\n </PropsContextProvider>\n </header>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default SectionHeader;\n"],"mappings":";;;;;;;;;;AAgBA,IAAa,gBAAwC,cACnD,kBACC,UAAU;CACT,MAAM,EAAE,UAAU,WAAW,QAAQ;CAErC,MAAM,gBAAgB,KAAK,6BAAO,eAAe,SAAS;CAE1D,MAAM,gBAAgB;EACpB,IAAI;EACJ,WAAW;CACb;CAEA,MAAM,eAA6B;EACjC,GAAG,0BAA0B,aAAa;EAC1C,QAAQ;GACN,eAAe;GACf,QAAQ;EACV;EACA,QAAQ;GACN,MAAM;GACN,QAAQ;EACV;EACA,aAAa;GACX,eAAe;GACf,MAAM;GACN,QAAQ;GACR,QAAQ,EACN,QAAQ,KACV;GACA,QAAQ,EACN,QAAQ,KACV;GACA,MAAM,EACJ,QAAQ,KACV;EACF;EACA,WAAW;GACT,QAAQ;GACR,QAAQ,EAAE,MAAM,IAAI;EACtB;EACA,QAAQ;GACN,QAAQ;GACR,QAAQ,EACN,QAAQ,KACV;EACF;EACA,SAAS,EACP,OAAO,EACT;EACA,MAAM;GACJ,MAAM;GACN,QAAQ;EACV;CACF;CAEA,OACE,oBAAC,UAAD;EAAa;EAAK,WAAW;EAC3B,UAAA,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACG,UACD,oBAAC,OAAD;IAAK,WAAW,6BAAO;IACrB,UAAA,oBAAC,uBAAD;KAAuB,IAAG;KAAU,WAAU;IAAiB,CAAA;GAC5D,CAAA,CACe;;CAChB,CAAA;AAEZ,GACA,EACE,MAAM,SACR,CACF"}
@@ -32,6 +32,7 @@ var propsContextSupportingComponents = Object.keys({
32
32
  CountryOptions: true,
33
33
  DatePicker: true,
34
34
  DateRangePicker: true,
35
+ DialogTrigger: true,
35
36
  FieldDescription: true,
36
37
  FieldError: true,
37
38
  FileCard: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { TabNavigationProps } from \"@/components/TabNavigation\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps, ModalTriggerProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListItemViewContentProps, ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CombineProps } from \"@/components/Combine\";\nimport type { CountryOptionsProps } from \"@/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { RatingSegmentProps } from \"@/components/Rating/components/RatingSegment\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\nimport type { AccordionProps } from \"@/components/Accordion\";\nimport type { ChatProps } from \"@/components/Chat\";\nimport type { SectionHeaderProps } from \"@/components/Section/components/SectionHeader/SectionHeader\";\nimport type {\n LightBoxGalleryItemProps,\n LightBoxGalleryProps,\n} from \"@/components/LightBox\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Accordion: AccordionProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Combine: CombineProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Chat: ChatProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n TabNavigation: TabNavigationProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n LightBoxGallery: LightBoxGalleryProps;\n LightBoxGalleryItem: LightBoxGalleryItemProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListItemView: ListItemViewContentProps;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n ModalTrigger: ModalTriggerProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n RatingSegment: RatingSegmentProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n SectionHeader: SectionHeaderProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Accordion: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Combine: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Chat: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n TabNavigation: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n LightBoxGallery: true,\n LightBoxGalleryItem: true,\n Link: true,\n List: true,\n ListItemView: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n ModalTrigger: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n RatingSegment: true,\n SearchField: true,\n Section: true,\n SectionHeader: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"mappings":";AAiSA,IAAa,mCAAmC,OAAO,KACrD;CA9FA,WAAW;CACX,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,OAAO;CACP,YAAY;CACZ,WAAW;CACX,WAAW;CACX,OAAO;CACP,SAAS;CACT,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,UAAU;CACV,gBAAgB;CAChB,eAAe;CACf,cAAc;CACd,UAAU;CACV,SAAS;CACT,aAAa;CACb,oBAAoB;CACpB,oBAAoB;CACpB,gBAAgB;CAChB,uBAAuB;CACvB,YAAY;CACZ,cAAc;CACd,gBAAgB;CAChB,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,YAAY;CACZ,UAAU;CACV,cAAc;CACd,WAAW;CACX,cAAc;CACd,QAAQ;CACR,SAAS;CACT,eAAe;CACf,MAAM;CACN,oBAAoB;CACpB,OAAO;CACP,UAAU;CACV,KAAK;CACL,OAAO;CACP,YAAY;CACZ,UAAU;CACV,iBAAiB;CACjB,qBAAqB;CACrB,MAAM;CACN,MAAM;CACN,cAAc;CACd,aAAa;CACb,gBAAgB;CAChB,UAAU;CACV,aAAa;CACb,SAAS;CACT,eAAe;CACf,OAAO;CACP,cAAc;CACd,YAAY;CACZ,iBAAiB;CACjB,aAAa;CACb,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,gBAAgB;CAChB,uBAAuB;CACvB,aAAa;CACb,aAAa;CACb,YAAY;CACZ,QAAQ;CACR,eAAe;CACf,aAAa;CACb,SAAS;CACT,eAAe;CACf,SAAS;CACT,kBAAkB;CAClB,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,UAAU;CACV,eAAe;CACf,MAAM;CACN,UAAU;CACV,WAAW;CACX,WAAW;AAIX,CACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { TabNavigationProps } from \"@/components/TabNavigation\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps, ModalTriggerProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListItemViewContentProps, ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CombineProps } from \"@/components/Combine\";\nimport type { CountryOptionsProps } from \"@/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type {\n DialogTriggerProps,\n MenuTriggerProps,\n} from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { RatingSegmentProps } from \"@/components/Rating/components/RatingSegment\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\nimport type { AccordionProps } from \"@/components/Accordion\";\nimport type { ChatProps } from \"@/components/Chat\";\nimport type { SectionHeaderProps } from \"@/components/Section/components/SectionHeader/SectionHeader\";\nimport type {\n LightBoxGalleryItemProps,\n LightBoxGalleryProps,\n} from \"@/components/LightBox\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Accordion: AccordionProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Combine: CombineProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Chat: ChatProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n DialogTrigger: DialogTriggerProps;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n TabNavigation: TabNavigationProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n LightBoxGallery: LightBoxGalleryProps;\n LightBoxGalleryItem: LightBoxGalleryItemProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListItemView: ListItemViewContentProps;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n ModalTrigger: ModalTriggerProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n RatingSegment: RatingSegmentProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n SectionHeader: SectionHeaderProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Accordion: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Combine: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Chat: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n DialogTrigger: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n TabNavigation: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n LightBoxGallery: true,\n LightBoxGalleryItem: true,\n Link: true,\n List: true,\n ListItemView: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n ModalTrigger: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n RatingSegment: true,\n SearchField: true,\n Section: true,\n SectionHeader: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"mappings":";AAsSA,IAAa,mCAAmC,OAAO,KACrD;CA/FA,WAAW;CACX,QAAQ;CACR,aAAa;CACb,WAAW;CACX,QAAQ;CACR,cAAc;CACd,OAAO;CACP,YAAY;CACZ,WAAW;CACX,WAAW;CACX,OAAO;CACP,SAAS;CACT,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,UAAU;CACV,gBAAgB;CAChB,eAAe;CACf,cAAc;CACd,UAAU;CACV,SAAS;CACT,aAAa;CACb,oBAAoB;CACpB,oBAAoB;CACpB,gBAAgB;CAChB,uBAAuB;CACvB,YAAY;CACZ,cAAc;CACd,gBAAgB;CAChB,YAAY;CACZ,iBAAiB;CACjB,eAAe;CACf,kBAAkB;CAClB,YAAY;CACZ,UAAU;CACV,cAAc;CACd,WAAW;CACX,cAAc;CACd,QAAQ;CACR,SAAS;CACT,eAAe;CACf,MAAM;CACN,oBAAoB;CACpB,OAAO;CACP,UAAU;CACV,KAAK;CACL,OAAO;CACP,YAAY;CACZ,UAAU;CACV,iBAAiB;CACjB,qBAAqB;CACrB,MAAM;CACN,MAAM;CACN,cAAc;CACd,aAAa;CACb,gBAAgB;CAChB,UAAU;CACV,aAAa;CACb,SAAS;CACT,eAAe;CACf,OAAO;CACP,cAAc;CACd,YAAY;CACZ,iBAAiB;CACjB,aAAa;CACb,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,gBAAgB;CAChB,uBAAuB;CACvB,aAAa;CACb,aAAa;CACb,YAAY;CACZ,QAAQ;CACR,eAAe;CACf,aAAa;CACb,SAAS;CACT,eAAe;CACf,SAAS;CACT,kBAAkB;CAClB,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,UAAU;CACV,eAAe;CACf,MAAM;CACN,UAAU;CACV,WAAW;CACX,WAAW;AAIX,CACF"}