@resumekit/react 0.0.0-stage → 0.2.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 +21 -0
- package/README.md +74 -2
- package/dist/PagedSheet.d.ts +63 -0
- package/dist/PagedSheet.d.ts.map +1 -0
- package/dist/PagedSheet.js +584 -0
- package/dist/TemplateDocument.d.ts +33 -0
- package/dist/TemplateDocument.d.ts.map +1 -0
- package/dist/TemplateDocument.js +33 -0
- package/dist/autosave-context.d.ts +37 -0
- package/dist/autosave-context.d.ts.map +1 -0
- package/dist/autosave-context.js +24 -0
- package/dist/collections/AuthoredItems.d.ts +9 -0
- package/dist/collections/AuthoredItems.d.ts.map +1 -0
- package/dist/collections/AuthoredItems.js +116 -0
- package/dist/collections/Collection.d.ts +48 -0
- package/dist/collections/Collection.d.ts.map +1 -0
- package/dist/collections/Collection.js +24 -0
- package/dist/collections/CollectionItems.d.ts +94 -0
- package/dist/collections/CollectionItems.d.ts.map +1 -0
- package/dist/collections/CollectionItems.js +91 -0
- package/dist/collections/EntryOverlay.d.ts +38 -0
- package/dist/collections/EntryOverlay.d.ts.map +1 -0
- package/dist/collections/EntryOverlay.js +51 -0
- package/dist/collections/SortableItems.d.ts +52 -0
- package/dist/collections/SortableItems.d.ts.map +1 -0
- package/dist/collections/SortableItems.js +80 -0
- package/dist/collections/authoring-context.d.ts +69 -0
- package/dist/collections/authoring-context.d.ts.map +1 -0
- package/dist/collections/authoring-context.js +36 -0
- package/dist/collections/collection.css +462 -0
- package/dist/collections/entry-text.d.ts +23 -0
- package/dist/collections/entry-text.d.ts.map +1 -0
- package/dist/collections/entry-text.js +35 -0
- package/dist/collections/icons.d.ts +53 -0
- package/dist/collections/icons.d.ts.map +1 -0
- package/dist/collections/icons.js +56 -0
- package/dist/collections/library/LibraryAction.d.ts +24 -0
- package/dist/collections/library/LibraryAction.d.ts.map +1 -0
- package/dist/collections/library/LibraryAction.js +122 -0
- package/dist/collections/library/LibraryPicker.d.ts +42 -0
- package/dist/collections/library/LibraryPicker.d.ts.map +1 -0
- package/dist/collections/library/LibraryPicker.js +94 -0
- package/dist/collections/library/library.css +435 -0
- package/dist/collections/overlay-context.d.ts +34 -0
- package/dist/collections/overlay-context.d.ts.map +1 -0
- package/dist/collections/overlay-context.js +13 -0
- package/dist/collections/preload.d.ts +19 -0
- package/dist/collections/preload.d.ts.map +1 -0
- package/dist/collections/preload.js +23 -0
- package/dist/collections/selection-context.d.ts +25 -0
- package/dist/collections/selection-context.d.ts.map +1 -0
- package/dist/collections/selection-context.js +49 -0
- package/dist/collections/useCollection.d.ts +58 -0
- package/dist/collections/useCollection.d.ts.map +1 -0
- package/dist/collections/useCollection.js +90 -0
- package/dist/collections/useCustomEntries.d.ts +18 -0
- package/dist/collections/useCustomEntries.d.ts.map +1 -0
- package/dist/collections/useCustomEntries.js +56 -0
- package/dist/collections/useSectionCollection.d.ts +48 -0
- package/dist/collections/useSectionCollection.d.ts.map +1 -0
- package/dist/collections/useSectionCollection.js +169 -0
- package/dist/document.css +186 -0
- package/dist/export-bundle/bundle.css +2 -0
- package/dist/export-bundle/bundle.js +67 -0
- package/dist/fields/date-issues-context.d.ts +20 -0
- package/dist/fields/date-issues-context.d.ts.map +1 -0
- package/dist/fields/date-issues-context.js +68 -0
- package/dist/fields/field-registry.d.ts +163 -0
- package/dist/fields/field-registry.d.ts.map +1 -0
- package/dist/fields/field-registry.js +175 -0
- package/dist/fonts/README.md +207 -0
- package/dist/fonts/arimo-400.woff2 +0 -0
- package/dist/fonts/arimo-400i.woff2 +0 -0
- package/dist/fonts/arimo-700.woff2 +0 -0
- package/dist/fonts/arimo-700i.woff2 +0 -0
- package/dist/fonts/bitter-400.woff2 +0 -0
- package/dist/fonts/bitter-400i.woff2 +0 -0
- package/dist/fonts/bitter-700.woff2 +0 -0
- package/dist/fonts/bitter-700i.woff2 +0 -0
- package/dist/fonts/cabin-700.woff2 +0 -0
- package/dist/fonts/carlito-400.woff2 +0 -0
- package/dist/fonts/carlito-400i.woff2 +0 -0
- package/dist/fonts/carlito-700.woff2 +0 -0
- package/dist/fonts/carlito-700i.woff2 +0 -0
- package/dist/fonts/clearsans-400.woff2 +0 -0
- package/dist/fonts/clearsans-400i.woff2 +0 -0
- package/dist/fonts/cochineal-400.woff2 +0 -0
- package/dist/fonts/cochineal-400i.woff2 +0 -0
- package/dist/fonts/cochineal-700.woff2 +0 -0
- package/dist/fonts/ebgaramond-400.woff2 +0 -0
- package/dist/fonts/ebgaramond-400i.woff2 +0 -0
- package/dist/fonts/ebgaramond-700.woff2 +0 -0
- package/dist/fonts/ebgaramond-700i.woff2 +0 -0
- package/dist/fonts/fonts.css +622 -0
- package/dist/fonts/gelasio-400.woff2 +0 -0
- package/dist/fonts/gelasio-400i.woff2 +0 -0
- package/dist/fonts/gelasio-700.woff2 +0 -0
- package/dist/fonts/gelasio-700i.woff2 +0 -0
- package/dist/fonts/heros-400.woff2 +0 -0
- package/dist/fonts/heros-400i.woff2 +0 -0
- package/dist/fonts/heros-700.woff2 +0 -0
- package/dist/fonts/heros-700i.woff2 +0 -0
- package/dist/fonts/inconsolata-400.woff2 +0 -0
- package/dist/fonts/lato-100.woff2 +0 -0
- package/dist/fonts/lato-300.woff2 +0 -0
- package/dist/fonts/lato-300i.woff2 +0 -0
- package/dist/fonts/lato-400.woff2 +0 -0
- package/dist/fonts/lato-400i.woff2 +0 -0
- package/dist/fonts/lato-700.woff2 +0 -0
- package/dist/fonts/lato-700i.woff2 +0 -0
- package/dist/fonts/licenses/arimo-OFL.txt +93 -0
- package/dist/fonts/licenses/bitter-OFL.txt +94 -0
- package/dist/fonts/licenses/cabin-OFL.txt +93 -0
- package/dist/fonts/licenses/carlito-OFL.txt +94 -0
- package/dist/fonts/licenses/clearsans-APACHE-2.0.txt +205 -0
- package/dist/fonts/licenses/cochineal-OFL.txt +96 -0
- package/dist/fonts/licenses/ebgaramond-OFL.txt +93 -0
- package/dist/fonts/licenses/gelasio-OFL.txt +93 -0
- package/dist/fonts/licenses/heros-GUST-FONT-LICENSE.txt +30 -0
- package/dist/fonts/licenses/inconsolata-OFL.txt +93 -0
- package/dist/fonts/licenses/latinmodern-GUST-FONT-LICENSE.txt +35 -0
- package/dist/fonts/licenses/lato-OFL.txt +93 -0
- package/dist/fonts/licenses/ptserif-OFL.txt +93 -0
- package/dist/fonts/licenses/raleway-OFL.txt +93 -0
- package/dist/fonts/licenses/roboto-OFL.txt +93 -0
- package/dist/fonts/licenses/robotocondensed-OFL.txt +93 -0
- package/dist/fonts/licenses/robotoslab-APACHE-2.0.txt +205 -0
- package/dist/fonts/licenses/sourcesans3-OFL.txt +93 -0
- package/dist/fonts/licenses/tinos-OFL.txt +93 -0
- package/dist/fonts/lmmono-400.woff2 +0 -0
- package/dist/fonts/lmroman-400.woff2 +0 -0
- package/dist/fonts/lmroman-400i.woff2 +0 -0
- package/dist/fonts/lmroman-700.woff2 +0 -0
- package/dist/fonts/lmroman-700i.woff2 +0 -0
- package/dist/fonts/lmromancaps-400.woff2 +0 -0
- package/dist/fonts/ptserif-400.woff2 +0 -0
- package/dist/fonts/ptserif-400i.woff2 +0 -0
- package/dist/fonts/ptserif-700.woff2 +0 -0
- package/dist/fonts/ptserif-700i.woff2 +0 -0
- package/dist/fonts/raleway-300.woff2 +0 -0
- package/dist/fonts/raleway-400.woff2 +0 -0
- package/dist/fonts/raleway-400i.woff2 +0 -0
- package/dist/fonts/raleway-500.woff2 +0 -0
- package/dist/fonts/raleway-700.woff2 +0 -0
- package/dist/fonts/roboto-100.woff2 +0 -0
- package/dist/fonts/roboto-300.woff2 +0 -0
- package/dist/fonts/roboto-300i.woff2 +0 -0
- package/dist/fonts/roboto-400.woff2 +0 -0
- package/dist/fonts/roboto-400i.woff2 +0 -0
- package/dist/fonts/roboto-700.woff2 +0 -0
- package/dist/fonts/robotocondensed-400.woff2 +0 -0
- package/dist/fonts/robotocondensed-400i.woff2 +0 -0
- package/dist/fonts/robotocondensed-700.woff2 +0 -0
- package/dist/fonts/robotocondensed-700i.woff2 +0 -0
- package/dist/fonts/robotoslab-700.woff2 +0 -0
- package/dist/fonts/sourcesans3-300.woff2 +0 -0
- package/dist/fonts/sourcesans3-300i.woff2 +0 -0
- package/dist/fonts/sourcesans3-400.woff2 +0 -0
- package/dist/fonts/sourcesans3-400i.woff2 +0 -0
- package/dist/fonts/sourcesans3-700.woff2 +0 -0
- package/dist/fonts/tinos-400.woff2 +0 -0
- package/dist/fonts/tinos-400i.woff2 +0 -0
- package/dist/fonts/tinos-700.woff2 +0 -0
- package/dist/fonts/tinos-700i.woff2 +0 -0
- package/dist/i18n/README.md +52 -0
- package/dist/i18n/catalog.d.ts +39 -0
- package/dist/i18n/catalog.d.ts.map +1 -0
- package/dist/i18n/catalog.js +43 -0
- package/dist/i18n/format.d.ts +14 -0
- package/dist/i18n/format.d.ts.map +1 -0
- package/dist/i18n/format.js +38 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/locale-context.d.ts +43 -0
- package/dist/i18n/locale-context.d.ts.map +1 -0
- package/dist/i18n/locale-context.js +74 -0
- package/dist/i18n/locales/en.json +337 -0
- package/dist/i18n/locales/es.json +337 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +99 -0
- package/dist/kit/BulletSkillGroup.d.ts +20 -0
- package/dist/kit/BulletSkillGroup.d.ts.map +1 -0
- package/dist/kit/BulletSkillGroup.js +25 -0
- package/dist/kit/DescribedEntries.d.ts +41 -0
- package/dist/kit/DescribedEntries.d.ts.map +1 -0
- package/dist/kit/DescribedEntries.js +57 -0
- package/dist/kit/DocumentSection.d.ts +58 -0
- package/dist/kit/DocumentSection.d.ts.map +1 -0
- package/dist/kit/DocumentSection.js +38 -0
- package/dist/kit/GridSkillGroup.d.ts +12 -0
- package/dist/kit/GridSkillGroup.d.ts.map +1 -0
- package/dist/kit/GridSkillGroup.js +14 -0
- package/dist/kit/Heading.d.ts +11 -0
- package/dist/kit/Heading.d.ts.map +1 -0
- package/dist/kit/Heading.js +10 -0
- package/dist/kit/InitialsAvatar.d.ts +17 -0
- package/dist/kit/InitialsAvatar.d.ts.map +1 -0
- package/dist/kit/InitialsAvatar.js +18 -0
- package/dist/kit/InitialsChip.d.ts +16 -0
- package/dist/kit/InitialsChip.d.ts.map +1 -0
- package/dist/kit/InitialsChip.js +16 -0
- package/dist/kit/InlineSkillGroup.d.ts +22 -0
- package/dist/kit/InlineSkillGroup.d.ts.map +1 -0
- package/dist/kit/InlineSkillGroup.js +16 -0
- package/dist/kit/LabelledSkillGroup.d.ts +24 -0
- package/dist/kit/LabelledSkillGroup.d.ts.map +1 -0
- package/dist/kit/LabelledSkillGroup.js +20 -0
- package/dist/kit/LanguageList.d.ts +28 -0
- package/dist/kit/LanguageList.d.ts.map +1 -0
- package/dist/kit/LanguageList.js +56 -0
- package/dist/kit/Separator.d.ts +20 -0
- package/dist/kit/Separator.d.ts.map +1 -0
- package/dist/kit/Separator.js +21 -0
- package/dist/kit/TagSkillGroup.d.ts +8 -0
- package/dist/kit/TagSkillGroup.d.ts.map +1 -0
- package/dist/kit/TagSkillGroup.js +10 -0
- package/dist/kit/avatar.css +42 -0
- package/dist/kit/contact-icons.css +70 -0
- package/dist/kit/contact.d.ts +16 -0
- package/dist/kit/contact.d.ts.map +1 -0
- package/dist/kit/contact.js +18 -0
- package/dist/kit/described.css +114 -0
- package/dist/kit/documentStyle.d.ts +20 -0
- package/dist/kit/documentStyle.d.ts.map +1 -0
- package/dist/kit/documentStyle.js +64 -0
- package/dist/kit/heading.css +17 -0
- package/dist/kit/keywords.css +127 -0
- package/dist/kit/language.css +104 -0
- package/dist/kit/layout.css +16 -0
- package/dist/kit/monogram.d.ts +6 -0
- package/dist/kit/monogram.d.ts.map +1 -0
- package/dist/kit/monogram.js +12 -0
- package/dist/kit/panel.css +26 -0
- package/dist/kit/skill-grid.css +93 -0
- package/dist/kit/skill-tags.css +36 -0
- package/dist/kit/textShapes.d.ts +24 -0
- package/dist/kit/textShapes.d.ts.map +1 -0
- package/dist/kit/textShapes.js +32 -0
- package/dist/kit/typography.css +86 -0
- package/dist/letter/LetterDocument.d.ts +13 -0
- package/dist/letter/LetterDocument.d.ts.map +1 -0
- package/dist/letter/LetterDocument.js +12 -0
- package/dist/letter/letter.css +75 -0
- package/dist/nodes/AuthoredBullets.d.ts +22 -0
- package/dist/nodes/AuthoredBullets.d.ts.map +1 -0
- package/dist/nodes/AuthoredBullets.js +101 -0
- package/dist/nodes/CustomSections.d.ts +42 -0
- package/dist/nodes/CustomSections.d.ts.map +1 -0
- package/dist/nodes/CustomSections.js +27 -0
- package/dist/nodes/EditableBulletList.d.ts +15 -0
- package/dist/nodes/EditableBulletList.d.ts.map +1 -0
- package/dist/nodes/EditableBulletList.js +98 -0
- package/dist/nodes/EditableInlineList.d.ts +27 -0
- package/dist/nodes/EditableInlineList.d.ts.map +1 -0
- package/dist/nodes/EditableInlineList.js +50 -0
- package/dist/nodes/EditableText.d.ts +79 -0
- package/dist/nodes/EditableText.d.ts.map +1 -0
- package/dist/nodes/EditableText.js +113 -0
- package/dist/nodes/LinkField.d.ts +103 -0
- package/dist/nodes/LinkField.d.ts.map +1 -0
- package/dist/nodes/LinkField.js +277 -0
- package/dist/nodes/PlainTextField.d.ts +38 -0
- package/dist/nodes/PlainTextField.d.ts.map +1 -0
- package/dist/nodes/PlainTextField.js +72 -0
- package/dist/nodes/formatting.d.ts +38 -0
- package/dist/nodes/formatting.d.ts.map +1 -0
- package/dist/nodes/formatting.js +27 -0
- package/dist/nodes/link-field.css +200 -0
- package/dist/nodes/locked.d.ts +38 -0
- package/dist/nodes/locked.d.ts.map +1 -0
- package/dist/nodes/locked.js +68 -0
- package/dist/nodes/template-node.css +720 -0
- package/dist/paged.css +265 -0
- package/dist/pagination.d.ts +93 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +167 -0
- package/dist/picture-context.d.ts +6 -0
- package/dist/picture-context.d.ts.map +1 -0
- package/dist/picture-context.js +14 -0
- package/dist/presentation-context.d.ts +45 -0
- package/dist/presentation-context.d.ts.map +1 -0
- package/dist/presentation-context.js +44 -0
- package/dist/presented.d.ts +16 -0
- package/dist/presented.d.ts.map +1 -0
- package/dist/presented.js +22 -0
- package/dist/rail/ContainerRail.d.ts +29 -0
- package/dist/rail/ContainerRail.d.ts.map +1 -0
- package/dist/rail/ContainerRail.js +50 -0
- package/dist/rail/EntryActions.d.ts +19 -0
- package/dist/rail/EntryActions.d.ts.map +1 -0
- package/dist/rail/EntryActions.js +17 -0
- package/dist/rail/rail-store.d.ts +42 -0
- package/dist/rail/rail-store.d.ts.map +1 -0
- package/dist/rail/rail-store.js +107 -0
- package/dist/rail/rail.css +188 -0
- package/dist/rail/useSpaceDrag.d.ts +30 -0
- package/dist/rail/useSpaceDrag.d.ts.map +1 -0
- package/dist/rail/useSpaceDrag.js +154 -0
- package/dist/registry.d.ts +35 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +74 -0
- package/dist/spacing/spacing-context.d.ts +53 -0
- package/dist/spacing/spacing-context.d.ts.map +1 -0
- package/dist/spacing/spacing-context.js +36 -0
- package/dist/spacing/spacing.css +159 -0
- package/dist/spacing/useSpaceSlot.d.ts +52 -0
- package/dist/spacing/useSpaceSlot.d.ts.map +1 -0
- package/dist/spacing/useSpaceSlot.js +38 -0
- package/dist/static/api.d.ts +13 -0
- package/dist/static/api.d.ts.map +1 -0
- package/dist/static/api.js +1 -0
- package/dist/static/static.mjs +33930 -0
- package/dist/static/templates/academic.css +1 -0
- package/dist/static/templates/alta.css +1 -0
- package/dist/static/templates/classic.css +1 -0
- package/dist/static/templates/cobalt.css +1 -0
- package/dist/static/templates/compact.css +1 -0
- package/dist/static/templates/contemporary.css +1 -0
- package/dist/static/templates/creative.css +1 -0
- package/dist/static/templates/crimson.css +1 -0
- package/dist/static/templates/curve.css +1 -0
- package/dist/static/templates/double-column-logos.css +1 -0
- package/dist/static/templates/double-column.css +1 -0
- package/dist/static/templates/elegant-logos.css +1 -0
- package/dist/static/templates/elegant.css +1 -0
- package/dist/static/templates/engineer.css +1 -0
- package/dist/static/templates/executive.css +1 -0
- package/dist/static/templates/harvard.css +1 -0
- package/dist/static/templates/hipster.css +1 -0
- package/dist/static/templates/ivy.css +1 -0
- package/dist/static/templates/meridian.css +1 -0
- package/dist/static/templates/modern.css +1 -0
- package/dist/static/templates/polished.css +1 -0
- package/dist/static/templates/portrait.css +1 -0
- package/dist/static/templates/prism.css +1 -0
- package/dist/static/templates/scholar.css +1 -0
- package/dist/static/templates/split.css +1 -0
- package/dist/static/templates/stylish.css +1 -0
- package/dist/static/templates/timeline.css +1 -0
- package/dist/static/templates.css +1 -0
- package/dist/templates/academic/AcademicDocument.d.ts +6 -0
- package/dist/templates/academic/AcademicDocument.d.ts.map +1 -0
- package/dist/templates/academic/AcademicDocument.js +29 -0
- package/dist/templates/academic/academic.css +284 -0
- package/dist/templates/academic/entries.d.ts +22 -0
- package/dist/templates/academic/entries.d.ts.map +1 -0
- package/dist/templates/academic/entries.js +17 -0
- package/dist/templates/alta/AltaDocument.d.ts +6 -0
- package/dist/templates/alta/AltaDocument.d.ts.map +1 -0
- package/dist/templates/alta/AltaDocument.js +29 -0
- package/dist/templates/alta/alta.css +413 -0
- package/dist/templates/alta/entries.d.ts +22 -0
- package/dist/templates/alta/entries.d.ts.map +1 -0
- package/dist/templates/alta/entries.js +17 -0
- package/dist/templates/classic/ClassicDocument.d.ts +6 -0
- package/dist/templates/classic/ClassicDocument.d.ts.map +1 -0
- package/dist/templates/classic/ClassicDocument.js +26 -0
- package/dist/templates/classic/classic.css +251 -0
- package/dist/templates/classic/entries.d.ts +22 -0
- package/dist/templates/classic/entries.d.ts.map +1 -0
- package/dist/templates/classic/entries.js +17 -0
- package/dist/templates/cobalt/CobaltDocument.d.ts +6 -0
- package/dist/templates/cobalt/CobaltDocument.d.ts.map +1 -0
- package/dist/templates/cobalt/CobaltDocument.js +28 -0
- package/dist/templates/cobalt/cobalt.css +478 -0
- package/dist/templates/cobalt/crest.d.ts +6 -0
- package/dist/templates/cobalt/crest.d.ts.map +1 -0
- package/dist/templates/cobalt/crest.js +8 -0
- package/dist/templates/cobalt/entries.d.ts +22 -0
- package/dist/templates/cobalt/entries.d.ts.map +1 -0
- package/dist/templates/cobalt/entries.js +17 -0
- package/dist/templates/compact/CompactDocument.d.ts +6 -0
- package/dist/templates/compact/CompactDocument.d.ts.map +1 -0
- package/dist/templates/compact/CompactDocument.js +28 -0
- package/dist/templates/compact/compact.css +240 -0
- package/dist/templates/compact/entries.d.ts +22 -0
- package/dist/templates/compact/entries.d.ts.map +1 -0
- package/dist/templates/compact/entries.js +17 -0
- package/dist/templates/contemporary/ContemporaryDocument.d.ts +6 -0
- package/dist/templates/contemporary/ContemporaryDocument.d.ts.map +1 -0
- package/dist/templates/contemporary/ContemporaryDocument.js +29 -0
- package/dist/templates/contemporary/contemporary.css +411 -0
- package/dist/templates/contemporary/entries.d.ts +22 -0
- package/dist/templates/contemporary/entries.d.ts.map +1 -0
- package/dist/templates/contemporary/entries.js +17 -0
- package/dist/templates/creative/CreativeDocument.d.ts +6 -0
- package/dist/templates/creative/CreativeDocument.d.ts.map +1 -0
- package/dist/templates/creative/CreativeDocument.js +29 -0
- package/dist/templates/creative/creative.css +326 -0
- package/dist/templates/creative/entries.d.ts +22 -0
- package/dist/templates/creative/entries.d.ts.map +1 -0
- package/dist/templates/creative/entries.js +17 -0
- package/dist/templates/crimson/CrimsonDocument.d.ts +6 -0
- package/dist/templates/crimson/CrimsonDocument.d.ts.map +1 -0
- package/dist/templates/crimson/CrimsonDocument.js +30 -0
- package/dist/templates/crimson/crimson.css +301 -0
- package/dist/templates/crimson/entries.d.ts +22 -0
- package/dist/templates/crimson/entries.d.ts.map +1 -0
- package/dist/templates/crimson/entries.js +17 -0
- package/dist/templates/curve/CurveDocument.d.ts +6 -0
- package/dist/templates/curve/CurveDocument.d.ts.map +1 -0
- package/dist/templates/curve/CurveDocument.js +29 -0
- package/dist/templates/curve/curve.css +330 -0
- package/dist/templates/curve/entries.d.ts +22 -0
- package/dist/templates/curve/entries.d.ts.map +1 -0
- package/dist/templates/curve/entries.js +17 -0
- package/dist/templates/double-column/DoubleColumnDocument.d.ts +6 -0
- package/dist/templates/double-column/DoubleColumnDocument.d.ts.map +1 -0
- package/dist/templates/double-column/DoubleColumnDocument.js +29 -0
- package/dist/templates/double-column/double-column.css +331 -0
- package/dist/templates/double-column/entries.d.ts +22 -0
- package/dist/templates/double-column/entries.d.ts.map +1 -0
- package/dist/templates/double-column/entries.js +17 -0
- package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts +6 -0
- package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts.map +1 -0
- package/dist/templates/double-column-logos/DoubleColumnLogosDocument.js +28 -0
- package/dist/templates/double-column-logos/double-column-logos.css +333 -0
- package/dist/templates/double-column-logos/entries.d.ts +22 -0
- package/dist/templates/double-column-logos/entries.d.ts.map +1 -0
- package/dist/templates/double-column-logos/entries.js +18 -0
- package/dist/templates/elegant/ElegantDocument.d.ts +6 -0
- package/dist/templates/elegant/ElegantDocument.d.ts.map +1 -0
- package/dist/templates/elegant/ElegantDocument.js +31 -0
- package/dist/templates/elegant/elegant.css +358 -0
- package/dist/templates/elegant/entries.d.ts +22 -0
- package/dist/templates/elegant/entries.d.ts.map +1 -0
- package/dist/templates/elegant/entries.js +17 -0
- package/dist/templates/elegant-logos/ElegantLogosDocument.d.ts +6 -0
- package/dist/templates/elegant-logos/ElegantLogosDocument.d.ts.map +1 -0
- package/dist/templates/elegant-logos/ElegantLogosDocument.js +30 -0
- package/dist/templates/elegant-logos/elegant-logos.css +370 -0
- package/dist/templates/elegant-logos/entries.d.ts +22 -0
- package/dist/templates/elegant-logos/entries.d.ts.map +1 -0
- package/dist/templates/elegant-logos/entries.js +18 -0
- package/dist/templates/engineer/EngineerDocument.d.ts +6 -0
- package/dist/templates/engineer/EngineerDocument.d.ts.map +1 -0
- package/dist/templates/engineer/EngineerDocument.js +26 -0
- package/dist/templates/engineer/engineer.css +261 -0
- package/dist/templates/engineer/entries.d.ts +22 -0
- package/dist/templates/engineer/entries.d.ts.map +1 -0
- package/dist/templates/engineer/entries.js +17 -0
- package/dist/templates/executive/ExecutiveDocument.d.ts +6 -0
- package/dist/templates/executive/ExecutiveDocument.d.ts.map +1 -0
- package/dist/templates/executive/ExecutiveDocument.js +29 -0
- package/dist/templates/executive/entries.d.ts +22 -0
- package/dist/templates/executive/entries.d.ts.map +1 -0
- package/dist/templates/executive/entries.js +17 -0
- package/dist/templates/executive/executive.css +394 -0
- package/dist/templates/harvard/HarvardDocument.d.ts +6 -0
- package/dist/templates/harvard/HarvardDocument.d.ts.map +1 -0
- package/dist/templates/harvard/HarvardDocument.js +25 -0
- package/dist/templates/harvard/entries.d.ts +28 -0
- package/dist/templates/harvard/entries.d.ts.map +1 -0
- package/dist/templates/harvard/entries.js +22 -0
- package/dist/templates/harvard/harvard.css +436 -0
- package/dist/templates/hipster/HipsterDocument.d.ts +6 -0
- package/dist/templates/hipster/HipsterDocument.d.ts.map +1 -0
- package/dist/templates/hipster/HipsterDocument.js +30 -0
- package/dist/templates/hipster/entries.d.ts +22 -0
- package/dist/templates/hipster/entries.d.ts.map +1 -0
- package/dist/templates/hipster/entries.js +17 -0
- package/dist/templates/hipster/hipster.css +442 -0
- package/dist/templates/ivy/IvyDocument.d.ts +6 -0
- package/dist/templates/ivy/IvyDocument.d.ts.map +1 -0
- package/dist/templates/ivy/IvyDocument.js +26 -0
- package/dist/templates/ivy/entries.d.ts +22 -0
- package/dist/templates/ivy/entries.d.ts.map +1 -0
- package/dist/templates/ivy/entries.js +17 -0
- package/dist/templates/ivy/ivy.css +292 -0
- package/dist/templates/meridian/MeridianDocument.d.ts +6 -0
- package/dist/templates/meridian/MeridianDocument.d.ts.map +1 -0
- package/dist/templates/meridian/MeridianDocument.js +28 -0
- package/dist/templates/meridian/entries.d.ts +22 -0
- package/dist/templates/meridian/entries.d.ts.map +1 -0
- package/dist/templates/meridian/entries.js +17 -0
- package/dist/templates/meridian/meridian.css +431 -0
- package/dist/templates/modern/ModernDocument.d.ts +6 -0
- package/dist/templates/modern/ModernDocument.d.ts.map +1 -0
- package/dist/templates/modern/ModernDocument.js +29 -0
- package/dist/templates/modern/entries.d.ts +22 -0
- package/dist/templates/modern/entries.d.ts.map +1 -0
- package/dist/templates/modern/entries.js +17 -0
- package/dist/templates/modern/modern.css +309 -0
- package/dist/templates/polished/PolishedDocument.d.ts +6 -0
- package/dist/templates/polished/PolishedDocument.d.ts.map +1 -0
- package/dist/templates/polished/PolishedDocument.js +28 -0
- package/dist/templates/polished/entries.d.ts +22 -0
- package/dist/templates/polished/entries.d.ts.map +1 -0
- package/dist/templates/polished/entries.js +17 -0
- package/dist/templates/polished/polished.css +327 -0
- package/dist/templates/portrait/PortraitDocument.d.ts +6 -0
- package/dist/templates/portrait/PortraitDocument.d.ts.map +1 -0
- package/dist/templates/portrait/PortraitDocument.js +30 -0
- package/dist/templates/portrait/entries.d.ts +22 -0
- package/dist/templates/portrait/entries.d.ts.map +1 -0
- package/dist/templates/portrait/entries.js +17 -0
- package/dist/templates/portrait/portrait.css +427 -0
- package/dist/templates/prism/PrismDocument.d.ts +6 -0
- package/dist/templates/prism/PrismDocument.d.ts.map +1 -0
- package/dist/templates/prism/PrismDocument.js +35 -0
- package/dist/templates/prism/entries.d.ts +22 -0
- package/dist/templates/prism/entries.d.ts.map +1 -0
- package/dist/templates/prism/entries.js +17 -0
- package/dist/templates/prism/prism.css +314 -0
- package/dist/templates/scholar/ScholarDocument.d.ts +6 -0
- package/dist/templates/scholar/ScholarDocument.d.ts.map +1 -0
- package/dist/templates/scholar/ScholarDocument.js +27 -0
- package/dist/templates/scholar/entries.d.ts +22 -0
- package/dist/templates/scholar/entries.d.ts.map +1 -0
- package/dist/templates/scholar/entries.js +17 -0
- package/dist/templates/scholar/scholar.css +279 -0
- package/dist/templates/skills.d.ts +19 -0
- package/dist/templates/skills.d.ts.map +1 -0
- package/dist/templates/skills.js +19 -0
- package/dist/templates/split/SplitDocument.d.ts +6 -0
- package/dist/templates/split/SplitDocument.d.ts.map +1 -0
- package/dist/templates/split/SplitDocument.js +29 -0
- package/dist/templates/split/entries.d.ts +22 -0
- package/dist/templates/split/entries.d.ts.map +1 -0
- package/dist/templates/split/entries.js +17 -0
- package/dist/templates/split/split.css +337 -0
- package/dist/templates/stylish/StylishDocument.d.ts +6 -0
- package/dist/templates/stylish/StylishDocument.d.ts.map +1 -0
- package/dist/templates/stylish/StylishDocument.js +29 -0
- package/dist/templates/stylish/entries.d.ts +22 -0
- package/dist/templates/stylish/entries.d.ts.map +1 -0
- package/dist/templates/stylish/entries.js +17 -0
- package/dist/templates/stylish/stylish.css +340 -0
- package/dist/templates/timeline/TimelineDocument.d.ts +6 -0
- package/dist/templates/timeline/TimelineDocument.d.ts.map +1 -0
- package/dist/templates/timeline/TimelineDocument.js +27 -0
- package/dist/templates/timeline/entries.d.ts +22 -0
- package/dist/templates/timeline/entries.d.ts.map +1 -0
- package/dist/templates/timeline/entries.js +17 -0
- package/dist/templates/timeline/timeline.css +295 -0
- package/dist/useFitZoom.d.ts +99 -0
- package/dist/useFitZoom.d.ts.map +1 -0
- package/dist/useFitZoom.js +171 -0
- package/package.json +81 -3
- package/src/PagedSheet.tsx +792 -0
- package/src/TemplateDocument.tsx +112 -0
- package/src/autosave-context.tsx +67 -0
- package/src/collections/AuthoredItems.tsx +199 -0
- package/src/collections/Collection.tsx +73 -0
- package/src/collections/CollectionItems.tsx +318 -0
- package/src/collections/EntryOverlay.tsx +162 -0
- package/src/collections/SortableItems.tsx +167 -0
- package/src/collections/authoring-context.tsx +140 -0
- package/src/collections/entry-text.ts +41 -0
- package/src/collections/icons.tsx +83 -0
- package/src/collections/library/LibraryAction.tsx +200 -0
- package/src/collections/library/LibraryPicker.tsx +325 -0
- package/src/collections/overlay-context.tsx +49 -0
- package/src/collections/preload.ts +23 -0
- package/src/collections/selection-context.tsx +88 -0
- package/src/collections/useCollection.ts +133 -0
- package/src/collections/useCustomEntries.ts +84 -0
- package/src/collections/useSectionCollection.ts +268 -0
- package/src/compiler/emit.ts +736 -0
- package/src/compiler/schema.ts +689 -0
- package/src/export/entry.tsx +177 -0
- package/src/fields/date-issues-context.tsx +105 -0
- package/src/fields/field-registry.tsx +358 -0
- package/src/i18n/catalog.ts +81 -0
- package/src/i18n/format.ts +50 -0
- package/src/i18n/index.ts +21 -0
- package/src/i18n/locale-context.tsx +135 -0
- package/src/index.ts +156 -0
- package/src/kit/BulletSkillGroup.tsx +37 -0
- package/src/kit/DescribedEntries.tsx +132 -0
- package/src/kit/DocumentSection.tsx +97 -0
- package/src/kit/GridSkillGroup.tsx +17 -0
- package/src/kit/Heading.tsx +17 -0
- package/src/kit/InitialsAvatar.tsx +31 -0
- package/src/kit/InitialsChip.tsx +29 -0
- package/src/kit/InlineSkillGroup.tsx +41 -0
- package/src/kit/LabelledSkillGroup.tsx +68 -0
- package/src/kit/LanguageList.tsx +148 -0
- package/src/kit/Separator.tsx +30 -0
- package/src/kit/TagSkillGroup.tsx +19 -0
- package/src/kit/contact.ts +34 -0
- package/src/kit/documentStyle.ts +80 -0
- package/src/kit/monogram.ts +11 -0
- package/src/kit/textShapes.tsx +61 -0
- package/src/letter/LetterDocument.tsx +33 -0
- package/src/nodes/AuthoredBullets.tsx +253 -0
- package/src/nodes/CustomSections.tsx +138 -0
- package/src/nodes/EditableBulletList.tsx +186 -0
- package/src/nodes/EditableInlineList.tsx +109 -0
- package/src/nodes/EditableText.tsx +261 -0
- package/src/nodes/LinkField.tsx +438 -0
- package/src/nodes/PlainTextField.tsx +132 -0
- package/src/nodes/formatting.ts +70 -0
- package/src/nodes/locked.ts +70 -0
- package/src/pagination.ts +238 -0
- package/src/picture-context.tsx +18 -0
- package/src/presentation-context.tsx +87 -0
- package/src/presented.ts +29 -0
- package/src/rail/ContainerRail.tsx +145 -0
- package/src/rail/EntryActions.tsx +104 -0
- package/src/rail/rail-store.tsx +126 -0
- package/src/rail/useSpaceDrag.ts +177 -0
- package/src/registry.ts +101 -0
- package/src/spacing/spacing-context.tsx +100 -0
- package/src/spacing/useSpaceSlot.tsx +97 -0
- package/src/static/api.ts +19 -0
- package/src/static/fixtures.ts +80 -0
- package/src/static/render.tsx +24 -0
- package/src/templates/academic/AcademicDocument.tsx +259 -0
- package/src/templates/academic/entries.tsx +176 -0
- package/src/templates/alta/AltaDocument.tsx +269 -0
- package/src/templates/alta/entries.tsx +167 -0
- package/src/templates/classic/ClassicDocument.tsx +252 -0
- package/src/templates/classic/entries.tsx +175 -0
- package/src/templates/cobalt/CobaltDocument.tsx +306 -0
- package/src/templates/cobalt/crest.tsx +31 -0
- package/src/templates/cobalt/entries.tsx +136 -0
- package/src/templates/compact/CompactDocument.tsx +260 -0
- package/src/templates/compact/entries.tsx +167 -0
- package/src/templates/contemporary/ContemporaryDocument.tsx +291 -0
- package/src/templates/contemporary/entries.tsx +167 -0
- package/src/templates/creative/CreativeDocument.tsx +273 -0
- package/src/templates/creative/entries.tsx +167 -0
- package/src/templates/crimson/CrimsonDocument.tsx +287 -0
- package/src/templates/crimson/entries.tsx +169 -0
- package/src/templates/curve/CurveDocument.tsx +263 -0
- package/src/templates/curve/entries.tsx +168 -0
- package/src/templates/double-column/DoubleColumnDocument.tsx +273 -0
- package/src/templates/double-column/entries.tsx +169 -0
- package/src/templates/double-column-logos/DoubleColumnLogosDocument.tsx +266 -0
- package/src/templates/double-column-logos/entries.tsx +172 -0
- package/src/templates/elegant/ElegantDocument.tsx +301 -0
- package/src/templates/elegant/entries.tsx +167 -0
- package/src/templates/elegant-logos/ElegantLogosDocument.tsx +295 -0
- package/src/templates/elegant-logos/entries.tsx +170 -0
- package/src/templates/engineer/EngineerDocument.tsx +252 -0
- package/src/templates/engineer/entries.tsx +170 -0
- package/src/templates/executive/ExecutiveDocument.tsx +316 -0
- package/src/templates/executive/entries.tsx +146 -0
- package/src/templates/harvard/HarvardDocument.tsx +252 -0
- package/src/templates/harvard/entries.tsx +205 -0
- package/src/templates/hipster/HipsterDocument.tsx +293 -0
- package/src/templates/hipster/entries.tsx +175 -0
- package/src/templates/ivy/IvyDocument.tsx +252 -0
- package/src/templates/ivy/entries.tsx +167 -0
- package/src/templates/meridian/MeridianDocument.tsx +308 -0
- package/src/templates/meridian/entries.tsx +140 -0
- package/src/templates/modern/ModernDocument.tsx +269 -0
- package/src/templates/modern/entries.tsx +167 -0
- package/src/templates/polished/PolishedDocument.tsx +266 -0
- package/src/templates/polished/entries.tsx +167 -0
- package/src/templates/portrait/PortraitDocument.tsx +282 -0
- package/src/templates/portrait/entries.tsx +173 -0
- package/src/templates/prism/PrismDocument.tsx +311 -0
- package/src/templates/prism/entries.tsx +175 -0
- package/src/templates/scholar/ScholarDocument.tsx +270 -0
- package/src/templates/scholar/entries.tsx +169 -0
- package/src/templates/skills.ts +21 -0
- package/src/templates/split/SplitDocument.tsx +297 -0
- package/src/templates/split/entries.tsx +164 -0
- package/src/templates/stylish/StylishDocument.tsx +269 -0
- package/src/templates/stylish/entries.tsx +167 -0
- package/src/templates/timeline/TimelineDocument.tsx +255 -0
- package/src/templates/timeline/entries.tsx +173 -0
- package/src/useFitZoom.ts +185 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useEditorText } from '../i18n/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* What an entry's actions are called, in the editor's language.
|
|
5
|
+
*
|
|
6
|
+
* One place for the compact toolbar and the rail, which offer the same
|
|
7
|
+
* operations and must name them the same way. The noun is `COLLECTIONS`' stable
|
|
8
|
+
* word; the catalog gives its forms, so "Move this role up" and "Subir esta
|
|
9
|
+
* viñeta" are each one sentence with the noun placed, not assembled.
|
|
10
|
+
*/
|
|
11
|
+
export function useEntryText(noun, index, origin) {
|
|
12
|
+
const text = useEditorText();
|
|
13
|
+
return useMemo(() => {
|
|
14
|
+
const { t, format } = text;
|
|
15
|
+
const params = { ...text.noun(noun), position: index + 1 };
|
|
16
|
+
const added = origin === 'added';
|
|
17
|
+
return {
|
|
18
|
+
drag: format(t.entry.drag, params),
|
|
19
|
+
moveUp: format(t.entry.moveUp, params),
|
|
20
|
+
moveUpLabel: format(t.entry.moveUpLabel, params),
|
|
21
|
+
moveDown: format(t.entry.moveDown, params),
|
|
22
|
+
moveDownLabel: format(t.entry.moveDownLabel, params),
|
|
23
|
+
addBelow: format(t.entry.addBelow, params),
|
|
24
|
+
addAfterLabel: format(t.entry.addAfterLabel, params),
|
|
25
|
+
/* Removing an addition deletes it; "removing" a written entry hides it. */
|
|
26
|
+
remove: format(added ? t.entry.remove : t.entry.hide, params),
|
|
27
|
+
removeLabel: format(added ? t.entry.removeLabel : t.entry.hideLabel, params),
|
|
28
|
+
};
|
|
29
|
+
}, [text, noun, index, origin]);
|
|
30
|
+
}
|
|
31
|
+
/** "role 2": how the rail and the space handle name one entry. */
|
|
32
|
+
export function useItemName(noun, index) {
|
|
33
|
+
const { t, format, noun: forms } = useEditorText();
|
|
34
|
+
return format(t.entry.item, { ...forms(noun), position: index + 1 });
|
|
35
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The editing controls' glyphs, drawn rather than typed.
|
|
3
|
+
*
|
|
4
|
+
* `+`, `↑` and `↓` are typographic characters: they inherit a text font's
|
|
5
|
+
* weight and terminals, so at 11px they come out thin, sharp, and slightly
|
|
6
|
+
* different in every browser — and on a résumé they read as something somebody
|
|
7
|
+
* left in the document. Two strokes with round caps are the same shape
|
|
8
|
+
* everywhere, sit on the pixel grid, and read as a control.
|
|
9
|
+
*
|
|
10
|
+
* Shared, because the same action must not be drawn two ways: adding a bullet
|
|
11
|
+
* and adding a role are one idea, and their controls sit a line apart.
|
|
12
|
+
*
|
|
13
|
+
* Every one is `aria-hidden`. The button around it carries the label — the icon
|
|
14
|
+
* is how the action looks, never how it is named.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PlusIcon: () => import("react").JSX.Element;
|
|
17
|
+
export declare const ArrowUpIcon: () => import("react").JSX.Element;
|
|
18
|
+
export declare const ArrowDownIcon: () => import("react").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Removal, drawn as the bin rather than as a dismissal.
|
|
21
|
+
*
|
|
22
|
+
* An `×` is the glyph for closing something, not for discarding it, and sitting
|
|
23
|
+
* a few pixels from the `+` it reads as that plus's undo — the pair saying
|
|
24
|
+
* "added / not added" about a control that in fact throws away a line the
|
|
25
|
+
* candidate wrote. A bin names the destination, and names it before the button
|
|
26
|
+
* is aimed at: the red only arrives on hover, so until then the shape is the
|
|
27
|
+
* whole warning.
|
|
28
|
+
*
|
|
29
|
+
* Silhouette only — lid, handle, can — with no ribs inside the body. At 13px a
|
|
30
|
+
* pair of hairlines in there closes up into a smudge, and what survives the
|
|
31
|
+
* size is the outline.
|
|
32
|
+
*/
|
|
33
|
+
export declare const TrashIcon: () => import("react").JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* The drag handle — dots, and the reason it is drawn is the reason it moved.
|
|
36
|
+
*
|
|
37
|
+
* It used to be `⠿` (U+283F), and a braille cell is the one character here that
|
|
38
|
+
* could not be centred by centring its box: the cell reserves room at the
|
|
39
|
+
* bottom for dots 7 and 8, and no system font ships it — it comes from whatever
|
|
40
|
+
* fallback the platform picks, with its own advance width and its own side
|
|
41
|
+
* bearings. The dots therefore sat high and left of the middle of a glyph that
|
|
42
|
+
* was itself sitting in the middle of the gutter, and the handle read as offset
|
|
43
|
+
* from the `•` it stands in for.
|
|
44
|
+
*
|
|
45
|
+
* Six dots on a symmetric grid have no such opinion: the drawing is centred on
|
|
46
|
+
* the viewBox, so the box's centre and the ink's centre are the same point, in
|
|
47
|
+
* every browser.
|
|
48
|
+
*
|
|
49
|
+
* Filled rather than stroked — dots are the shape, not an outline of it — so
|
|
50
|
+
* this one sets its own `fill` instead of taking the stroke the other glyphs do.
|
|
51
|
+
*/
|
|
52
|
+
export declare const GripIcon: () => import("react").JSX.Element;
|
|
53
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/collections/icons.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,mCAAkD,CAAC;AAC3E,eAAO,MAAM,aAAa,mCAAkD,CAAC;AAE7E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,mCAErB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,mCAkBpB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The editing controls' glyphs, drawn rather than typed.
|
|
4
|
+
*
|
|
5
|
+
* `+`, `↑` and `↓` are typographic characters: they inherit a text font's
|
|
6
|
+
* weight and terminals, so at 11px they come out thin, sharp, and slightly
|
|
7
|
+
* different in every browser — and on a résumé they read as something somebody
|
|
8
|
+
* left in the document. Two strokes with round caps are the same shape
|
|
9
|
+
* everywhere, sit on the pixel grid, and read as a control.
|
|
10
|
+
*
|
|
11
|
+
* Shared, because the same action must not be drawn two ways: adding a bullet
|
|
12
|
+
* and adding a role are one idea, and their controls sit a line apart.
|
|
13
|
+
*
|
|
14
|
+
* Every one is `aria-hidden`. The button around it carries the label — the icon
|
|
15
|
+
* is how the action looks, never how it is named.
|
|
16
|
+
*/
|
|
17
|
+
function Glyph({ d }) {
|
|
18
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: d }) }));
|
|
19
|
+
}
|
|
20
|
+
export const PlusIcon = () => _jsx(Glyph, { d: "M8 4v8M4 8h8" });
|
|
21
|
+
export const ArrowUpIcon = () => _jsx(Glyph, { d: "M8 12V4M4.5 7.5L8 4l3.5 3.5" });
|
|
22
|
+
export const ArrowDownIcon = () => _jsx(Glyph, { d: "M8 4v8M4.5 8.5L8 12l3.5-3.5" });
|
|
23
|
+
/**
|
|
24
|
+
* Removal, drawn as the bin rather than as a dismissal.
|
|
25
|
+
*
|
|
26
|
+
* An `×` is the glyph for closing something, not for discarding it, and sitting
|
|
27
|
+
* a few pixels from the `+` it reads as that plus's undo — the pair saying
|
|
28
|
+
* "added / not added" about a control that in fact throws away a line the
|
|
29
|
+
* candidate wrote. A bin names the destination, and names it before the button
|
|
30
|
+
* is aimed at: the red only arrives on hover, so until then the shape is the
|
|
31
|
+
* whole warning.
|
|
32
|
+
*
|
|
33
|
+
* Silhouette only — lid, handle, can — with no ribs inside the body. At 13px a
|
|
34
|
+
* pair of hairlines in there closes up into a smudge, and what survives the
|
|
35
|
+
* size is the outline.
|
|
36
|
+
*/
|
|
37
|
+
export const TrashIcon = () => (_jsx(Glyph, { d: "M3.25 4.5h9.5M6.25 4.5V3.25h3.5V4.5M4.75 4.5v7a1.25 1.25 0 0 0 1.25 1.25h4a1.25 1.25 0 0 0 1.25-1.25v-7" }));
|
|
38
|
+
/**
|
|
39
|
+
* The drag handle — dots, and the reason it is drawn is the reason it moved.
|
|
40
|
+
*
|
|
41
|
+
* It used to be `⠿` (U+283F), and a braille cell is the one character here that
|
|
42
|
+
* could not be centred by centring its box: the cell reserves room at the
|
|
43
|
+
* bottom for dots 7 and 8, and no system font ships it — it comes from whatever
|
|
44
|
+
* fallback the platform picks, with its own advance width and its own side
|
|
45
|
+
* bearings. The dots therefore sat high and left of the middle of a glyph that
|
|
46
|
+
* was itself sitting in the middle of the gutter, and the handle read as offset
|
|
47
|
+
* from the `•` it stands in for.
|
|
48
|
+
*
|
|
49
|
+
* Six dots on a symmetric grid have no such opinion: the drawing is centred on
|
|
50
|
+
* the viewBox, so the box's centre and the ink's centre are the same point, in
|
|
51
|
+
* every browser.
|
|
52
|
+
*
|
|
53
|
+
* Filled rather than stroked — dots are the shape, not an outline of it — so
|
|
54
|
+
* this one sets its own `fill` instead of taking the stroke the other glyphs do.
|
|
55
|
+
*/
|
|
56
|
+
export const GripIcon = () => (_jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: [5.25, 10.75].map((cx) => [3.25, 8, 12.75].map((cy) => (_jsx("circle", { cx: cx, cy: cy, r: "1.75" }, `${cx}:${cy}`)))) }));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CollectionHandle } from '../useCollection.js';
|
|
2
|
+
/**
|
|
3
|
+
* "Add from career profile" on an entry.
|
|
4
|
+
*
|
|
5
|
+
* On a role it offers two things at once — the bullets the profile holds for
|
|
6
|
+
* THIS role that the resume left out, and the roles the resume does not carry
|
|
7
|
+
* (each with its bullets, any of which can be left behind). Elsewhere it
|
|
8
|
+
* offers the section's missing entries. Chosen bullets join this role; chosen
|
|
9
|
+
* entries are inserted below it as candidate additions.
|
|
10
|
+
*
|
|
11
|
+
* Shown whenever there is a profile, even with nothing new: a control that
|
|
12
|
+
* comes and goes with the data reads as a missing feature, so the picker says
|
|
13
|
+
* so instead. Absent without a profile (the profile's own editor passes none)
|
|
14
|
+
* and in sections nobody can add to.
|
|
15
|
+
*/
|
|
16
|
+
export declare function LibraryAction<T>({ collection, index, path, noun, className, }: {
|
|
17
|
+
collection: CollectionHandle<T>;
|
|
18
|
+
index: number;
|
|
19
|
+
/** The entry's field path, e.g. `experience.2`. */
|
|
20
|
+
path?: string;
|
|
21
|
+
noun: string;
|
|
22
|
+
className: string;
|
|
23
|
+
}): import("react").JSX.Element | null;
|
|
24
|
+
//# sourceMappingURL=LibraryAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LibraryAction.d.ts","sourceRoot":"","sources":["../../../src/collections/library/LibraryAction.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAsB5D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAC/B,UAAU,EACV,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,GACV,EAAE;IACD,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,sCA2IA"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
|
+
import { APPENDABLE_SECTIONS, COLLECTIONS, describeLibraryEntry, experienceOffer, libraryCandidates, } from '@resumekit/schema';
|
|
4
|
+
import { useAuthoring } from '../authoring-context.js';
|
|
5
|
+
import { useFieldRegistry, useFieldValue, } from '../../fields/field-registry.js';
|
|
6
|
+
import { useAutosave } from '../../autosave-context.js';
|
|
7
|
+
import { useEditorText } from '../../i18n/index.js';
|
|
8
|
+
import { LibraryPicker, } from './LibraryPicker.js';
|
|
9
|
+
const LibraryIcon = () => (_jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "M8 2.5v6.5M5.5 6.5 8 9l2.5-2.5M3 9.5v3h10v-3" }) }));
|
|
10
|
+
const MORE = 'more-of-this-role';
|
|
11
|
+
const OTHERS = 'other-entries';
|
|
12
|
+
/**
|
|
13
|
+
* "Add from career profile" on an entry.
|
|
14
|
+
*
|
|
15
|
+
* On a role it offers two things at once — the bullets the profile holds for
|
|
16
|
+
* THIS role that the resume left out, and the roles the resume does not carry
|
|
17
|
+
* (each with its bullets, any of which can be left behind). Elsewhere it
|
|
18
|
+
* offers the section's missing entries. Chosen bullets join this role; chosen
|
|
19
|
+
* entries are inserted below it as candidate additions.
|
|
20
|
+
*
|
|
21
|
+
* Shown whenever there is a profile, even with nothing new: a control that
|
|
22
|
+
* comes and goes with the data reads as a missing feature, so the picker says
|
|
23
|
+
* so instead. Absent without a profile (the profile's own editor passes none)
|
|
24
|
+
* and in sections nobody can add to.
|
|
25
|
+
*/
|
|
26
|
+
export function LibraryAction({ collection, index, path, noun, className, }) {
|
|
27
|
+
const library = useAuthoring()?.library;
|
|
28
|
+
const registry = useFieldRegistry();
|
|
29
|
+
const { saveNow } = useAutosave();
|
|
30
|
+
const [open, setOpen] = useState(false);
|
|
31
|
+
const text = useEditorText();
|
|
32
|
+
const { t, format } = text;
|
|
33
|
+
const section = APPENDABLE_SECTIONS.includes(collection.id)
|
|
34
|
+
? collection.id
|
|
35
|
+
: null;
|
|
36
|
+
const sectionNoun = COLLECTIONS[collection.id].noun ?? noun;
|
|
37
|
+
const nounForms = text.noun(sectionNoun);
|
|
38
|
+
const isRole = section === 'experience';
|
|
39
|
+
/* The role's bullets as they stand now, typed edits included. */
|
|
40
|
+
const bulletsPath = path ? `${path}.bullets` : '';
|
|
41
|
+
const liveBullets = useFieldValue(bulletsPath);
|
|
42
|
+
const item = collection.items[index];
|
|
43
|
+
const offer = useMemo(() => {
|
|
44
|
+
if (!section || !library)
|
|
45
|
+
return null;
|
|
46
|
+
if (!isRole) {
|
|
47
|
+
return {
|
|
48
|
+
bullets: [],
|
|
49
|
+
entries: libraryCandidates(section, collection.items, library),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const { bullets, roles } = experienceOffer({ ...item, bullets: liveBullets ?? item?.bullets ?? [] }, collection.items, library);
|
|
53
|
+
return { bullets, entries: roles };
|
|
54
|
+
}, [section, library, isRole, item, liveBullets, collection.items]);
|
|
55
|
+
if (!section || !collection.canAdd || !library || !offer)
|
|
56
|
+
return null;
|
|
57
|
+
const groups = [
|
|
58
|
+
...(isRole
|
|
59
|
+
? [
|
|
60
|
+
{
|
|
61
|
+
id: MORE,
|
|
62
|
+
heading: t.library.moreHeading,
|
|
63
|
+
hint: t.library.moreHint,
|
|
64
|
+
options: offer.bullets.map((title) => ({ title })),
|
|
65
|
+
},
|
|
66
|
+
]
|
|
67
|
+
: []),
|
|
68
|
+
{
|
|
69
|
+
id: OTHERS,
|
|
70
|
+
heading: isRole ? t.library.othersHeading : undefined,
|
|
71
|
+
hint: isRole ? t.library.othersHint : undefined,
|
|
72
|
+
options: offer.entries.map((entry) => ({
|
|
73
|
+
...describeLibraryEntry(section, entry),
|
|
74
|
+
...(isRole ? { parts: entry.bullets } : {}),
|
|
75
|
+
})),
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
const addLabel = (selection) => {
|
|
79
|
+
const bullets = selection[MORE]?.length ?? 0;
|
|
80
|
+
const entries = selection[OTHERS]?.length ?? 0;
|
|
81
|
+
const counted = [
|
|
82
|
+
bullets > 0 && text.plural(text.noun('bullet').count, bullets),
|
|
83
|
+
entries > 0 && text.plural(nounForms.count, entries),
|
|
84
|
+
].filter((part) => Boolean(part));
|
|
85
|
+
return format(t.library.addSelection, { items: text.list(counted) });
|
|
86
|
+
};
|
|
87
|
+
const add = (selection) => {
|
|
88
|
+
const bullets = (selection[MORE] ?? []).map(({ index: i }) => offer.bullets[i]);
|
|
89
|
+
if (bullets.length > 0 && registry && bulletsPath) {
|
|
90
|
+
registry.write(bulletsPath, [
|
|
91
|
+
...(liveBullets ?? item?.bullets ?? []),
|
|
92
|
+
...bullets,
|
|
93
|
+
]);
|
|
94
|
+
saveNow();
|
|
95
|
+
}
|
|
96
|
+
const entries = (selection[OTHERS] ?? []).map(({ index: i, parts }) => {
|
|
97
|
+
const entry = offer.entries[i];
|
|
98
|
+
if (!isRole)
|
|
99
|
+
return entry;
|
|
100
|
+
const role = entry;
|
|
101
|
+
return {
|
|
102
|
+
...role,
|
|
103
|
+
bullets: parts.map((p) => role.bullets[p]),
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
if (entries.length > 0)
|
|
107
|
+
collection.addMany(index, entries);
|
|
108
|
+
setOpen(false);
|
|
109
|
+
};
|
|
110
|
+
return (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: className, title: t.library.action, "aria-label": format(t.library.actionLabel, text.noun(noun)), "aria-haspopup": "dialog", onClick: (e) => {
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
setOpen(true);
|
|
113
|
+
}, children: _jsx(LibraryIcon, {}) }), open && (_jsx(LibraryPicker, { title: isRole
|
|
114
|
+
? t.library.roleTitle
|
|
115
|
+
: format(t.library.sectionTitle, nounForms), subtitle: isRole && item
|
|
116
|
+
? format(t.library.roleSubtitle, {
|
|
117
|
+
role: [item.title, item.company].filter(Boolean).join(' · '),
|
|
118
|
+
})
|
|
119
|
+
: t.library.subtitle, groups: groups, empty: isRole
|
|
120
|
+
? t.library.roleEmpty
|
|
121
|
+
: format(t.library.sectionEmpty, nounForms), addLabel: addLabel, onAdd: add, onClose: () => setOpen(false) }))] }));
|
|
122
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** One thing that can be chosen, with the sub-items that come with it. */
|
|
2
|
+
export interface PickerOption {
|
|
3
|
+
title: string;
|
|
4
|
+
detail?: string;
|
|
5
|
+
/** Chosen with the option and all on by default — a role's bullets. */
|
|
6
|
+
parts?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
/** A titled list of options. A picker with one group draws no heading. */
|
|
9
|
+
export interface PickerGroup {
|
|
10
|
+
id: string;
|
|
11
|
+
heading?: string;
|
|
12
|
+
/** One line under the heading saying what choosing here does. */
|
|
13
|
+
hint?: string;
|
|
14
|
+
options: readonly PickerOption[];
|
|
15
|
+
}
|
|
16
|
+
export interface PickedOption {
|
|
17
|
+
index: number;
|
|
18
|
+
/** Indices of the option's parts that stayed chosen. */
|
|
19
|
+
parts: number[];
|
|
20
|
+
}
|
|
21
|
+
/** What was chosen, per group id, in the order the options are listed. */
|
|
22
|
+
export type PickerSelection = Record<string, PickedOption[]>;
|
|
23
|
+
export interface LibraryPickerProps {
|
|
24
|
+
title: string;
|
|
25
|
+
/** Where this was opened from, and what happens next. */
|
|
26
|
+
subtitle?: string;
|
|
27
|
+
groups: readonly PickerGroup[];
|
|
28
|
+
/** Said when there is nothing to choose. */
|
|
29
|
+
empty: string;
|
|
30
|
+
/** The add button's words for the current selection, e.g. "Add 3 bullets". */
|
|
31
|
+
addLabel: (selection: PickerSelection) => string;
|
|
32
|
+
onAdd: (selection: PickerSelection) => void;
|
|
33
|
+
onClose: () => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A dialog of grouped checklists. Presentational: it knows options, parts and
|
|
37
|
+
* a selection — nothing about resumes — so each caller decides what an option
|
|
38
|
+
* is and what adding means. Portalled out of the page, so it is chrome and is
|
|
39
|
+
* never printed.
|
|
40
|
+
*/
|
|
41
|
+
export declare function LibraryPicker({ title, subtitle, groups, empty, addLabel, onAdd, onClose, }: LibraryPickerProps): import("react").ReactPortal;
|
|
42
|
+
//# sourceMappingURL=LibraryPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LibraryPicker.d.ts","sourceRoot":"","sources":["../../../src/collections/library/LibraryPicker.tsx"],"names":[],"mappings":"AAEA,OAAO,eAAe,CAAC;AAGvB,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,0EAA0E;AAC1E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/B,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,QAAQ,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,MAAM,CAAC;IACjD,KAAK,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAmBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAAO,GACR,EAAE,kBAAkB,+BAyPpB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useRef, useState } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import './library.css';
|
|
5
|
+
import { useEditorText } from '../../i18n/index.js';
|
|
6
|
+
const keyOf = (group, index) => `${group}:${index}`;
|
|
7
|
+
/** The drawn box for a visually hidden checkbox; the input stays the control. */
|
|
8
|
+
function Check({ small = false }) {
|
|
9
|
+
return (_jsx("span", { className: "tpl-library__check", "data-small": small ? '' : undefined, "aria-hidden": "true", children: _jsx("svg", { viewBox: "0 0 16 16", children: _jsx("path", { d: "M3.5 8.5 6.5 11.5 12.5 5" }) }) }));
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A dialog of grouped checklists. Presentational: it knows options, parts and
|
|
13
|
+
* a selection — nothing about resumes — so each caller decides what an option
|
|
14
|
+
* is and what adding means. Portalled out of the page, so it is chrome and is
|
|
15
|
+
* never printed.
|
|
16
|
+
*/
|
|
17
|
+
export function LibraryPicker({ title, subtitle, groups, empty, addLabel, onAdd, onClose, }) {
|
|
18
|
+
const [chosen, setChosen] = useState(new Map());
|
|
19
|
+
const panel = useRef(null);
|
|
20
|
+
const titleId = useId();
|
|
21
|
+
const { t, format, plural } = useEditorText();
|
|
22
|
+
/* Focus the dialog, not its first option: a ring on an item nobody chose
|
|
23
|
+
reads as a selection. Tab reaches the options from here. */
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const previous = document.activeElement;
|
|
26
|
+
panel.current?.focus({ preventScroll: true });
|
|
27
|
+
return () => previous?.focus?.();
|
|
28
|
+
}, []);
|
|
29
|
+
const allParts = (option) => new Set(option?.parts?.map((_, p) => p) ?? []);
|
|
30
|
+
const toggle = (group, index) => setChosen((current) => {
|
|
31
|
+
const next = new Map(current);
|
|
32
|
+
const key = keyOf(group.id, index);
|
|
33
|
+
if (next.has(key))
|
|
34
|
+
next.delete(key);
|
|
35
|
+
else
|
|
36
|
+
next.set(key, allParts(group.options[index]));
|
|
37
|
+
return next;
|
|
38
|
+
});
|
|
39
|
+
const togglePart = (group, index, part) => setChosen((current) => {
|
|
40
|
+
const next = new Map(current);
|
|
41
|
+
const key = keyOf(group.id, index);
|
|
42
|
+
const parts = new Set(next.get(key) ?? []);
|
|
43
|
+
if (parts.has(part))
|
|
44
|
+
parts.delete(part);
|
|
45
|
+
else
|
|
46
|
+
parts.add(part);
|
|
47
|
+
next.set(key, parts);
|
|
48
|
+
return next;
|
|
49
|
+
});
|
|
50
|
+
const allChosen = (group) => group.options.every((_, i) => chosen.has(keyOf(group.id, i)));
|
|
51
|
+
const toggleAll = (group) => setChosen((current) => {
|
|
52
|
+
const next = new Map(current);
|
|
53
|
+
const clear = allChosen(group);
|
|
54
|
+
group.options.forEach((option, i) => {
|
|
55
|
+
const key = keyOf(group.id, i);
|
|
56
|
+
if (clear)
|
|
57
|
+
next.delete(key);
|
|
58
|
+
else if (!next.has(key))
|
|
59
|
+
next.set(key, allParts(option));
|
|
60
|
+
});
|
|
61
|
+
return next;
|
|
62
|
+
});
|
|
63
|
+
const selection = Object.fromEntries(groups.map((group) => [
|
|
64
|
+
group.id,
|
|
65
|
+
group.options.flatMap((_, index) => {
|
|
66
|
+
const parts = chosen.get(keyOf(group.id, index));
|
|
67
|
+
return parts
|
|
68
|
+
? [{ index, parts: [...parts].sort((a, b) => a - b) }]
|
|
69
|
+
: [];
|
|
70
|
+
}),
|
|
71
|
+
]));
|
|
72
|
+
const nothing = groups.every((group) => group.options.length === 0);
|
|
73
|
+
return createPortal(_jsx("div", { className: "tpl-library__scrim", "data-chrome": true, onMouseDown: (e) => {
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
if (e.target === e.currentTarget)
|
|
76
|
+
onClose();
|
|
77
|
+
}, onClick: (e) => e.stopPropagation(), children: _jsxs("div", { ref: panel, className: "tpl-library", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown: (e) => {
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
if (e.key === 'Escape')
|
|
80
|
+
onClose();
|
|
81
|
+
}, children: [_jsxs("header", { className: "tpl-library__head", children: [_jsx("span", { className: "tpl-library__mark", "aria-hidden": "true", children: _jsx("svg", { viewBox: "0 0 16 16", children: _jsx("path", { d: "M8 2.5v6.5M5.5 6.5 8 9l2.5-2.5M3 9.5v3h10v-3" }) }) }), _jsxs("div", { className: "tpl-library__heading", children: [_jsx("h2", { id: titleId, className: "tpl-library__title", children: title }), subtitle && _jsx("p", { className: "tpl-library__subtitle", children: subtitle })] }), _jsx("button", { type: "button", className: "tpl-library__close", "aria-label": t.library.close, onClick: onClose, children: _jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: _jsx("path", { d: "M4 4l8 8M12 4l-8 8" }) }) })] }), nothing ? (_jsxs("div", { className: "tpl-library__empty", children: [_jsx("span", { className: "tpl-library__empty-mark", "aria-hidden": "true", children: _jsx("svg", { viewBox: "0 0 16 16", children: _jsx("path", { d: "M3.5 8.5 6.5 11.5 12.5 5" }) }) }), _jsx("p", { className: "tpl-library__empty-title", children: t.library.allSet }), _jsx("p", { className: "tpl-library__empty-text", children: empty })] })) : (_jsx("div", { className: "tpl-library__body", children: groups
|
|
82
|
+
.filter((group) => group.options.length > 0)
|
|
83
|
+
.map((group) => (_jsxs("section", { className: "tpl-library__group", "aria-label": group.heading ?? title, children: [(group.heading || group.options.length > 1) && (_jsxs("div", { className: "tpl-library__group-head", children: [group.heading && (_jsxs("div", { children: [_jsxs("h3", { className: "tpl-library__group-title", children: [group.heading, _jsx("span", { className: "tpl-library__count", children: group.options.length })] }), group.hint && (_jsx("p", { className: "tpl-library__group-hint", children: group.hint }))] })), group.options.length > 1 && (_jsx("button", { type: "button", className: "tpl-library__all", onClick: () => toggleAll(group), children: allChosen(group)
|
|
84
|
+
? t.library.clear
|
|
85
|
+
: t.library.selectAll }))] })), _jsx("ul", { className: "tpl-library__list", children: group.options.map((option, i) => {
|
|
86
|
+
const parts = chosen.get(keyOf(group.id, i));
|
|
87
|
+
const on = parts !== undefined;
|
|
88
|
+
return (_jsxs("li", { children: [_jsxs("label", { className: "tpl-library__option", "data-on": on ? '' : undefined, children: [_jsx("input", { type: "checkbox", className: "tpl-library__input", checked: on, onChange: () => toggle(group, i) }), _jsx(Check, {}), _jsxs("span", { className: "tpl-library__text", children: [_jsx("span", { className: "tpl-library__name", children: option.title }), option.detail && (_jsx("span", { className: "tpl-library__detail", children: option.detail }))] })] }), on && option.parts && option.parts.length > 0 && (_jsx("ul", { className: "tpl-library__parts", "aria-label": format(t.library.bulletsOf, {
|
|
89
|
+
title: option.title,
|
|
90
|
+
}), children: option.parts.map((part, p) => (_jsx("li", { children: _jsxs("label", { className: "tpl-library__part", children: [_jsx("input", { type: "checkbox", className: "tpl-library__input", checked: parts.has(p), onChange: () => togglePart(group, i, p) }), _jsx(Check, { small: true }), _jsx("span", { children: part })] }) }, p))) }))] }, i));
|
|
91
|
+
}) })] }, group.id))) })), _jsxs("footer", { className: "tpl-library__actions", children: [!nothing && (_jsx("span", { className: "tpl-library__selected", "aria-live": "polite", children: chosen.size === 0
|
|
92
|
+
? t.library.nothingSelected
|
|
93
|
+
: plural(t.library.selected, chosen.size) })), _jsx("button", { type: "button", className: "tpl-library__btn", onClick: onClose, children: nothing ? t.library.done : t.library.cancel }), !nothing && (_jsx("button", { type: "button", className: "tpl-library__btn tpl-library__btn--primary", disabled: chosen.size === 0, onClick: () => onAdd(selection), children: chosen.size === 0 ? t.library.add : addLabel(selection) }))] })] }) }), document.body);
|
|
94
|
+
}
|