@540deg/ds 0.0.0-stage → 0.1.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/LICENSE +202 -0
- package/NOTICE +13 -0
- package/README.md +207 -2
- package/dist/assets/samples/captura.js +4 -0
- package/dist/assets/samples/charla-david.js +4 -0
- package/dist/assets/samples/charla-escultura.js +4 -0
- package/dist/assets/samples/charla-fachada.js +4 -0
- package/dist/assets/samples/charla-pintura.js +4 -0
- package/dist/assets/samples/charla-placa.js +4 -0
- package/dist/assets/samples/charla-teclado.js +4 -0
- package/dist/assets/samples/logo-540-claro.js +4 -0
- package/dist/assets/samples/logo-540-portada-claro.js +4 -0
- package/dist/assets/samples/logo-540-portada-oscuro.js +4 -0
- package/dist/assets/samples/logos/cliente-1.js +4 -0
- package/dist/assets/samples/logos/cliente-2.js +4 -0
- package/dist/assets/samples/logos/cliente-3.js +4 -0
- package/dist/assets/samples/logos/cliente-4.js +4 -0
- package/dist/assets/samples/logos/cliente-5.js +4 -0
- package/dist/assets/samples/logos/cliente-6.js +4 -0
- package/dist/assets/samples/logos/cliente-7.js +4 -0
- package/dist/assets/samples/logos/cliente-8.js +4 -0
- package/dist/assets/samples/logos/cliente-9.js +4 -0
- package/dist/assets/samples/retrato.js +4 -0
- package/dist/components/atoms/Bullets/Bullets.d.ts +6 -0
- package/dist/components/atoms/Bullets/Bullets.js +34 -0
- package/dist/components/atoms/Bullets/Bullets.module.js +13 -0
- package/dist/components/atoms/Bullets/index.d.ts +3 -0
- package/dist/components/atoms/Bullets/types.d.ts +23 -0
- package/dist/components/atoms/Bullets/types.js +9 -0
- package/dist/components/atoms/Button/Button.d.ts +6 -0
- package/dist/components/atoms/Button/Button.js +46 -0
- package/dist/components/atoms/Button/Button.module.js +24 -0
- package/dist/components/atoms/Button/index.d.ts +3 -0
- package/dist/components/atoms/Button/types.d.ts +38 -0
- package/dist/components/atoms/Button/types.js +14 -0
- package/dist/components/atoms/Count/Count.d.ts +6 -0
- package/dist/components/atoms/Count/Count.js +51 -0
- package/dist/components/atoms/Count/Count.module.js +9 -0
- package/dist/components/atoms/Count/index.d.ts +3 -0
- package/dist/components/atoms/Count/types.d.ts +17 -0
- package/dist/components/atoms/Count/types.js +8 -0
- package/dist/components/atoms/Image/Image.d.ts +6 -0
- package/dist/components/atoms/Image/Image.js +30 -0
- package/dist/components/atoms/Image/Image.module.js +11 -0
- package/dist/components/atoms/Image/index.d.ts +3 -0
- package/dist/components/atoms/Image/types.d.ts +16 -0
- package/dist/components/atoms/Image/types.js +13 -0
- package/dist/components/atoms/Logo/Logo.d.ts +6 -0
- package/dist/components/atoms/Logo/Logo.js +32 -0
- package/dist/components/atoms/Logo/Logo.module.js +10 -0
- package/dist/components/atoms/Logo/index.d.ts +3 -0
- package/dist/components/atoms/Logo/paths.d.ts +2 -0
- package/dist/components/atoms/Logo/paths.js +11 -0
- package/dist/components/atoms/Logo/types.d.ts +14 -0
- package/dist/components/atoms/Logo/types.js +12 -0
- package/dist/components/atoms/MenuItem/MenuItem.d.ts +6 -0
- package/dist/components/atoms/MenuItem/MenuItem.js +28 -0
- package/dist/components/atoms/MenuItem/MenuItem.module.js +19 -0
- package/dist/components/atoms/MenuItem/index.d.ts +3 -0
- package/dist/components/atoms/MenuItem/types.d.ts +18 -0
- package/dist/components/atoms/MenuItem/types.js +8 -0
- package/dist/components/atoms/SocialIcon/SocialIcon.d.ts +6 -0
- package/dist/components/atoms/SocialIcon/SocialIcon.js +26 -0
- package/dist/components/atoms/SocialIcon/SocialIcon.module.js +9 -0
- package/dist/components/atoms/SocialIcon/index.d.ts +3 -0
- package/dist/components/atoms/SocialIcon/paths.d.ts +7 -0
- package/dist/components/atoms/SocialIcon/paths.js +10 -0
- package/dist/components/atoms/SocialIcon/types.d.ts +15 -0
- package/dist/components/atoms/SocialIcon/types.js +11 -0
- package/dist/components/atoms/Text/Text.d.ts +6 -0
- package/dist/components/atoms/Text/Text.js +28 -0
- package/dist/components/atoms/Text/Text.module.js +32 -0
- package/dist/components/atoms/Text/index.d.ts +3 -0
- package/dist/components/atoms/Text/types.d.ts +39 -0
- package/dist/components/atoms/Text/types.js +54 -0
- package/dist/components/atoms/ThemeToggle/ThemeToggle.d.ts +6 -0
- package/dist/components/atoms/ThemeToggle/ThemeToggle.js +30 -0
- package/dist/components/atoms/ThemeToggle/ThemeToggle.module.js +17 -0
- package/dist/components/atoms/ThemeToggle/index.d.ts +3 -0
- package/dist/components/atoms/ThemeToggle/types.d.ts +13 -0
- package/dist/components/atoms/ThemeToggle/types.js +4 -0
- package/dist/components/molecules/Card/Card.d.ts +6 -0
- package/dist/components/molecules/Card/Card.js +82 -0
- package/dist/components/molecules/Card/Card.module.js +33 -0
- package/dist/components/molecules/Card/index.d.ts +3 -0
- package/dist/components/molecules/Card/types.d.ts +48 -0
- package/dist/components/molecules/Card/types.js +17 -0
- package/dist/components/molecules/Carousel/Carousel.d.ts +5 -0
- package/dist/components/molecules/Carousel/Carousel.js +148 -0
- package/dist/components/molecules/Carousel/Carousel.module.js +29 -0
- package/dist/components/molecules/Carousel/index.d.ts +3 -0
- package/dist/components/molecules/Carousel/types.d.ts +24 -0
- package/dist/components/molecules/Carousel/types.js +12 -0
- package/dist/components/molecules/CaseItem/CaseItem.d.ts +6 -0
- package/dist/components/molecules/CaseItem/CaseItem.js +54 -0
- package/dist/components/molecules/CaseItem/CaseItem.module.js +19 -0
- package/dist/components/molecules/CaseItem/index.d.ts +3 -0
- package/dist/components/molecules/CaseItem/types.d.ts +20 -0
- package/dist/components/molecules/CaseItem/types.js +7 -0
- package/dist/components/molecules/Dialog/Dialog.d.ts +6 -0
- package/dist/components/molecules/Dialog/Dialog.js +81 -0
- package/dist/components/molecules/Dialog/Dialog.module.js +19 -0
- package/dist/components/molecules/Dialog/index.d.ts +2 -0
- package/dist/components/molecules/Dialog/types.d.ts +22 -0
- package/dist/components/molecules/Field/Field.d.ts +6 -0
- package/dist/components/molecules/Field/Field.js +47 -0
- package/dist/components/molecules/Field/Field.module.js +15 -0
- package/dist/components/molecules/Field/index.d.ts +3 -0
- package/dist/components/molecules/Field/types.d.ts +24 -0
- package/dist/components/molecules/Field/types.js +5 -0
- package/dist/components/molecules/Footer/Footer.d.ts +6 -0
- package/dist/components/molecules/Footer/Footer.js +102 -0
- package/dist/components/molecules/Footer/Footer.module.js +33 -0
- package/dist/components/molecules/Footer/index.d.ts +3 -0
- package/dist/components/molecules/Footer/types.d.ts +46 -0
- package/dist/components/molecules/Footer/types.js +8 -0
- package/dist/components/molecules/Grid/Grid.d.ts +5 -0
- package/dist/components/molecules/Grid/Grid.js +32 -0
- package/dist/components/molecules/Grid/Grid.module.js +29 -0
- package/dist/components/molecules/Grid/index.d.ts +3 -0
- package/dist/components/molecules/Grid/types.d.ts +28 -0
- package/dist/components/molecules/Grid/types.js +14 -0
- package/dist/components/molecules/Lists/Lists.d.ts +7 -0
- package/dist/components/molecules/Lists/Lists.js +54 -0
- package/dist/components/molecules/Lists/Lists.module.js +15 -0
- package/dist/components/molecules/Lists/index.d.ts +2 -0
- package/dist/components/molecules/Lists/types.d.ts +22 -0
- package/dist/components/molecules/Menu/Menu.d.ts +6 -0
- package/dist/components/molecules/Menu/Menu.js +43 -0
- package/dist/components/molecules/Menu/Menu.module.js +13 -0
- package/dist/components/molecules/Menu/index.d.ts +3 -0
- package/dist/components/molecules/Menu/types.d.ts +27 -0
- package/dist/components/molecules/Menu/types.js +8 -0
- package/dist/components/molecules/Metric/Metric.d.ts +5 -0
- package/dist/components/molecules/Metric/Metric.js +40 -0
- package/dist/components/molecules/Metric/Metric.module.js +11 -0
- package/dist/components/molecules/Metric/index.d.ts +2 -0
- package/dist/components/molecules/Metric/types.d.ts +15 -0
- package/dist/components/molecules/NavMobile/NavMobile.d.ts +6 -0
- package/dist/components/molecules/NavMobile/NavMobile.js +95 -0
- package/dist/components/molecules/NavMobile/NavMobile.module.js +17 -0
- package/dist/components/molecules/NavMobile/index.d.ts +3 -0
- package/dist/components/molecules/NavMobile/types.d.ts +20 -0
- package/dist/components/molecules/NavMobile/types.js +8 -0
- package/dist/components/molecules/Question/Question.d.ts +3 -0
- package/dist/components/molecules/Question/Question.js +22 -0
- package/dist/components/molecules/Question/Question.module.js +5 -0
- package/dist/components/molecules/Question/index.d.ts +2 -0
- package/dist/components/molecules/Question/types.d.ts +8 -0
- package/dist/components/molecules/Screenshot/Screenshot.d.ts +3 -0
- package/dist/components/molecules/Screenshot/Screenshot.js +17 -0
- package/dist/components/molecules/Screenshot/Screenshot.module.js +5 -0
- package/dist/components/molecules/Screenshot/index.d.ts +2 -0
- package/dist/components/molecules/Screenshot/types.d.ts +12 -0
- package/dist/components/molecules/Section/Section.d.ts +6 -0
- package/dist/components/molecules/Section/Section.js +25 -0
- package/dist/components/molecules/Section/Section.module.js +11 -0
- package/dist/components/molecules/Section/index.d.ts +3 -0
- package/dist/components/molecules/Section/types.d.ts +13 -0
- package/dist/components/molecules/Section/types.js +5 -0
- package/dist/components/molecules/SectionHeader/SectionHeader.d.ts +6 -0
- package/dist/components/molecules/SectionHeader/SectionHeader.js +34 -0
- package/dist/components/molecules/SectionHeader/SectionHeader.module.js +9 -0
- package/dist/components/molecules/SectionHeader/index.d.ts +3 -0
- package/dist/components/molecules/SectionHeader/types.d.ts +22 -0
- package/dist/components/molecules/SectionHeader/types.js +14 -0
- package/dist/components/molecules/Stack/Stack.d.ts +6 -0
- package/dist/components/molecules/Stack/Stack.js +22 -0
- package/dist/components/molecules/Stack/Stack.module.js +12 -0
- package/dist/components/molecules/Stack/index.d.ts +3 -0
- package/dist/components/molecules/Stack/types.d.ts +18 -0
- package/dist/components/molecules/Stack/types.js +17 -0
- package/dist/components/molecules/TeamMember/TeamMember.d.ts +6 -0
- package/dist/components/molecules/TeamMember/TeamMember.js +55 -0
- package/dist/components/molecules/TeamMember/TeamMember.module.js +13 -0
- package/dist/components/molecules/TeamMember/index.d.ts +3 -0
- package/dist/components/molecules/TeamMember/types.d.ts +24 -0
- package/dist/components/molecules/TeamMember/types.js +8 -0
- package/dist/components/organisms/Bars/Bars.d.ts +6 -0
- package/dist/components/organisms/Bars/Bars.js +94 -0
- package/dist/components/organisms/Bars/Bars.module.js +26 -0
- package/dist/components/organisms/Bars/index.d.ts +3 -0
- package/dist/components/organisms/Bars/types.d.ts +43 -0
- package/dist/components/organisms/Bars/types.js +12 -0
- package/dist/components/organisms/Blobs/Blobs.d.ts +3 -0
- package/dist/components/organisms/Blobs/Blobs.js +14 -0
- package/dist/components/organisms/Blobs/Blobs.module.js +15 -0
- package/dist/components/organisms/Blobs/index.d.ts +2 -0
- package/dist/components/organisms/Blobs/types.d.ts +3 -0
- package/dist/components/organisms/BlockTitle/BlockTitle.d.ts +6 -0
- package/dist/components/organisms/BlockTitle/BlockTitle.js +46 -0
- package/dist/components/organisms/BlockTitle/BlockTitle.module.js +15 -0
- package/dist/components/organisms/BlockTitle/index.d.ts +2 -0
- package/dist/components/organisms/BlockTitle/types.d.ts +18 -0
- package/dist/components/organisms/CardList/CardList.d.ts +6 -0
- package/dist/components/organisms/CardList/CardList.js +15 -0
- package/dist/components/organisms/CardList/CardList.module.js +5 -0
- package/dist/components/organisms/CardList/index.d.ts +2 -0
- package/dist/components/organisms/CardList/types.d.ts +6 -0
- package/dist/components/organisms/Closing/Closing.d.ts +6 -0
- package/dist/components/organisms/Closing/Closing.js +42 -0
- package/dist/components/organisms/Closing/Closing.module.js +9 -0
- package/dist/components/organisms/Closing/index.d.ts +3 -0
- package/dist/components/organisms/Closing/types.d.ts +15 -0
- package/dist/components/organisms/Closing/types.js +4 -0
- package/dist/components/organisms/Cover/Cover.d.ts +6 -0
- package/dist/components/organisms/Cover/Cover.js +85 -0
- package/dist/components/organisms/Cover/Cover.module.js +21 -0
- package/dist/components/organisms/Cover/index.d.ts +3 -0
- package/dist/components/organisms/Cover/types.d.ts +33 -0
- package/dist/components/organisms/Cover/types.js +4 -0
- package/dist/components/organisms/Cycle/Cycle.d.ts +6 -0
- package/dist/components/organisms/Cycle/Cycle.js +79 -0
- package/dist/components/organisms/Cycle/Cycle.module.js +17 -0
- package/dist/components/organisms/Cycle/index.d.ts +3 -0
- package/dist/components/organisms/Cycle/types.d.ts +18 -0
- package/dist/components/organisms/Cycle/types.js +9 -0
- package/dist/components/organisms/Deck/Deck.d.ts +6 -0
- package/dist/components/organisms/Deck/Deck.js +159 -0
- package/dist/components/organisms/Deck/Deck.module.js +19 -0
- package/dist/components/organisms/Deck/index.d.ts +4 -0
- package/dist/components/organisms/Deck/types.d.ts +37 -0
- package/dist/components/organisms/Deck/types.js +13 -0
- package/dist/components/organisms/Deck/useDeckNavigation.d.ts +15 -0
- package/dist/components/organisms/Deck/useDeckNavigation.js +218 -0
- package/dist/components/organisms/DeckFooter/DeckFooter.d.ts +6 -0
- package/dist/components/organisms/DeckFooter/DeckFooter.js +75 -0
- package/dist/components/organisms/DeckFooter/DeckFooter.module.js +25 -0
- package/dist/components/organisms/DeckFooter/index.d.ts +3 -0
- package/dist/components/organisms/DeckFooter/types.d.ts +22 -0
- package/dist/components/organisms/DeckFooter/types.js +8 -0
- package/dist/components/organisms/Flow/Flow.d.ts +6 -0
- package/dist/components/organisms/Flow/Flow.js +26 -0
- package/dist/components/organisms/Flow/Flow.module.js +13 -0
- package/dist/components/organisms/Flow/index.d.ts +3 -0
- package/dist/components/organisms/Flow/types.d.ts +17 -0
- package/dist/components/organisms/Flow/types.js +4 -0
- package/dist/components/organisms/Form/Form.d.ts +6 -0
- package/dist/components/organisms/Form/Form.js +28 -0
- package/dist/components/organisms/Form/Form.module.js +13 -0
- package/dist/components/organisms/Form/index.d.ts +3 -0
- package/dist/components/organisms/Form/types.d.ts +16 -0
- package/dist/components/organisms/Form/types.js +8 -0
- package/dist/components/organisms/Heartbeat/Heartbeat.d.ts +3 -0
- package/dist/components/organisms/Heartbeat/Heartbeat.js +17 -0
- package/dist/components/organisms/Heartbeat/Heartbeat.module.js +13 -0
- package/dist/components/organisms/Heartbeat/index.d.ts +2 -0
- package/dist/components/organisms/Heartbeat/types.d.ts +3 -0
- package/dist/components/organisms/LogoCarousel/LogoCarousel.d.ts +6 -0
- package/dist/components/organisms/LogoCarousel/LogoCarousel.js +72 -0
- package/dist/components/organisms/LogoCarousel/LogoCarousel.module.js +13 -0
- package/dist/components/organisms/LogoCarousel/index.d.ts +3 -0
- package/dist/components/organisms/LogoCarousel/types.d.ts +18 -0
- package/dist/components/organisms/LogoCarousel/types.js +4 -0
- package/dist/components/organisms/Marquee/Marquee.d.ts +7 -0
- package/dist/components/organisms/Marquee/Marquee.js +57 -0
- package/dist/components/organisms/Marquee/Marquee.module.js +15 -0
- package/dist/components/organisms/Marquee/index.d.ts +3 -0
- package/dist/components/organisms/Marquee/types.d.ts +11 -0
- package/dist/components/organisms/Marquee/types.js +4 -0
- package/dist/components/organisms/ProgressBar/ProgressBar.d.ts +6 -0
- package/dist/components/organisms/ProgressBar/ProgressBar.js +56 -0
- package/dist/components/organisms/ProgressBar/ProgressBar.module.js +17 -0
- package/dist/components/organisms/ProgressBar/index.d.ts +3 -0
- package/dist/components/organisms/ProgressBar/types.d.ts +20 -0
- package/dist/components/organisms/ProgressBar/types.js +7 -0
- package/dist/components/organisms/Punchline/Punchline.d.ts +6 -0
- package/dist/components/organisms/Punchline/Punchline.js +41 -0
- package/dist/components/organisms/Punchline/Punchline.module.js +11 -0
- package/dist/components/organisms/Punchline/index.d.ts +3 -0
- package/dist/components/organisms/Punchline/types.d.ts +15 -0
- package/dist/components/organisms/Punchline/types.js +4 -0
- package/dist/components/organisms/Quote/Quote.d.ts +3 -0
- package/dist/components/organisms/Quote/Quote.js +33 -0
- package/dist/components/organisms/Quote/Quote.module.js +5 -0
- package/dist/components/organisms/Quote/index.d.ts +3 -0
- package/dist/components/organisms/Quote/types.d.ts +15 -0
- package/dist/components/organisms/Quote/types.js +4 -0
- package/dist/components/organisms/Schema/Schema.d.ts +54 -0
- package/dist/components/organisms/Schema/Schema.js +117 -0
- package/dist/components/organisms/Schema/Schema.module.js +87 -0
- package/dist/components/organisms/Schema/index.d.ts +2 -0
- package/dist/components/organisms/Schema/types.d.ts +32 -0
- package/dist/components/organisms/Share/Share.d.ts +6 -0
- package/dist/components/organisms/Share/Share.js +68 -0
- package/dist/components/organisms/Share/Share.module.js +22 -0
- package/dist/components/organisms/Share/index.d.ts +3 -0
- package/dist/components/organisms/Share/types.d.ts +24 -0
- package/dist/components/organisms/Share/types.js +4 -0
- package/dist/components/organisms/Sheet/Sheet.d.ts +2 -0
- package/dist/components/organisms/Sheet/Sheet.js +92 -0
- package/dist/components/organisms/Sheet/Sheet.module.js +15 -0
- package/dist/components/organisms/Sheet/index.d.ts +3 -0
- package/dist/components/organisms/Sheet/types.d.ts +15 -0
- package/dist/components/organisms/Sheet/types.js +4 -0
- package/dist/components/organisms/Slide/Slide.d.ts +6 -0
- package/dist/components/organisms/Slide/Slide.js +29 -0
- package/dist/components/organisms/Slide/Slide.module.js +13 -0
- package/dist/components/organisms/Slide/index.d.ts +3 -0
- package/dist/components/organisms/Slide/types.d.ts +18 -0
- package/dist/components/organisms/Slide/types.js +8 -0
- package/dist/components/organisms/Spotlight/Spotlight.d.ts +7 -0
- package/dist/components/organisms/Spotlight/Spotlight.js +39 -0
- package/dist/components/organisms/Spotlight/Spotlight.module.js +5 -0
- package/dist/components/organisms/Spotlight/index.d.ts +2 -0
- package/dist/components/organisms/Spotlight/types.d.ts +6 -0
- package/dist/components/organisms/Statements/Statements.d.ts +7 -0
- package/dist/components/organisms/Statements/Statements.js +50 -0
- package/dist/components/organisms/Statements/Statements.module.js +11 -0
- package/dist/components/organisms/Statements/index.d.ts +3 -0
- package/dist/components/organisms/Statements/types.d.ts +14 -0
- package/dist/components/organisms/Statements/types.js +7 -0
- package/dist/components/organisms/Steps/Steps.d.ts +15 -0
- package/dist/components/organisms/Steps/Steps.js +117 -0
- package/dist/components/organisms/Steps/Steps.module.js +13 -0
- package/dist/components/organisms/Steps/StepsContext.d.ts +11 -0
- package/dist/components/organisms/Steps/StepsContext.js +18 -0
- package/dist/components/organisms/Steps/index.d.ts +3 -0
- package/dist/components/organisms/Steps/types.d.ts +22 -0
- package/dist/components/organisms/Story/Story.d.ts +6 -0
- package/dist/components/organisms/Story/Story.js +43 -0
- package/dist/components/organisms/Story/Story.module.js +5 -0
- package/dist/components/organisms/Story/index.d.ts +3 -0
- package/dist/components/organisms/Story/types.d.ts +20 -0
- package/dist/components/organisms/Story/types.js +7 -0
- package/dist/components/organisms/Timeline/Timeline.d.ts +7 -0
- package/dist/components/organisms/Timeline/Timeline.js +67 -0
- package/dist/components/organisms/Timeline/Timeline.module.js +19 -0
- package/dist/components/organisms/Timeline/index.d.ts +3 -0
- package/dist/components/organisms/Timeline/types.d.ts +25 -0
- package/dist/components/organisms/Timeline/types.js +4 -0
- package/dist/components/organisms/Tools/Tools.d.ts +6 -0
- package/dist/components/organisms/Tools/Tools.js +47 -0
- package/dist/components/organisms/Tools/Tools.module.js +17 -0
- package/dist/components/organisms/Tools/index.d.ts +3 -0
- package/dist/components/organisms/Tools/types.d.ts +23 -0
- package/dist/components/organisms/Tools/types.js +4 -0
- package/dist/fonts/OFL.txt +93 -0
- package/dist/fonts/dm-sans-latin-opsz-normal.woff2 +0 -0
- package/dist/hooks/useCenterState.d.ts +9 -0
- package/dist/hooks/useCenterState.js +40 -0
- package/dist/hooks/useReveal.d.ts +7 -0
- package/dist/hooks/useReveal.js +34 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +98 -0
- package/dist/styles.css +3441 -0
- package/dist/templates/TalkTemplate/TalkTemplate.d.ts +7 -0
- package/dist/templates/TalkTemplate/TalkTemplate.js +1392 -0
- package/dist/templates/TalkTemplate/index.d.ts +2 -0
- package/package.json +86 -4
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/components/organisms/ProgressBar/ProgressBar.module.css
|
|
2
|
+
var bar = "_bar_uakc4_4";
|
|
3
|
+
var track = "_track_uakc4_10";
|
|
4
|
+
var fill = "_fill_uakc4_17";
|
|
5
|
+
var dot = "_dot_uakc4_25";
|
|
6
|
+
var milestone = "_milestone_uakc4_35";
|
|
7
|
+
var ends = "_ends_uakc4_44";
|
|
8
|
+
var ProgressBar_module_default = {
|
|
9
|
+
bar,
|
|
10
|
+
track,
|
|
11
|
+
fill,
|
|
12
|
+
dot,
|
|
13
|
+
milestone,
|
|
14
|
+
ends
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { bar, ProgressBar_module_default as default, dot, ends, fill, milestone, track };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type ProgressBarProps = {
|
|
3
|
+
/** Fill from 0 to 1. */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Label at the left end ("Feb 2025"). */
|
|
6
|
+
start?: ReactNode;
|
|
7
|
+
/** Label at the right end ("Hoy"). */
|
|
8
|
+
end?: ReactNode;
|
|
9
|
+
/** How many intermediate milestones, spread evenly along the bar. */
|
|
10
|
+
milestones?: number;
|
|
11
|
+
/** How many of those milestones are reached: they light up from the left. */
|
|
12
|
+
reached?: number;
|
|
13
|
+
/** Accessible name. */
|
|
14
|
+
label: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const PROGRESS_BAR_DEFAULTS: {
|
|
18
|
+
readonly milestones: 0;
|
|
19
|
+
readonly reached: 0;
|
|
20
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PunchlineProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Punchline is the sentence that closes a block: statement at three quarters under a hairline,
|
|
4
|
+
* with an optional transition. Inside a slide, or as its own stop.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Punchline({ sentence, transition, placement, id, className }: PunchlineProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Text } from "../../atoms/Text/Text.js";
|
|
2
|
+
import { Slide } from "../Slide/Slide.js";
|
|
3
|
+
import Punchline_module_default from "./Punchline.module.js";
|
|
4
|
+
import { PUNCHLINE_DEFAULTS } from "./types.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/organisms/Punchline/Punchline.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Punchline is the sentence that closes a block: statement at three quarters under a hairline,
|
|
9
|
+
* with an optional transition. Inside a slide, or as its own stop.
|
|
10
|
+
*/
|
|
11
|
+
function Punchline({ sentence, transition, placement = PUNCHLINE_DEFAULTS.placement, id, className }) {
|
|
12
|
+
const body = /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: [
|
|
14
|
+
Punchline_module_default.punchline,
|
|
15
|
+
placement === "inside" ? Punchline_module_default.inside : "",
|
|
16
|
+
className ?? ""
|
|
17
|
+
].filter(Boolean).join(" "),
|
|
18
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
19
|
+
as: "p",
|
|
20
|
+
variant: "statement",
|
|
21
|
+
align: "center",
|
|
22
|
+
wrap: "balance",
|
|
23
|
+
measure: "wide",
|
|
24
|
+
children: sentence
|
|
25
|
+
}), transition ? /* @__PURE__ */ jsx(Text, {
|
|
26
|
+
variant: "body-m",
|
|
27
|
+
tone: "secondary",
|
|
28
|
+
align: "center",
|
|
29
|
+
wrap: "pretty",
|
|
30
|
+
measure: "half",
|
|
31
|
+
className: Punchline_module_default.transition,
|
|
32
|
+
children: transition
|
|
33
|
+
}) : null]
|
|
34
|
+
});
|
|
35
|
+
return placement === "standalone" ? /* @__PURE__ */ jsx(Slide, {
|
|
36
|
+
id: id ?? "remate",
|
|
37
|
+
children: body
|
|
38
|
+
}) : body;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Punchline };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/components/organisms/Punchline/Punchline.module.css
|
|
2
|
+
var punchline = "_punchline_anwe8_4";
|
|
3
|
+
var inside = "_inside_anwe8_10";
|
|
4
|
+
var transition = "_transition_anwe8_14";
|
|
5
|
+
var Punchline_module_default = {
|
|
6
|
+
punchline,
|
|
7
|
+
inside,
|
|
8
|
+
transition
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Punchline_module_default as default, inside, punchline, transition };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type PunchlineProps = {
|
|
3
|
+
/** The sentence, in statement at three quarters. */
|
|
4
|
+
sentence: ReactNode;
|
|
5
|
+
/** The transition to what comes next, body-m secondary. */
|
|
6
|
+
transition?: ReactNode;
|
|
7
|
+
/** inside: at the end of a slide, under a line. standalone: its own stop. */
|
|
8
|
+
placement?: 'inside' | 'standalone';
|
|
9
|
+
/** Only for standalone. */
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const PUNCHLINE_DEFAULTS: {
|
|
14
|
+
readonly placement: "inside";
|
|
15
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Text } from "../../atoms/Text/Text.js";
|
|
2
|
+
import { Slide } from "../Slide/Slide.js";
|
|
3
|
+
import Quote_module_default from "./Quote.module.js";
|
|
4
|
+
import { QUOTE_DEFAULTS } from "./types.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/organisms/Quote/Quote.tsx
|
|
7
|
+
/** Quote is a sentence someone said: statement at three quarters, with the attribution under it. */
|
|
8
|
+
function Quote({ id, sentence, author, tone = QUOTE_DEFAULTS.tone, className }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Slide, {
|
|
10
|
+
id,
|
|
11
|
+
tone,
|
|
12
|
+
className,
|
|
13
|
+
children: /* @__PURE__ */ jsxs("figure", {
|
|
14
|
+
className: Quote_module_default.figure,
|
|
15
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
16
|
+
as: "blockquote",
|
|
17
|
+
variant: "statement",
|
|
18
|
+
align: "center",
|
|
19
|
+
wrap: "balance",
|
|
20
|
+
measure: "wide",
|
|
21
|
+
style: { margin: 0 },
|
|
22
|
+
children: sentence
|
|
23
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
24
|
+
as: "figcaption",
|
|
25
|
+
variant: "micro-light",
|
|
26
|
+
tone: "secondary",
|
|
27
|
+
children: author
|
|
28
|
+
})]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Quote };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type QuoteProps = {
|
|
3
|
+
/** The stop's anchor. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The quoted sentence, in statement. */
|
|
6
|
+
sentence: ReactNode;
|
|
7
|
+
/** Who said it. */
|
|
8
|
+
author: ReactNode;
|
|
9
|
+
/** The band tone; quotes usually go raised. */
|
|
10
|
+
tone?: 'default' | 'raised';
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const QUOTE_DEFAULTS: {
|
|
14
|
+
readonly tone: "raised";
|
|
15
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { SchemaFrameProps, SchemaLayerProps, SchemaProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The drawing vocabulary of the talks, as class names: shapes (node, highlighted, note, pill),
|
|
4
|
+
* lines (line, lineStrong, lineDashed, arrowhead), chart series and the six text sizes.
|
|
5
|
+
*/
|
|
6
|
+
export declare const schema: {
|
|
7
|
+
readonly node: string;
|
|
8
|
+
readonly highlighted: string;
|
|
9
|
+
readonly note: string;
|
|
10
|
+
readonly pill: string;
|
|
11
|
+
readonly inverse: string;
|
|
12
|
+
readonly dot: string;
|
|
13
|
+
readonly arc: string;
|
|
14
|
+
readonly icon: string;
|
|
15
|
+
readonly iconBox: string;
|
|
16
|
+
readonly iconFill: string;
|
|
17
|
+
readonly line: string;
|
|
18
|
+
readonly lineStrong: string;
|
|
19
|
+
readonly lineDashed: string;
|
|
20
|
+
readonly arrowhead: string;
|
|
21
|
+
readonly arrowheadFill: string;
|
|
22
|
+
readonly series: string;
|
|
23
|
+
readonly seriesDashed: string;
|
|
24
|
+
readonly accent: string;
|
|
25
|
+
readonly accentThin: string;
|
|
26
|
+
readonly accentDashed: string;
|
|
27
|
+
readonly accentDotted: string;
|
|
28
|
+
readonly accentDot: string;
|
|
29
|
+
readonly title: string;
|
|
30
|
+
readonly nodeText: string;
|
|
31
|
+
readonly nodeSub: string;
|
|
32
|
+
readonly circleText: string;
|
|
33
|
+
readonly pillText: string;
|
|
34
|
+
readonly inverseText: string;
|
|
35
|
+
readonly noteText: string;
|
|
36
|
+
readonly label: string;
|
|
37
|
+
readonly coreTitle: string;
|
|
38
|
+
readonly coreSub: string;
|
|
39
|
+
readonly micro: string;
|
|
40
|
+
readonly sideText: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Schema is a drawing of the talk: an SVG with an accessible title and description, built from
|
|
44
|
+
* the vocabulary above. Inside a Steps, its layers light up step by step.
|
|
45
|
+
*/
|
|
46
|
+
export declare function Schema({ viewBox, title, description, data, guided, children, className, ...rest }: SchemaProps): import("react").JSX.Element;
|
|
47
|
+
/** SchemaLayer is a group of the drawing lit from a step on. */
|
|
48
|
+
export declare function SchemaLayer({ step, label, children, className }: SchemaLayerProps): import("react").JSX.Element;
|
|
49
|
+
/** SchemaFrame gives the drawing the whole window width (scrolling sideways if needed) and a caption. */
|
|
50
|
+
export declare function SchemaFrame({ caption, children, className }: SchemaFrameProps): import("react").JSX.Element;
|
|
51
|
+
/** SchemaVoice is the live region that reads the label of the lit layer. */
|
|
52
|
+
export declare function SchemaVoice({ labels }: {
|
|
53
|
+
labels: string[];
|
|
54
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { useSteps } from "../Steps/StepsContext.js";
|
|
2
|
+
import { Text } from "../../atoms/Text/Text.js";
|
|
3
|
+
import Schema_module_default from "./Schema.module.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useId } from "react";
|
|
6
|
+
//#region src/components/organisms/Schema/Schema.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The drawing vocabulary of the talks, as class names: shapes (node, highlighted, note, pill),
|
|
9
|
+
* lines (line, lineStrong, lineDashed, arrowhead), chart series and the six text sizes.
|
|
10
|
+
*/
|
|
11
|
+
var schema = {
|
|
12
|
+
node: Schema_module_default.node,
|
|
13
|
+
highlighted: Schema_module_default.highlighted,
|
|
14
|
+
note: Schema_module_default.note,
|
|
15
|
+
pill: Schema_module_default.pill,
|
|
16
|
+
inverse: Schema_module_default.inverse,
|
|
17
|
+
dot: Schema_module_default.dot,
|
|
18
|
+
arc: Schema_module_default.arc,
|
|
19
|
+
icon: Schema_module_default.icon,
|
|
20
|
+
iconBox: Schema_module_default.iconBox,
|
|
21
|
+
iconFill: Schema_module_default.iconFill,
|
|
22
|
+
line: Schema_module_default.line,
|
|
23
|
+
lineStrong: Schema_module_default.lineStrong,
|
|
24
|
+
lineDashed: Schema_module_default.lineDashed,
|
|
25
|
+
arrowhead: Schema_module_default.arrowhead,
|
|
26
|
+
arrowheadFill: Schema_module_default.arrowheadFill,
|
|
27
|
+
series: Schema_module_default.series,
|
|
28
|
+
seriesDashed: Schema_module_default.seriesDashed,
|
|
29
|
+
accent: Schema_module_default.accent,
|
|
30
|
+
accentThin: Schema_module_default.accentThin,
|
|
31
|
+
accentDashed: Schema_module_default.accentDashed,
|
|
32
|
+
accentDotted: Schema_module_default.accentDotted,
|
|
33
|
+
accentDot: Schema_module_default.accentDot,
|
|
34
|
+
title: Schema_module_default.title,
|
|
35
|
+
nodeText: Schema_module_default.nodeText,
|
|
36
|
+
nodeSub: Schema_module_default.nodeSub,
|
|
37
|
+
circleText: Schema_module_default.circleText,
|
|
38
|
+
pillText: Schema_module_default.pillText,
|
|
39
|
+
inverseText: Schema_module_default.inverseText,
|
|
40
|
+
noteText: Schema_module_default.noteText,
|
|
41
|
+
label: Schema_module_default.label,
|
|
42
|
+
coreTitle: Schema_module_default.coreTitle,
|
|
43
|
+
coreSub: Schema_module_default.coreSub,
|
|
44
|
+
micro: Schema_module_default.micro,
|
|
45
|
+
sideText: Schema_module_default.sideText
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Schema is a drawing of the talk: an SVG with an accessible title and description, built from
|
|
49
|
+
* the vocabulary above. Inside a Steps, its layers light up step by step.
|
|
50
|
+
*/
|
|
51
|
+
function Schema({ viewBox, title, description, data = false, guided = false, children, className, ...rest }) {
|
|
52
|
+
const id = useId();
|
|
53
|
+
const { current, guided: stepsGuided } = useSteps();
|
|
54
|
+
const isGuided = guided || stepsGuided;
|
|
55
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
56
|
+
className: [
|
|
57
|
+
Schema_module_default.schema,
|
|
58
|
+
data ? Schema_module_default.data : "",
|
|
59
|
+
isGuided ? Schema_module_default.guided : "",
|
|
60
|
+
className ?? ""
|
|
61
|
+
].filter(Boolean).join(" "),
|
|
62
|
+
viewBox,
|
|
63
|
+
role: "img",
|
|
64
|
+
"aria-labelledby": description ? `${id}-t ${id}-d` : `${id}-t`,
|
|
65
|
+
"data-current": isGuided && Number.isFinite(current) ? current : void 0,
|
|
66
|
+
...rest,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx("title", {
|
|
69
|
+
id: `${id}-t`,
|
|
70
|
+
children: title
|
|
71
|
+
}),
|
|
72
|
+
description ? /* @__PURE__ */ jsx("desc", {
|
|
73
|
+
id: `${id}-d`,
|
|
74
|
+
children: description
|
|
75
|
+
}) : null,
|
|
76
|
+
children
|
|
77
|
+
]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** SchemaLayer is a group of the drawing lit from a step on. */
|
|
81
|
+
function SchemaLayer({ step = 0, label, children, className }) {
|
|
82
|
+
const { current } = useSteps();
|
|
83
|
+
const on = current >= step;
|
|
84
|
+
return /* @__PURE__ */ jsx("g", {
|
|
85
|
+
className: [Schema_module_default.layer, className ?? ""].filter(Boolean).join(" "),
|
|
86
|
+
"data-step": step,
|
|
87
|
+
"data-label": label,
|
|
88
|
+
"data-on": on ? "" : void 0,
|
|
89
|
+
children
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/** SchemaFrame gives the drawing the whole window width (scrolling sideways if needed) and a caption. */
|
|
93
|
+
function SchemaFrame({ caption, children, className }) {
|
|
94
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
95
|
+
className: [Schema_module_default.frame, className ?? ""].filter(Boolean).join(" "),
|
|
96
|
+
children
|
|
97
|
+
}), caption ? /* @__PURE__ */ jsx(Text, {
|
|
98
|
+
variant: "body-m",
|
|
99
|
+
tone: "secondary",
|
|
100
|
+
align: "center",
|
|
101
|
+
wrap: "pretty",
|
|
102
|
+
className: Schema_module_default.caption,
|
|
103
|
+
children: caption
|
|
104
|
+
}) : null] });
|
|
105
|
+
}
|
|
106
|
+
/** SchemaVoice is the live region that reads the label of the lit layer. */
|
|
107
|
+
function SchemaVoice({ labels }) {
|
|
108
|
+
const { current } = useSteps();
|
|
109
|
+
const text = Number.isFinite(current) ? labels[Math.min(current, labels.length - 1)] : "";
|
|
110
|
+
return /* @__PURE__ */ jsx("p", {
|
|
111
|
+
className: Schema_module_default.voice,
|
|
112
|
+
"aria-live": "polite",
|
|
113
|
+
children: text
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { Schema, SchemaFrame, SchemaLayer, SchemaVoice, schema };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//#region src/components/organisms/Schema/Schema.module.css
|
|
2
|
+
var frame = "_frame_qkt9g_4";
|
|
3
|
+
var caption = "_caption_qkt9g_14";
|
|
4
|
+
var schema = "_schema_qkt9g_20";
|
|
5
|
+
var layer = "_layer_qkt9g_29";
|
|
6
|
+
var guided = "_guided_qkt9g_33";
|
|
7
|
+
var voice = "_voice_qkt9g_42";
|
|
8
|
+
var node = "_node_qkt9g_52";
|
|
9
|
+
var highlighted = "_highlighted_qkt9g_53";
|
|
10
|
+
var note = "_note_qkt9g_54";
|
|
11
|
+
var pill = "_pill_qkt9g_55";
|
|
12
|
+
var inverse = "_inverse_qkt9g_56";
|
|
13
|
+
var dot = "_dot_qkt9g_57";
|
|
14
|
+
var arc = "_arc_qkt9g_58";
|
|
15
|
+
var icon = "_icon_qkt9g_59";
|
|
16
|
+
var iconBox = "_iconBox_qkt9g_60";
|
|
17
|
+
var iconFill = "_iconFill_qkt9g_61";
|
|
18
|
+
var line = "_line_qkt9g_64";
|
|
19
|
+
var lineStrong = "_lineStrong_qkt9g_65";
|
|
20
|
+
var lineDashed = "_lineDashed_qkt9g_66";
|
|
21
|
+
var arrowhead = "_arrowhead_qkt9g_67";
|
|
22
|
+
var arrowheadFill = "_arrowheadFill_qkt9g_68";
|
|
23
|
+
var series = "_series_qkt9g_71";
|
|
24
|
+
var seriesDashed = "_seriesDashed_qkt9g_72";
|
|
25
|
+
var accent = "_accent_qkt9g_73";
|
|
26
|
+
var accentThin = "_accentThin_qkt9g_74";
|
|
27
|
+
var accentDashed = "_accentDashed_qkt9g_75";
|
|
28
|
+
var accentDotted = "_accentDotted_qkt9g_76";
|
|
29
|
+
var accentDot = "_accentDot_qkt9g_76";
|
|
30
|
+
var title = "_title_qkt9g_80";
|
|
31
|
+
var nodeText = "_nodeText_qkt9g_81";
|
|
32
|
+
var nodeSub = "_nodeSub_qkt9g_82";
|
|
33
|
+
var circleText = "_circleText_qkt9g_83";
|
|
34
|
+
var pillText = "_pillText_qkt9g_84";
|
|
35
|
+
var inverseText = "_inverseText_qkt9g_85";
|
|
36
|
+
var noteText = "_noteText_qkt9g_86";
|
|
37
|
+
var label = "_label_qkt9g_87";
|
|
38
|
+
var coreTitle = "_coreTitle_qkt9g_88";
|
|
39
|
+
var coreSub = "_coreSub_qkt9g_89";
|
|
40
|
+
var micro = "_micro_qkt9g_90";
|
|
41
|
+
var sideText = "_sideText_qkt9g_91";
|
|
42
|
+
var data = "_data_qkt9g_94";
|
|
43
|
+
var Schema_module_default = {
|
|
44
|
+
frame,
|
|
45
|
+
caption,
|
|
46
|
+
schema,
|
|
47
|
+
layer,
|
|
48
|
+
guided,
|
|
49
|
+
voice,
|
|
50
|
+
node,
|
|
51
|
+
highlighted,
|
|
52
|
+
note,
|
|
53
|
+
pill,
|
|
54
|
+
inverse,
|
|
55
|
+
dot,
|
|
56
|
+
arc,
|
|
57
|
+
icon,
|
|
58
|
+
iconBox,
|
|
59
|
+
iconFill,
|
|
60
|
+
line,
|
|
61
|
+
lineStrong,
|
|
62
|
+
lineDashed,
|
|
63
|
+
arrowhead,
|
|
64
|
+
arrowheadFill,
|
|
65
|
+
series,
|
|
66
|
+
seriesDashed,
|
|
67
|
+
accent,
|
|
68
|
+
accentThin,
|
|
69
|
+
accentDashed,
|
|
70
|
+
accentDotted,
|
|
71
|
+
accentDot,
|
|
72
|
+
title,
|
|
73
|
+
nodeText,
|
|
74
|
+
nodeSub,
|
|
75
|
+
circleText,
|
|
76
|
+
pillText,
|
|
77
|
+
inverseText,
|
|
78
|
+
noteText,
|
|
79
|
+
label,
|
|
80
|
+
coreTitle,
|
|
81
|
+
coreSub,
|
|
82
|
+
micro,
|
|
83
|
+
sideText,
|
|
84
|
+
data
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { accent, accentDashed, accentDot, accentDotted, accentThin, arc, arrowhead, arrowheadFill, caption, circleText, coreSub, coreTitle, data, Schema_module_default as default, dot, frame, guided, highlighted, icon, iconBox, iconFill, inverse, inverseText, label, layer, line, lineDashed, lineStrong, micro, node, nodeSub, nodeText, note, noteText, pill, pillText, schema, series, seriesDashed, sideText, title, voice };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type SchemaProps = {
|
|
3
|
+
/** The drawing coordinates ("0 0 2560 820"). */
|
|
4
|
+
viewBox: string;
|
|
5
|
+
/** The accessible title: what the drawing is, in words. */
|
|
6
|
+
title: string;
|
|
7
|
+
/** The accessible description: what the drawing says, in words. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Data schemas: every text one step bigger. */
|
|
10
|
+
data?: boolean;
|
|
11
|
+
/** Guided: layers light up with the surrounding Steps; the rest dims to 18 %. */
|
|
12
|
+
guided?: boolean;
|
|
13
|
+
/** The layers and shapes. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
} & Omit<ComponentPropsWithoutRef<'svg'>, 'viewBox' | 'children' | 'className'>;
|
|
17
|
+
export type SchemaLayerProps = {
|
|
18
|
+
/** The step from which this layer is lit (inside a Steps). */
|
|
19
|
+
step?: number;
|
|
20
|
+
/** What this layer says, for the live region. */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** The shapes of the layer. */
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
export type SchemaFrameProps = {
|
|
27
|
+
/** The caption under the drawing, at half the grid. */
|
|
28
|
+
caption?: ReactNode;
|
|
29
|
+
/** The Schema to frame: it takes the full window width, with sideways scroll if it does not fit. */
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ShareProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Share is a whole split into its parts: one bar at 100 %, its segments growing from the left
|
|
4
|
+
* when it comes into view (or its Step lights up), and a legend with each part's percentage.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Share({ segments, label, title, decimals, className }: ShareProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useReveal } from "../../../hooks/useReveal.js";
|
|
2
|
+
import { Text } from "../../atoms/Text/Text.js";
|
|
3
|
+
import Share_module_default from "./Share.module.js";
|
|
4
|
+
import { SHARE_DEFAULTS } from "./types.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useMemo, useRef } from "react";
|
|
7
|
+
//#region src/components/organisms/Share/Share.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Share is a whole split into its parts: one bar at 100 %, its segments growing from the left
|
|
10
|
+
* when it comes into view (or its Step lights up), and a legend with each part's percentage.
|
|
11
|
+
*/
|
|
12
|
+
function Share({ segments, label, title, decimals = SHARE_DEFAULTS.decimals, className }) {
|
|
13
|
+
const ref = useRef(null);
|
|
14
|
+
const on = useReveal(ref);
|
|
15
|
+
const total = segments.reduce((sum, s) => sum + s.value, 0);
|
|
16
|
+
const format = useMemo(() => new Intl.NumberFormat("es-ES", {
|
|
17
|
+
minimumFractionDigits: decimals,
|
|
18
|
+
maximumFractionDigits: decimals
|
|
19
|
+
}), [decimals]);
|
|
20
|
+
const share = (v) => total > 0 ? v / total * 100 : 0;
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
ref,
|
|
23
|
+
className: [Share_module_default.share, className ?? ""].filter(Boolean).join(" "),
|
|
24
|
+
children: [
|
|
25
|
+
title ? /* @__PURE__ */ jsx(Text, {
|
|
26
|
+
variant: "body-s-bold",
|
|
27
|
+
children: title
|
|
28
|
+
}) : null,
|
|
29
|
+
/* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: Share_module_default.bar,
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
children: segments.map((s, i) => /* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: [Share_module_default.segment, Share_module_default[`tone-${s.tone ?? (i === 0 ? "ink" : "context")}`]].join(" "),
|
|
34
|
+
style: {
|
|
35
|
+
inlineSize: on ? `calc(${share(s.value)}% - ${(segments.length - 1) * 2 / segments.length}px)` : 0,
|
|
36
|
+
transitionDelay: on ? `${i * 100}ms` : "0ms"
|
|
37
|
+
}
|
|
38
|
+
}, i))
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsx("ul", {
|
|
41
|
+
className: Share_module_default.legend,
|
|
42
|
+
"aria-label": label,
|
|
43
|
+
children: segments.map((s, i) => /* @__PURE__ */ jsxs("li", {
|
|
44
|
+
className: Share_module_default.item,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: [Share_module_default.swatch, Share_module_default[`tone-${s.tone ?? (i === 0 ? "ink" : "context")}`]].join(" "),
|
|
48
|
+
"aria-hidden": "true"
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ jsx(Text, {
|
|
51
|
+
as: "span",
|
|
52
|
+
variant: "body-s",
|
|
53
|
+
children: s.label
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx(Text, {
|
|
56
|
+
as: "span",
|
|
57
|
+
variant: "body-s-bold",
|
|
58
|
+
className: Share_module_default.percent,
|
|
59
|
+
children: `${format.format(share(s.value))} %`
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}, i))
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { Share };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/components/organisms/Share/Share.module.css
|
|
2
|
+
var share = "_share_nsb7q_3";
|
|
3
|
+
var bar = "_bar_nsb7q_9";
|
|
4
|
+
var segment = "_segment_nsb7q_15";
|
|
5
|
+
var legend = "_legend_nsb7q_32";
|
|
6
|
+
var item = "_item_nsb7q_41";
|
|
7
|
+
var swatch = "_swatch_nsb7q_47";
|
|
8
|
+
var percent = "_percent_nsb7q_53";
|
|
9
|
+
var Share_module_default = {
|
|
10
|
+
share,
|
|
11
|
+
bar,
|
|
12
|
+
segment,
|
|
13
|
+
"tone-ink": "_tone-ink_nsb7q_20",
|
|
14
|
+
"tone-context": "_tone-context_nsb7q_24",
|
|
15
|
+
"tone-accent": "_tone-accent_nsb7q_28",
|
|
16
|
+
legend,
|
|
17
|
+
item,
|
|
18
|
+
swatch,
|
|
19
|
+
percent
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { bar, Share_module_default as default, item, legend, percent, segment, share, swatch };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BarTone } from '../Bars';
|
|
3
|
+
export type ShareSegment = {
|
|
4
|
+
/** What this part is ("España", "Fuera de España"). */
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
/** Its amount. The parts are turned into percentages of their sum. */
|
|
7
|
+
value: number;
|
|
8
|
+
/** ink: the part that tells the story. context: the rest. accent: the one part that matters. */
|
|
9
|
+
tone?: BarTone;
|
|
10
|
+
};
|
|
11
|
+
export type ShareProps = {
|
|
12
|
+
/** The parts of the whole, in order from the left. Two to four. */
|
|
13
|
+
segments: ShareSegment[];
|
|
14
|
+
/** Accessible name ("Reparto de suscriptores"). */
|
|
15
|
+
label: string;
|
|
16
|
+
/** Optional name above the bar, in body-s-bold. */
|
|
17
|
+
title?: ReactNode;
|
|
18
|
+
/** Decimals of the percentages in the legend. */
|
|
19
|
+
decimals?: number;
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const SHARE_DEFAULTS: {
|
|
23
|
+
readonly decimals: 0;
|
|
24
|
+
};
|