@kaizen/components 1.38.1 → 1.38.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.
- package/dist/cjs/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs +21 -7
- package/dist/cjs/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs.map +1 -1
- package/dist/cjs/Tabs/subcomponents/TabList.cjs +3 -2
- package/dist/cjs/Tabs/subcomponents/TabList.cjs.map +1 -1
- package/dist/cjs/index.css +2 -2
- package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs +21 -7
- package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs.map +1 -1
- package/dist/esm/Tabs/subcomponents/TabList.mjs +3 -2
- package/dist/esm/Tabs/subcomponents/TabList.mjs.map +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/Avatar/_docs/Avatar.mdx +1 -2
- package/src/AvatarGroup/_docs/AvatarGroup.mdx +1 -2
- package/src/Badge/_docs/Badge.mdx +1 -2
- package/src/Brand/_docs/Brand.mdx +1 -2
- package/src/BrandMoment/_docs/BrandMoment.mdx +1 -2
- package/src/Button/Button/_docs/Button.mdx +1 -2
- package/src/Button/IconButton/_docs/IconButton.mdx +1 -2
- package/src/Calendar/CalendarRange/_docs/CalendarRange.mdx +1 -2
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx +1 -2
- package/src/Card/_docs/Card.mdx +1 -2
- package/src/Checkbox/Checkbox/_docs/Checkbox.mdx +1 -2
- package/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx +1 -2
- package/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx +1 -2
- package/src/Collapsible/Collapsible/_docs/Collapsible.mdx +1 -2
- package/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx +2 -2
- package/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx +1 -2
- package/src/Container/_docs/Container.mdx +1 -2
- package/src/Content/_docs/Content.mdx +1 -2
- package/src/DatePicker/_docs/DatePicker.mdx +1 -2
- package/src/DateRangePicker/_docs/DateRangePicker.mdx +1 -2
- package/src/Divider/_docs/Divider.mdx +1 -2
- package/src/EmptyState/_docs/EmptyState.mdx +1 -2
- package/src/FieldGroup/_docs/FieldGroup.mdx +1 -2
- package/src/FieldMessage/_docs/FieldMessage.mdx +1 -2
- package/src/Filter/Filter/_docs/Filter.mdx +1 -2
- package/src/Filter/FilterBar/_docs/FilterBar.mdx +1 -2
- package/src/Filter/FilterButton/_docs/filter-buttons.mdx +1 -2
- package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx +1 -2
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx +1 -2
- package/src/Filter/FilterSelect/_docs/FilterSelect.mdx +1 -2
- package/src/GuidanceBlock/_docs/GuidanceBlock.mdx +1 -2
- package/src/Heading/_docs/Heading.mdx +1 -2
- package/src/Icon/_docs/Icon.mdx +1 -2
- package/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx +1 -2
- package/src/Illustration/Scene/_docs/Scene.mdx +1 -2
- package/src/Illustration/Spot/_docs/Spot.mdx +1 -2
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.spec.tsx +2 -37
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx +20 -9
- package/src/Illustration/subcomponents/VideoPlayer/__snapshots__/VideoPlayer.spec.tsx.snap +30 -0
- package/src/Input/Input/_docs/Input.mdx +1 -2
- package/src/Input/InputRange/_docs/InputRange.mdx +1 -2
- package/src/Input/InputSearch/_docs/InputSearch.mdx +1 -2
- package/src/KaizenProvider/_docs/KaizenProvider.mdx +0 -2
- package/src/Label/_docs/Label.mdx +1 -2
- package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx +1 -2
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx +1 -2
- package/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx +1 -2
- package/src/Loading/LoadingInput/_docs/LoadingInput.mdx +1 -2
- package/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx +1 -2
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +1 -2
- package/src/Menu/_docs/Menu.mdx +1 -2
- package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +1 -2
- package/src/Modal/ContextModal/_docs/ContextModal.mdx +1 -2
- package/src/Modal/GenericModal/_docs/GenericModal.mdx +1 -2
- package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +1 -2
- package/src/MultiSelect/_docs/MultiSelect.mdx +2 -2
- package/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx +1 -2
- package/src/Notification/InlineNotification/_docs/InlineNotification.mdx +1 -2
- package/src/Notification/ToastNotification/_docs/ToastNotification.mdx +1 -2
- package/src/Pagination/_docs/Pagination.mdx +1 -2
- package/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx +1 -2
- package/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx +1 -2
- package/src/Popover/_docs/Popover.mdx +1 -2
- package/src/ProgressBar/_docs/ProgressBar.mdx +1 -2
- package/src/Radio/Radio/_docs/Radio.mdx +1 -2
- package/src/Radio/RadioField/_docs/RadioField.mdx +1 -2
- package/src/Radio/RadioGroup/_docs/RadioGroup.mdx +1 -2
- package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx +1 -2
- package/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx +1 -2
- package/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx +1 -2
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.mdx +1 -2
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.mdx +1 -2
- package/src/SearchField/_docs/SearchField.mdx +1 -2
- package/src/Select/_docs/Select.mdx +1 -2
- package/src/Skirt/_docs/Skirt.mdx +1 -2
- package/src/Slider/_docs/Slider.mdx +1 -2
- package/src/SplitButton/_docs/SplitButton.mdx +1 -2
- package/src/Table/_docs/Table.mdx +2 -3
- package/src/Tabs/_docs/Tabs.mdx +1 -2
- package/src/Tabs/subcomponents/TabList.tsx +6 -1
- package/src/Tag/_docs/Tag.mdx +1 -2
- package/src/Text/_docs/Text.mdx +1 -2
- package/src/TextArea/_docs/TextArea.mdx +1 -2
- package/src/TextAreaField/_docs/TextAreaField.mdx +1 -2
- package/src/TextField/_docs/TextField.mdx +1 -2
- package/src/Tile/InformationTile/_docs/InformationTile.mdx +1 -2
- package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +1 -2
- package/src/Tile/TileGrid/_docs/TileGrid.mdx +1 -2
- package/src/TimeField/_docs/TimeField.mdx +1 -2
- package/src/TitleBlockZen/_docs/TitleBlockZen.mdx +1 -2
- package/src/ToggleSwitch/ToggleSwitch/_docs/ToggleSwitch.mdx +1 -2
- package/src/ToggleSwitch/ToggleSwitchField/_docs/ToggleSwitchField.mdx +1 -2
- package/src/Tooltip/_docs/Tooltip.mdx +1 -2
- package/src/VisuallyHidden/_docs/VisuallyHidden.mdx +1 -2
- package/src/Well/_docs/Well.mdx +1 -2
- package/src/Workflow/_docs/Workflow.mdx +1 -2
- package/src/__future__/Select/_docs/Select.mdx +1 -2
- package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.mdx +1 -2
- package/src/__future__/Tag/Tag/_docs/Tag.mdx +1 -2
- package/src/__future__/Workflow/_docs/ProgressStepper.mdx +1 -2
- package/src/__future__/Workflow/_docs/Workflow.mdx +1 -2
- package/src/__future__/Workflow/_docs/WorkflowFooter.mdx +1 -2
- package/src/__future__/Workflow/_docs/WorkflowHeader.mdx +1 -2
|
@@ -22,6 +22,9 @@ var VideoPlayer = function (_a) {
|
|
|
22
22
|
var _e = React.useState(true),
|
|
23
23
|
prefersReducedMotion = _e[0],
|
|
24
24
|
setPrefersReducedMotion = _e[1];
|
|
25
|
+
var _f = React.useState(),
|
|
26
|
+
sourceEl = _f[0],
|
|
27
|
+
setSourceEl = _f[1];
|
|
25
28
|
React.useEffect(function () {
|
|
26
29
|
/**
|
|
27
30
|
* Setting `muted` on the player is required in Safari/Webkit and older
|
|
@@ -102,6 +105,23 @@ var VideoPlayer = function (_a) {
|
|
|
102
105
|
videoElement.removeEventListener("ended", onEnded);
|
|
103
106
|
};
|
|
104
107
|
}, [videoRef]);
|
|
108
|
+
React.useEffect(function () {
|
|
109
|
+
/**
|
|
110
|
+
* This seems counter-intuitive, but webm support is codec specific.
|
|
111
|
+
* Only offer webm if we are positive the browser supports it.
|
|
112
|
+
* Reference: https://bugs.webkit.org/show_bug.cgi?id=216652#c1
|
|
113
|
+
*/
|
|
114
|
+
canPlayWebm.canPlayWebm() ? setSourceEl(React.createElement(React.Fragment, null, React.createElement("source", {
|
|
115
|
+
src: hostedAssets.assetUrl("".concat(source, ".webm")),
|
|
116
|
+
type: "video/webm"
|
|
117
|
+
}), React.createElement("source", {
|
|
118
|
+
src: hostedAssets.assetUrl("".concat(source, ".mp4")),
|
|
119
|
+
type: "video/mp4"
|
|
120
|
+
}))) : React.createElement("source", {
|
|
121
|
+
src: hostedAssets.assetUrl("".concat(source, ".mp4")),
|
|
122
|
+
type: "video/mp4"
|
|
123
|
+
});
|
|
124
|
+
}, [setSourceEl]);
|
|
105
125
|
var pausePlay = usePausePlay.usePausePlay(videoRef);
|
|
106
126
|
return React.createElement("figure", {
|
|
107
127
|
className: classnames(Base_module.figure, (_b = {}, _b["".concat(Base_module[aspectRatio], " ").concat(Base_module.aspectRatioWrapper)] = Boolean(aspectRatio), _b))
|
|
@@ -118,13 +138,7 @@ var VideoPlayer = function (_a) {
|
|
|
118
138
|
autoPlay: prefersReducedMotion ? false : autoplay,
|
|
119
139
|
playsInline: true,
|
|
120
140
|
tabIndex: -1
|
|
121
|
-
},
|
|
122
|
-
src: hostedAssets.assetUrl("".concat(source, ".webm")),
|
|
123
|
-
type: "video/webm"
|
|
124
|
-
}), React.createElement("source", {
|
|
125
|
-
src: hostedAssets.assetUrl("".concat(source, ".mp4")),
|
|
126
|
-
type: "video/mp4"
|
|
127
|
-
})), React.createElement(IconButton.IconButton, {
|
|
141
|
+
}, sourceEl), React.createElement(IconButton.IconButton, {
|
|
128
142
|
onClick: function () {
|
|
129
143
|
return pausePlay.toggle();
|
|
130
144
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayer.cjs","sources":["../../../../../src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\"\nimport classnames from \"classnames\"\nimport { assetUrl } from \"@kaizen/hosted-assets\"\nimport { IconButton } from \"~components/Button\"\nimport { canPlayWebm } from \"../../utils/canPlayWebm\"\nimport { usePausePlay } from \"../../utils/usePausePlay\"\nimport styles from \"../Base/Base.module.scss\"\n\nexport type VideoPlayerProps = {\n /**\n * Specifies whether the animation plays as soon as it is rendered.\n * If the user has enabled prefer-reduced-motion their preferences\n * take precedent over this prop.\n */\n autoplay?: boolean\n\n /**\n * Replay from start when active animation reaches the end of the animation.\n */\n loop?: boolean\n\n /**\n * Fallback image. Used when rendering of the asset fails, or as a\n * poster for the video player.\n */\n fallback: string\n\n /**\n * The path of the animation source, excluding the file extension. This\n * Player will preference Webm over mp4.\n */\n source: string\n\n /**\n * Aspect ratio that is set on the illustration in Scene/Spot which wraps the\n * component in a container, forcing the aspect ratio.\n */\n aspectRatio?: \"landscape\" | \"portrait\" | \"square\"\n\n onEnded?: () => void\n}\n\nexport const VideoPlayer = ({\n autoplay = true,\n loop = false,\n fallback,\n source,\n aspectRatio,\n onEnded,\n}: VideoPlayerProps): JSX.Element => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const [prefersReducedMotion, setPrefersReducedMotion] =\n React.useState<boolean>(true)\n\n useEffect(() => {\n /**\n * Setting `muted` on the player is required in Safari/Webkit and older\n * versions of Chome for the video to autoplay (regardless of whether\n * the format contains an audio stream or not).\n *\n * React does not guarentee the `muted` attribute is set on the\n * `video` element. So on load we force set this attribute. See issue:\n * https://github.com/facebook/react/issues/10389\n */\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.setAttribute(\"muted\", \"\")\n }\n }, [])\n\n useEffect(() => {\n // when the source of the animation is updated, we need to reload the asset\n // to ensure the video player is in sync with the new source.\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.load()\n }\n }, [source])\n\n useEffect(() => {\n if (!window) return\n\n const reducedMotionQuery = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(reducedMotionQuery.matches)\n const updateMotionPreferences = (): void => {\n const { matches = false } = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(matches)\n }\n\n const isLegacyEdge = navigator.userAgent.match(/Edge/)\n\n const isUnsupportedSafari =\n window.matchMedia(\"\").addEventListener === undefined\n\n if (isLegacyEdge || isUnsupportedSafari) return\n\n reducedMotionQuery.addEventListener(\"change\", updateMotionPreferences, true)\n\n return function cleanup() {\n reducedMotionQuery.removeEventListener(\"change\", updateMotionPreferences)\n }\n }, [])\n\n useEffect(() => {\n const { current: videoElement } = videoRef\n if (!videoElement) return\n\n if (prefersReducedMotion) {\n videoElement.pause()\n } else if (autoplay && !prefersReducedMotion) {\n try {\n // Older browsers may not return a promise, so .play could return undefined\n videoElement.play()?.catch(() => {\n /*\n * An DOMException _may_ be raised by some browsers if we\n * programatically interact with the video before the\n * user has interacted with the page. This is okay - so\n * we're going to catch this error without handling it. See:\n * https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_availability\n */\n })\n } catch (e) {\n /**\n * Older browsers will raise a synchronous error because their first implementation\n * of `.play` was not a promise.\n */\n }\n }\n /**\n * Chrome seems to have an issue with changes to autoplay after the video\n * has been mounted. If there is a change in autoplay we need to force the\n * play() method to be called.\n */\n }, [prefersReducedMotion, autoplay])\n\n useEffect(() => {\n // Add event listeners for the video element\n const { current: videoElement } = videoRef\n if (!videoElement || !onEnded) return\n\n videoElement.addEventListener(\"ended\", onEnded)\n\n return function cleanup() {\n videoElement.removeEventListener(\"ended\", onEnded)\n }\n }, [videoRef])\n\n const pausePlay = usePausePlay(videoRef)\n\n return (\n <figure\n className={classnames(styles.figure, {\n [`${styles[aspectRatio!]} ${styles.aspectRatioWrapper}`]:\n Boolean(aspectRatio),\n })}\n >\n <video\n muted={true}\n aria-hidden={true}\n preload=\"metadata\"\n ref={videoRef}\n width=\"100%\"\n data-testid=\"kz-video-player\"\n className={styles.wrapper}\n loop={loop}\n poster={assetUrl(`${fallback}.png`)}\n autoPlay={prefersReducedMotion ? false : autoplay}\n playsInline={true}\n tabIndex={-1}\n >\n {/**\n * This seems counter-intuitive, but webm support is codec specific.\n * Only offer webm if we are positive the browser supports it.\n * Reference: https://bugs.webkit.org/show_bug.cgi?id=216652#c1\n */}\n {canPlayWebm() && (\n <source src={assetUrl(`${source}.webm`)} type=\"video/webm\" />\n )}\n <source src={assetUrl(`${source}.mp4`)} type=\"video/mp4\" />\n </video>\n <IconButton\n onClick={(): void => pausePlay.toggle()}\n icon={pausePlay.icon}\n label={pausePlay.label}\n classNameOverride={styles.pausePlayButton}\n />\n </figure>\n )\n}\n"],"names":["VideoPlayer","_a","_c","autoplay","_d","loop","fallback","source","aspectRatio","onEnded","videoRef","useRef","_e","React","useState","prefersReducedMotion","setPrefersReducedMotion","useEffect","videoElement","current","setAttribute","load","window","reducedMotionQuery","matchMedia","matches","updateMotionPreferences","isLegacyEdge","navigator","userAgent","match","isUnsupportedSafari","addEventListener","undefined","cleanup","removeEventListener","pause","play","catch","e","pausePlay","usePausePlay","className","classnames","styles","figure","_b","concat","aspectRatioWrapper","Boolean","createElement","muted","preload","ref","width","wrapper","poster","assetUrl","autoPlay","playsInline","tabIndex","canPlayWebm","src","type","IconButton","onClick","toggle","icon","label","classNameOverride","paus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AAE,CAAC;EAAC,CAAA,EAOXC,WAAW,CAAAA,WAAA,CAAA,CAAE,IACZhD,KAAQ,CAAAqC,aAAA,CAAA,QAAA,EAAA;IAAAY,GAAG,EAAEL,YAAQ,CAAAA,QAAA,CAAC,EAAG,CAAAV,MAAA,CAAAxC,MAAM,UAAO,CAAC;IAAEwD,IAAI,EAAC;EAAY,EAC3D,EACDlD,KAAA,CAAAqC,aAAA,CAAA,QAAA,EAAA;IAAQY,GAAG,EAAEL,YAAQ,CAAAA,QAAA,CAAC,EAAG,CAAAV,MAAA,CAAAxC,MAAM,EAAM,MAAA,CAAA,CAAC;IAAEwD,IAAI,EAAC;IAAc,CACrD,EACRlD,KAAA,CAAAqC,aAAA,CAACc,UAAAA,CAAAA,UAAU,EAAA;IACTC,OAAO,EAAE,SAAAA,CAAA;MAAY,OAAAzB,SAAS,CAAC0B,MAAM,CAAA,CAAE;IAAA,CAAA;IACvCC,IAAI,EAAE3B,SAAS,CAAC2B,IAAI;IACpBC,KAAK,EAAE5B,SAAS,CAAC4B,KAAK;IACtBC,iBAAiB,EAAEzB,WAAM,CAAC0B;EAC1B,CAAA,CAAA,CACK;AAEb,CAAA;"}
|
|
1
|
+
{"version":3,"file":"VideoPlayer.cjs","sources":["../../../../../src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\"\nimport classnames from \"classnames\"\nimport { assetUrl } from \"@kaizen/hosted-assets\"\nimport { IconButton } from \"~components/Button\"\nimport { canPlayWebm } from \"../../utils/canPlayWebm\"\nimport { usePausePlay } from \"../../utils/usePausePlay\"\nimport styles from \"../Base/Base.module.scss\"\n\nexport type VideoPlayerProps = {\n /**\n * Specifies whether the animation plays as soon as it is rendered.\n * If the user has enabled prefer-reduced-motion their preferences\n * take precedent over this prop.\n */\n autoplay?: boolean\n\n /**\n * Replay from start when active animation reaches the end of the animation.\n */\n loop?: boolean\n\n /**\n * Fallback image. Used when rendering of the asset fails, or as a\n * poster for the video player.\n */\n fallback: string\n\n /**\n * The path of the animation source, excluding the file extension. This\n * Player will preference Webm over mp4.\n */\n source: string\n\n /**\n * Aspect ratio that is set on the illustration in Scene/Spot which wraps the\n * component in a container, forcing the aspect ratio.\n */\n aspectRatio?: \"landscape\" | \"portrait\" | \"square\"\n\n onEnded?: () => void\n}\n\nexport const VideoPlayer = ({\n autoplay = true,\n loop = false,\n fallback,\n source,\n aspectRatio,\n onEnded,\n}: VideoPlayerProps): JSX.Element => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const [prefersReducedMotion, setPrefersReducedMotion] =\n React.useState<boolean>(true)\n const [sourceEl, setSourceEl] = React.useState<React.ReactNode>()\n\n useEffect(() => {\n /**\n * Setting `muted` on the player is required in Safari/Webkit and older\n * versions of Chome for the video to autoplay (regardless of whether\n * the format contains an audio stream or not).\n *\n * React does not guarentee the `muted` attribute is set on the\n * `video` element. So on load we force set this attribute. See issue:\n * https://github.com/facebook/react/issues/10389\n */\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.setAttribute(\"muted\", \"\")\n }\n }, [])\n\n useEffect(() => {\n // when the source of the animation is updated, we need to reload the asset\n // to ensure the video player is in sync with the new source.\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.load()\n }\n }, [source])\n\n useEffect(() => {\n if (!window) return\n\n const reducedMotionQuery = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(reducedMotionQuery.matches)\n const updateMotionPreferences = (): void => {\n const { matches = false } = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(matches)\n }\n\n const isLegacyEdge = navigator.userAgent.match(/Edge/)\n\n const isUnsupportedSafari =\n window.matchMedia(\"\").addEventListener === undefined\n\n if (isLegacyEdge || isUnsupportedSafari) return\n\n reducedMotionQuery.addEventListener(\"change\", updateMotionPreferences, true)\n\n return function cleanup() {\n reducedMotionQuery.removeEventListener(\"change\", updateMotionPreferences)\n }\n }, [])\n\n useEffect(() => {\n const { current: videoElement } = videoRef\n if (!videoElement) return\n\n if (prefersReducedMotion) {\n videoElement.pause()\n } else if (autoplay && !prefersReducedMotion) {\n try {\n // Older browsers may not return a promise, so .play could return undefined\n videoElement.play()?.catch(() => {\n /*\n * An DOMException _may_ be raised by some browsers if we\n * programatically interact with the video before the\n * user has interacted with the page. This is okay - so\n * we're going to catch this error without handling it. See:\n * https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_availability\n */\n })\n } catch (e) {\n /**\n * Older browsers will raise a synchronous error because their first implementation\n * of `.play` was not a promise.\n */\n }\n }\n /**\n * Chrome seems to have an issue with changes to autoplay after the video\n * has been mounted. If there is a change in autoplay we need to force the\n * play() method to be called.\n */\n }, [prefersReducedMotion, autoplay])\n\n useEffect(() => {\n // Add event listeners for the video element\n const { current: videoElement } = videoRef\n if (!videoElement || !onEnded) return\n\n videoElement.addEventListener(\"ended\", onEnded)\n\n return function cleanup() {\n videoElement.removeEventListener(\"ended\", onEnded)\n }\n }, [videoRef])\n\n useEffect(() => {\n /**\n * This seems counter-intuitive, but webm support is codec specific.\n * Only offer webm if we are positive the browser supports it.\n * Reference: https://bugs.webkit.org/show_bug.cgi?id=216652#c1\n */\n canPlayWebm() ? (\n setSourceEl(\n <>\n <source src={assetUrl(`${source}.webm`)} type=\"video/webm\" />\n <source src={assetUrl(`${source}.mp4`)} type=\"video/mp4\" />\n </>\n )\n ) : (\n <source src={assetUrl(`${source}.mp4`)} type=\"video/mp4\" />\n )\n }, [setSourceEl])\n\n const pausePlay = usePausePlay(videoRef)\n\n return (\n <figure\n className={classnames(styles.figure, {\n [`${styles[aspectRatio!]} ${styles.aspectRatioWrapper}`]:\n Boolean(aspectRatio),\n })}\n >\n <video\n muted={true}\n aria-hidden={true}\n preload=\"metadata\"\n ref={videoRef}\n width=\"100%\"\n data-testid=\"kz-video-player\"\n className={styles.wrapper}\n loop={loop}\n poster={assetUrl(`${fallback}.png`)}\n autoPlay={prefersReducedMotion ? false : autoplay}\n playsInline={true}\n tabIndex={-1}\n >\n {sourceEl}\n </video>\n <IconButton\n onClick={(): void => pausePlay.toggle()}\n icon={pausePlay.icon}\n label={pausePlay.label}\n classNameOverride={styles.pausePlayButton}\n />\n </figure>\n )\n}\n"],"names":["VideoPlayer","_a","_c","autoplay","_d","loop","fallback","source","aspectRatio","onEnded","videoRef","useRef","_e","React","useState","prefersReducedMotion","setPrefersReducedMotion","_f","sourceEl","setSourceEl","useEffect","videoElement","current","setAttribute","load","window","reducedMotionQuery","matchMedia","matches","updateMotionPreferences","isLegacyEdge","navigator","userAgent","match","isUnsupportedSafari","addEventListener","undefined","cleanup","removeEventListener","pause","play","catch","e","canPlayWebm","createElement","Fragment","src","assetUrl","concat","type","pausePlay","usePausePlay","className","classnames","styles","figure","_b","aspectRatioWrapper","Boolean","muted","preload","ref","width","wrapper","poster","autoPlay","playsInline","tabIndex","IconButton","onClick","toggle","icon","label","classNameOverride","pausePlayButton"],"mappings":";;;;;;;;;;AA0CO,IAAMA,WAAW,GAAG,SAAAA,CAACC,EAOT,EAAA;;MANjBC,EAAe,GAAAD,EAAA,CAAAE,QAAA;IAAfA,QAAQ,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,IAAI,KAAA;IACfE,EAAA,GAAAH,EAAA,CAAAI,IAAY;IAAZA,IAAI,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,KAAA;IACZE,QAAQ,GAAAL,EAAA,CAAAK,QAAA;IACRC,MAAM,GAAAN,EAAA,CAAAM,MAAA;IACNC,WAAW,GAAAP,EAAA,CAAAO,WAAA;IACXC,OAAO,GAAAR,EAAA,CAAAQ,OAAA;EAEP,IAAMC,QAAQ,GAAGC,YAAM,CAAmB,IAAI,CAAC;EACzC,IAAAC,EACJ,GAAAC,KAAK,CAACC,QAAQ,CAAU,IAAI,CAAC;IADxBC,oBAAoB,GAAAH,EAAA,CAAA,CAAA,CAAA;IAAEI,uBAAuB,QACrB;E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AK,EAAC,MAAM;IAAA,aAAA,EACA,iBAAiB;IAC7BV,SAAS,EAAEE,WAAM,CAACS,OAAO;IACzB1D,IAAI,EAAEA,IAAI;IACV2D,MAAM,EAAEjB,qBAAQ,CAAC,EAAG,CAAAC,MAAA,CAAA1C,QAAQ,EAAM,MAAA,CAAA,CAAC;IACnC2D,QAAQ,EAAElD,oBAAoB,GAAG,KAAK,GAAGZ,QAAQ;IACjD+D,WAAW,EAAE,IAAI;IACjBC,QAAQ,EAAE,CAAC;EAAC,CAAA,EAEXjD,QAAQ,CACH,EACRL,KAAA,CAAA+B,aAAA,CAACwB,UAAAA,CAAAA,UAAU,EAAA;IACTC,OAAO,EAAE,SAAAA,CAAA;MAAY,OAAAnB,SAAS,CAACoB,MAAM,CAAA,CAAE;IAAA,CAAA;IACvCC,IAAI,EAAErB,SAAS,CAACqB,IAAI;IACpBC,KAAK,EAAEtB,SAAS,CAACsB,KAAK;IACtBC,iBAAiB,EAAEnB,WAAM,CAACoB;EAC1B,CAAA,CAAA,CACK;AAEb,CAAA;"}
|
|
@@ -14,10 +14,11 @@ var TabList = function (props) {
|
|
|
14
14
|
_a = props.noPadding,
|
|
15
15
|
noPadding = _a === void 0 ? false : _a,
|
|
16
16
|
children = props.children,
|
|
17
|
-
|
|
17
|
+
classNameOverride = props.classNameOverride,
|
|
18
|
+
restProps = tslib.__rest(props, ["aria-label", "noPadding", "children", "classNameOverride"]);
|
|
18
19
|
return React.createElement(tabs.TabList, tslib.__assign({
|
|
19
20
|
"aria-label": ariaLabel,
|
|
20
|
-
className: classnames(TabList_module.tabList, noPadding && TabList_module.noPadding)
|
|
21
|
+
className: classnames(TabList_module.tabList, classNameOverride, noPadding && TabList_module.noPadding)
|
|
21
22
|
}, restProps), children);
|
|
22
23
|
};
|
|
23
24
|
exports.TabList = TabList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.cjs","sources":["../../../../src/Tabs/subcomponents/TabList.tsx"],"sourcesContent":["import React, { HTMLAttributes, ReactNode } from \"react\"\nimport { TabList as ReachTabList } from \"@reach/tabs\"\nimport classnames from \"classnames\"\nimport { OverrideClassName } from \"~types/OverrideClassName\"\nimport styles from \"./TabList.module.scss\"\n\nexport type TabListProps = {\n /**\n * Accessible name for the set of tabs\n */\n \"aria-label\": string\n /**\n * Removes the built in padding\n */\n noPadding?: boolean\n children: ReactNode\n} & OverrideClassName<HTMLAttributes<HTMLDivElement>>\n\n/**\n * Wrapper for the tabs themselves\n */\nexport const TabList = (props: TabListProps): JSX.Element => {\n const {\n \"aria-label\": ariaLabel,\n noPadding = false,\n children,\n ...restProps\n } = props\n return (\n <ReachTabList\n aria-label={ariaLabel}\n className={classnames(styles.tabList
|
|
1
|
+
{"version":3,"file":"TabList.cjs","sources":["../../../../src/Tabs/subcomponents/TabList.tsx"],"sourcesContent":["import React, { HTMLAttributes, ReactNode } from \"react\"\nimport { TabList as ReachTabList } from \"@reach/tabs\"\nimport classnames from \"classnames\"\nimport { OverrideClassName } from \"~types/OverrideClassName\"\nimport styles from \"./TabList.module.scss\"\n\nexport type TabListProps = {\n /**\n * Accessible name for the set of tabs\n */\n \"aria-label\": string\n /**\n * Removes the built in padding\n */\n noPadding?: boolean\n children: ReactNode\n} & OverrideClassName<HTMLAttributes<HTMLDivElement>>\n\n/**\n * Wrapper for the tabs themselves\n */\nexport const TabList = (props: TabListProps): JSX.Element => {\n const {\n \"aria-label\": ariaLabel,\n noPadding = false,\n children,\n classNameOverride,\n ...restProps\n } = props\n return (\n <ReachTabList\n aria-label={ariaLabel}\n className={classnames(\n styles.tabList,\n classNameOverride,\n noPadding && styles.noPadding\n )}\n {...restProps}\n >\n {children}\n </ReachTabList>\n )\n}\n"],"names":["TabList","props","ariaLabel","_a","noPadding","children","classNameOverride","restProps","__rest","React","createElement","ReachTabList","__assign","className","classnames","styles","tabList"],"mappings":";;;;;;;;AAkBA;;AAEG;AACI,IAAMA,OAAO,GAAG,SAAAA,CAACC,KAAmB,EAAA;EAEvC,IAAcC,SAAS,GAKrBD,KAAK,CAAA,YAAA,CALgB;IACvBE,EAAA,GAIEF,KAAK,CAAAG,SAJU;IAAjBA,SAAS,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,KAAA;IACjBE,QAAQ,GAGNJ,KAAK,CAHCI,QAAA;IACRC,iBAAiB,GAEfL,KAAK,CAAAK,iBAFU;IACdC,SAAS,GACVC,KAAAA,CAAAA,MAAA,CAAAP,KAAK,EANH,CAAA,YAAA,EAAA,WAAA,EAAA,UAAA,EAAA,mBAAA,CAML,CADa;EAEd,OACEQ,KAAA,CAAAC,aAAA,CAACC,YAAY,EAAAC,KAAAA,CAAAA,QAAA,CAAA;IAAA,YAAA,EACCV,SAAS;IACrBW,SAAS,EAAEC,UAAU,CACnBC,cAAM,CAACC,OAAO,EACdV,iBAAiB,EACjBF,SAAS,IAAIW,cAAM,CAACX,SAAS;GAE3B,EAAAG,SAAS,CAEZ,EAAAF,QAAQ,CACI;AAEnB,CAAA;"}
|
package/dist/cjs/index.css
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
.Main-module_main__hMyB1{z-index:0}
|
|
3
3
|
.Wrapper-module_wrapper__89WmC{background:var(--color-gray-100,#f9f9f9);display:grid;grid-template-rows:min-content 1fr min-content;min-height:100vh;position:relative}
|
|
4
4
|
.FooterRoot-module_footerRoot__N-6nQ{align-items:center;background:var(--color-blue-500,#0168b3);display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template-areas:"prev stepper next";grid-template-columns:1fr 2fr 1fr;justify-content:center;padding:var(--spacing-24,1.5rem) var(--spacing-12,.75rem)}@media (min-width:768px){.FooterRoot-module_footerRoot__N-6nQ{bottom:0;grid-template-columns:1fr 5fr 1fr;padding:var(--spacing-24,1.5rem) var(--spacing-32,2rem);position:sticky;z-index:1}}
|
|
5
|
-
.Branding-module_branding__4h-rD{display:flex;flex-grow:1;grid-area:branding;justify-content:center;padding-top:var(--spacing-4,.25rem)}@media (min-width:768px){.Branding-module_branding__4h-rD{justify-content:unset}}.Branding-module_logo__vqqec{flex-basis:7.5rem}
|
|
6
|
-
.Titles-module_titles__JYwU0{align-items:center;flex-grow:1;grid-area:titles;justify-content:center}.Titles-module_pageTitle__YDp9S,.Titles-module_titles__JYwU0{display:flex;flex-direction:column}.Titles-module_prefix__40x8n{margin-bottom:var(--spacing-4,.25rem)}.Titles-module_status__huuP7{margin-top:var(--spacing-8,.5rem)}
|
|
7
5
|
.FooterActions-module_footerAction__v7eL-{display:flex;flex-basis:auto;flex-grow:1}.FooterActions-module_footerActionPrevious__2XByZ{grid-area:"prev";justify-content:start}.FooterActions-module_footerActionNext__IKRta{grid-area:"next";justify-content:end}
|
|
8
6
|
.Actions-module_actions__Prrp0{align-items:center;display:flex;flex-direction:column;flex-grow:1;grid-area:actions;justify-content:center}@media (min-width:768px){.Actions-module_actions__Prrp0{align-items:flex-start;flex-direction:row;justify-content:flex-end;margin-top:calc(var(--spacing-12, .75rem)*-1)}}
|
|
7
|
+
.Titles-module_titles__JYwU0{align-items:center;flex-grow:1;grid-area:titles;justify-content:center}.Titles-module_pageTitle__YDp9S,.Titles-module_titles__JYwU0{display:flex;flex-direction:column}.Titles-module_prefix__40x8n{margin-bottom:var(--spacing-4,.25rem)}.Titles-module_status__huuP7{margin-top:var(--spacing-8,.5rem)}
|
|
8
|
+
.Branding-module_branding__4h-rD{display:flex;flex-grow:1;grid-area:branding;justify-content:center;padding-top:var(--spacing-4,.25rem)}@media (min-width:768px){.Branding-module_branding__4h-rD{justify-content:unset}}.Branding-module_logo__vqqec{flex-basis:7.5rem}
|
|
9
9
|
.ProgressStepper-module_stepsContainer__WMxXN{grid-area:stepper;width:100%}.ProgressStepper-module_stepList__b1wWX{align-items:flex-end;display:none;justify-content:center;list-style:none;margin:0;padding:0}@media (min-width:768px){.ProgressStepper-module_stepList__b1wWX{display:flex}}.ProgressStepper-module_step__-Ep19{container:step/inline-size;display:flex;flex-basis:100%;flex-grow:1;justify-content:center;max-width:var(--spacing-96,6rem);overflow-wrap:break-word;position:relative}.ProgressStepper-module_stepContent__B4uFS{align-items:center;display:flex;flex-direction:column}.ProgressStepper-module_stepIndicator__-qEWT{height:1.25rem;position:relative;width:1.25rem}.ProgressStepper-module_stepName__hS4lp{display:none;font-weight:var(--typography-paragraph-bold-font-weight,600);margin-bottom:var(--spacing-12,.75rem);text-align:center}.ProgressStepper-module_stepIcon__0Kh4y{color:var(--color-white,#fff);height:1.25rem;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:1.25rem}.ProgressStepper-module_stepDivider__KEZPU{border:var(--spacing-1,.0625rem) solid var(--color-white,#fff);border-radius:var(--border-solid-border-radius,7px);display:flex;flex-grow:1;height:0;left:100%;margin:0;min-width:calc(100% - var(--spacing-24, 1.5rem));position:absolute;top:calc(100% - .625rem);transform:translateX(-50%)}[dir=rtl] .ProgressStepper-module_stepDivider__KEZPU{left:unset;right:100%;transform:translateX(50%)}.ProgressStepper-module_stepperDescription__B00hX{display:flex;justify-content:center}@media (min-width:768px){.ProgressStepper-module_stepperDescription__B00hX{height:0;overflow:hidden;position:absolute;width:0}}@container step (min-width: 4.5rem){.ProgressStepper-module_stepName__hS4lp{display:inline}}
|
|
10
10
|
.Root-module_root__7DVw5{align-items:center;background-color:var(--color-white,#fff);box-shadow:var(--shadow-small-box-shadow,0 3px 16px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.1));display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template:"branding" min-content "titles" max-content "actions" min-content/1fr;justify-content:center;padding:var(--spacing-24,1.5rem);text-align:center}@media (min-width:768px){.Root-module_root__7DVw5{align-items:start;grid-template:"branding titles actions" min-content/1fr max-content 1fr;position:sticky;top:0;z-index:1}}
|
|
11
11
|
.SVG-module_icon__8J5Ev{display:inline-block;height:20px;width:20px}.SVG-module_icon__8J5Ev>use{pointer-events:none}@media screen and (-ms-high-contrast:active){.SVG-module_icon__8J5Ev{color:#000}}@media screen and (-ms-high-contrast:white-on-black){.SVG-module_icon__8J5Ev{color:#fff}}@media screen and (-ms-high-contrast:black-on-white){.SVG-module_icon__8J5Ev{color:#000}}.SVG-module_inheritSize__Q8iam{display:block;height:inherit;width:inherit}
|
|
@@ -20,6 +20,9 @@ var VideoPlayer = function (_a) {
|
|
|
20
20
|
var _e = React.useState(true),
|
|
21
21
|
prefersReducedMotion = _e[0],
|
|
22
22
|
setPrefersReducedMotion = _e[1];
|
|
23
|
+
var _f = React.useState(),
|
|
24
|
+
sourceEl = _f[0],
|
|
25
|
+
setSourceEl = _f[1];
|
|
23
26
|
useEffect(function () {
|
|
24
27
|
/**
|
|
25
28
|
* Setting `muted` on the player is required in Safari/Webkit and older
|
|
@@ -100,6 +103,23 @@ var VideoPlayer = function (_a) {
|
|
|
100
103
|
videoElement.removeEventListener("ended", onEnded);
|
|
101
104
|
};
|
|
102
105
|
}, [videoRef]);
|
|
106
|
+
useEffect(function () {
|
|
107
|
+
/**
|
|
108
|
+
* This seems counter-intuitive, but webm support is codec specific.
|
|
109
|
+
* Only offer webm if we are positive the browser supports it.
|
|
110
|
+
* Reference: https://bugs.webkit.org/show_bug.cgi?id=216652#c1
|
|
111
|
+
*/
|
|
112
|
+
canPlayWebm() ? setSourceEl( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("source", {
|
|
113
|
+
src: assetUrl("".concat(source, ".webm")),
|
|
114
|
+
type: "video/webm"
|
|
115
|
+
}), /*#__PURE__*/React.createElement("source", {
|
|
116
|
+
src: assetUrl("".concat(source, ".mp4")),
|
|
117
|
+
type: "video/mp4"
|
|
118
|
+
}))) : ( /*#__PURE__*/React.createElement("source", {
|
|
119
|
+
src: assetUrl("".concat(source, ".mp4")),
|
|
120
|
+
type: "video/mp4"
|
|
121
|
+
}));
|
|
122
|
+
}, [setSourceEl]);
|
|
103
123
|
var pausePlay = usePausePlay(videoRef);
|
|
104
124
|
return /*#__PURE__*/React.createElement("figure", {
|
|
105
125
|
className: classnames(styles.figure, (_b = {}, _b["".concat(styles[aspectRatio], " ").concat(styles.aspectRatioWrapper)] = Boolean(aspectRatio), _b))
|
|
@@ -116,13 +136,7 @@ var VideoPlayer = function (_a) {
|
|
|
116
136
|
autoPlay: prefersReducedMotion ? false : autoplay,
|
|
117
137
|
playsInline: true,
|
|
118
138
|
tabIndex: -1
|
|
119
|
-
},
|
|
120
|
-
src: assetUrl("".concat(source, ".webm")),
|
|
121
|
-
type: "video/webm"
|
|
122
|
-
})), /*#__PURE__*/React.createElement("source", {
|
|
123
|
-
src: assetUrl("".concat(source, ".mp4")),
|
|
124
|
-
type: "video/mp4"
|
|
125
|
-
})), /*#__PURE__*/React.createElement(IconButton, {
|
|
139
|
+
}, sourceEl), /*#__PURE__*/React.createElement(IconButton, {
|
|
126
140
|
onClick: function () {
|
|
127
141
|
return pausePlay.toggle();
|
|
128
142
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayer.mjs","sources":["../../../../../src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\"\nimport classnames from \"classnames\"\nimport { assetUrl } from \"@kaizen/hosted-assets\"\nimport { IconButton } from \"~components/Button\"\nimport { canPlayWebm } from \"../../utils/canPlayWebm\"\nimport { usePausePlay } from \"../../utils/usePausePlay\"\nimport styles from \"../Base/Base.module.scss\"\n\nexport type VideoPlayerProps = {\n /**\n * Specifies whether the animation plays as soon as it is rendered.\n * If the user has enabled prefer-reduced-motion their preferences\n * take precedent over this prop.\n */\n autoplay?: boolean\n\n /**\n * Replay from start when active animation reaches the end of the animation.\n */\n loop?: boolean\n\n /**\n * Fallback image. Used when rendering of the asset fails, or as a\n * poster for the video player.\n */\n fallback: string\n\n /**\n * The path of the animation source, excluding the file extension. This\n * Player will preference Webm over mp4.\n */\n source: string\n\n /**\n * Aspect ratio that is set on the illustration in Scene/Spot which wraps the\n * component in a container, forcing the aspect ratio.\n */\n aspectRatio?: \"landscape\" | \"portrait\" | \"square\"\n\n onEnded?: () => void\n}\n\nexport const VideoPlayer = ({\n autoplay = true,\n loop = false,\n fallback,\n source,\n aspectRatio,\n onEnded,\n}: VideoPlayerProps): JSX.Element => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const [prefersReducedMotion, setPrefersReducedMotion] =\n React.useState<boolean>(true)\n\n useEffect(() => {\n /**\n * Setting `muted` on the player is required in Safari/Webkit and older\n * versions of Chome for the video to autoplay (regardless of whether\n * the format contains an audio stream or not).\n *\n * React does not guarentee the `muted` attribute is set on the\n * `video` element. So on load we force set this attribute. See issue:\n * https://github.com/facebook/react/issues/10389\n */\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.setAttribute(\"muted\", \"\")\n }\n }, [])\n\n useEffect(() => {\n // when the source of the animation is updated, we need to reload the asset\n // to ensure the video player is in sync with the new source.\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.load()\n }\n }, [source])\n\n useEffect(() => {\n if (!window) return\n\n const reducedMotionQuery = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(reducedMotionQuery.matches)\n const updateMotionPreferences = (): void => {\n const { matches = false } = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(matches)\n }\n\n const isLegacyEdge = navigator.userAgent.match(/Edge/)\n\n const isUnsupportedSafari =\n window.matchMedia(\"\").addEventListener === undefined\n\n if (isLegacyEdge || isUnsupportedSafari) return\n\n reducedMotionQuery.addEventListener(\"change\", updateMotionPreferences, true)\n\n return function cleanup() {\n reducedMotionQuery.removeEventListener(\"change\", updateMotionPreferences)\n }\n }, [])\n\n useEffect(() => {\n const { current: videoElement } = videoRef\n if (!videoElement) return\n\n if (prefersReducedMotion) {\n videoElement.pause()\n } else if (autoplay && !prefersReducedMotion) {\n try {\n // Older browsers may not return a promise, so .play could return undefined\n videoElement.play()?.catch(() => {\n /*\n * An DOMException _may_ be raised by some browsers if we\n * programatically interact with the video before the\n * user has interacted with the page. This is okay - so\n * we're going to catch this error without handling it. See:\n * https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_availability\n */\n })\n } catch (e) {\n /**\n * Older browsers will raise a synchronous error because their first implementation\n * of `.play` was not a promise.\n */\n }\n }\n /**\n * Chrome seems to have an issue with changes to autoplay after the video\n * has been mounted. If there is a change in autoplay we need to force the\n * play() method to be called.\n */\n }, [prefersReducedMotion, autoplay])\n\n useEffect(() => {\n // Add event listeners for the video element\n const { current: videoElement } = videoRef\n if (!videoElement || !onEnded) return\n\n videoElement.addEventListener(\"ended\", onEnded)\n\n return function cleanup() {\n videoElement.removeEventListener(\"ended\", onEnded)\n }\n }, [videoRef])\n\n const pausePlay = usePausePlay(videoRef)\n\n return (\n <figure\n className={classnames(styles.figure, {\n [`${styles[aspectRatio!]} ${styles.aspectRatioWrapper}`]:\n Boolean(aspectRatio),\n })}\n >\n <video\n muted={true}\n aria-hidden={true}\n preload=\"metadata\"\n ref={videoRef}\n width=\"100%\"\n data-testid=\"kz-video-player\"\n className={styles.wrapper}\n loop={loop}\n poster={assetUrl(`${fallback}.png`)}\n autoPlay={prefersReducedMotion ? false : autoplay}\n playsInline={true}\n tabIndex={-1}\n >\n {/**\n * This seems counter-intuitive, but webm support is codec specific.\n * Only offer webm if we are positive the browser supports it.\n * Reference: https://bugs.webkit.org/show_bug.cgi?id=216652#c1\n */}\n {canPlayWebm() && (\n <source src={assetUrl(`${source}.webm`)} type=\"video/webm\" />\n )}\n <source src={assetUrl(`${source}.mp4`)} type=\"video/mp4\" />\n </video>\n <IconButton\n onClick={(): void => pausePlay.toggle()}\n icon={pausePlay.icon}\n label={pausePlay.label}\n classNameOverride={styles.pausePlayButton}\n />\n </figure>\n )\n}\n"],"names":["VideoPlayer","_a","_c","autoplay","_d","loop","fallback","source","aspectRatio","onEnded","videoRef","useRef","_e","React","useState","prefersReducedMotion","setPrefersReducedMotion","useEffect","videoElement","current","setAttribute","load","window","reducedMotionQuery","matchMedia","matches","updateMotionPreferences","isLegacyEdge","navigator","userAgent","match","isUnsupportedSafari","addEventListener","undefined","cleanup","removeEventListener","pause","play","catch","e","pausePlay","usePausePlay","className","classnames","styles","figure","_b","concat","aspectRatioWrapper","Boolean","createElement","muted","preload","ref","width","wrapper","poster","assetUrl","autoPlay","playsInline","tabIndex","canPlayWebm","src","type","IconButton","onClick","toggle","icon","label","classNameOverride","pausePlayButton"],"mappings":";;;;;;;;AA0CO,IAAMA,WAAW,GAAG,SAAAA,CAACC,EAOT,EAAA;;MANjBC,EAAe,GAAAD,EAAA,CAAAE,QAAA;IAAfA,QAAQ,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,IAAI,KAAA;IACfE,EAAA,GAAAH,EAAA,CAAAI,IAAY;IAAZA,IAAI,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,KAAA;IACZE,QAAQ,GAAAL,EAAA,CAAAK,QAAA;IACRC,MAAM,GAAAN,EAAA,CAAAM,MAAA;IACNC,WAAW,GAAAP,EAAA,CAAAO,WAAA;IACXC,OAAO,GAAAR,EAAA,CAAAQ,OAAA;EAEP,IAAMC,QAAQ,GAAGC,MAAM,CAAmB,IAAI,CAAC;EACzC,IAAAC,EACJ,GAAAC,KAAK,CAACC,QAAQ,CAAU,IAAI,CAAC;IADxBC,oBAAoB,GAAAH,EAAA,CAAA,CAAA,CAAA;IAAEI,uBAAuB,QACrB;EAE/BC,SAAS,CAAC,YAAA;IACR;;;;;;;;AAQG;IACK,IAASC,YAAY,GAAKR,QAAQ,CAAAS,OAAb;IAC7B,IAAID,YAAY,KAAK,IAAI,EAAE;MACzBA,YAAY,CAACE,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;IACvC;EACF,CAAA,EAAE,EAAE,CAAC;EAENH,SAAS,CAAC,YAAA;;;IAGA,IAASC,YAAY,GAAKR,QAAQ,CAAAS,OAAb;IAC7B,IAAID,YAAY,KAAK,IAAI,EAAE;MACzBA,YAAY,CAACG,I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AQ,CAAC,EAAG,CAAAV,MAAA,CAAAzC,QAAQ,EAAM,MAAA,CAAA,CAAC;IACnCoD,QAAQ,EAAE3C,oBAAoB,GAAG,KAAK,GAAGZ,QAAQ;IACjDwD,WAAW,EAAE,IAAI;IACjBC,QAAQ,EAAE,CAAC;EAAC,CAAA,EAOXC,WAAW,CAAA,CAAE,mBACZhD,KAAQ,CAAAqC,aAAA,CAAA,QAAA,EAAA;IAAAY,GAAG,EAAEL,QAAQ,CAAC,EAAG,CAAAV,MAAA,CAAAxC,MAAM,UAAO,CAAC;IAAEwD,IAAI,EAAC;EAAY,EAAG,CAC9D,eACDlD,KAAA,CAAAqC,aAAA,CAAA,QAAA,EAAA;IAAQY,GAAG,EAAEL,QAAQ,CAAC,EAAG,CAAAV,MAAA,CAAAxC,MAAM,EAAM,MAAA,CAAA,CAAC;IAAEwD,IAAI,EAAC;IAAc,CACrD,eACRlD,KAAA,CAAAqC,aAAA,CAACc,UAAU,EAAA;IACTC,OAAO,EAAE,SAAAA,CAAA;MAAY,OAAAzB,SAAS,CAAC0B,MAAM,CAAA,CAAE;IAAA,CAAA;IACvCC,IAAI,EAAE3B,SAAS,CAAC2B,IAAI;IACpBC,KAAK,EAAE5B,SAAS,CAAC4B,KAAK;IACtBC,iBAAiB,EAAEzB,MAAM,CAAC0B;EAC1B,CAAA,CAAA,CACK;AAEb,CAAA;"}
|
|
1
|
+
{"version":3,"file":"VideoPlayer.mjs","sources":["../../../../../src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\"\nimport classnames from \"classnames\"\nimport { assetUrl } from \"@kaizen/hosted-assets\"\nimport { IconButton } from \"~components/Button\"\nimport { canPlayWebm } from \"../../utils/canPlayWebm\"\nimport { usePausePlay } from \"../../utils/usePausePlay\"\nimport styles from \"../Base/Base.module.scss\"\n\nexport type VideoPlayerProps = {\n /**\n * Specifies whether the animation plays as soon as it is rendered.\n * If the user has enabled prefer-reduced-motion their preferences\n * take precedent over this prop.\n */\n autoplay?: boolean\n\n /**\n * Replay from start when active animation reaches the end of the animation.\n */\n loop?: boolean\n\n /**\n * Fallback image. Used when rendering of the asset fails, or as a\n * poster for the video player.\n */\n fallback: string\n\n /**\n * The path of the animation source, excluding the file extension. This\n * Player will preference Webm over mp4.\n */\n source: string\n\n /**\n * Aspect ratio that is set on the illustration in Scene/Spot which wraps the\n * component in a container, forcing the aspect ratio.\n */\n aspectRatio?: \"landscape\" | \"portrait\" | \"square\"\n\n onEnded?: () => void\n}\n\nexport const VideoPlayer = ({\n autoplay = true,\n loop = false,\n fallback,\n source,\n aspectRatio,\n onEnded,\n}: VideoPlayerProps): JSX.Element => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const [prefersReducedMotion, setPrefersReducedMotion] =\n React.useState<boolean>(true)\n const [sourceEl, setSourceEl] = React.useState<React.ReactNode>()\n\n useEffect(() => {\n /**\n * Setting `muted` on the player is required in Safari/Webkit and older\n * versions of Chome for the video to autoplay (regardless of whether\n * the format contains an audio stream or not).\n *\n * React does not guarentee the `muted` attribute is set on the\n * `video` element. So on load we force set this attribute. See issue:\n * https://github.com/facebook/react/issues/10389\n */\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.setAttribute(\"muted\", \"\")\n }\n }, [])\n\n useEffect(() => {\n // when the source of the animation is updated, we need to reload the asset\n // to ensure the video player is in sync with the new source.\n const { current: videoElement } = videoRef\n if (videoElement !== null) {\n videoElement.load()\n }\n }, [source])\n\n useEffect(() => {\n if (!window) return\n\n const reducedMotionQuery = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(reducedMotionQuery.matches)\n const updateMotionPreferences = (): void => {\n const { matches = false } = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\"\n )\n setPrefersReducedMotion(matches)\n }\n\n const isLegacyEdge = navigator.userAgent.match(/Edge/)\n\n const isUnsupportedSafari =\n window.matchMedia(\"\").addEventListener === undefined\n\n if (isLegacyEdge || isUnsupportedSafari) return\n\n reducedMotionQuery.addEventListener(\"change\", updateMotionPreferences, true)\n\n return function cleanup() {\n reducedMotionQuery.removeEventListener(\"change\", updateMotionPreferences)\n }\n }, [])\n\n useEffect(() => {\n const { current: videoElement } = videoRef\n if (!videoElement) return\n\n if (prefersReducedMotion) {\n videoElement.pause()\n } else if (autoplay && !prefersReducedMotion) {\n try {\n // Older browsers may not return a promise, so .play could return undefined\n videoElement.play()?.catch(() => {\n /*\n * An DOMException _may_ be raised by some browsers if we\n * programatically interact with the video before the\n * user has interacted with the page. This is okay - so\n * we're going to catch this error without handling it. See:\n * https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_availability\n */\n })\n } catch (e) {\n /**\n * Older browsers will raise a synchronous error because their first implementation\n * of `.play` was not a promise.\n */\n }\n }\n /**\n * Chrome seems to have an issue with changes to autoplay after the video\n * has been mounted. If there is a change in autoplay we need to force the\n * play() method to be called.\n */\n }, [prefersReducedMotion, autoplay])\n\n useEffect(() => {\n // Add event listeners for the video element\n const { current: videoElement } = videoRef\n if (!videoElement || !onEnded) return\n\n videoElement.addEventListener(\"ended\", onEnded)\n\n return function cleanup() {\n videoElement.removeEventListener(\"ended\", onEnded)\n }\n }, [videoRef])\n\n useEffect(() => {\n /**\n * This seems counter-intuitive, but webm support is codec specific.\n * Only offer webm if we are positive the browser supports it.\n * Reference: https://bugs.webkit.org/show_bug.cgi?id=216652#c1\n */\n canPlayWebm() ? (\n setSourceEl(\n <>\n <source src={assetUrl(`${source}.webm`)} type=\"video/webm\" />\n <source src={assetUrl(`${source}.mp4`)} type=\"video/mp4\" />\n </>\n )\n ) : (\n <source src={assetUrl(`${source}.mp4`)} type=\"video/mp4\" />\n )\n }, [setSourceEl])\n\n const pausePlay = usePausePlay(videoRef)\n\n return (\n <figure\n className={classnames(styles.figure, {\n [`${styles[aspectRatio!]} ${styles.aspectRatioWrapper}`]:\n Boolean(aspectRatio),\n })}\n >\n <video\n muted={true}\n aria-hidden={true}\n preload=\"metadata\"\n ref={videoRef}\n width=\"100%\"\n data-testid=\"kz-video-player\"\n className={styles.wrapper}\n loop={loop}\n poster={assetUrl(`${fallback}.png`)}\n autoPlay={prefersReducedMotion ? false : autoplay}\n playsInline={true}\n tabIndex={-1}\n >\n {sourceEl}\n </video>\n <IconButton\n onClick={(): void => pausePlay.toggle()}\n icon={pausePlay.icon}\n label={pausePlay.label}\n classNameOverride={styles.pausePlayButton}\n />\n </figure>\n )\n}\n"],"names":["VideoPlayer","_a","_c","autoplay","_d","loop","fallback","source","aspectRatio","onEnded","videoRef","useRef","_e","React","useState","prefersReducedMotion","setPrefersReducedMotion","_f","sourceEl","setSourceEl","useEffect","videoElement","current","setAttribute","load","window","reducedMotionQuery","matchMedia","matches","updateMotionPreferences","isLegacyEdge","navigator","userAgent","match","isUnsupportedSafari","addEventListener","undefined","cleanup","removeEventListener","pause","play","catch","e","canPlayWebm","createElement","Fragment","src","assetUrl","concat","type","pausePlay","usePausePlay","className","classnames","styles","figure","_b","aspectRatioWrapper","Boolean","muted","preload","ref","width","wrapper","poster","autoPlay","playsInline","tabIndex","IconButton","onClick","toggle","icon","label","classNameOverride","pausePlayButton"],"mappings":";;;;;;;;AA0CO,IAAMA,WAAW,GAAG,SAAAA,CAACC,EAOT,EAAA;;MANjBC,EAAe,GAAAD,EAAA,CAAAE,QAAA;IAAfA,QAAQ,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,IAAI,KAAA;IACfE,EAAA,GAAAH,EAAA,CAAAI,IAAY;IAAZA,IAAI,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,KAAA;IACZE,QAAQ,GAAAL,EAAA,CAAAK,QAAA;IACRC,MAAM,GAAAN,EAAA,CAAAM,MAAA;IACNC,WAAW,GAAAP,EAAA,CAAAO,WAAA;IACXC,OAAO,GAAAR,EAAA,CAAAQ,OAAA;EAEP,IAAMC,QAAQ,GAAGC,MAAM,CAAmB,IAAI,CAAC;EACzC,IAAA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AAM;IAAA,aAAA,EACA,iBAAiB;IAC7BV,SAAS,EAAEE,MAAM,CAACS,OAAO;IACzB1D,IAAI,EAAEA,IAAI;IACV2D,MAAM,EAAEjB,QAAQ,CAAC,EAAG,CAAAC,MAAA,CAAA1C,QAAQ,EAAM,MAAA,CAAA,CAAC;IACnC2D,QAAQ,EAAElD,oBAAoB,GAAG,KAAK,GAAGZ,QAAQ;IACjD+D,WAAW,EAAE,IAAI;IACjBC,QAAQ,EAAE,CAAC;EAAC,CAAA,EAEXjD,QAAQ,CACH,eACRL,KAAA,CAAA+B,aAAA,CAACwB,UAAU,EAAA;IACTC,OAAO,EAAE,SAAAA,CAAA;MAAY,OAAAnB,SAAS,CAACoB,MAAM,CAAA,CAAE;IAAA,CAAA;IACvCC,IAAI,EAAErB,SAAS,CAACqB,IAAI;IACpBC,KAAK,EAAEtB,SAAS,CAACsB,KAAK;IACtBC,iBAAiB,EAAEnB,MAAM,CAACoB;EAC1B,CAAA,CAAA,CACK;AAEb,CAAA;"}
|
|
@@ -12,10 +12,11 @@ var TabList = function (props) {
|
|
|
12
12
|
_a = props.noPadding,
|
|
13
13
|
noPadding = _a === void 0 ? false : _a,
|
|
14
14
|
children = props.children,
|
|
15
|
-
|
|
15
|
+
classNameOverride = props.classNameOverride,
|
|
16
|
+
restProps = __rest(props, ["aria-label", "noPadding", "children", "classNameOverride"]);
|
|
16
17
|
return /*#__PURE__*/React.createElement(TabList$1, __assign({
|
|
17
18
|
"aria-label": ariaLabel,
|
|
18
|
-
className: classnames(styles.tabList, noPadding && styles.noPadding)
|
|
19
|
+
className: classnames(styles.tabList, classNameOverride, noPadding && styles.noPadding)
|
|
19
20
|
}, restProps), children);
|
|
20
21
|
};
|
|
21
22
|
export { TabList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.mjs","sources":["../../../../src/Tabs/subcomponents/TabList.tsx"],"sourcesContent":["import React, { HTMLAttributes, ReactNode } from \"react\"\nimport { TabList as ReachTabList } from \"@reach/tabs\"\nimport classnames from \"classnames\"\nimport { OverrideClassName } from \"~types/OverrideClassName\"\nimport styles from \"./TabList.module.scss\"\n\nexport type TabListProps = {\n /**\n * Accessible name for the set of tabs\n */\n \"aria-label\": string\n /**\n * Removes the built in padding\n */\n noPadding?: boolean\n children: ReactNode\n} & OverrideClassName<HTMLAttributes<HTMLDivElement>>\n\n/**\n * Wrapper for the tabs themselves\n */\nexport const TabList = (props: TabListProps): JSX.Element => {\n const {\n \"aria-label\": ariaLabel,\n noPadding = false,\n children,\n ...restProps\n } = props\n return (\n <ReachTabList\n aria-label={ariaLabel}\n className={classnames(styles.tabList
|
|
1
|
+
{"version":3,"file":"TabList.mjs","sources":["../../../../src/Tabs/subcomponents/TabList.tsx"],"sourcesContent":["import React, { HTMLAttributes, ReactNode } from \"react\"\nimport { TabList as ReachTabList } from \"@reach/tabs\"\nimport classnames from \"classnames\"\nimport { OverrideClassName } from \"~types/OverrideClassName\"\nimport styles from \"./TabList.module.scss\"\n\nexport type TabListProps = {\n /**\n * Accessible name for the set of tabs\n */\n \"aria-label\": string\n /**\n * Removes the built in padding\n */\n noPadding?: boolean\n children: ReactNode\n} & OverrideClassName<HTMLAttributes<HTMLDivElement>>\n\n/**\n * Wrapper for the tabs themselves\n */\nexport const TabList = (props: TabListProps): JSX.Element => {\n const {\n \"aria-label\": ariaLabel,\n noPadding = false,\n children,\n classNameOverride,\n ...restProps\n } = props\n return (\n <ReachTabList\n aria-label={ariaLabel}\n className={classnames(\n styles.tabList,\n classNameOverride,\n noPadding && styles.noPadding\n )}\n {...restProps}\n >\n {children}\n </ReachTabList>\n )\n}\n"],"names":["TabList","props","ariaLabel","_a","noPadding","children","classNameOverride","restProps","__rest","React","createElement","ReachTabList","__assign","className","classnames","styles","tabList"],"mappings":";;;;;;AAkBA;;AAEG;AACI,IAAMA,OAAO,GAAG,SAAAA,CAACC,KAAmB,EAAA;EAEvC,IAAcC,SAAS,GAKrBD,KAAK,CAAA,YAAA,CALgB;IACvBE,EAAA,GAIEF,KAAK,CAAAG,SAJU;IAAjBA,SAAS,GAAGD,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,KAAA;IACjBE,QAAQ,GAGNJ,KAAK,CAHCI,QAAA;IACRC,iBAAiB,GAEfL,KAAK,CAAAK,iBAFU;IACdC,SAAS,GACVC,MAAA,CAAAP,KAAK,EANH,CAAA,YAAA,EAAA,WAAA,EAAA,UAAA,EAAA,mBAAA,CAML,CADa;EAEd,oBACEQ,KAAA,CAAAC,aAAA,CAACC,SAAY,EAAAC,QAAA,CAAA;IAAA,YAAA,EACCV,SAAS;IACrBW,SAAS,EAAEC,UAAU,CACnBC,MAAM,CAACC,OAAO,EACdV,iBAAiB,EACjBF,SAAS,IAAIW,MAAM,CAACX,SAAS;GAE3B,EAAAG,SAAS,CAEZ,EAAAF,QAAQ,CACI;AAEnB,CAAA;"}
|
package/dist/esm/index.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.Select-module_container__TaMKg{position:relative;width:100%}.Select-module_notFullWidth__Mr-3G{width:180px}
|
|
2
2
|
.Main-module_main__hMyB1{z-index:0}
|
|
3
3
|
.Wrapper-module_wrapper__89WmC{background:var(--color-gray-100,#f9f9f9);display:grid;grid-template-rows:min-content 1fr min-content;min-height:100vh;position:relative}
|
|
4
|
-
.FooterRoot-module_footerRoot__N-6nQ{align-items:center;background:var(--color-blue-500,#0168b3);display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template-areas:"prev stepper next";grid-template-columns:1fr 2fr 1fr;justify-content:center;padding:var(--spacing-24,1.5rem) var(--spacing-12,.75rem)}@media (min-width:768px){.FooterRoot-module_footerRoot__N-6nQ{bottom:0;grid-template-columns:1fr 5fr 1fr;padding:var(--spacing-24,1.5rem) var(--spacing-32,2rem);position:sticky;z-index:1}}
|
|
5
4
|
.FooterActions-module_footerAction__v7eL-{display:flex;flex-basis:auto;flex-grow:1}.FooterActions-module_footerActionPrevious__2XByZ{grid-area:"prev";justify-content:start}.FooterActions-module_footerActionNext__IKRta{grid-area:"next";justify-content:end}
|
|
6
5
|
.Titles-module_titles__JYwU0{align-items:center;flex-grow:1;grid-area:titles;justify-content:center}.Titles-module_pageTitle__YDp9S,.Titles-module_titles__JYwU0{display:flex;flex-direction:column}.Titles-module_prefix__40x8n{margin-bottom:var(--spacing-4,.25rem)}.Titles-module_status__huuP7{margin-top:var(--spacing-8,.5rem)}
|
|
6
|
+
.FooterRoot-module_footerRoot__N-6nQ{align-items:center;background:var(--color-blue-500,#0168b3);display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template-areas:"prev stepper next";grid-template-columns:1fr 2fr 1fr;justify-content:center;padding:var(--spacing-24,1.5rem) var(--spacing-12,.75rem)}@media (min-width:768px){.FooterRoot-module_footerRoot__N-6nQ{bottom:0;grid-template-columns:1fr 5fr 1fr;padding:var(--spacing-24,1.5rem) var(--spacing-32,2rem);position:sticky;z-index:1}}
|
|
7
7
|
.Actions-module_actions__Prrp0{align-items:center;display:flex;flex-direction:column;flex-grow:1;grid-area:actions;justify-content:center}@media (min-width:768px){.Actions-module_actions__Prrp0{align-items:flex-start;flex-direction:row;justify-content:flex-end;margin-top:calc(var(--spacing-12, .75rem)*-1)}}
|
|
8
8
|
.Branding-module_branding__4h-rD{display:flex;flex-grow:1;grid-area:branding;justify-content:center;padding-top:var(--spacing-4,.25rem)}@media (min-width:768px){.Branding-module_branding__4h-rD{justify-content:unset}}.Branding-module_logo__vqqec{flex-basis:7.5rem}
|
|
9
9
|
.ProgressStepper-module_stepsContainer__WMxXN{grid-area:stepper;width:100%}.ProgressStepper-module_stepList__b1wWX{align-items:flex-end;display:none;justify-content:center;list-style:none;margin:0;padding:0}@media (min-width:768px){.ProgressStepper-module_stepList__b1wWX{display:flex}}.ProgressStepper-module_step__-Ep19{container:step/inline-size;display:flex;flex-basis:100%;flex-grow:1;justify-content:center;max-width:var(--spacing-96,6rem);overflow-wrap:break-word;position:relative}.ProgressStepper-module_stepContent__B4uFS{align-items:center;display:flex;flex-direction:column}.ProgressStepper-module_stepIndicator__-qEWT{height:1.25rem;position:relative;width:1.25rem}.ProgressStepper-module_stepName__hS4lp{display:none;font-weight:var(--typography-paragraph-bold-font-weight,600);margin-bottom:var(--spacing-12,.75rem);text-align:center}.ProgressStepper-module_stepIcon__0Kh4y{color:var(--color-white,#fff);height:1.25rem;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:1.25rem}.ProgressStepper-module_stepDivider__KEZPU{border:var(--spacing-1,.0625rem) solid var(--color-white,#fff);border-radius:var(--border-solid-border-radius,7px);display:flex;flex-grow:1;height:0;left:100%;margin:0;min-width:calc(100% - var(--spacing-24, 1.5rem));position:absolute;top:calc(100% - .625rem);transform:translateX(-50%)}[dir=rtl] .ProgressStepper-module_stepDivider__KEZPU{left:unset;right:100%;transform:translateX(50%)}.ProgressStepper-module_stepperDescription__B00hX{display:flex;justify-content:center}@media (min-width:768px){.ProgressStepper-module_stepperDescription__B00hX{height:0;overflow:hidden;position:absolute;width:0}}@container step (min-width: 4.5rem){.ProgressStepper-module_stepName__hS4lp{display:inline}}
|