@preply/ds-docs 7.1.0 → 8.0.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/{config → .storybook}/decorators/preventIframeFromScrollingParent.tsx +1 -1
- package/{config → .storybook}/decorators/withIntlProvider.tsx +1 -1
- package/{config → .storybook}/main.ts +9 -21
- package/{config/manager.js → .storybook/manager.ts} +3 -3
- package/{config → .storybook}/preview-head.html +5 -0
- package/{config → .storybook}/preview.tsx +32 -7
- package/.storybook/vitest.setup.ts +5 -0
- package/README.md +1 -2
- package/dist/assets/00.LayoutFlex.stories-Trn9fl1r.js +85 -0
- package/dist/assets/{00.applications-CUkoHGre.js → 00.applications-DgG50o0h.js} +2 -2
- package/dist/assets/{00.favicons.guide-BACLlsQJ.js → 00.favicons.guide-BPbT_6WU.js} +2 -2
- package/dist/assets/{00.token-explorer-KvyvCOUP.js → 00.token-explorer-ClCpyqpc.js} +45 -45
- package/dist/assets/00.using-responsive-props-Bb1iomQW.js +18 -0
- package/dist/assets/01.semantic-tokens-C27rrlvA.js +11 -0
- package/dist/assets/{01.using-shorthand-props-BVcqSsu2.js → 01.using-shorthand-props-Cx8UqLGh.js} +2 -2
- package/dist/assets/10.Combinations.stories-DW0Awy7g.js +128 -0
- package/dist/assets/{10.fonts.guide-C0WN5q3d.js → 10.fonts.guide-mlrpbwOs.js} +2 -2
- package/dist/assets/{10.ssr-nXkWq-Jg.js → 10.ssr-Bxv1R5s2.js} +2 -2
- package/dist/assets/{11.languageFont.explorer.stories-CtRFTC-u.js → 11.languageFont.explorer.stories-CduWkRQi.js} +5 -5
- package/dist/assets/{11.ssr.app-router-DQgi7F2D.js → 11.ssr.app-router-DaFyxoYP.js} +2 -2
- package/dist/assets/{20.libraries-DU9GpL6L.js → 20.libraries-B1FxeNSm.js} +2 -2
- package/dist/assets/{2025-q4-ds-cleanup-C1ZmbxTl.js → 2025-q4-ds-cleanup-CyVfiEF_.js} +2 -2
- package/dist/assets/30.icons.explorer-J5XXpjOy.js +72 -0
- package/dist/assets/{30.storybook-DZPRDZF1.js → 30.storybook-BXPxdYYA.js} +2 -2
- package/dist/assets/40.illustrations.explorer-Ll2UaYWn.js +21 -0
- package/dist/assets/{90.advanced-C_XdYJPc.js → 90.advanced-BkBCaIij.js} +2 -2
- package/dist/assets/Accordion-Bjcf873X.js +1 -0
- package/dist/assets/{Accordion.stories-BUn1TO-l.js → Accordion.stories-CwmuD6M9.js} +3 -3
- package/dist/assets/{Accordion.tests.stories-DHNOscki.js → Accordion.tests.stories-DycRaTsm.js} +8 -8
- package/dist/assets/AlertDialog.stories-CMG96OPW.js +240 -0
- package/dist/assets/Avatar-BHWZ6iZn.js +1 -0
- package/dist/assets/Avatar.stories-DcHCuUcU.js +42 -0
- package/dist/assets/AvatarWithStatus.stories-BQ9j0v-r.js +36 -0
- package/dist/assets/Badge-e3LEfrfi.css +1 -0
- package/dist/assets/Badge.stories-CjBGqctl.js +82 -0
- package/dist/assets/Box.stories-F4YHVHtw.js +44 -0
- package/dist/assets/BubbleCounter.stories-W-QyzoZM.js +238 -0
- package/dist/assets/{Button-C2MXHYlY.css → Button-6DthIrMV.css} +1 -1
- package/dist/assets/Button-Db3mZeHX.js +1 -0
- package/dist/assets/Button-KgwWX-kY.js +1 -0
- package/dist/assets/{Button.stories-VjpvM5FZ.js → Button.stories-DZXg3fC6.js} +8 -8
- package/dist/assets/ButtonBase-LoF75NjE.js +1 -0
- package/dist/assets/{ButtonBase-Ide6FPM1.css → ButtonBase-vTD2whCv.css} +1 -1
- package/dist/assets/Checkbox-Bdi6imAj.js +1 -0
- package/dist/assets/{Checkbox.stories-C1RURGZy.js → Checkbox.stories-Wzzjomc-.js} +4 -4
- package/dist/assets/Checkbox.tests.stories-CGPErtLg.js +64 -0
- package/dist/assets/Chips.stories-BwJJ2fGW.js +140 -0
- package/dist/assets/Color-ASIRERSW-B8huhEry.js +1 -0
- package/dist/assets/ComposingPopovers.stories-CYrydDT0.js +49 -0
- package/dist/assets/CountryFlag-BsylP9aC.js +1 -0
- package/dist/assets/{CountryFlag.stories-lizf_vqO.js → CountryFlag.stories-CV_Ix2uc.js} +6 -6
- package/dist/assets/CountryFlag.test.stories-D-_jZuZ1.js +27 -0
- package/dist/assets/Dialog-DBQC7rLf.js +9 -0
- package/dist/assets/Dialog.stories-CLAeCRCv.js +381 -0
- package/dist/assets/DismissibleChips-BTc-ZGnG.js +1 -0
- package/dist/assets/{DismissibleChips.stories-CM10Bclv.js → DismissibleChips.stories-DYuvYDPR.js} +10 -10
- package/dist/assets/Divider-aEUPegmM.js +1 -0
- package/dist/assets/Divider.stories-DY-9haru.js +9 -0
- package/dist/assets/DocsRenderer-GHJI37HO-ZaAnf_mS.js +2 -0
- package/dist/assets/DropdownMenu-Eg6NEumE.js +1 -0
- package/dist/assets/{DropdownMenu.stories-BMPgkvR1.js → DropdownMenu.stories-DRc0OM4l.js} +25 -20
- package/dist/assets/FieldButton-CE-kxD0a.js +1 -0
- package/dist/assets/FieldButton.stories-0iohAlVk.js +1 -0
- package/dist/assets/FormControl-DI4h0Rn1.js +1 -0
- package/dist/assets/FormControl.stories-B-wRzqin.js +42 -0
- package/dist/assets/Heading-jyl-6mnE.js +1 -0
- package/dist/assets/Heading.stories-C--u6-XB.js +67 -0
- package/dist/assets/Icon-BbVZ9NP7.js +1 -0
- package/dist/assets/Icon-RSC-iQ3CU9mQ.js +6 -0
- package/dist/assets/{Icon.stories-C8lZfyvV.js → Icon.stories-DRfWUzol.js} +2 -2
- package/dist/assets/IconButton-DvmHN9Bh.js +1 -0
- package/dist/assets/Input-qJLg_DQg.js +1 -0
- package/dist/assets/InputContainer-DxTdO3rg.js +1 -0
- package/dist/assets/IntegrationWithReactHookForm.stories-D7Os2mOo.js +467 -0
- package/dist/assets/IntlFormattedCurrency.stories-DsOonDv4.js +1 -0
- package/dist/assets/IntlFormattedDateTime.stories-CEfl-J8a.js +1 -0
- package/dist/assets/LayoutFlex-7DoB3s9X.css +1 -0
- package/dist/assets/LayoutFlex-CtFx5gUZ.js +1 -0
- package/dist/assets/LayoutFlex-TxluN-Yw.js +1 -0
- package/dist/assets/LayoutFlexItem-CG7Crdkt.js +1 -0
- package/dist/assets/LayoutGrid-CyPyNDw1.js +1 -0
- package/dist/assets/LayoutGrid-Ddqp2KT2.js +1 -0
- package/dist/assets/LayoutGrid.stories-D1L7aqlu.js +88 -0
- package/dist/assets/LayoutGridItem-D9IWdXiI.js +1 -0
- package/dist/assets/Link-DBtlp5DH.js +1 -0
- package/dist/assets/{Link.stories-DVvzdQg0.js → Link.stories-BGk_oU7W.js} +2 -2
- package/dist/assets/Loader.stories-BW_8B3fu.js +37 -0
- package/dist/assets/MultiSelectChips-vFJ-9-kf.js +1 -0
- package/dist/assets/{MultiSelectChips.stories-DtyVRO_D.js → MultiSelectChips.stories-DMQnklfd.js} +11 -11
- package/dist/assets/NativeSelectField.stories-iktDEjbi.js +243 -0
- package/dist/assets/NumberField-DachAjtc.js +1 -0
- package/dist/assets/NumberField.stories-CHm83Evu.js +254 -0
- package/dist/assets/ObserveIntersection-Gkcdp17D.js +1 -0
- package/dist/assets/ObserveIntersection.stories-Crg5XGQK.js +27 -0
- package/dist/assets/OnboardingTooltip-Clfuyvq4.js +1 -0
- package/dist/assets/{OnboardingTooltip.stories-CXeGdwmF.js → OnboardingTooltip.stories-1rbEN6tf.js} +5 -5
- package/dist/assets/OnboardingTooltip.tests.stories-DbaxrQeh.js +79 -0
- package/dist/assets/OnboardingTour-DlsIO1Gv.js +1 -0
- package/dist/assets/OnboardingTour.stories-eO-vrmSq.js +42 -0
- package/dist/assets/{OnboardingTour.tests.stories-geQyXRg0.js → OnboardingTour.tests.stories-nH2oAAkE.js} +6 -6
- package/dist/assets/PasswordField-Cb1fJLBM.js +1 -0
- package/dist/assets/PasswordField.stories-BpCu_Nmu.js +229 -0
- package/dist/assets/PreplyLogo.stories-C7DVat2q.js +93 -0
- package/dist/assets/ProgressBar.stories-CJTsS-k-.js +43 -0
- package/dist/assets/ProgressSteps-LRQw0WxN.js +1 -0
- package/dist/assets/ProgressSteps.stories-DkKhdsEq.js +31 -0
- package/dist/assets/PromoDialog-BD77J0Sb.js +3 -0
- package/dist/assets/RangeSlider-C7BMuKPO.js +3 -0
- package/dist/assets/{RangeSlider.stories-DOKf_qXp.js → RangeSlider.stories-BR0J8t26.js} +6 -6
- package/dist/assets/Rating.stories-C4odIVLb.js +115 -0
- package/dist/assets/{RatingInput.stories-BmhUO-vY.js → RatingInput.stories-C3TFrxw_.js} +30 -57
- package/dist/assets/SelectField-BvrdbknI.css +1 -0
- package/dist/assets/SelectField-qkC5zVlE.js +1 -0
- package/dist/assets/SelectField.stories-BkyQpgee.js +516 -0
- package/dist/assets/ShowOnIntersection.stories-DMrPWP_X.js +17 -0
- package/dist/assets/SingleSelectChips-URtzgStH.js +1 -0
- package/dist/assets/{SingleSelectChips.stories-CgSCJR-h.js → SingleSelectChips.stories-C62wkEv2.js} +19 -19
- package/dist/assets/Slider-DwJ11rhB.js +1 -0
- package/dist/assets/Slider.stories-Ctv9GCye.js +69 -0
- package/dist/assets/Spinner-BtlYJQrD.js +1 -0
- package/dist/assets/{Stars-DGzJFzmk.js → Stars-noMq-Uej.js} +1 -1
- package/dist/assets/Steps-ZKxhdp_N.js +1 -0
- package/dist/assets/{Steps.stories-BppoL2gK.js → Steps.stories-DcQb87xm.js} +12 -12
- package/dist/assets/Switch-CukXNUpT.js +1 -0
- package/dist/assets/{Switch.stories-aVZF_-KJ.js → Switch.stories-DDel8GN3.js} +9 -9
- package/dist/assets/Text-BaQf6qnx.js +1 -0
- package/dist/assets/Text-D2ssZW1_.js +1 -0
- package/dist/assets/Text-O3SM8a3p.css +1 -0
- package/dist/assets/Text.stories-DAYsyFR5.js +58 -0
- package/dist/assets/TextField-D3FL7yE0.js +1 -0
- package/dist/assets/TextField.stories-B7yiySGl.js +254 -0
- package/dist/assets/TextHighlighted.stories-GrC4GB2n.js +32 -0
- package/dist/assets/TextInline.stories-CLDPL3xz.js +50 -0
- package/dist/assets/TextareaField-lItTPjhC.js +1 -0
- package/dist/assets/{TextareaField.stories-oScbbK_V.js → TextareaField.stories-CSn1Y1es.js} +13 -12
- package/dist/assets/Toast-PKFBYWQw.css +1 -0
- package/dist/assets/Toast.stories-WMpE2CUA.js +183 -0
- package/dist/assets/TokyoUIAttach-DEHypfd2.js +1 -0
- package/dist/assets/TokyoUIAvailability7LateNight-DqIhY2LI.js +1 -0
- package/dist/assets/TokyoUICheck-DFXDKlST.js +1 -0
- package/dist/assets/TokyoUICheckmark-CC75JvoU.js +1 -0
- package/dist/assets/TokyoUIChevronDown-CV0GTyb_.js +1 -0
- package/dist/assets/TokyoUIClose-Bf-N_4aK.js +1 -0
- package/dist/assets/TokyoUIEmojiFrowning-CEEry-ar.js +1 -0
- package/dist/assets/TokyoUIEye-CvZmomj8.js +1 -0
- package/dist/assets/TokyoUIFav-CV3HlDno.js +1 -0
- package/dist/assets/TokyoUIInfo-S99idYL9.js +1 -0
- package/dist/assets/TokyoUILanguage-dDro1t5I.js +1 -0
- package/dist/assets/TokyoUILibraryExplore-3boXHfri.js +1 -0
- package/dist/assets/TokyoUILock-Ddb0LZOj.js +1 -0
- package/dist/assets/TokyoUIMessages-DddkimKx.js +1 -0
- package/dist/assets/TokyoUIMinus-BM97SQFD.js +1 -0
- package/dist/assets/TokyoUINotebook-CzW-xZ-S.js +1 -0
- package/dist/assets/TokyoUINotesWithPad-CZPHd-s1.js +1 -0
- package/dist/assets/TokyoUIPhone-B41go8ay.js +1 -0
- package/dist/assets/TokyoUISettings-r8yUukmp.js +1 -0
- package/dist/assets/TokyoUIStarFilled-DAFjKfr3.js +1 -0
- package/dist/assets/TokyoUITag-BOlMKPwF.js +1 -0
- package/dist/assets/TokyoUIUpload-DqgHhwt9.js +1 -0
- package/dist/assets/TokyoUIUser-DQL_EW5M.js +1 -0
- package/dist/assets/Tooltip-nL6-qc2S.js +1 -0
- package/dist/assets/Tooltip.stories-BCIj91Tz.js +93 -0
- package/dist/assets/{Tooltip.tests.stories-t8Ra6jdu.js → Tooltip.tests.stories-BuldDnaS.js} +3 -3
- package/dist/assets/VisuallyHidden-CBzPUOy4.js +1 -0
- package/dist/assets/WithTooltip-IO6J4KBT-sdWoJ5kA.js +9 -0
- package/dist/assets/align-self-Dj6Hw1ei.js +1 -0
- package/dist/assets/avatar-1.png +0 -0
- package/dist/assets/avatar-2.png +0 -0
- package/dist/assets/avatar-3.png +0 -0
- package/dist/assets/avatar-4.png +0 -0
- package/dist/assets/avatar-5.png +0 -0
- package/dist/assets/{axe-KozDj-05.js → axe-COSWniE7.js} +1 -1
- package/dist/assets/{breakpoints-BU3g7toZ.js → breakpoints-Bq0N-WKo.js} +2 -2
- package/dist/assets/{breakpoints-B9BgZenX.js → breakpoints-DAuVWyVl.js} +2 -2
- package/dist/assets/{breakpoints-BwVzZWx6.js → breakpoints-r5YNDlDj.js} +2 -2
- package/dist/assets/changelog-DfbyLrVG.js +2392 -0
- package/dist/assets/client-B0RkqQz5.js +1 -0
- package/dist/assets/{componentNames-k0j3gHgH.js → componentNames-CmmTyjin.js} +1 -1
- package/dist/assets/constants-DiGI6Pao.js +47 -0
- package/dist/assets/createRequiredContext-Dh2RVm_M.js +1 -0
- package/dist/assets/emotion-unitless.esm-BZwEwAnk.js +1 -0
- package/dist/assets/formatter-QJ4M4OGQ-DkyPaaGf.js +1 -0
- package/dist/assets/getTokenVar-DAf6Dqww.js +11 -0
- package/dist/assets/getTokenVar-DGGittrV.js +1 -0
- package/dist/assets/gradientBorders-BLAK8Z-v.js +45 -0
- package/dist/assets/hover-BK-WJeH0.js +16 -0
- package/dist/assets/hover-Bny3ccNR.js +13 -0
- package/dist/assets/hover-reiWegqW.js +14 -0
- package/dist/assets/iframe-CWgEsn_I.js +1891 -0
- package/dist/assets/iframe-Dl7aNcg3.css +1 -0
- package/dist/assets/index-BAEPs7Y-.js +12 -0
- package/dist/assets/index-BiSZC2o0.js +1 -0
- package/dist/assets/{index-Bd3pAdGF.js → index-CC1MzVDH.js} +2 -2
- package/dist/assets/index-D3eu31XZ.js +41 -0
- package/dist/assets/index-DN8YXDVa.js +1 -0
- package/dist/assets/index-DVMjwMfI.js +1 -0
- package/dist/assets/{intro-W6KSFbTA.js → intro-BstePxGk.js} +2 -2
- package/dist/assets/layout-relative-Dd1oD7no.js +1 -0
- package/dist/assets/layout-relative.module-1z75aSwo-BlGCRaGo.js +1 -0
- package/dist/assets/layout-relative.module-DtLbhGhZ.js +1 -0
- package/dist/assets/matchers-DMFSMG2O-CAdg16Fl.js +14 -0
- package/dist/assets/mcp-BnvXyj7V.js +32 -0
- package/dist/assets/message-qc_MCF3J.js +1 -0
- package/dist/assets/{migrating-from-less-DsURcUxp.js → migrating-from-less-DeeEWMYL.js} +2 -2
- package/dist/assets/playground.stories-CvceWUq7.js +6 -0
- package/dist/assets/preload-helper-Dp1pzeXC.js +1 -0
- package/dist/assets/react-18-Cn7fKkEX.js +1 -0
- package/dist/assets/{render-icon-Du0nasoi.js → render-icon-CcTDatKg.js} +2 -2
- package/dist/assets/render-icon-DCa6Vadq.js +9 -0
- package/dist/assets/{shared-strings-DFzxd8lM.js → shared-strings-I9WUPC_k.js} +1 -1
- package/dist/assets/styled-components.browser.esm-BZ4U6qbl.js +2 -0
- package/dist/assets/styled-components.browser.esm-DsfIp3u0.js +2 -0
- package/dist/assets/syntaxhighlighter-IQDEPFLK-BGcWLhM8.js +6 -0
- package/dist/assets/text-accent-CvDqGyH8.js +1 -0
- package/dist/assets/text-centered-4FcavPd_.js +1 -0
- package/dist/assets/text-centered-nO9Uq8mN.js +1 -0
- package/dist/assets/tokens-BEq-FCvC.js +15 -0
- package/dist/assets/tokens-I7xc-5gL.js +1 -0
- package/dist/assets/{tokens-Dr0rNfCQ.js → tokens-as7cem5X.js} +2 -2
- package/dist/assets/{tokens-CwpsI1W8.js → tokens-kjKX1OOx.js} +2 -2
- package/dist/assets/useControllableState-CB098DmS.js +1 -0
- package/dist/assets/useHostname-DENeD9To.js +1 -0
- package/dist/assets/useMergeRefs-Cma75nFm.js +1 -0
- package/dist/assets/useMergeRefs-DrdDSUH5.js +1 -0
- package/dist/assets/useOpenInteractionType-DeCsKa-1.js +15 -0
- package/dist/assets/usePortalElement-CK58JXLC.js +19 -0
- package/dist/assets/useStableCallback-Cg8WkzY2.js +1 -0
- package/dist/assets/useToken-Dy7e7qui.js +1 -0
- package/dist/assets/{welcome-CqKVBlQ_.js → welcome-DnB7jiTV.js} +3 -3
- package/dist/assets/{zeroheight-bhuS12y3.js → zeroheight-BLhCMMHP.js} +3 -3
- package/dist/favicon-wrapper.svg +46 -0
- package/dist/favicon.svg +2 -1
- package/dist/iframe.html +37 -11
- package/dist/index.html +30 -65
- package/dist/index.json +1 -1
- package/dist/preview-stats.json +13185 -12261
- package/dist/project.json +1 -1
- package/dist/sb-addons/a11y-1/manager-bundle.js +3 -218
- package/dist/sb-addons/docs-4/manager-bundle.js +3 -0
- package/dist/sb-addons/links-2/manager-bundle.js +3 -0
- package/dist/sb-addons/storybook-5/manager-bundle.js +3 -0
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +628 -0
- package/dist/sb-addons/vitest-3/manager-bundle.js +3 -0
- package/dist/sb-common-assets/favicon-wrapper.svg +46 -0
- package/dist/sb-common-assets/favicon.svg +1 -1
- package/dist/sb-manager/globals-runtime.js +73678 -40227
- package/dist/sb-manager/globals.js +13 -37
- package/dist/sb-manager/manager-stores.js +23 -0
- package/dist/sb-manager/runtime.js +17313 -9663
- package/dist/vite-inject-mocker-entry.js +18 -0
- package/package.json +17 -23
- package/pages/06.changelog/changelog.mdx +7 -0
- package/pages/30.guides/00.installation/00.applications.mdx +67 -0
- package/pages/30.guides/00.installation/10.ssr.mdx +113 -0
- package/pages/30.guides/00.installation/11.ssr.app-router.mdx +74 -0
- package/pages/30.guides/00.installation/20.libraries.mdx +38 -0
- package/pages/30.guides/00.installation/30.storybook.mdx +60 -0
- package/pages/30.guides/00.installation/90.advanced.mdx +41 -0
- package/pages/30.guides/10.MCP/mcp.mdx +50 -0
- package/pages/30.guides/40.tokens/00.token-explorer.mdx +17 -0
- package/pages/30.guides/40.tokens/01.semantic-tokens.mdx +33 -0
- package/pages/30.guides/40.tokens/components/SchemeSwitcher.styles.ts +34 -0
- package/pages/30.guides/40.tokens/components/SchemeSwitcher.tsx +41 -0
- package/pages/30.guides/40.tokens/components/SearchTerms.styles.tsx +17 -0
- package/pages/30.guides/40.tokens/components/SearchTerms.tsx +63 -0
- package/pages/30.guides/40.tokens/components/SemanticTokens.tsx +183 -0
- package/pages/30.guides/40.tokens/components/TokenCard.styles.tsx +33 -0
- package/pages/30.guides/40.tokens/components/TokenCard.tsx +50 -0
- package/pages/30.guides/40.tokens/components/TokenList.styles.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenList.tsx +32 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RenderDuration.tsx +25 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RenderEasing.tsx +7 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RenderTransition.tsx +21 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBackground.tsx +15 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBgColor.tsx +15 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderColor.tsx +33 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderImage.tsx +19 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderRadius.tsx +19 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBorderWidth.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBoxShadow.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererBrightness.tsx +22 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererEasingCoordinate.tsx +8 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFgColor.tsx +20 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontFamily.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontSize.tsx +16 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontStyle.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererFontWeight.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererHeight.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererLetterSpacing.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererLineHeightPixels.tsx +23 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererLineHeightRatio.tsx +23 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererOutlineColor.tsx +33 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererOutlineOffset.tsx +29 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererOutlineWidth.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererPaletteItem.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererProps.tsx +6 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererSize.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererSpace.tsx +14 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererSwatch.tsx +25 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererTextDecoration.tsx +26 -0
- package/pages/30.guides/40.tokens/components/TokenRenderers/RendererTypeface.tsx +28 -0
- package/pages/30.guides/40.tokens/components/TokenSearch.styles.tsx +42 -0
- package/pages/30.guides/40.tokens/components/TokenSearch.tsx +79 -0
- package/pages/30.guides/40.tokens/components/TokenSearchHint.styles.tsx +17 -0
- package/pages/30.guides/40.tokens/components/TokenSearchHint.tsx +41 -0
- package/pages/30.guides/40.tokens/components/TokenSearchHints.tsx +25 -0
- package/pages/30.guides/40.tokens/constants/search-hints.tsx +34 -0
- package/pages/30.guides/40.tokens/constants/token-values-flattened.ts +35 -0
- package/pages/30.guides/40.tokens/functions/token-type.renderer.test.tsx +72 -0
- package/pages/30.guides/40.tokens/functions/token-type.renderer.tsx +206 -0
- package/pages/30.guides/40.tokens/functions/token.filter.ts +25 -0
- package/pages/30.guides/40.tokens/providers/TokenSearchProvider.tsx +76 -0
- package/pages/30.guides/40.tokens/providers/useTokenSearchContext.ts +5 -0
- package/pages/30.guides/40.tokens/types.ts +18 -0
- package/pages/30.guides/50.special-props/00.using-responsive-props.mdx +35 -0
- package/pages/30.guides/50.special-props/01.using-shorthand-props.mdx +64 -0
- package/pages/30.guides/50.special-props/components/BreakpointList.tsx +19 -0
- package/pages/30.guides/60.components/20.sc/examples/MyStyledComponentWithTokens.ts +14 -0
- package/pages/30.guides/60.components/index.mdx +28 -0
- package/pages/30.guides/60.components/less/breakpoints.mdx +43 -0
- package/pages/30.guides/60.components/less/hover.mdx +19 -0
- package/pages/30.guides/60.components/less/tokens.mdx +24 -0
- package/pages/30.guides/60.components/scss/breakpoints.mdx +52 -0
- package/pages/30.guides/60.components/scss/hover.mdx +30 -0
- package/pages/30.guides/60.components/scss/migrating-from-less.mdx +55 -0
- package/pages/30.guides/60.components/scss/tokens.mdx +33 -0
- package/pages/30.guides/60.components/styled-components/breakpoints.mdx +45 -0
- package/pages/30.guides/60.components/styled-components/hover.mdx +20 -0
- package/pages/30.guides/60.components/styled-components/intro.mdx +49 -0
- package/pages/30.guides/60.components/styled-components/tokens.mdx +22 -0
- package/pages/30.guides/70.assets/00.favicons.guide.mdx +32 -0
- package/pages/30.guides/70.assets/10.fonts.guide.mdx +59 -0
- package/pages/30.guides/70.assets/11.languageFont.explorer.stories.tsx +15 -0
- package/pages/30.guides/70.assets/30.icons.explorer.mdx +30 -0
- package/pages/30.guides/70.assets/40.illustrations.explorer.mdx +12 -0
- package/pages/30.guides/70.assets/components/FontForLanguages.tsx +357 -0
- package/pages/30.guides/70.assets/components/IconDetails.styles.ts +29 -0
- package/pages/30.guides/70.assets/components/IconDetails.tsx +163 -0
- package/pages/30.guides/70.assets/components/IconItem.styles.ts +51 -0
- package/pages/30.guides/70.assets/components/IconItem.tsx +35 -0
- package/pages/30.guides/70.assets/components/IconList.styles.ts +9 -0
- package/pages/30.guides/70.assets/components/IconList.tsx +26 -0
- package/pages/30.guides/70.assets/components/IconSearch.styles.ts +23 -0
- package/pages/30.guides/70.assets/components/IconSearch.tsx +19 -0
- package/pages/30.guides/70.assets/components/IconSearchResults.styles.ts +7 -0
- package/pages/30.guides/70.assets/components/IconSearchResults.tsx +37 -0
- package/pages/30.guides/70.assets/components/IconsSearchContext/IconSearchProvider.tsx +37 -0
- package/pages/30.guides/70.assets/components/IconsSearchContext/IconsContext.ts +36 -0
- package/pages/30.guides/70.assets/components/IconsSearchContext/useIconSearchContext.ts +5 -0
- package/pages/30.guides/70.assets/components/IllustrationsList.tsx +133 -0
- package/pages/30.guides/70.assets/components/ThemeOptionsItem.tsx +49 -0
- package/pages/30.guides/70.assets/components/ThemeOptionsList.tsx +61 -0
- package/pages/30.guides/70.assets/constants/icon-imports.ts +583 -0
- package/pages/30.guides/70.assets/functions/import-svg-file-name.tsx +8 -0
- package/pages/30.guides/70.assets/styles.css +35 -0
- package/pages/30.guides/90.migrations/2025-q4-ds-cleanup.mdx +1295 -0
- package/pages/50.utilities/getTokenVar.mdx +19 -0
- package/pages/50.utilities/gradientBorders.mdx +87 -0
- package/pages/50.utilities/usePortalElement.mdx +26 -0
- package/pages/hat.svg +3 -0
- package/pages/playground.stories.tsx +26 -0
- package/pages/welcome.mdx +35 -0
- package/pages/zeroheight.mdx +53 -0
- package/public/assets/avatar-1.png +0 -0
- package/public/assets/avatar-2.png +0 -0
- package/public/assets/avatar-3.png +0 -0
- package/public/assets/avatar-4.png +0 -0
- package/public/assets/avatar-5.png +0 -0
- package/public/assets/logo.svg +1 -0
- package/public/assets/path-preply-org.jpg +0 -0
- package/public/assets/path.png +0 -0
- package/root.html +13 -0
- package/tsconfig.json +11 -1
- package/vitest.config.mts +5 -3
- package/config/packages.js +0 -21
- package/config/utils/statics.js +0 -30
- package/config/vitest.setup.ts +0 -9
- package/dist/assets/00.LayoutFlex.stories-DER40PUP.js +0 -85
- package/dist/assets/00.using-responsive-props-Dtv6-YXW.js +0 -18
- package/dist/assets/01.semantic-tokens-DnB7r57n.js +0 -2
- package/dist/assets/10.Combinations.stories-B7f7hRFA.js +0 -128
- package/dist/assets/30.icons.explorer-Dj-ys2GU.js +0 -73
- package/dist/assets/40.illustrations.explorer-Coq1W0EG.js +0 -21
- package/dist/assets/Accordion-iUMOrUCV.js +0 -23
- package/dist/assets/AlertDialog.stories-Dt0cfcEo.js +0 -243
- package/dist/assets/Avatar-NdNFhLYi.js +0 -6
- package/dist/assets/Avatar.stories-DYqwXUUw.js +0 -42
- package/dist/assets/AvatarWithStatus.stories-Bhrj0cSz.js +0 -41
- package/dist/assets/Badge-DWapjrJk.css +0 -1
- package/dist/assets/Badge.stories-DR_x-i6O.js +0 -85
- package/dist/assets/Box.stories-DieBkr98.js +0 -44
- package/dist/assets/BubbleCounter.stories-CCKFDvHr.js +0 -242
- package/dist/assets/Button-B5i7cA94.js +0 -1
- package/dist/assets/Button-C-6rDSzI.js +0 -20
- package/dist/assets/ButtonBase-h431KMrY.js +0 -8
- package/dist/assets/Checkbox-BnqXU33n.js +0 -10
- package/dist/assets/Checkbox.tests.stories-CKbpVER5.js +0 -64
- package/dist/assets/Chips.stories-kLSnMqrz.js +0 -146
- package/dist/assets/Color-YHDXOIA2-BWptXrTc.js +0 -1
- package/dist/assets/ComposingPopovers.stories--SKHALGr.js +0 -49
- package/dist/assets/CountryFlag-DuiC2miK.js +0 -49
- package/dist/assets/CountryFlag.test.stories-BoCBFg0i.js +0 -27
- package/dist/assets/Dialog.stories-RQp6xIqU.js +0 -379
- package/dist/assets/DismissibleChips-BGcUuQYK.js +0 -1
- package/dist/assets/Divider-BPgGsji3.js +0 -1
- package/dist/assets/Divider.stories-D0XhMPpe.js +0 -9
- package/dist/assets/DocsRenderer-CFRXHY34-7_I-DC5T.js +0 -2
- package/dist/assets/DropdownMenu-PLTFFi-U.js +0 -1229
- package/dist/assets/FieldButton-DAY3HLuQ.js +0 -1
- package/dist/assets/FieldButton.stories-DApRDUo4.js +0 -1
- package/dist/assets/FormControl-BIPOTQBb.js +0 -7
- package/dist/assets/FormControl.stories-Ybw0qxva.js +0 -67
- package/dist/assets/Heading-CzIRSKAr.js +0 -1
- package/dist/assets/Heading.stories-B0-2LbXt.js +0 -67
- package/dist/assets/Icon-BsfKiFZj.js +0 -8
- package/dist/assets/Icon-RSC-4fhV_e9B.js +0 -6
- package/dist/assets/IconButton-BgdrD9k8.js +0 -8
- package/dist/assets/Input-CfV08vH7.js +0 -48
- package/dist/assets/InputContainer-Cnv--ROK.js +0 -2
- package/dist/assets/IntegrationWithReactHookForm.stories-BgtVrzFb.js +0 -460
- package/dist/assets/IntlFormattedCurrency.stories-BMYzNxPt.js +0 -1
- package/dist/assets/IntlFormattedDateTime.stories-ZBusegeN.js +0 -1
- package/dist/assets/LayoutFlex-B05EaYB1.css +0 -1
- package/dist/assets/LayoutFlex-BkczeydK.js +0 -1
- package/dist/assets/LayoutFlex-DF8MvGnJ.js +0 -1
- package/dist/assets/LayoutFlexItem-XGd2QoPI.js +0 -1
- package/dist/assets/LayoutGrid-B5JJKgNY.js +0 -1
- package/dist/assets/LayoutGrid-CcWPCxyF.js +0 -1
- package/dist/assets/LayoutGrid.stories-CLDor39v.js +0 -88
- package/dist/assets/LayoutGridItem-BLoIIsgH.js +0 -1
- package/dist/assets/Link-CjAvDgdX.js +0 -5
- package/dist/assets/Loader.stories-CgVn9xQk.js +0 -37
- package/dist/assets/MultiSelectChips-9U0Tnh2Z.js +0 -2
- package/dist/assets/NumberField-CmClnfq6.js +0 -6
- package/dist/assets/NumberField.stories-3yRHDVS1.js +0 -254
- package/dist/assets/ObserveIntersection-tF7V09tr.js +0 -8
- package/dist/assets/ObserveIntersection.stories-CU9weI-s.js +0 -27
- package/dist/assets/OnboardingTooltip-DVeLAHtQ.js +0 -16
- package/dist/assets/OnboardingTooltip.tests.stories-O2UC2o4R.js +0 -79
- package/dist/assets/OnboardingTour-D3xEUgOf.js +0 -4
- package/dist/assets/OnboardingTour.stories-CBnSnEFN.js +0 -46
- package/dist/assets/PasswordField-DAL68lC4.js +0 -6
- package/dist/assets/PasswordField.stories-DYI1gVQx.js +0 -228
- package/dist/assets/PortalElementProvider-BAqvxZzH.js +0 -1
- package/dist/assets/PreplyLogo.stories-DP9KwK_Z.js +0 -95
- package/dist/assets/ProgressBar.stories-DZGEpHCd.js +0 -44
- package/dist/assets/ProgressSteps-BfCnfM68.js +0 -2
- package/dist/assets/ProgressSteps.stories--Zns7FpA.js +0 -31
- package/dist/assets/PromoDialog-oLEsdGtd.js +0 -3
- package/dist/assets/RangeSlider-BKOYT1ZU.js +0 -4
- package/dist/assets/Rating.stories-CC-5R6ut.js +0 -116
- package/dist/assets/RootProvider-CyXG17jf.js +0 -1
- package/dist/assets/SelectField-ByfZzt_b.js +0 -53
- package/dist/assets/SelectField.stories-IaZzYevq.js +0 -243
- package/dist/assets/ShowOnIntersection.stories-C2m-k9HC.js +0 -17
- package/dist/assets/SingleSelectChips-D7f85tAs.js +0 -2
- package/dist/assets/Slider-GGejckz6.js +0 -2
- package/dist/assets/Slider.stories-DSglTZg5.js +0 -69
- package/dist/assets/Spinner-qiZily8k.js +0 -1
- package/dist/assets/Steps-BnIR8N56.js +0 -26
- package/dist/assets/StorybookGlobalStyle-CtZU2X7e.js +0 -42
- package/dist/assets/Switch-B-jGiz3C.js +0 -12
- package/dist/assets/Text-DVl1HBkZ.js +0 -1
- package/dist/assets/Text.stories-CHcPPDZB.js +0 -58
- package/dist/assets/TextField-BRDwFAhX.js +0 -6
- package/dist/assets/TextField.stories-Psl8ijNV.js +0 -253
- package/dist/assets/TextHighlighted.stories-CTQM4A4u.js +0 -32
- package/dist/assets/TextInline.stories-TEw3tSim.js +0 -50
- package/dist/assets/TextareaField-BUSqPXn3.js +0 -53
- package/dist/assets/Toast-Bce4LWtf.css +0 -1
- package/dist/assets/Toast.stories-Den6Rcqh.js +0 -101
- package/dist/assets/TokyoUIAttach-BWl7Jkq1.js +0 -1
- package/dist/assets/TokyoUIAvailability7LateNight-TgMFD5Or.js +0 -1
- package/dist/assets/TokyoUICheck-BMIsD36S.js +0 -1
- package/dist/assets/TokyoUIChevronDown-CEw5hWWz.js +0 -1
- package/dist/assets/TokyoUIClose-thK8sk63.js +0 -1
- package/dist/assets/TokyoUIEmojiFrowning-DwuiVRut.js +0 -1
- package/dist/assets/TokyoUIEye-CteyS9_g.js +0 -1
- package/dist/assets/TokyoUIFav-DOVerCtW.js +0 -1
- package/dist/assets/TokyoUIInfo-DbkQBubr.js +0 -1
- package/dist/assets/TokyoUILanguage-CLpo5Vdq.js +0 -1
- package/dist/assets/TokyoUILibraryExplore-B9OQyi-V.js +0 -1
- package/dist/assets/TokyoUILock-CUE2UpP8.js +0 -1
- package/dist/assets/TokyoUIMessages-BShhOmUG.js +0 -1
- package/dist/assets/TokyoUIMinus-RacYe9uc.js +0 -1
- package/dist/assets/TokyoUINotebook-kt8pWj_a.js +0 -1
- package/dist/assets/TokyoUINotesWithPad-B-o4vu0Y.js +0 -1
- package/dist/assets/TokyoUIPhone-CvuBM6jb.js +0 -1
- package/dist/assets/TokyoUISettings-NNMqOtUc.js +0 -1
- package/dist/assets/TokyoUIStarFilled-CVOoYvsY.js +0 -1
- package/dist/assets/TokyoUITag-CS4uarg6.js +0 -1
- package/dist/assets/TokyoUIUpload-Bf0gWv4M.js +0 -1
- package/dist/assets/TokyoUIUser-Cvenl_VS.js +0 -1
- package/dist/assets/Tooltip-_f_f-kTL.js +0 -9
- package/dist/assets/Tooltip.stories-C2Yz1gLt.js +0 -93
- package/dist/assets/VisuallyHidden-CZd13GOS.js +0 -1
- package/dist/assets/_commonjsHelpers-Cpj98o6Y.js +0 -1
- package/dist/assets/align-self-Cj4aclWl.js +0 -1
- package/dist/assets/changelog-Caynf8sn.js +0 -2325
- package/dist/assets/chunk-XP5HYGXS-BpfKkqn7.js +0 -1
- package/dist/assets/classNames-9hsFPPZv.js +0 -1
- package/dist/assets/client-CYxxc9KC.js +0 -1
- package/dist/assets/constants-DTpaCXm6.js +0 -1
- package/dist/assets/constants-DVSid1Xr.js +0 -48
- package/dist/assets/createRequiredContext-DPmvfWRz.js +0 -241
- package/dist/assets/defaults-_YAxqn11.js +0 -1
- package/dist/assets/entry-preview-B8S6AF6S.js +0 -2
- package/dist/assets/entry-preview-docs-BuAKzHmI.js +0 -46
- package/dist/assets/getTokenVar-4Jlty0xz.js +0 -1
- package/dist/assets/getTokenVar-Ik0AWZ4t.js +0 -11
- package/dist/assets/hoist-non-react-statics.cjs-C-Qo8PK8.js +0 -8
- package/dist/assets/hover-CquEGcLG.js +0 -13
- package/dist/assets/hover-DSaWqp3c.js +0 -14
- package/dist/assets/hover-ZyQgH17L.js +0 -16
- package/dist/assets/iframe-C3SpczPa.js +0 -211
- package/dist/assets/index--TGv0Gnn.js +0 -131
- package/dist/assets/index-2TVOn9du.js +0 -1
- package/dist/assets/index-B-lxVbXh.js +0 -1
- package/dist/assets/index-BN6VMYqa.js +0 -1
- package/dist/assets/index-BPCsOyHr.js +0 -24
- package/dist/assets/index-BV2iXjxm.js +0 -1
- package/dist/assets/index-BqT8peiM.js +0 -1
- package/dist/assets/index-C5uDgNEj.js +0 -12
- package/dist/assets/index-CA5R8PN9.js +0 -8
- package/dist/assets/index-CRQycg-8.js +0 -575
- package/dist/assets/index-CUHsGBvM.js +0 -41
- package/dist/assets/index-Cb9e4tly.js +0 -1
- package/dist/assets/index-Cc-bXjHe.js +0 -1
- package/dist/assets/index-ChsGqxH_.js +0 -9
- package/dist/assets/index-DR63UjCN.js +0 -1
- package/dist/assets/index-DWSmmBvQ.js +0 -12
- package/dist/assets/index-Dk_MCKuE.js +0 -240
- package/dist/assets/index-DrFu-skq.js +0 -6
- package/dist/assets/index-qlqSh81O.js +0 -1
- package/dist/assets/index-s7KTOhR7.js +0 -1
- package/dist/assets/jsx-runtime-BTJTZTIL.js +0 -9
- package/dist/assets/layout-relative-Rn-Bns4t.js +0 -1
- package/dist/assets/layout-relative.module-1z75aSwo-rvXP8TMg.js +0 -1
- package/dist/assets/layout-relative.module-FOVgic7W.js +0 -1
- package/dist/assets/matchers-7Z3WT2CE-T3xScrR7.js +0 -14
- package/dist/assets/message-CSdaKtIj.js +0 -1
- package/dist/assets/playground.stories-_pKinBuZ.js +0 -6
- package/dist/assets/preview-B2Uoj8bD.js +0 -2
- package/dist/assets/preview-B8lJiyuQ.js +0 -34
- package/dist/assets/preview-BBWR9nbA.js +0 -1
- package/dist/assets/preview-BO3Eq4YI.js +0 -11
- package/dist/assets/preview-BTnW7Hye.js +0 -1
- package/dist/assets/preview-BWzBA1C2.js +0 -396
- package/dist/assets/preview-CtMGbgR3.js +0 -1
- package/dist/assets/preview-CvbIS5ZJ.js +0 -1
- package/dist/assets/preview-CzAPySEb.css +0 -1
- package/dist/assets/preview-DGUiP6tS.js +0 -7
- package/dist/assets/preview-DHQbi4pV.js +0 -1
- package/dist/assets/preview-RZiq1oHg.js +0 -2
- package/dist/assets/react-18-vqCHxTgY.js +0 -1
- package/dist/assets/render-icon-BT0Aq7PA.js +0 -9
- package/dist/assets/styled-components.browser.esm-COuAnjOv.js +0 -2
- package/dist/assets/test-utils-Cec0Zua5.js +0 -9
- package/dist/assets/text-accent-VILyY3zt.js +0 -1
- package/dist/assets/text-centered-BFb64PJw.js +0 -1
- package/dist/assets/text-centered-DRiH4EXX.js +0 -1
- package/dist/assets/tokens-BYLcI6Lk.js +0 -1
- package/dist/assets/tokens-CNkSTEMS.js +0 -15
- package/dist/assets/tslib.es6-C7pnyCjR.js +0 -1
- package/dist/assets/useControllableState-DKskwY-e.js +0 -1
- package/dist/assets/useHostname-PsilflFC.js +0 -1
- package/dist/assets/useMergeRefs-D_RfOOSs.js +0 -1
- package/dist/assets/useMergeRefs-SFH7Mw4x.js +0 -1
- package/dist/assets/useOpenInteractionType-BkuUI9ak.js +0 -15
- package/dist/assets/usePortalElement-CZ5jtEVS.js +0 -19
- package/dist/assets/useTheme-zzbPBRtu.js +0 -1
- package/dist/assets/useToken-Cfvk3vM1.js +0 -1
- package/dist/assets/v4-CtRu48qb.js +0 -1
- package/dist/sb-addons/actions-2/manager-bundle.js +0 -3
- package/dist/sb-addons/config-13/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-actions-5/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-backgrounds-7/manager-bundle.js +0 -12
- package/dist/sb-addons/essentials-controls-4/manager-bundle.js +0 -402
- package/dist/sb-addons/essentials-docs-6/manager-bundle.js +0 -242
- package/dist/sb-addons/essentials-measure-10/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-outline-11/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-toolbars-9/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-viewport-8/manager-bundle.js +0 -3
- package/dist/sb-addons/links-3/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-experimental-addon-test-12/manager-bundle.js +0 -223
- package/dist/sb-manager/globals-module-info.js +0 -1052
- package/docs/root.html +0 -13
- package/scripts/copy-statics.js +0 -12
- package/scripts/publish-changelog.js +0 -39
- /package/{config → .storybook}/decorators/preventIframeFromScrollingParent.module.css +0 -0
- /package/{config → .storybook}/decorators/withRootProvider.tsx +0 -0
- /package/{config → .storybook}/manager-head.html +0 -0
- /package/dist/assets/{index-D1siTi3u.css → Dialog-D1siTi3u.css} +0 -0
- /package/{docs/static → dist/assets}/logo.svg +0 -0
- /package/{docs/static → dist/assets}/path-preply-org.jpg +0 -0
- /package/{docs/static → dist/assets}/path.png +0 -0
- /package/{docs/static → public}/favicon.svg +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o
|
|
1
|
+
import{j as o,M as s}from"./iframe-CWgEsn_I.js";import{useMDXComponents as t}from"./index-BiSZC2o0.js";import"./preload-helper-Dp1pzeXC.js";function n(r){const e={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...t(),...r.components};return o.jsxs(o.Fragment,{children:[o.jsx(s,{title:"Guides/Installation/Storybook"}),`
|
|
2
2
|
`,o.jsx(e.h1,{id:"installation-storybook",children:"Installation: Storybook"}),`
|
|
3
3
|
`,o.jsxs(e.p,{children:["This guide applies to Storybook setups that document Preply components libraries, and assumes you have read and followed the steps outlined in the ",o.jsx(e.a,{href:"/story/guides-installation-libraries--page",children:"Installation: Libaries"})," guide."]}),`
|
|
4
4
|
`,o.jsx(e.h2,{id:"packages",children:"Packages"}),`
|
|
@@ -39,4 +39,4 @@ import { withProviders } from './decorators';
|
|
|
39
39
|
|
|
40
40
|
export const decorators = [withProviders];
|
|
41
41
|
`})}),`
|
|
42
|
-
`,o.jsxs(e.p,{children:["See also: ",o.jsx(e.a,{href:"https://storybook.js.org/docs/react/writing-stories/decorators",rel:"nofollow",children:"Storybook's official docs"}),"."]})]})}function
|
|
42
|
+
`,o.jsxs(e.p,{children:["See also: ",o.jsx(e.a,{href:"https://storybook.js.org/docs/react/writing-stories/decorators",rel:"nofollow",children:"Storybook's official docs"}),"."]})]})}function a(r={}){const{wrapper:e}={...t(),...r.components};return e?o.jsx(e,{...r,children:o.jsx(n,{...r})}):n(r)}export{a as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{j as t,M as a}from"./iframe-CWgEsn_I.js";import{useMDXComponents as r}from"./index-BiSZC2o0.js";import{L as c}from"./LayoutGrid-Ddqp2KT2.js";import{d as e}from"./styled-components.browser.esm-DsfIp3u0.js";import{g as i}from"./getTokenVar-DGGittrV.js";import{s as u,c as l}from"./tokens-I7xc-5gL.js";import"./preload-helper-Dp1pzeXC.js";import"./breakpoints-BfMlrtxE.js";import"./layout-relative.module-1z75aSwo-BlGCRaGo.js";import"./constants-DYYVurUY.js";import"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import"./componentNames-CmmTyjin.js";import"./emotion-unitless.esm-BZwEwAnk.js";const n=["https://static.preply.com/ds/illustrations/tokyo-ui/airplain.svg","https://static.preply.com/ds/illustrations/tokyo-ui/arrows-multiple.svg","https://static.preply.com/ds/illustrations/tokyo-ui/arrows-upwards.svg","https://static.preply.com/ds/illustrations/tokyo-ui/artist.svg","https://static.preply.com/ds/illustrations/tokyo-ui/awesome.svg","https://static.preply.com/ds/illustrations/tokyo-ui/back-to-school.svg","https://static.preply.com/ds/illustrations/tokyo-ui/bar-graph.svg","https://static.preply.com/ds/illustrations/tokyo-ui/bell.svg","https://static.preply.com/ds/illustrations/tokyo-ui/booking-a-lesson.svg","https://static.preply.com/ds/illustrations/tokyo-ui/books-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/books.svg","https://static.preply.com/ds/illustrations/tokyo-ui/brain.svg","https://static.preply.com/ds/illustrations/tokyo-ui/browser-permissions-chromium.svg","https://static.preply.com/ds/illustrations/tokyo-ui/browser-permissions-safari.svg","https://static.preply.com/ds/illustrations/tokyo-ui/bubbles.svg","https://static.preply.com/ds/illustrations/tokyo-ui/calendar.svg","https://static.preply.com/ds/illustrations/tokyo-ui/calendar-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/checkmark.svg","https://static.preply.com/ds/illustrations/tokyo-ui/clock.svg","https://static.preply.com/ds/illustrations/tokyo-ui/clocks.svg","https://static.preply.com/ds/illustrations/tokyo-ui/coins.svg","https://static.preply.com/ds/illustrations/tokyo-ui/committed.svg","https://static.preply.com/ds/illustrations/tokyo-ui/confetti.svg","https://static.preply.com/ds/illustrations/tokyo-ui/cosmopolite.svg","https://static.preply.com/ds/illustrations/tokyo-ui/desk.svg","https://static.preply.com/ds/illustrations/tokyo-ui/desk-supplies.svg","https://static.preply.com/ds/illustrations/tokyo-ui/discount-badge.svg","https://static.preply.com/ds/illustrations/tokyo-ui/disco-ball.svg","https://static.preply.com/ds/illustrations/tokyo-ui/dog.svg","https://static.preply.com/ds/illustrations/tokyo-ui/first-steps.svg","https://static.preply.com/ds/illustrations/tokyo-ui/game-on.svg","https://static.preply.com/ds/illustrations/tokyo-ui/getting-started-down.svg","https://static.preply.com/ds/illustrations/tokyo-ui/getting-started.svg","https://static.preply.com/ds/illustrations/tokyo-ui/globe-spot.svg","https://static.preply.com/ds/illustrations/tokyo-ui/great-homework.svg","https://static.preply.com/ds/illustrations/tokyo-ui/growth.svg","https://static.preply.com/ds/illustrations/tokyo-ui/guitar.svg","https://static.preply.com/ds/illustrations/tokyo-ui/hard-work-1.svg","https://static.preply.com/ds/illustrations/tokyo-ui/hard-work-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/heart.svg","https://static.preply.com/ds/illustrations/tokyo-ui/it-guru.svg","https://static.preply.com/ds/illustrations/tokyo-ui/lamp-and-books.svg","https://static.preply.com/ds/illustrations/tokyo-ui/language-flash-cards.svg","https://static.preply.com/ds/illustrations/tokyo-ui/laptop.svg","https://static.preply.com/ds/illustrations/tokyo-ui/laptop-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/magnifying-glass.svg","https://static.preply.com/ds/illustrations/tokyo-ui/making-progress.svg","https://static.preply.com/ds/illustrations/tokyo-ui/map.svg","https://static.preply.com/ds/illustrations/tokyo-ui/meeting-with-tutor-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/meeting-with-tutor.svg","https://static.preply.com/ds/illustrations/tokyo-ui/messages.svg","https://static.preply.com/ds/illustrations/tokyo-ui/messaging.svg","https://static.preply.com/ds/illustrations/tokyo-ui/mobile-app.svg","https://static.preply.com/ds/illustrations/tokyo-ui/notes.svg","https://static.preply.com/ds/illustrations/tokyo-ui/open-book.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pause-button.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pencil-and-pen-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pencil-and-pen.svg","https://static.preply.com/ds/illustrations/tokyo-ui/pig.svg","https://static.preply.com/ds/illustrations/tokyo-ui/play-button.svg","https://static.preply.com/ds/illustrations/tokyo-ui/polyglot-2.svg","https://static.preply.com/ds/illustrations/tokyo-ui/polyglot-pink.svg","https://static.preply.com/ds/illustrations/tokyo-ui/polyglot.svg","https://static.preply.com/ds/illustrations/tokyo-ui/present.svg","https://static.preply.com/ds/illustrations/tokyo-ui/professional.svg","https://static.preply.com/ds/illustrations/tokyo-ui/progress-steps.svg","https://static.preply.com/ds/illustrations/tokyo-ui/rising-arrows.svg","https://static.preply.com/ds/illustrations/tokyo-ui/rock-on.svg","https://static.preply.com/ds/illustrations/tokyo-ui/routine-master.svg","https://static.preply.com/ds/illustrations/tokyo-ui/serious-learner.svg","https://static.preply.com/ds/illustrations/tokyo-ui/sheet.svg","https://static.preply.com/ds/illustrations/tokyo-ui/smiley.svg","https://static.preply.com/ds/illustrations/tokyo-ui/speech-bubble.svg","https://static.preply.com/ds/illustrations/tokyo-ui/star_coin.svg","https://static.preply.com/ds/illustrations/tokyo-ui/stop-button.svg","https://static.preply.com/ds/illustrations/tokyo-ui/stopwatch.svg","https://static.preply.com/ds/illustrations/tokyo-ui/system-permissions.svg","https://static.preply.com/ds/illustrations/tokyo-ui/testing-the-water.svg","https://static.preply.com/ds/illustrations/tokyo-ui/three-arrows.svg","https://static.preply.com/ds/illustrations/tokyo-ui/thumbs-up.svg","https://static.preply.com/ds/illustrations/tokyo-ui/you-did-great-today.svg","https://static.preply.com/ds/illustrations/tokyo-ui/warning.svg","https://static.preply.com/ds/illustrations/tokyo-ui/flashcards.svg"],y=e.div`
|
|
2
|
+
padding: ${i(u[12])};
|
|
3
|
+
-webkit-background-size: 50px 50px;
|
|
4
|
+
-moz-background-size: 50px 50px;
|
|
5
|
+
background-size: 50px 50px;
|
|
6
|
+
background-color: ${i(l.background.tertiary)};
|
|
7
|
+
background-image: linear-gradient(
|
|
8
|
+
45deg,
|
|
9
|
+
${i(l.background.secondary)} 25%,
|
|
10
|
+
transparent 25%,
|
|
11
|
+
transparent 50%,
|
|
12
|
+
${i(l.background.secondary)} 50%,
|
|
13
|
+
${i(l.background.secondary)} 75%,
|
|
14
|
+
transparent 75%,
|
|
15
|
+
transparent
|
|
16
|
+
);
|
|
17
|
+
`,d=({svgUrl:s})=>t.jsx("div",{style:{width:"80%"},children:t.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",children:[s.replace("https://static.preply.com/ds/illustrations/tokyo-ui/",""),t.jsx("img",{src:s,alt:"TODO:"})]})}),g=()=>t.jsx(y,{children:t.jsx(c,{columns:["25% 25% 25% 25%"],gap:"16",children:n.map(s=>t.jsx(d,{svgUrl:s},s))})});function p(s){const o={a:"a",h1:"h1",p:"p",...r(),...s.components};return t.jsxs(t.Fragment,{children:[t.jsx(a,{title:"Guides/Assets/Illustration Explorer"}),`
|
|
18
|
+
`,t.jsx(o.h1,{id:"illustration-explorer",children:"Illustration Explorer"}),`
|
|
19
|
+
`,t.jsxs(o.p,{children:["Don't see the illustration you're looking for? You can follow ",t.jsx(o.a,{href:"https://preply.atlassian.net/wiki/spaces/PDS/pages/4332584962/Hosting+new+illustration",rel:"nofollow",children:"this guide"}),` to upload it yourself, it's super easy! Or reach out to us in
|
|
20
|
+
`,t.jsx(o.a,{href:"https://preply.slack.com/archives/C024EAEHP6V",rel:"nofollow",children:"#design-system-public"}),"."]}),`
|
|
21
|
+
`,t.jsx(g,{})]})}function z(s={}){const{wrapper:o}={...r(),...s.components};return o?t.jsx(o,{...s,children:t.jsx(p,{...s})}):p(s)}export{z as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e
|
|
1
|
+
import{j as e,M as i}from"./iframe-CWgEsn_I.js";import{useMDXComponents as t}from"./index-BiSZC2o0.js";import"./preload-helper-Dp1pzeXC.js";function r(n){const o={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",...t(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Guides/Installation/Advanced"}),`
|
|
2
2
|
`,e.jsx(o.h1,{id:"installation-advanced",children:"Installation: Advanced"}),`
|
|
3
3
|
`,e.jsxs(o.p,{children:["This page is about rolling out your own alternative to ",e.jsx(o.code,{children:"<RootProvider/>"})," (advanced usage)."]}),`
|
|
4
4
|
`,e.jsxs(o.p,{children:["If you are looking for how to install, refer to the ",e.jsx(o.a,{href:"/story/guides-installation-applications--page",children:"installation guides"})," instead."]}),`
|
|
@@ -29,4 +29,4 @@ export const RootProvider: FC = ({ children }) => (
|
|
|
29
29
|
</ThemeProvider>
|
|
30
30
|
</ThemesProvider>
|
|
31
31
|
);
|
|
32
|
-
`})})]})}function
|
|
32
|
+
`})})]})}function c(n={}){const{wrapper:o}={...t(),...n.components};return o?e.jsx(o,{...n,children:e.jsx(r,{...n})}):r(n)}export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,j as s,g as c}from"./iframe-CWgEsn_I.js";import{F as R}from"./TokyoUIChevronDown-CV0GTyb_.js";import{I as x}from"./Icon-BbVZ9NP7.js";import{T as d}from"./Text-D2ssZW1_.js";import{u as A}from"./useMergeRefs-Cma75nFm.js";import{w as I}from"./componentNames-CmmTyjin.js";const g="accordion__OKb-C",m={accordion:g,"--dsInternalSimulation-focus":"_--dsInternalSimulation-focus__7V0NR","--dsInternalSimulation-noAnimation":"_--dsInternalSimulation-noAnimation__nuNUW"};function p({ref:e,onOpenChange:r}){const o=a.useRef(null),n=A(o,e);return a.useEffect(()=>{if(!o.current)return;const t=o.current,i=()=>{r==null||r(t.open)};return t&&t.addEventListener("toggle",i),()=>{t&&t.removeEventListener("toggle",i)}},[r]),{mergedRef:r||e?n:null}}const N=({dataset:e,children:r,"aria-label":o})=>s.jsx("div",{className:m.accordion,"aria-label":o,...c(e),"data-preply-ds-component":I.Accordion,children:r}),S=a.forwardRef(function({open:r,name:o,dataset:n,children:t,onOpenChange:i,dsInternalSimulation:l},u){const{mergedRef:f}=p({ref:u,onOpenChange:i});return s.jsx("details",{ref:f,name:o,open:r,...c(n),className:m[`--dsInternalSimulation-${l}`],children:t})}),y=a.forwardRef(function({dataset:r,children:o,onClick:n},t){return s.jsxs("summary",{ref:t,...c(r),onClick:n,children:[s.jsx(d,{variant:"default-semibold",children:o}),s.jsx(x,{svg:R})]})}),T=a.forwardRef(function({dataset:r,children:o},n){return s.jsx(d,{tag:"div",variant:"small-regular",ref:n,...c(r),children:o})});export{N as A,S as a,y as b,T as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./
|
|
1
|
+
import{j as e}from"./iframe-CWgEsn_I.js";import{A as r,a as n,b as t,c as o}from"./Accordion-Bjcf873X.js";import{T as p}from"./Text-D2ssZW1_.js";import{H as T}from"./Heading-jyl-6mnE.js";import{B as W}from"./Button-KgwWX-kY.js";import"./preload-helper-Dp1pzeXC.js";import"./TokyoUIChevronDown-CV0GTyb_.js";import"./Icon-BbVZ9NP7.js";import"./text-accent-CvDqGyH8.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-DCa6Vadq.js";import"./componentNames-CmmTyjin.js";import"./useMergeRefs-Cma75nFm.js";import"./text-centered-4FcavPd_.js";import"./ButtonBase-LoF75NjE.js";import"./Spinner-BtlYJQrD.js";import"./useHostname-DENeD9To.js";import"./index-CC6DAVyL.js";const X={title:"components/Accordion",component:r,args:{}},s={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(t,{children:"Is Preply the best platform for learning a language?"}),e.jsx(o,{children:"Of course it is!"})]}),e.jsxs(n,{children:[e.jsx(t,{children:"Why?"}),e.jsx(o,{children:"If you are wondering, it means you have not tried it out yet!"})]})]})}},a={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Is Preply the best platform for learning a language?"}),e.jsx(o,{children:"Of course it is!"})]}),e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Why?"}),e.jsx(o,{children:"If you are wondering, it means you have not tried it out yet!"})]})]})}},c={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(t,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."}),e.jsx(o,{children:"Lorem ipsum"})]}),e.jsxs(n,{children:[e.jsx(t,{children:"Lorem ipsum"}),e.jsx(o,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})]}),e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."}),e.jsx(o,{children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."})]})]})}},d={render:function(){return e.jsx(r,{children:e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Is Preply the best platform for learning a language?"}),e.jsxs(o,{children:[e.jsx(T,{variant:"large",tag:"div",children:"Yes!"}),e.jsx(p,{variant:"large-regular-italic",children:"What are you waiting for?"}),e.jsx(W,{children:"Book a lesson now!"})]})]})})}},l={render:function(){return e.jsxs(r,{children:[e.jsxs(n,{name:"choose-subscription-duration",children:[e.jsx(t,{children:"Two-week subscription"}),e.jsx(o,{children:"We will charge you every two weeks."})]}),e.jsxs(n,{name:"choose-subscription-duration",children:[e.jsx(t,{children:"Four-week subscription"}),e.jsx(o,{children:"We will charge you every four weeks."})]})]})}},u={render:function(){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(p,{variant:"default-regular-italic",children:"closed"}),e.jsx("div",{style:{display:"flex",gap:"16px"},children:e.jsx(r,{children:e.jsxs(n,{children:[e.jsx(t,{children:"Header"}),e.jsx(o,{children:"Content"})]})})})]}),e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(p,{variant:"default-regular-italic",children:"open"}),e.jsx("div",{style:{display:"flex",gap:"16px"},children:e.jsx(r,{children:e.jsxs(n,{open:!0,children:[e.jsx(t,{children:"Header"}),e.jsx(o,{children:"Content"})]})})})]}),e.jsxs("div",{style:{display:"flex",gap:"16px",flexDirection:"column"},children:[e.jsx(p,{variant:"default-regular-italic",children:"focus"}),e.jsx("div",{style:{display:"flex",gap:"16px"},children:e.jsx(r,{children:e.jsxs(n,{dsInternalSimulation:"focus",children:[e.jsx(t,{children:"Header"}),e.jsx(o,{children:"Content"})]})})})]})]})}};var m,h,y;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
|
2
2
|
render: function Story() {
|
|
3
3
|
return <Accordion>
|
|
4
4
|
<AccordionItem>
|
|
@@ -115,7 +115,7 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{A as r,a as n,b as t,c as o
|
|
|
115
115
|
</AccordionItem>
|
|
116
116
|
</Accordion>;
|
|
117
117
|
}
|
|
118
|
-
}`,...(C=(L=l.parameters)==null?void 0:L.docs)==null?void 0:C.source}}};var H,S,P;
|
|
118
|
+
}`,...(C=(L=l.parameters)==null?void 0:L.docs)==null?void 0:C.source}}};var H,S,P;u.parameters={...u.parameters,docs:{...(H=u.parameters)==null?void 0:H.docs,source:{originalSource:`{
|
|
119
119
|
render: function Story() {
|
|
120
120
|
return <>
|
|
121
121
|
<div style={{
|
|
@@ -174,4 +174,4 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{A as r,a as n,b as t,c as o
|
|
|
174
174
|
</div>
|
|
175
175
|
</>;
|
|
176
176
|
}
|
|
177
|
-
}`,...(P=(S=
|
|
177
|
+
}`,...(P=(S=u.parameters)==null?void 0:S.docs)==null?void 0:P.source}}};const Z=["Default","OpenByDefault","LongContent","WithCustomAndInteractiveContent","ImplementExclusiveAccordion","States"];export{s as Default,l as ImplementExclusiveAccordion,c as LongContent,a as OpenByDefault,u as States,d as WithCustomAndInteractiveContent,Z as __namedExportsOrder,X as default};
|
package/dist/assets/{Accordion.tests.stories-DHNOscki.js → Accordion.tests.stories-DycRaTsm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./
|
|
1
|
+
import{j as e}from"./iframe-CWgEsn_I.js";import{A as d,a as c,b as s,c as l}from"./Accordion-Bjcf873X.js";import{c as G}from"./OnboardingTour-DlsIO1Gv.js";import"./preload-helper-Dp1pzeXC.js";import"./TokyoUIChevronDown-CV0GTyb_.js";import"./Icon-BbVZ9NP7.js";import"./text-accent-CvDqGyH8.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-DCa6Vadq.js";import"./componentNames-CmmTyjin.js";import"./Text-D2ssZW1_.js";import"./text-centered-4FcavPd_.js";import"./useMergeRefs-Cma75nFm.js";import"./OnboardingTooltip-Clfuyvq4.js";import"./TokyoUIClose-Bf-N_4aK.js";import"./Button-KgwWX-kY.js";import"./ButtonBase-LoF75NjE.js";import"./Spinner-BtlYJQrD.js";import"./useHostname-DENeD9To.js";import"./index-CC6DAVyL.js";import"./Heading-jyl-6mnE.js";import"./index-BAEPs7Y-.js";import"./shared-strings-I9WUPC_k.js";import"./message-qc_MCF3J.js";import"./index-D3eu31XZ.js";const{userEvent:i,expect:o,within:U,waitFor:f,fn:z}=__STORYBOOK_MODULE_TEST__,Ce={title:"Components/Accordion/Tests",component:d,parameters:{controls:{disable:!0},chromatic:{disableSnapshot:!0}},tags:["!autodocs","!a11y-test","test"]},y={render:function(){return e.jsx(d,{"aria-label":"accordionLabel",children:e.jsxs(c,{children:[e.jsx(s,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvasElement:n})=>{const r=U(n).getByLabelText("accordionLabel");o(r).toBeVisible()}},m={args:{},render:function(){return e.jsxs(d,{children:[e.jsxs(c,{children:[e.jsx(s,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]}),e.jsxs(c,{children:[e.jsx(s,{children:"Why?"}),e.jsx(l,{children:"If you are wondering, it means you have not tried it out yet!"})]})]})},play:async({canvas:n,step:t})=>{const r=n.getByText("Is Preply the best platform for learning a language?"),a=n.getByText("Of course it is!"),u=n.getByText("Why?"),p=n.getByText("If you are wondering, it means you have not tried it out yet!");await t("Contents are hidden",async()=>{o(a).not.toBeVisible(),o(p).not.toBeVisible()}),await t("Content 1 is revelable",async()=>{await i.click(r),o(a).toBeVisible()}),await t("Content 2 is revelable",async()=>{await i.click(u),o(p).toBeVisible()}),await t("Both contents are visible (non-exclusivity check)",async()=>{o(a).toBeVisible(),o(p).toBeVisible()}),await t("Item 1 is hidable",async()=>{await i.click(r),o(a).not.toBeVisible()}),await t("Item 2 is hidable",async()=>{await i.click(u),o(p).not.toBeVisible()})}},h={args:{},render:function(){return e.jsx(d,{children:e.jsxs(c,{dsInternalSimulation:"noAnimation",children:[e.jsx(s,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvas:n,step:t})=>{const r=n.getByText("Is Preply the best platform for learning a language?"),a=n.getByText("Of course it is!");await t("Contents are hidden",async()=>{o(a).not.toBeVisible()}),await t("Content is revelable",async()=>{await i.click(r),o(a).toBeVisible()}),await t("Content is hidable",async()=>{await i.click(r),o(a).not.toBeVisible()})}},g={args:{},render:function(){return e.jsxs(d,{children:[e.jsxs(c,{name:"choose-subscription-duration",children:[e.jsx(s,{children:"Two-week subscription"}),e.jsx(l,{children:"We will charge you every two weeks."})]}),e.jsxs(c,{name:"choose-subscription-duration",children:[e.jsx(s,{children:"Four-week subscription"}),e.jsx(l,{children:"We will charge you every four weeks."})]})]})},play:async({canvas:n,step:t})=>{const r=n.getByText("Two-week subscription"),a=n.getByText("We will charge you every two weeks."),u=n.getByText("Four-week subscription"),p=n.getByText("We will charge you every four weeks.");await t("Contents are hidden",async()=>{o(a).not.toBeVisible(),o(p).not.toBeVisible()}),await t("Content 1 is revelable",async()=>{await i.click(r),o(a).toBeVisible()}),await t("Content 2 is revelable",async()=>{await i.click(u),o(p).toBeVisible()}),await t("Item 1 is hidden",async()=>{o(a).not.toBeVisible()})}},b={args:{onOpenChange:z()},render:function(t){return e.jsx(d,{children:e.jsxs(c,{onOpenChange:t.onOpenChange,children:[e.jsx(s,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvas:n,args:t,step:r})=>{const a=n.getByText("Is Preply the best platform for learning a language?");await r("onOpenChange is not called",async()=>{o(t.onOpenChange).not.toBeCalled()}),await r("onOpenChange is called with true",async()=>{await i.click(a),o(t.onOpenChange).toBeCalledWith(!0)}),await r("onOpenChange is called with false",async()=>{await i.click(a),o(t.onOpenChange).toBeCalledWith(!1)})}},w={args:{onClick:z()},render:function(t){return e.jsx(d,{children:e.jsxs(c,{children:[e.jsx(s,{onClick:t.onClick,children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})})},play:async({canvas:n,args:t,step:r})=>{const a=n.getByText("Is Preply the best platform for learning a language?");await r("onClick is not called",async()=>{o(t.onClick).not.toBeCalled()}),await r("onClick is called",async()=>{await i.click(a),o(t.onClick).toBeCalled()})}},x={render:function(){return e.jsx(d,{"aria-label":"accordion",dataset:{foo:1},children:e.jsxs(c,{dataset:{"qa-id":"firstItem"},children:[e.jsx(s,{dataset:{"qa-id":"firstItemHeader"},children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{dataset:{"qa-id":"firstItemContent"},children:"Yes!"})]})})},play:async({canvas:n})=>{const t=n.getByLabelText("accordion");o(t).toHaveAttribute("data-foo","1")}},C={render:function(){const t=G();return e.jsx(t.Provider,{totalSteps:2,children:e.jsxs(d,{children:[e.jsx(t.Step,{step:0,title:"Step 1",text:"Ensure you can answer this question",children:e.jsxs(c,{children:[e.jsx(s,{children:"Is Preply the best platform for learning a language?"}),e.jsx(l,{children:"Of course it is!"})]})}),e.jsx(t.Step,{step:1,title:"Step 2",text:"Push them to try Preply out!",children:e.jsxs(c,{children:[e.jsx(s,{children:"Why?"}),e.jsx(l,{children:"If you are wondering, it means you have not tried it out yet!"})]})})]})})},play:async({canvasElement:n,step:t})=>{const r=U(n);await t("Step 1 should be visible",async()=>{await f(()=>{const a=r.getByText("Ensure you can answer this question");o(a).toBeVisible()})}),await t("Click Next",async()=>{const a=r.getByRole("button",{name:"Next"});await i.click(a)}),await t("Step 2 should be visible",async()=>{await f(()=>{const a=r.getByText("Push them to try Preply out!");o(a).toBeVisible()})})}};var A,B,v;y.parameters={...y.parameters,docs:{...(A=y.parameters)==null?void 0:A.docs,source:{originalSource:`{
|
|
2
2
|
render: function Story() {
|
|
3
3
|
return <Accordion aria-label="accordionLabel">
|
|
4
4
|
<AccordionItem>
|
|
@@ -16,7 +16,7 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{f as J,w as K,e as o,u as i
|
|
|
16
16
|
const accordion = canvas.getByLabelText('accordionLabel');
|
|
17
17
|
expect(accordion).toBeVisible();
|
|
18
18
|
}
|
|
19
|
-
}`,...(v=(B=
|
|
19
|
+
}`,...(v=(B=y.parameters)==null?void 0:B.docs)==null?void 0:v.source}}};var I,T,k;m.parameters={...m.parameters,docs:{...(I=m.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
|
20
20
|
args: {},
|
|
21
21
|
render: function Story() {
|
|
22
22
|
return <Accordion>
|
|
@@ -67,7 +67,7 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{f as J,w as K,e as o,u as i
|
|
|
67
67
|
expect(item2Content).not.toBeVisible();
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
}`,...(k=(T=
|
|
70
|
+
}`,...(k=(T=m.parameters)==null?void 0:T.docs)==null?void 0:k.source}}};var O,H,S;h.parameters={...h.parameters,docs:{...(O=h.parameters)==null?void 0:O.docs,source:{originalSource:`{
|
|
71
71
|
args: {},
|
|
72
72
|
render: function Story() {
|
|
73
73
|
return <Accordion>
|
|
@@ -97,7 +97,7 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{f as J,w as K,e as o,u as i
|
|
|
97
97
|
expect(item1Content).not.toBeVisible();
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
}`,...(
|
|
100
|
+
}`,...(S=(H=h.parameters)==null?void 0:H.docs)==null?void 0:S.source}}};var j,V,P;g.parameters={...g.parameters,docs:{...(j=g.parameters)==null?void 0:j.docs,source:{originalSource:`{
|
|
101
101
|
args: {},
|
|
102
102
|
render: function Story() {
|
|
103
103
|
return <Accordion>
|
|
@@ -167,7 +167,7 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{f as J,w as K,e as o,u as i
|
|
|
167
167
|
expect(args.onOpenChange).toBeCalledWith(false);
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
}`,...(q=(W=b.parameters)==null?void 0:W.docs)==null?void 0:q.source}}};var L,F
|
|
170
|
+
}`,...(q=(W=b.parameters)==null?void 0:W.docs)==null?void 0:q.source}}};var L,_,F;w.parameters={...w.parameters,docs:{...(L=w.parameters)==null?void 0:L.docs,source:{originalSource:`{
|
|
171
171
|
args: {
|
|
172
172
|
onClick: fn()
|
|
173
173
|
},
|
|
@@ -195,7 +195,7 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{f as J,w as K,e as o,u as i
|
|
|
195
195
|
expect(args.onClick).toBeCalled();
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
}`,...(
|
|
198
|
+
}`,...(F=(_=w.parameters)==null?void 0:_.docs)==null?void 0:F.source}}};var D,N,R;x.parameters={...x.parameters,docs:{...(D=x.parameters)==null?void 0:D.docs,source:{originalSource:`{
|
|
199
199
|
render: function Story() {
|
|
200
200
|
return <Accordion aria-label="accordion" dataset={{
|
|
201
201
|
foo: 1
|
|
@@ -222,7 +222,7 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{f as J,w as K,e as o,u as i
|
|
|
222
222
|
const accordion = canvas.getByLabelText('accordion');
|
|
223
223
|
expect(accordion).toHaveAttribute('data-foo', '1');
|
|
224
224
|
}
|
|
225
|
-
}`,...(
|
|
225
|
+
}`,...(R=(N=x.parameters)==null?void 0:N.docs)==null?void 0:R.source}}};var Y,K,M;C.parameters={...C.parameters,docs:{...(Y=C.parameters)==null?void 0:Y.docs,source:{originalSource:`{
|
|
226
226
|
render: function Story() {
|
|
227
227
|
const Tour = createOnboardingTour();
|
|
228
228
|
return <Tour.Provider totalSteps={2}>
|
|
@@ -270,4 +270,4 @@ import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{f as J,w as K,e as o,u as i
|
|
|
270
270
|
});
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
}`,...(
|
|
273
|
+
}`,...(M=(K=C.parameters)==null?void 0:K.docs)==null?void 0:M.source}}};const fe=["AriaAttributesAreSet","TestDisclosableContent","TestWithoutAnimation","TestExclusiveAccordion","TestItemOnOpenChange","TestHeaderOnClick","TestDataset","IntegrationWithOnboardingTour"];export{y as AriaAttributesAreSet,C as IntegrationWithOnboardingTour,x as TestDataset,m as TestDisclosableContent,g as TestExclusiveAccordion,w as TestHeaderOnClick,b as TestItemOnOpenChange,h as TestWithoutAnimation,fe as __namedExportsOrder,Ce as default};
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import{ab as J,r as i,aw as Ie,a9 as ke,j as t,ac as P,ae as w,af as Be,ag as C,ah as D,aj as x,ak as Fe,al as Me,ax as ze,G as We,g as $e}from"./iframe-CWgEsn_I.js";import{H as Le}from"./Heading-jyl-6mnE.js";import{B as m}from"./Button-KgwWX-kY.js";import{w as Ge}from"./componentNames-CmmTyjin.js";import{R as Ue,h as Ve,u as Ye,F as qe}from"./index-D3eu31XZ.js";import"./preload-helper-Dp1pzeXC.js";import"./text-accent-CvDqGyH8.js";import"./text-centered-4FcavPd_.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./render-icon-DCa6Vadq.js";import"./ButtonBase-LoF75NjE.js";import"./Spinner-BtlYJQrD.js";import"./useMergeRefs-Cma75nFm.js";import"./useHostname-DENeD9To.js";import"./index-CC6DAVyL.js";var N="Dialog",[Q,ee]=J(N),[He,p]=Q(N),te=e=>{const{__scopeDialog:n,children:o,open:r,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[d,v]=ke({prop:r,defaultProp:a??!1,onChange:s,caller:N});return t.jsx(He,{scope:n,triggerRef:c,contentRef:u,contentId:P(),titleId:P(),descriptionId:P(),open:d,onOpenChange:v,onOpenToggle:i.useCallback(()=>v(we=>!we),[v]),modal:l,children:o})};te.displayName=N;var ne="DialogTrigger",oe=i.forwardRef((e,n)=>{const{__scopeDialog:o,...r}=e,a=p(ne,o),s=x(n,a.triggerRef);return t.jsx(C.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":B(a.open),...r,ref:s,onClick:D(e.onClick,a.onOpenToggle)})});oe.displayName=ne;var I="DialogPortal",[Ke,re]=Q(I,{forceMount:void 0}),ae=e=>{const{__scopeDialog:n,forceMount:o,children:r,container:a}=e,s=p(I,n);return t.jsx(Ke,{scope:n,forceMount:o,children:i.Children.map(r,l=>t.jsx(w,{present:o||s.open,children:t.jsx(Be,{asChild:!0,container:a,children:l})}))})};ae.displayName=I;var E="DialogOverlay",se=i.forwardRef((e,n)=>{const o=re(E,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,s=p(E,e.__scopeDialog);return s.modal?t.jsx(w,{present:r||s.open,children:t.jsx(Xe,{...a,ref:n})}):null});se.displayName=E;var Ze=Fe("DialogOverlay.RemoveScroll"),Xe=i.forwardRef((e,n)=>{const{__scopeDialog:o,...r}=e,a=p(E,o);return t.jsx(Ue,{as:Ze,allowPinchZoom:!0,shards:[a.contentRef],children:t.jsx(C.div,{"data-state":B(a.open),...r,ref:n,style:{pointerEvents:"auto",...r.style}})})}),h="DialogContent",ie=i.forwardRef((e,n)=>{const o=re(h,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,s=p(h,e.__scopeDialog);return t.jsx(w,{present:r||s.open,children:s.modal?t.jsx(Je,{...a,ref:n}):t.jsx(Qe,{...a,ref:n})})});ie.displayName=h;var Je=i.forwardRef((e,n)=>{const o=p(h,e.__scopeDialog),r=i.useRef(null),a=x(n,o.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return Ve(s)},[]),t.jsx(le,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&s.preventDefault()}),onFocusOutside:D(e.onFocusOutside,s=>s.preventDefault())})}),Qe=i.forwardRef((e,n)=>{const o=p(h,e.__scopeDialog),r=i.useRef(!1),a=i.useRef(!1);return t.jsx(le,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(c=o.triggerRef.current)==null||c.focus(),s.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=s.target;((d=o.triggerRef.current)==null?void 0:d.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),le=i.forwardRef((e,n)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,c=p(h,o),u=i.useRef(null),d=x(n,u);return Ye(),t.jsxs(t.Fragment,{children:[t.jsx(qe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:t.jsx(Me,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":B(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(tt,{titleId:c.titleId}),t.jsx(ot,{contentRef:u,descriptionId:c.descriptionId})]})]})}),k="DialogTitle",ce=i.forwardRef((e,n)=>{const{__scopeDialog:o,...r}=e,a=p(k,o);return t.jsx(C.h2,{id:a.titleId,...r,ref:n})});ce.displayName=k;var de="DialogDescription",ge=i.forwardRef((e,n)=>{const{__scopeDialog:o,...r}=e,a=p(de,o);return t.jsx(C.p,{id:a.descriptionId,...r,ref:n})});ge.displayName=de;var ue="DialogClose",pe=i.forwardRef((e,n)=>{const{__scopeDialog:o,...r}=e,a=p(ue,o);return t.jsx(C.button,{type:"button",...r,ref:n,onClick:D(e.onClick,()=>a.onOpenChange(!1))})});pe.displayName=ue;function B(e){return e?"open":"closed"}var fe="DialogTitleWarning",[et,he]=Ie(fe,{contentName:h,titleName:k,docsSlug:"dialog"}),tt=({titleId:e})=>{const n=he(fe),o=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},nt="DialogDescriptionWarning",ot=({contentRef:e,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${he(nt).contentName}}.`;return i.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&a&&(document.getElementById(n)||console.warn(r))},[r,e,n]),null},rt=te,at=oe,st=ae,it=se,lt=ie,ct=ce,dt=ge,ye=pe,me="AlertDialog",[gt]=J(me,[ee]),f=ee(),ve=e=>{const{__scopeAlertDialog:n,...o}=e,r=f(n);return t.jsx(rt,{...r,...o,modal:!0})};ve.displayName=me;var ut="AlertDialogTrigger",De=i.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...r}=e,a=f(o);return t.jsx(at,{...a,...r,ref:n})});De.displayName=ut;var pt="AlertDialogPortal",Ae=e=>{const{__scopeAlertDialog:n,...o}=e,r=f(n);return t.jsx(st,{...r,...o})};Ae.displayName=pt;var ft="AlertDialogOverlay",Ce=i.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...r}=e,a=f(o);return t.jsx(it,{...a,...r,ref:n})});Ce.displayName=ft;var A="AlertDialogContent",[ht,yt]=gt(A),mt=ze("AlertDialogContent"),xe=i.forwardRef((e,n)=>{const{__scopeAlertDialog:o,children:r,...a}=e,s=f(o),l=i.useRef(null),c=x(n,l),u=i.useRef(null);return t.jsx(et,{contentName:A,titleName:_e,docsSlug:"alert-dialog",children:t.jsx(ht,{scope:o,cancelRef:u,children:t.jsxs(lt,{role:"alertdialog",...s,...a,ref:c,onOpenAutoFocus:D(a.onOpenAutoFocus,d=>{var v;d.preventDefault(),(v=u.current)==null||v.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[t.jsx(mt,{children:r}),t.jsx(Dt,{contentRef:l})]})})})});xe.displayName=A;var _e="AlertDialogTitle",Te=i.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...r}=e,a=f(o);return t.jsx(ct,{...a,...r,ref:n})});Te.displayName=_e;var be="AlertDialogDescription",je=i.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...r}=e,a=f(o);return t.jsx(dt,{...a,...r,ref:n})});je.displayName=be;var vt="AlertDialogAction",Se=i.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...r}=e,a=f(o);return t.jsx(ye,{...a,...r,ref:n})});Se.displayName=vt;var Oe="AlertDialogCancel",Re=i.forwardRef((e,n)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:a}=yt(Oe,o),s=f(o),l=x(n,a);return t.jsx(ye,{...s,...r,ref:l})});Re.displayName=Oe;var Dt=({contentRef:e})=>{const n=`\`${A}\` requires a description for the component to be accessible for screen reader users.
|
|
6
|
+
|
|
7
|
+
You can add a description to the \`${A}\` by passing a \`${be}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
8
|
+
|
|
9
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${A}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
10
|
+
|
|
11
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(n)},[n,e]),null},At=ve,Ct=De,xt=Ae,_t=Ce,Tt=xe,bt=Se,jt=Re,St=Te,Ot=je;const Rt="overlay__vG-Gu",Et="content__Nk-Ib",Nt="description__1dRpy",Pt="actions__FsX-e",_={overlay:Rt,content:Et,description:Nt,actions:Pt},Ee=({children:e})=>t.jsx(Ct,{asChild:!0,children:i.Children.only(e)}),wt=i.forwardRef(function(n,o){return t.jsx(bt,{asChild:!0,children:t.jsx(m,{...n,ref:o})})}),It=i.forwardRef(function(n,o){return t.jsx(jt,{asChild:!0,children:t.jsx(m,{...n,ref:o})})}),kt=({open:e,title:n,description:o,dataset:r,children:a})=>{const s=We(),l=$e(r,{preplyDsComponent:Ge.AlertDialog});let c;const u=[];return i.Children.forEach(a,d=>{i.isValidElement(d)&&(d.type===Ee?c=d:u.push(d))}),t.jsxs(At,{open:e,children:[c,t.jsxs(xt,{container:s,children:[t.jsx(_t,{className:_.overlay}),t.jsxs(Tt,{...l,className:_.content,children:[t.jsx(St,{asChild:!0,children:t.jsx(Le,{tag:"h3",variant:"medium",children:n})}),t.jsx(Ot,{asChild:!0,children:t.jsx("p",{className:_.description,children:o})}),t.jsx("div",{className:_.actions,children:u})]})]})]})},g=Object.assign(kt,{Trigger:Ee,Action:wt,Cancel:It}),{expect:R,userEvent:Ne,waitFor:Pe}=__STORYBOOK_MODULE_TEST__,{action:y}=__STORYBOOK_MODULE_ACTIONS__,Xt={title:"Components/AlertDialog",component:g,parameters:{preventIframeFromScrollingParent:!0,docs:{description:{component:"A modal alert dialog for confirming destructive or important actions."},story:{inline:!1,height:300}}},play:async({canvas:e,step:n})=>{await n("Open alert",async()=>(await Ne.click(e.getByTestId("alert-trigger")),Pe(()=>{const o=e.getByTestId("alert-dialog");R(o).toBeVisible()})))}},T={parameters:{docs:{description:{story:"Uncontrolled alert using the `Trigger`, `Cancel`, and `Action` subcomponents."}}},args:{title:"Confirm",description:"This action cannot be undone.",dataset:{testid:"alert-dialog"}},render:function(n){return t.jsxs(g,{...n,children:[t.jsx(g.Trigger,{children:t.jsx(m,{dataset:{testid:"alert-trigger"},children:"Action"})}),t.jsx(g.Cancel,{variant:"secondary",onClick:y("cancel"),children:"Cancel"}),t.jsx(g.Action,{onClick:y("confirm"),children:"Confirm"})]})}},b={parameters:{docs:{description:{story:"Uncontrolled alert using the `Trigger`, and two `Action` subcomponents.\n\nThe two actions are styled differently to suggest a preferred action to the one the user has requested.\n\nFor example, in this case, the user is prompted to reschedule instead of canceling."}}},args:{title:"Cancel Lesson",description:"Your balance will not be refunded. Would you like to reschedule instead?",dataset:{testid:"alert-dialog"}},render:function(n){return t.jsxs(g,{...n,children:[t.jsx(g.Trigger,{children:t.jsx(m,{variant:"critical",dataset:{testid:"alert-trigger"},children:"Cancel Lesson"})}),t.jsx(g.Action,{variant:"ghost",onClick:y("cancel"),children:"Cancel lesson"}),t.jsx(g.Action,{variant:"secondary",onClick:y("reschedule"),children:"Reschedule"})]})}},j={parameters:{docs:{description:{story:"Fully controlled using custom `Buttons`."}}},args:{title:"Delete Account",description:"This action cannot be undone.",dataset:{testid:"alert-dialog"}},render:function(n){const[o,r]=i.useState(!1),a=()=>{r(!1),y("account deleted")()},s=()=>{r(!1),y("deletion canceled")()};return t.jsxs(t.Fragment,{children:[t.jsx(m,{onClick:()=>r(!0),dataset:{testid:"alert-trigger"},children:"Action"}),t.jsxs(g,{...n,open:o,children:[t.jsx(g.Cancel,{variant:"secondary",onClick:s,children:"Cancel"}),t.jsx(g.Action,{variant:"critical",onClick:a,children:"Delete"})]})]})}},S={parameters:{docs:{description:{story:"Fully controlled using a single custom `Button`."}}},args:{title:"Payment failed",description:"The page will refresh. Please try again.",dataset:{testid:"alert-dialog"}},render:function(n){const[o,r]=i.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(m,{onClick:()=>r(!0),dataset:{testid:"alert-trigger"},children:"Action"}),t.jsx(g,{...n,open:o,children:t.jsx(g.Action,{onClick:()=>{r(!1),y("page refreshed")()},children:"Refresh"})})]})}},O={parameters:{docs:{description:{story:`
|
|
12
|
+
The Dialog component provides CSS property escape hatches for controlling the z-index of both the overlay and content:
|
|
13
|
+
|
|
14
|
+
- \`--ds-dialog-overlay-z-index-override\`: Controls the overlay's z-index
|
|
15
|
+
- \`--ds-dialog-content-z-index-override\`: Controls the content's z-index
|
|
16
|
+
|
|
17
|
+
These should only be used when necessary, as proper stacking context isolation is preferred.
|
|
18
|
+
|
|
19
|
+
In the following example, the stacking order of the dialog trigger, overlay, and content are
|
|
20
|
+
reveresed using the above CSS properties.
|
|
21
|
+
|
|
22
|
+
Note: This is done using a \`useEffect\` just for the sake of the story. In a real-world scenario, this should ideally be done in a global stylesheet or a theme provider.
|
|
23
|
+
`}}},args:{title:"Delete Account",description:"This action cannot be undone.",dataset:{testid:"alert-dialog"}},render:function(n){const[o,r]=i.useState(!1);return i.useEffect(()=>(document.body.style.setProperty("--ds-dialog-overlay-z-index-override","88"),document.body.style.setProperty("--ds-dialog-content-z-index-override","77"),()=>{document.body.style.removeProperty("--ds-dialog-overlay-z-index-override"),document.body.style.removeProperty("--ds-dialog-content-z-index-override")}),[]),t.jsxs("div",{style:{position:"relative",zIndex:99},children:[t.jsx(m,{dataset:{testid:"alert-trigger"},onClick:()=>r(!0),children:"Open"}),t.jsxs(g,{...n,open:o,children:[t.jsx(g.Cancel,{variant:"secondary",onClick:()=>r(!1),children:"Cancel"}),t.jsx(g.Action,{variant:"critical",onClick:()=>r(!1),children:"Delete"})]})]})},play:async({canvas:e,step:n})=>{await n("Open alert",async()=>(await Ne.click(e.getByTestId("alert-trigger")),Pe(()=>{const o=e.getByTestId("alert-dialog");R(o).toBeVisible()}))),await n("Check content's computed z-index",async()=>{const o=e.getByTestId("alert-dialog"),r=getComputedStyle(o);R(r.zIndex).toBe("77")}),await n("Check overlay's computed z-index",async()=>{const o=e.getByTestId("alert-dialog").previousElementSibling;if(!o)throw new Error("The overlay happened to be the previous sibling of the dialog content, but it isn't anymore. Please update the test.");const r=getComputedStyle(o);R(r.zIndex).toBe("88")})}};var F,M,z;T.parameters={...T.parameters,docs:{...(F=T.parameters)==null?void 0:F.docs,source:{originalSource:`{
|
|
24
|
+
parameters: {
|
|
25
|
+
docs: {
|
|
26
|
+
description: {
|
|
27
|
+
story: \`Uncontrolled alert using the \\\`Trigger\\\`, \\\`Cancel\\\`, and \\\`Action\\\` subcomponents.\`
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
args: {
|
|
32
|
+
title: 'Confirm',
|
|
33
|
+
description: 'This action cannot be undone.',
|
|
34
|
+
dataset: {
|
|
35
|
+
testid: 'alert-dialog'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
render: function Story(props) {
|
|
39
|
+
return <AlertDialog {...props}>
|
|
40
|
+
<AlertDialog.Trigger>
|
|
41
|
+
<Button dataset={{
|
|
42
|
+
testid: 'alert-trigger'
|
|
43
|
+
}}>Action</Button>
|
|
44
|
+
</AlertDialog.Trigger>
|
|
45
|
+
<AlertDialog.Cancel variant="secondary" onClick={action('cancel')}>
|
|
46
|
+
Cancel
|
|
47
|
+
</AlertDialog.Cancel>
|
|
48
|
+
<AlertDialog.Action onClick={action('confirm')}>Confirm</AlertDialog.Action>
|
|
49
|
+
</AlertDialog>;
|
|
50
|
+
}
|
|
51
|
+
}`,...(z=(M=T.parameters)==null?void 0:M.docs)==null?void 0:z.source}}};var W,$,L;b.parameters={...b.parameters,docs:{...(W=b.parameters)==null?void 0:W.docs,source:{originalSource:`{
|
|
52
|
+
parameters: {
|
|
53
|
+
docs: {
|
|
54
|
+
description: {
|
|
55
|
+
story: \`Uncontrolled alert using the \\\`Trigger\\\`, and two \\\`Action\\\` subcomponents.
|
|
56
|
+
|
|
57
|
+
The two actions are styled differently to suggest a preferred action to the one the user has requested.
|
|
58
|
+
|
|
59
|
+
For example, in this case, the user is prompted to reschedule instead of canceling.\`
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
args: {
|
|
64
|
+
title: 'Cancel Lesson',
|
|
65
|
+
description: 'Your balance will not be refunded. Would you like to reschedule instead?',
|
|
66
|
+
dataset: {
|
|
67
|
+
testid: 'alert-dialog'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
render: function Story(props) {
|
|
71
|
+
return <AlertDialog {...props}>
|
|
72
|
+
<AlertDialog.Trigger>
|
|
73
|
+
<Button variant="critical" dataset={{
|
|
74
|
+
testid: 'alert-trigger'
|
|
75
|
+
}}>
|
|
76
|
+
Cancel Lesson
|
|
77
|
+
</Button>
|
|
78
|
+
</AlertDialog.Trigger>
|
|
79
|
+
<AlertDialog.Action variant="ghost" onClick={action('cancel')}>
|
|
80
|
+
Cancel lesson
|
|
81
|
+
</AlertDialog.Action>
|
|
82
|
+
<AlertDialog.Action variant="secondary" onClick={action('reschedule')}>
|
|
83
|
+
Reschedule
|
|
84
|
+
</AlertDialog.Action>
|
|
85
|
+
</AlertDialog>;
|
|
86
|
+
}
|
|
87
|
+
}`,...(L=($=b.parameters)==null?void 0:$.docs)==null?void 0:L.source}}};var G,U,V;j.parameters={...j.parameters,docs:{...(G=j.parameters)==null?void 0:G.docs,source:{originalSource:`{
|
|
88
|
+
parameters: {
|
|
89
|
+
docs: {
|
|
90
|
+
description: {
|
|
91
|
+
story: 'Fully controlled using custom \`Buttons\`.'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
args: {
|
|
96
|
+
title: 'Delete Account',
|
|
97
|
+
description: 'This action cannot be undone.',
|
|
98
|
+
dataset: {
|
|
99
|
+
testid: 'alert-dialog'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
render: function Story(props) {
|
|
103
|
+
const [open, setOpen] = useState(false);
|
|
104
|
+
const handleConfirm = () => {
|
|
105
|
+
setOpen(false);
|
|
106
|
+
action('account deleted')();
|
|
107
|
+
};
|
|
108
|
+
const handleCancel = () => {
|
|
109
|
+
setOpen(false);
|
|
110
|
+
action('deletion canceled')();
|
|
111
|
+
};
|
|
112
|
+
return <>
|
|
113
|
+
<Button onClick={() => setOpen(true)} dataset={{
|
|
114
|
+
testid: 'alert-trigger'
|
|
115
|
+
}}>
|
|
116
|
+
Action
|
|
117
|
+
</Button>
|
|
118
|
+
<AlertDialog {...props} open={open}>
|
|
119
|
+
<AlertDialog.Cancel variant="secondary" onClick={handleCancel}>
|
|
120
|
+
Cancel
|
|
121
|
+
</AlertDialog.Cancel>
|
|
122
|
+
<AlertDialog.Action variant="critical" onClick={handleConfirm}>
|
|
123
|
+
Delete
|
|
124
|
+
</AlertDialog.Action>
|
|
125
|
+
</AlertDialog>
|
|
126
|
+
</>;
|
|
127
|
+
}
|
|
128
|
+
}`,...(V=(U=j.parameters)==null?void 0:U.docs)==null?void 0:V.source}}};var Y,q,H;S.parameters={...S.parameters,docs:{...(Y=S.parameters)==null?void 0:Y.docs,source:{originalSource:`{
|
|
129
|
+
parameters: {
|
|
130
|
+
docs: {
|
|
131
|
+
description: {
|
|
132
|
+
story: 'Fully controlled using a single custom \`Button\`.'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
args: {
|
|
137
|
+
title: 'Payment failed',
|
|
138
|
+
description: 'The page will refresh. Please try again.',
|
|
139
|
+
dataset: {
|
|
140
|
+
testid: 'alert-dialog'
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
render: function Story(props) {
|
|
144
|
+
const [open, setOpen] = useState(false);
|
|
145
|
+
return <>
|
|
146
|
+
<Button onClick={() => setOpen(true)} dataset={{
|
|
147
|
+
testid: 'alert-trigger'
|
|
148
|
+
}}>
|
|
149
|
+
Action
|
|
150
|
+
</Button>
|
|
151
|
+
<AlertDialog {...props} open={open}>
|
|
152
|
+
<AlertDialog.Action onClick={() => {
|
|
153
|
+
setOpen(false);
|
|
154
|
+
action('page refreshed')();
|
|
155
|
+
}}>
|
|
156
|
+
Refresh
|
|
157
|
+
</AlertDialog.Action>
|
|
158
|
+
</AlertDialog>
|
|
159
|
+
</>;
|
|
160
|
+
}
|
|
161
|
+
}`,...(H=(q=S.parameters)==null?void 0:q.docs)==null?void 0:H.source}}};var K,Z,X;O.parameters={...O.parameters,docs:{...(K=O.parameters)==null?void 0:K.docs,source:{originalSource:`{
|
|
162
|
+
parameters: {
|
|
163
|
+
docs: {
|
|
164
|
+
description: {
|
|
165
|
+
story: \`
|
|
166
|
+
The Dialog component provides CSS property escape hatches for controlling the z-index of both the overlay and content:
|
|
167
|
+
|
|
168
|
+
- \\\`--ds-dialog-overlay-z-index-override\\\`: Controls the overlay's z-index
|
|
169
|
+
- \\\`--ds-dialog-content-z-index-override\\\`: Controls the content's z-index
|
|
170
|
+
|
|
171
|
+
These should only be used when necessary, as proper stacking context isolation is preferred.
|
|
172
|
+
|
|
173
|
+
In the following example, the stacking order of the dialog trigger, overlay, and content are
|
|
174
|
+
reveresed using the above CSS properties.
|
|
175
|
+
|
|
176
|
+
Note: This is done using a \\\`useEffect\\\` just for the sake of the story. In a real-world scenario, this should ideally be done in a global stylesheet or a theme provider.
|
|
177
|
+
\`
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
args: {
|
|
182
|
+
title: 'Delete Account',
|
|
183
|
+
description: 'This action cannot be undone.',
|
|
184
|
+
dataset: {
|
|
185
|
+
testid: 'alert-dialog'
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
render: function Story(props) {
|
|
189
|
+
const [open, setOpen] = useState(false);
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
document.body.style.setProperty('--ds-dialog-overlay-z-index-override', '88');
|
|
192
|
+
document.body.style.setProperty('--ds-dialog-content-z-index-override', '77');
|
|
193
|
+
return () => {
|
|
194
|
+
document.body.style.removeProperty('--ds-dialog-overlay-z-index-override');
|
|
195
|
+
document.body.style.removeProperty('--ds-dialog-content-z-index-override');
|
|
196
|
+
};
|
|
197
|
+
}, []);
|
|
198
|
+
return <div style={{
|
|
199
|
+
position: 'relative',
|
|
200
|
+
zIndex: 99
|
|
201
|
+
}}>
|
|
202
|
+
<Button dataset={{
|
|
203
|
+
testid: 'alert-trigger'
|
|
204
|
+
}} onClick={() => setOpen(true)}>
|
|
205
|
+
Open
|
|
206
|
+
</Button>
|
|
207
|
+
<AlertDialog {...props} open={open}>
|
|
208
|
+
<AlertDialog.Cancel variant="secondary" onClick={() => setOpen(false)}>
|
|
209
|
+
Cancel
|
|
210
|
+
</AlertDialog.Cancel>
|
|
211
|
+
<AlertDialog.Action variant="critical" onClick={() => setOpen(false)}>
|
|
212
|
+
Delete
|
|
213
|
+
</AlertDialog.Action>
|
|
214
|
+
</AlertDialog>
|
|
215
|
+
</div>;
|
|
216
|
+
},
|
|
217
|
+
play: async ({
|
|
218
|
+
canvas,
|
|
219
|
+
step
|
|
220
|
+
}) => {
|
|
221
|
+
await step('Open alert', async () => {
|
|
222
|
+
await userEvent.click(canvas.getByTestId('alert-trigger'));
|
|
223
|
+
return waitFor(() => {
|
|
224
|
+
const alert = canvas.getByTestId('alert-dialog');
|
|
225
|
+
expect(alert).toBeVisible();
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
await step(\`Check content's computed z-index\`, async () => {
|
|
229
|
+
const alert = canvas.getByTestId('alert-dialog');
|
|
230
|
+
const styles = getComputedStyle(alert);
|
|
231
|
+
expect(styles.zIndex).toBe('77');
|
|
232
|
+
});
|
|
233
|
+
await step(\`Check overlay's computed z-index\`, async () => {
|
|
234
|
+
const overlay = canvas.getByTestId('alert-dialog').previousElementSibling;
|
|
235
|
+
if (!overlay) throw new Error(\`The overlay happened to be the previous sibling of the dialog content, but it isn't anymore. Please update the test.\`);
|
|
236
|
+
const styles = getComputedStyle(overlay);
|
|
237
|
+
expect(styles.zIndex).toBe('88');
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}`,...(X=(Z=O.parameters)==null?void 0:Z.docs)==null?void 0:X.source}}};const Jt=["Uncontrolled","UncontrolledWithSuggestionAction","Controlled","ControlledWithSingleButton","WithZIndexOverride"];export{j as Controlled,S as ControlledWithSingleButton,T as Uncontrolled,b as UncontrolledWithSuggestionAction,O as WithZIndexOverride,Jt as __namedExportsOrder,Xt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,t as w,u,v as n,g as p,j as a,A as c}from"./iframe-CWgEsn_I.js";import{f}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{w as e}from"./componentNames-CmmTyjin.js";import{A as x}from"./constants-5om8Ptru.js";const N="Avatar__K41Tw",C={Avatar:N,"Avatar--size-24":"Avatar--size-24__hDb5G","Avatar--size-32":"Avatar--size-32__0goVI","Avatar--size-48":"Avatar--size-48__uGMSJ","Avatar--size-64":"Avatar--size-64__WD77O","Avatar--size-96":"Avatar--size-96__OxIe2","Avatar--size-160":"Avatar--size-160__8tEPo","Avatar--narrow-l--size-24":"Avatar--narrow-l--size-24__L-54O","Avatar--narrow-l--size-32":"Avatar--narrow-l--size-32__Mdeh3","Avatar--narrow-l--size-48":"Avatar--narrow-l--size-48__1xNsg","Avatar--narrow-l--size-64":"Avatar--narrow-l--size-64__ZQ5C-","Avatar--narrow-l--size-96":"Avatar--narrow-l--size-96__DuZVB","Avatar--narrow-l--size-160":"Avatar--narrow-l--size-160__PN1pX","Avatar--medium-s--size-24":"Avatar--medium-s--size-24__6--6m","Avatar--medium-s--size-32":"Avatar--medium-s--size-32__7rlpv","Avatar--medium-s--size-48":"Avatar--medium-s--size-48__R893D","Avatar--medium-s--size-64":"Avatar--medium-s--size-64__x4N0d","Avatar--medium-s--size-96":"Avatar--medium-s--size-96__1qdaO","Avatar--medium-s--size-160":"Avatar--medium-s--size-160__z7IAl","Avatar--medium-l--size-24":"Avatar--medium-l--size-24__Ndkzw","Avatar--medium-l--size-32":"Avatar--medium-l--size-32__3miIB","Avatar--medium-l--size-48":"Avatar--medium-l--size-48__arPBB","Avatar--medium-l--size-64":"Avatar--medium-l--size-64__aFQa7","Avatar--medium-l--size-96":"Avatar--medium-l--size-96__eg03F","Avatar--medium-l--size-160":"Avatar--medium-l--size-160__fGJ7K","Avatar--wide-s--size-24":"Avatar--wide-s--size-24__Ue7o0","Avatar--wide-s--size-32":"Avatar--wide-s--size-32__hYoGY","Avatar--wide-s--size-48":"Avatar--wide-s--size-48__Q9kzJ","Avatar--wide-s--size-64":"Avatar--wide-s--size-64__vvQME","Avatar--wide-s--size-96":"Avatar--wide-s--size-96__tVnz3","Avatar--wide-s--size-160":"Avatar--wide-s--size-160__brJ59","Avatar--wide-l--size-24":"Avatar--wide-l--size-24__EMfbp","Avatar--wide-l--size-32":"Avatar--wide-l--size-32__7bYZs","Avatar--wide-l--size-48":"Avatar--wide-l--size-48__548Bt","Avatar--wide-l--size-64":"Avatar--wide-l--size-64__5Ce08","Avatar--wide-l--size-96":"Avatar--wide-l--size-96__-6w7Y","Avatar--wide-l--size-160":"Avatar--wide-l--size-160__5ft-T","Avatar--round":"Avatar--round__ZDtGc"},I=l.forwardRef(function({size:s=c,round:i,src:r,alt:t="",dataset:A,crossOrigin:v,..._},z){const m=i??!0,d=w(C,e.Avatar,[u("size",s),n("round",void 0,m)]),o={...f(_),ref:z,className:d.join(" "),...p(A,{preplyDsComponent:e.Avatar})};return a.jsx("picture",{...o,children:a.jsx("img",{src:r||x,alt:t,crossOrigin:v})})});export{I as A};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{j as a}from"./iframe-CWgEsn_I.js";import{A as s}from"./Avatar-BHWZ6iZn.js";import{S as d}from"./consts-KAYct7Gj.js";import"./preload-helper-Dp1pzeXC.js";import"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import"./componentNames-CmmTyjin.js";import"./constants-5om8Ptru.js";const S={title:"components/Avatar",component:s,argTypes:{size:{description:d}}},t=()=>a.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"end"},children:[a.jsx(s,{size:"160"}),a.jsx(s,{src:"./assets/avatar-1.png",size:"96"}),a.jsx(s,{src:"./assets/avatar-2.png",size:"64"}),a.jsx(s,{src:"./assets/avatar-3.png",size:"48"}),a.jsx(s,{src:"./assets/avatar-4.png",size:"32"}),a.jsx(s,{src:"./assets/avatar-5.png",size:"24"})]}),r={parameters:{chromatic:{disableSnapshot:!0}},args:{size:"32",src:"./assets/avatar-1.png",dataset:{qaid:"avatar"}},argTypes:{src:{control:"text"},dataset:{control:"object"},alt:{control:"text"},round:{table:{disable:!0}}}};var e,n,o;t.parameters={...t.parameters,docs:{...(e=t.parameters)==null?void 0:e.docs,source:{originalSource:`() => <div style={{
|
|
2
|
+
display: 'flex',
|
|
3
|
+
gap: '8px',
|
|
4
|
+
alignItems: 'end'
|
|
5
|
+
}}>
|
|
6
|
+
<Avatar size="160" />
|
|
7
|
+
<Avatar src="./assets/avatar-1.png" size="96" />
|
|
8
|
+
<Avatar src="./assets/avatar-2.png" size="64" />
|
|
9
|
+
<Avatar src="./assets/avatar-3.png" size="48" />
|
|
10
|
+
<Avatar src="./assets/avatar-4.png" size="32" />
|
|
11
|
+
<Avatar src="./assets/avatar-5.png" size="24" />
|
|
12
|
+
</div>`,...(o=(n=t.parameters)==null?void 0:n.docs)==null?void 0:o.source}}};var i,p,c;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
|
13
|
+
parameters: {
|
|
14
|
+
chromatic: {
|
|
15
|
+
disableSnapshot: true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
args: {
|
|
19
|
+
size: '32',
|
|
20
|
+
src: './assets/avatar-1.png',
|
|
21
|
+
dataset: {
|
|
22
|
+
qaid: 'avatar'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
argTypes: {
|
|
26
|
+
src: {
|
|
27
|
+
control: 'text'
|
|
28
|
+
},
|
|
29
|
+
dataset: {
|
|
30
|
+
control: 'object'
|
|
31
|
+
},
|
|
32
|
+
alt: {
|
|
33
|
+
control: 'text'
|
|
34
|
+
},
|
|
35
|
+
// Disable deprecated props
|
|
36
|
+
round: {
|
|
37
|
+
table: {
|
|
38
|
+
disable: true
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}`,...(c=(p=r.parameters)==null?void 0:p.docs)==null?void 0:c.source}}};const j=["Sizes","Playground"];export{r as Playground,t as Sizes,j as __namedExportsOrder,S as default};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{r as y,t as T,v as b,u as C,E,g as N,j as t,a3 as R,A as w}from"./iframe-CWgEsn_I.js";import{f as D}from"./filterAttributesPassedByRadixUIAtRuntime-B7QTVwVw.js";import{A as I}from"./Avatar-BHWZ6iZn.js";import{w as e}from"./componentNames-CmmTyjin.js";import"./preload-helper-Dp1pzeXC.js";import"./constants-5om8Ptru.js";const P="AvatarWithStatus__z8Zik",o={AvatarWithStatus:P,"AvatarWithStatus--indicator":"AvatarWithStatus--indicator__dsdXa","AvatarWithStatus--online":"AvatarWithStatus--online__pGAFw","AvatarWithStatus--size-64":"AvatarWithStatus--size-64__vG-kB","AvatarWithStatus--size-96":"AvatarWithStatus--size-96__Dgqc1","AvatarWithStatus--size-160":"AvatarWithStatus--size-160__7gCR7"},r=y.forwardRef(function({online:v=!1,size:n=R,dataset:h,alt:S,crossOrigin:W,src:x,..._},g){const f=T(o,e.AvatarWithStatus,[b("online",void 0,v),C("size",n)]),z=[...E(o,e.AvatarWithStatus,["indicator"])],j={...D(_),ref:g,className:f.join(" "),...N(h,{preplyDsComponent:e.AvatarWithStatus})};return t.jsxs("div",{...j,children:[t.jsx("span",{className:z.join(" ")}),t.jsx("div",{children:t.jsx(I,{alt:S,crossOrigin:W,src:x,size:n??w})})]})}),G={title:"components/AvatarWithStatus",component:r},a=()=>t.jsxs("div",{style:{display:"flex",gap:"8px"},children:[t.jsx(r,{size:"64",online:!0}),t.jsx(r,{size:"64",online:!1})]}),s={parameters:{chromatic:{disableSnapshot:!0}},args:{size:"64",src:"./assets/avatar-1.png",online:!1,dataset:{qaid:"avatar-with-status"}},argTypes:{src:{control:"text"},dataset:{control:"object"},alt:{control:"text"},online:{control:"boolean"}}};var i,c,l,d,p;a.parameters={...a.parameters,docs:{...(i=a.parameters)==null?void 0:i.docs,source:{originalSource:`() => <div style={{
|
|
2
|
+
display: 'flex',
|
|
3
|
+
gap: '8px'
|
|
4
|
+
}}>
|
|
5
|
+
<AvatarWithStatus size="64" online />
|
|
6
|
+
<AvatarWithStatus size="64" online={false} />
|
|
7
|
+
</div>`,...(l=(c=a.parameters)==null?void 0:c.docs)==null?void 0:l.source},description:{story:`This component augments [Avatar](/docs/components-avatar--docs) to add a
|
|
8
|
+
connection status indicator.`,...(p=(d=a.parameters)==null?void 0:d.docs)==null?void 0:p.description}}};var u,m,A;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
|
9
|
+
parameters: {
|
|
10
|
+
chromatic: {
|
|
11
|
+
disableSnapshot: true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
size: '64',
|
|
16
|
+
src: './assets/avatar-1.png',
|
|
17
|
+
online: false,
|
|
18
|
+
dataset: {
|
|
19
|
+
qaid: 'avatar-with-status'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
argTypes: {
|
|
23
|
+
src: {
|
|
24
|
+
control: 'text'
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
control: 'object'
|
|
28
|
+
},
|
|
29
|
+
alt: {
|
|
30
|
+
control: 'text'
|
|
31
|
+
},
|
|
32
|
+
online: {
|
|
33
|
+
control: 'boolean'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}`,...(A=(m=s.parameters)==null?void 0:m.docs)==null?void 0:A.source}}};const V=["Statuses","Playground"];export{s as Playground,a as Statuses,V as __namedExportsOrder,G as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.badge__ioy0w{display:inline-flex;align-items:center;border-radius:var(--5e8be4);padding-inline:var(--05dd73);color:var(--628fb7);max-width:max-content}.badge__ioy0w>[data-preply-ds-component=Icon]{flex-shrink:0}.badge__ioy0w .label__lXPEF{padding:var(--05dd73)}.badge__ioy0w .label__lXPEF[data-hidden=true]{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.badge__ioy0w[data-size=small]{min-height:var(--76ac8f)}.badge__ioy0w[data-size=small] .label__lXPEF{font-size:var(--e3a55b);font-weight:var(--8cd94c);line-height:var(--732f40)}.badge__ioy0w[data-size=medium]{min-height:var(--f316e1);padding-inline:var(--590b8d)}.badge__ioy0w[data-size=medium] .label__lXPEF{font-size:var(--fdb733);font-weight:var(--9643c1);line-height:var(--754361)}.badge__ioy0w[data-size=large]{min-height:var(--7789ee);padding-inline:var(--590b8d)}.badge__ioy0w[data-size=large] .label__lXPEF{padding:var(--590b8d);font-size:var(--475c79);font-weight:var(--a3f251);line-height:var(--e33d9e)}.badge__ioy0w[data-type=neutral]{background:var(--319b29)}.badge__ioy0w[data-type=positive]{background:var(--1836a4)}.badge__ioy0w[data-type=warning]{background:var(--b503b8)}.badge__ioy0w[data-type=info]{background:var(--94a45e)}.badge__ioy0w[data-type=critical]{background:var(--f15644)}.badge__ioy0w[data-type=ai]{background:var(--decc79)}.badge__ioy0w[data-accent=unset]{color:var(--628fb7);background-color:var(--a5c761)}.badge__ioy0w[data-accent=unset][data-inverted=true]{color:var(--a6a9d5);background-color:var(--d5f871)}.badge__ioy0w[data-accent=accent]{color:var(--dede3f);background-color:var(--eba8f8)}.badge__ioy0w[data-accent=accent][data-inverted=true]{color:var(--732eb5);background-color:var(--54c075)}.badge__ioy0w[data-accent=info]{color:var(--f3be0c);background-color:var(--7a1a33)}.badge__ioy0w[data-accent=info][data-inverted=true]{color:var(--506df4);background-color:var(--fa3428)}.badge__ioy0w[data-accent=positive]{color:var(--2a2719);background-color:var(--694afa)}.badge__ioy0w[data-accent=positive][data-inverted=true]{color:var(--30c365);background-color:var(--47c404)}.badge__ioy0w[data-accent=warning]{color:var(--84e571);background-color:var(--02372a)}.badge__ioy0w[data-accent=warning][data-inverted=true]{color:var(--363237);background-color:var(--08fa29)}.badge__ioy0w[data-accent=critical]{color:var(--036159);background-color:var(--22f022)}.badge__ioy0w[data-accent=critical][data-inverted=true]{color:var(--90eeff);background-color:var(--cdb1f6)}.badge__ioy0w[data-accent=tertiary]{color:var(--d7e14c);background-color:var(--a453d7)}.badge__ioy0w[data-accent=tertiary][data-inverted=true]{color:var(--ab5158);background-color:var(--50e919)}
|