@ably/ui 13.3.0 → 14.0.0-dev.fbce38f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -152
- package/core/Accordion/component.js +1 -0
- package/core/Code/component.css +1 -72
- package/core/Code/component.js +1 -1
- package/core/ConnectStateWrapper/component.js +1 -1
- package/core/ContactFooter/component.css +7 -10
- package/core/ContactFooter/component.js +1 -1
- package/core/CookieMessage/component.css +10 -13
- package/core/CookieMessage/component.js +1 -1
- package/core/CustomerLogos/component.js +1 -1
- package/core/DropdownMenu/component.js +1 -1
- package/core/FeaturedLink/component.js +1 -1
- package/core/Flash/component.css +19 -22
- package/core/Flash/component.js +1 -1
- package/core/Footer/component.css +22 -25
- package/core/Footer/component.js +1 -1
- package/core/Icon/component.js +1 -1
- package/core/Loader/component.js +1 -1
- package/core/Logo/component.js +1 -1
- package/core/Meganav/component.css +103 -106
- package/core/Meganav/component.js +1 -1
- package/core/MeganavBlogPostsList/component.js +1 -2
- package/core/MeganavContentCompany/component.js +1 -1
- package/core/MeganavContentDevelopers/component.js +1 -1
- package/core/MeganavContentProducts/component.js +1 -1
- package/core/MeganavContentUseCases/component.js +1 -1
- package/core/MeganavControl/component.js +1 -1
- package/core/MeganavControlMobileDropdown/component.js +1 -1
- package/core/MeganavControlMobilePanelClose/component.js +1 -1
- package/core/MeganavControlMobilePanelOpen/component.js +1 -1
- package/core/MeganavItemsDesktop/component.js +1 -1
- package/core/MeganavItemsMobile/component.js +1 -1
- package/core/MeganavItemsSignedIn/component.js +1 -1
- package/core/MeganavSearch/component.js +1 -1
- package/core/MeganavSearchAutocomplete/component.js +1 -1
- package/core/MeganavSearchPanel/component.js +1 -1
- package/core/MeganavSearchSuggestions/component.js +1 -1
- package/core/Notice/component.css +4 -7
- package/core/Notice/component.js +1 -1
- package/core/SignOutLink/component.js +1 -1
- package/core/Slider/component.css +4 -7
- package/core/Slider/component.js +1 -1
- package/core/Table/Table.js +1 -0
- package/core/Table/TableCell.js +1 -0
- package/core/Table/TableRow.js +1 -0
- package/core/Table/index.js +1 -0
- package/core/Table/stories/data.js +1 -0
- package/core/Tooltip/component.js +1 -0
- package/core/css.js +1 -0
- package/core/dom-query.js +1 -0
- package/core/hubspot-chat-toggle.js +1 -0
- package/core/icons/discord.svg +10 -0
- package/core/icons/facebook.svg +4 -0
- package/core/icons/github.svg +3 -0
- package/core/icons/glassdoor.svg +3 -0
- package/core/icons/google.svg +3 -0
- package/core/icons/icon-display-48hrs.svg +3 -0
- package/core/icons/icon-display-about-ably-col.svg +4 -0
- package/core/icons/icon-display-api-keys.svg +3 -0
- package/core/icons/icon-display-api.svg +3 -0
- package/core/icons/icon-display-asset-tracking-col.svg +18 -0
- package/core/icons/icon-display-browser.svg +10 -0
- package/core/icons/icon-display-calendar.svg +3 -0
- package/core/icons/icon-display-call-mobile.svg +3 -0
- package/core/icons/icon-display-careers-col.svg +9 -0
- package/core/icons/icon-display-case-studies-col.svg +5 -0
- package/core/icons/icon-display-chat-col.svg +4 -0
- package/core/icons/icon-display-chat-stack-col.svg +4 -0
- package/core/icons/icon-display-chat-stack.svg +4 -0
- package/core/icons/icon-display-cloud-servers.svg +3 -0
- package/core/icons/icon-display-compare-tech-col.svg +9 -0
- package/core/icons/icon-display-customers-col.svg +15 -0
- package/core/icons/icon-display-data-broadcast-col.svg +26 -0
- package/core/icons/icon-display-data-synchronization-col.svg +14 -0
- package/core/icons/icon-display-docs-col.svg +7 -0
- package/core/icons/icon-display-documentation.svg +3 -0
- package/core/icons/icon-display-events-col.svg +13 -0
- package/core/icons/icon-display-examples-col.svg +11 -0
- package/core/icons/icon-display-gdpr.svg +3 -0
- package/core/icons/icon-display-general-comms.svg +3 -0
- package/core/icons/icon-display-hipaa.svg +10 -0
- package/core/icons/icon-display-integrations-col.svg +8 -0
- package/core/icons/icon-display-it-support-access.svg +3 -0
- package/core/icons/icon-display-it-support-helpdesk.svg +3 -0
- package/core/icons/icon-display-kafka-at-the-edge-col.svg +8 -0
- package/core/icons/icon-display-laptop.svg +10 -0
- package/core/icons/icon-display-lightbulb-col.svg +10 -0
- package/core/icons/icon-display-live-chat.svg +3 -0
- package/core/icons/icon-display-map-pin.svg +3 -0
- package/core/icons/icon-display-message.svg +3 -0
- package/core/icons/icon-display-padlock-closed.svg +3 -0
- package/core/icons/icon-display-platform.svg +22 -0
- package/core/icons/icon-display-play.svg +3 -0
- package/core/icons/icon-display-privacy-shield-framework.svg +7 -0
- package/core/icons/icon-display-push-notifications-col.svg +6 -0
- package/core/icons/icon-display-quickstart-guides-col.svg +8 -0
- package/core/icons/icon-display-resources-col.svg +21 -0
- package/core/icons/icon-display-sdks-col.svg +11 -0
- package/core/icons/icon-display-servers.svg +3 -0
- package/core/icons/icon-display-shopping-cart.svg +10 -0
- package/core/icons/icon-display-sla.svg +3 -0
- package/core/icons/icon-display-soc2-type2.svg +3 -0
- package/core/icons/icon-display-tech-account-comms.svg +3 -0
- package/core/icons/icon-display-tutorials-demos-col.svg +25 -0
- package/core/icons/icon-display-virtual-events-col.svg +12 -0
- package/core/icons/icon-display-virtual-events.svg +12 -0
- package/core/icons/icon-gui-ably-badge.svg +3 -0
- package/core/icons/icon-gui-arrow-bidirectional-horizontal.svg +3 -0
- package/core/icons/icon-gui-arrow-bidirectional-vertical.svg +3 -0
- package/core/icons/icon-gui-arrow-down.svg +3 -0
- package/core/icons/icon-gui-arrow-left.svg +3 -0
- package/core/icons/icon-gui-arrow-right.svg +3 -0
- package/core/icons/icon-gui-arrow-up.svg +3 -0
- package/core/icons/icon-gui-burger-menu.svg +5 -0
- package/core/icons/icon-gui-check-circled-fill-black.svg +4 -0
- package/core/icons/icon-gui-check-circled-fill.svg +4 -0
- package/core/icons/icon-gui-check-circled.svg +3 -0
- package/core/icons/icon-gui-checklist-checked.svg +3 -0
- package/core/icons/icon-gui-clock.svg +3 -0
- package/core/icons/icon-gui-close.svg +3 -0
- package/core/icons/icon-gui-copy.svg +10 -0
- package/core/icons/icon-gui-cross-circled-fill.svg +4 -0
- package/core/icons/icon-gui-cross-circled.svg +3 -0
- package/core/icons/icon-gui-dash-circled.svg +3 -0
- package/core/icons/icon-gui-disclosure-arrow.svg +3 -0
- package/core/icons/icon-gui-document-generic.svg +3 -0
- package/core/icons/icon-gui-enlarge.svg +3 -0
- package/core/icons/icon-gui-external-link.svg +3 -0
- package/core/icons/icon-gui-filter-flow-step-1.svg +5 -0
- package/core/icons/icon-gui-filter-flow-step-2.svg +5 -0
- package/core/icons/icon-gui-filter-flow-step-3.svg +5 -0
- package/core/icons/icon-gui-history.svg +3 -0
- package/core/icons/icon-gui-info.svg +3 -0
- package/core/icons/icon-gui-link-arrow.svg +3 -0
- package/core/icons/icon-gui-link.svg +4 -0
- package/core/icons/icon-gui-live-chat.svg +3 -0
- package/core/icons/icon-gui-minus.svg +3 -0
- package/core/icons/icon-gui-plus.svg +3 -0
- package/core/icons/icon-gui-quote-marks-solid.svg +3 -0
- package/core/icons/icon-gui-refresh.svg +10 -0
- package/core/icons/icon-gui-resources.svg +3 -0
- package/core/icons/icon-gui-search.svg +3 -0
- package/core/icons/icon-gui-tick.svg +3 -0
- package/core/icons/icon-gui-warning.svg +5 -0
- package/core/icons/icon-live-updates-results-metrics-col.svg +26 -0
- package/core/icons/icon-multi-user-spaces-col.svg +13 -0
- package/core/icons/icon-social-x.svg +3 -0
- package/core/icons/icon-tech-apachekafka.svg +3 -0
- package/core/icons/linkedin.svg +3 -0
- package/core/icons/quote.svg +3 -0
- package/core/icons/stackoverflow.svg +3 -0
- package/core/icons/twitter.svg +3 -0
- package/core/icons/youtube.svg +11 -0
- package/core/icons.js +1 -0
- package/core/load-sprites.js +1 -0
- package/core/react-renderer.js +1 -0
- package/core/remote-blogs-posts.js +1 -0
- package/core/remote-data-store.js +1 -0
- package/core/remote-data-util.js +1 -0
- package/core/remote-session-data.js +1 -0
- package/core/scripts.js +1 -2
- package/core/sprites.svg +1 -525
- package/core/styles/buttons.css +122 -0
- package/core/styles/forms.css +62 -0
- package/core/styles/layout.css +19 -0
- package/core/styles/properties.css +276 -0
- package/core/styles/text.css +166 -0
- package/core/styles.base.css +1 -0
- package/core/styles.components.css +33 -0
- package/core/styles.css +2 -699
- package/core/url-base.js +1 -0
- package/core/utils/syntax-highlighter-registry.js +1 -0
- package/core/utils/syntax-highlighter.css +67 -0
- package/core/utils/syntax-highlighter.js +1 -0
- package/package.json +39 -34
- package/reset/scripts.js +1 -1
- package/reset/styles/normalize.css +353 -0
- package/reset/styles/reset.css +129 -0
- package/reset/styles.css +2 -477
- package/src/core/Accordion/Accordion.stories.tsx +39 -0
- package/src/core/Accordion/component.tsx +147 -0
- package/src/core/Code/Code.stories.tsx +71 -0
- package/src/core/Code/component.tsx +45 -0
- package/src/core/ConnectStateWrapper/{component.jsx → component.tsx} +7 -3
- package/src/core/ContactFooter/ContactFooter.stories.tsx +11 -0
- package/src/core/ContactFooter/component.css +7 -9
- package/src/core/ContactFooter/component.tsx +92 -0
- package/src/core/CookieMessage/CookieMessage.stories.tsx +12 -0
- package/src/core/CookieMessage/component.css +10 -12
- package/src/core/CookieMessage/{component.jsx → component.tsx} +15 -10
- package/src/core/CustomerLogos/CustomerLogos.stories.tsx +43 -0
- package/src/core/CustomerLogos/component.tsx +35 -0
- package/src/core/DropdownMenu/DropdownMenu.stories.tsx +48 -0
- package/src/core/DropdownMenu/{component.jsx → component.tsx} +64 -36
- package/src/core/FeaturedLink/FeaturedLink.stories.tsx +43 -0
- package/src/core/FeaturedLink/{component.jsx → component.tsx} +26 -18
- package/src/core/Flash/Flash.stories.tsx +37 -0
- package/src/core/Flash/component.css +19 -21
- package/src/core/Flash/{component.jsx → component.tsx} +78 -39
- package/src/core/Footer/Footer.stories.tsx +26 -0
- package/src/core/Footer/component.css +22 -24
- package/src/core/Footer/{component.jsx → component.tsx} +237 -70
- package/src/core/Icon/Icon.stories.tsx +150 -0
- package/src/core/Icon/component.tsx +26 -0
- package/src/core/Loader/Loader.stories.tsx +21 -0
- package/src/core/Loader/{component.jsx → component.tsx} +11 -8
- package/src/core/Logo/Logo.stories.tsx +12 -0
- package/src/core/Logo/component.tsx +29 -0
- package/src/core/Meganav/Meganav.stories.tsx +86 -0
- package/src/core/Meganav/component.css +103 -105
- package/src/core/Meganav/component.js +6 -7
- package/src/core/Meganav/component.tsx +228 -0
- package/src/core/MeganavBlogPostsList/{component.jsx → component.tsx} +15 -14
- package/src/core/MeganavContentCompany/{component.jsx → component.tsx} +82 -33
- package/src/core/MeganavContentDevelopers/{component.jsx → component.tsx} +98 -34
- package/src/core/MeganavContentProducts/component.tsx +165 -0
- package/src/core/MeganavContentUseCases/component.tsx +244 -0
- package/src/core/MeganavControl/{component.jsx → component.tsx} +18 -12
- package/src/core/MeganavControlMobileDropdown/{component.jsx → component.tsx} +3 -7
- package/src/core/MeganavControlMobilePanelClose/{component.jsx → component.tsx} +16 -9
- package/src/core/MeganavControlMobilePanelOpen/component.tsx +32 -0
- package/src/core/MeganavItemsDesktop/component.tsx +68 -0
- package/src/core/MeganavItemsMobile/component.tsx +197 -0
- package/src/core/MeganavItemsSignedIn/{component.jsx → component.tsx} +59 -23
- package/src/core/MeganavSearch/component.tsx +36 -0
- package/src/core/MeganavSearchAutocomplete/component.tsx +12 -0
- package/src/core/MeganavSearchPanel/component.tsx +52 -0
- package/src/core/MeganavSearchSuggestions/component.tsx +62 -0
- package/src/core/Notice/component.css +4 -6
- package/src/core/Notice/component.js +1 -1
- package/src/core/Notice/component.tsx +104 -0
- package/src/core/SignOutLink/component.tsx +51 -0
- package/src/core/Slider/Slider.stories.tsx +45 -0
- package/src/core/Slider/component.css +4 -6
- package/src/core/Slider/component.tsx +112 -0
- package/src/core/Table/Table.tsx +30 -0
- package/src/core/Table/TableCell.tsx +84 -0
- package/src/core/Table/TableRow.tsx +25 -0
- package/src/core/Table/index.ts +24 -0
- package/src/core/Table/stories/Table.stories.tsx +12 -0
- package/src/core/Table/stories/data.tsx +113 -0
- package/src/core/Tooltip/Tooltip.stories.tsx +27 -0
- package/src/core/Tooltip/component.tsx +60 -0
- package/src/core/icons.js +6 -0
- package/src/core/{react-renderer.js → react-renderer.tsx} +9 -7
- package/src/core/styles/buttons.css +121 -123
- package/src/core/styles/forms.css +49 -51
- package/src/core/styles/layout.css +14 -16
- package/src/core/styles/properties.css +250 -259
- package/src/core/styles/text.css +165 -167
- package/src/core/styles.components.css +22 -24
- package/src/core/utils/syntax-highlighter.css +55 -59
- package/src/pages/Buttons.mdx +121 -0
- package/src/pages/Chips.mdx +136 -0
- package/src/pages/Colour.mdx +23 -0
- package/src/pages/Forms.mdx +173 -0
- package/src/pages/Layout.mdx +58 -0
- package/src/pages/Typography.mdx +206 -0
- package/src/pages/utils.ts +70 -0
- package/tailwind.config.js +1 -7
- package/tailwind.extend.js +1 -1
- package/core/.gitignore +0 -1
- package/core/Code.jsx +0 -684
- package/core/CompanyAutocomplete/component.css +0 -46
- package/core/CompanyAutocomplete/component.js +0 -2
- package/core/CompanyAutocomplete/component.js.LICENSE.txt +0 -1
- package/core/ConnectStateWrapper.jsx +0 -222
- package/core/ContactFooter.jsx +0 -342
- package/core/CookieMessage.jsx +0 -204
- package/core/CustomerLogos.jsx +0 -144
- package/core/DropdownMenu.jsx +0 -313
- package/core/FeatureFooter/component.css +0 -13
- package/core/FeatureFooter/component.js +0 -1
- package/core/FeaturedLink.jsx +0 -241
- package/core/Flash.jsx +0 -622
- package/core/Footer.jsx +0 -587
- package/core/Icon.jsx +0 -152
- package/core/Loader.jsx +0 -154
- package/core/Logo.jsx +0 -147
- package/core/Meganav.jsx +0 -4151
- package/core/MeganavBlogPostsList/component.js.LICENSE.txt +0 -1
- package/core/MeganavBlogPostsList.jsx +0 -296
- package/core/MeganavContentCompany.jsx +0 -1058
- package/core/MeganavContentDevelopers.jsx +0 -334
- package/core/MeganavContentProducts.jsx +0 -373
- package/core/MeganavContentUseCases.jsx +0 -341
- package/core/MeganavControl.jsx +0 -199
- package/core/MeganavControlMobileDropdown.jsx +0 -197
- package/core/MeganavControlMobilePanelClose.jsx +0 -198
- package/core/MeganavControlMobilePanelOpen.jsx +0 -193
- package/core/MeganavItemsDesktop.jsx +0 -279
- package/core/MeganavItemsMobile.jsx +0 -689
- package/core/MeganavItemsSignedIn.jsx +0 -643
- package/core/MeganavSearch.jsx +0 -434
- package/core/MeganavSearchAutocomplete.jsx +0 -117
- package/core/MeganavSearchPanel.jsx +0 -386
- package/core/MeganavSearchSuggestions.jsx +0 -299
- package/core/Notice.jsx +0 -914
- package/core/Showcase/component.css +0 -31
- package/core/Showcase/component.js +0 -1
- package/core/Showcase.jsx +0 -17
- package/core/SignOutLink.jsx +0 -157
- package/core/Slider.jsx +0 -400
- package/core/Uptime/component.css +0 -128
- package/core/Uptime/component.js +0 -1
- package/core/Uptime.jsx +0 -895
- package/core/scripts.js.LICENSE.txt +0 -1
- package/preview/tmp/.keep +0 -0
- package/preview/tmp/pids/.keep +0 -0
- package/reset/.gitignore +0 -1
- package/src/core/Code/component.html.erb +0 -3
- package/src/core/Code/component.jsx +0 -31
- package/src/core/Code/component.rb +0 -12
- package/src/core/CompanyAutocomplete/component.css +0 -45
- package/src/core/CompanyAutocomplete/component.js +0 -204
- package/src/core/ContactFooter/component.html.erb +0 -32
- package/src/core/ContactFooter/component.jsx +0 -66
- package/src/core/ContactFooter/component.rb +0 -13
- package/src/core/CustomerLogos/component.html.erb +0 -9
- package/src/core/CustomerLogos/component.jsx +0 -28
- package/src/core/CustomerLogos/component.rb +0 -14
- package/src/core/FeatureFooter/component.css +0 -12
- package/src/core/FeatureFooter/component.html.erb +0 -54
- package/src/core/FeatureFooter/component.js +0 -7
- package/src/core/FeatureFooter/component.rb +0 -30
- package/src/core/FeaturedLink/component.html.erb +0 -15
- package/src/core/FeaturedLink/component.rb +0 -21
- package/src/core/Footer/component.html.erb +0 -256
- package/src/core/Footer/component.rb +0 -14
- package/src/core/Icon/component.html.erb +0 -3
- package/src/core/Icon/component.jsx +0 -19
- package/src/core/Icon/component.rb +0 -25
- package/src/core/Loader/component.html.erb +0 -18
- package/src/core/Loader/component.rb +0 -19
- package/src/core/Logo/component.html.erb +0 -3
- package/src/core/Logo/component.jsx +0 -20
- package/src/core/Logo/component.rb +0 -31
- package/src/core/Meganav/component.html.erb +0 -31
- package/src/core/Meganav/component.jsx +0 -123
- package/src/core/Meganav/component.rb +0 -60
- package/src/core/MeganavBlogPostsList/component.html.erb +0 -5
- package/src/core/MeganavBlogPostsList/component.rb +0 -13
- package/src/core/MeganavContentCompany/component.html.erb +0 -90
- package/src/core/MeganavContentCompany/component.rb +0 -14
- package/src/core/MeganavContentDevelopers/component.html.erb +0 -129
- package/src/core/MeganavContentDevelopers/component.rb +0 -13
- package/src/core/MeganavContentProducts/component.html.erb +0 -83
- package/src/core/MeganavContentProducts/component.jsx +0 -105
- package/src/core/MeganavContentProducts/component.rb +0 -14
- package/src/core/MeganavContentUseCases/component.html.erb +0 -135
- package/src/core/MeganavContentUseCases/component.jsx +0 -147
- package/src/core/MeganavContentUseCases/component.rb +0 -13
- package/src/core/MeganavControl/component.html.erb +0 -6
- package/src/core/MeganavControl/component.rb +0 -20
- package/src/core/MeganavControlMobileDropdown/component.html.erb +0 -7
- package/src/core/MeganavControlMobileDropdown/component.rb +0 -11
- package/src/core/MeganavControlMobilePanelClose/component.html.erb +0 -12
- package/src/core/MeganavControlMobilePanelClose/component.rb +0 -12
- package/src/core/MeganavControlMobilePanelOpen/component.html.erb +0 -7
- package/src/core/MeganavControlMobilePanelOpen/component.jsx +0 -25
- package/src/core/MeganavControlMobilePanelOpen/component.rb +0 -9
- package/src/core/MeganavItemsDesktop/component.html.erb +0 -17
- package/src/core/MeganavItemsDesktop/component.jsx +0 -49
- package/src/core/MeganavItemsDesktop/component.rb +0 -23
- package/src/core/MeganavItemsMobile/component.html.erb +0 -75
- package/src/core/MeganavItemsMobile/component.jsx +0 -137
- package/src/core/MeganavItemsMobile/component.rb +0 -21
- package/src/core/MeganavItemsSignedIn/component.html.erb +0 -53
- package/src/core/MeganavItemsSignedIn/component.rb +0 -33
- package/src/core/MeganavSearch/component.html.erb +0 -15
- package/src/core/MeganavSearch/component.jsx +0 -33
- package/src/core/MeganavSearch/component.rb +0 -13
- package/src/core/MeganavSearchAutocomplete/component.html.erb +0 -6
- package/src/core/MeganavSearchAutocomplete/component.jsx +0 -14
- package/src/core/MeganavSearchAutocomplete/component.rb +0 -6
- package/src/core/MeganavSearchPanel/component.html.erb +0 -22
- package/src/core/MeganavSearchPanel/component.jsx +0 -39
- package/src/core/MeganavSearchPanel/component.rb +0 -13
- package/src/core/MeganavSearchSuggestions/component.html.erb +0 -22
- package/src/core/MeganavSearchSuggestions/component.jsx +0 -49
- package/src/core/MeganavSearchSuggestions/component.rb +0 -18
- package/src/core/Notice/component.html.erb +0 -16
- package/src/core/Notice/component.jsx +0 -71
- package/src/core/Notice/component.rb +0 -29
- package/src/core/Showcase/component.css +0 -30
- package/src/core/Showcase/component.html.erb +0 -76
- package/src/core/Showcase/component.js +0 -180
- package/src/core/Showcase/component.jsx +0 -0
- package/src/core/Showcase/component.rb +0 -190
- package/src/core/SignOutLink/component.html.erb +0 -1
- package/src/core/SignOutLink/component.jsx +0 -32
- package/src/core/SignOutLink/component.rb +0 -17
- package/src/core/Slider/component.html.erb +0 -28
- package/src/core/Slider/component.jsx +0 -86
- package/src/core/Slider/component.rb +0 -38
- package/src/core/Uptime/component.css +0 -127
- package/src/core/Uptime/component.html.erb +0 -0
- package/src/core/Uptime/component.js +0 -1
- package/src/core/Uptime/component.jsx +0 -183
- package/src/core/Uptime/component.rb +0 -7
- package/src/core/core.rb +0 -81
- /package/{preview/log/.keep → src/core/Accordion/component.js} +0 -0
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { queryId, queryIdAll } from "../dom-query";
|
|
2
|
-
import { remsToPixelValue } from "../css";
|
|
3
|
-
|
|
4
|
-
import "./component.css";
|
|
5
|
-
|
|
6
|
-
const SLIDE_SHOW_INTERVAL = 5000;
|
|
7
|
-
|
|
8
|
-
const updateLogoOpacity = (logos, currentIndex) => {
|
|
9
|
-
const visible = ["grayscale", "grayscale-0"];
|
|
10
|
-
const opaque = [...visible].reverse();
|
|
11
|
-
logos.forEach((logo, i) => {
|
|
12
|
-
logo.classList.replace(...(i === currentIndex ? visible : opaque));
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const translateX = (el, currentIndex, direction = 1) => {
|
|
17
|
-
const percent = currentIndex * 100 * direction;
|
|
18
|
-
el.style.transform = `translateX(${percent}%)`;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const moveControlsContainer = (controlsContainer, currentIndex) => {
|
|
22
|
-
const { parentNode, children } = controlsContainer;
|
|
23
|
-
const parentCenter = parentNode.clientWidth / 2;
|
|
24
|
-
const countChildren = children.length;
|
|
25
|
-
const widthChildren = Array.from(children)
|
|
26
|
-
.map((el) => el.clientWidth)
|
|
27
|
-
.reduce((a, c) => a + c);
|
|
28
|
-
|
|
29
|
-
const width = widthChildren / countChildren;
|
|
30
|
-
const firstOrLast = !currentIndex || !(countChildren - currentIndex - 1);
|
|
31
|
-
const offsetLeft = !firstOrLast ? parentCenter - width / 2 : 0;
|
|
32
|
-
const left = currentIndex * width - (offsetLeft >> 0);
|
|
33
|
-
|
|
34
|
-
parentNode.scrollTo({ left, behavior: "smooth" });
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const propertyValue = (string) => {
|
|
38
|
-
return window
|
|
39
|
-
.getComputedStyle(document.documentElement)
|
|
40
|
-
.getPropertyValue(string);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const mobileBreakpoint = (pixelWidth) => {
|
|
44
|
-
if (typeof window === "undefined") return false;
|
|
45
|
-
|
|
46
|
-
// Margin for small breakpoint, but could be different in practice
|
|
47
|
-
const estimatedMargin = 64;
|
|
48
|
-
const breakpointEstimate = `${pixelWidth + estimatedMargin}px`;
|
|
49
|
-
|
|
50
|
-
return !window.matchMedia(`(min-width: ${breakpointEstimate})`).matches;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default (node, enableSlideshow) => {
|
|
54
|
-
const container = node || queryId("showcase");
|
|
55
|
-
const controls = Array.from(queryIdAll("showcase-control", container));
|
|
56
|
-
const logos = controls.map((control) => control.querySelector("img"));
|
|
57
|
-
const controlsContainer = queryId("showcase-controls", container);
|
|
58
|
-
const indexBar = queryId("showcase-index-bar", container);
|
|
59
|
-
const slides = queryId("showcase-slides", container);
|
|
60
|
-
const slideCount = slides.children.length;
|
|
61
|
-
|
|
62
|
-
const logoWidth = propertyValue("--ui-showcase-client-logo-min-width");
|
|
63
|
-
const pixelWidth = remsToPixelValue(logoWidth) * slideCount;
|
|
64
|
-
|
|
65
|
-
// dynamically adjust container width
|
|
66
|
-
[".ui-showcase-logo-wrapper", ".ui-showcase-index-bar"].forEach((s) => {
|
|
67
|
-
const el = container.querySelector(s);
|
|
68
|
-
const minWidth = `${pixelWidth}px`;
|
|
69
|
-
el.style.minWidth = minWidth;
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
let currentIndex = 0;
|
|
73
|
-
let mouseover = false;
|
|
74
|
-
let updateSlideTimeoutId;
|
|
75
|
-
|
|
76
|
-
const updateSlide = (index) => {
|
|
77
|
-
translateX(slides, index, -1);
|
|
78
|
-
translateX(indexBar, index, 1);
|
|
79
|
-
updateLogoOpacity(logos, index);
|
|
80
|
-
|
|
81
|
-
if (mobileBreakpoint(pixelWidth)) {
|
|
82
|
-
moveControlsContainer(controlsContainer, index);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const scheduleSlideMove = () =>
|
|
87
|
-
(updateSlideTimeoutId = setTimeout(() => {
|
|
88
|
-
if (mouseover) return;
|
|
89
|
-
if (mobileBreakpoint(pixelWidth)) return;
|
|
90
|
-
|
|
91
|
-
currentIndex = (currentIndex + 1) % controls.length;
|
|
92
|
-
|
|
93
|
-
updateSlide(currentIndex);
|
|
94
|
-
scheduleSlideMove();
|
|
95
|
-
}, SLIDE_SHOW_INTERVAL));
|
|
96
|
-
|
|
97
|
-
const logoClick = () => {
|
|
98
|
-
const clickHandler = (index) => () => {
|
|
99
|
-
currentIndex = index;
|
|
100
|
-
updateSlide(currentIndex);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const handlers = controls.map((control, index) => {
|
|
104
|
-
const handler = clickHandler(index);
|
|
105
|
-
control.addEventListener("click", handler);
|
|
106
|
-
return handler;
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
return () => {
|
|
110
|
-
handlers.forEach((handler, i) =>
|
|
111
|
-
controls[i].removeEventListener("click", handler)
|
|
112
|
-
);
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const pointerOverContainer = () => {
|
|
117
|
-
const handler = () => {
|
|
118
|
-
mouseover = true;
|
|
119
|
-
clearTimeout(updateSlideTimeoutId);
|
|
120
|
-
};
|
|
121
|
-
container.addEventListener("mouseover", handler);
|
|
122
|
-
return () => container.removeEventListener("mouseover", handler);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const pointerLeftContainer = () => {
|
|
126
|
-
const handler = () => {
|
|
127
|
-
mouseover = false;
|
|
128
|
-
scheduleSlideMove();
|
|
129
|
-
};
|
|
130
|
-
container.addEventListener("mouseleave", handler);
|
|
131
|
-
return () => container.removeEventListener("mouseleave", handler);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
const viewportResized = () => {
|
|
135
|
-
const handler = () => {
|
|
136
|
-
clearTimeout(updateSlideTimeoutId);
|
|
137
|
-
scheduleSlideMove();
|
|
138
|
-
};
|
|
139
|
-
document.addEventListener("resize", handler);
|
|
140
|
-
return () => document.removeEventListener("resize", handler);
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
const scrollOverContainer = () => {
|
|
144
|
-
const handler = (event) => event.preventDefault();
|
|
145
|
-
controlsContainer.parentNode.addEventListener("wheel", handler);
|
|
146
|
-
return () =>
|
|
147
|
-
controlsContainer.parentNode.removeEventListener("wheel", handler);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
const logoClickTeardown = logoClick();
|
|
151
|
-
const scrollOverContainerTeardown = scrollOverContainer();
|
|
152
|
-
|
|
153
|
-
const slideshowInit = () => {
|
|
154
|
-
if (enableSlideshow) {
|
|
155
|
-
scheduleSlideMove();
|
|
156
|
-
container.setAttribute("aria-live", "polite");
|
|
157
|
-
|
|
158
|
-
const teardowns = [
|
|
159
|
-
pointerOverContainer(),
|
|
160
|
-
pointerLeftContainer(),
|
|
161
|
-
viewportResized(),
|
|
162
|
-
];
|
|
163
|
-
return () => teardowns.forEach((t) => t());
|
|
164
|
-
} else {
|
|
165
|
-
return () => {};
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
const slideshowTeardown = slideshowInit();
|
|
170
|
-
|
|
171
|
-
return function teardown() {
|
|
172
|
-
// Restore initial position
|
|
173
|
-
updateSlide(0);
|
|
174
|
-
clearTimeout(updateSlideTimeoutId);
|
|
175
|
-
|
|
176
|
-
logoClickTeardown();
|
|
177
|
-
slideshowTeardown();
|
|
178
|
-
scrollOverContainerTeardown();
|
|
179
|
-
};
|
|
180
|
-
};
|
|
File without changes
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
module AblyUi
|
|
2
|
-
module Core
|
|
3
|
-
class Showcase < ViewComponent::Base
|
|
4
|
-
include AblyUi::Core::Util
|
|
5
|
-
def initialize(companies: default_companies, layout: 'quotes')
|
|
6
|
-
@random_id = append_random_postfix('showcase-slides')
|
|
7
|
-
@companies = companies
|
|
8
|
-
@layout = layout
|
|
9
|
-
@companies_data_cache = nil
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def companies_data
|
|
13
|
-
@companies_data_cache ||=
|
|
14
|
-
@companies.map do |key|
|
|
15
|
-
logo = company_logos[key]
|
|
16
|
-
logo[:layout] = @layout
|
|
17
|
-
|
|
18
|
-
content = @layout != 'quotes' ? case_studies : quotations
|
|
19
|
-
|
|
20
|
-
if !content[key]
|
|
21
|
-
# Exception errors can not be rescued
|
|
22
|
-
raise Exception.new "Showcase Error: Can't find content item [#{key}] for layout [#{@layout}]"
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
logo.merge(content[key])
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def default_companies
|
|
30
|
-
%i[hubspot vitac split]
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def company_logos
|
|
34
|
-
{
|
|
35
|
-
hubspot: {
|
|
36
|
-
name: 'Hubspot',
|
|
37
|
-
logo:
|
|
38
|
-
asset_path('ably_ui/core/images/cust-logo-hubspot-col-pos.png'),
|
|
39
|
-
logo2x:
|
|
40
|
-
asset_path('ably_ui/core/images/cust-logo-hubspot-col-pos@2x.png')
|
|
41
|
-
},
|
|
42
|
-
vitac: {
|
|
43
|
-
name: 'Vitac',
|
|
44
|
-
logo: asset_path('ably_ui/core/images/cust-logo-vitac-col-pos.png'),
|
|
45
|
-
logo2x:
|
|
46
|
-
asset_path('ably_ui/core/images/cust-logo-vitac-col-pos@2x.png')
|
|
47
|
-
},
|
|
48
|
-
split: {
|
|
49
|
-
name: 'Split',
|
|
50
|
-
logo: asset_path('ably_ui/core/images/cust-logo-split-col-pos.png'),
|
|
51
|
-
logo2x:
|
|
52
|
-
asset_path('ably_ui/core/images/cust-logo-split-col-pos@2x.png')
|
|
53
|
-
},
|
|
54
|
-
lightspeed: {
|
|
55
|
-
name: 'Lightspeed',
|
|
56
|
-
logo:
|
|
57
|
-
asset_path(
|
|
58
|
-
'ably_ui/core/images/cust-logo-lightspeed-syst-col-pos.png'
|
|
59
|
-
),
|
|
60
|
-
logo2x:
|
|
61
|
-
asset_path(
|
|
62
|
-
'ably_ui/core/images/cust-logo-lightspeed-syst-col-pos@2x.png'
|
|
63
|
-
)
|
|
64
|
-
},
|
|
65
|
-
australian_open: {
|
|
66
|
-
name: 'Australian Open',
|
|
67
|
-
logo:
|
|
68
|
-
asset_path('ably_ui/core/images/cust-logo-ausopen-col-pos.png'),
|
|
69
|
-
logo2x:
|
|
70
|
-
asset_path('ably_ui/core/images/cust-logo-ausopen-col-pos@2x.png')
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def quotations
|
|
76
|
-
{
|
|
77
|
-
hubspot: {
|
|
78
|
-
quote:
|
|
79
|
-
"Ably’s realtime infrastructure layer seamlessly supports HubSpot's entire realtime needs and helps us meet technical, business, and product development requirements.",
|
|
80
|
-
author: {
|
|
81
|
-
name: 'Max Freiert',
|
|
82
|
-
thumbnail:
|
|
83
|
-
asset_path(
|
|
84
|
-
'ably_ui/core/images/cust-photo-hubspot-max-freiert.jpg'
|
|
85
|
-
),
|
|
86
|
-
title: 'Product Group Lead / HubSpot'
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
vitac: {
|
|
90
|
-
quote:
|
|
91
|
-
'In a high-stakes, highly competitive industry, VITAC sought a provider that could operate realtime infrastructure for transporting live data to end-users via a complex, multi-hop process. In media accessibility environments - where there’s zero margin for error - Ably’s infrastructure performs and exceeds expectations.',
|
|
92
|
-
author: {
|
|
93
|
-
name: 'Joe Antonio',
|
|
94
|
-
thumbnail:
|
|
95
|
-
asset_path(
|
|
96
|
-
'ably_ui/core/images/cust-photo-vitac-joe-antonio.jpg'
|
|
97
|
-
),
|
|
98
|
-
title: 'Chief Information Officer / VITAC'
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
split: {
|
|
102
|
-
quote:
|
|
103
|
-
'You miss so much by not using a platform like Ably. When you need to implement a new feature, the capabilities are there, ready to go. Or when you need to scale, the capacity is seamlessly available. There’s no need to even think about these things. Building on Ably was the only logical choice because we managed to bypass a hefty DevOps debt and rapidly ship our new streaming capabilities while keeping our architecture as simple and reliable as possible.',
|
|
104
|
-
author: {
|
|
105
|
-
name: 'Pato Echagüe',
|
|
106
|
-
thumbnail:
|
|
107
|
-
asset_path(
|
|
108
|
-
'ably_ui/core/images/cust-photo-split-pato-echague.jpg'
|
|
109
|
-
),
|
|
110
|
-
title: 'Chief Technical Officer / Split'
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
def case_studies
|
|
117
|
-
{
|
|
118
|
-
hubspot: {
|
|
119
|
-
columns: [
|
|
120
|
-
{
|
|
121
|
-
heading: '$600k',
|
|
122
|
-
text: 'annual savings on infrastructure and DevOps'
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
heading: 'LIVE CHAT AND REMOTE COLLABORATION',
|
|
126
|
-
text:
|
|
127
|
-
"Ably’s realtime platform seamlessly supports HubSpot's entire realtime needs and helps us meet technical, business, and product development, requirements.",
|
|
128
|
-
button: {
|
|
129
|
-
label: 'View case study',
|
|
130
|
-
href: '#'
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
},
|
|
135
|
-
lightspeed: {
|
|
136
|
-
columns: [
|
|
137
|
-
{
|
|
138
|
-
heading: '75 million',
|
|
139
|
-
text: 'Students supported in 28,000 schools in 38 countries'
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
heading: 'REMOTE LEARNING AND DEVICE MANAGEMENT',
|
|
143
|
-
text:
|
|
144
|
-
'Lightspeed Systems relies on Ably’s realtime platform to enable realtime student safety for remote and classroom learning solutions at scale.',
|
|
145
|
-
button: {
|
|
146
|
-
label: 'View case study',
|
|
147
|
-
href: '#'
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
]
|
|
151
|
-
},
|
|
152
|
-
australian_open: {
|
|
153
|
-
columns: [
|
|
154
|
-
{
|
|
155
|
-
heading: '1.2 million',
|
|
156
|
-
text: 'Fans receiving billions of realtime messages'
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
heading: 'SPORTS, MEDIA, & AUDIENCE ENGAGEMENT',
|
|
160
|
-
text:
|
|
161
|
-
'Only Ably meets The Australian Open’s exacting performance targets, reliably delivering realtime scores, updates and commentary to a huge global fan base.',
|
|
162
|
-
button: {
|
|
163
|
-
label: 'View case study',
|
|
164
|
-
href: '#'
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
},
|
|
169
|
-
split: {
|
|
170
|
-
columns: [
|
|
171
|
-
{
|
|
172
|
-
heading: '>1 trillion',
|
|
173
|
-
text: 'Monthly feature flags sent over Ably’s network'
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
heading: 'REALTIME FEATURE FLAGS AND ANALYTICS',
|
|
177
|
-
text:
|
|
178
|
-
'Ably’s realtime platform and SSE support enable Split to deliver more than one trillion business-critical feature flags to tens of millions of client apps every month.',
|
|
179
|
-
button: {
|
|
180
|
-
label: 'View case study',
|
|
181
|
-
href: '#'
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
end
|
|
190
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= link_to @session_data[:logOut][:text], abs_url(@session_data[:logOut][:href]), method: :delete, class: @classes, data: { id: "meganav-link" } %>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React, { useRef } from "react";
|
|
2
|
-
import T from "prop-types";
|
|
3
|
-
|
|
4
|
-
const SignOutLink = ({ token, href, text, children, absUrl }) => {
|
|
5
|
-
const formRef = useRef(null);
|
|
6
|
-
|
|
7
|
-
const onClick = (e) => {
|
|
8
|
-
formRef.current.submit();
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<>
|
|
14
|
-
<form ref={formRef} method="post" action={absUrl(href)} className="hidden">
|
|
15
|
-
<input name="_method" value="delete" type="hidden" />
|
|
16
|
-
<input name="authenticity_token" value={token} type="hidden" />
|
|
17
|
-
</form>
|
|
18
|
-
|
|
19
|
-
{children({ href, text, onClick })}
|
|
20
|
-
</>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
SignOutLink.propTypes = {
|
|
25
|
-
token: T.string,
|
|
26
|
-
href: T.string,
|
|
27
|
-
text: T.string,
|
|
28
|
-
children: T.func,
|
|
29
|
-
absUrl: T.func,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default SignOutLink;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
module AblyUi
|
|
4
|
-
module Core
|
|
5
|
-
class SignOutLink < ViewComponent::Base
|
|
6
|
-
include Util
|
|
7
|
-
|
|
8
|
-
attr_reader :url_base
|
|
9
|
-
|
|
10
|
-
def initialize(session_data: {}, classes: [], url_base:)
|
|
11
|
-
@session_data = session_data
|
|
12
|
-
@classes = classes
|
|
13
|
-
@url_base = url_base
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<%= tag.div class: "w-full overflow-x-hidden", data: { id: "slider" }, style: "--dynamic-grid-columns-count: #{slides.length}; --dynamic-grid-column-min-width: #{slide_min_width}; --dynamic-grid-column-max-width: #{slide_max_width};" do %>
|
|
2
|
-
<%= tag.ol class: "grid ui-grid-gap grid-cols-dynamic transform transition-transform #{classes}", data: { id: "slider-strip" }, **additional_attributes do %>
|
|
3
|
-
<% slides.each do |slide| %>
|
|
4
|
-
<%= slide %>
|
|
5
|
-
<% end %>
|
|
6
|
-
<% end %>
|
|
7
|
-
|
|
8
|
-
<div class="hidden justify-center items-center my-24" data-id="slider-controls">
|
|
9
|
-
<button type="button" class="p-0 w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-previous">
|
|
10
|
-
<%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black", additional_css: "transform rotate-180")) %>
|
|
11
|
-
</button>
|
|
12
|
-
|
|
13
|
-
<ul class="flex justify-center items-center mx-32 relative h-24">
|
|
14
|
-
<% slides.each do |slide| %>
|
|
15
|
-
<li>
|
|
16
|
-
<span
|
|
17
|
-
class="ui-slider-marker text-cool-black"
|
|
18
|
-
data-id="slider-marker"
|
|
19
|
-
>⬤</span> <%# ⬤ %>
|
|
20
|
-
</li>
|
|
21
|
-
<% end %>
|
|
22
|
-
</ul>
|
|
23
|
-
|
|
24
|
-
<button type="button" class="p-0 w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-next">
|
|
25
|
-
<%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black")) %>
|
|
26
|
-
</button>
|
|
27
|
-
</div>
|
|
28
|
-
<% end %>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from "react";
|
|
2
|
-
import T from "prop-types";
|
|
3
|
-
|
|
4
|
-
import Icon from "../Icon/component.jsx";
|
|
5
|
-
|
|
6
|
-
import SliderScripts from "./component";
|
|
7
|
-
|
|
8
|
-
const Slider = ({
|
|
9
|
-
slides = [],
|
|
10
|
-
classes = "",
|
|
11
|
-
slideClasses = "",
|
|
12
|
-
slideMinWidth = "16.875rem",
|
|
13
|
-
slideMaxWidth = "1fr",
|
|
14
|
-
mqEnableThreshold = () => true,
|
|
15
|
-
...props
|
|
16
|
-
}) => {
|
|
17
|
-
const containerRef = useRef(null);
|
|
18
|
-
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
SliderScripts({
|
|
21
|
-
container: containerRef.current,
|
|
22
|
-
mqEnableThreshold,
|
|
23
|
-
});
|
|
24
|
-
}, []);
|
|
25
|
-
|
|
26
|
-
if (slides.length === 0) return;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
className="w-full overflow-x-hidden"
|
|
31
|
-
data-id="slider"
|
|
32
|
-
style={{
|
|
33
|
-
"--dynamic-grid-columns-count": slides.length,
|
|
34
|
-
"--dynamic-grid-column-min-width": slideMinWidth,
|
|
35
|
-
"--dynamic-grid-column-max-width": slideMaxWidth,
|
|
36
|
-
}}
|
|
37
|
-
ref={containerRef}
|
|
38
|
-
>
|
|
39
|
-
<ol className={`grid ui-grid-gap grid-cols-dynamic transform transition-transform ${classes}`} data-id="slider-strip" {...props}>
|
|
40
|
-
{slides.map((slide, i) => (
|
|
41
|
-
<li key={i} className={slideClasses} data-id="slider-slide">
|
|
42
|
-
{slide}
|
|
43
|
-
</li>
|
|
44
|
-
))}
|
|
45
|
-
</ol>
|
|
46
|
-
|
|
47
|
-
<div className="justify-center items-center my-24 hidden" data-id="slider-controls">
|
|
48
|
-
<button type="button" className="p-0 w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-previous">
|
|
49
|
-
<Icon
|
|
50
|
-
name="icon-gui-disclosure-arrow"
|
|
51
|
-
size="1.5rem"
|
|
52
|
-
color="text-cool-black"
|
|
53
|
-
additionalCSS="transform rotate-180"
|
|
54
|
-
data-id="meganav-control-mobile-dropdown-menu"
|
|
55
|
-
/>
|
|
56
|
-
</button>
|
|
57
|
-
|
|
58
|
-
<ul className="flex justify-center items-center mx-32 relative h-24">
|
|
59
|
-
{slides.map((_, i) => (
|
|
60
|
-
<li key={i}>
|
|
61
|
-
<span className="ui-slider-marker text-cool-black" data-id="slider-marker">
|
|
62
|
-
⬤
|
|
63
|
-
</span>{" "}
|
|
64
|
-
{/* ⬤ */}
|
|
65
|
-
</li>
|
|
66
|
-
))}
|
|
67
|
-
</ul>
|
|
68
|
-
|
|
69
|
-
<button type="button" className="p-0 w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-next">
|
|
70
|
-
<Icon name="icon-gui-disclosure-arrow" size="1.5rem" color="text-cool-black" data-id="meganav-control-mobile-dropdown-menu" />
|
|
71
|
-
</button>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
Slider.propTypes = {
|
|
78
|
-
slides: T.arrayOf(T.node),
|
|
79
|
-
classes: T.string,
|
|
80
|
-
slideClasses: T.string,
|
|
81
|
-
slideMinWidth: T.string,
|
|
82
|
-
slideMaxWidth: T.string,
|
|
83
|
-
mqEnableThreshold: T.func,
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export default Slider;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
module AblyUi
|
|
2
|
-
module Core
|
|
3
|
-
class Slider < ViewComponent::Base
|
|
4
|
-
attr_reader :classes,
|
|
5
|
-
:additional_attributes,
|
|
6
|
-
:slide_min_width,
|
|
7
|
-
:slide_max_width
|
|
8
|
-
|
|
9
|
-
renders_many :slides, 'Slide'
|
|
10
|
-
|
|
11
|
-
def initialize(
|
|
12
|
-
classes: '',
|
|
13
|
-
slide_min_width: '16.875rem',
|
|
14
|
-
slide_max_width: '1fr',
|
|
15
|
-
**additional_attributes
|
|
16
|
-
)
|
|
17
|
-
@classes = classes
|
|
18
|
-
@additional_attributes = additional_attributes
|
|
19
|
-
@slide_min_width = slide_min_width
|
|
20
|
-
@slide_max_width = slide_max_width
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
class Slide < ViewComponent::Base
|
|
24
|
-
attr_reader :classes
|
|
25
|
-
|
|
26
|
-
def initialize(classes: '')
|
|
27
|
-
@classes = classes
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def call
|
|
31
|
-
tag.li class: classes, data: { id: 'slider-slide' } do
|
|
32
|
-
content
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|