thread-ui 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/content-display/carousel/carousel.js +2 -1
- package/dist/components/content-display/carousel/carousel.js.map +1 -1
- package/dist/components/content-display/gallery/components/item-display/gallery-item.js +4 -4
- package/dist/components/content-display/gallery/components/item-display/gallery-item.js.map +1 -1
- package/dist/components/content-display/gallery/components/item-track/track-item.js +3 -2
- package/dist/components/content-display/gallery/components/item-track/track-item.js.map +1 -1
- package/dist/components/content-display/gallery/gallery-context.d.ts +13 -4
- package/dist/components/content-display/gallery/gallery-display-constants.d.ts +2 -1
- package/dist/components/content-display/gallery/gallery-display-constants.js.map +1 -1
- package/dist/components/content-display/gallery/gallery.d.ts +1 -1
- package/dist/components/content-display/gallery/gallery.js +8 -3
- package/dist/components/content-display/gallery/gallery.js.map +1 -1
- package/dist/components/content-display/gallery/gallery.types.d.ts +7 -6
- package/dist/components/content-display/lightbox/components/lightbox-content.js +2 -2
- package/dist/components/content-display/lightbox/components/lightbox-content.js.map +1 -1
- package/dist/components/content-display/lightbox/lightbox-context.d.ts +4 -2
- package/dist/components/content-display/lightbox/lightbox.d.ts +1 -1
- package/dist/components/content-display/lightbox/lightbox.js +25 -13
- package/dist/components/content-display/lightbox/lightbox.js.map +1 -1
- package/dist/components/content-display/lightbox/lightbox.types.d.ts +3 -1
- package/dist/components/media-display/index.d.ts +1 -0
- package/dist/components/media-display/index.js +1 -0
- package/dist/components/media-display/index.js.map +1 -1
- package/dist/components/media-display/media-overlay/index.d.ts +2 -0
- package/dist/components/media-display/media-overlay/index.js +2 -0
- package/dist/components/media-display/media-overlay/index.js.map +1 -0
- package/dist/components/media-display/media-overlay/media-overlay.d.ts +15 -0
- package/dist/components/media-display/media-overlay/media-overlay.js +92 -0
- package/dist/components/media-display/media-overlay/media-overlay.js.map +1 -0
- package/dist/components/media-display/media-overlay/media-overlay.types.d.ts +19 -0
- package/dist/components/media-display/media-overlay/media-overlay.types.js +2 -0
- package/dist/components/media-display/media-overlay/media-overlay.types.js.map +1 -0
- package/dist/components/navigation/nav-menu/components/nav-drop-down-item.js +63 -43
- package/dist/components/navigation/nav-menu/components/nav-drop-down-item.js.map +1 -1
- package/dist/components/navigation/nav-menu/components/nav-item.d.ts +5 -1
- package/dist/components/navigation/nav-menu/components/nav-item.js +2 -2
- package/dist/components/navigation/nav-menu/components/nav-item.js.map +1 -1
- package/dist/components/navigation/nav-menu/components/{nav-link/nav-link.types.d.ts → nav-link.d.ts} +1 -0
- package/dist/components/navigation/nav-menu/components/{nav-link/nav-link.js → nav-link.js} +4 -3
- package/dist/components/navigation/nav-menu/components/nav-link.js.map +1 -0
- package/dist/components/navigation/nav-menu/nav-menu.d.ts +1 -1
- package/dist/components/navigation/nav-menu/nav-menu.js +5 -4
- package/dist/components/navigation/nav-menu/nav-menu.js.map +1 -1
- package/dist/components/ui/modal/modal.js +7 -3
- package/dist/components/ui/modal/modal.js.map +1 -1
- package/dist/components/ui/modal/modal.types.d.ts +3 -1
- package/dist/hooks/use-dismiss/use-dismiss.d.ts +7 -5
- package/dist/hooks/use-dismiss/use-dismiss.js +20 -7
- package/dist/hooks/use-dismiss/use-dismiss.js.map +1 -1
- package/dist/internal-components/modal-primitive/modal-primitive.d.ts +1 -1
- package/dist/internal-components/modal-primitive/modal-primitive.js +20 -8
- package/dist/internal-components/modal-primitive/modal-primitive.js.map +1 -1
- package/dist/internal-components/modal-primitive/modal-primitive.types.d.ts +2 -0
- package/dist/styled-system/tokens/index.js +19 -3
- package/dist/styled-system/tokens/tokens.d.ts +1 -1
- package/dist/styles/panda.css +1 -1
- package/dist/styles/theme.css +3 -1
- package/dist/theme/css-name-configurations/theme-css-names.d.ts +9 -3
- package/dist/theme/css-name-configurations/theme-css-names.js +5 -1
- package/dist/theme/css-name-configurations/theme-css-names.js.map +1 -1
- package/dist/theme/default-theme.js +5 -1
- package/dist/theme/default-theme.js.map +1 -1
- package/dist/types/colors/utility-color-options.types.d.ts +1 -1
- package/dist/types/theme/theme.types.d.ts +9 -4
- package/dist/types/utility/index.d.ts +1 -1
- package/dist/types/utility/type-production.types.d.ts +18 -0
- package/dist/utils/theme-utilities/get-colored-text-color/get-colored-text-color.js +6 -0
- package/dist/utils/theme-utilities/get-colored-text-color/get-colored-text-color.js.map +1 -1
- package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js +1 -0
- package/dist/utils/theme-utilities/get-text-color-styles/get-text-color-styles.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/navigation/nav-menu/components/nav-link/index.d.ts +0 -2
- package/dist/components/navigation/nav-menu/components/nav-link/index.js +0 -2
- package/dist/components/navigation/nav-menu/components/nav-link/index.js.map +0 -1
- package/dist/components/navigation/nav-menu/components/nav-link/nav-link.d.ts +0 -2
- package/dist/components/navigation/nav-menu/components/nav-link/nav-link.js.map +0 -1
- package/dist/components/navigation/nav-menu/components/nav-link/nav-link.types.js +0 -2
- package/dist/components/navigation/nav-menu/components/nav-link/nav-link.types.js.map +0 -1
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ import useEmblaCarousel from 'embla-carousel-react';
|
|
|
5
5
|
import { Card } from '../../../components/ui';
|
|
6
6
|
import { CarouselProvider, CarouselEmblaProvider } from './carousel-context';
|
|
7
7
|
import { CarouselContent } from './components/carousel-content';
|
|
8
|
+
import WheelGesturesPlugin from 'embla-carousel-wheel-gestures';
|
|
8
9
|
// -- Item Wrapper Resolution --
|
|
9
10
|
const FragmentWrapper = ({ children }) => _jsx(_Fragment, { children: children });
|
|
10
11
|
const CardWrapper = ({ children, title }) => (_jsx(Card, { fullWidth: true, title: title ? { text: title } : undefined, size: "md", children: children }));
|
|
@@ -36,7 +37,7 @@ const resolveItemWrapper = (option) => {
|
|
|
36
37
|
*/
|
|
37
38
|
export const Carousel = ({ title, subtitle, description, items: itemList, controlsPosition = 'above', mdCols, lgCols, itemWrapper = 'card', }) => {
|
|
38
39
|
// Embla Config
|
|
39
|
-
const [emblaRef, emblaApi] = useEmblaCarousel();
|
|
40
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({}, [WheelGesturesPlugin()]);
|
|
40
41
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
41
42
|
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
|
42
43
|
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../../../src/components/content-display/carousel/carousel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAa,MAAM,OAAO,CAAC;AAC7E,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,gCAAgC;AAEhC,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAA2B,EAAE,EAAE,CAAC,4BAAG,QAAQ,GAAI,CAAC;AAEnF,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAA2C,EAAE,EAAE,CAAC,CACrF,KAAC,IAAI,IAAC,SAAS,QAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,EAAC,IAAI,YACnE,QAAQ,GACH,CACP,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAA2C,EAAE,EAAE,CAAC,CAC1F,KAAC,IAAI,IAAC,SAAS,QAAC,KAAK,QAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI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
|
defaultVariants: {
|
|
@@ -49,11 +52,8 @@ const styles = {
|
|
|
49
52
|
}),
|
|
50
53
|
};
|
|
51
54
|
export const GalleryItem = ({ itemId }) => {
|
|
52
|
-
const { value: { items,
|
|
55
|
+
const { value: { items, appearance }, } = useGalleryContext();
|
|
53
56
|
const item = items[itemId];
|
|
54
|
-
if (ItemWrapper) {
|
|
55
|
-
return (_jsx("div", { className: styles.container, children: _jsx(ItemWrapper, { children: item.content }) }));
|
|
56
|
-
}
|
|
57
57
|
return (_jsx("div", { className: styles.container, children: _jsx("div", { className: styles.content({ appearance }), children: item.content }) }));
|
|
58
58
|
};
|
|
59
59
|
//# sourceMappingURL=gallery-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery-item.js","sourceRoot":"","sources":["../../../../../../src/components/content-display/gallery/components/item-display/gallery-item.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D,MAAM,MAAM,GAAG;IACd,SAAS,EAAE,GAAG,CAAC;QACd,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE,CAAC;QACb,SAAS,EAAE,0CAA0C,EAAE,6CAA6C;QACpG,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,4CAA4C,EAAE,6CAA6C;KACxG,CAAC;IACF,OAAO,EAAE,GAAG,CAAC;QACZ,IAAI,EAAE;YACL,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,2CAA2C,EAAE,6CAA6C;YAClG,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,QAAQ;YAClB,OAAO,EAAE;gBACR,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE,MAAM;gBACjB,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,SAAS;gBACpB,YAAY,EAAE,IAAI;aAClB;SACD;QACD,QAAQ,EAAE;YACT,UAAU,EAAE;gBACX,MAAM,EAAE;oBACP,eAAe,EAAE,UAAU;oBAC3B,YAAY,EAAE,IAAI;oBAClB,WAAW,EAAE,IAAI;oBACjB,WAAW,EAAE,kBAAkB;iBAC/B;gBACD,IAAI,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"gallery-item.js","sourceRoot":"","sources":["../../../../../../src/components/content-display/gallery/components/item-display/gallery-item.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D,MAAM,MAAM,GAAG;IACd,SAAS,EAAE,GAAG,CAAC;QACd,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE,CAAC;QACb,SAAS,EAAE,0CAA0C,EAAE,6CAA6C;QACpG,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,4CAA4C,EAAE,6CAA6C;KACxG,CAAC;IACF,OAAO,EAAE,GAAG,CAAC;QACZ,IAAI,EAAE;YACL,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,2CAA2C,EAAE,6CAA6C;YAClG,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,QAAQ;YAClB,OAAO,EAAE;gBACR,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE,MAAM;gBACjB,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,SAAS;gBACpB,YAAY,EAAE,IAAI;aAClB;SACD;QACD,QAAQ,EAAE;YACT,UAAU,EAAE;gBACX,MAAM,EAAE;oBACP,eAAe,EAAE,UAAU;oBAC3B,YAAY,EAAE,IAAI;oBAClB,WAAW,EAAE,IAAI;oBACjB,WAAW,EAAE,kBAAkB;iBAC/B;gBACD,IAAI,EAAE,EAAE;gBACR,OAAO,EAAE;oBACR,YAAY,EAAE,IAAI;iBAClB;aACD;SACD;QACD,eAAe,EAAE;YAChB,UAAU,EAAE,QAAQ;SACpB;KACD,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,EAAoB,EAAE,EAAE;IAC3D,MAAM,EACL,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,GAC5B,GAAG,iBAAiB,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B,OAAO,CACN,cAAK,SAAS,EAAE,MAAM,CAAC,SAAS,YAC/B,cAAK,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,YAAG,IAAI,CAAC,OAAO,GAAO,GAC/D,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -44,6 +44,7 @@ const styles = {
|
|
|
44
44
|
borderStyle: 'solid',
|
|
45
45
|
},
|
|
46
46
|
bare: {},
|
|
47
|
+
rounded: {},
|
|
47
48
|
},
|
|
48
49
|
},
|
|
49
50
|
defaultVariants: {
|
|
@@ -52,9 +53,9 @@ const styles = {
|
|
|
52
53
|
}),
|
|
53
54
|
};
|
|
54
55
|
export const TrackItem = ({ itemId }) => {
|
|
55
|
-
const { value: {
|
|
56
|
+
const { value: { trackItems, appearance, variableWidths }, } = useGalleryContext();
|
|
56
57
|
const { onTrackItemClick } = useGalleryEmblaContext();
|
|
57
|
-
const item =
|
|
58
|
+
const item = trackItems[itemId];
|
|
58
59
|
return (_jsx("button", { className: styles.container({ variableWidths }), onClick: () => onTrackItemClick(itemId), children: _jsx("div", { className: styles.internalContent({ appearance }), children: item.content }) }));
|
|
59
60
|
};
|
|
60
61
|
//# sourceMappingURL=track-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track-item.js","sourceRoot":"","sources":["../../../../../../src/components/content-display/gallery/components/item-track/track-item.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,
|
|
1
|
+
{"version":3,"file":"track-item.js","sourceRoot":"","sources":["../../../../../../src/components/content-display/gallery/components/item-track/track-item.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAOlF,MAAM,MAAM,GAAG;IACd,SAAS,EAAE,GAAG,CAAC;QACd,IAAI,EAAE;YACL,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,GAAG;YACb,WAAW,EAAE,0CAA0C,EAAE,6CAA6C;YACtG,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,OAAO;SACpB;QACD,QAAQ,EAAE;YACT,cAAc,EAAE;gBACf,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;gBAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;aAC3B;SACD;KACD,CAAC;IACF,eAAe,EAAE,GAAG,CAAC;QACpB,IAAI,EAAE;YACL,YAAY,EAAE,IAAI;YAClB,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,yCAAyC,EAAE;YACvE,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE;gBACR,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,SAAS;aACpB;SACD;QACD,QAAQ,EAAE;YACT,UAAU,EAAE;gBACX,MAAM,EAAE;oBACP,eAAe,EAAE,SAAS;oBAC1B,WAAW,EAAE,kBAAkB;oBAC/B,WAAW,EAAE,IAAI;oBACjB,WAAW,EAAE,OAAO;iBACpB;gBACD,IAAI,EAAE,EAAE;gBACR,OAAO,EAAE,EAAE;aACX;SACD;QACD,eAAe,EAAE;YAChB,UAAU,EAAE,QAAQ;SACpB;KACD,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,MAAM,EAAkB,EAAE,EAAE;IACvD,MAAM,EACL,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,GACjD,GAAG,iBAAiB,EAAE,CAAC;IACxB,MAAM,EAAE,gBAAgB,EAAE,GAAG,sBAAsB,EAAE,CAAC;IAEtD,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAEhC,OAAO,CACN,iBACC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC,EAC/C,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,YAEvC,cAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC,YAAG,IAAI,CAAC,OAAO,GAAO,GACpE,CACT,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -46,10 +46,13 @@ export declare const GalleryProvider: {
|
|
|
46
46
|
id: import("./gallery.types").GalleryItemId;
|
|
47
47
|
content: import("./gallery.types").GalleryItem;
|
|
48
48
|
}>;
|
|
49
|
-
|
|
49
|
+
trackItems: Record<import("./gallery.types").GalleryItemId, {
|
|
50
|
+
id: import("./gallery.types").GalleryItemId;
|
|
51
|
+
content: import("./gallery.types").GalleryItem;
|
|
52
|
+
}>;
|
|
50
53
|
itemOrder: import("./gallery.types").GalleryItemId[];
|
|
51
54
|
};
|
|
52
|
-
syncedKeys?: ("title" | "size" | "items" | "appearance" | "subtitle" | "itemOrder" | "
|
|
55
|
+
syncedKeys?: ("title" | "size" | "items" | "appearance" | "subtitle" | "itemOrder" | "trackItems" | "variableWidths")[] | undefined;
|
|
53
56
|
children: import("react").ReactNode;
|
|
54
57
|
}): import("react/jsx-runtime").JSX.Element;
|
|
55
58
|
displayName: string;
|
|
@@ -99,7 +102,10 @@ export declare const GalleryProvider: {
|
|
|
99
102
|
id: import("./gallery.types").GalleryItemId;
|
|
100
103
|
content: import("./gallery.types").GalleryItem;
|
|
101
104
|
}>;
|
|
102
|
-
|
|
105
|
+
trackItems: Record<import("./gallery.types").GalleryItemId, {
|
|
106
|
+
id: import("./gallery.types").GalleryItemId;
|
|
107
|
+
content: import("./gallery.types").GalleryItem;
|
|
108
|
+
}>;
|
|
103
109
|
itemOrder: import("./gallery.types").GalleryItemId[];
|
|
104
110
|
};
|
|
105
111
|
setValue: import("react").Dispatch<import("react").SetStateAction<{
|
|
@@ -147,7 +153,10 @@ export declare const GalleryProvider: {
|
|
|
147
153
|
id: import("./gallery.types").GalleryItemId;
|
|
148
154
|
content: import("./gallery.types").GalleryItem;
|
|
149
155
|
}>;
|
|
150
|
-
|
|
156
|
+
trackItems: Record<import("./gallery.types").GalleryItemId, {
|
|
157
|
+
id: import("./gallery.types").GalleryItemId;
|
|
158
|
+
content: import("./gallery.types").GalleryItem;
|
|
159
|
+
}>;
|
|
151
160
|
itemOrder: import("./gallery.types").GalleryItemId[];
|
|
152
161
|
}>>;
|
|
153
162
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThreadCssName } from '../../../theme/css-name-configurations/theme-css-names';
|
|
1
2
|
export declare const GALLERY_DISPLAY_CONSTANTS: {
|
|
2
3
|
readonly displayItemHeight: "100%";
|
|
3
4
|
readonly displayItemSpacing: "1rem";
|
|
@@ -6,4 +7,4 @@ export declare const GALLERY_DISPLAY_CONSTANTS: {
|
|
|
6
7
|
readonly itemTrackSpacing: "0.8rem";
|
|
7
8
|
};
|
|
8
9
|
export type DisplayConstantsKeys = keyof typeof GALLERY_DISPLAY_CONSTANTS;
|
|
9
|
-
export declare const GALLERY_DISPLAY_CONSTANT_NAMES: Record<DisplayConstantsKeys,
|
|
10
|
+
export declare const GALLERY_DISPLAY_CONSTANT_NAMES: Record<DisplayConstantsKeys, ThreadCssName>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery-display-constants.js","sourceRoot":"","sources":["../../../../src/components/content-display/gallery/gallery-display-constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gallery-display-constants.js","sourceRoot":"","sources":["../../../../src/components/content-display/gallery/gallery-display-constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,iBAAiB,EAAE,MAAM;IACzB,kBAAkB,EAAE,MAAM;IAC1B,gBAAgB,EAAE,MAAM;IACxB,eAAe,EAAE,MAAM;IACvB,gBAAgB,EAAE,QAAQ;CACgB,CAAC;AAI5C,MAAM,CAAC,MAAM,8BAA8B,GAAgD;IAC1F,iBAAiB,EAAE,sCAAsC;IACzD,kBAAkB,EAAE,uCAAuC;IAC3D,gBAAgB,EAAE,qCAAqC;IACvD,eAAe,EAAE,oCAAoC;IACrD,gBAAgB,EAAE,qCAAqC;CACvD,CAAC"}
|
|
@@ -15,4 +15,4 @@ import { GalleryProps } from './gallery.types';
|
|
|
15
15
|
* />
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export declare const Gallery: ({ title, subtitle, items: itemList,
|
|
18
|
+
export declare const Gallery: ({ title, subtitle, items: itemList, size, appearance, startIndex, variableWidths, trackItems: trackItemList, }: GalleryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,7 +21,7 @@ import { WheelGesturesPlugin } from 'embla-carousel-wheel-gestures';
|
|
|
21
21
|
* />
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export const Gallery = ({ title, subtitle, items: itemList,
|
|
24
|
+
export const Gallery = ({ title, subtitle, items: itemList, size = 'lg', appearance = 'framed', startIndex = 0, variableWidths = false, trackItems: trackItemList, }) => {
|
|
25
25
|
const [emblaDisplayRef, emblaDisplayApi] = useEmblaCarousel({ startIndex });
|
|
26
26
|
const [emblaItemTrackRef, emblaItemTrackApi] = useEmblaCarousel({
|
|
27
27
|
startIndex,
|
|
@@ -50,20 +50,25 @@ export const Gallery = ({ title, subtitle, items: itemList, itemWrapper, size =
|
|
|
50
50
|
content: item,
|
|
51
51
|
id: index,
|
|
52
52
|
})), [itemList]);
|
|
53
|
+
const normalizedTrackItems = useMemo(() => (trackItemList ?? itemList).map((item, index) => ({
|
|
54
|
+
content: item,
|
|
55
|
+
id: index,
|
|
56
|
+
})), [trackItemList, itemList]);
|
|
53
57
|
const initialState = useMemo(() => {
|
|
54
58
|
const items = Object.fromEntries(normalizedItems.map((item) => [item.id, item]));
|
|
59
|
+
const trackItems = Object.fromEntries(normalizedTrackItems.map((item) => [item.id, item]));
|
|
55
60
|
const itemOrder = normalizedItems.map((item) => item.id);
|
|
56
61
|
return {
|
|
57
62
|
title,
|
|
58
63
|
subtitle,
|
|
59
64
|
items,
|
|
65
|
+
trackItems,
|
|
60
66
|
itemOrder,
|
|
61
|
-
ItemWrapper: itemWrapper,
|
|
62
67
|
size,
|
|
63
68
|
appearance,
|
|
64
69
|
variableWidths,
|
|
65
70
|
};
|
|
66
|
-
}, [title, normalizedItems, size]);
|
|
71
|
+
}, [title, normalizedItems, normalizedTrackItems, size]);
|
|
67
72
|
const emblaValue = useMemo(() => ({
|
|
68
73
|
emblaDisplayRef,
|
|
69
74
|
emblaDisplayApi,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/components/content-display/gallery/gallery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACvB,KAAK,EACL,QAAQ,EACR,KAAK,EAAE,QAAQ,EACf,
|
|
1
|
+
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/components/content-display/gallery/gallery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACvB,KAAK,EACL,QAAQ,EACR,KAAK,EAAE,QAAQ,EACf,IAAI,GAAG,IAAI,EACX,UAAU,GAAG,QAAQ,EACrB,UAAU,GAAG,CAAC,EACd,cAAc,GAAG,KAAK,EACtB,UAAU,EAAE,aAAa,GACX,EAAE,EAAE;IAClB,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC,GAAG,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,CA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BAAgB;QAChB,aAAa;KACb,CACD,CAAC;IAEF,OAAO,CACN,KAAC,eAAe,IAAC,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,YAAY,YACtF,KAAC,oBAAoB,IAAC,KAAK,EAAE,UAAU,YACtC,KAAC,cAAc,KAAG,GACI,GACN,CAClB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { Prettify, UtilitySizeOptions } from '../../../types';
|
|
3
3
|
import { EmblaViewportRefType } from 'embla-carousel-react';
|
|
4
4
|
import { EmblaCarouselType } from 'embla-carousel';
|
|
@@ -10,15 +10,16 @@ export type GalleryItem = ReactNode;
|
|
|
10
10
|
* Controls the visual treatment of gallery item containers.
|
|
11
11
|
* - `'framed'` — Adds background, border, and border-radius to each item.
|
|
12
12
|
* - `'bare'` — Renders items without any decorative container styles.
|
|
13
|
+
* - `'rounded'` — No background or border, but rounds the clip box so overlaid media keeps rounded corners.
|
|
13
14
|
*/
|
|
14
|
-
export type GalleryAppearanceOptions = 'framed' | 'bare';
|
|
15
|
+
export type GalleryAppearanceOptions = 'framed' | 'bare' | 'rounded';
|
|
15
16
|
export type GalleryProps = Prettify<ContentTitle & {
|
|
16
17
|
/** Visual treatment for item containers @default `'framed'` */
|
|
17
18
|
appearance?: GalleryAppearanceOptions;
|
|
18
|
-
/** Array of
|
|
19
|
+
/** Array of items to render as slides, in display order */
|
|
19
20
|
items: GalleryItem[];
|
|
20
|
-
/**
|
|
21
|
-
|
|
21
|
+
/** Alternate content for the gallery track — must match `items` by index */
|
|
22
|
+
trackItems?: GalleryItem[];
|
|
22
23
|
/** Controls the gallery's dimensional presets @default `'lg'` */
|
|
23
24
|
size?: UtilitySizeOptions | 'fill';
|
|
24
25
|
/** Index of Item Gallery opens at Start @default 0 */
|
|
@@ -32,7 +33,7 @@ type InternalGalleryItem = {
|
|
|
32
33
|
};
|
|
33
34
|
export type GalleryState = Prettify<Pick<GalleryProps, 'title' | 'subtitle'> & Required<Pick<GalleryProps, 'size' | 'appearance' | 'variableWidths'>> & {
|
|
34
35
|
items: Record<GalleryItemId, InternalGalleryItem>;
|
|
35
|
-
|
|
36
|
+
trackItems: Record<GalleryItemId, InternalGalleryItem>;
|
|
36
37
|
itemOrder: GalleryItemId[];
|
|
37
38
|
}>;
|
|
38
39
|
export type GalleryEmblaContext = {
|
|
@@ -13,7 +13,7 @@ const styles = {
|
|
|
13
13
|
}),
|
|
14
14
|
};
|
|
15
15
|
export const LightBoxContent = () => {
|
|
16
|
-
const { items,
|
|
17
|
-
return (_jsx("div", { className: styles.container, children: _jsx(Gallery, { startIndex: startIndex, title: _jsx(LightboxTitle, {}), items: items,
|
|
16
|
+
const { items, trackItems, appearance, startIndex, variableWidths } = useLightboxContext();
|
|
17
|
+
return (_jsx("div", { className: styles.container, children: _jsx(Gallery, { startIndex: startIndex, title: _jsx(LightboxTitle, {}), items: items, trackItems: trackItems, size: "fill", appearance: appearance, variableWidths: variableWidths }) }));
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=lightbox-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightbox-content.js","sourceRoot":"","sources":["../../../../../src/components/content-display/lightbox/components/lightbox-content.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,MAAM,GAAG;IACd,SAAS,EAAE,GAAG,CAAC;QACd,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE;QACvC,QAAQ,EAAE,QAAQ;KAClB,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"lightbox-content.js","sourceRoot":"","sources":["../../../../../src/components/content-display/lightbox/components/lightbox-content.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,MAAM,GAAG;IACd,SAAS,EAAE,GAAG,CAAC;QACd,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE;QACvC,QAAQ,EAAE,QAAQ;KAClB,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAE3F,OAAO,CACN,cAAK,SAAS,EAAE,MAAM,CAAC,SAAS,YAC/B,KAAC,OAAO,IACP,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAC,aAAa,KAAG,EACxB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,GAC7B,GACG,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -8,12 +8,13 @@ export declare const LightboxProvider: import("react").Provider<{
|
|
|
8
8
|
subtitle?: import("react").ReactNode;
|
|
9
9
|
}, ((props: import("../..").TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element) | ((props: import("../..").TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element) | ((props: import("../..").TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element) | ((props: import("../..").TypographyHeadingProps) => import("react/jsx-runtime").JSX.Element)>) | undefined;
|
|
10
10
|
items: import("../gallery/gallery.types").GalleryItem[];
|
|
11
|
-
itemWrapper?: import("react").ComponentType<any> | undefined;
|
|
12
11
|
startIndex?: number | undefined;
|
|
12
|
+
trackItems?: import("../gallery/gallery.types").GalleryItem[] | undefined;
|
|
13
13
|
onClose: () => void;
|
|
14
14
|
isOpen: boolean;
|
|
15
15
|
appearance?: import("../gallery/gallery.types").GalleryAppearanceOptions | undefined;
|
|
16
16
|
variableWidths?: boolean | undefined;
|
|
17
|
+
scrimLevel?: import("../../..").ScrimScaleOptions | undefined;
|
|
17
18
|
} | undefined>, useLightboxContext: () => {
|
|
18
19
|
title?: (string | import("react").ReactElement<{
|
|
19
20
|
align?: "left" | "center" | undefined;
|
|
@@ -52,10 +53,11 @@ export declare const LightboxProvider: import("react").Provider<{
|
|
|
52
53
|
subtitle?: import("react").ReactNode;
|
|
53
54
|
}) => import("react/jsx-runtime").JSX.Element)>) | undefined;
|
|
54
55
|
items: import("../gallery/gallery.types").GalleryItem[];
|
|
55
|
-
itemWrapper?: import("react").ComponentType<any> | undefined;
|
|
56
56
|
startIndex?: number | undefined;
|
|
57
|
+
trackItems?: import("../gallery/gallery.types").GalleryItem[] | undefined;
|
|
57
58
|
onClose: () => void;
|
|
58
59
|
isOpen: boolean;
|
|
59
60
|
appearance?: import("../gallery/gallery.types").GalleryAppearanceOptions | undefined;
|
|
60
61
|
variableWidths?: boolean | undefined;
|
|
62
|
+
scrimLevel?: import("../../..").ScrimScaleOptions | undefined;
|
|
61
63
|
};
|
|
@@ -14,4 +14,4 @@ import { LightboxProps } from './lightbox.types';
|
|
|
14
14
|
* />
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export declare const Lightbox: ({ title, items,
|
|
17
|
+
export declare const Lightbox: ({ title, items, isOpen, onClose, startIndex, appearance, variableWidths, scrimLevel, trackItems, }: LightboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ModalPrimitive } from '../../../internal-components';
|
|
3
3
|
import { LightboxProvider } from './lightbox-context';
|
|
4
|
-
import {
|
|
4
|
+
import { cva } from '../../../styled-system/css';
|
|
5
5
|
import { LightBoxContent } from './components/lightbox-content';
|
|
6
6
|
const styles = {
|
|
7
|
-
overlay:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
overlay: cva({
|
|
8
|
+
base: {
|
|
9
|
+
position: 'fixed',
|
|
10
|
+
inset: 0,
|
|
11
|
+
background: 'scrim.heavy',
|
|
12
|
+
display: 'flex',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
zIndex: 'modal',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
padding: '6',
|
|
17
|
+
},
|
|
18
|
+
variants: {
|
|
19
|
+
scrimLevel: {
|
|
20
|
+
light: { background: 'scrim.light' },
|
|
21
|
+
medium: { background: 'scrim.medium' },
|
|
22
|
+
heavy: { background: 'scrim.heavy' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
scrimLevel: 'heavy',
|
|
27
|
+
},
|
|
16
28
|
}),
|
|
17
29
|
};
|
|
18
30
|
/**
|
|
@@ -30,17 +42,17 @@ const styles = {
|
|
|
30
42
|
* />
|
|
31
43
|
* ```
|
|
32
44
|
*/
|
|
33
|
-
export const Lightbox = ({ title, items,
|
|
45
|
+
export const Lightbox = ({ title, items, isOpen, onClose, startIndex, appearance = 'rounded', variableWidths = true, scrimLevel = 'heavy', trackItems, }) => {
|
|
34
46
|
const initialValue = {
|
|
35
47
|
title,
|
|
36
48
|
items,
|
|
37
|
-
itemWrapper,
|
|
38
49
|
isOpen,
|
|
39
50
|
onClose,
|
|
40
51
|
startIndex,
|
|
41
52
|
appearance,
|
|
42
53
|
variableWidths,
|
|
54
|
+
trackItems,
|
|
43
55
|
};
|
|
44
|
-
return (_jsx(LightboxProvider, { value: initialValue, children: _jsx(ModalPrimitive, { overlayClassName: styles.overlay, isOpen: isOpen, onClose: onClose, children: _jsx(LightBoxContent, {}) }) }));
|
|
56
|
+
return (_jsx(LightboxProvider, { value: initialValue, children: _jsx(ModalPrimitive, { overlayClassName: styles.overlay({ scrimLevel }), isOpen: isOpen, onClose: onClose, children: _jsx(LightBoxContent, {}) }) }));
|
|
45
57
|
};
|
|
46
58
|
//# sourceMappingURL=lightbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightbox.js","sourceRoot":"","sources":["../../../../src/components/content-display/lightbox/lightbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"lightbox.js","sourceRoot":"","sources":["../../../../src/components/content-display/lightbox/lightbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAO,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,MAAM,MAAM,GAAG;IACd,OAAO,EAAE,GAAG,CAAC;QACZ,IAAI,EAAE;YACL,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC;YACR,UAAU,EAAE,aAAa;YACzB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,GAAG;SACZ;QACD,QAAQ,EAAE;YACT,UAAU,EAAE;gBACX,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE;gBACpC,MAAM,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE;gBACtC,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE;aACpC;SACD;QACD,eAAe,EAAE;YAChB,UAAU,EAAE,OAAO;SACnB;KACD,CAAC;CACF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACxB,KAAK,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,GAAG,SAAS,EACtB,cAAc,GAAG,IAAI,EACrB,UAAU,GAAG,OAAO,EACpB,UAAU,GACK,EAAE,EAAE;IACnB,MAAM,YAAY,GAAkB;QACnC,KAAK;QACL,KAAK;QACL,MAAM;QACN,OAAO;QACP,UAAU;QACV,UAAU;QACV,cAAc;QACd,UAAU;KACV,CAAC;IAEF,OAAO,CACN,KAAC,gBAAgB,IAAC,KAAK,EAAE,YAAY,YACpC,KAAC,cAAc,IACd,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,EAChD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,YAEhB,KAAC,eAAe,KAAG,GACH,GACC,CACnB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Prettify } from '../../../types';
|
|
1
|
+
import { Prettify, ScrimScaleOptions } from '../../../types';
|
|
2
2
|
import { GalleryProps } from '../gallery';
|
|
3
3
|
import { ModalProps } from '../../../components/ui';
|
|
4
4
|
import { GalleryAppearanceOptions } from '../gallery/gallery.types';
|
|
@@ -7,5 +7,7 @@ export type LightboxProps = Prettify<Omit<GalleryProps, 'size' | 'subtitle' | 'a
|
|
|
7
7
|
appearance?: GalleryAppearanceOptions;
|
|
8
8
|
/** Control Auto-Width within track thumbnails @default `true` */
|
|
9
9
|
variableWidths?: boolean;
|
|
10
|
+
/** Scrim Background Opacity @default `heavy` */
|
|
11
|
+
scrimLevel?: ScrimScaleOptions;
|
|
10
12
|
}>;
|
|
11
13
|
export type LightboxState = LightboxProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/media-display/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/media-display/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/media-display/media-overlay/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MediaOverlayProps } from './media-overlay.types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders an overlay layer on top of arbitrary media, with a configurable scrim, placement, and size caps.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <MediaOverlay
|
|
7
|
+
* scrimLevel="medium"
|
|
8
|
+
* placement="bottom"
|
|
9
|
+
* maxHeight="50%"
|
|
10
|
+
* overlay={<Title>Caption</Title>}
|
|
11
|
+
* >
|
|
12
|
+
* <img src="/photo.jpg" alt="Photo" />
|
|
13
|
+
* </MediaOverlay>
|
|
14
|
+
*/
|
|
15
|
+
export declare const MediaOverlay: ({ children, overlay, scrimLevel, placement, fit, maxHeight, maxWidth, }: MediaOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from '../../../styled-system/css';
|
|
3
|
+
const MAX_HEIGHT_CSS_NAME = '--thread-media-overlay-max-height';
|
|
4
|
+
const MAX_WIDTH_CSS_NAME = '--thread-media-overlay-max-width';
|
|
5
|
+
const styles = {
|
|
6
|
+
root: cva({
|
|
7
|
+
base: {
|
|
8
|
+
position: 'relative',
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
borderRadius: 'inherit',
|
|
11
|
+
_hover: {
|
|
12
|
+
'& [data-overlay]': {
|
|
13
|
+
opacity: 1,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
fit: {
|
|
19
|
+
contain: {
|
|
20
|
+
'& > :first-child': {
|
|
21
|
+
display: 'block',
|
|
22
|
+
width: '100%',
|
|
23
|
+
height: '100%',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
fill: {
|
|
27
|
+
display: 'inline-flex',
|
|
28
|
+
height: '100%',
|
|
29
|
+
maxWidth: '100%',
|
|
30
|
+
maxHeight: '100%',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
fit: 'contain',
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
overlay: cva({
|
|
39
|
+
base: {
|
|
40
|
+
position: 'absolute',
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'column',
|
|
43
|
+
justifyContent: 'flex-end',
|
|
44
|
+
padding: 'md',
|
|
45
|
+
opacity: 0,
|
|
46
|
+
transition: 'opacity 200ms ease',
|
|
47
|
+
color: 'white',
|
|
48
|
+
borderRadius: 'inherit',
|
|
49
|
+
maxHeight: 'var(--thread-media-overlay-max-height, 100%)',
|
|
50
|
+
maxWidth: 'var(--thread-media-overlay-max-width, 100%)',
|
|
51
|
+
overflow: 'hidden',
|
|
52
|
+
},
|
|
53
|
+
variants: {
|
|
54
|
+
scrimLevel: {
|
|
55
|
+
none: { background: 'transparent' },
|
|
56
|
+
light: { background: 'scrim.light' },
|
|
57
|
+
medium: { background: 'scrim.medium' },
|
|
58
|
+
heavy: { background: 'scrim.heavy' },
|
|
59
|
+
},
|
|
60
|
+
placement: {
|
|
61
|
+
full: { inset: 0 },
|
|
62
|
+
top: { top: 0, left: 0, right: 0 },
|
|
63
|
+
bottom: { bottom: 0, left: 0, right: 0 },
|
|
64
|
+
left: { top: 0, bottom: 0, left: 0 },
|
|
65
|
+
right: { top: 0, bottom: 0, right: 0 },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
defaultVariants: {
|
|
69
|
+
placement: 'full',
|
|
70
|
+
},
|
|
71
|
+
}),
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Renders an overlay layer on top of arbitrary media, with a configurable scrim, placement, and size caps.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* <MediaOverlay
|
|
78
|
+
* scrimLevel="medium"
|
|
79
|
+
* placement="bottom"
|
|
80
|
+
* maxHeight="50%"
|
|
81
|
+
* overlay={<Title>Caption</Title>}
|
|
82
|
+
* >
|
|
83
|
+
* <img src="/photo.jpg" alt="Photo" />
|
|
84
|
+
* </MediaOverlay>
|
|
85
|
+
*/
|
|
86
|
+
export const MediaOverlay = ({ children, overlay, scrimLevel = 'medium', placement, fit = 'contain', maxHeight, maxWidth, }) => {
|
|
87
|
+
return (_jsxs("div", { className: styles.root({ fit }), children: [children, _jsx("div", { "data-overlay": true, className: styles.overlay({ scrimLevel, placement }), style: {
|
|
88
|
+
...(maxHeight ? { [MAX_HEIGHT_CSS_NAME]: maxHeight } : {}),
|
|
89
|
+
...(maxWidth ? { [MAX_WIDTH_CSS_NAME]: maxWidth } : {}),
|
|
90
|
+
}, children: overlay })] }));
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=media-overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-overlay.js","sourceRoot":"","sources":["../../../../src/components/media-display/media-overlay/media-overlay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAO,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAI/C,MAAM,mBAAmB,GAAkB,mCAAmC,CAAC;AAC/E,MAAM,kBAAkB,GAAkB,kCAAkC,CAAC;AAE7E,MAAM,MAAM,GAAG;IACd,IAAI,EAAE,GAAG,CAAC;QACT,IAAI,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,SAAS;YACvB,MAAM,EAAE;gBACP,kBAAkB,EAAE;oBACnB,OAAO,EAAE,CAAC;iBACV;aACD;SACD;QACD,QAAQ,EAAE;YACT,GAAG,EAAE;gBACJ,OAAO,EAAE;oBACR,kBAAkB,EAAE;wBACnB,OAAO,EAAE,OAAO;wBAChB,KAAK,EAAE,MAAM;wBACb,MAAM,EAAE,MAAM;qBACd;iBACD;gBACD,IAAI,EAAE;oBACL,OAAO,EAAE,aAAa;oBACtB,MAAM,EAAE,MAAM;oBACd,QAAQ,EAAE,MAAM;oBAChB,SAAS,EAAE,MAAM;iBACjB;aACD;SACD;QACD,eAAe,EAAE;YAChB,GAAG,EAAE,SAAS;SACd;KACD,CAAC;IACF,OAAO,EAAE,GAAG,CAAC;QACZ,IAAI,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,cAAc,EAAE,UAAU;YAC1B,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,CAAC;YACV,UAAU,EAAE,oBAAoB;YAChC,KAAK,EAAE,OAAO;YACd,YAAY,EAAE,SAAS;YACvB,SAAS,EAAE,8CAA8C;YACzD,QAAQ,EAAE,6CAA6C;YACv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AAE,CAAC,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC1D,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAChC,YAGxB,OAAO,GACH,IACD,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ScrimScaleOptions } from '../../../types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type OverlayPlacementOptions = 'full' | 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export type MediaOverlayProps = {
|
|
5
|
+
/** The media (or any content) rendered underneath the overlay. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** The content rendered in the overlay layer on top of the media. */
|
|
8
|
+
overlay: ReactNode;
|
|
9
|
+
/** Scrim Background Opacity @default `medium` */
|
|
10
|
+
scrimLevel?: 'none' | ScrimScaleOptions;
|
|
11
|
+
/** Scrim Overlay Position @default `full` */
|
|
12
|
+
placement?: OverlayPlacementOptions;
|
|
13
|
+
/** Caps overlay height. Any CSS length. @default `100%` */
|
|
14
|
+
maxHeight?: string;
|
|
15
|
+
/** Caps overlay width. Any CSS length. @default `100%` */
|
|
16
|
+
maxWidth?: string;
|
|
17
|
+
/** Media sizing mode. @default `contain` */
|
|
18
|
+
fit?: 'contain' | 'fill';
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-overlay.types.js","sourceRoot":"","sources":["../../../../src/components/media-display/media-overlay/media-overlay.types.ts"],"names":[],"mappings":""}
|