@universityofmaryland/web-elements-library 1.6.9 → 1.6.10
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 +5 -0
- package/README.md +1 -1
- package/dist/_types.d.ts +1 -1
- package/dist/atomic/actions/icon.d.ts +1 -1
- package/dist/atomic/actions/text.d.ts +4 -4
- package/dist/atomic/animations/actions/indicator.d.ts +1 -1
- package/dist/atomic/animations/brand/card-stack.d.ts +1 -1
- package/dist/atomic/animations/brand/card-stack.js.map +1 -1
- package/dist/atomic/assets/image/background.d.ts +1 -1
- package/dist/atomic/assets/image/gif.d.ts +1 -1
- package/dist/atomic/assets/image/placeholder.d.ts +1 -1
- package/dist/atomic/assets/video/observed-auto-play.d.ts +1 -1
- package/dist/atomic/assets/video/toggle.d.ts +1 -1
- package/dist/atomic/buttons/fullscreen.d.ts +1 -1
- package/dist/atomic/events/meta.d.ts +1 -1
- package/dist/atomic/events/sign.d.ts +1 -1
- package/dist/atomic/layout/block/stacked.d.ts +3 -3
- package/dist/atomic/layout/person/columns.d.ts +4 -4
- package/dist/atomic/text/stat.d.ts +1 -1
- package/dist/atomic/text-lockup/contact.d.ts +1 -1
- package/dist/atomic/text-lockup/large.d.ts +1 -1
- package/dist/atomic/text-lockup/medium.d.ts +1 -1
- package/dist/atomic/text-lockup/person.d.ts +1 -1
- package/dist/atomic/text-lockup/small-scaling.d.ts +1 -1
- package/dist/atomic/text-lockup/small.d.ts +5 -5
- package/dist/atomic/text-lockup/small.d.ts.map +1 -1
- package/dist/atomic/text-lockup/small.js.map +1 -1
- package/dist/composite/alert/elements/closeButton.d.ts +1 -1
- package/dist/composite/alert/elements/text.d.ts +1 -1
- package/dist/composite/alert/page.d.ts +1 -1
- package/dist/composite/alert/site.d.ts +1 -1
- package/dist/composite/banner/promo.d.ts +1 -1
- package/dist/composite/card/_types.d.ts +9 -0
- package/dist/composite/card/_types.d.ts.map +1 -1
- package/dist/composite/card/block.d.ts +1 -1
- package/dist/composite/card/event-time.d.ts +3 -0
- package/dist/composite/card/event-time.d.ts.map +1 -0
- package/dist/composite/card/event-time.js +238 -0
- package/dist/composite/card/event-time.js.map +1 -0
- package/dist/composite/card/index.d.ts +1 -0
- package/dist/composite/card/index.d.ts.map +1 -1
- package/dist/composite/card/index.js +2 -0
- package/dist/composite/card/index.js.map +1 -1
- package/dist/composite/card/list.d.ts +1 -1
- package/dist/composite/card/overlay/color.d.ts +1 -1
- package/dist/composite/card/overlay/icon.d.ts +1 -1
- package/dist/composite/card/overlay/image.d.ts +1 -1
- package/dist/composite/card/video/block.d.ts +1 -1
- package/dist/composite/card/video/short.d.ts +1 -1
- package/dist/composite/carousel/wide/container.d.ts +1 -1
- package/dist/composite/carousel/wide/controls.d.ts +2 -2
- package/dist/composite/carousel/wide/index.d.ts +1 -1
- package/dist/composite/footer/base.d.ts +1 -1
- package/dist/composite/footer/elements/utility-section/index.d.ts +1 -1
- package/dist/composite/footer/mega.d.ts +1 -1
- package/dist/composite/footer/simple.d.ts +1 -1
- package/dist/composite/footer/visual.d.ts +1 -1
- package/dist/composite/hero/custom/expand.d.ts +1 -1
- package/dist/composite/hero/custom/grid.d.ts +1 -1
- package/dist/composite/hero/custom/video-arrow.d.ts +1 -1
- package/dist/composite/hero/logo.d.ts +1 -1
- package/dist/composite/hero/minimal.d.ts +1 -1
- package/dist/composite/hero/overlay.d.ts +1 -1
- package/dist/composite/hero/stacked.d.ts +1 -1
- package/dist/composite/hero/standard.d.ts +1 -1
- package/dist/composite/layout/section-intro/small.js.map +1 -1
- package/dist/composite/media/elements/gif.d.ts +1 -1
- package/dist/composite/navigation/elements/item/index.js +1 -1
- package/dist/composite/navigation/elements/item/index.js.map +1 -1
- package/dist/composite/pathway/_common.d.ts +4 -4
- package/dist/composite/pathway/hero.d.ts +1 -1
- package/dist/composite/pathway/highlight.d.ts +1 -1
- package/dist/composite/pathway/overlay.d.ts +1 -1
- package/dist/composite/pathway/standard.d.ts +1 -1
- package/dist/composite/pathway/sticky.d.ts +1 -1
- package/dist/composite/quote/_types.d.ts +31 -3
- package/dist/composite/quote/_types.d.ts.map +1 -1
- package/dist/composite/quote/elements/action.d.ts +4 -6
- package/dist/composite/quote/elements/action.d.ts.map +1 -1
- package/dist/composite/quote/elements/action.js +9 -1
- package/dist/composite/quote/elements/action.js.map +1 -1
- package/dist/composite/quote/elements/icon.d.ts +3 -6
- package/dist/composite/quote/elements/icon.d.ts.map +1 -1
- package/dist/composite/quote/elements/icon.js +19 -1
- package/dist/composite/quote/elements/icon.js.map +1 -1
- package/dist/composite/quote/elements/image.d.ts +3 -6
- package/dist/composite/quote/elements/image.d.ts.map +1 -1
- package/dist/composite/quote/elements/image.js +22 -1
- package/dist/composite/quote/elements/image.js.map +1 -1
- package/dist/composite/quote/elements/index.d.ts +2 -0
- package/dist/composite/quote/elements/index.d.ts.map +1 -1
- package/dist/composite/quote/elements/index.js +5 -2
- package/dist/composite/quote/elements/quote.d.ts +3 -8
- package/dist/composite/quote/elements/quote.d.ts.map +1 -1
- package/dist/composite/quote/elements/quote.js +11 -1
- package/dist/composite/quote/elements/quote.js.map +1 -1
- package/dist/composite/quote/elements/text.d.ts +5 -2
- package/dist/composite/quote/elements/text.d.ts.map +1 -1
- package/dist/composite/quote/elements/text.js +52 -1
- package/dist/composite/quote/elements/text.js.map +1 -1
- package/dist/composite/quote/featured.d.ts +1 -1
- package/dist/composite/quote/helper/animation.d.ts +1 -6
- package/dist/composite/quote/helper/animation.d.ts.map +1 -1
- package/dist/composite/quote/helper/animation.js.map +1 -1
- package/dist/composite/quote/index.d.ts +1 -0
- package/dist/composite/quote/index.d.ts.map +1 -1
- package/dist/composite/quote/index.js +3 -1
- package/dist/composite/quote/index.js.map +1 -1
- package/dist/composite/quote/inline.d.ts +1 -1
- package/dist/composite/quote/statement.d.ts +1 -1
- package/dist/composite/quote/statement.d.ts.map +1 -1
- package/dist/composite/quote/statement.js +71 -0
- package/dist/composite/quote/statement.js.map +1 -0
- package/package.json +21 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../source/composite/navigation/elements/item/index.ts"],"sourcesContent":["import * as token from '@universityofmaryland/web-token-library';\nimport * as animation from '@universityofmaryland/web-styles-library/animation';\nimport { jssToCSS } from '@universityofmaryland/web-utilities-library/styles';\nimport { wrapLinkForAnimation } from '@universityofmaryland/web-utilities-library/animation';\nimport { handleKeyboardNavigation } from '@universityofmaryland/web-utilities-library/events';\nimport { chevron_down as iconChevronDown } from '@universityofmaryland/web-icons-library/controls';\n\ntype TypePrimaryLinkRequirements = {\n primaryLinkContainer?: HTMLElement | null;\n context?: HTMLElement;\n};\n\ntype TypeDropdownProps = {\n dropdownLinksContainer?: HTMLElement | null;\n dropdownCalloutsSlot?: HTMLSlotElement | null;\n};\n\ntype TypePrimaryLinkButtonProps = {\n buttonClick: () => void;\n navItemName: string;\n};\n\ntype TypePrimaryLinkProps = TypePrimaryLinkRequirements &\n TypeDropdownProps &\n TypePrimaryLinkButtonProps & {\n hasDropdown: boolean;\n };\n\nexport type TypeNavItemRequirements = TypeDropdownProps &\n TypePrimaryLinkRequirements;\n\ntype TypeNavItem = TypeNavItemRequirements;\n\nconst ELEMENT_NAME = 'umd-element-nav-item';\nconst ATTRIBUTE_DROPDOWN = 'data-dropdown';\nconst ATTRIBUTE_SHOWING = 'data-showing';\nconst ATTRIBUTE_SELECTED = 'data-selected';\n\nconst BOUNDS_SHIFT = 140;\nconst MAX_COLUMN_ITEMS = 8;\n\nconst ELEMENT_NAV_ITEM_CONTAINER = `nav-item-container`;\nconst ELEMENT_PRIMARY_LINK_CONTAINER = 'nav-item-primary-link-container';\nconst ELEMENT_PRIMARLY_LINK_WRAPPER = `nav-item-primary-link-wrapper`;\nconst ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON = `nav-item-primary-link-button`;\n\nconst ELEMENT_DROPDOWN_CONTAINER = `nav-item-dropdown-container`;\nconst ELEMENT_DROPDOWN_LIST_CONTAINER = 'nav-item-dropdown-list';\nconst ELEMENT_DROPDOWN_MULTIPLE_COLUMN = 'nav-item-dropdown-multiple-column';\nconst ELEMENT_DROPDOWN_CTA_COLUMN = 'nav-item-dropdown-cta-column';\n\nconst IS_SELECTED = `[${ATTRIBUTE_SELECTED}]`;\nconst IS_SHOWING = `[${ATTRIBUTE_SHOWING}]`;\nconst IS_DROPDOWN = `[${ATTRIBUTE_DROPDOWN}]`;\n\nconst OVERWRITE_DROPDOWN_CONTAINER = `.${ELEMENT_NAV_ITEM_CONTAINER}${IS_DROPDOWN}`;\nconst OVERWRITE_IS_SHOWING_DROPDOWN_CONTAINER = `${OVERWRITE_DROPDOWN_CONTAINER}${IS_SHOWING} .${ELEMENT_DROPDOWN_CONTAINER}`;\nconst OVERWRITE_IS_SHOWING_PRIMARY_LINK = `${OVERWRITE_DROPDOWN_CONTAINER} .${ELEMENT_PRIMARLY_LINK_WRAPPER}`;\nconst OVERWRITE_IS_SHOWING_PRIMARY_BUTTON = `${OVERWRITE_DROPDOWN_CONTAINER}${IS_SHOWING} .${ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON}`;\n\n// prettier-ignore\nconst OverwriteDropdownStyles = `\n ${OVERWRITE_IS_SHOWING_DROPDOWN_CONTAINER} {\n display: block;\n }\n\n ${OVERWRITE_IS_SHOWING_PRIMARY_BUTTON} {\n transform: rotate(180deg) translateY(4px);\n }\n\n ${OVERWRITE_IS_SHOWING_PRIMARY_LINK} > a${IS_SELECTED}:before {\n bottom: 1px;\n right: 20px;\n }\n`\n\n// prettier-ignore\nconst PrimaryStyles = `\n .${ELEMENT_PRIMARY_LINK_CONTAINER} {\n position: relative;\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} {\n display: block;\n position: relative;\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a {\n color: ${token.color.black};\n font-size: ${token.font.size.base};\n transition: color 0.2s ease-in-out;\n line-height: 1.15em;\n font-weight: 700;\n text-wrap: pretty;\n display: block;\n display: flex;\n align-items: flex-end;\n text-align: right;\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a:hover,\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a:focus {\n color: ${token.color.red};\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a[${ATTRIBUTE_SELECTED}] span {\n display: inline;\n position: relative;\n background-position: left calc(100% - 0px);\n background-repeat: no-repeat;\n background-size: 100% 2.5px;\n background-image: linear-gradient(${token.color.gold}, ${token.color.gold});\n }\n\n .${ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON} {\n position: absolute;\n top: 2px;\n right: -20px;\n transition: transform .5s;\n }\n\n .${ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON} svg {\n fill: ${token.color.red};\n height: 14px;\n width: 14px;\n transform: rotate(0deg) translateY(0);\n transition: fill .5s,transform .5s;\n }\n`;\n\n// prettier-ignore\nconst DropdownMultipleColumnStyles = `\n .${ELEMENT_DROPDOWN_MULTIPLE_COLUMN} {\n display: flex;\n justify-content: space-between;\n }\n\n .${ELEMENT_DROPDOWN_MULTIPLE_COLUMN} > * {\n min-width: 232px;\n }\n\n .${ELEMENT_DROPDOWN_MULTIPLE_COLUMN} > *:not(:first-child) {\n margin-left: 40px;\n }\n`\n\n// prettier-ignore\nconst DropdownListStyles = `\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} {\n background-color: ${token.color.white};\n border-top: 2px solid ${token.color.red};\n padding: ${token.spacing.lg};\n box-shadow: -1px 9px 32px -10px rgba(0,0,0,0.19);\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a {\n display: block;\n min-width: 120px;\n max-width: 230px;\n font-weight: 700;\n font-size: 14px;\n line-height: 1.5em;\n }\n\n ${jssToCSS({\n styleObj: {\n [`.${ELEMENT_DROPDOWN_LIST_CONTAINER} a`]:\n animation.line.slideUnderRed,\n },\n })}\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a:hover,\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a:focus {\n color: ${token.color.red};\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a + a {\n margin-top: ${token.spacing.md};\n display: block;\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a${IS_SELECTED} span:not(.sr-only) {\n display: inline;\n position: relative;\n background-position: left calc(100% - 0px);\n background-repeat: no-repeat;\n background-size: 100% 2.5px;\n background-image: linear-gradient(${token.color.gold}, ${token.color.gold});\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a${IS_SELECTED}:hover span,\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a${IS_SELECTED}:focus span {\n border-bottom: none;\n }\n`\n\n// prettier-ignore\nconst DropdownStyles = `\n .${ELEMENT_DROPDOWN_CONTAINER} {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);v \n min-width: 200px;\n width: auto;\n padding-top: ${token.spacing.sm};\n display: none;\n }\n`;\n\nconst STYLES_NAV_ITEM_ELEMENT = `\n .${ELEMENT_NAV_ITEM_CONTAINER} {\n position: relative;\n z-index: 9999;\n }\n\n ${OVERWRITE_DROPDOWN_CONTAINER} {\n padding-right: 20px;\n }\n\n .${ELEMENT_NAV_ITEM_CONTAINER} a {\n font-family: ${token.font.family.sans};\n font-size: ${token.font.size.sm};\n font-weight: 700;\n color: ${token.color.black};\n text-decoration: none;\n }\n \n .${ELEMENT_NAV_ITEM_CONTAINER}:foucs-within .${ELEMENT_DROPDOWN_CONTAINER} {\n display: block;\n }\n\n ${PrimaryStyles}\n ${DropdownStyles}\n ${DropdownMultipleColumnStyles}\n ${DropdownListStyles}\n ${OverwriteDropdownStyles}\n`;\n\nconst CreateMultipleColumns = ({ links }: { links: HTMLAnchorElement[] }) => {\n const column1 = document.createElement('div');\n const column2 = document.createElement('div');\n const firstColumnLinks = links.splice(0, Math.ceil(links.length / 2));\n\n firstColumnLinks.forEach((link) => {\n wrapLinkForAnimation({ element: link });\n column1.appendChild(link);\n });\n links.forEach((link) => {\n wrapLinkForAnimation({ element: link });\n column2.appendChild(link);\n });\n\n return [column1, column2];\n};\n\nconst CreateSingleColumn = ({ links }: { links: HTMLAnchorElement[] }) => {\n const container = document.createElement('div');\n links.forEach((link) => {\n wrapLinkForAnimation({ element: link });\n container.appendChild(link);\n });\n\n return container;\n};\n\nconst CreateDropdown = ({\n dropdownLinksContainer,\n dropdownCalloutsSlot,\n}: TypeDropdownProps) => {\n if (!dropdownLinksContainer) return;\n\n const links = Array.from(\n dropdownLinksContainer.querySelectorAll('a'),\n ) as HTMLAnchorElement[];\n\n const container = document.createElement('div');\n const wrapper = document.createElement('div');\n\n wrapper.classList.add(ELEMENT_DROPDOWN_LIST_CONTAINER);\n container.classList.add(ELEMENT_DROPDOWN_CONTAINER);\n\n if (links.length > MAX_COLUMN_ITEMS) {\n const columns = CreateMultipleColumns({ links });\n columns.forEach((column) => {\n wrapper.appendChild(column);\n });\n wrapper.classList.add(ELEMENT_DROPDOWN_MULTIPLE_COLUMN);\n } else {\n wrapper.appendChild(CreateSingleColumn({ links }));\n\n if (dropdownCalloutsSlot) {\n wrapper.classList.add(ELEMENT_DROPDOWN_MULTIPLE_COLUMN);\n }\n }\n\n if (dropdownCalloutsSlot) {\n const dropdownWrapper = document.createElement('div');\n\n dropdownWrapper.classList.add(ELEMENT_DROPDOWN_CTA_COLUMN);\n dropdownWrapper.appendChild(dropdownCalloutsSlot);\n wrapper.appendChild(dropdownWrapper);\n }\n\n container.appendChild(wrapper);\n\n return container;\n};\n\nconst CreateButton = ({\n buttonClick,\n navItemName,\n}: TypePrimaryLinkButtonProps) => {\n const button = document.createElement('button');\n\n button.classList.add(ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON);\n button.innerHTML = iconChevronDown;\n button.addEventListener('click', () => buttonClick());\n button.setAttribute('aria-expanded', 'false');\n button.setAttribute('aria-controls', `nav-links-`);\n button.setAttribute('aria-label', `List of menu items for ${navItemName}`);\n\n return button;\n};\n\nconst CreatePrimaryLink = (props: TypePrimaryLinkProps) => {\n const { hasDropdown, primaryLinkContainer } = props;\n const container = document.createElement('div');\n const wrapper = document.createElement('div');\n\n const dropdown = CreateDropdown(props);\n\n container.classList.add(ELEMENT_PRIMARY_LINK_CONTAINER);\n wrapper.classList.add(ELEMENT_PRIMARLY_LINK_WRAPPER);\n\n if (primaryLinkContainer) {\n const clonedPrimaryLink = primaryLinkContainer.cloneNode(\n true,\n ) as HTMLElement;\n wrapper.appendChild(clonedPrimaryLink);\n }\n\n if (hasDropdown) {\n const button = CreateButton(props);\n wrapper.appendChild(button);\n }\n\n if (dropdown) wrapper.appendChild(dropdown);\n\n container.appendChild(wrapper);\n return container;\n};\n\nconst CreateNavItemElement = (props: TypeNavItem) =>\n (() => {\n const { dropdownLinksContainer, primaryLinkContainer, context } = props;\n\n if (!primaryLinkContainer) {\n throw new Error('Primary link is required for a nav item');\n }\n\n const elementContainer = document.createElement('div');\n const dropDownContainerLinks = dropdownLinksContainer?.children;\n const hasDropdown =\n (dropDownContainerLinks && dropDownContainerLinks.length > 0) || false;\n\n const navItemName = primaryLinkContainer.innerHTML\n .replace(/(<([^>]+)>)/gi, '')\n .trim();\n let isShowing = false;\n let focusCallback = () => {};\n\n const OnLoadDropdownSpans = () => {\n if (!dropdownLinksContainer) return;\n\n const links = Array.from(\n dropdownLinksContainer.querySelectorAll('a'),\n ) as HTMLAnchorElement[];\n\n links.forEach((link) => {\n const hasSpan = link.querySelector('span');\n\n if (!hasSpan) {\n wrapLinkForAnimation({ element: link });\n link.appendChild(link);\n }\n });\n };\n\n const DropdownPositionPerViewPort = () => {\n const elementBounds = elementContainer.getBoundingClientRect();\n const dropdownContainer = elementContainer.querySelector(\n `.${ELEMENT_DROPDOWN_CONTAINER}`,\n ) as HTMLDivElement;\n const width = elementContainer.offsetWidth;\n\n if (!dropdownContainer) return;\n\n const size = dropdownContainer.offsetWidth + BOUNDS_SHIFT;\n\n if (elementBounds.left + width < size) {\n dropdownContainer.style.left = '0';\n dropdownContainer.style.transform = 'translateX(0)';\n }\n\n if (window.innerWidth - elementBounds.right < size / 2) {\n dropdownContainer.style.right = '0';\n dropdownContainer.style.left = 'inherit';\n dropdownContainer.style.transform = 'translateX(0)';\n }\n };\n\n const ShowDropdown = () => {\n elementContainer.setAttribute(ATTRIBUTE_SHOWING, '');\n DropdownPositionPerViewPort();\n };\n\n const HideDropdown = () => {\n elementContainer.removeAttribute(ATTRIBUTE_SHOWING);\n focusCallback();\n focusCallback = () => {};\n };\n\n const EventButtonClick = () => {\n if (isShowing && dropdownLinksContainer) {\n ShowDropdown();\n focusCallback = handleKeyboardNavigation({\n element: elementContainer,\n action: () => HideDropdown(),\n shadowDomContext: context,\n });\n\n setTimeout(() => {\n const firstElement = dropdownLinksContainer.querySelector(\n 'a',\n ) as HTMLAnchorElement;\n\n if (firstElement) firstElement.focus();\n }, 100);\n }\n\n if (!isShowing) HideDropdown();\n };\n\n const buttonClick = () => {\n isShowing = isShowing ? false : true;\n EventButtonClick();\n };\n\n // Load\n\n const linkContainer = CreatePrimaryLink({\n ...props,\n hasDropdown,\n buttonClick,\n navItemName,\n });\n\n elementContainer.addEventListener('mouseover', () => {\n isShowing = true;\n ShowDropdown();\n });\n\n elementContainer.addEventListener('mouseleave', () => {\n isShowing = false;\n HideDropdown();\n });\n\n setTimeout(() => {\n OnLoadDropdownSpans();\n }, 10);\n\n if (hasDropdown) elementContainer.setAttribute(ATTRIBUTE_DROPDOWN, '');\n elementContainer.classList.add(ELEMENT_NAV_ITEM_CONTAINER);\n elementContainer.appendChild(linkContainer);\n\n return elementContainer;\n })();\n\nexport const createCompositeNavigationItem = {\n CreateElement: CreateNavItemElement,\n Styles: STYLES_NAV_ITEM_ELEMENT,\n};\n"],"names":["iconChevronDown"],"mappings":";;;;;;AAkCA,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;AAE3B,MAAM,eAAe;AACrB,MAAM,mBAAmB;AAEzB,MAAM,6BAA6B;AACn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Y;AAAA,IACtC;AAAA,EACF;AAEA,QAAM,eAAe,MAAM;AACzB,qBAAiB,aAAa,mBAAmB,EAAE;AACnD,gCAAA;AAAA,EACF;AAEA,QAAM,eAAe,MAAM;AACzB,qBAAiB,gBAAgB,iBAAiB;AAClD,kBAAA;AACA,oBAAgB,MAAM;AAAA,IAAC;AAAA,EACzB;AAEA,QAAM,mBAAmB,MAAM;AAC7B,QAAI,aAAa,wBAAwB;AACvC,mBAAA;AACA,sBAAgB,yBAAyB;AAAA,QACvC,SAAS;AAAA,QACT,QAAQ,MAAM,aAAA;AAAA,QACd,kBAAkB;AAAA,MAAA,CACnB;AAED,iBAAW,MAAM;AACf,cAAM,eAAe,uBAAuB;AAAA,UAC1C;AAAA,QAAA;AAGF,YAAI,2BAA2B,MAAA;AAAA,MACjC,GAAG,GAAG;AAAA,IACR;AAEA,QAAI,CAAC,UAAW,cAAA;AAAA,EAClB;AAEA,QAAM,cAAc,MAAM;AACxB,gBAAY,YAAY,QAAQ;AAChC,qBAAA;AAAA,EACF;AAIA,QAAM,gBAAgB,kBAAkB;AAAA,IACtC,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,mBAAiB,iBAAiB,aAAa,MAAM;AACnD,gBAAY;AACZ,iBAAA;AAAA,EACF,CAAC;AAED,mBAAiB,iBAAiB,cAAc,MAAM;AACpD,gBAAY;AACZ,iBAAA;AAAA,EACF,CAAC;AAED,aAAW,MAAM;AACf,wBAAA;AAAA,EACF,GAAG,EAAE;AAEL,MAAI,YAAa,kBAAiB,aAAa,oBAAoB,EAAE;AACrE,mBAAiB,UAAU,IAAI,0BAA0B;AACzD,mBAAiB,YAAY,aAAa;AAE1C,SAAO;AACT,GAAA;AAEK,MAAM,gCAAgC;AAAA,EAC3C,eAAe;AAAA,EACf,QAAQ;AACV;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../source/composite/navigation/elements/item/index.ts"],"sourcesContent":["import * as token from '@universityofmaryland/web-token-library';\nimport * as animation from '@universityofmaryland/web-styles-library/animation';\nimport { jssToCSS } from '@universityofmaryland/web-utilities-library/styles';\nimport { wrapLinkForAnimation } from '@universityofmaryland/web-utilities-library/animation';\nimport { handleKeyboardNavigation } from '@universityofmaryland/web-utilities-library/events';\nimport { chevron_down as iconChevronDown } from '@universityofmaryland/web-icons-library/controls';\n\ntype TypePrimaryLinkRequirements = {\n primaryLinkContainer?: HTMLElement | null;\n context?: HTMLElement;\n};\n\ntype TypeDropdownProps = {\n dropdownLinksContainer?: HTMLElement | null;\n dropdownCalloutsSlot?: HTMLSlotElement | null;\n};\n\ntype TypePrimaryLinkButtonProps = {\n buttonClick: () => void;\n navItemName: string;\n};\n\ntype TypePrimaryLinkProps = TypePrimaryLinkRequirements &\n TypeDropdownProps &\n TypePrimaryLinkButtonProps & {\n hasDropdown: boolean;\n };\n\nexport type TypeNavItemRequirements = TypeDropdownProps &\n TypePrimaryLinkRequirements;\n\ntype TypeNavItem = TypeNavItemRequirements;\n\nconst ELEMENT_NAME = 'umd-element-nav-item';\nconst ATTRIBUTE_DROPDOWN = 'data-dropdown';\nconst ATTRIBUTE_SHOWING = 'data-showing';\nconst ATTRIBUTE_SELECTED = 'data-selected';\n\nconst BOUNDS_SHIFT = 140;\nconst MAX_COLUMN_ITEMS = 8;\n\nconst ELEMENT_NAV_ITEM_CONTAINER = `nav-item-container`;\nconst ELEMENT_PRIMARY_LINK_CONTAINER = 'nav-item-primary-link-container';\nconst ELEMENT_PRIMARLY_LINK_WRAPPER = `nav-item-primary-link-wrapper`;\nconst ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON = `nav-item-primary-link-button`;\n\nconst ELEMENT_DROPDOWN_CONTAINER = `nav-item-dropdown-container`;\nconst ELEMENT_DROPDOWN_LIST_CONTAINER = 'nav-item-dropdown-list';\nconst ELEMENT_DROPDOWN_MULTIPLE_COLUMN = 'nav-item-dropdown-multiple-column';\nconst ELEMENT_DROPDOWN_CTA_COLUMN = 'nav-item-dropdown-cta-column';\n\nconst IS_SELECTED = `[${ATTRIBUTE_SELECTED}]`;\nconst IS_SHOWING = `[${ATTRIBUTE_SHOWING}]`;\nconst IS_DROPDOWN = `[${ATTRIBUTE_DROPDOWN}]`;\n\nconst OVERWRITE_DROPDOWN_CONTAINER = `.${ELEMENT_NAV_ITEM_CONTAINER}${IS_DROPDOWN}`;\nconst OVERWRITE_IS_SHOWING_DROPDOWN_CONTAINER = `${OVERWRITE_DROPDOWN_CONTAINER}${IS_SHOWING} .${ELEMENT_DROPDOWN_CONTAINER}`;\nconst OVERWRITE_IS_SHOWING_PRIMARY_LINK = `${OVERWRITE_DROPDOWN_CONTAINER} .${ELEMENT_PRIMARLY_LINK_WRAPPER}`;\nconst OVERWRITE_IS_SHOWING_PRIMARY_BUTTON = `${OVERWRITE_DROPDOWN_CONTAINER}${IS_SHOWING} .${ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON}`;\n\n// prettier-ignore\nconst OverwriteDropdownStyles = `\n ${OVERWRITE_IS_SHOWING_DROPDOWN_CONTAINER} {\n display: block;\n }\n\n ${OVERWRITE_IS_SHOWING_PRIMARY_BUTTON} {\n transform: rotate(180deg) translateY(4px);\n }\n\n ${OVERWRITE_IS_SHOWING_PRIMARY_LINK} > a${IS_SELECTED}:before {\n bottom: 1px;\n right: 20px;\n }\n`\n\n// prettier-ignore\nconst PrimaryStyles = `\n .${ELEMENT_PRIMARY_LINK_CONTAINER} {\n position: relative;\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} {\n display: block;\n position: relative;\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a {\n color: ${token.color.black};\n font-size: ${token.font.size.base};\n transition: color 0.2s ease-in-out;\n line-height: 1.15em;\n font-weight: 700;\n text-wrap: pretty;\n display: block;\n display: flex;\n align-items: flex-end;\n text-align: right;\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a:hover,\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a:focus {\n color: ${token.color.red};\n }\n\n .${ELEMENT_PRIMARLY_LINK_WRAPPER} > a[${ATTRIBUTE_SELECTED}] span {\n display: inline;\n position: relative;\n background-position: left calc(100% - 0px);\n background-repeat: no-repeat;\n background-size: 100% 2.5px;\n background-image: linear-gradient(${token.color.gold}, ${token.color.gold});\n }\n\n .${ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON} {\n position: absolute;\n top: 2px;\n right: -20px;\n transition: transform .5s;\n }\n\n .${ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON} svg {\n fill: ${token.color.red};\n height: 14px;\n width: 14px;\n transform: rotate(0deg) translateY(0);\n transition: fill .5s,transform .5s;\n }\n`;\n\n// prettier-ignore\nconst DropdownMultipleColumnStyles = `\n .${ELEMENT_DROPDOWN_MULTIPLE_COLUMN} {\n display: flex;\n justify-content: space-between;\n }\n\n .${ELEMENT_DROPDOWN_MULTIPLE_COLUMN} > * {\n min-width: 232px;\n }\n\n .${ELEMENT_DROPDOWN_MULTIPLE_COLUMN} > *:not(:first-child) {\n margin-left: 40px;\n }\n`\n\n// prettier-ignore\nconst DropdownListStyles = `\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} {\n background-color: ${token.color.white};\n border-top: 2px solid ${token.color.red};\n padding: ${token.spacing.lg};\n box-shadow: -1px 9px 32px -10px rgba(0,0,0,0.19);\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a {\n display: block;\n min-width: 120px;\n max-width: 230px;\n font-weight: 700;\n font-size: 14px;\n line-height: 1.5em;\n }\n\n ${jssToCSS({\n styleObj: {\n [`.${ELEMENT_DROPDOWN_LIST_CONTAINER} a`]:\n animation.line.slideUnderRed,\n },\n })}\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a:hover,\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a:focus {\n color: ${token.color.red};\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a + a {\n margin-top: ${token.spacing.md};\n display: block;\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a${IS_SELECTED} span:not(.sr-only) {\n display: inline;\n position: relative;\n background-position: left calc(100% - 0px);\n background-repeat: no-repeat;\n background-size: 100% 2.5px;\n background-image: linear-gradient(${token.color.gold}, ${token.color.gold});\n }\n\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a${IS_SELECTED}:hover span,\n .${ELEMENT_DROPDOWN_LIST_CONTAINER} a${IS_SELECTED}:focus span {\n border-bottom: none;\n }\n`\n\n// prettier-ignore\nconst DropdownStyles = `\n .${ELEMENT_DROPDOWN_CONTAINER} {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n min-width: 200px;\n width: auto;\n padding-top: ${token.spacing.sm};\n display: none;\n }\n`;\n\nconst STYLES_NAV_ITEM_ELEMENT = `\n .${ELEMENT_NAV_ITEM_CONTAINER} {\n position: relative;\n z-index: 9999;\n }\n\n ${OVERWRITE_DROPDOWN_CONTAINER} {\n padding-right: 20px;\n }\n\n .${ELEMENT_NAV_ITEM_CONTAINER} a {\n font-family: ${token.font.family.sans};\n font-size: ${token.font.size.sm};\n font-weight: 700;\n color: ${token.color.black};\n text-decoration: none;\n }\n \n .${ELEMENT_NAV_ITEM_CONTAINER}:foucs-within .${ELEMENT_DROPDOWN_CONTAINER} {\n display: block;\n }\n\n ${PrimaryStyles}\n ${DropdownStyles}\n ${DropdownMultipleColumnStyles}\n ${DropdownListStyles}\n ${OverwriteDropdownStyles}\n`;\n\nconst CreateMultipleColumns = ({ links }: { links: HTMLAnchorElement[] }) => {\n const column1 = document.createElement('div');\n const column2 = document.createElement('div');\n const firstColumnLinks = links.splice(0, Math.ceil(links.length / 2));\n\n firstColumnLinks.forEach((link) => {\n wrapLinkForAnimation({ element: link });\n column1.appendChild(link);\n });\n links.forEach((link) => {\n wrapLinkForAnimation({ element: link });\n column2.appendChild(link);\n });\n\n return [column1, column2];\n};\n\nconst CreateSingleColumn = ({ links }: { links: HTMLAnchorElement[] }) => {\n const container = document.createElement('div');\n links.forEach((link) => {\n wrapLinkForAnimation({ element: link });\n container.appendChild(link);\n });\n\n return container;\n};\n\nconst CreateDropdown = ({\n dropdownLinksContainer,\n dropdownCalloutsSlot,\n}: TypeDropdownProps) => {\n if (!dropdownLinksContainer) return;\n\n const links = Array.from(\n dropdownLinksContainer.querySelectorAll('a'),\n ) as HTMLAnchorElement[];\n\n const container = document.createElement('div');\n const wrapper = document.createElement('div');\n\n wrapper.classList.add(ELEMENT_DROPDOWN_LIST_CONTAINER);\n container.classList.add(ELEMENT_DROPDOWN_CONTAINER);\n\n if (links.length > MAX_COLUMN_ITEMS) {\n const columns = CreateMultipleColumns({ links });\n columns.forEach((column) => {\n wrapper.appendChild(column);\n });\n wrapper.classList.add(ELEMENT_DROPDOWN_MULTIPLE_COLUMN);\n } else {\n wrapper.appendChild(CreateSingleColumn({ links }));\n\n if (dropdownCalloutsSlot) {\n wrapper.classList.add(ELEMENT_DROPDOWN_MULTIPLE_COLUMN);\n }\n }\n\n if (dropdownCalloutsSlot) {\n const dropdownWrapper = document.createElement('div');\n\n dropdownWrapper.classList.add(ELEMENT_DROPDOWN_CTA_COLUMN);\n dropdownWrapper.appendChild(dropdownCalloutsSlot);\n wrapper.appendChild(dropdownWrapper);\n }\n\n container.appendChild(wrapper);\n\n return container;\n};\n\nconst CreateButton = ({\n buttonClick,\n navItemName,\n}: TypePrimaryLinkButtonProps) => {\n const button = document.createElement('button');\n\n button.classList.add(ELEMENT_PRIMARY_LINK_CONTAINER_BUTTON);\n button.innerHTML = iconChevronDown;\n button.addEventListener('click', () => buttonClick());\n button.setAttribute('aria-expanded', 'false');\n button.setAttribute('aria-controls', `nav-links-`);\n button.setAttribute('aria-label', `List of menu items for ${navItemName}`);\n\n return button;\n};\n\nconst CreatePrimaryLink = (props: TypePrimaryLinkProps) => {\n const { hasDropdown, primaryLinkContainer } = props;\n const container = document.createElement('div');\n const wrapper = document.createElement('div');\n\n const dropdown = CreateDropdown(props);\n\n container.classList.add(ELEMENT_PRIMARY_LINK_CONTAINER);\n wrapper.classList.add(ELEMENT_PRIMARLY_LINK_WRAPPER);\n\n if (primaryLinkContainer) {\n const clonedPrimaryLink = primaryLinkContainer.cloneNode(\n true,\n ) as HTMLElement;\n wrapper.appendChild(clonedPrimaryLink);\n }\n\n if (hasDropdown) {\n const button = CreateButton(props);\n wrapper.appendChild(button);\n }\n\n if (dropdown) wrapper.appendChild(dropdown);\n\n container.appendChild(wrapper);\n return container;\n};\n\nconst CreateNavItemElement = (props: TypeNavItem) =>\n (() => {\n const { dropdownLinksContainer, primaryLinkContainer, context } = props;\n\n if (!primaryLinkContainer) {\n throw new Error('Primary link is required for a nav item');\n }\n\n const elementContainer = document.createElement('div');\n const dropDownContainerLinks = dropdownLinksContainer?.children;\n const hasDropdown =\n (dropDownContainerLinks && dropDownContainerLinks.length > 0) || false;\n\n const navItemName = primaryLinkContainer.innerHTML\n .replace(/(<([^>]+)>)/gi, '')\n .trim();\n let isShowing = false;\n let focusCallback = () => {};\n\n const OnLoadDropdownSpans = () => {\n if (!dropdownLinksContainer) return;\n\n const links = Array.from(\n dropdownLinksContainer.querySelectorAll('a'),\n ) as HTMLAnchorElement[];\n\n links.forEach((link) => {\n const hasSpan = link.querySelector('span');\n\n if (!hasSpan) {\n wrapLinkForAnimation({ element: link });\n link.appendChild(link);\n }\n });\n };\n\n const DropdownPositionPerViewPort = () => {\n const elementBounds = elementContainer.getBoundingClientRect();\n const dropdownContainer = elementContainer.querySelector(\n `.${ELEMENT_DROPDOWN_CONTAINER}`,\n ) as HTMLDivElement;\n const width = elementContainer.offsetWidth;\n\n if (!dropdownContainer) return;\n\n const size = dropdownContainer.offsetWidth + BOUNDS_SHIFT;\n\n if (elementBounds.left + width < size) {\n dropdownContainer.style.left = '0';\n dropdownContainer.style.transform = 'translateX(0)';\n }\n\n if (window.innerWidth - elementBounds.right < size / 2) {\n dropdownContainer.style.right = '0';\n dropdownContainer.style.left = 'inherit';\n dropdownContainer.style.transform = 'translateX(0)';\n }\n };\n\n const ShowDropdown = () => {\n elementContainer.setAttribute(ATTRIBUTE_SHOWING, '');\n DropdownPositionPerViewPort();\n };\n\n const HideDropdown = () => {\n elementContainer.removeAttribute(ATTRIBUTE_SHOWING);\n focusCallback();\n focusCallback = () => {};\n };\n\n const EventButtonClick = () => {\n if (isShowing && dropdownLinksContainer) {\n ShowDropdown();\n focusCallback = handleKeyboardNavigation({\n element: elementContainer,\n action: () => HideDropdown(),\n shadowDomContext: context,\n });\n\n setTimeout(() => {\n const firstElement = dropdownLinksContainer.querySelector(\n 'a',\n ) as HTMLAnchorElement;\n\n if (firstElement) firstElement.focus();\n }, 100);\n }\n\n if (!isShowing) HideDropdown();\n };\n\n const buttonClick = () => {\n isShowing = isShowing ? false : true;\n EventButtonClick();\n };\n\n // Load\n\n const linkContainer = CreatePrimaryLink({\n ...props,\n hasDropdown,\n buttonClick,\n navItemName,\n });\n\n elementContainer.addEventListener('mouseover', () => {\n isShowing = true;\n ShowDropdown();\n });\n\n elementContainer.addEventListener('mouseleave', () => {\n isShowing = false;\n HideDropdown();\n });\n\n setTimeout(() => {\n OnLoadDropdownSpans();\n }, 10);\n\n if (hasDropdown) elementContainer.setAttribute(ATTRIBUTE_DROPDOWN, '');\n elementContainer.classList.add(ELEMENT_NAV_ITEM_CONTAINER);\n elementContainer.appendChild(linkContainer);\n\n return elementContainer;\n })();\n\nexport const createCompositeNavigationItem = {\n CreateElement: CreateNavItemElement,\n Styles: STYLES_NAV_ITEM_ELEMENT,\n};\n"],"names":["iconChevronDown"],"mappings":";;;;;;AAkCA,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;AAE3B,MAAM,eAAe;AACrB,MAAM,mBAAmB;AAEzB,MAAM,6BAA6B;AACnC,MAAM,iCAAiC;AACvC,MAAM,gCAAgC;AACtC,MAAM,wCAAwC;AAE9C,MAAM,6BAA6B;AACnC,MAAM,kCAAkC;AACxC,MAAM,mCAAmC;AAC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Ae,MAAM;AACzB,qBAAiB,gBAAgB,iBAAiB;AAClD,kBAAA;AACA,oBAAgB,MAAM;AAAA,IAAC;AAAA,EACzB;AAEA,QAAM,mBAAmB,MAAM;AAC7B,QAAI,aAAa,wBAAwB;AACvC,mBAAA;AACA,sBAAgB,yBAAyB;AAAA,QACvC,SAAS;AAAA,QACT,QAAQ,MAAM,aAAA;AAAA,QACd,kBAAkB;AAAA,MAAA,CACnB;AAED,iBAAW,MAAM;AACf,cAAM,eAAe,uBAAuB;AAAA,UAC1C;AAAA,QAAA;AAGF,YAAI,2BAA2B,MAAA;AAAA,MACjC,GAAG,GAAG;AAAA,IACR;AAEA,QAAI,CAAC,UAAW,cAAA;AAAA,EAClB;AAEA,QAAM,cAAc,MAAM;AACxB,gBAAY,YAAY,QAAQ;AAChC,qBAAA;AAAA,EACF;AAIA,QAAM,gBAAgB,kBAAkB;AAAA,IACtC,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,mBAAiB,iBAAiB,aAAa,MAAM;AACnD,gBAAY;AACZ,iBAAA;AAAA,EACF,CAAC;AAED,mBAAiB,iBAAiB,cAAc,MAAM;AACpD,gBAAY;AACZ,iBAAA;AAAA,EACF,CAAC;AAED,aAAW,MAAM;AACf,wBAAA;AAAA,EACF,GAAG,EAAE;AAEL,MAAI,YAAa,kBAAiB,aAAa,oBAAoB,EAAE;AACrE,mBAAiB,UAAU,IAAI,0BAA0B;AACzD,mBAAiB,YAAY,aAAa;AAE1C,SAAO;AACT,GAAA;AAEK,MAAM,gCAAgC;AAAA,EAC3C,eAAe;AAAA,EACf,QAAQ;AACV;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PathwayTextLockupProps, PathwayAssetProps } from './_types';
|
|
2
|
-
export declare const createCompositeHeadline: ({ headline, isThemeDark, isThemeMaryland, }: Pick<PathwayTextLockupProps, "headline" | "isThemeDark" | "isThemeMaryland">) => import('
|
|
3
|
-
export declare const createCompositeStat: ({ stats, }: Pick<PathwayTextLockupProps, "stats">) => import('
|
|
4
|
-
export declare const createTextLockupMedium: (props: Pick<PathwayTextLockupProps, "stats" | "actions" | "eventDetails" | "eyebrow" | "headline" | "stats" | "text" | "isThemeDark" | "isThemeMaryland">) => import('
|
|
5
|
-
export declare const createAssetContent: (props: Pick<PathwayAssetProps, "dateSign" | "image" | "video" | "isImageScaled">) => import('
|
|
2
|
+
export declare const createCompositeHeadline: ({ headline, isThemeDark, isThemeMaryland, }: Pick<PathwayTextLockupProps, "headline" | "isThemeDark" | "isThemeMaryland">) => import('../../../builder/dist/index.d.ts').ElementModel<HTMLElement> | null;
|
|
3
|
+
export declare const createCompositeStat: ({ stats, }: Pick<PathwayTextLockupProps, "stats">) => import('../../../builder/dist/index.d.ts').ElementModel<HTMLElement> | null;
|
|
4
|
+
export declare const createTextLockupMedium: (props: Pick<PathwayTextLockupProps, "stats" | "actions" | "eventDetails" | "eyebrow" | "headline" | "stats" | "text" | "isThemeDark" | "isThemeMaryland">) => import('../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
5
|
+
export declare const createAssetContent: (props: Pick<PathwayAssetProps, "dateSign" | "image" | "video" | "isImageScaled">) => import('../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
6
6
|
//# sourceMappingURL=_common.d.ts.map
|
|
@@ -9,6 +9,6 @@ interface PathwayHeroProps {
|
|
|
9
9
|
text: HTMLElement | null;
|
|
10
10
|
video: HTMLVideoElement | null;
|
|
11
11
|
}
|
|
12
|
-
export declare const createCompositePathwayHero: (props: PathwayHeroProps) => import('
|
|
12
|
+
export declare const createCompositePathwayHero: (props: PathwayHeroProps) => import('../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=hero.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PathwayHighlightProps } from './_types';
|
|
2
|
-
export declare const createCompositePathwayHighlight: (props: PathwayHighlightProps) => import('
|
|
2
|
+
export declare const createCompositePathwayHighlight: (props: PathwayHighlightProps) => import('../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
3
3
|
//# sourceMappingURL=highlight.d.ts.map
|
|
@@ -5,7 +5,7 @@ export declare const createCompositePathwayOverlay: (props: PathwayOverlayProps)
|
|
|
5
5
|
};
|
|
6
6
|
element: HTMLElement;
|
|
7
7
|
styles: string;
|
|
8
|
-
update?: (props: Partial<import('
|
|
8
|
+
update?: (props: Partial<import('../../../builder/dist/index.d.ts').BuilderOptions>) => void;
|
|
9
9
|
destroy?: () => void;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -5,7 +5,7 @@ export declare const createCompositePathwayStandard: (props: PathwayStandardProp
|
|
|
5
5
|
};
|
|
6
6
|
element: HTMLElement;
|
|
7
7
|
styles: string;
|
|
8
|
-
update?: (props: Partial<import('
|
|
8
|
+
update?: (props: Partial<import('../../../builder/dist/index.d.ts').BuilderOptions>) => void;
|
|
9
9
|
destroy?: () => void;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=standard.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PathwayStickyProps } from './_types';
|
|
2
|
-
export declare const createCompositePathwaySticky: (props: PathwayStickyProps) => import('
|
|
2
|
+
export declare const createCompositePathwaySticky: (props: PathwayStickyProps) => import('../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
3
3
|
//# sourceMappingURL=sticky.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentElement, ImageElement, LinkElement, ThemeProps, DisplayProps, AnimationProps, SizeProps as BaseSizeProps } from '../../_types';
|
|
1
|
+
import { ContentElement, ImageElement, LinkElement, ElementModel, ThemeProps, DisplayProps, AnimationProps, SizeProps as BaseSizeProps } from '../../_types';
|
|
2
2
|
export interface QuoteBaseProps extends Pick<ThemeProps, 'isThemeDark' | 'isThemeMaryland'>, Pick<DisplayProps, 'isTransparent'>, Pick<AnimationProps, 'includesAnimation'> {
|
|
3
3
|
quote: ContentElement;
|
|
4
4
|
image?: ImageElement;
|
|
@@ -11,7 +11,7 @@ export interface QuoteVariantProps {
|
|
|
11
11
|
export interface QuoteContentProps {
|
|
12
12
|
attribution: ContentElement;
|
|
13
13
|
attributionSubText: ContentElement;
|
|
14
|
-
action
|
|
14
|
+
action?: LinkElement;
|
|
15
15
|
}
|
|
16
16
|
export interface QuoteTextProps extends QuoteBaseProps, QuoteVariantProps, QuoteSizeProps, QuoteContentProps {
|
|
17
17
|
}
|
|
@@ -19,6 +19,34 @@ export interface QuoteInlineProps extends QuoteTextProps {
|
|
|
19
19
|
}
|
|
20
20
|
export interface QuoteFeaturedProps extends QuoteInlineProps {
|
|
21
21
|
}
|
|
22
|
-
export interface QuoteStatementProps extends
|
|
22
|
+
export interface QuoteStatementProps extends QuoteTextProps, Pick<ThemeProps, 'isThemeGold'> {
|
|
23
|
+
headline?: ContentElement;
|
|
24
|
+
}
|
|
25
|
+
export interface QuoteAnimationProps extends QuoteVariantProps, Pick<QuoteBaseProps, 'quote' | 'includesAnimation' | 'image'> {
|
|
26
|
+
quoteElement: ElementModel<HTMLElement>;
|
|
27
|
+
}
|
|
28
|
+
export interface QuoteIconProps extends QuoteVariantProps, Pick<QuoteBaseProps, 'isThemeMaryland'> {
|
|
29
|
+
hasImage?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface QuoteProps extends Pick<QuoteTextProps, 'quote' | 'isThemeMaryland' | 'isSizeLarge' | 'isTypeFeatured' | 'includesAnimation'> {
|
|
32
|
+
hasImage?: boolean;
|
|
33
|
+
shouldHaveWhiteText?: boolean;
|
|
34
|
+
quote: HTMLElement;
|
|
35
|
+
}
|
|
36
|
+
export interface QuoteActionProps extends QuoteVariantProps, Pick<QuoteBaseProps, 'includesAnimation' | 'image'> {
|
|
37
|
+
action: HTMLAnchorElement;
|
|
38
|
+
}
|
|
39
|
+
export interface QuoteImageProps extends QuoteVariantProps, QuoteSizeProps, Pick<QuoteBaseProps, 'isThemeMaryland'> {
|
|
40
|
+
image: HTMLImageElement;
|
|
41
|
+
}
|
|
42
|
+
export interface QuoteTextChildrenProps extends Pick<QuoteTextProps, 'quote' | 'image' | 'attribution' | 'attributionSubText' | 'action' | 'isThemeDark' | 'isSizeLarge' | 'isTypeFeatured' | 'includesAnimation'> {
|
|
43
|
+
shouldHaveWhiteText?: boolean;
|
|
44
|
+
hasImage: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface QuoteStatementImageProps extends Pick<QuoteStatementProps, 'isThemeGold'> {
|
|
47
|
+
image: HTMLImageElement;
|
|
48
|
+
}
|
|
49
|
+
export interface QuoteStatementQuoteProps {
|
|
50
|
+
quote: HTMLElement;
|
|
23
51
|
}
|
|
24
52
|
//# sourceMappingURL=_types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.d.ts","sourceRoot":"","sources":["../../../source/composite/quote/_types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,IAAI,aAAa,EAChC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,iBAAiB,CAAC,EACzD,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,EACnC,IAAI,CAAC,cAAc,EAAE,mBAAmB,CAAC;IAC3C,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC;CAAG;AAE7E,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,E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ompositeQuoteAction: ({ action, image, includesAnimation, isTypeFeatured, }: QuoteActionProps) => import('@universityofmaryland/web-builder-library').ElementModel<HTMLAnchorElement>;
|
|
6
|
-
export {};
|
|
1
|
+
import { QuoteActionProps, QuoteStatementProps } from '../_types';
|
|
2
|
+
import { ElementModel } from '../../../_types';
|
|
3
|
+
export declare const createCompositeQuoteAction: ({ action, image, includesAnimation, isTypeFeatured, }: QuoteActionProps) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLAnchorElement>;
|
|
4
|
+
export declare const createStatementQuoteAction: ({ action, }: Pick<QuoteStatementProps, "action">) => ElementModel<HTMLElement> | null;
|
|
7
5
|
//# sourceMappingURL=action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/action.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/action.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAoCpD,eAAO,MAAM,0BAA0B,0DA7BpC,gBAAgB,wFA6B+C,CAAC;AACnE,eAAO,MAAM,0BAA0B,gBANpC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,KAAG,YAAY,CAAC,WAAW,CAAC,GAAG,IAMD,CAAC"}
|
|
@@ -20,8 +20,16 @@ const CreateQuoteActionElement = ({
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}).build();
|
|
23
|
+
const CreateStatementQuoteAction = ({
|
|
24
|
+
action
|
|
25
|
+
}) => {
|
|
26
|
+
if (!action) return null;
|
|
27
|
+
return new ElementBuilder().withChild(action).build();
|
|
28
|
+
};
|
|
23
29
|
const createCompositeQuoteAction = CreateQuoteActionElement;
|
|
30
|
+
const createStatementQuoteAction = CreateStatementQuoteAction;
|
|
24
31
|
export {
|
|
25
|
-
createCompositeQuoteAction
|
|
32
|
+
createCompositeQuoteAction,
|
|
33
|
+
createStatementQuoteAction
|
|
26
34
|
};
|
|
27
35
|
//# sourceMappingURL=action.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sources":["../../../../source/composite/quote/elements/action.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport * as layout from '@universityofmaryland/web-styles-library/layout';\nimport { type
|
|
1
|
+
{"version":3,"file":"action.js","sources":["../../../../source/composite/quote/elements/action.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport * as layout from '@universityofmaryland/web-styles-library/layout';\nimport { type QuoteActionProps, type QuoteStatementProps } from '../_types';\nimport { type ElementModel } from '../../../_types';\n\nconst CreateQuoteActionElement = ({\n action,\n image,\n includesAnimation,\n isTypeFeatured = false,\n}: QuoteActionProps) =>\n new ElementBuilder(action)\n .withClassName('quote-container-actions')\n .withStyles({\n element: {\n marginTop: token.spacing.sm,\n display: 'block',\n\n ...(!isTypeFeatured && {\n ...layout.grid.inline.tabletRows,\n }),\n\n ...(includesAnimation &&\n (!isTypeFeatured || (isTypeFeatured && !image)) && {\n opacity: '0',\n transform: 'translateY(20px)',\n transition: 'opacity 1s ease, transform 0.5s ease',\n }),\n },\n })\n .build();\n\nconst CreateStatementQuoteAction = ({\n action,\n}: Pick<QuoteStatementProps, 'action'>): ElementModel<HTMLElement> | null => {\n if (!action) return null;\n return new ElementBuilder().withChild(action).build();\n};\n\nexport const createCompositeQuoteAction = CreateQuoteActionElement;\nexport const createStatementQuoteAction = CreateStatementQuoteAction;\n"],"names":[],"mappings":";;;AAMA,MAAM,2BAA2B,CAAC;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AACnB,MACE,IAAI,eAAe,MAAM,EACtB,cAAc,yBAAyB,EACvC,WAAW;AAAA,EACV,SAAS;AAAA,IACP,WAAW,MAAM,QAAQ;AAAA,IACzB,SAAS;AAAA,IAET,GAAI,CAAC,kBAAkB;AAAA,MACrB,GAAG,OAAO,KAAK,OAAO;AAAA,IAAA;AAAA,IAGxB,GAAI,sBACD,CAAC,kBAAmB,kBAAkB,CAAC,UAAW;AAAA,MACjD,SAAS;AAAA,MACT,WAAW;AAAA,MACX,YAAY;AAAA,IAAA;AAAA,EACd;AAEN,CAAC,EACA,MAAA;AAEL,MAAM,6BAA6B,CAAC;AAAA,EAClC;AACF,MAA6E;AAC3E,MAAI,CAAC,OAAQ,QAAO;AACpB,SAAO,IAAI,eAAA,EAAiB,UAAU,MAAM,EAAE,MAAA;AAChD;AAEO,MAAM,6BAA6B;AACnC,MAAM,6BAA6B;"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare const createCompositeQuoteIcon: ({ hasImage, isThemeMaryland, isTypeFeatured, }: QuoteIconProps) => import('@universityofmaryland/web-builder-library').ElementModel<HTMLElement>;
|
|
6
|
-
export {};
|
|
1
|
+
import { QuoteStatementProps, QuoteIconProps } from '../_types';
|
|
2
|
+
export declare const createCompositeQuoteIcon: ({ hasImage, isThemeMaryland, isTypeFeatured, }: QuoteIconProps) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
3
|
+
export declare const createStatementQuoteIcon: ({ isThemeGold, }: Pick<QuoteStatementProps, "isThemeGold">) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
7
4
|
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/icon.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/icon.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAoF1E,eAAO,MAAM,wBAAwB,mDA9ElC,cAAc,kFA8E6C,CAAC;AAC/D,eAAO,MAAM,wBAAwB,qBApBlC,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,kFAoB4B,CAAC"}
|
|
@@ -49,8 +49,26 @@ const CreateQuoteIconElement = ({
|
|
|
49
49
|
iconSpan.element.innerHTML = quote;
|
|
50
50
|
return iconSpan;
|
|
51
51
|
};
|
|
52
|
+
const CreateQuoteStatementIconElement = ({
|
|
53
|
+
isThemeGold
|
|
54
|
+
}) => {
|
|
55
|
+
return new ElementBuilder().withClassName("statement-quote-icon").withStyles({
|
|
56
|
+
element: {
|
|
57
|
+
["& svg"]: {
|
|
58
|
+
fill: token.color.red,
|
|
59
|
+
width: "24px",
|
|
60
|
+
marginBottom: token.spacing.md,
|
|
61
|
+
...isThemeGold && {
|
|
62
|
+
fill: token.color.gold
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}).withHTML(quote).build();
|
|
67
|
+
};
|
|
52
68
|
const createCompositeQuoteIcon = CreateQuoteIconElement;
|
|
69
|
+
const createStatementQuoteIcon = CreateQuoteStatementIconElement;
|
|
53
70
|
export {
|
|
54
|
-
createCompositeQuoteIcon
|
|
71
|
+
createCompositeQuoteIcon,
|
|
72
|
+
createStatementQuoteIcon
|
|
55
73
|
};
|
|
56
74
|
//# sourceMappingURL=icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../../source/composite/quote/elements/icon.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport { quote as iconQuote } from '@universityofmaryland/web-icons-library/brand';\nimport { SMALL } from '../_constants';\nimport { type
|
|
1
|
+
{"version":3,"file":"icon.js","sources":["../../../../source/composite/quote/elements/icon.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport { quote as iconQuote } from '@universityofmaryland/web-icons-library/brand';\nimport { SMALL } from '../_constants';\nimport { type QuoteStatementProps, type QuoteIconProps } from '../_types';\n\nconst CreateQuoteIconElement = ({\n hasImage = false,\n isThemeMaryland,\n isTypeFeatured = false,\n}: QuoteIconProps) => {\n const imageWithFeaturedLayout = hasImage && isTypeFeatured;\n\n const iconSpan = new ElementBuilder('span')\n .withClassName('quote-icon-span')\n .withStyles({\n element: {\n display: 'block',\n position: 'absolute',\n\n ...(imageWithFeaturedLayout && {\n display: 'none',\n }),\n\n ...(!hasImage && {\n height: '15px',\n width: '22px',\n left: '-24px',\n top: '-32px',\n\n [`@container (min-width: ${SMALL}px)`]: {\n left: `-${token.spacing['4xl']}`,\n top: '0',\n },\n }),\n\n ...(hasImage && {\n bottom: '-7px',\n left: '-2px',\n height: '15px',\n width: '21px',\n\n [`@container (min-width: ${SMALL}px)`]: {\n height: '20px',\n width: '29px',\n top: '-11px',\n right: '-20px',\n left: 'inherit',\n },\n }),\n\n ['& svg']: {\n fill: token.color.red,\n\n ...(isThemeMaryland && {\n fill: token.color.gold,\n }),\n },\n },\n })\n .build();\n\n iconSpan.element.innerHTML = iconQuote;\n\n return iconSpan;\n};\n\nconst CreateQuoteStatementIconElement = ({\n isThemeGold,\n}: Pick<QuoteStatementProps, 'isThemeGold'>) => {\n return new ElementBuilder()\n .withClassName('statement-quote-icon')\n .withStyles({\n element: {\n ['& svg']: {\n fill: token.color.red,\n width: '24px',\n marginBottom: token.spacing.md,\n ...(isThemeGold && {\n fill: token.color.gold,\n }),\n },\n },\n })\n .withHTML(iconQuote)\n .build();\n};\n\nexport const createCompositeQuoteIcon = CreateQuoteIconElement;\nexport const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AM,MAAM;AAAA,QAClB,OAAO;AAAA,QACP,cAAc,MAAM,QAAQ;AAAA,QAC5B,GAAI,eAAe;AAAA,UACjB,MAAM,MAAM,MAAM;AAAA,QAAA;AAAA,MACpB;AAAA,IACF;AAAA,EACF,CACD,EACA,SAASA,KAAS,EAClB,MAAA;AACL;AAEO,MAAM,2BAA2B;AACjC,MAAM,2BAA2B;"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare const createCompositeQuoteImage: ({ image, isSizeLarge, isThemeMaryland, isTypeFeatured, }: QuoteImageProps) => import('@universityofmaryland/web-builder-library').ElementModel<HTMLElement>;
|
|
6
|
-
export {};
|
|
1
|
+
import { QuoteImageProps, QuoteStatementImageProps } from '../_types';
|
|
2
|
+
export declare const createCompositeQuoteImage: ({ image, isSizeLarge, isThemeMaryland, isTypeFeatured, }: QuoteImageProps) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
3
|
+
export declare const createStatementQuoteImage: ({ image, isThemeGold, }: QuoteStatementImageProps) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLImageElement>;
|
|
7
4
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/image.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/image.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAsFhF,eAAO,MAAM,yBAAyB,6DA/EnC,eAAe,kFA+E8C,CAAC;AACjE,eAAO,MAAM,yBAAyB,4BAtBnC,wBAAwB,uFAsByC,CAAC"}
|
|
@@ -45,8 +45,29 @@ const CreateQuoteImageElement = ({
|
|
|
45
45
|
container.withChild(imageElement);
|
|
46
46
|
return container.build();
|
|
47
47
|
};
|
|
48
|
+
const CreateStatementImageElement = ({
|
|
49
|
+
image,
|
|
50
|
+
isThemeGold
|
|
51
|
+
}) => new ElementBuilder(image).withClassName("statement-image").styled({
|
|
52
|
+
element: {
|
|
53
|
+
position: "absolute",
|
|
54
|
+
transform: "translate(-50%, -50%)",
|
|
55
|
+
left: "50%",
|
|
56
|
+
top: 0,
|
|
57
|
+
objectFit: "cover",
|
|
58
|
+
aspectRatio: "1 / 1",
|
|
59
|
+
border: `4px solid ${token.color.red}`,
|
|
60
|
+
width: "100px",
|
|
61
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 16px rgba(0, 0, 0, 0.08), 0 24px 40px rgba(0, 0, 0, 0.10)",
|
|
62
|
+
...isThemeGold && {
|
|
63
|
+
border: `4px solid ${token.color.gold}`
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}).build();
|
|
48
67
|
const createCompositeQuoteImage = CreateQuoteImageElement;
|
|
68
|
+
const createStatementQuoteImage = CreateStatementImageElement;
|
|
49
69
|
export {
|
|
50
|
-
createCompositeQuoteImage
|
|
70
|
+
createCompositeQuoteImage,
|
|
71
|
+
createStatementQuoteImage
|
|
51
72
|
};
|
|
52
73
|
//# sourceMappingURL=image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sources":["../../../../source/composite/quote/elements/image.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport { createCompositeQuoteIcon as elementIcon } from './icon';\nimport { SMALL } from '../_constants';\nimport {
|
|
1
|
+
{"version":3,"file":"image.js","sources":["../../../../source/composite/quote/elements/image.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport { createCompositeQuoteIcon as elementIcon } from './icon';\nimport { SMALL } from '../_constants';\nimport { type QuoteImageProps, type QuoteStatementImageProps } from '../_types';\n\nconst CreateQuoteImageElement = ({\n image,\n isSizeLarge,\n isThemeMaryland,\n isTypeFeatured,\n}: QuoteImageProps) => {\n const iconSpan = elementIcon({\n hasImage: image != null,\n isTypeFeatured,\n isThemeMaryland,\n });\n\n const imageElement = new ElementBuilder(image)\n .withClassName('quote-image')\n .withStyles({\n element: {\n maxWidth: '100%',\n height: 'auto',\n\n ...(!isTypeFeatured && {\n maxWidth: '160px',\n\n [`@container (min-width: ${SMALL}px)`]: {\n borderRight: `2px solid ${token.color.red}`,\n },\n }),\n\n ...(!isTypeFeatured && isSizeLarge && { maxWidth: '200px' }),\n\n ...(!isTypeFeatured &&\n isThemeMaryland && {\n borderRight: `2px solid ${token.color.gold}`,\n }),\n },\n })\n .build();\n\n const container = new ElementBuilder()\n .withClassName('quote-image-container')\n .withStyles({\n element: {\n display: 'inline-block',\n position: 'relative',\n\n ...(!isTypeFeatured && {\n marginBottom: token.spacing.sm,\n position: 'relative',\n }),\n },\n });\n\n if (!isTypeFeatured) {\n container.withChild(iconSpan);\n }\n\n container.withChild(imageElement);\n\n return container.build();\n};\n\nconst CreateStatementImageElement = ({\n image,\n isThemeGold,\n}: QuoteStatementImageProps) =>\n new ElementBuilder(image)\n .withClassName('statement-image')\n .styled({\n element: {\n position: 'absolute',\n transform: 'translate(-50%, -50%)',\n left: '50%',\n top: 0,\n objectFit: 'cover',\n aspectRatio: '1 / 1',\n border: `4px solid ${token.color.red}`,\n width: '100px',\n boxShadow:\n '0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 16px rgba(0, 0, 0, 0.08), 0 24px 40px rgba(0, 0, 0, 0.10)',\n ...(isThemeGold && {\n border: `4px solid ${token.color.gold}`,\n }),\n },\n })\n .build();\nexport const createCompositeQuoteImage = CreateQuoteImageElement;\nexport const createStatementQuoteImage = CreateStatementImageElement;\n"],"names":["elementIcon"],"mappings":";;;;AAMA,MAAM,0BAA0B,CAAC;AAAA,EAC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AAG;AAAA,IACpC,OAAO;AAAA,IACP,WACE;AAAA,IACF,GAAI,eAAe;AAAA,MACjB,QAAQ,aAAa,MAAM,MAAM,IAAI;AAAA,IAAA;AAAA,EACvC;AAEJ,CAAC,EACA,MAAA;AACE,MAAM,4BAA4B;AAClC,MAAM,4BAA4B;"}
|
|
@@ -3,4 +3,6 @@ export { createCompositeQuoteText as text } from './text';
|
|
|
3
3
|
export { createCompositeQuoteIcon as icon } from './icon';
|
|
4
4
|
export { createCompositeQuoteAction as action } from './action';
|
|
5
5
|
export { createCompositeQuote as quote } from './quote';
|
|
6
|
+
export { createStatementQuoteHeadline as statementHeadline, createStatementQuoteAttribution as statementAttribution, } from './text';
|
|
7
|
+
export { createStatementQuoteAction as statementAction } from './action';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,wBAAwB,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,wBAAwB,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,0BAA0B,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,oBAAoB,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,wBAAwB,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,wBAAwB,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,0BAA0B,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,oBAAoB,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EACL,4BAA4B,IAAI,iBAAiB,EACjD,+BAA+B,IAAI,oBAAoB,GACxD,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,0BAA0B,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { createCompositeQuoteImage } from "./image.js";
|
|
2
|
-
import { createCompositeQuoteText } from "./text.js";
|
|
2
|
+
import { createStatementQuoteAttribution, createStatementQuoteHeadline, createCompositeQuoteText } from "./text.js";
|
|
3
3
|
import { createCompositeQuoteIcon } from "./icon.js";
|
|
4
|
-
import { createCompositeQuoteAction } from "./action.js";
|
|
4
|
+
import { createCompositeQuoteAction, createStatementQuoteAction } from "./action.js";
|
|
5
5
|
import { createCompositeQuote } from "./quote.js";
|
|
6
6
|
export {
|
|
7
7
|
createCompositeQuoteAction as action,
|
|
8
8
|
createCompositeQuoteIcon as icon,
|
|
9
9
|
createCompositeQuoteImage as image,
|
|
10
10
|
createCompositeQuote as quote,
|
|
11
|
+
createStatementQuoteAction as statementAction,
|
|
12
|
+
createStatementQuoteAttribution as statementAttribution,
|
|
13
|
+
createStatementQuoteHeadline as statementHeadline,
|
|
11
14
|
createCompositeQuoteText as text
|
|
12
15
|
};
|
|
13
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
shouldHaveWhiteText?: boolean;
|
|
5
|
-
quote: HTMLElement;
|
|
6
|
-
}
|
|
7
|
-
export declare const createCompositeQuote: (props: QuoteProps) => import('@universityofmaryland/web-builder-library').ElementModel<HTMLElement>;
|
|
8
|
-
export {};
|
|
1
|
+
import { QuoteProps, QuoteStatementQuoteProps } from '../_types';
|
|
2
|
+
export declare const createCompositeQuote: (props: QuoteProps) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
3
|
+
export declare const createStatementQuote: ({ quote }: QuoteStatementQuoteProps) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
9
4
|
//# sourceMappingURL=quote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/quote.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/quote.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAsH3E,eAAO,MAAM,oBAAoB,UA5FE,UAAU,kFA4FS,CAAC;AACvD,eAAO,MAAM,oBAAoB,cAde,wBAAwB,kFAcT,CAAC"}
|
|
@@ -83,8 +83,18 @@ const CreateQuoteElement = (props) => {
|
|
|
83
83
|
}
|
|
84
84
|
return builder.build();
|
|
85
85
|
};
|
|
86
|
+
const CreateStatementQuoteElement = ({ quote }) => new ElementBuilder(quote).withClassName("statement-quote").withStyles({
|
|
87
|
+
element: {
|
|
88
|
+
color: token.color.gray.dark,
|
|
89
|
+
lineHeight: token.spacing.md,
|
|
90
|
+
fontSize: token.font.size.base,
|
|
91
|
+
textAlign: "left"
|
|
92
|
+
}
|
|
93
|
+
}).build();
|
|
86
94
|
const createCompositeQuote = CreateQuoteElement;
|
|
95
|
+
const createStatementQuote = CreateStatementQuoteElement;
|
|
87
96
|
export {
|
|
88
|
-
createCompositeQuote
|
|
97
|
+
createCompositeQuote,
|
|
98
|
+
createStatementQuote
|
|
89
99
|
};
|
|
90
100
|
//# sourceMappingURL=quote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.js","sources":["../../../../source/composite/quote/elements/quote.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport * as typography from '@universityofmaryland/web-styles-library/typography';\nimport { theme } from '@universityofmaryland/web-utilities-library/theme';\nimport { createCompositeQuoteIcon as elementIcon } from './icon';\nimport { SMALL } from '../_constants';\nimport { type
|
|
1
|
+
{"version":3,"file":"quote.js","sources":["../../../../source/composite/quote/elements/quote.ts"],"sourcesContent":["import { ElementBuilder } from '@universityofmaryland/web-builder-library';\nimport * as token from '@universityofmaryland/web-token-library';\nimport * as typography from '@universityofmaryland/web-styles-library/typography';\nimport { theme } from '@universityofmaryland/web-utilities-library/theme';\nimport { createCompositeQuoteIcon as elementIcon } from './icon';\nimport { SMALL } from '../_constants';\nimport { type QuoteProps, type QuoteStatementQuoteProps } from '../_types';\n\nconst splitWords = (quote: HTMLElement) => {\n const text = quote.textContent ?? '';\n const words = text.trim().split(/\\s+/);\n\n const wordElements = words.map((word, index) => {\n const wordElement = document.createElement('span');\n wordElement.classList.add('quote-text-split-word');\n\n Object.assign(wordElement.style, {\n display: 'inline-block',\n whiteSpace: 'pre-wrap',\n opacity: '0',\n transform: 'translateY(20px)',\n transition: 'opacity 1s ease, transform 0.5s ease',\n });\n\n wordElement.textContent = word + (index < words.length - 1 ? ' ' : '');\n\n return wordElement;\n });\n\n return wordElements;\n};\n\nconst CreateQuoteElement = (props: QuoteProps) => {\n const {\n hasImage = false,\n includesAnimation = false,\n isSizeLarge = false,\n isThemeMaryland = false,\n isTypeFeatured = false,\n quote,\n shouldHaveWhiteText = false,\n } = props;\n\n const isHasImageAndNotFeatured = hasImage && !isTypeFeatured;\n const iconSpan = elementIcon(props);\n const wordsList = splitWords(quote);\n let quoteTextElement: HTMLElement = quote;\n\n if (includesAnimation) {\n quoteTextElement = document.createElement('div');\n\n wordsList.map((word) => {\n quoteTextElement.appendChild(word);\n });\n }\n\n const fontStyles = isSizeLarge\n ? typography.sans.compose('extralarge', {\n theme: theme.fontColor(shouldHaveWhiteText),\n })\n : typography.sans.compose('larger', {\n theme: theme.fontColor(shouldHaveWhiteText),\n });\n\n const builder = new ElementBuilder(quoteTextElement)\n .styled(fontStyles)\n .withClassName('quote-container-quote')\n .withStyles({\n element: {\n position: 'relative',\n fontWeight: '700',\n\n ['& *']: {\n color: 'currentColor',\n },\n\n [`&::before`]: {\n content: '\"\"',\n position: 'absolute',\n left: `-${token.spacing.md}`,\n top: '7px',\n height: 'calc(100% - 14px)',\n width: '2px',\n display: 'block',\n backgroundColor: token.color.red,\n ...(isThemeMaryland && { backgroundColor: token.color.gold }),\n\n ...(isHasImageAndNotFeatured && {\n display: 'none',\n }),\n\n [`@container (min-width: ${SMALL}px)`]: {\n left: `-${token.spacing.md}`,\n },\n\n [`@container (max-width: ${SMALL - 1}px)`]: {\n ...(!isTypeFeatured && {\n display: 'block',\n }),\n },\n },\n },\n });\n\n if (!hasImage) {\n builder.withChild(iconSpan);\n }\n\n return builder.build();\n};\n\nconst CreateStatementQuoteElement = ({ quote }: QuoteStatementQuoteProps) =>\n new ElementBuilder(quote)\n .withClassName('statement-quote')\n .withStyles({\n element: {\n color: token.color.gray.dark,\n lineHeight: token.spacing.md,\n fontSize: token.font.size.base,\n textAlign: 'left',\n },\n })\n .build();\n\nexport const createCompositeQuote = CreateQuoteElement;\nexport const createStatementQuote = CreateStatementQuoteElement;\n"],"names":["elementIcon"],"mappings":";;;;;;AAQA,MAAM,aAAa,CAAC,UAAuB;AACzC,QAAM,OAAO,MAAM,eAAe;AAClC,QAAM,QAAQ,KAAK,KAAA,EAAO,MAAM,KAAK;AAErC,QAAM,eAAe,MAAM,IAAI,CAAC,MAAM,UAAU;AAC9C,UAAM,cAAc,SAAS,cAAc,MAAM;AACjD,gBAAY,UAAU,IAAI,uBAAuB;AAEjD,WAAO,OAAO,YAAY,OAAO;AAAA,MAC/B,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,WAAW;AAAA,MACX,YAAY;AAAA,IAAA,CACb;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4BAA4B;AAAA,UAC9B,SAAS;AAAA,QAAA;AAAA,QAGX,CAAC,0BAA0B,KAAK,KAAK,GAAG;AAAA,UACtC,MAAM,IAAI,MAAM,QAAQ,EAAE;AAAA,QAAA;AAAA,QAG5B,CAAC,0BAA0B,QAAQ,CAAC,KAAK,GAAG;AAAA,UAC1C,GAAI,CAAC,kBAAkB;AAAA,YACrB,SAAS;AAAA,UAAA;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF,CACD;AAEH,MAAI,CAAC,UAAU;AACb,YAAQ,UAAU,QAAQ;AAAA,EAC5B;AAEA,SAAO,QAAQ,MAAA;AACjB;AAEA,MAAM,8BAA8B,CAAC,EAAE,MAAA,MACrC,IAAI,eAAe,KAAK,EACrB,cAAc,iBAAiB,EAC/B,WAAW;AAAA,EACV,SAAS;AAAA,IACP,OAAO,MAAM,MAAM,KAAK;AAAA,IACxB,YAAY,MAAM,QAAQ;AAAA,IAC1B,UAAU,MAAM,KAAK,KAAK;AAAA,IAC1B,WAAW;AAAA,EAAA;AAEf,CAAC,EACA,MAAA;AAEE,MAAM,uBAAuB;AAC7B,MAAM,uBAAuB;"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { QuoteTextProps } from '../_types';
|
|
2
|
-
|
|
1
|
+
import { QuoteStatementProps, QuoteTextProps } from '../_types';
|
|
2
|
+
import { ElementModel } from '../../../_types';
|
|
3
|
+
export declare const createCompositeQuoteText: (props: Pick<QuoteTextProps, "isThemeDark" | "isThemeMaryland" | "isSizeLarge" | "isTypeFeatured" | "image" | "quote" | "attribution" | "attributionSubText" | "action" | "includesAnimation">) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
4
|
+
export declare const createStatementQuoteHeadline: ({ headline, }: Pick<QuoteStatementProps, "headline">) => ElementModel<HTMLElement> | null;
|
|
5
|
+
export declare const createStatementQuoteAttribution: ({ attribution, attributionSubText, }: Pick<QuoteStatementProps, "attribution" | "attributionSubText">) => ElementModel<HTMLElement> | null;
|
|
3
6
|
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/text.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../source/composite/quote/elements/text.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,cAAc,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA0OpD,eAAO,MAAM,wBAAwB,UAlE5B,IAAI,CACT,cAAc,EACZ,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,aAAa,GACb,oBAAoB,GACpB,QAAQ,GACR,mBAAmB,CACtB,kFAsD2D,CAAC;AAC/D,eAAO,MAAM,4BAA4B,kBAtItC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,KAAG,YAAY,CAAC,WAAW,CAAC,GAAG,IAsIC,CAAC;AACzE,eAAO,MAAM,+BAA+B,yCAnHzC,IAAI,CACL,mBAAmB,EACnB,aAAa,GAAG,oBAAoB,CACrC,KAAG,YAAY,CAAC,WAAW,CAAC,GAAG,IAgH8C,CAAC"}
|