@mittwald/flow-remote-vue-components 1.6.0-next.68 → 1.6.0-next.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/index.mjs +2 -1
- package/dist/js/remote-vue-components/src/auto-generated/LightBoxGalleryItem.mjs +1 -1
- package/dist/js/remote-vue-components/src/auto-generated/LightBoxGalleryItem.mjs.map +1 -1
- package/dist/js/remote-vue-components/src/auto-generated/LightBoxZoom.mjs +7 -0
- package/dist/js/remote-vue-components/src/auto-generated/LightBoxZoom.mjs.map +1 -0
- package/dist/js/remote-vue-components/src/overlays/LightBox.mjs +21 -6
- package/dist/js/remote-vue-components/src/overlays/LightBox.mjs.map +1 -1
- package/dist/js/remote-vue-components/src/version.mjs +1 -1
- package/dist/types/auto-generated/LightBoxZoom.d.ts +4 -0
- package/dist/types/auto-generated/index.d.ts +1 -0
- package/dist/types/overlays/LightBox.d.ts +17 -0
- package/package.json +14 -14
package/dist/js/index.mjs
CHANGED
|
@@ -76,6 +76,7 @@ import { LayoutCard } from "./remote-vue-components/src/auto-generated/LayoutCar
|
|
|
76
76
|
import { Legend } from "./remote-vue-components/src/auto-generated/Legend.mjs";
|
|
77
77
|
import { LightBoxGallery } from "./remote-vue-components/src/auto-generated/LightBoxGallery.mjs";
|
|
78
78
|
import { LightBoxGalleryItem } from "./remote-vue-components/src/auto-generated/LightBoxGalleryItem.mjs";
|
|
79
|
+
import { LightBoxZoom } from "./remote-vue-components/src/auto-generated/LightBoxZoom.mjs";
|
|
79
80
|
import { Line } from "./remote-vue-components/src/auto-generated/Line.mjs";
|
|
80
81
|
import { Link } from "./remote-vue-components/src/auto-generated/Link.mjs";
|
|
81
82
|
import { ListEmptyView } from "./remote-vue-components/src/auto-generated/ListEmptyView.mjs";
|
|
@@ -299,4 +300,4 @@ import { Wrap } from "./remote-vue-components/src/components/Wrap.mjs";
|
|
|
299
300
|
import { LightBox } from "./remote-vue-components/src/overlays/LightBox.mjs";
|
|
300
301
|
import { useIsMounted } from "./remote-vue-components/src/composables/useIsMounted.mjs";
|
|
301
302
|
import { useOnChange } from "./remote-vue-components/src/composables/useOnChange.mjs";
|
|
302
|
-
export { AccentBox, Accordion, AccordionGroup, Action, ActionBatch, ActionGroup, Alert, AlertBadge, AlertIcon, AlertText, Align, Area, Autocomplete, Avatar, AvatarStack, Badge, Bar, BigNumber, Breadcrumb, BrowserOnly, Button, CartesianChart, CartesianGrid, ChartGrid, ChartLegend, ChartTooltip, Chat, Checkbox, CheckboxButton, CheckboxGroup, ClearPropsContext, CoachMark, CodeBlock, CodeEditor, Color, ColumnLayout, Combine, ComboBox, ComponentPropsContextProvider, Content, ContextMenu, ContextMenuContent, ContextMenuSection, ContextMenuTrigger, ContextualHelp, ContextualHelpTrigger, CopyButton, CounterBadge, CountryOptions, DatePicker, DateRangePicker, DeprecationWarningProvider, DialogTrigger, Div, DonutChart, FieldDescription, FieldError, FileCard, FileCardList, FileDropZone, FileField, Flex, Form, Header, HeaderNavigation, Heading, Icon, IconAI, IconAIHosting, 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, ItemsGridList, ItemsGridListItem, Kbd, Label, LabeledValue, LayoutCard, Legend, LightBox, LightBoxGallery, LightBoxGalleryItem, LightBoxTrigger, Line, Link, List, ListEmptyView, ListEmptyViewContainer, ListFilter, ListItem, ListItemView, ListItemViewContent, ListLoaderAsync, ListLoaderComposable, ListModel, ListSearch, ListSorting, ListStaticData, ListSummary, ListTable, ListTableBody, ListTableCell, ListTableColumn, ListTableHeader, ListTableRow, LoadingFallbackTrigger, LoadingIndicator, LoadingSpinner, Markdown, MarkdownEditor, MenuItem, MenuTrigger, Message, MessageSeparator, MessageThread, Modal, ModalTrigger, Navigation, NavigationGroup, Notification, NotificationController, NotificationProvider, NumberField, Option, OverlayContent, PasswordCreationField, Popover, PopoverContent, PopoverTrigger, ProgressBar, Radio, RadioButton, RadioGroup, RangeCalendar, Rating, RatingSegment, RemoteRoot, SearchField, Section, Segment, SegmentedControl, Select, Separator, SettingsProvider, SettingsStore, Skeleton, SkeletonMode, SkeletonText, Slider, Switch, Tab, TabNavigation, TabTitle, Table, TableBody, TableCell, TableColumn, TableFooterRow, TableHeader, TableRow, Tabs, Text, TextArea, TextField, TimeField, Tooltip, TooltipTrigger, TranslationProvider, Truncate, TunnelEntry, Wrap, XAxis, YAxis, communicationVersion, createFlowRemoteComponent, createListSettings, createOverlayController, injectContextIcon, injectListModel, injectOverlayController, injectSettings, packageVersion, resolveListDateRange as resolveDateRangeFilterValue, svgIcon, tablerIcon, useIsMounted, useLanguage, useListMetadata, useListSettings, useModalController, useNotificationController, useOnChange, useOverlayController, useRemoteConnection, useWarnDeprecation };
|
|
303
|
+
export { AccentBox, Accordion, AccordionGroup, Action, ActionBatch, ActionGroup, Alert, AlertBadge, AlertIcon, AlertText, Align, Area, Autocomplete, Avatar, AvatarStack, Badge, Bar, BigNumber, Breadcrumb, BrowserOnly, Button, CartesianChart, CartesianGrid, ChartGrid, ChartLegend, ChartTooltip, Chat, Checkbox, CheckboxButton, CheckboxGroup, ClearPropsContext, CoachMark, CodeBlock, CodeEditor, Color, ColumnLayout, Combine, ComboBox, ComponentPropsContextProvider, Content, ContextMenu, ContextMenuContent, ContextMenuSection, ContextMenuTrigger, ContextualHelp, ContextualHelpTrigger, CopyButton, CounterBadge, CountryOptions, DatePicker, DateRangePicker, DeprecationWarningProvider, DialogTrigger, Div, DonutChart, FieldDescription, FieldError, FileCard, FileCardList, FileDropZone, FileField, Flex, Form, Header, HeaderNavigation, Heading, Icon, IconAI, IconAIHosting, 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, ItemsGridList, ItemsGridListItem, Kbd, Label, LabeledValue, LayoutCard, Legend, LightBox, LightBoxGallery, LightBoxGalleryItem, LightBoxTrigger, LightBoxZoom, Line, Link, List, ListEmptyView, ListEmptyViewContainer, ListFilter, ListItem, ListItemView, ListItemViewContent, ListLoaderAsync, ListLoaderComposable, ListModel, ListSearch, ListSorting, ListStaticData, ListSummary, ListTable, ListTableBody, ListTableCell, ListTableColumn, ListTableHeader, ListTableRow, LoadingFallbackTrigger, LoadingIndicator, LoadingSpinner, Markdown, MarkdownEditor, MenuItem, MenuTrigger, Message, MessageSeparator, MessageThread, Modal, ModalTrigger, Navigation, NavigationGroup, Notification, NotificationController, NotificationProvider, NumberField, Option, OverlayContent, PasswordCreationField, Popover, PopoverContent, PopoverTrigger, ProgressBar, Radio, RadioButton, RadioGroup, RangeCalendar, Rating, RatingSegment, RemoteRoot, SearchField, Section, Segment, SegmentedControl, Select, Separator, SettingsProvider, SettingsStore, Skeleton, SkeletonMode, SkeletonText, Slider, Switch, Tab, TabNavigation, TabTitle, Table, TableBody, TableCell, TableColumn, TableFooterRow, TableHeader, TableRow, Tabs, Text, TextArea, TextField, TimeField, Tooltip, TooltipTrigger, TranslationProvider, Truncate, TunnelEntry, Wrap, XAxis, YAxis, communicationVersion, createFlowRemoteComponent, createListSettings, createOverlayController, injectContextIcon, injectListModel, injectOverlayController, injectSettings, packageVersion, resolveListDateRange as resolveDateRangeFilterValue, svgIcon, tablerIcon, useIsMounted, useLanguage, useListMetadata, useListSettings, useModalController, useNotificationController, useOnChange, useOverlayController, useRemoteConnection, useWarnDeprecation };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createFlowRemoteComponent } from "../lib/createFlowRemoteComponent.mjs";
|
|
2
2
|
import { RemoteLightBoxGalleryItemElement } from "@mittwald/flow-remote-elements";
|
|
3
3
|
// src/auto-generated/LightBoxGalleryItem.ts
|
|
4
|
-
var LightBoxGalleryItem = createFlowRemoteComponent("flr-light-box-gallery-item", "LightBoxGalleryItem", RemoteLightBoxGalleryItemElement);
|
|
4
|
+
var LightBoxGalleryItem = createFlowRemoteComponent("flr-light-box-gallery-item", "LightBoxGalleryItem", RemoteLightBoxGalleryItemElement, { booleans: ["withZoom"] });
|
|
5
5
|
export { LightBoxGalleryItem };
|
|
6
6
|
|
|
7
7
|
//# sourceMappingURL=LightBoxGalleryItem.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightBoxGalleryItem.mjs","names":[],"sources":["../../../../../src/auto-generated/LightBoxGalleryItem.ts"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport { createFlowRemoteComponent } from \"@/lib/createFlowRemoteComponent\";\nimport type { FlowRemoteVueComponent } from \"@/lib/types\";\nimport { RemoteLightBoxGalleryItemElement } from \"@mittwald/flow-remote-elements\";\nimport type { RemoteLightBoxGalleryItemElementProps } from \"@mittwald/flow-remote-elements\";\nexport { type RemoteLightBoxGalleryItemElementProps as LightBoxGalleryItemProps } from \"@mittwald/flow-remote-elements\";\n\nexport const LightBoxGalleryItem: FlowRemoteVueComponent<RemoteLightBoxGalleryItemElementProps> =\n createFlowRemoteComponent(\n \"flr-light-box-gallery-item\",\n \"LightBoxGalleryItem\",\n RemoteLightBoxGalleryItemElement,\n );\n"],"mappings":";;;AAQA,IAAa,sBACX,0BACE,8BACA,uBACA,
|
|
1
|
+
{"version":3,"file":"LightBoxGalleryItem.mjs","names":[],"sources":["../../../../../src/auto-generated/LightBoxGalleryItem.ts"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport { createFlowRemoteComponent } from \"@/lib/createFlowRemoteComponent\";\nimport type { FlowRemoteVueComponent } from \"@/lib/types\";\nimport { RemoteLightBoxGalleryItemElement } from \"@mittwald/flow-remote-elements\";\nimport type { RemoteLightBoxGalleryItemElementProps } from \"@mittwald/flow-remote-elements\";\nexport { type RemoteLightBoxGalleryItemElementProps as LightBoxGalleryItemProps } from \"@mittwald/flow-remote-elements\";\n\nexport const LightBoxGalleryItem: FlowRemoteVueComponent<RemoteLightBoxGalleryItemElementProps> =\n createFlowRemoteComponent(\n \"flr-light-box-gallery-item\",\n \"LightBoxGalleryItem\",\n RemoteLightBoxGalleryItemElement,\n { booleans: [\"withZoom\"] },\n );\n"],"mappings":";;;AAQA,IAAa,sBACX,0BACE,8BACA,uBACA,kCACA,EAAE,UAAU,CAAC,UAAU,EAAE,CAC3B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createFlowRemoteComponent } from "../lib/createFlowRemoteComponent.mjs";
|
|
2
|
+
import { RemoteLightBoxZoomElement } from "@mittwald/flow-remote-elements";
|
|
3
|
+
// src/auto-generated/LightBoxZoom.ts
|
|
4
|
+
var LightBoxZoom = createFlowRemoteComponent("flr-light-box-zoom", "LightBoxZoom", RemoteLightBoxZoomElement);
|
|
5
|
+
export { LightBoxZoom };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=LightBoxZoom.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightBoxZoom.mjs","names":[],"sources":["../../../../../src/auto-generated/LightBoxZoom.ts"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport { createFlowRemoteComponent } from \"@/lib/createFlowRemoteComponent\";\nimport type { FlowRemoteVueComponent } from \"@/lib/types\";\nimport { RemoteLightBoxZoomElement } from \"@mittwald/flow-remote-elements\";\nimport type { RemoteLightBoxZoomElementProps } from \"@mittwald/flow-remote-elements\";\nexport { type RemoteLightBoxZoomElementProps as LightBoxZoomProps } from \"@mittwald/flow-remote-elements\";\n\nexport const LightBoxZoom: FlowRemoteVueComponent<RemoteLightBoxZoomElementProps> =\n createFlowRemoteComponent(\n \"flr-light-box-zoom\",\n \"LightBoxZoom\",\n RemoteLightBoxZoomElement,\n );\n"],"mappings":";;;AAQA,IAAa,eACX,0BACE,sBACA,gBACA,yBACF"}
|
|
@@ -6,6 +6,8 @@ import { Button } from "../auto-generated/Button.mjs";
|
|
|
6
6
|
import { ClearPropsContext } from "../auto-generated/ClearPropsContext.mjs";
|
|
7
7
|
import { Div } from "../auto-generated/Div.mjs";
|
|
8
8
|
import { LightBoxGallery } from "../auto-generated/LightBoxGallery.mjs";
|
|
9
|
+
import { LightBoxGalleryItem } from "../auto-generated/LightBoxGalleryItem.mjs";
|
|
10
|
+
import { LightBoxZoom } from "../auto-generated/LightBoxZoom.mjs";
|
|
9
11
|
import { OverlayContent } from "../auto-generated/OverlayContent.mjs";
|
|
10
12
|
import { IconClose } from "../icons/components/IconClose.mjs";
|
|
11
13
|
import { applyChildRules, flattenChildren } from "./childProps.mjs";
|
|
@@ -22,21 +24,26 @@ var styles = {
|
|
|
22
24
|
content: "flow--light-box--content",
|
|
23
25
|
actions: "flow--light-box--actions",
|
|
24
26
|
actionGroup: "flow--light-box--action-group",
|
|
25
|
-
gallery: "flow--light-box--gallery"
|
|
27
|
+
gallery: "flow--light-box--gallery",
|
|
28
|
+
zoom: "flow--light-box--zoom"
|
|
26
29
|
};
|
|
27
30
|
var lightStaticButton = {
|
|
28
31
|
variant: "solid",
|
|
29
32
|
color: "light-static"
|
|
30
33
|
};
|
|
31
34
|
var buttonRules = (child) => child.type === Button ? { props: lightStaticButton } : child.type === Action || child.type === ActionBatch ? { children: buttonRules } : void 0;
|
|
32
|
-
var
|
|
35
|
+
var zoomRules = (child) => child.type === LightBoxGalleryItem ? { props: { withZoom: true } } : void 0;
|
|
36
|
+
var childRules = (withZoom) => (child) => child.type === ActionGroup ? {
|
|
33
37
|
props: {
|
|
34
38
|
class: styles.actionGroup,
|
|
35
39
|
spacing: "m",
|
|
36
40
|
preserveOrder: true
|
|
37
41
|
},
|
|
38
42
|
children: buttonRules
|
|
39
|
-
} : child.type === LightBoxGallery ? {
|
|
43
|
+
} : child.type === LightBoxGallery ? {
|
|
44
|
+
props: { class: styles.gallery },
|
|
45
|
+
children: withZoom ? zoomRules : void 0
|
|
46
|
+
} : void 0;
|
|
40
47
|
var LightBox = defineComponent({
|
|
41
48
|
name: "LightBox",
|
|
42
49
|
inheritAttrs: false,
|
|
@@ -46,6 +53,14 @@ var LightBox = defineComponent({
|
|
|
46
53
|
type: Boolean,
|
|
47
54
|
default: true
|
|
48
55
|
},
|
|
56
|
+
/**
|
|
57
|
+
* Whether the content, and a gallery's items, can be zoomed. The content
|
|
58
|
+
* then always fits the screen, whatever `fitScreen` says.
|
|
59
|
+
*/
|
|
60
|
+
withZoom: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
49
64
|
/** A controller to open and close the light box from anywhere. */
|
|
50
65
|
controller: {
|
|
51
66
|
type: Object,
|
|
@@ -88,10 +103,10 @@ var LightBox = defineComponent({
|
|
|
88
103
|
const className = [
|
|
89
104
|
styles.overlay,
|
|
90
105
|
styles.lightBox,
|
|
91
|
-
props.fitScreen ? styles.fitScreen : void 0,
|
|
106
|
+
props.fitScreen || props.withZoom ? styles.fitScreen : void 0,
|
|
92
107
|
attrs.class
|
|
93
108
|
].filter(Boolean).join(" ");
|
|
94
|
-
const children = applyChildRules(slots.default?.(), childRules);
|
|
109
|
+
const children = applyChildRules(slots.default?.(), childRules(props.withZoom));
|
|
95
110
|
const isActionGroup = (child) => child.type === ActionGroup;
|
|
96
111
|
const actionGroups = flattenChildren(children).filter(isActionGroup);
|
|
97
112
|
const content = flattenChildren(children).filter((child) => !isActionGroup(child));
|
|
@@ -105,7 +120,7 @@ var LightBox = defineComponent({
|
|
|
105
120
|
isOpen: props.isOpen ?? controller.value.isOpen.value,
|
|
106
121
|
isDismissable: props.isDismissable,
|
|
107
122
|
onOpenChange: controller.value.setOpen
|
|
108
|
-
}, () => [h(Div, { class: styles.content }, () => content), h(Div, { class: styles.actions }, () => [
|
|
123
|
+
}, () => [h(Div, { class: styles.content }, () => props.withZoom ? h(LightBoxZoom, { class: styles.zoom }, () => content) : content), h(Div, { class: styles.actions }, () => [...actionGroups, closeButton])]));
|
|
109
124
|
};
|
|
110
125
|
}
|
|
111
126
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightBox.mjs","names":[],"sources":["../../../../../src/overlays/LightBox.ts"],"sourcesContent":["import {\n ActionGroup,\n Button,\n ClearPropsContext,\n Div,\n LightBoxGallery,\n OverlayContent,\n} from \"@/auto-generated\";\nimport Action from \"@/components/Action\";\nimport ActionBatch from \"@/components/ActionBatch\";\nimport { useLanguage } from \"@/composables/remoteContext\";\nimport { IconClose } from \"@/icons\";\nimport { lightBoxCloseTexts } from \"@/overlays/locales\";\nimport {\n applyChildRules,\n flattenChildren,\n type ChildRules,\n} from \"@/overlays/childProps\";\nimport {\n provideOverlayContext,\n useOwnController,\n useOverlayHandlers,\n type OverlayCloseHandler,\n type OverlayController,\n type OverlayOpenHandler,\n type OverlayOpenStateHandler,\n} from \"@/overlays/overlayController\";\nimport { defineComponent, h, onMounted, type PropType, type VNode } from \"vue\";\nimport { composition } from \"@/lib/composition\";\nimport { useComponentUsage } from \"@/composables/useComponentUsage\";\n\n/* Flow's own class names — see the note in Modal.ts. */\nconst styles = {\n overlay: \"flow--overlay\",\n lightBox: \"flow--light-box\",\n fitScreen: \"flow--light-box--fit-screen\",\n content: \"flow--light-box--content\",\n actions: \"flow--light-box--actions\",\n actionGroup: \"flow--light-box--action-group\",\n gallery: \"flow--light-box--gallery\",\n};\n\nconst lightStaticButton = { variant: \"solid\", color: \"light-static\" } as const;\n\n/* Flow's `ActionGroup: { Button: … }`, through the actions inside it too. */\nconst buttonRules: ChildRules = (child) =>\n child.type === Button\n ? { props: lightStaticButton }\n : child.type === Action || child.type === ActionBatch\n ? { children: buttonRules }\n : undefined;\n\nconst
|
|
1
|
+
{"version":3,"file":"LightBox.mjs","names":[],"sources":["../../../../../src/overlays/LightBox.ts"],"sourcesContent":["import {\n ActionGroup,\n Button,\n ClearPropsContext,\n Div,\n LightBoxGallery,\n LightBoxGalleryItem,\n LightBoxZoom,\n OverlayContent,\n} from \"@/auto-generated\";\nimport Action from \"@/components/Action\";\nimport ActionBatch from \"@/components/ActionBatch\";\nimport { useLanguage } from \"@/composables/remoteContext\";\nimport { IconClose } from \"@/icons\";\nimport { lightBoxCloseTexts } from \"@/overlays/locales\";\nimport {\n applyChildRules,\n flattenChildren,\n type ChildRules,\n} from \"@/overlays/childProps\";\nimport {\n provideOverlayContext,\n useOwnController,\n useOverlayHandlers,\n type OverlayCloseHandler,\n type OverlayController,\n type OverlayOpenHandler,\n type OverlayOpenStateHandler,\n} from \"@/overlays/overlayController\";\nimport { defineComponent, h, onMounted, type PropType, type VNode } from \"vue\";\nimport { composition } from \"@/lib/composition\";\nimport { useComponentUsage } from \"@/composables/useComponentUsage\";\n\n/* Flow's own class names — see the note in Modal.ts. */\nconst styles = {\n overlay: \"flow--overlay\",\n lightBox: \"flow--light-box\",\n fitScreen: \"flow--light-box--fit-screen\",\n content: \"flow--light-box--content\",\n actions: \"flow--light-box--actions\",\n actionGroup: \"flow--light-box--action-group\",\n gallery: \"flow--light-box--gallery\",\n zoom: \"flow--light-box--zoom\",\n};\n\nconst lightStaticButton = { variant: \"solid\", color: \"light-static\" } as const;\n\n/* Flow's `ActionGroup: { Button: … }`, through the actions inside it too. */\nconst buttonRules: ChildRules = (child) =>\n child.type === Button\n ? { props: lightStaticButton }\n : child.type === Action || child.type === ActionBatch\n ? { children: buttonRules }\n : undefined;\n\n/* Flow's `LightBoxGallery: { LightBoxGalleryItem: { withZoom } }`. */\nconst zoomRules: ChildRules = (child) =>\n child.type === LightBoxGalleryItem\n ? { props: { withZoom: true } }\n : undefined;\n\nconst childRules =\n (withZoom: boolean): ChildRules =>\n (child) =>\n child.type === ActionGroup\n ? {\n props: {\n class: styles.actionGroup,\n spacing: \"m\",\n preserveOrder: true,\n },\n children: buttonRules,\n }\n : child.type === LightBoxGallery\n ? {\n props: { class: styles.gallery },\n children: withZoom ? zoomRules : undefined,\n }\n : undefined;\n\nexport const LightBox = defineComponent({\n name: \"LightBox\",\n\n inheritAttrs: false,\n\n props: {\n /** Whether content may exceed the available screen space. @default true */\n fitScreen: { type: Boolean, default: true },\n /**\n * Whether the content, and a gallery's items, can be zoomed. The content\n * then always fits the screen, whatever `fitScreen` says.\n */\n withZoom: { type: Boolean, default: false },\n /** A controller to open and close the light box from anywhere. */\n controller: {\n type: Object as PropType<OverlayController>,\n default: undefined,\n },\n /** Whether a click outside closes the light box. @default true */\n isDismissable: { type: Boolean, default: true },\n /** Whether the light box is open. Use it to control its state. */\n isOpen: { type: Boolean, default: undefined },\n onOpen: {\n type: Function as PropType<OverlayOpenHandler>,\n default: undefined,\n },\n onClose: {\n type: Function as PropType<OverlayCloseHandler>,\n default: undefined,\n },\n onOpenChange: {\n type: Function as PropType<OverlayOpenStateHandler>,\n default: undefined,\n },\n },\n\n setup(props, { slots, attrs }) {\n /* Flow's React `LightBox` is a `flowComponent` and reports itself. */\n onMounted(useComponentUsage(\"LightBox\"));\n\n const language = useLanguage();\n const controller = useOwnController(() => props.controller, \"LightBox\");\n\n /* Registered as a `Modal`, as Flow's `Overlay` registers it. */\n provideOverlayContext(\"Modal\", () => controller.value);\n\n useOverlayHandlers(() => controller.value, {\n onOpen: () => props.onOpen,\n onClose: () => props.onClose,\n onOpenChange: () => props.onOpenChange,\n });\n\n return () => {\n const className = [\n styles.overlay,\n styles.lightBox,\n props.fitScreen || props.withZoom ? styles.fitScreen : undefined,\n attrs.class,\n ]\n .filter(Boolean)\n .join(\" \");\n\n /*\n * Flow tunnels the `ActionGroup` out of the content into the actions,\n * in front of the close button.\n */\n const children = applyChildRules(\n slots.default?.(),\n childRules(props.withZoom),\n );\n const isActionGroup = (child: VNode) => child.type === ActionGroup;\n const actionGroups = flattenChildren(children).filter(isActionGroup);\n const content = flattenChildren(children).filter(\n (child) => !isActionGroup(child),\n );\n\n const closeButton = h(\n Button,\n {\n ...lightStaticButton,\n \"aria-label\": language.value?.startsWith(\"de\")\n ? lightBoxCloseTexts[\"de-DE\"]\n : lightBoxCloseTexts[\"en-US\"],\n onPress: () => controller.value.close(),\n },\n () => h(IconClose),\n );\n\n /* A UI component: Flow clears the host's props context around it. */\n return h(ClearPropsContext, null, () =>\n h(\n OverlayContent,\n {\n class: className,\n isOpen: props.isOpen ?? controller.value.isOpen.value,\n isDismissable: props.isDismissable,\n onOpenChange: controller.value.setOpen,\n },\n () => [\n h(Div, { class: styles.content }, () =>\n props.withZoom\n ? h(LightBoxZoom, { class: styles.zoom }, () => content)\n : content,\n ),\n h(Div, { class: styles.actions }, () => [\n ...actionGroups,\n closeButton,\n ]),\n ],\n ),\n );\n };\n },\n});\n\ncomposition(LightBox);\n\nexport default LightBox;\n"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Version } from "@mittwald/flow-remote-core";
|
|
2
2
|
// src/version.ts
|
|
3
3
|
var communicationVersion = Version.v6;
|
|
4
|
-
var packageVersion = "1.6.0-next.
|
|
4
|
+
var packageVersion = "1.6.0-next.69";
|
|
5
5
|
var version = communicationVersion;
|
|
6
6
|
export { communicationVersion, packageVersion, version };
|
|
7
7
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FlowRemoteVueComponent } from '../lib/types';
|
|
2
|
+
import { RemoteLightBoxZoomElementProps } from '@mittwald/flow-remote-elements';
|
|
3
|
+
export { type RemoteLightBoxZoomElementProps as LightBoxZoomProps } from '@mittwald/flow-remote-elements';
|
|
4
|
+
export declare const LightBoxZoom: FlowRemoteVueComponent<RemoteLightBoxZoomElementProps>;
|
|
@@ -73,6 +73,7 @@ export * from './LayoutCard';
|
|
|
73
73
|
export * from './Legend';
|
|
74
74
|
export * from './LightBoxGallery';
|
|
75
75
|
export * from './LightBoxGalleryItem';
|
|
76
|
+
export * from './LightBoxZoom';
|
|
76
77
|
export * from './Line';
|
|
77
78
|
export * from './Link';
|
|
78
79
|
export * from './ListEmptyView';
|
|
@@ -6,6 +6,14 @@ export declare const LightBox: import('vue').DefineComponent<import('vue').Extra
|
|
|
6
6
|
type: BooleanConstructor;
|
|
7
7
|
default: boolean;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Whether the content, and a gallery's items, can be zoomed. The content
|
|
11
|
+
* then always fits the screen, whatever `fitScreen` says.
|
|
12
|
+
*/
|
|
13
|
+
withZoom: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
9
17
|
/** A controller to open and close the light box from anywhere. */
|
|
10
18
|
controller: {
|
|
11
19
|
type: PropType<OverlayController>;
|
|
@@ -41,6 +49,14 @@ export declare const LightBox: import('vue').DefineComponent<import('vue').Extra
|
|
|
41
49
|
type: BooleanConstructor;
|
|
42
50
|
default: boolean;
|
|
43
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Whether the content, and a gallery's items, can be zoomed. The content
|
|
54
|
+
* then always fits the screen, whatever `fitScreen` says.
|
|
55
|
+
*/
|
|
56
|
+
withZoom: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
44
60
|
/** A controller to open and close the light box from anywhere. */
|
|
45
61
|
controller: {
|
|
46
62
|
type: PropType<OverlayController>;
|
|
@@ -73,6 +89,7 @@ export declare const LightBox: import('vue').DefineComponent<import('vue').Extra
|
|
|
73
89
|
isOpen: boolean;
|
|
74
90
|
onOpenChange: OverlayOpenStateHandler;
|
|
75
91
|
controller: OverlayController;
|
|
92
|
+
withZoom: boolean;
|
|
76
93
|
isDismissable: boolean;
|
|
77
94
|
onOpen: OverlayOpenHandler;
|
|
78
95
|
fitScreen: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-vue-components",
|
|
3
|
-
"version": "1.6.0-next.
|
|
3
|
+
"version": "1.6.0-next.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue components that can be used in a remote environment",
|
|
6
6
|
"homepage": "https://flow.mittwald.de",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@internationalized/date": "^3.12.3",
|
|
44
|
-
"@mittwald/flow-remote-core": "1.6.0-next.
|
|
45
|
-
"@mittwald/flow-remote-elements": "1.6.0-next.
|
|
44
|
+
"@mittwald/flow-remote-core": "1.6.0-next.69",
|
|
45
|
+
"@mittwald/flow-remote-elements": "1.6.0-next.69",
|
|
46
46
|
"@tanstack/table-core": "^8.21.3",
|
|
47
47
|
"country-codes-list": "^2.0.0",
|
|
48
48
|
"dot-prop": "^10.2.0",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"remeda": "^2.43.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@mittwald/ext-bridge": "1.6.0-next.
|
|
56
|
-
"@mittwald/flow-components-base": "1.6.0-next.
|
|
57
|
-
"@mittwald/flow-core": "1.6.0-next.
|
|
58
|
-
"@mittwald/flow-icons-base": "1.6.0-next.
|
|
59
|
-
"@mittwald/flow-react-components": "1.6.0-next.
|
|
60
|
-
"@mittwald/flow-remote-react-components": "1.6.0-next.
|
|
61
|
-
"@mittwald/flow-remote-react-renderer": "1.6.0-next.
|
|
62
|
-
"@mittwald/typescript-config": "1.6.0-next.
|
|
55
|
+
"@mittwald/ext-bridge": "1.6.0-next.69",
|
|
56
|
+
"@mittwald/flow-components-base": "1.6.0-next.69",
|
|
57
|
+
"@mittwald/flow-core": "1.6.0-next.69",
|
|
58
|
+
"@mittwald/flow-icons-base": "1.6.0-next.69",
|
|
59
|
+
"@mittwald/flow-react-components": "1.6.0-next.69",
|
|
60
|
+
"@mittwald/flow-remote-react-components": "1.6.0-next.69",
|
|
61
|
+
"@mittwald/flow-remote-react-renderer": "1.6.0-next.69",
|
|
62
|
+
"@mittwald/typescript-config": "1.6.0-next.69",
|
|
63
63
|
"@quilted/threads": "^3.3.1",
|
|
64
64
|
"@types/node": "^25.9.3",
|
|
65
65
|
"@types/react": "^19.2",
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
"vue": "~3.5.38"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@mittwald/ext-bridge": "1.6.0-next.
|
|
83
|
-
"@mittwald/flow-react-components": "1.6.0-next.
|
|
82
|
+
"@mittwald/ext-bridge": "1.6.0-next.69",
|
|
83
|
+
"@mittwald/flow-react-components": "1.6.0-next.69",
|
|
84
84
|
"vue": "^3.5.0"
|
|
85
85
|
},
|
|
86
86
|
"flowStatus": "beta",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "b3447d9249d526c4e96abe08458acc6c468084d2"
|
|
88
88
|
}
|