@12-apps/ui 6.45.1 → 6.45.2

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Lightbox,
3
3
  Lightbox_default
4
- } from "../../../../chunk-IIXMTC65.js";
4
+ } from "../../../../chunk-SPZAEMGW.js";
5
5
  import "../../../../chunk-UOS7DEQZ.js";
6
6
  import "../../../../chunk-HJPPNVCF.js";
7
7
  import "../../../../chunk-M6PWPEAV.js";
@@ -97,7 +97,7 @@ import "../../../chunk-724ZONOL.js";
97
97
  import "../../../chunk-UM35GGCS.js";
98
98
  import {
99
99
  Lightbox_default
100
- } from "../../../chunk-IIXMTC65.js";
100
+ } from "../../../chunk-SPZAEMGW.js";
101
101
  import "../../../chunk-UOS7DEQZ.js";
102
102
  import "../../../chunk-HJPPNVCF.js";
103
103
  import "../../../chunk-M6PWPEAV.js";
@@ -525,7 +525,7 @@ import "../../chunk-724ZONOL.js";
525
525
  import "../../chunk-UM35GGCS.js";
526
526
  import {
527
527
  Lightbox_default
528
- } from "../../chunk-IIXMTC65.js";
528
+ } from "../../chunk-SPZAEMGW.js";
529
529
  import "../../chunk-UOS7DEQZ.js";
530
530
  import "../../chunk-HJPPNVCF.js";
531
531
  import "../../chunk-M6PWPEAV.js";
@@ -49,8 +49,14 @@ var DIALOG_STATIC_PROPS = {
49
49
  // second, non-modal `role="dialog"` this component sets of its own accord
50
50
  // — duplicating (and, as a static English literal, contradicting) the name
51
51
  // the Paper already carries.
52
+ //
53
+ // For the same reason, `role` is deliberately NOT set here (FUT-2861):
54
+ // `Dialog` destructures `aria-labelledby` and `aria-modal` by name and
55
+ // applies them to the Paper alongside its own hard-coded `role="dialog"`,
56
+ // but `role` itself is not one of the props it destructures — a `role`
57
+ // passed here falls into `...other` and lands a second, unlabelled
58
+ // `role="dialog"` on the outer Modal root instead of the Paper.
52
59
  "aria-labelledby": "lightbox-title",
53
- role: "dialog",
54
60
  "aria-modal": "true"
55
61
  };
56
62
  var Lightbox = React.forwardRef((componentProps, ref) => {
@@ -142,4 +148,4 @@ export {
142
148
  Lightbox,
143
149
  Lightbox_default
144
150
  };
145
- //# sourceMappingURL=chunk-IIXMTC65.js.map
151
+ //# sourceMappingURL=chunk-SPZAEMGW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Lightbox/Lightbox.tsx"],"sourcesContent":["import Dialog from '@mui/material/Dialog/index.js';\nimport Fade from '@mui/material/Fade/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { makeTestId } from './Lightbox.constants';\nimport { resolveLightboxProps } from './Lightbox.helpers';\nimport { LightboxCopyProvider } from './lightbox-copy-context';\nimport type { LightboxProps, LightboxRef } from './Lightbox.types';\nimport { LightboxCurrentMedia } from './LightboxCurrentMedia';\nimport { LightboxOverlay } from './LightboxOverlay';\nimport { LightboxStage } from './LightboxStage';\nimport { LightboxThumbnails } from './LightboxThumbnails';\nimport { useLightbox } from './useLightbox';\nimport { scrim } from '../../../tokens/ink';\nimport { rem, sxRem } from '../../../tokens/relative';\n\nconst DIALOG_STATIC_PROPS = {\n maxWidth: false,\n fullScreen: true,\n TransitionComponent: Fade,\n TransitionProps: { timeout: 300 },\n PaperProps: { sx: { background: (theme: Theme) => scrim(theme, 0.9), backdropFilter: (theme: Theme) => `blur(${rem(theme, 2)})` } },\n // `aria-labelledby` is the one accessible name for the modal itself: MUI\n // forwards it (with `aria-modal` and its own `role=\"dialog\"`) onto the\n // Paper, the element that is actually the WAI-ARIA dialog. A plain\n // `aria-label` alongside it would land on the OUTER root instead — a\n // second, non-modal `role=\"dialog\"` this component sets of its own accord\n // — duplicating (and, as a static English literal, contradicting) the name\n // the Paper already carries.\n //\n // For the same reason, `role` is deliberately NOT set here (FUT-2861):\n // `Dialog` destructures `aria-labelledby` and `aria-modal` by name and\n // applies them to the Paper alongside its own hard-coded `role=\"dialog\"`,\n // but `role` itself is not one of the props it destructures — a `role`\n // passed here falls into `...other` and lands a second, unlabelled\n // `role=\"dialog\"` on the outer Modal root instead of the Paper.\n 'aria-labelledby': 'lightbox-title',\n 'aria-modal': 'true',\n} as const;\n\nexport const Lightbox = React.forwardRef<LightboxRef, LightboxProps>((componentProps, ref) => {\n const props = resolveLightboxProps(componentProps);\n const { isOpen, items, loop, autoplay, showControls, showCaptions, thumbnails, zoomable } = props;\n const { className, style, dataTestId } = props;\n\n const testId = makeTestId(dataTestId);\n const lightbox = useLightbox(props, ref);\n const { currentIndex, currentItem, zoom } = lightbox;\n\n return (\n <LightboxCopyProvider copy={props.copy}>\n <Dialog\n open={isOpen}\n onClose={lightbox.close}\n {...DIALOG_STATIC_PROPS}\n className={className}\n style={style}\n onTouchStart={lightbox.handleTouchStart}\n onTouchEnd={lightbox.handleTouchEnd}\n data-testid={dataTestId || 'lightbox'}\n >\n {/* Visually hidden title for screen readers */}\n <Typography id=\"lightbox-title\" variant=\"h6\" sx={{ position: 'absolute', left: sxRem(-10000) }}>\n {props.copy.dialogLabel} - {currentItem?.alt || props.copy.itemPosition(currentIndex + 1, items.length)}\n </Typography>\n\n <LightboxOverlay\n testId={testId}\n itemCount={items.length}\n currentIndex={currentIndex}\n showControls={showControls}\n loop={loop}\n autoplay={autoplay}\n canZoom={lightbox.canZoom}\n isAutoPlaying={lightbox.isAutoPlaying}\n onClose={lightbox.close}\n onPrev={lightbox.prev}\n onNext={lightbox.next}\n onZoomIn={zoom.zoomIn}\n onZoomOut={zoom.zoomOut}\n onResetZoom={zoom.resetZoom}\n onToggleAutoplay={() => lightbox.setIsAutoPlaying((playing) => !playing)}\n />\n\n <LightboxStage\n items={items}\n currentItem={currentItem}\n currentIndex={currentIndex}\n isLoading={lightbox.isLoading}\n showCaptions={showCaptions}\n thumbnails={thumbnails}\n testId={testId}\n media={\n <LightboxCurrentMedia\n item={currentItem}\n index={currentIndex}\n total={items.length}\n zoomable={zoomable}\n zoom={zoom}\n testId={testId}\n onLoadingChange={lightbox.setIsLoading}\n onWheel={lightbox.handleWheel}\n />\n }\n thumbnailStrip={\n thumbnails &&\n items.length > 1 && (\n <LightboxThumbnails\n items={items}\n currentIndex={currentIndex}\n testId={testId}\n onSelect={lightbox.goToIndex}\n />\n )\n }\n />\n </Dialog>\n </LightboxCopyProvider>\n );\n});\n\nLightbox.displayName = 'Lightbox';\n\nexport default Lightbox;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AAEvB,OAAO,WAAW;AA4DZ,SAIA,KAJA;AA9CN,IAAM,sBAAsB;AAAA,EAC1B,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB,iBAAiB,EAAE,SAAS,IAAI;AAAA,EAChC,YAAY,EAAE,IAAI,EAAE,YAAY,CAAC,UAAiB,MAAM,OAAO,GAAG,GAAG,gBAAgB,CAAC,UAAiB,QAAQ,IAAI,OAAO,CAAC,CAAC,IAAI,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAelI,mBAAmB;AAAA,EACnB,cAAc;AAChB;AAEO,IAAM,WAAW,MAAM,WAAuC,CAAC,gBAAgB,QAAQ;AAC5F,QAAM,QAAQ,qBAAqB,cAAc;AACjD,QAAM,EAAE,QAAQ,OAAO,MAAM,UAAU,cAAc,cAAc,YAAY,SAAS,IAAI;AAC5F,QAAM,EAAE,WAAW,OAAO,WAAW,IAAI;AAEzC,QAAM,SAAS,WAAW,UAAU;AACpC,QAAM,WAAW,YAAY,OAAO,GAAG;AACvC,QAAM,EAAE,cAAc,aAAa,KAAK,IAAI;AAE5C,SACE,oBAAC,wBAAqB,MAAM,MAAM,MAClC;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,SAAS,SAAS;AAAA,M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,SAAS,cAAc;AAEvB,IAAO,mBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import "../chunk-UM35GGCS.js";
2
2
  import {
3
3
  Lightbox_default
4
- } from "../chunk-IIXMTC65.js";
4
+ } from "../chunk-SPZAEMGW.js";
5
5
  import "../chunk-UOS7DEQZ.js";
6
6
  import "../chunk-HJPPNVCF.js";
7
7
  import "../chunk-M6PWPEAV.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Lightbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Lightbox/Lightbox.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA2BnE,eAAO,MAAM,QAAQ,mFA+EnB,CAAC;AAIH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Lightbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Lightbox/Lightbox.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAiCnE,eAAO,MAAM,QAAQ,mFA+EnB,CAAC;AAIH,eAAe,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/ui",
3
- "version": "6.45.1",
3
+ "version": "6.45.2",
4
4
  "license": "MIT",
5
5
  "packageManager": "pnpm@10.34.5",
6
6
  "type": "module",
@@ -29,8 +29,14 @@ const DIALOG_STATIC_PROPS = {
29
29
  // second, non-modal `role="dialog"` this component sets of its own accord
30
30
  // — duplicating (and, as a static English literal, contradicting) the name
31
31
  // the Paper already carries.
32
+ //
33
+ // For the same reason, `role` is deliberately NOT set here (FUT-2861):
34
+ // `Dialog` destructures `aria-labelledby` and `aria-modal` by name and
35
+ // applies them to the Paper alongside its own hard-coded `role="dialog"`,
36
+ // but `role` itself is not one of the props it destructures — a `role`
37
+ // passed here falls into `...other` and lands a second, unlabelled
38
+ // `role="dialog"` on the outer Modal root instead of the Paper.
32
39
  'aria-labelledby': 'lightbox-title',
33
- role: 'dialog',
34
40
  'aria-modal': 'true',
35
41
  } as const;
36
42
 
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/Lightbox/Lightbox.tsx"],"sourcesContent":["import Dialog from '@mui/material/Dialog/index.js';\nimport Fade from '@mui/material/Fade/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { makeTestId } from './Lightbox.constants';\nimport { resolveLightboxProps } from './Lightbox.helpers';\nimport { LightboxCopyProvider } from './lightbox-copy-context';\nimport type { LightboxProps, LightboxRef } from './Lightbox.types';\nimport { LightboxCurrentMedia } from './LightboxCurrentMedia';\nimport { LightboxOverlay } from './LightboxOverlay';\nimport { LightboxStage } from './LightboxStage';\nimport { LightboxThumbnails } from './LightboxThumbnails';\nimport { useLightbox } from './useLightbox';\nimport { scrim } from '../../../tokens/ink';\nimport { rem, sxRem } from '../../../tokens/relative';\n\nconst DIALOG_STATIC_PROPS = {\n maxWidth: false,\n fullScreen: true,\n TransitionComponent: Fade,\n TransitionProps: { timeout: 300 },\n PaperProps: { sx: { background: (theme: Theme) => scrim(theme, 0.9), backdropFilter: (theme: Theme) => `blur(${rem(theme, 2)})` } },\n // `aria-labelledby` is the one accessible name for the modal itself: MUI\n // forwards it (with `aria-modal` and its own `role=\"dialog\"`) onto the\n // Paper, the element that is actually the WAI-ARIA dialog. A plain\n // `aria-label` alongside it would land on the OUTER root instead — a\n // second, non-modal `role=\"dialog\"` this component sets of its own accord\n // — duplicating (and, as a static English literal, contradicting) the name\n // the Paper already carries.\n 'aria-labelledby': 'lightbox-title',\n role: 'dialog',\n 'aria-modal': 'true',\n} as const;\n\nexport const Lightbox = React.forwardRef<LightboxRef, LightboxProps>((componentProps, ref) => {\n const props = resolveLightboxProps(componentProps);\n const { isOpen, items, loop, autoplay, showControls, showCaptions, thumbnails, zoomable } = props;\n const { className, style, dataTestId } = props;\n\n const testId = makeTestId(dataTestId);\n const lightbox = useLightbox(props, ref);\n const { currentIndex, currentItem, zoom } = lightbox;\n\n return (\n <LightboxCopyProvider copy={props.copy}>\n <Dialog\n open={isOpen}\n onClose={lightbox.close}\n {...DIALOG_STATIC_PROPS}\n className={className}\n style={style}\n onTouchStart={lightbox.handleTouchStart}\n onTouchEnd={lightbox.handleTouchEnd}\n data-testid={dataTestId || 'lightbox'}\n >\n {/* Visually hidden title for screen readers */}\n <Typography id=\"lightbox-title\" variant=\"h6\" sx={{ position: 'absolute', left: sxRem(-10000) }}>\n {props.copy.dialogLabel} - {currentItem?.alt || props.copy.itemPosition(currentIndex + 1, items.length)}\n </Typography>\n\n <LightboxOverlay\n testId={testId}\n itemCount={items.length}\n currentIndex={currentIndex}\n showControls={showControls}\n loop={loop}\n autoplay={autoplay}\n canZoom={lightbox.canZoom}\n isAutoPlaying={lightbox.isAutoPlaying}\n onClose={lightbox.close}\n onPrev={lightbox.prev}\n onNext={lightbox.next}\n onZoomIn={zoom.zoomIn}\n onZoomOut={zoom.zoomOut}\n onResetZoom={zoom.resetZoom}\n onToggleAutoplay={() => lightbox.setIsAutoPlaying((playing) => !playing)}\n />\n\n <LightboxStage\n items={items}\n currentItem={currentItem}\n currentIndex={currentIndex}\n isLoading={lightbox.isLoading}\n showCaptions={showCaptions}\n thumbnails={thumbnails}\n testId={testId}\n media={\n <LightboxCurrentMedia\n item={currentItem}\n index={currentIndex}\n total={items.length}\n zoomable={zoomable}\n zoom={zoom}\n testId={testId}\n onLoadingChange={lightbox.setIsLoading}\n onWheel={lightbox.handleWheel}\n />\n }\n thumbnailStrip={\n thumbnails &&\n items.length > 1 && (\n <LightboxThumbnails\n items={items}\n currentIndex={currentIndex}\n testId={testId}\n onSelect={lightbox.goToIndex}\n />\n )\n }\n />\n </Dialog>\n </Lightbo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