@carbon/ibm-products-web-components 0.43.0 → 0.44.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/custom-elements.json +24 -0
- package/es/components/about-modal/about-modal.scss.js +1 -1
- package/es/components/action-set/action-set.scss.js +1 -1
- package/es/components/add-select/add-select-body.scss.js +1 -1
- package/es/components/add-select/add-select-content.scss.js +1 -1
- package/es/components/add-select/add-select-row.scss.js +1 -1
- package/es/components/add-select/add-select.scss.js +1 -1
- package/es/components/big-number/big-number.js +3 -3
- package/es/components/big-number/big-number.js.map +1 -1
- package/es/components/big-number/big-number.scss.js +1 -1
- package/es/components/coachmark/coachmark-header.d.ts.map +1 -1
- package/es/components/coachmark/coachmark-header.js +1 -0
- package/es/components/coachmark/coachmark-header.js.map +1 -1
- package/es/components/coachmark/coachmark.d.ts +13 -0
- package/es/components/coachmark/coachmark.d.ts.map +1 -1
- package/es/components/coachmark/coachmark.js +139 -15
- package/es/components/coachmark/coachmark.js.map +1 -1
- package/es/components/coachmark/coachmark.scss.js +1 -1
- package/es/components/coachmark/coachmark.scss.js.map +1 -1
- package/es/components/page-header/page-header-breadcrumbs-set/page-header-breadcrumbs-set.scss.js +1 -1
- package/es/components/page-header/page-header-tags-set/page-header-tags-set.scss.js +1 -1
- package/es/components/tearsheet/tearsheet.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet-header-content.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet-header.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet-navigation-bar.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet.scss.js +1 -1
- package/es/ibm-products-web-components/package.js +1 -1
- package/es/utilities/makeDraggable/makeDraggable.d.ts +8 -2
- package/es/utilities/makeDraggable/makeDraggable.d.ts.map +1 -1
- package/es/utilities/makeDraggable/makeDraggable.js +87 -17
- package/es/utilities/makeDraggable/makeDraggable.js.map +1 -1
- package/es-custom/components/about-modal/about-modal.scss.js +1 -1
- package/es-custom/components/action-set/action-set.scss.js +1 -1
- package/es-custom/components/add-select/add-select-body.scss.js +1 -1
- package/es-custom/components/add-select/add-select-content.scss.js +1 -1
- package/es-custom/components/add-select/add-select-row.scss.js +1 -1
- package/es-custom/components/add-select/add-select.scss.js +1 -1
- package/es-custom/components/big-number/big-number.js +3 -3
- package/es-custom/components/big-number/big-number.js.map +1 -1
- package/es-custom/components/big-number/big-number.scss.js +1 -1
- package/es-custom/components/coachmark/coachmark-header.js +1 -0
- package/es-custom/components/coachmark/coachmark-header.js.map +1 -1
- package/es-custom/components/coachmark/coachmark.js +139 -15
- package/es-custom/components/coachmark/coachmark.js.map +1 -1
- package/es-custom/components/coachmark/coachmark.scss.js +1 -1
- package/es-custom/components/coachmark/coachmark.scss.js.map +1 -1
- package/es-custom/components/page-header/page-header-breadcrumbs-set/page-header-breadcrumbs-set.scss.js +1 -1
- package/es-custom/components/page-header/page-header-tags-set/page-header-tags-set.scss.js +1 -1
- package/es-custom/components/tearsheet/tearsheet.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-header-content.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-header.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-navigation-bar.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet.scss.js +1 -1
- package/es-custom/ibm-products-web-components/package.js +1 -1
- package/es-custom/utilities/makeDraggable/makeDraggable.js +87 -17
- package/es-custom/utilities/makeDraggable/makeDraggable.js.map +1 -1
- package/lib/components/coachmark/coachmark-header.d.ts.map +1 -1
- package/lib/components/coachmark/coachmark.d.ts +13 -0
- package/lib/components/coachmark/coachmark.d.ts.map +1 -1
- package/lib/utilities/makeDraggable/makeDraggable.d.ts +8 -2
- package/lib/utilities/makeDraggable/makeDraggable.d.ts.map +1 -1
- package/package.json +11 -11
- package/scss/components/coachmark/coachmark.scss +17 -1
- package/telemetry.yml +2 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { css } from "lit";
|
|
9
9
|
//#region src/components/tearsheet-preview/tearsheet.scss?lit
|
|
10
|
-
var tearsheet_default = css(["@keyframes cds--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds--skeleton{0%{opacity:.3;transform:scaleX(0);transform-origin:left}20%{opacity:1;transform:scaleX(1);transform-origin:left}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}to{opacity:.3;transform:scaleX(0);transform-origin:left}}.cds--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs,1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xs,1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm,2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-sm,2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm,2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm,2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md,2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-md,2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md,2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md,2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg,3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-lg,3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg,3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg,3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl,4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xl,4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl,4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl,4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl,5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-2xl,5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl,5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl,5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed,0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-condensed,0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal,1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-normal,1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal,1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal,1rem)}:root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}.cds--assistive-text,.cds--visually-hidden{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px;visibility:inherit;white-space:nowrap}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted){animation:c4p--tearsheet__next--presence-tearsheet__enter .24s cubic-bezier(0,0,.3,1);opacity:1}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__enter .24s cubic-bezier(0,0,.3,1);transform:translateZ(0)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next--stacked.is-visible .c4p--tearsheet__next__container{transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting]{animation:c4p--tearsheet__next--presence-tearsheet__exit .24s cubic-bezier(.4,.14,1,1) forwards}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__exit .24s cubic-bezier(0,0,.3,1) forwards}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next--keep-mounted:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}@keyframes c4p--tearsheet__next--presence-tearsheet__enter{0%{opacity:0;transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet__exit{to{opacity:0}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__enter{0%{transform:translate3d(0,min(95vh,500px),0);transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__exit{to{transform:translate3d(0,min(95vh,500px),0)}}.c4p--tearsheet__next .c4p--tearsheet__next__container{align-self:flex-end;block-size:100%;border:1px solid var(--cds-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem)));max-inline-size:var(--tearsheet-max-inline-size,1312px)}@media (max-width:41.98rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--stack-activated.is-visible) .c4p--tearsheet__next__container{max-block-size:none}}.c4p--tearsheet__next:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__container{background:linear-gradient(to top,var(--cds-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__main-content{background:linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-ai-inner-shadow,rgba(69,137,255,.1));position:relative}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header{align-content:space-between;border-block-end:1px solid var(--cds-border-subtle-01,#c6c6c6);display:flex;flex-wrap:wrap;margin-block:0;max-block-size:50vh;padding-block-end:0;padding-block-start:1.5rem;padding-inline:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header>*{flex-basis:100%}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button){margin-block-end:1.5rem}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header{padding-inline:1rem}}.c4p--tearsheet__next .cds--modal-container--sm .cds--modal-header{padding-inline-end:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:grid;flex-basis:unset;gap:1rem;grid-template-columns:minmax(auto,40rem) minmax(var(--tearsheet-header-title-grid-width,0),1fr);inline-size:calc(100% - var(--tearsheet-header-action-offset))}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}}@media (min-width:42rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-actions{order:2}.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content{order:1}}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse){max-block-size:50vh;opacity:1;overflow:hidden;transition:max-block-size .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1);visibility:hidden}.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){opacity:1;transition:all .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1)}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{padding-block-start:.75rem;transition:padding .24s cubic-bezier(0,0,.3,1)}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse) *{margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:all .24s cubic-bezier(0,0,.3,1);visibility:hidden}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{align-items:center;font-size:var(--cds-label-02-font-size,.875rem);font-weight:var(--cds-label-02-font-weight,400);letter-spacing:var(--cds-label-02-letter-spacing,.16px);line-height:var(--cds-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title>span{align-items:center;block-size:1.5rem;display:flex}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end svg,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-start svg{inline-size:1rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:center;margin-block-end:0}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{margin-block-start:-.125rem}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{margin-block:0;transition:margin-block .24s ease}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper{min-block-size:2.5rem;padding-block-end:.75rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__navigation-bar:before{background:var(--cds-border-subtle-01,#c6c6c6);block-size:1px;content:\"\";inline-size:calc(100% + 5rem);inset-block-start:0;inset-inline-start:-2rem;pointer-events:none;position:absolute;z-index:1}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible{--overlay-color:var(--cds-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5;background-color:initial;z-index:calc(9000 - var(--stack-depth, 0))}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);position:absolute;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1)}@media (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{transition:none}}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible.is-visible .c4p--tearsheet__next__container{max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next__header-label{color:var(--cds-text-secondary,#525252);font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin-block-end:.25rem}.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);letter-spacing:var(--cds-heading-04-letter-spacing,0);line-height:var(--cds-heading-04-line-height,1.28572)}@media (max-width:41.98rem){.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}}.c4p--tearsheet__next__header-title{align-items:flex-start;display:flex;gap:1rem;margin-block-end:.5rem}.c4p--tearsheet__next__header-title svg{flex-shrink:0}.c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end{margin-inline-start:1rem}.c4p--tearsheet__next__header-description{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);line-height:var(--cds-body-compact-01-line-height,1.28572)}.c4p--tearsheet__next__header--no-close-icon{display:none}.c4p--tearsheet__next__decorator{inset-block-start:.625rem;inset-inline-end:3rem;position:absolute}.c4p--tearsheet__next__navigation-bar{align-items:center;display:flex;gap:.125rem;justify-content:space-between;max-inline-size:calc(100% - .75rem);min-block-size:2.5rem;position:relative}.c4p--tearsheet__next__navigation-bar .cds--tabs{margin-inline-start:-1rem}.c4p--tearsheet__next__scroller-container{inset-block-end:0;inset-inline-end:-2.5rem;position:absolute}@media (max-width:41.98rem){.c4p--tearsheet__next__scroller-container{inset-inline-end:-1.5rem}}.c4p--tearsheet__next__scroller-container .c4p--tearsheet__next__scroller-button-icon-collapsed{transform:rotate(-180deg)}.c4p--tearsheet__next__header-actions{display:flex;justify-content:flex-end}.c4p--tearsheet__next__content__header-actions{align-items:center;block-size:2rem;display:flex;flex:0 0 auto;inline-size:100%;justify-content:flex-end;margin-block-start:-14px;overflow:hidden}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]){margin-inline-end:.5rem}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]):nth-last-child(2){margin-inline-end:0}.c4p--tearsheet__next__content__header-actions>*{flex-shrink:0}@media (max-width:41.98rem){.c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}}.c4p--tearsheet__next__header-actions,.c4p--tearsheet__next__header-content{margin-block-end:1.5rem}@media (min-width:42rem){.c4p--tearsheet__next--wide .c4p--tearsheet__next__container{inline-size:calc(100% - 8rem)}}.c4p--tearsheet__next__body-layout{display:grid;grid-template-areas:\"influencer body\" \"influencer footer\";grid-template-columns:var(--tearsheet-influencer-width,16rem) 1fr;grid-template-rows:1fr auto;padding-block:0;padding-inline-end:0}.c4p--tearsheet__next__body-layout:not(.c4p--tearsheet__next__body-layout--has-influencer){grid-template-areas:\"body\" \"footer\";grid-template-columns:1fr}.c4p--tearsheet__next__influencer,:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){border-inline-end:1px solid var(--cds-border-subtle-01,#c6c6c6);grid-area:influencer}.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){display:grid;grid-area:body;grid-template-columns:1fr var(--tearsheet-summary-content-width,16rem);overflow:hidden;position:relative}@media (max-width:41.98rem){.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}}.c4p--tearsheet__next__body>:only-child,:host(c4p-preview-tearsheet) ::slotted([slot=body])>:only-child{grid-column:1/-1}.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:5rem;border-block-start:1px solid var(--cds-border-subtle-01,#c6c6c6);grid-area:footer;overflow:hidden}@media (max-width:41.98rem){.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:4rem}}@media (max-width:19.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}@media (max-width:41.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}.c4p--tearsheet__next__influencer,.c4p--tearsheet__next__main-content,.c4p--tearsheet__next__summary-content,:host ::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){overflow:auto}.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:2rem}@media (max-width:41.98rem){.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}}.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline:2px solid var(--cds-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline-style:dotted}}.c4p--tearsheet__next__side-panel,:host c4p-side-panel::part(dialog){block-size:100%;inline-size:100%!important;inset-block-start:0;max-inline-size:none;position:absolute;z-index:9999}.c4p--tearsheet__next__side-panel .c4p--side-panel__header,:host c4p-side-panel::part(dialog) .c4p--side-panel__header{min-block-size:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header{padding-inline:1rem}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:flex-start}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=body]){grid-template-columns:1fr 0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=footer]){block-size:4rem}.c4p--tearsheet__next--has-ai-label::part(dialog){background:linear-gradient(to top,var(--cds-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent!important;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next__main-content{position:relative}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__flush{padding-inline:0}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--no-summary{grid-column:1/-1}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--has-ai-label{background:linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-ai-inner-shadow,rgba(69,137,255,.1))}:host ::slotted([slot=summary-content]:focus){outline:2px solid var(--cds-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){:host ::slotted([slot=summary-content]:focus){outline-style:dotted}}:host ::slotted([slot=summary-content][is-flush]){padding-inline:0}@media screen and (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:none}}:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}:host(c4p-preview-tearsheet) ::slotted([slot=influencer][is-flush]){padding-inline:0}:host(c4p-preview-tearsheet[open]) ::part(dialog){transform:translateZ(0);transition:transform .24s cubic-bezier(0,0,.3,1)}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet[open]) ::part(dialog){transition:none}}@media (max-width:41.98rem){:host(:not(.c4p--tearsheet__next--stack-activated.is-visible)) ::part(dialog){max-block-size:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible){--overlay-color:var(--cds-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);pointer-events:none;position:fixed;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1);z-index:calc(9000 - var(--stack-depth, 0))}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{transition:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) cds-modal{background-color:transparent}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) ::part(dialog){max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header{padding-inline:1rem}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet[variant=narrow]):host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0!important}@media (max-width:41.98rem){:host(c4p-preview-tearsheet) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet) ::slotted([slot=summary-content]){padding:0!important}}:host-context(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0}:host ::slotted([slot=footer]){padding-block:0}"]);
|
|
10
|
+
var tearsheet_default = css(["@keyframes cds--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds--skeleton{0%{opacity:.3;transform:scaleX(0);transform-origin:left}20%{opacity:1;transform:scaleX(1);transform-origin:left}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}to{opacity:.3;transform:scaleX(0);transform-origin:left}}.cds--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs,1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xs,1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm,2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-sm,2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm,2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm,2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md,2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-md,2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md,2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md,2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg,3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-lg,3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg,3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg,3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl,4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xl,4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl,4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl,4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl,5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-2xl,5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl,5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl,5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed,0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-condensed,0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal,1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-normal,1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal,1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal,1rem)}:root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}.cds--assistive-text,.cds--visually-hidden{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px;visibility:inherit;white-space:nowrap}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted){animation:c4p--tearsheet__next--presence-tearsheet__enter .24s cubic-bezier(0,0,.3,1);opacity:1}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__enter .24s cubic-bezier(0,0,.3,1);transform:translateZ(0)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next--stacked.is-visible .c4p--tearsheet__next__container{transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting]{animation:c4p--tearsheet__next--presence-tearsheet__exit .24s cubic-bezier(.4,.14,1,1) forwards}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__exit .24s cubic-bezier(0,0,.3,1) forwards}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next--keep-mounted:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}@keyframes c4p--tearsheet__next--presence-tearsheet__enter{0%{opacity:0;transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet__exit{to{opacity:0}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__enter{0%{transform:translate3d(0,min(95vh,500px),0);transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__exit{to{transform:translate3d(0,min(95vh,500px),0)}}.c4p--tearsheet__next .c4p--tearsheet__next__container{align-self:flex-end;block-size:100%;border:1px solid var(--cds-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem)));max-inline-size:var(--tearsheet-max-inline-size,1312px)}@media (max-width:41.98rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--stack-activated.is-visible) .c4p--tearsheet__next__container{max-block-size:none}}.c4p--tearsheet__next:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__container{background:linear-gradient(to top,var(--cds-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__main-content{background:linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-ai-inner-shadow,rgba(69,137,255,.1));position:relative}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header{align-content:space-between;border-block-end:1px solid var(--cds-border-subtle-01,#c6c6c6);display:flex;flex-wrap:wrap;margin-block:0;max-block-size:50vh;padding-block-end:0;padding-block-start:1.5rem;padding-inline:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header>*{flex-basis:100%}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button){margin-block-end:1.5rem}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header{padding-inline:1rem}}.c4p--tearsheet__next .cds--modal-container--sm .cds--modal-header{padding-inline-end:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:grid;flex-basis:unset;gap:1rem;grid-template-columns:minmax(auto,40rem) minmax(var(--tearsheet-header-title-grid-width,0),1fr);inline-size:calc(100% - var(--tearsheet-header-action-offset))}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}}@media (min-width:42rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-actions{order:2}.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content{order:1}}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse){max-block-size:50vh;opacity:1;overflow:hidden;transition:max-block-size .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1)}.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){opacity:1;transition:all .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1)}.c4p--tearsheet__next .cds--modal-close{transition:all .24s ease}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{padding-block-start:0;transition:padding .24s cubic-bezier(0,0,.3,1)}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse) *{margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:all .24s cubic-bezier(0,0,.3,1);visibility:hidden}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{align-items:center;font-size:var(--cds-label-02-font-size,.875rem);font-weight:var(--cds-label-02-font-weight,400);gap:.5rem;letter-spacing:var(--cds-label-02-letter-spacing,.16px);line-height:var(--cds-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title>span{align-items:center;block-size:1.5rem;display:flex}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end svg,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-start svg{inline-size:1rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:center;margin-block-end:0}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .cds--modal-close{block-size:2.5rem;inline-size:2.5rem;transition:all .24s ease}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__decorator{inset-block-start:.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{block-size:2.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{block-size:1.5rem;margin-block-start:.5rem;transition:all .24s ease}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{margin-block:0;transition:margin-block .24s ease}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper{min-block-size:2.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__navigation-bar:before{background:var(--cds-border-subtle-01,#c6c6c6);block-size:1px;content:\"\";inline-size:calc(100% + 5rem);inset-block-start:0;inset-inline-start:-2rem;pointer-events:none;position:absolute;z-index:1}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible{--overlay-color:var(--cds-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5;background-color:initial;z-index:calc(9000 - var(--stack-depth, 0))}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);position:absolute;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1)}@media (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{transition:none}}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible.is-visible .c4p--tearsheet__next__container{max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next__header-label{color:var(--cds-text-secondary,#525252);font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin-block-end:.25rem}.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);letter-spacing:var(--cds-heading-04-letter-spacing,0);line-height:var(--cds-heading-04-line-height,1.28572)}@media (max-width:41.98rem){.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}}.c4p--tearsheet__next__header-title{align-items:flex-start;display:flex;gap:1rem;margin-block-end:.5rem}.c4p--tearsheet__next__header-title svg{flex-shrink:0}.c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end{margin-inline-start:1rem}.c4p--tearsheet__next__header-description{font-size:var(--cds-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);line-height:var(--cds-body-compact-01-line-height,1.28572)}.c4p--tearsheet__next__header--no-close-icon{display:none}.c4p--tearsheet__next__decorator{inset-block-start:.625rem;inset-inline-end:3rem;position:absolute}.c4p--tearsheet__next__navigation-bar{align-items:center;display:flex;gap:.125rem;justify-content:space-between;max-inline-size:calc(100% - .75rem);min-block-size:2.5rem;position:relative}.c4p--tearsheet__next__navigation-bar .cds--tabs{margin-inline-start:-1rem}.c4p--tearsheet__next__scroller-container{inset-block-end:0;inset-inline-end:-2.5rem;position:absolute}@media (max-width:41.98rem){.c4p--tearsheet__next__scroller-container{inset-inline-end:-1.5rem}}.c4p--tearsheet__next__scroller-container .c4p--tearsheet__next__scroller-button-icon-collapsed{transform:rotate(-180deg)}.c4p--tearsheet__next__header-actions{display:flex;justify-content:flex-end}.c4p--tearsheet__next__content__header-actions{align-items:center;block-size:2rem;display:flex;flex:0 0 auto;inline-size:100%;justify-content:flex-end;margin-block-start:-14px;overflow:hidden}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]){margin-inline-end:.5rem}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]):nth-last-child(2){margin-inline-end:0}.c4p--tearsheet__next__content__header-actions>*{flex-shrink:0}@media (max-width:41.98rem){.c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}}.c4p--tearsheet__next__header-actions,.c4p--tearsheet__next__header-content{margin-block-end:1.5rem}@media (min-width:42rem){.c4p--tearsheet__next--wide .c4p--tearsheet__next__container{inline-size:calc(100% - 8rem)}}.c4p--tearsheet__next__body-layout{display:grid;grid-template-areas:\"influencer body\" \"influencer footer\";grid-template-columns:var(--tearsheet-influencer-width,16rem) 1fr;grid-template-rows:1fr auto;padding-block:0;padding-inline-end:0}.c4p--tearsheet__next__body-layout:not(.c4p--tearsheet__next__body-layout--has-influencer){grid-template-areas:\"body\" \"footer\";grid-template-columns:1fr}.c4p--tearsheet__next__influencer,:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){border-inline-end:1px solid var(--cds-border-subtle-01,#c6c6c6);grid-area:influencer}.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){display:grid;grid-area:body;grid-template-columns:1fr var(--tearsheet-summary-content-width,16rem);overflow:hidden;position:relative}@media (max-width:41.98rem){.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}}.c4p--tearsheet__next__body>:only-child,:host(c4p-preview-tearsheet) ::slotted([slot=body])>:only-child{grid-column:1/-1}.c4p--tearsheet__next__body .cds--tab-content,:host(c4p-preview-tearsheet) ::slotted([slot=body]) .cds--tab-content{padding:0}.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:5rem;border-block-start:1px solid var(--cds-border-subtle-01,#c6c6c6);grid-area:footer;overflow:hidden}@media (max-width:41.98rem){.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:4rem}}@media (max-width:19.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}@media (max-width:41.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}.c4p--tearsheet__next__influencer,.c4p--tearsheet__next__main-content,.c4p--tearsheet__next__summary-content,:host ::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){overflow:auto}.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:2rem}@media (max-width:41.98rem){.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}}.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline:2px solid var(--cds-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline-style:dotted}}.c4p--tearsheet__next__side-panel,:host c4p-side-panel::part(dialog){block-size:100%;inline-size:100%!important;inset-block-start:0;max-inline-size:none;position:absolute;z-index:9999}.c4p--tearsheet__next__side-panel .c4p--side-panel__header,:host c4p-side-panel::part(dialog) .c4p--side-panel__header{min-block-size:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__container{inline-size:480px;max-inline-size:480px}@media (width <= 480px){.c4p--tearsheet__next--narrow .c4p--tearsheet__next__container{inline-size:100%;max-inline-size:100%}}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header{padding-inline:1rem}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:flex-start}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=body]){grid-template-columns:1fr 0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=footer]){block-size:4rem}.c4p--tearsheet__next--has-ai-label::part(dialog){background:linear-gradient(to top,var(--cds-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent!important;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next__main-content{position:relative}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__flush{padding-inline:0}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--no-summary{grid-column:1/-1}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--has-ai-label{background:linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-ai-inner-shadow,rgba(69,137,255,.1))}:host ::slotted([slot=summary-content]:focus){outline:2px solid var(--cds-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){:host ::slotted([slot=summary-content]:focus){outline-style:dotted}}:host ::slotted([slot=summary-content][is-flush]){padding-inline:0}@media screen and (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:none}}:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}:host(c4p-preview-tearsheet) ::slotted([slot=influencer][is-flush]){padding-inline:0}:host(c4p-preview-tearsheet[open]) ::part(dialog){transform:translateZ(0);transition:transform .24s cubic-bezier(0,0,.3,1)}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet[open]) ::part(dialog){transition:none}}@media (max-width:41.98rem){:host(:not(.c4p--tearsheet__next--stack-activated.is-visible)) ::part(dialog){max-block-size:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible){--overlay-color:var(--cds-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);pointer-events:none;position:fixed;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1);z-index:calc(9000 - var(--stack-depth, 0))}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{transition:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) cds-modal{background-color:transparent}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) ::part(dialog){max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header{padding-inline:1rem}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4)}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet[variant=narrow]):host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0!important}@media (max-width:41.98rem){:host(c4p-preview-tearsheet) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet) ::slotted([slot=summary-content]){padding:0!important}}:host-context(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0}:host ::slotted([slot=footer]){padding-block:0}"]);
|
|
11
11
|
//#endregion
|
|
12
12
|
export { tearsheet_default as default };
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2025,
|
|
2
|
+
* Copyright IBM Corp. 2025, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -30,10 +30,16 @@ interface DraggableProps {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Makes a given element draggable using a handle element.
|
|
33
|
-
|
|
33
|
+
* @param {object} draggable - Configuration object for draggable behavior
|
|
34
|
+
* @param {HTMLElement} draggable.el - The element to make draggable
|
|
35
|
+
* @param {HTMLElement} [draggable.dragHandle] - Optional handle element for dragging
|
|
36
|
+
* @param {boolean} [draggable.focusableDragHandle] - Whether the drag handle should be focusable
|
|
37
|
+
* @param {number} [draggable.dragStep] - Step size for keyboard dragging (default: 10)
|
|
38
|
+
* @param {number} [draggable.shiftDragStep] - Step size for keyboard dragging with Shift key (default: 50)
|
|
34
39
|
*/
|
|
35
40
|
export declare const makeDraggable: ({ el, dragHandle, focusableDragHandle, dragStep, shiftDragStep, }: DraggableProps) => {
|
|
36
41
|
cleanup: () => void;
|
|
42
|
+
init: () => void;
|
|
37
43
|
};
|
|
38
44
|
export {};
|
|
39
45
|
//# sourceMappingURL=makeDraggable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeDraggable.d.ts","sourceRoot":"","sources":["../../../src/utilities/makeDraggable/makeDraggable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"makeDraggable.d.ts","sourceRoot":"","sources":["../../../src/utilities/makeDraggable/makeDraggable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,UAAU,cAAc;IACtB;;OAEG;IACH,EAAE,EAAE,WAAW,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAQD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,mEAM3B,cAAc;;;CAqNhB,CAAC"}
|
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
//#region src/utilities/makeDraggable/makeDraggable.ts
|
|
9
9
|
/**
|
|
10
10
|
* Makes a given element draggable using a handle element.
|
|
11
|
-
|
|
11
|
+
* @param {object} draggable - Configuration object for draggable behavior
|
|
12
|
+
* @param {HTMLElement} draggable.el - The element to make draggable
|
|
13
|
+
* @param {HTMLElement} [draggable.dragHandle] - Optional handle element for dragging
|
|
14
|
+
* @param {boolean} [draggable.focusableDragHandle] - Whether the drag handle should be focusable
|
|
15
|
+
* @param {number} [draggable.dragStep] - Step size for keyboard dragging (default: 10)
|
|
16
|
+
* @param {number} [draggable.shiftDragStep] - Step size for keyboard dragging with Shift key (default: 50)
|
|
12
17
|
*/
|
|
13
18
|
const makeDraggable = ({ el, dragHandle, focusableDragHandle, dragStep, shiftDragStep }) => {
|
|
14
19
|
if (dragHandle) {
|
|
@@ -20,6 +25,45 @@ const makeDraggable = ({ el, dragHandle, focusableDragHandle, dragStep, shiftDra
|
|
|
20
25
|
let currentY = 0;
|
|
21
26
|
let initialMouseX = 0;
|
|
22
27
|
let initialMouseY = 0;
|
|
28
|
+
let baseMatrix = null;
|
|
29
|
+
/**
|
|
30
|
+
* Syncs position and extracts base matrix from computed style.
|
|
31
|
+
* Reads from getComputedStyle() to include all transform sources (inline, classes, etc.).
|
|
32
|
+
*/
|
|
33
|
+
const syncTransformState = () => {
|
|
34
|
+
const transformString = window.getComputedStyle(el).transform;
|
|
35
|
+
if (!transformString || transformString === "none") {
|
|
36
|
+
currentX = 0;
|
|
37
|
+
currentY = 0;
|
|
38
|
+
baseMatrix = null;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const matrix = new DOMMatrix(transformString);
|
|
42
|
+
currentX = matrix.m41;
|
|
43
|
+
currentY = matrix.m42;
|
|
44
|
+
if (matrix.a === 1 && matrix.b === 0 && matrix.c === 0 && matrix.d === 1 && matrix.e === 0 && matrix.f === 0) baseMatrix = null;
|
|
45
|
+
else baseMatrix = new DOMMatrix([
|
|
46
|
+
matrix.a,
|
|
47
|
+
matrix.b,
|
|
48
|
+
matrix.c,
|
|
49
|
+
matrix.d,
|
|
50
|
+
0,
|
|
51
|
+
0
|
|
52
|
+
]);
|
|
53
|
+
};
|
|
54
|
+
syncTransformState();
|
|
55
|
+
/**
|
|
56
|
+
* Applies transform by combining translation with base matrix using matrix multiplication.
|
|
57
|
+
*/
|
|
58
|
+
const applyTransform = (x, y) => {
|
|
59
|
+
if (baseMatrix) {
|
|
60
|
+
const translationMatrix = new DOMMatrix();
|
|
61
|
+
translationMatrix.m41 = x;
|
|
62
|
+
translationMatrix.m42 = y;
|
|
63
|
+
const combined = translationMatrix.multiply(baseMatrix);
|
|
64
|
+
el.style.transform = combined.toString();
|
|
65
|
+
} else el.style.transform = `translate(${x}px, ${y}px)`;
|
|
66
|
+
};
|
|
23
67
|
const dispatch = (type, detail) => {
|
|
24
68
|
const eventInit = {
|
|
25
69
|
detail,
|
|
@@ -28,13 +72,11 @@ const makeDraggable = ({ el, dragHandle, focusableDragHandle, dragStep, shiftDra
|
|
|
28
72
|
el.dispatchEvent(new CustomEvent(type, eventInit));
|
|
29
73
|
};
|
|
30
74
|
const onKeyDown = (e) => {
|
|
31
|
-
if (e.key === "Enter") {
|
|
75
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
76
|
+
e.preventDefault();
|
|
32
77
|
isDragging = !isDragging;
|
|
33
78
|
if (isDragging) {
|
|
34
|
-
|
|
35
|
-
const matrix = new DOMMatrix(style.transform);
|
|
36
|
-
currentX = matrix.m41;
|
|
37
|
-
currentY = matrix.m42;
|
|
79
|
+
syncTransformState();
|
|
38
80
|
dispatch("dragstart", { keyboard: true });
|
|
39
81
|
} else dispatch("dragend", { keyboard: true });
|
|
40
82
|
}
|
|
@@ -47,19 +89,35 @@ const makeDraggable = ({ el, dragHandle, focusableDragHandle, dragStep, shiftDra
|
|
|
47
89
|
break;
|
|
48
90
|
case "ArrowLeft":
|
|
49
91
|
currentX -= distance;
|
|
50
|
-
|
|
92
|
+
applyTransform(currentX, currentY);
|
|
93
|
+
dispatch("dragmove", {
|
|
94
|
+
direction: "left",
|
|
95
|
+
distance
|
|
96
|
+
});
|
|
51
97
|
break;
|
|
52
98
|
case "ArrowRight":
|
|
53
99
|
currentX += distance;
|
|
54
|
-
|
|
100
|
+
applyTransform(currentX, currentY);
|
|
101
|
+
dispatch("dragmove", {
|
|
102
|
+
direction: "right",
|
|
103
|
+
distance
|
|
104
|
+
});
|
|
55
105
|
break;
|
|
56
106
|
case "ArrowUp":
|
|
57
107
|
currentY -= distance;
|
|
58
|
-
|
|
108
|
+
applyTransform(currentX, currentY);
|
|
109
|
+
dispatch("dragmove", {
|
|
110
|
+
direction: "up",
|
|
111
|
+
distance
|
|
112
|
+
});
|
|
59
113
|
break;
|
|
60
114
|
case "ArrowDown":
|
|
61
115
|
currentY += distance;
|
|
62
|
-
|
|
116
|
+
applyTransform(currentX, currentY);
|
|
117
|
+
dispatch("dragmove", {
|
|
118
|
+
direction: "down",
|
|
119
|
+
distance
|
|
120
|
+
});
|
|
63
121
|
break;
|
|
64
122
|
}
|
|
65
123
|
};
|
|
@@ -67,10 +125,7 @@ const makeDraggable = ({ el, dragHandle, focusableDragHandle, dragStep, shiftDra
|
|
|
67
125
|
const target = e.target;
|
|
68
126
|
if (!(target instanceof Node)) return;
|
|
69
127
|
if (!(dragHandle ? dragHandle.contains(target) : el.contains(target))) return;
|
|
70
|
-
|
|
71
|
-
const matrix = new DOMMatrix(style.transform);
|
|
72
|
-
currentX = matrix.m41;
|
|
73
|
-
currentY = matrix.m42;
|
|
128
|
+
syncTransformState();
|
|
74
129
|
initialMouseX = e.clientX;
|
|
75
130
|
initialMouseY = e.clientY;
|
|
76
131
|
isDragging = true;
|
|
@@ -82,10 +137,14 @@ const makeDraggable = ({ el, dragHandle, focusableDragHandle, dragStep, shiftDra
|
|
|
82
137
|
if (!isDragging) return;
|
|
83
138
|
const dx = e.clientX - initialMouseX;
|
|
84
139
|
const dy = e.clientY - initialMouseY;
|
|
85
|
-
|
|
140
|
+
applyTransform(currentX + dx, currentY + dy);
|
|
86
141
|
};
|
|
87
|
-
const onMouseUp = () => {
|
|
142
|
+
const onMouseUp = (e) => {
|
|
88
143
|
if (!isDragging) return;
|
|
144
|
+
const dx = e.clientX - initialMouseX;
|
|
145
|
+
const dy = e.clientY - initialMouseY;
|
|
146
|
+
currentX += dx;
|
|
147
|
+
currentY += dy;
|
|
89
148
|
isDragging = false;
|
|
90
149
|
dispatch("dragend", { mouse: true });
|
|
91
150
|
document.removeEventListener("mousemove", onMouseMove);
|
|
@@ -100,7 +159,18 @@ const makeDraggable = ({ el, dragHandle, focusableDragHandle, dragStep, shiftDra
|
|
|
100
159
|
document.removeEventListener("mousemove", onMouseMove);
|
|
101
160
|
document.removeEventListener("mouseup", onMouseUp);
|
|
102
161
|
};
|
|
103
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Re-initialize the draggable position from the element's current computed transform.
|
|
164
|
+
* Call this if the element has been repositioned externally (e.g., via CSS animation,
|
|
165
|
+
* class changes, or other scripts) to prevent position jumps on the next drag.
|
|
166
|
+
*/
|
|
167
|
+
const init = () => {
|
|
168
|
+
syncTransformState();
|
|
169
|
+
};
|
|
170
|
+
return {
|
|
171
|
+
cleanup: draggableCleanup,
|
|
172
|
+
init
|
|
173
|
+
};
|
|
104
174
|
};
|
|
105
175
|
//#endregion
|
|
106
176
|
export { makeDraggable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeDraggable.js","names":[],"sources":["../../../src/utilities/makeDraggable/makeDraggable.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2025, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-disable jsdoc/check-param-names */\ninterface DraggableProps {\n /**\n * HTML element to move.\n */\n el: HTMLElement;\n /**\n * HTML element to initiate the drag (e.g., header).\n */\n dragHandle?: HTMLElement;\n /**\n * HTML element to focus on drag for keyboard interaction (e.g., Drag Icon).\n */\n focusableDragHandle?: HTMLElement;\n /**\n * Pixel value that defines the distance to move when dragging with arrow\n * keys.\n */\n dragStep?: number;\n /**\n * Pixel value that defines the distance to move when dragging with\n * shift+arrow keys.\n */\n shiftDragStep?: number;\n}\n\ninterface EventDetail {\n dragstart: { keyboard?: boolean; mouse?: boolean };\n dragend: { keyboard?: boolean; mouse?: boolean };\n}\n\n/**\n * Makes a given element draggable using a handle element.\n *@param draggable - object which accepts el and optional attributes handle,focusableInHandle,dragStep and shiftDragStep\n */\nexport const makeDraggable = ({\n el,\n dragHandle,\n focusableDragHandle,\n dragStep,\n shiftDragStep,\n}: DraggableProps) => {\n if (dragHandle) {\n dragHandle.style.cursor = 'move';\n el.style.cursor = 'default';\n } else {\n el.style.cursor = 'move';\n }\n\n let isDragging = false;\n let currentX = 0;\n let currentY = 0;\n let initialMouseX = 0;\n let initialMouseY = 0;\n\n const dispatch = <T extends keyof EventDetail>(\n type: T,\n detail: EventDetail[T]\n ) => {\n const eventInit: CustomEventInit<EventDetail[T]> = {\n detail,\n bubbles: true,\n };\n el.dispatchEvent(new CustomEvent(type, eventInit));\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n isDragging = !isDragging;\n if (isDragging) {\n // Get current transform values when starting keyboard drag\n const style = window.getComputedStyle(el);\n const matrix = new DOMMatrix(style.transform);\n currentX = matrix.m41;\n currentY = matrix.m42;\n dispatch('dragstart', { keyboard: true });\n } else {\n dispatch('dragend', { keyboard: true });\n }\n }\n\n if (!isDragging) {\n return;\n }\n const distance = e.shiftKey ? (shiftDragStep ?? 32) : (dragStep ?? 8);\n switch (e.key) {\n case 'Enter':\n case ' ':\n e.preventDefault();\n break;\n case 'ArrowLeft':\n currentX -= distance;\n el.style.transform = `translate(${currentX}px, ${currentY}px)`;\n break;\n case 'ArrowRight':\n currentX += distance;\n el.style.transform = `translate(${currentX}px, ${currentY}px)`;\n break;\n case 'ArrowUp':\n currentY -= distance;\n el.style.transform = `translate(${currentX}px, ${currentY}px)`;\n break;\n case 'ArrowDown':\n currentY += distance;\n el.style.transform = `translate(${currentX}px, ${currentY}px)`;\n break;\n }\n };\n\n const onMouseDown = (e: MouseEvent) => {\n const target = e.target;\n if (!(target instanceof Node)) {\n return;\n }\n\n const isTargetInHandle = dragHandle\n ? dragHandle.contains(target)\n : el.contains(target);\n\n if (!isTargetInHandle) {\n return;\n }\n const style = window.getComputedStyle(el);\n const matrix = new DOMMatrix(style.transform);\n currentX = matrix.m41;\n currentY = matrix.m42;\n\n // Store the mouse position at the start of the drag\n initialMouseX = e.clientX;\n initialMouseY = e.clientY;\n isDragging = true;\n dispatch('dragstart', { mouse: true });\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp, { once: true });\n };\n\n const onMouseMove = (e: MouseEvent) => {\n if (!isDragging) {\n return;\n }\n\n // Calculate the change in mouse position from the start\n const dx = e.clientX - initialMouseX;\n const dy = e.clientY - initialMouseY;\n\n // Add that change to the element's original translation\n el.style.transform = `translate(${currentX + dx}px, ${currentY + dy}px)`;\n };\n\n const onMouseUp = () => {\n if (!isDragging) {\n return;\n }\n isDragging = false;\n dispatch('dragend', { mouse: true });\n\n document.removeEventListener('mousemove', onMouseMove);\n };\n if (dragHandle) {\n dragHandle.addEventListener('mousedown', onMouseDown);\n } else {\n el.addEventListener('mousedown', onMouseDown);\n }\n focusableDragHandle?.addEventListener('keydown', onKeyDown);\n\n const draggableCleanup = () => {\n if (dragHandle) {\n dragHandle.removeEventListener('mousedown', onMouseDown);\n } else {\n el.removeEventListener('mousedown', onMouseDown);\n }\n focusableDragHandle?.removeEventListener('keydown', onKeyDown);\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n return {\n cleanup: draggableCleanup,\n };\n};\n"],"mappings":";;;;;;;;;;;;AA0CA,MAAa,iBAAiB,EAC5B,IACA,YACA,qBACA,UACA,oBACoB;AACpB,KAAI,YAAY;AACd,aAAW,MAAM,SAAS;AAC1B,KAAG,MAAM,SAAS;OAElB,IAAG,MAAM,SAAS;CAGpB,IAAI,aAAa;CACjB,IAAI,WAAW;CACf,IAAI,WAAW;CACf,IAAI,gBAAgB;CACpB,IAAI,gBAAgB;CAEpB,MAAM,YACJ,MACA,WACG;EACH,MAAM,YAA6C;GACjD;GACA,SAAS;GACV;AACD,KAAG,cAAc,IAAI,YAAY,MAAM,UAAU,CAAC;;CAGpD,MAAM,aAAa,MAAqB;AACtC,MAAI,EAAE,QAAQ,SAAS;AACrB,gBAAa,CAAC;AACd,OAAI,YAAY;IAEd,MAAM,QAAQ,OAAO,iBAAiB,GAAG;IACzC,MAAM,SAAS,IAAI,UAAU,MAAM,UAAU;AAC7C,eAAW,OAAO;AAClB,eAAW,OAAO;AAClB,aAAS,aAAa,EAAE,UAAU,MAAM,CAAC;SAEzC,UAAS,WAAW,EAAE,UAAU,MAAM,CAAC;;AAI3C,MAAI,CAAC,WACH;EAEF,MAAM,WAAW,EAAE,WAAY,iBAAiB,KAAO,YAAY;AACnE,UAAQ,EAAE,KAAV;GACE,KAAK;GACL,KAAK;AACH,MAAE,gBAAgB;AAClB;GACF,KAAK;AACH,gBAAY;AACZ,OAAG,MAAM,YAAY,aAAa,SAAS,MAAM,SAAS;AAC1D;GACF,KAAK;AACH,gBAAY;AACZ,OAAG,MAAM,YAAY,aAAa,SAAS,MAAM,SAAS;AAC1D;GACF,KAAK;AACH,gBAAY;AACZ,OAAG,MAAM,YAAY,aAAa,SAAS,MAAM,SAAS;AAC1D;GACF,KAAK;AACH,gBAAY;AACZ,OAAG,MAAM,YAAY,aAAa,SAAS,MAAM,SAAS;AAC1D;;;CAIN,MAAM,eAAe,MAAkB;EACrC,MAAM,SAAS,EAAE;AACjB,MAAI,EAAE,kBAAkB,MACtB;AAOF,MAAI,EAJqB,aACrB,WAAW,SAAS,OAAO,GAC3B,GAAG,SAAS,OAAO,EAGrB;EAEF,MAAM,QAAQ,OAAO,iBAAiB,GAAG;EACzC,MAAM,SAAS,IAAI,UAAU,MAAM,UAAU;AAC7C,aAAW,OAAO;AAClB,aAAW,OAAO;AAGlB,kBAAgB,EAAE;AAClB,kBAAgB,EAAE;AAClB,eAAa;AACb,WAAS,aAAa,EAAE,OAAO,MAAM,CAAC;AAEtC,WAAS,iBAAiB,aAAa,YAAY;AACnD,WAAS,iBAAiB,WAAW,WAAW,EAAE,MAAM,MAAM,CAAC;;CAGjE,MAAM,eAAe,MAAkB;AACrC,MAAI,CAAC,WACH;EAIF,MAAM,KAAK,EAAE,UAAU;EACvB,MAAM,KAAK,EAAE,UAAU;AAGvB,KAAG,MAAM,YAAY,aAAa,WAAW,GAAG,MAAM,WAAW,GAAG;;CAGtE,MAAM,kBAAkB;AACtB,MAAI,CAAC,WACH;AAEF,eAAa;AACb,WAAS,WAAW,EAAE,OAAO,MAAM,CAAC;AAEpC,WAAS,oBAAoB,aAAa,YAAY;;AAExD,KAAI,WACF,YAAW,iBAAiB,aAAa,YAAY;KAErD,IAAG,iBAAiB,aAAa,YAAY;AAE/C,sBAAqB,iBAAiB,WAAW,UAAU;CAE3D,MAAM,yBAAyB;AAC7B,MAAI,WACF,YAAW,oBAAoB,aAAa,YAAY;MAExD,IAAG,oBAAoB,aAAa,YAAY;AAElD,uBAAqB,oBAAoB,WAAW,UAAU;AAC9D,WAAS,oBAAoB,aAAa,YAAY;AACtD,WAAS,oBAAoB,WAAW,UAAU;;AAEpD,QAAO,EACL,SAAS,kBACV"}
|
|
1
|
+
{"version":3,"file":"makeDraggable.js","names":[],"sources":["../../../src/utilities/makeDraggable/makeDraggable.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\ninterface DraggableProps {\n /**\n * HTML element to move.\n */\n el: HTMLElement;\n /**\n * HTML element to initiate the drag (e.g., header).\n */\n dragHandle?: HTMLElement;\n /**\n * HTML element to focus on drag for keyboard interaction (e.g., Drag Icon).\n */\n focusableDragHandle?: HTMLElement;\n /**\n * Pixel value that defines the distance to move when dragging with arrow\n * keys.\n */\n dragStep?: number;\n /**\n * Pixel value that defines the distance to move when dragging with\n * shift+arrow keys.\n */\n shiftDragStep?: number;\n}\n\ninterface EventDetail {\n dragstart: { keyboard?: boolean; mouse?: boolean };\n dragend: { keyboard?: boolean; mouse?: boolean };\n dragmove: { direction: 'left' | 'right' | 'up' | 'down'; distance: number };\n}\n\n/**\n * Makes a given element draggable using a handle element.\n * @param {object} draggable - Configuration object for draggable behavior\n * @param {HTMLElement} draggable.el - The element to make draggable\n * @param {HTMLElement} [draggable.dragHandle] - Optional handle element for dragging\n * @param {boolean} [draggable.focusableDragHandle] - Whether the drag handle should be focusable\n * @param {number} [draggable.dragStep] - Step size for keyboard dragging (default: 10)\n * @param {number} [draggable.shiftDragStep] - Step size for keyboard dragging with Shift key (default: 50)\n */\nexport const makeDraggable = ({\n el,\n dragHandle,\n focusableDragHandle,\n dragStep,\n shiftDragStep,\n}: DraggableProps) => {\n if (dragHandle) {\n dragHandle.style.cursor = 'move';\n el.style.cursor = 'default';\n } else {\n el.style.cursor = 'move';\n }\n\n let isDragging = false;\n let currentX = 0;\n let currentY = 0;\n let initialMouseX = 0;\n let initialMouseY = 0;\n\n let baseMatrix: DOMMatrix | null = null;\n\n /**\n * Syncs position and extracts base matrix from computed style.\n * Reads from getComputedStyle() to include all transform sources (inline, classes, etc.).\n */\n const syncTransformState = () => {\n const computedStyle = window.getComputedStyle(el);\n const transformString = computedStyle.transform;\n\n if (!transformString || transformString === 'none') {\n currentX = 0;\n currentY = 0;\n baseMatrix = null;\n return;\n }\n\n const matrix = new DOMMatrix(transformString);\n\n currentX = matrix.m41;\n currentY = matrix.m42;\n\n const isIdentityMatrix =\n matrix.a === 1 &&\n matrix.b === 0 &&\n matrix.c === 0 &&\n matrix.d === 1 &&\n matrix.e === 0 &&\n matrix.f === 0;\n\n if (isIdentityMatrix) {\n baseMatrix = null;\n } else {\n baseMatrix = new DOMMatrix([\n matrix.a,\n matrix.b,\n matrix.c,\n matrix.d,\n 0,\n 0,\n ]);\n }\n };\n\n syncTransformState();\n\n /**\n * Applies transform by combining translation with base matrix using matrix multiplication.\n */\n const applyTransform = (x: number, y: number) => {\n if (baseMatrix) {\n const translationMatrix = new DOMMatrix();\n translationMatrix.m41 = x;\n translationMatrix.m42 = y;\n\n const combined = translationMatrix.multiply(baseMatrix);\n el.style.transform = combined.toString();\n } else {\n el.style.transform = `translate(${x}px, ${y}px)`;\n }\n };\n\n const dispatch = <T extends keyof EventDetail>(\n type: T,\n detail: EventDetail[T]\n ) => {\n const eventInit: CustomEventInit<EventDetail[T]> = {\n detail,\n bubbles: true,\n };\n el.dispatchEvent(new CustomEvent(type, eventInit));\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n isDragging = !isDragging;\n if (isDragging) {\n syncTransformState();\n dispatch('dragstart', { keyboard: true });\n } else {\n dispatch('dragend', { keyboard: true });\n }\n }\n\n if (!isDragging) {\n return;\n }\n const distance = e.shiftKey ? (shiftDragStep ?? 32) : (dragStep ?? 8);\n switch (e.key) {\n case 'Enter':\n case ' ':\n e.preventDefault();\n break;\n case 'ArrowLeft':\n currentX -= distance;\n applyTransform(currentX, currentY);\n dispatch('dragmove', { direction: 'left', distance });\n break;\n case 'ArrowRight':\n currentX += distance;\n applyTransform(currentX, currentY);\n dispatch('dragmove', { direction: 'right', distance });\n break;\n case 'ArrowUp':\n currentY -= distance;\n applyTransform(currentX, currentY);\n dispatch('dragmove', { direction: 'up', distance });\n break;\n case 'ArrowDown':\n currentY += distance;\n applyTransform(currentX, currentY);\n dispatch('dragmove', { direction: 'down', distance });\n break;\n }\n };\n\n const onMouseDown = (e: MouseEvent) => {\n const target = e.target;\n if (!(target instanceof Node)) {\n return;\n }\n\n const isTargetInHandle = dragHandle\n ? dragHandle.contains(target)\n : el.contains(target);\n\n if (!isTargetInHandle) {\n return;\n }\n\n syncTransformState();\n\n initialMouseX = e.clientX;\n initialMouseY = e.clientY;\n isDragging = true;\n dispatch('dragstart', { mouse: true });\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp, { once: true });\n };\n\n const onMouseMove = (e: MouseEvent) => {\n if (!isDragging) {\n return;\n }\n\n const dx = e.clientX - initialMouseX;\n const dy = e.clientY - initialMouseY;\n\n applyTransform(currentX + dx, currentY + dy);\n };\n\n const onMouseUp = (e: MouseEvent) => {\n if (!isDragging) {\n return;\n }\n\n const dx = e.clientX - initialMouseX;\n const dy = e.clientY - initialMouseY;\n currentX += dx;\n currentY += dy;\n\n isDragging = false;\n dispatch('dragend', { mouse: true });\n\n document.removeEventListener('mousemove', onMouseMove);\n };\n if (dragHandle) {\n dragHandle.addEventListener('mousedown', onMouseDown);\n } else {\n el.addEventListener('mousedown', onMouseDown);\n }\n focusableDragHandle?.addEventListener('keydown', onKeyDown);\n\n const draggableCleanup = () => {\n if (dragHandle) {\n dragHandle.removeEventListener('mousedown', onMouseDown);\n } else {\n el.removeEventListener('mousedown', onMouseDown);\n }\n focusableDragHandle?.removeEventListener('keydown', onKeyDown);\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n /**\n * Re-initialize the draggable position from the element's current computed transform.\n * Call this if the element has been repositioned externally (e.g., via CSS animation,\n * class changes, or other scripts) to prevent position jumps on the next drag.\n */\n const init = () => {\n syncTransformState();\n };\n\n return {\n cleanup: draggableCleanup,\n init,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA8CA,MAAa,iBAAiB,EAC5B,IACA,YACA,qBACA,UACA,oBACoB;AACpB,KAAI,YAAY;AACd,aAAW,MAAM,SAAS;AAC1B,KAAG,MAAM,SAAS;OAElB,IAAG,MAAM,SAAS;CAGpB,IAAI,aAAa;CACjB,IAAI,WAAW;CACf,IAAI,WAAW;CACf,IAAI,gBAAgB;CACpB,IAAI,gBAAgB;CAEpB,IAAI,aAA+B;;;;;CAMnC,MAAM,2BAA2B;EAE/B,MAAM,kBADgB,OAAO,iBAAiB,GACT,CAAC;AAEtC,MAAI,CAAC,mBAAmB,oBAAoB,QAAQ;AAClD,cAAW;AACX,cAAW;AACX,gBAAa;AACb;;EAGF,MAAM,SAAS,IAAI,UAAU,gBAAgB;AAE7C,aAAW,OAAO;AAClB,aAAW,OAAO;AAUlB,MAPE,OAAO,MAAM,KACb,OAAO,MAAM,KACb,OAAO,MAAM,KACb,OAAO,MAAM,KACb,OAAO,MAAM,KACb,OAAO,MAAM,EAGb,cAAa;MAEb,cAAa,IAAI,UAAU;GACzB,OAAO;GACP,OAAO;GACP,OAAO;GACP,OAAO;GACP;GACA;GACD,CAAC;;AAIN,qBAAoB;;;;CAKpB,MAAM,kBAAkB,GAAW,MAAc;AAC/C,MAAI,YAAY;GACd,MAAM,oBAAoB,IAAI,WAAW;AACzC,qBAAkB,MAAM;AACxB,qBAAkB,MAAM;GAExB,MAAM,WAAW,kBAAkB,SAAS,WAAW;AACvD,MAAG,MAAM,YAAY,SAAS,UAAU;QAExC,IAAG,MAAM,YAAY,aAAa,EAAE,MAAM,EAAE;;CAIhD,MAAM,YACJ,MACA,WACG;EACH,MAAM,YAA6C;GACjD;GACA,SAAS;GACV;AACD,KAAG,cAAc,IAAI,YAAY,MAAM,UAAU,CAAC;;CAGpD,MAAM,aAAa,MAAqB;AACtC,MAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAK;AACtC,KAAE,gBAAgB;AAClB,gBAAa,CAAC;AACd,OAAI,YAAY;AACd,wBAAoB;AACpB,aAAS,aAAa,EAAE,UAAU,MAAM,CAAC;SAEzC,UAAS,WAAW,EAAE,UAAU,MAAM,CAAC;;AAI3C,MAAI,CAAC,WACH;EAEF,MAAM,WAAW,EAAE,WAAY,iBAAiB,KAAO,YAAY;AACnE,UAAQ,EAAE,KAAV;GACE,KAAK;GACL,KAAK;AACH,MAAE,gBAAgB;AAClB;GACF,KAAK;AACH,gBAAY;AACZ,mBAAe,UAAU,SAAS;AAClC,aAAS,YAAY;KAAE,WAAW;KAAQ;KAAU,CAAC;AACrD;GACF,KAAK;AACH,gBAAY;AACZ,mBAAe,UAAU,SAAS;AAClC,aAAS,YAAY;KAAE,WAAW;KAAS;KAAU,CAAC;AACtD;GACF,KAAK;AACH,gBAAY;AACZ,mBAAe,UAAU,SAAS;AAClC,aAAS,YAAY;KAAE,WAAW;KAAM;KAAU,CAAC;AACnD;GACF,KAAK;AACH,gBAAY;AACZ,mBAAe,UAAU,SAAS;AAClC,aAAS,YAAY;KAAE,WAAW;KAAQ;KAAU,CAAC;AACrD;;;CAIN,MAAM,eAAe,MAAkB;EACrC,MAAM,SAAS,EAAE;AACjB,MAAI,EAAE,kBAAkB,MACtB;AAOF,MAAI,EAJqB,aACrB,WAAW,SAAS,OAAO,GAC3B,GAAG,SAAS,OAAO,EAGrB;AAGF,sBAAoB;AAEpB,kBAAgB,EAAE;AAClB,kBAAgB,EAAE;AAClB,eAAa;AACb,WAAS,aAAa,EAAE,OAAO,MAAM,CAAC;AAEtC,WAAS,iBAAiB,aAAa,YAAY;AACnD,WAAS,iBAAiB,WAAW,WAAW,EAAE,MAAM,MAAM,CAAC;;CAGjE,MAAM,eAAe,MAAkB;AACrC,MAAI,CAAC,WACH;EAGF,MAAM,KAAK,EAAE,UAAU;EACvB,MAAM,KAAK,EAAE,UAAU;AAEvB,iBAAe,WAAW,IAAI,WAAW,GAAG;;CAG9C,MAAM,aAAa,MAAkB;AACnC,MAAI,CAAC,WACH;EAGF,MAAM,KAAK,EAAE,UAAU;EACvB,MAAM,KAAK,EAAE,UAAU;AACvB,cAAY;AACZ,cAAY;AAEZ,eAAa;AACb,WAAS,WAAW,EAAE,OAAO,MAAM,CAAC;AAEpC,WAAS,oBAAoB,aAAa,YAAY;;AAExD,KAAI,WACF,YAAW,iBAAiB,aAAa,YAAY;KAErD,IAAG,iBAAiB,aAAa,YAAY;AAE/C,sBAAqB,iBAAiB,WAAW,UAAU;CAE3D,MAAM,yBAAyB;AAC7B,MAAI,WACF,YAAW,oBAAoB,aAAa,YAAY;MAExD,IAAG,oBAAoB,aAAa,YAAY;AAElD,uBAAqB,oBAAoB,WAAW,UAAU;AAC9D,WAAS,oBAAoB,aAAa,YAAY;AACtD,WAAS,oBAAoB,WAAW,UAAU;;;;;;;CAQpD,MAAM,aAAa;AACjB,sBAAoB;;AAGtB,QAAO;EACL,SAAS;EACT;EACD"}
|