@kosdev-code/base-ui-components 0.1.0-dev.5385 → 0.1.0-dev.5596
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/components/atoms/button/index.d.ts +1 -1
- package/components/atoms/button/index.d.ts.map +1 -1
- package/components/atoms/button-group/button-group-item.d.ts +42 -0
- package/components/atoms/button-group/button-group-item.d.ts.map +1 -0
- package/components/atoms/button-group/button-group.d.ts +40 -0
- package/components/atoms/button-group/button-group.d.ts.map +1 -0
- package/components/atoms/button-group/hooks/use-button-group-context.d.ts +8 -0
- package/components/atoms/button-group/hooks/use-button-group-context.d.ts.map +1 -0
- package/components/atoms/button-group/index.d.ts +4 -0
- package/components/atoms/button-group/index.d.ts.map +1 -0
- package/components/atoms/icon/common/types.d.ts +2 -2
- package/components/atoms/icon/common/types.d.ts.map +1 -1
- package/components/atoms/index.d.ts +2 -0
- package/components/atoms/index.d.ts.map +1 -1
- package/components/atoms/resizable-panel-group/common/hooks/use-resizable-panel-group-context/helpers/get-resize-panel-element.d.ts +6 -1
- package/components/atoms/resizable-panel-group/common/hooks/use-resizable-panel-group-context/helpers/get-resize-panel-element.d.ts.map +1 -1
- package/components/atoms/resizable-panel-group/common/hooks/use-resizable-panel-group-context/use-resizable-panel-group-context.d.ts +6 -2
- package/components/atoms/resizable-panel-group/common/hooks/use-resizable-panel-group-context/use-resizable-panel-group-context.d.ts.map +1 -1
- package/components/atoms/resizable-panel-group/common/types.d.ts +6 -0
- package/components/atoms/resizable-panel-group/common/types.d.ts.map +1 -1
- package/components/atoms/resizable-panel-group/index.d.ts +1 -0
- package/components/atoms/resizable-panel-group/index.d.ts.map +1 -1
- package/components/atoms/resizable-panel-group/resizable-panel-group.d.ts +8 -4
- package/components/atoms/resizable-panel-group/resizable-panel-group.d.ts.map +1 -1
- package/components/molecules/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/components/molecules/form/components/form-input.d.ts.map +1 -1
- package/components/molecules/form/components/form-submit.d.ts.map +1 -1
- package/components/molecules/index.d.ts +2 -0
- package/components/molecules/index.d.ts.map +1 -1
- package/components/molecules/item-selection-list/item-selection-list.d.ts +1 -1
- package/components/molecules/item-selection-list/item-selection-list.d.ts.map +1 -1
- package/components/molecules/list/async-list/async-list-group-header.d.ts +12 -0
- package/components/molecules/list/async-list/async-list-group-header.d.ts.map +1 -0
- package/components/molecules/list/async-list/async-list.d.ts +139 -0
- package/components/molecules/list/async-list/async-list.d.ts.map +1 -0
- package/components/molecules/list/async-list/helpers/is-item-template-factory.d.ts +19 -0
- package/components/molecules/list/async-list/helpers/is-item-template-factory.d.ts.map +1 -0
- package/components/molecules/list/async-list/index.d.ts +9 -0
- package/components/molecules/list/async-list/index.d.ts.map +1 -0
- package/components/molecules/list/async-list/item-action-bar.d.ts +31 -0
- package/components/molecules/list/async-list/item-action-bar.d.ts.map +1 -0
- package/components/molecules/list/async-list/templates/studio-named-list-item.d.ts +41 -0
- package/components/molecules/list/async-list/templates/studio-named-list-item.d.ts.map +1 -0
- package/components/molecules/list/async-list/types.d.ts +286 -0
- package/components/molecules/list/async-list/types.d.ts.map +1 -0
- package/components/molecules/list/common/data-providers/base-async-tree-data-provider.d.ts +117 -56
- package/components/molecules/list/common/data-providers/base-async-tree-data-provider.d.ts.map +1 -1
- package/components/molecules/list/common/types.d.ts +111 -0
- package/components/molecules/list/common/types.d.ts.map +1 -1
- package/components/molecules/list/index.d.ts +1 -0
- package/components/molecules/list/index.d.ts.map +1 -1
- package/components/molecules/list/select-list/select-list.d.ts +1 -0
- package/components/molecules/list/select-list/select-list.d.ts.map +1 -1
- package/components/molecules/list/tree-list/async-tree-list.d.ts +253 -30
- package/components/molecules/list/tree-list/async-tree-list.d.ts.map +1 -1
- package/components/molecules/list/tree-list/helpers/is-item-template-factory.d.ts +19 -0
- package/components/molecules/list/tree-list/helpers/is-item-template-factory.d.ts.map +1 -0
- package/components/molecules/list/tree-list/templates/async-named-collapsible-branch.d.ts.map +1 -1
- package/components/molecules/table/table.d.ts.map +1 -1
- package/components/molecules/table/virtual-table.d.ts.map +1 -1
- package/components/molecules/view/action-bar.d.ts +27 -0
- package/components/molecules/view/action-bar.d.ts.map +1 -0
- package/components/molecules/view/index.d.ts +9 -0
- package/components/molecules/view/index.d.ts.map +1 -0
- package/components/molecules/view/types.d.ts +103 -0
- package/components/molecules/view/types.d.ts.map +1 -0
- package/components/molecules/view/view-header.d.ts +32 -0
- package/components/molecules/view/view-header.d.ts.map +1 -0
- package/components/molecules/view/view.d.ts +60 -0
- package/components/molecules/view/view.d.ts.map +1 -0
- package/components/molecules/view-container/index.d.ts +6 -0
- package/components/molecules/view-container/index.d.ts.map +1 -0
- package/components/molecules/view-container/types.d.ts +28 -0
- package/components/molecules/view-container/types.d.ts.map +1 -0
- package/components/molecules/view-container/view-container.d.ts +52 -0
- package/components/molecules/view-container/view-container.d.ts.map +1 -0
- package/index.cjs +1058 -824
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +6495 -4614
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/providers/data-providers/create-observable-list-provider.d.ts +116 -0
- package/providers/data-providers/create-observable-list-provider.d.ts.map +1 -0
- package/providers/data-providers/index.d.ts +86 -0
- package/providers/data-providers/index.d.ts.map +1 -0
- package/providers/data-providers/lifecycle-aware-list-provider.d.ts +206 -0
- package/providers/data-providers/lifecycle-aware-list-provider.d.ts.map +1 -0
- package/providers/data-providers/lifecycle-aware-tree-provider.d.ts +187 -0
- package/providers/data-providers/lifecycle-aware-tree-provider.d.ts.map +1 -0
- package/providers/data-providers/types.d.ts +124 -0
- package/providers/data-providers/types.d.ts.map +1 -0
- package/providers/index.d.ts +13 -0
- package/providers/index.d.ts.map +1 -0
- package/styles/tokens/component-tokens/button-group/index.d.ts +18 -0
- package/styles/tokens/component-tokens/button-group/index.d.ts.map +1 -0
- package/styles/tokens/component-tokens/icon/index.d.ts +1 -0
- package/styles/tokens/component-tokens/icon/index.d.ts.map +1 -1
- package/styles/tokens/component-tokens/index.d.ts +80 -0
- package/styles/tokens/component-tokens/index.d.ts.map +1 -1
- package/styles/tokens/component-tokens/notification/index.d.ts +37 -0
- package/styles/tokens/component-tokens/notification/index.d.ts.map +1 -0
- package/styles/tokens/component-tokens/studio-list-item/index.d.ts +13 -0
- package/styles/tokens/component-tokens/studio-list-item/index.d.ts.map +1 -0
- package/styles/tokens/component-tokens/view/index.d.ts +24 -0
- package/styles/tokens/component-tokens/view/index.d.ts.map +1 -0
- package/styles/tokens/component-tokens/view-container/index.d.ts +12 -0
- package/styles/tokens/component-tokens/view-container/index.d.ts.map +1 -0
- package/styles/tokens/index.d.ts +81 -1
- package/styles/tokens/index.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";var Ui=Object.defineProperty;var Yi=(e,t,o)=>t in e?Ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var G=(e,t,o)=>(Yi(e,typeof t!="symbol"?t+"":t,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@emotion/react/jsx-runtime"),d=require("react"),g=require("@emotion/styled"),M=require("@emotion/react"),ur=require("react-dom"),z=require("@floating-ui/react"),Ki=require("@use-gesture/react"),K=require("react-hook-form"),L=require("@kosdev-code/kos-ui-sdk"),P=require("mobx"),fr=require("mobx-react-lite"),be=require("@tanstack/react-table"),Y=require("date-fns");function qi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const Xt=qi(d),Zi=e=>{const t=/[\\^$.*+?()[\]{}|]/g;return RegExp(t.source).test(e)?e.replace(t,"\\$&"):e},Xi=e=>e instanceof RegExp,Ji=e=>typeof e=="string",Qi=e=>{let t=[];return e.forEach(o=>{Array.isArray(o)?t=t.concat(o):o&&t.push(o)}),t},ea=(e,t,o)=>{if(e===""||t==="")return e;let n=t;Xi(n)||(n=new RegExp("("+Zi(n)+")","gi"));const r=e.split(n);for(let s=1,a=r.length;s<a;s+=2){if(r[s]===void 0||r[s-1]===void 0){console.warn("Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}r[s]=o(r[s],s)}return r},pr=(e,t,o)=>{let n=e;return Array.isArray(n)||(n=[n]),Qi(n.map(r=>Ji(r)?ea(r,t,o):r))},ht=(e,t)=>t?e:`var(${e})`,F=(e,t)=>ht(`--studio-g-${e}`,t),c=(e,t)=>ht(`--studio-s-${e}`,t),ta={"actionable-blurb":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-20")}},oa={"app-shell":{"bg-default":c("color-grey80"),"bg-offline":c("color-grey70"),"bg-locked":c("color-grey60"),color:c("color-white")}},na={"artifact-drawer":{"background-color":c("color-grey10"),"border-color":c("color-grey20"),"border-width":c("border-sm"),"padding-x":c("spacing-16"),"branch-padding-x":c("spacing-8"),"artifact-list-y-padding":c("spacing-10"),"artifact-items-gap":c("spacing-10"),"version-items-gap":c("spacing-8"),"version-list-padding":c("spacing-8")}},ra={checkbox:{"background-color":c("color-white"),"border-color":c("color-grey30"),"background-color-disabled":c("color-grey15"),"background-color-checked":c("color-primary"),"border-color-checked":c("color-primary"),"background-color-checked-disabled":c("color-additional3"),"border-color-checked-disabled":c("color-additional3"),size:"14px","border-radius":c("spacing-2"),"border-width":c("border-sm")}},sa={"collapsible-artifact":{"background-color":c("color-white"),"border-color":c("color-grey20"),"border-radius":c("spacing-6"),"border-width":c("border-xsm"),"button-left-or-right":c("spacing-4"),"button-top":"3px","name-and-desc-spacing":c("spacing-2"),"name-and-selected-spacing":c("spacing-8"),padding:`${c("spacing-6")} ${c("spacing-8")}`},"collapsible-artifact-version":{"background-color-hover":c("color-grey20"),"background-color-inherited":"#9747FF12","background-color-selected":c("color-additional3"),"background-color":c("color-grey10"),"border-color-hover":c("color-grey30"),"border-color-inherited":"#9747FF33","border-color-selected":c("color-primary"),"border-color":c("color-grey20"),"border-radius":c("spacing-2"),"border-width":c("border-sm"),padding:`${c("spacing-6")} ${c("spacing-8")}`}},ia={"collapsible-list-container":{"border-radius":c("spacing-2"),"border-width":"0.5px","border-color":c("color-grey20")},"collapsible-list-header-container":{"background-color":c("color-grey10"),gap:c("spacing-8"),padding:"7px 8px"},"collapsible-list-toggled-container":{"background-color":c("color-white"),gap:c("spacing-8"),padding:c("spacing-8")}},aa={drawer:{"header-height":c("spacing-30"),"header-bg":c("color-grey10"),"header-border-size":"1px","header-border-color":c("color-grey20"),"header-x-padding":c("spacing-10"),"border-width":"1px","border-color":c("color-grey20"),"left-drop-shadow":"4px 0px 8px -1px rgba(0,0,0,0.2)","right-drop-shadow":"-4px 0px 8px -1px rgba(0,0,0,0.2)"}},la={form:{"access-toggle-gap":c("spacing-16"),"access-toggle-height":c("spacing-36"),"error-message-top-margin":c("spacing-4"),"label-column-gap":c("spacing-16"),"label-error-color":c("color-red"),"label-font-family":c("font-family-default"),"label-font-size":c("font-size-med"),"label-font-weight":c("font-weight-normal"),"label-height":"14px","label-line-height":c("line-height-default"),"label-star-padding":c("spacing-4"),"label-width":"112px","label-area-padding":`${c("spacing-7")} 0`}},ca={"horizontal-rule":{"border-width":"0.5px","border-color":c("color-grey20")}},da={"icon-button":{padding:"0","border-radius":c("spacing-2"),"background-color":"transparent","border-color":"transparent",cursor:"pointer","disabled-cursor":"not-allowed","badge-fill-black":c("color-black"),"badge-fill-blue":c("color-primary"),"badge-fill-green":c("color-green"),"badge-fill-grey":c("color-grey50"),"badge-fill-orange":c("color-orange"),"badge-fill-purple":c("color-purple"),"badge-fill-red":c("color-red"),"badge-fill-white":c("color-white"),"badge-fill-yellow":c("color-yellow"),"badge-right":"1px","badge-top":"1px","active-background-color":"rgba(255, 255, 255, 0.1)"}},ua={icon:{"fill-black":c("color-black"),"fill-blue":c("color-primary"),"fill-green":c("color-green"),"fill-grey":c("color-grey50"),"fill-orange":c("color-orange"),"fill-purple":c("color-purple"),"fill-red":c("color-red"),"fill-white":c("color-white"),"fill-yellow":c("color-yellow"),"size-lrg":c("spacing-18"),"size-med":c("spacing-16"),"size-sm":c("spacing-14"),"size-xlrg":c("spacing-20"),"size-xsm":c("spacing-12"),"size-xxlrg":c("spacing-22"),"size-xxsm":c("spacing-10")}},fa={"image-config-page-header":{gap:c("spacing-16"),"padding-bottom":c("spacing-12"),"title-gap":c("spacing-8"),bg:c("color-white")}},pa={input:{"background-color-disabled":c("color-grey10"),"background-color":c("color-white"),"border-color-active":c("color-black"),"border-color-invalid":c("color-red"),"border-color":c("color-grey30"),"border-radius":c("spacing-2"),"border-width":c("border-sm"),"color-disabled":c("color-grey30"),"font-family":c("font-family-default"),"font-size-small":c("font-size-sm"),"font-size":c("font-size-med"),"font-weight":c("font-weight-normal"),"icon-left":c("spacing-8"),"line-height":c("line-height-default"),"padding-left-icon":c("spacing-28"),"padding-right-icon":c("spacing-28"),"padding-x":c("spacing-8"),"padding-y-small":"2px","padding-y":c("spacing-7"),color:c("color-black"),height:"28px"}},ha={link:{"font-size-med":c("font-size-med"),"font-size-sm":c("font-size-sm"),"font-size-lrg":c("font-size-lrg"),"font-size-xlrg":c("font-size-xlrg"),"font-family":c("font-family-default"),"font-weight":c("font-weight-bold"),"line-height":c("line-height-default"),color:c("color-primary"),"color-hover":c("color-additional1"),"color-active":c("color-additional2"),"color-disabled":c("color-grey30")}},ga={modal:{"overlay-background":"rgba(0, 0, 0, 0.8)","background-color":c("color-white"),headerPadding:c("spacing-10"),headerGap:c("spacing-8"),contentYPadding:c("spacing-10"),contentXPadding:c("spacing-12"),footerYPadding:c("spacing-10"),footerXPadding:c("spacing-12"),footerGap:c("spacing-8"),"border-width":c("border-sm"),"border-color":c("color-grey20"),"base-content-width":"400xp"}},ma={"named-section":{"border-radius":"2px","border-width":"0.5px","selected-border-width":"2px","hover-border-width":c("border-sm"),"border-color":c("color-grey20"),"selected-border-color":c("color-primary")},"named-section-header":{bg:c("color-grey10"),"border-width":"0.5px","border-color":c("color-grey20"),"border-radius":"2px",padding:"8px 10px",gap:c("spacing-8"),"row-gap":c("spacing-4")}},ba={segmented:{"border-width":c("border-sm"),"border-radius":c("spacing-2"),padding:c("spacing-2"),"background-color":c("color-grey15"),"border-color":c("color-grey20"),"button-color":c("color-grey60"),"button-color-disabled":c("color-grey40"),"button-background-color":c("color-grey15"),"button-background-color-hover":c("color-grey20"),"button-background-color-active":c("color-grey40"),"button-padding-y":"5px","button-padding-x":"11px","button-border-width":c("border-sm"),"button-border-color":"transparent","button-font-size":c("font-size-med"),"button-font-weight":c("font-weight-normal"),"button-font-family":c("font-family-default"),"button-gap":c("spacing-4"),"indicator-background-color":c("color-white"),"indicator-color":c("color-black")}},xa={select:{"font-size":c("font-size-med"),"border-size":c("border-sm"),"border-color":c("color-grey20")},option:{"column-gap":c("spacing-8"),"font-family":c("font-family-default"),"font-size":c("font-size-med"),"bg-color-active":c("color-grey20"),"bg-color":c("color-white"),"font-weight-selected":c("font-weight-bold"),color:c("color-black"),"color-disabled":c("color-grey40"),padding:"2px 4px"}},ya={button:{xpadding:c("spacing-16"),ypadding:c("spacing-6"),br:c("spacing-2"),cursor:"pointer","line-height":c("line-height-default"),"font-size":c("font-size-med"),"ypadding-small":c("spacing-2"),"border-width":"1px","font-weight":c("font-weight-bold"),"icon-margin":`0px ${c("spacing-4")} 0px 0px`,"flex-direction":"row",bg:c("color-primary"),"bg-hover":c("color-additional1"),"bg-active":c("color-additional2"),"bg-disabled":c("color-grey30"),border:c("color-primary"),"border-hover":c("color-additional1"),"border-active":c("color-additional2"),"border-disabled":c("color-grey30"),color:c("color-white"),"color-hover":c("color-white"),"color-active":c("color-white"),"color-disabled":c("color-white"),"bg-secondary":c("color-white"),"bg-hover-secondary":c("color-white"),"bg-active-secondary":c("color-white"),"bg-disabled-secondary":c("color-grey10"),"border-secondary":c("color-primary"),"border-hover-secondary":c("color-additional1"),"border-active-secondary":c("color-additional2"),"border-disabled-secondary":c("color-grey30"),"color-secondary":c("color-primary"),"color-hover-secondary":c("color-additional1"),"color-active-secondary":c("color-additional2"),"color-disabled-secondary":c("color-grey30"),"bg-borderless":c("color-white"),"bg-hover-borderless":c("color-white"),"bg-active-borderless":c("color-white"),"bg-disabled-borderless":c("color-white"),"border-borderless":c("color-white"),"border-hover-borderless":c("color-white"),"border-active-borderless":c("color-white"),"border-disabled-borderless":c("color-white"),"color-borderless":c("color-primary"),"color-hover-borderless":c("color-additional1"),"color-active-borderless":c("color-additional2"),"color-disabled-borderless":c("color-grey30")}},ka={label:{gap:c("spacing-4")},"label-with-action":{gap:c("spacing-8")},"label-with-content-link":{color:c("color-primary")}},va={text:{"font-family":c("font-family-default"),"line-height":c("line-height-default"),"h1-size":c("font-size-xlrg"),"h2-size":c("font-size-lrg"),"body-size":c("font-size-med"),"small-size":c("font-size-sm"),"font-weight-bold":c("font-weight-bold"),"font-weight-normal":c("font-weight-normal"),"color-dark":c("color-black"),"color-light":c("color-white"),"color-green":c("color-green"),"color-purple":c("color-purple"),"color-red":c("color-red"),"color-blue":c("color-primary"),"color-grey":c("color-grey60"),"color-disabled":c("color-grey40"),"color-yellow":c("color-yellow"),"color-orange":c("color-orange")}},wa={tab:{"trigger-padding-y":c("spacing-8"),"trigger-padding-x":"0","column-gap":c("spacing-8"),"indicator-height":c("border-lrg"),"indicator-color":c("color-grey60"),"trigger-list-underline-color":c("color-grey20"),"trigger-list-underline-height":c("border-sm")}},Ca={tag:{"font-family":c("font-family-default"),"bg-color-orange":c("color-orange"),"bg-color-light":c("color-white"),"bg-color-green":c("color-green"),"bg-color-red":c("color-red"),"bg-color-purple":c("color-purple"),"bg-color-blue":c("color-blue"),"bg-color-disabled":c("color-white"),"color-light":c("color-white"),"color-dark":c("color-black"),"color-disabled":c("color-grey40"),"border-radius":c("border-sm"),"border-color":c("color-grey20"),height:c("spacing-18"),padding:"0px 4px"}},$a={textarea:{padding:c("spacing-8"),"background-color":c("color-white"),"font-size":c("font-size-med"),"font-family":c("font-family-default"),"font-weight":c("font-weight-normal"),color:c("color-black"),"border-width":c("border-sm"),"border-color":c("color-grey30"),"min-height":"60px","border-color-active":c("color-black"),"border-radius":c("spacing-2"),"border-color-invalid":c("color-red"),"background-color-disabled":c("color-grey10"),"color-disabled":c("color-grey30")}},Sa={"toggle-container":{gap:"4px"},"toggle-track":{"background-color-checked-disabled":c("color-additional3"),"background-color-checked-enabled":c("color-primary"),"background-color-unchecked-disabled":c("color-grey20"),"background-color-unchecked-enabled":c("color-grey50"),"border-radius":c("spacing-20"),"padding-horizontal":"3px","padding-vertical":"2px","transition-duration":"150ms"},"toggle-thumb":{"background-color-checked-enabled":c("color-white"),"background-color-checked-disabled":c("color-white"),"background-color-unchecked-enabled":c("color-white"),"background-color-unchecked-disabled":c("color-grey15"),"border-radius":"15px","box-shadow":"0px 1px 3px 0px rgba(16, 24, 40, 0.1), 0px 1px 2px -1px rgba(16, 24, 40, 0.1)",height:"8px",width:"8px","transition-duration":"150ms"}},ja={"version-list-container":{gap:c("spacing-16")},"version-list-header":{gap:c("spacing-8"),itemBorderBottom:c("color-grey20"),itemBgColor:c("color-grey10")}},Ta={combobox:{"background-color-active":c("color-grey15"),"background-color-selected":c("color-additional3"),"background-color":c("color-white"),"border-radius":"4px","box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.25)","input-border-radius":"6px","option-column-gap":c("spacing-4"),"row-gap":c("spacing-6"),"selection-border-radius":"4px",height:"22px",padding:c("spacing-8")}},Da={"radio-button":{size:c("spacing-14"),"check-size":c("spacing-8"),"border-color":c("color-grey20"),"background-color":c("color-white"),"border-width":c("border-sm"),"border-radius":"50%","border-color-checked":c("color-primary"),"background-color-disabled":c("color-grey10")}},Ma={"select-view-list":{"item-height":c("spacing-36"),"padding-left":c("spacing-16"),"padding-right":c("spacing-8"),"border-width":c("border-sm"),"border-color":c("color-grey20"),"background-color":c("color-white"),"background-color-viewing":c("color-grey15"),gap:c("spacing-4")}},Ea={"shell-menu":{"padding-x":c("spacing-20"),"link-gap":c("spacing-12"),"section-gap":c("spacing-8"),"link-padding-y":c("spacing-2"),"link-padding-x":c("spacing-4")}},za={"named-list-item":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-20"),"subtext-padding-with-icon":c("spacing-20")}},Oa={"error-list-item":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-26"),"padding-x":c("spacing-4"),"padding-y":c("spacing-12"),"background-color":c("color-white"),"background-color-overview":c("color-grey10"),"background-color-hover":c("color-grey10"),"background-color-overview-hover":c("color-white"),"border-color":c("color-grey20"),"border-radius":c("spacing-2")}},Ia={"ingredient-card":{border:c("border-sm"),"border-color":c("color-grey20"),"border-color-selected":c("color-primary"),padding:c("spacing-12"),"padding-small":c("spacing-8"),"border-radius":c("spacing-2"),"row-gap":c("spacing-4"),"column-gap":c("spacing-4")}},Ra={"branded-header":{"startColor-settings":"#048FEC","startColor-devices":"#9747FF","startColor-tools":"#01528A","startColor-performance":"#B4DEFA","endColor-viewBrowse":"#1C00D8","endColor-configure":"#4CC9F0","endColor-manage":"#9A99F2","endColor-troubleshoot":"#53D7C7","endColor-store":"#193C60","endColor-main":"#048FEC","border-bottom-size":c("border-sm"),"border-bottom-color":c("color-grey20"),"background-color":c("color-white"),"column-gap":c("spacing-16"),padding:"12px 20px","badge-size":"52px","badge-radius":"0","line-height":c("spacing-6"),"info-column-gap":c("spacing-10"),"text-wrapper-gap":c("spacing-4")}},Na={"artifact-store-settings":{"row-columns-published":"minmax(96px, 1fr) 64px minmax(244px, 2fr) 96px 60px","row-columns-market":"minmax(96px, 1fr) 64px minmax(244px, 2fr)","row-divider-color":c("color-grey20"),"row-gap":c("spacing-4"),"header-padding":"0px 8px 0px 4px","cell-padding":"12px 8px 12px 4px","name-column-gap":c("spacing-4")}},Fa={table:{"row-border-bottom-size":c("border-xsm"),"border-color":c("color-grey20"),"header-background-color-hover":c("color-grey20"),"header-background-color":c("color-grey15"),"cell-padding-x":c("spacing-4"),"cell-padding-y":"11px","cell-padding-right-sortable":c("spacing-8"),"cell-padding-left-first-in-row":c("spacing-8"),"head-gap-sortable":c("spacing-4"),"background-color":c("color-white"),"head-font-size":c("font-size-med"),"head-color":c("color-black"),"head-font-weight":c("font-weight-bold"),"cell-font-size":c("font-size-med"),"cell-color":c("color-black"),"cell-font-weight":c("font-weight-normal"),"font-family":c("font-family-default")}},Aa={"resizable-panels":{"border-color":c("color-grey20"),"border-color-hover":c("color-grey30"),"border-color-drag":c("color-grey40"),"handle-width":c("border-sm")}},_a={"file-picker":{"background-color":c("color-grey10"),"background-color-accent":c("color-white"),"selected-background":c("color-primary"),"header-x-padding":c("spacing-20"),"header-y-padding":c("spacing-12"),"header-border-size":c("border-sm"),"header-gap":c("spacing-8"),"header-border-color":c("color-grey20"),"footer-padding-x":c("spacing-12"),"footer-padding-y":c("spacing-10"),"footer-controls-gap":c("spacing-4"),"footer-border-size":c("border-xsm"),"footer-border-color":c("color-grey20"),"search-bar-height":c("spacing-36"),"search-bar-border-size":c("border-sm"),"search-bar-border-color":c("color-grey30"),"search-bar-nav-buttons-gap":c("spacing-12"),"search-bar-padding-x":c("spacing-20"),"search-bar-padding-y":"6.5px","search-bar-radius":c("spacing-2"),"search-bar-edit-button-width":c("spacing-22"),"search-bar-breadcrumb-padding-x":c("spacing-4"),"search-bar-breadcrumb-hover-border":c("color-grey50"),"search-bar-export-button-radius":c("spacing-2"),"search-bar-export-button-background":c("color-primary"),"search-bar-export-button-background-disabled":c("color-grey30"),"nav-panel-y-padding":c("spacing-20"),"nav-panel-x-padding":c("spacing-20"),"nav-panel-gap":c("spacing-40"),"nav-panel-header-bottom-margin":c("spacing-4"),"nav-panel-section-gap":c("spacing-4"),"nav-panel-item-gap":c("spacing-4"),"nav-panel-item-y-padding":c("spacing-2"),"explorer-panel-right-gutter-size":c("spacing-12"),"explorer-panel-padding-y":c("spacing-4"),"explorer-panel-padding-x":c("spacing-10"),"explorer-panel-gap":c("spacing-4"),"explorer-panel-item-padding-x":c("spacing-4"),"explorer-panel-item-padding-y":c("spacing-2"),"explorer-panel-item-icon-gap-left":c("spacing-4"),"explorer-panel-item-icon-gap-right":c("spacing-4"),"explorer-panel-kab-background":c("color-grey10"),"preview-details-gap":c("spacing-10"),"preview-details-gap-small":c("spacing-8"),"preview-icon-size":c("spacing-40"),"preview-icon-y-padding":c("spacing-40"),"preview-icon-y-padding-small":c("spacing-12"),"preview-details-x-padding":c("spacing-20"),"preview-details-x-padding-small":c("spacing-8"),"preview-details-y-padding":c("spacing-10"),"preview-details-item-gap":c("spacing-8"),"preview-details-collapsible-bg":c("color-grey10"),"preview-details-collapsible-gap":c("spacing-4"),"preview-details-collapsible-y-padding":c("spacing-4"),"preview-details-collapsible-border-color":c("color-grey20")}},La={"shell-icon-button":{padding:"5px"}},Wa={"multi-select":{"list-padding":c("spacing-4"),"padding-x":c("spacing-12"),"padding-y":c("spacing-4"),"border-radius":c("spacing-6"),border:c("border-sm"),"border-color":c("color-grey20"),"select-all-border-color":c("color-grey10"),"hover-border-color":c("color-grey40"),gap:c("spacing-4"),background:c("color-white"),"item-padding-x":c("spacing-12"),"item-padding-y":c("spacing-4"),"item-gap":c("spacing-8"),"item-hover-bg":c("color-grey10"),"selected-item-padding-y":c("spacing-2"),"selected-item-padding-x":c("spacing-4"),"selected-item-gap":c("spacing-4"),"selected-item-background":c("color-grey10"),"selected-item-background-hover":c("color-grey20"),"selected-item-radius":c("spacing-4")}},Ba={badge:{"color-blue":c("color-blue"),"color-blue-border":"rgba(4, 143, 236, 0.5)","color-red":c("color-red"),"color-red-border":"rgba(244, 0, 0, 0.5)","color-white":c("color-white"),"color-white-border":"rgba(255, 255, 255, 0.5)","color-black":c("color-black"),"color-black-border":"rgba(0, 0, 0, 0.5)","color-orange":c("color-orange"),"color-orange-border":"rgba(255, 133, 0, 0.5)","color-green":c("color-green"),"color-green-border":"rgba(82, 196, 26, 0.5)"}},Pa={"named-collapsible-branch":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-20"),"subtext-padding-with-icon":c("spacing-20")}},Ha={...ta,...oa,...na,...ra,...sa,...ia,...aa,...la,...ca,...da,...ua,...fa,...pa,...ha,...ga,...ma,...ba,...xa,...ya,...ka,...va,...wa,...Ca,...$a,...Sa,...ja,...Ta,...Da,...Ba,...Ma,...Ea,...za,...Oa,...Ia,...Ra,...Na,...Fa,...Aa,..._a,...La,...Wa,...Pa},Va={color:{grey0:"#FFFFFF",grey10:"#F6F6F6",grey15:"#F1F1F1",grey20:"#DFDFDF",grey30:"#D9D9D9",grey40:"#C4C4C4",grey50:"#ABABAB",grey60:"#868686",grey65:"#676767",grey70:"#484848",grey80:"#2F2F2F",grey100:"#262626",blue0:"#E6F7FF",blue10:"#C8E8FF",blue20:"#40A9FF",blue30:"#048FEC",blue40:"#096DD9",green0:"#52C41A",red0:"#F40000",orange0:"#FF8500",purple0:"#9747FF",yellow0:"#fffd87",yellow1:"#FFD600"}},Ga={"font-size":{"10px":"10px","12px":"12px","14px":"14px","16px":"16px"},"font-weight":{400:"400",700:"700"},"font-family":{Arial:"Arial, sans-serif"},"line-height":{120:"1.2"}},Ua={spacing:{"0-5px":"0.5px","1px":"1px","2px":"2px","3px":"3px","4px":"4px","6px":"6px","7px":"7px","8px":"8px","10px":"10px","12px":"12px","14px":"14px","16px":"16px","18px":"18px","20px":"20px","22px":"22px","24px":"24px","26px":"26px","28px":"28px","30px":"30px","32px":"32px","34px":"34px","36px":"36px","40px":"40px"}},Ya={...Va,...Ga,...Ua},Ka={color:{white:F("color-grey0"),grey10:F("color-grey10"),grey15:F("color-grey15"),grey20:F("color-grey20"),grey30:F("color-grey30"),grey40:F("color-grey40"),grey50:F("color-grey50"),grey60:F("color-grey60"),grey65:F("color-grey65"),grey70:F("color-grey70"),grey80:F("color-grey80"),black:F("color-grey100"),primary:F("color-blue30"),primaryLight:F("color-blue0"),additional1:F("color-blue20"),additional2:F("color-blue40"),additional3:F("color-blue10"),green:F("color-green0"),orange:F("color-orange0"),red:F("color-red0"),purple:F("color-purple0"),blue:F("color-blue30"),yellow:F("color-yellow0")}},qa={"font-size":{sm:F("font-size-10px"),med:F("font-size-12px"),lrg:F("font-size-14px"),xlrg:F("font-size-16px")},"font-weight":{normal:F("font-weight-400"),bold:F("font-weight-700")},"font-family":{default:F("font-family-Arial")},"line-height":{default:F("line-height-120")}},Za={spacing:{2:F("spacing-2px"),4:F("spacing-4px"),6:F("spacing-6px"),7:F("spacing-7px"),8:F("spacing-8px"),10:F("spacing-10px"),12:F("spacing-12px"),14:F("spacing-14px"),16:F("spacing-16px"),18:F("spacing-18px"),20:F("spacing-20px"),22:F("spacing-22px"),24:F("spacing-24px"),26:F("spacing-26px"),28:F("spacing-28px"),30:F("spacing-30px"),32:F("spacing-32px"),34:F("spacing-34px"),36:F("spacing-36px"),40:F("spacing-40px")},border:{xsm:F("spacing-0-5px"),sm:F("spacing-1px"),med:F("spacing-2px"),lrg:F("spacing-3px")}},Xa={...Ka,...qa,...Za},qo=(e,t="studio-c")=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`--${t}-${o}-${n}: ${e[o][n]}`)),Ja=(e,t={})=>{const{prefix:o="studio-c",cssRootSelector:n=":root"}=t,r=a=>a.map(l=>(u,f)=>ht(`--${o}-${String(l)}-${u}`,f)),s=M.css`
|
|
1
|
+
"use strict";var Ma=Object.defineProperty;var za=(e,t,o)=>t in e?Ma(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var T=(e,t,o)=>(za(e,typeof t!="symbol"?t+"":t,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@emotion/react/jsx-runtime"),d=require("react"),g=require("@emotion/styled"),M=require("@emotion/react"),Br=require("react-dom"),O=require("@floating-ui/react"),Oa=require("@use-gesture/react"),q=require("react-hook-form"),W=require("@kosdev-code/kos-ui-sdk"),wt=require("mobx-react-lite"),D=require("mobx"),ve=require("@tanstack/react-table"),Y=require("date-fns");function Ra(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const io=Ra(d),Na=e=>{const t=/[\\^$.*+?()[\]{}|]/g;return RegExp(t.source).test(e)?e.replace(t,"\\$&"):e},Fa=e=>e instanceof RegExp,Aa=e=>typeof e=="string",La=e=>{let t=[];return e.forEach(o=>{Array.isArray(o)?t=t.concat(o):o&&t.push(o)}),t},Ba=(e,t,o)=>{if(e===""||t==="")return e;let n=t;Fa(n)||(n=new RegExp("("+Na(n)+")","gi"));const r=e.split(n);for(let s=1,l=r.length;s<l;s+=2){if(r[s]===void 0||r[s-1]===void 0){console.warn("Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}r[s]=o(r[s],s)}return r},Wr=(e,t,o)=>{let n=e;return Array.isArray(n)||(n=[n]),La(n.map(r=>Aa(r)?Ba(r,t,o):r))},Ct=(e,t)=>t?e:`var(${e})`,N=(e,t)=>Ct(`--studio-g-${e}`,t),c=(e,t)=>Ct(`--studio-s-${e}`,t),Wa={"actionable-blurb":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-20")}},Pa={"app-shell":{"bg-default":c("color-grey80"),"bg-offline":c("color-grey70"),"bg-locked":c("color-grey60"),color:c("color-white")}},Ha={"artifact-drawer":{"background-color":c("color-grey10"),"border-color":c("color-grey20"),"border-width":c("border-sm"),"padding-x":c("spacing-16"),"branch-padding-x":c("spacing-8"),"artifact-list-y-padding":c("spacing-10"),"artifact-items-gap":c("spacing-10"),"version-items-gap":c("spacing-8"),"version-list-padding":c("spacing-8")}},Va={checkbox:{"background-color":c("color-white"),"border-color":c("color-grey30"),"background-color-disabled":c("color-grey15"),"background-color-checked":c("color-primary"),"border-color-checked":c("color-primary"),"background-color-checked-disabled":c("color-additional3"),"border-color-checked-disabled":c("color-additional3"),size:"14px","border-radius":c("spacing-2"),"border-width":c("border-sm")}},Ua={"collapsible-artifact":{"background-color":c("color-white"),"border-color":c("color-grey20"),"border-radius":c("spacing-6"),"border-width":c("border-xsm"),"button-left-or-right":c("spacing-4"),"button-top":"3px","name-and-desc-spacing":c("spacing-2"),"name-and-selected-spacing":c("spacing-8"),padding:`${c("spacing-6")} ${c("spacing-8")}`},"collapsible-artifact-version":{"background-color-hover":c("color-grey20"),"background-color-inherited":"#9747FF12","background-color-selected":c("color-additional3"),"background-color":c("color-grey10"),"border-color-hover":c("color-grey30"),"border-color-inherited":"#9747FF33","border-color-selected":c("color-primary"),"border-color":c("color-grey20"),"border-radius":c("spacing-2"),"border-width":c("border-sm"),padding:`${c("spacing-6")} ${c("spacing-8")}`}},Ga={"collapsible-list-container":{"border-radius":c("spacing-2"),"border-width":"0.5px","border-color":c("color-grey20")},"collapsible-list-header-container":{"background-color":c("color-grey10"),gap:c("spacing-8"),padding:"7px 8px"},"collapsible-list-toggled-container":{"background-color":c("color-white"),gap:c("spacing-8"),padding:c("spacing-8")}},Ka={drawer:{"header-height":c("spacing-30"),"header-bg":c("color-grey10"),"header-border-size":"1px","header-border-color":c("color-grey20"),"header-x-padding":c("spacing-10"),"border-width":"1px","border-color":c("color-grey20"),"left-drop-shadow":"4px 0px 8px -1px rgba(0,0,0,0.2)","right-drop-shadow":"-4px 0px 8px -1px rgba(0,0,0,0.2)"}},Ya={form:{"access-toggle-gap":c("spacing-16"),"access-toggle-height":c("spacing-36"),"error-message-top-margin":c("spacing-4"),"label-column-gap":c("spacing-16"),"label-error-color":c("color-red"),"label-font-family":c("font-family-default"),"label-font-size":c("font-size-med"),"label-font-weight":c("font-weight-normal"),"label-height":"14px","label-line-height":c("line-height-default"),"label-star-padding":c("spacing-4"),"label-width":"112px","label-area-padding":`${c("spacing-7")} 0`}},qa={"horizontal-rule":{"border-width":"0.5px","border-color":c("color-grey20")}},Za={"icon-button":{padding:"0","border-radius":c("spacing-2"),"background-color":"transparent","border-color":"transparent",cursor:"pointer","disabled-cursor":"not-allowed","badge-fill-black":c("color-black"),"badge-fill-blue":c("color-primary"),"badge-fill-green":c("color-green"),"badge-fill-grey":c("color-grey50"),"badge-fill-orange":c("color-orange"),"badge-fill-purple":c("color-purple"),"badge-fill-red":c("color-red"),"badge-fill-white":c("color-white"),"badge-fill-yellow":c("color-yellow"),"badge-right":"1px","badge-top":"1px","active-background-color":"rgba(255, 255, 255, 0.1)"}},Xa={icon:{"fill-black":c("color-black"),"fill-blue":c("color-primary"),"fill-green":c("color-green"),"fill-grey":c("color-grey50"),"fill-orange":c("color-orange"),"fill-purple":c("color-purple"),"fill-red":c("color-red"),"fill-white":c("color-white"),"fill-yellow":c("color-yellow"),"size-lrg":c("spacing-18"),"size-med":c("spacing-16"),"size-sm":c("spacing-14"),"size-xlrg":c("spacing-20"),"size-xsm":c("spacing-12"),"size-xxlrg":c("spacing-22"),"size-xxxlrg":c("spacing-32"),"size-xxsm":c("spacing-10")}},Ja={"image-config-page-header":{gap:c("spacing-16"),"padding-bottom":c("spacing-12"),"title-gap":c("spacing-8"),bg:c("color-white")}},Qa={input:{"background-color-disabled":c("color-grey10"),"background-color":c("color-white"),"border-color-active":c("color-black"),"border-color-invalid":c("color-red"),"border-color":c("color-grey30"),"border-radius":c("spacing-2"),"border-width":c("border-sm"),"color-disabled":c("color-grey30"),"font-family":c("font-family-default"),"font-size-small":c("font-size-sm"),"font-size":c("font-size-med"),"font-weight":c("font-weight-normal"),"icon-left":c("spacing-8"),"line-height":c("line-height-default"),"padding-left-icon":c("spacing-28"),"padding-right-icon":c("spacing-28"),"padding-x":c("spacing-8"),"padding-y-small":"2px","padding-y":c("spacing-7"),color:c("color-black"),height:"28px"}},el={link:{"font-size-med":c("font-size-med"),"font-size-sm":c("font-size-sm"),"font-size-lrg":c("font-size-lrg"),"font-size-xlrg":c("font-size-xlrg"),"font-family":c("font-family-default"),"font-weight":c("font-weight-bold"),"line-height":c("line-height-default"),color:c("color-primary"),"color-hover":c("color-additional1"),"color-active":c("color-additional2"),"color-disabled":c("color-grey30")}},tl={modal:{"overlay-background":"rgba(0, 0, 0, 0.8)","background-color":c("color-white"),headerPadding:c("spacing-10"),headerGap:c("spacing-8"),contentYPadding:c("spacing-10"),contentXPadding:c("spacing-12"),footerYPadding:c("spacing-10"),footerXPadding:c("spacing-12"),footerGap:c("spacing-8"),"border-width":c("border-sm"),"border-color":c("color-grey20"),"base-content-width":"400xp"}},ol={"named-section":{"border-radius":"2px","border-width":"0.5px","selected-border-width":"2px","hover-border-width":c("border-sm"),"border-color":c("color-grey20"),"selected-border-color":c("color-primary")},"named-section-header":{bg:c("color-grey10"),"border-width":"0.5px","border-color":c("color-grey20"),"border-radius":"2px",padding:"8px 10px",gap:c("spacing-8"),"row-gap":c("spacing-4")}},nl={segmented:{"border-width":c("border-sm"),"border-radius":c("spacing-2"),padding:c("spacing-2"),"background-color":c("color-grey15"),"border-color":c("color-grey20"),"button-color":c("color-grey60"),"button-color-disabled":c("color-grey40"),"button-background-color":c("color-grey15"),"button-background-color-hover":c("color-grey20"),"button-background-color-active":c("color-grey40"),"button-padding-y":"5px","button-padding-x":"11px","button-border-width":c("border-sm"),"button-border-color":"transparent","button-font-size":c("font-size-med"),"button-font-weight":c("font-weight-normal"),"button-font-family":c("font-family-default"),"button-gap":c("spacing-4"),"indicator-background-color":c("color-white"),"indicator-color":c("color-black")}},rl={select:{"font-size":c("font-size-med"),"border-size":c("border-sm"),"border-color":c("color-grey20")},option:{"column-gap":c("spacing-8"),"font-family":c("font-family-default"),"font-size":c("font-size-med"),"bg-color-active":c("color-grey20"),"bg-color":c("color-white"),"font-weight-selected":c("font-weight-bold"),color:c("color-black"),"color-disabled":c("color-grey40"),padding:"2px 4px"}},sl={button:{xpadding:c("spacing-16"),ypadding:c("spacing-6"),br:c("spacing-2"),cursor:"pointer","line-height":c("line-height-default"),"font-size":c("font-size-med"),"ypadding-small":c("spacing-2"),"border-width":"1px","font-weight":c("font-weight-bold"),"icon-margin":`0px ${c("spacing-4")} 0px 0px`,"flex-direction":"row",bg:c("color-primary"),"bg-hover":c("color-additional1"),"bg-active":c("color-additional2"),"bg-disabled":c("color-grey30"),border:c("color-primary"),"border-hover":c("color-additional1"),"border-active":c("color-additional2"),"border-disabled":c("color-grey30"),color:c("color-white"),"color-hover":c("color-white"),"color-active":c("color-white"),"color-disabled":c("color-white"),"bg-secondary":c("color-white"),"bg-hover-secondary":c("color-white"),"bg-active-secondary":c("color-white"),"bg-disabled-secondary":c("color-grey10"),"border-secondary":c("color-primary"),"border-hover-secondary":c("color-additional1"),"border-active-secondary":c("color-additional2"),"border-disabled-secondary":c("color-grey30"),"color-secondary":c("color-primary"),"color-hover-secondary":c("color-additional1"),"color-active-secondary":c("color-additional2"),"color-disabled-secondary":c("color-grey30"),"bg-borderless":c("color-white"),"bg-hover-borderless":c("color-white"),"bg-active-borderless":c("color-white"),"bg-disabled-borderless":c("color-white"),"border-borderless":c("color-white"),"border-hover-borderless":c("color-white"),"border-active-borderless":c("color-white"),"border-disabled-borderless":c("color-white"),"color-borderless":c("color-primary"),"color-hover-borderless":c("color-additional1"),"color-active-borderless":c("color-additional2"),"color-disabled-borderless":c("color-grey30")}},il={label:{gap:c("spacing-4")},"label-with-action":{gap:c("spacing-8")},"label-with-content-link":{color:c("color-primary")}},al={text:{"font-family":c("font-family-default"),"line-height":c("line-height-default"),"h1-size":c("font-size-xlrg"),"h2-size":c("font-size-lrg"),"body-size":c("font-size-med"),"small-size":c("font-size-sm"),"font-weight-bold":c("font-weight-bold"),"font-weight-normal":c("font-weight-normal"),"color-dark":c("color-black"),"color-light":c("color-white"),"color-green":c("color-green"),"color-purple":c("color-purple"),"color-red":c("color-red"),"color-blue":c("color-primary"),"color-grey":c("color-grey60"),"color-disabled":c("color-grey40"),"color-yellow":c("color-yellow"),"color-orange":c("color-orange")}},ll={tab:{"trigger-padding-y":c("spacing-8"),"trigger-padding-x":"0","column-gap":c("spacing-8"),"indicator-height":c("border-lrg"),"indicator-color":c("color-grey60"),"trigger-list-underline-color":c("color-grey20"),"trigger-list-underline-height":c("border-sm")}},cl={tag:{"font-family":c("font-family-default"),"bg-color-orange":c("color-orange"),"bg-color-light":c("color-white"),"bg-color-green":c("color-green"),"bg-color-red":c("color-red"),"bg-color-purple":c("color-purple"),"bg-color-blue":c("color-blue"),"bg-color-disabled":c("color-white"),"color-light":c("color-white"),"color-dark":c("color-black"),"color-disabled":c("color-grey40"),"border-radius":c("border-sm"),"border-color":c("color-grey20"),height:c("spacing-18"),padding:"0px 4px"}},dl={textarea:{padding:c("spacing-8"),"background-color":c("color-white"),"font-size":c("font-size-med"),"font-family":c("font-family-default"),"font-weight":c("font-weight-normal"),color:c("color-black"),"border-width":c("border-sm"),"border-color":c("color-grey30"),"min-height":"60px","border-color-active":c("color-black"),"border-radius":c("spacing-2"),"border-color-invalid":c("color-red"),"background-color-disabled":c("color-grey10"),"color-disabled":c("color-grey30")}},ul={"toggle-container":{gap:"4px"},"toggle-track":{"background-color-checked-disabled":c("color-additional3"),"background-color-checked-enabled":c("color-primary"),"background-color-unchecked-disabled":c("color-grey20"),"background-color-unchecked-enabled":c("color-grey50"),"border-radius":c("spacing-20"),"padding-horizontal":"3px","padding-vertical":"2px","transition-duration":"150ms"},"toggle-thumb":{"background-color-checked-enabled":c("color-white"),"background-color-checked-disabled":c("color-white"),"background-color-unchecked-enabled":c("color-white"),"background-color-unchecked-disabled":c("color-grey15"),"border-radius":"15px","box-shadow":"0px 1px 3px 0px rgba(16, 24, 40, 0.1), 0px 1px 2px -1px rgba(16, 24, 40, 0.1)",height:"8px",width:"8px","transition-duration":"150ms"}},hl={"version-list-container":{gap:c("spacing-16")},"version-list-header":{gap:c("spacing-8"),itemBorderBottom:c("color-grey20"),itemBgColor:c("color-grey10")}},pl={combobox:{"background-color-active":c("color-grey15"),"background-color-selected":c("color-additional3"),"background-color":c("color-white"),"border-radius":"4px","box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.25)","input-border-radius":"6px","option-column-gap":c("spacing-4"),"row-gap":c("spacing-6"),"selection-border-radius":"4px",height:"22px",padding:c("spacing-8")}},fl={"radio-button":{size:c("spacing-14"),"check-size":c("spacing-8"),"border-color":c("color-grey20"),"background-color":c("color-white"),"border-width":c("border-sm"),"border-radius":"50%","border-color-checked":c("color-primary"),"background-color-disabled":c("color-grey10")}},gl={"select-view-list":{"item-height":c("spacing-36"),"padding-left":c("spacing-16"),"padding-right":c("spacing-8"),"border-width":c("border-sm"),"border-color":c("color-grey20"),"background-color":c("color-white"),"background-color-viewing":c("color-grey15"),gap:c("spacing-4")}},ml={"shell-menu":{"padding-x":c("spacing-20"),"link-gap":c("spacing-12"),"section-gap":c("spacing-8"),"link-padding-y":c("spacing-2"),"link-padding-x":c("spacing-4")}},bl={"named-list-item":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-20"),"subtext-padding-with-icon":c("spacing-20")}},xl={"error-list-item":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-26"),"padding-x":c("spacing-4"),"padding-y":c("spacing-12"),"background-color":c("color-white"),"background-color-overview":c("color-grey10"),"background-color-hover":c("color-grey10"),"background-color-overview-hover":c("color-white"),"border-color":c("color-grey20"),"border-radius":c("spacing-2")}},yl={"ingredient-card":{border:c("border-sm"),"border-color":c("color-grey20"),"border-color-selected":c("color-primary"),padding:c("spacing-12"),"padding-small":c("spacing-8"),"border-radius":c("spacing-2"),"row-gap":c("spacing-4"),"column-gap":c("spacing-4")}},vl={"branded-header":{"startColor-settings":"#048FEC","startColor-devices":"#9747FF","startColor-tools":"#01528A","startColor-performance":"#B4DEFA","endColor-viewBrowse":"#1C00D8","endColor-configure":"#4CC9F0","endColor-manage":"#9A99F2","endColor-troubleshoot":"#53D7C7","endColor-store":"#193C60","endColor-main":"#048FEC","border-bottom-size":c("border-sm"),"border-bottom-color":c("color-grey20"),"background-color":c("color-white"),"column-gap":c("spacing-16"),padding:"12px 20px","badge-size":"52px","badge-radius":"0","line-height":c("spacing-6"),"info-column-gap":c("spacing-10"),"text-wrapper-gap":c("spacing-4")}},kl={"artifact-store-settings":{"row-columns-published":"minmax(96px, 1fr) 64px minmax(244px, 2fr) 96px 60px","row-columns-market":"minmax(96px, 1fr) 64px minmax(244px, 2fr)","row-divider-color":c("color-grey20"),"row-gap":c("spacing-4"),"header-padding":"0px 8px 0px 4px","cell-padding":"12px 8px 12px 4px","name-column-gap":c("spacing-4")}},wl={table:{"row-border-bottom-size":c("border-xsm"),"border-color":c("color-grey20"),"header-background-color-hover":c("color-grey20"),"header-background-color":c("color-grey15"),"cell-padding-x":c("spacing-4"),"cell-padding-y":"11px","cell-padding-right-sortable":c("spacing-8"),"cell-padding-left-first-in-row":c("spacing-8"),"head-gap-sortable":c("spacing-4"),"background-color":c("color-white"),"head-font-size":c("font-size-med"),"head-color":c("color-black"),"head-font-weight":c("font-weight-bold"),"cell-font-size":c("font-size-med"),"cell-color":c("color-black"),"cell-font-weight":c("font-weight-normal"),"font-family":c("font-family-default")}},Cl={"resizable-panels":{"border-color":c("color-grey20"),"border-color-hover":c("color-grey30"),"border-color-drag":c("color-grey40"),"handle-width":c("border-sm")}},$l={"file-picker":{"background-color":c("color-grey10"),"background-color-accent":c("color-white"),"selected-background":c("color-primary"),"header-x-padding":c("spacing-20"),"header-y-padding":c("spacing-12"),"header-border-size":c("border-sm"),"header-gap":c("spacing-8"),"header-border-color":c("color-grey20"),"footer-padding-x":c("spacing-12"),"footer-padding-y":c("spacing-10"),"footer-controls-gap":c("spacing-4"),"footer-border-size":c("border-xsm"),"footer-border-color":c("color-grey20"),"search-bar-height":c("spacing-36"),"search-bar-border-size":c("border-sm"),"search-bar-border-color":c("color-grey30"),"search-bar-nav-buttons-gap":c("spacing-12"),"search-bar-padding-x":c("spacing-20"),"search-bar-padding-y":"6.5px","search-bar-radius":c("spacing-2"),"search-bar-edit-button-width":c("spacing-22"),"search-bar-breadcrumb-padding-x":c("spacing-4"),"search-bar-breadcrumb-hover-border":c("color-grey50"),"search-bar-export-button-radius":c("spacing-2"),"search-bar-export-button-background":c("color-primary"),"search-bar-export-button-background-disabled":c("color-grey30"),"nav-panel-y-padding":c("spacing-20"),"nav-panel-x-padding":c("spacing-20"),"nav-panel-gap":c("spacing-40"),"nav-panel-header-bottom-margin":c("spacing-4"),"nav-panel-section-gap":c("spacing-4"),"nav-panel-item-gap":c("spacing-4"),"nav-panel-item-y-padding":c("spacing-2"),"explorer-panel-right-gutter-size":c("spacing-12"),"explorer-panel-padding-y":c("spacing-4"),"explorer-panel-padding-x":c("spacing-10"),"explorer-panel-gap":c("spacing-4"),"explorer-panel-item-padding-x":c("spacing-4"),"explorer-panel-item-padding-y":c("spacing-2"),"explorer-panel-item-icon-gap-left":c("spacing-4"),"explorer-panel-item-icon-gap-right":c("spacing-4"),"explorer-panel-kab-background":c("color-grey10"),"preview-details-gap":c("spacing-10"),"preview-details-gap-small":c("spacing-8"),"preview-icon-size":c("spacing-40"),"preview-icon-y-padding":c("spacing-40"),"preview-icon-y-padding-small":c("spacing-12"),"preview-details-x-padding":c("spacing-20"),"preview-details-x-padding-small":c("spacing-8"),"preview-details-y-padding":c("spacing-10"),"preview-details-item-gap":c("spacing-8"),"preview-details-collapsible-bg":c("color-grey10"),"preview-details-collapsible-gap":c("spacing-4"),"preview-details-collapsible-y-padding":c("spacing-4"),"preview-details-collapsible-border-color":c("color-grey20")}},Sl={"shell-icon-button":{padding:"5px"}},jl={"multi-select":{"list-padding":c("spacing-4"),"padding-x":c("spacing-12"),"padding-y":c("spacing-4"),"border-radius":c("spacing-6"),border:c("border-sm"),"border-color":c("color-grey20"),"select-all-border-color":c("color-grey10"),"hover-border-color":c("color-grey40"),gap:c("spacing-4"),background:c("color-white"),"item-padding-x":c("spacing-12"),"item-padding-y":c("spacing-4"),"item-gap":c("spacing-8"),"item-hover-bg":c("color-grey10"),"selected-item-padding-y":c("spacing-2"),"selected-item-padding-x":c("spacing-4"),"selected-item-gap":c("spacing-4"),"selected-item-background":c("color-grey10"),"selected-item-background-hover":c("color-grey20"),"selected-item-radius":c("spacing-4")}},Il={badge:{"color-blue":c("color-blue"),"color-blue-border":"rgba(4, 143, 236, 0.5)","color-red":c("color-red"),"color-red-border":"rgba(244, 0, 0, 0.5)","color-white":c("color-white"),"color-white-border":"rgba(255, 255, 255, 0.5)","color-black":c("color-black"),"color-black-border":"rgba(0, 0, 0, 0.5)","color-orange":c("color-orange"),"color-orange-border":"rgba(255, 133, 0, 0.5)","color-green":c("color-green"),"color-green-border":"rgba(82, 196, 26, 0.5)"}},_l={"button-group":{gap:c("spacing-2"),"background-color":"transparent","border-radius":c("spacing-4"),"border-width":"0","border-color":"transparent",padding:"0","item-padding":c("spacing-4"),"item-border-radius":c("spacing-4"),"item-background-color":"transparent","item-background-color-hover":"rgba(0, 0, 0, 0.08)","item-background-color-active":"rgba(0, 0, 0, 0.15)","item-color":c("color-grey50"),"item-color-active":c("color-black")}},Dl={"named-collapsible-branch":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-12"),"subtext-padding-with-icon":c("spacing-12")}},Tl={notification:{"bg-success":c("color-white"),"bg-error":c("color-white"),"bg-warning":c("color-white"),"bg-info":c("color-white"),"border-success":c("color-green"),"border-error":c("color-red"),"border-warning":c("color-orange"),"border-info":c("color-blue"),"icon-success":c("color-green"),"icon-error":c("color-red"),"icon-warning":c("color-orange"),"icon-info":c("color-blue"),"border-outer":c("color-grey20"),"border-outer-dark":c("color-grey70"),"color-title":c("color-black"),"color-message":c("color-grey60"),"color-close":c("color-grey50"),"color-action":c("color-blue"),"bg-action-hover":c("color-grey10"),"bg-close-hover":c("color-grey10"),"bg-success-dark":c("color-grey80"),"bg-error-dark":c("color-grey80"),"bg-warning-dark":c("color-grey80"),"bg-info-dark":c("color-grey80"),"bg-action-hover-dark":c("color-grey70"),"bg-close-hover-dark":c("color-grey70"),"color-title-dark":c("color-grey10"),"color-message-dark":c("color-grey40")}},El={"studio-list-item":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-12"),"subtext-padding-with-icon":c("spacing-12")}},Ml={view:{"background-color":c("color-white"),"border-color":c("color-grey20"),"border-width":"1px","border-radius":c("spacing-4"),"content-padding":"0"},"view-header":{"background-color":c("color-grey10"),"border-color":c("color-grey20"),"border-bottom-width":"1px",padding:`${c("spacing-8")} ${c("spacing-12")}`,gap:c("spacing-8"),"left-gap":c("spacing-8"),"text-gap":c("spacing-2"),"actions-gap":c("spacing-4"),"subtitle-font-size":c("font-size-sm")}},zl={"view-container":{"vertical-gap":"0","horizontal-gap":c("spacing-16"),padding:"0","background-color":"transparent"}},Ol={...Wa,...Pa,...Ha,...Va,...Ua,...Ga,...Ka,...Ya,...qa,...Za,...Xa,...Ja,...Qa,...el,...tl,...ol,...nl,...rl,...sl,...il,...al,...ll,...cl,...dl,...ul,...hl,...pl,...fl,...Il,..._l,...gl,...ml,...bl,...xl,...yl,...vl,...kl,...wl,...Cl,...$l,...Sl,...jl,...Dl,...Tl,...El,...Ml,...zl},Rl={color:{grey0:"#FFFFFF",grey10:"#F6F6F6",grey15:"#F1F1F1",grey20:"#DFDFDF",grey30:"#D9D9D9",grey40:"#C4C4C4",grey50:"#ABABAB",grey60:"#868686",grey65:"#676767",grey70:"#484848",grey80:"#2F2F2F",grey100:"#262626",blue0:"#E6F7FF",blue10:"#C8E8FF",blue20:"#40A9FF",blue30:"#048FEC",blue40:"#096DD9",green0:"#52C41A",red0:"#F40000",orange0:"#FF8500",purple0:"#9747FF",yellow0:"#fffd87",yellow1:"#FFD600"}},Nl={"font-size":{"10px":"10px","12px":"12px","14px":"14px","16px":"16px"},"font-weight":{400:"400",700:"700"},"font-family":{Arial:"Arial, sans-serif"},"line-height":{120:"1.2"}},Fl={spacing:{"0-5px":"0.5px","1px":"1px","2px":"2px","3px":"3px","4px":"4px","6px":"6px","7px":"7px","8px":"8px","10px":"10px","12px":"12px","14px":"14px","16px":"16px","18px":"18px","20px":"20px","22px":"22px","24px":"24px","26px":"26px","28px":"28px","30px":"30px","32px":"32px","34px":"34px","36px":"36px","40px":"40px"}},Al={...Rl,...Nl,...Fl},Ll={color:{white:N("color-grey0"),grey10:N("color-grey10"),grey15:N("color-grey15"),grey20:N("color-grey20"),grey30:N("color-grey30"),grey40:N("color-grey40"),grey50:N("color-grey50"),grey60:N("color-grey60"),grey65:N("color-grey65"),grey70:N("color-grey70"),grey80:N("color-grey80"),black:N("color-grey100"),primary:N("color-blue30"),primaryLight:N("color-blue0"),additional1:N("color-blue20"),additional2:N("color-blue40"),additional3:N("color-blue10"),green:N("color-green0"),orange:N("color-orange0"),red:N("color-red0"),purple:N("color-purple0"),blue:N("color-blue30"),yellow:N("color-yellow0")}},Bl={"font-size":{sm:N("font-size-10px"),med:N("font-size-12px"),lrg:N("font-size-14px"),xlrg:N("font-size-16px")},"font-weight":{normal:N("font-weight-400"),bold:N("font-weight-700")},"font-family":{default:N("font-family-Arial")},"line-height":{default:N("line-height-120")}},Wl={spacing:{2:N("spacing-2px"),4:N("spacing-4px"),6:N("spacing-6px"),7:N("spacing-7px"),8:N("spacing-8px"),10:N("spacing-10px"),12:N("spacing-12px"),14:N("spacing-14px"),16:N("spacing-16px"),18:N("spacing-18px"),20:N("spacing-20px"),22:N("spacing-22px"),24:N("spacing-24px"),26:N("spacing-26px"),28:N("spacing-28px"),30:N("spacing-30px"),32:N("spacing-32px"),34:N("spacing-34px"),36:N("spacing-36px"),40:N("spacing-40px")},border:{xsm:N("spacing-0-5px"),sm:N("spacing-1px"),med:N("spacing-2px"),lrg:N("spacing-3px")}},Pl={...Ll,...Bl,...Wl},dn=(e,t="studio-c")=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`--${t}-${o}-${n}: ${e[o][n]}`)),Hl=(e,t={})=>{const{prefix:o="studio-c",cssRootSelector:n=":root"}=t,r=l=>l.map(a=>(u,h)=>Ct(`--${o}-${String(a)}-${u}`,h)),s=M.css`
|
|
2
2
|
${n} {
|
|
3
|
-
${
|
|
3
|
+
${dn(e,o).join(`;
|
|
4
4
|
`)};
|
|
5
5
|
}
|
|
6
|
-
`;return{getLocalComponentTokenHelpers:r,localComponentTokenCss:s}},
|
|
7
|
-
${
|
|
6
|
+
`;return{getLocalComponentTokenHelpers:r,localComponentTokenCss:s}},Vl=(e,t="studio-c")=>(o,n)=>Ct(`--${t}-${e}-${o}`,n),Ul=(e,t={})=>{const{prefix:o="studio-c"}=t;return M.css`
|
|
7
|
+
${dn(e,o).join(`;
|
|
8
8
|
`)};
|
|
9
|
-
`},
|
|
9
|
+
`},z=e=>e.map(t=>(o,n)=>Ct(`--studio-c-${t}-${o}`,n)),un=(e,t)=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`${t(`${o}-${n}`,!0)}: ${e[o][n]}`)),Gl=M.css`
|
|
10
10
|
:root {
|
|
11
|
-
${
|
|
11
|
+
${un(Pl,c)}
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,Kl=M.css`
|
|
14
14
|
:root {
|
|
15
15
|
.rdp-root {
|
|
16
16
|
--rdp-accent-color: ${c("color-primary")};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
${
|
|
19
|
+
${un(Al,N)}
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,Yl=M.css`
|
|
22
22
|
:root {
|
|
23
|
-
${
|
|
23
|
+
${un(Ol,(e,t)=>Ct(`--studio-c-${e}`,t))}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,ql=M.css`
|
|
26
26
|
:root {
|
|
27
27
|
// viewable list item
|
|
28
28
|
--studio-component-viewable-list-item-padding-inline: var(
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
--studio-generic-padding-x-small
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,Zl=M.css`
|
|
51
51
|
:root {
|
|
52
52
|
// button
|
|
53
53
|
--studio-component-button-background-color-active: var(
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
--studio-component-button-gap: var(--studio-semantic-control-gap);
|
|
114
114
|
--studio-component-button-padding: 10px 40px;
|
|
115
115
|
}
|
|
116
|
-
`,
|
|
116
|
+
`,Xl=M.css`
|
|
117
117
|
:root {
|
|
118
118
|
// list item
|
|
119
119
|
--studio-component-list-item-border-color-selected: var(
|
|
@@ -146,17 +146,17 @@
|
|
|
146
146
|
--studio-semantic-component-list-padding-inline
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
|
-
`,
|
|
149
|
+
`,Jl=M.css`
|
|
150
150
|
:root {
|
|
151
151
|
//list
|
|
152
152
|
--studio-component-list-border-color-default: var(
|
|
153
153
|
--studio-generic-color-grey-20
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
|
-
`,
|
|
156
|
+
`,Pr=M.css`
|
|
157
157
|
:root {
|
|
158
158
|
}
|
|
159
|
-
`,
|
|
159
|
+
`,Yo=[Pr,ql,Zl,Xl,Jl],qo=M.css`
|
|
160
160
|
:root {
|
|
161
161
|
/* radius */
|
|
162
162
|
--studio-generic-border-radius-small: 4px;
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
--studio-generic-center-text-align: center;
|
|
256
256
|
// --studio-generic-center-text-align: var(--studio-generic-color-white, #f0f0f0);
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,Zo=M.css`
|
|
259
259
|
:root {
|
|
260
260
|
// colour
|
|
261
261
|
--studio-semantic-color-system-green: var(--studio-generic-color-green-100);
|
|
@@ -509,7 +509,7 @@
|
|
|
509
509
|
)
|
|
510
510
|
var(--studio-generic-padding-small);
|
|
511
511
|
}
|
|
512
|
-
`,
|
|
512
|
+
`,Xo=M.css`
|
|
513
513
|
::-webkit-scrollbar {
|
|
514
514
|
background-color: transparent;
|
|
515
515
|
height: 8px;
|
|
@@ -530,14 +530,14 @@
|
|
|
530
530
|
code {
|
|
531
531
|
font-family: var(--ddk-generic-font-family-code);
|
|
532
532
|
}
|
|
533
|
-
`,ll=e=>e==="studio"?[Ao,No,...Ro,Fo]:[Ao,No,...Ro,Fo],gr={"--palette-red-0":"hsl(0, 80%, 94%);","--palette-red-1":"hsl(0, 80%, 90%);","--palette-red-2":"hsl(0, 80%, 86%);","--palette-red-3":"hsl(0, 80%, 77%);","--palette-red-4":"hsl(0, 80%, 68%);","--palette-red-5":"hsl(0, 80%, 59%);","--palette-red-6":"hsl(0, 80%, 50%);","--palette-red-7":"hsl(0, 80%, 41%);","--palette-red-8":"hsl(0, 80%, 32%);","--palette-red-9":"hsl(0, 80%, 23%);","--palette-pink-0":"hsl(339, 80%, 94%);","--palette-pink-1":"hsl(339, 80%, 90%);","--palette-pink-2":"hsl(339, 80%, 86%);","--palette-pink-3":"hsl(339, 80%, 77%);","--palette-pink-4":"hsl(339, 80%, 68%);","--palette-pink-5":"hsl(339, 80%, 59%);","--palette-pink-6":"hsl(339, 80%, 50%);","--palette-pink-7":"hsl(339, 80%, 41%);","--palette-pink-8":"hsl(339, 80%, 32%);","--palette-pink-9":"hsl(339, 80%, 23%);","--palette-grape-0":"hsl(288, 80%, 94%);","--palette-grape-1":"hsl(288, 80%, 90%);","--palette-grape-2":"hsl(288, 80%, 86%);","--palette-grape-3":"hsl(288, 80%, 77%);","--palette-grape-4":"hsl(288, 80%, 68%);","--palette-grape-5":"hsl(288, 80%, 59%);","--palette-grape-6":"hsl(288, 80%, 50%);","--palette-grape-7":"hsl(288, 80%, 41%);","--palette-grape-8":"hsl(288, 80%, 32%);","--palette-grape-9":"hsl(288, 80%, 23%);","--palette-violet-0":"hsl(255, 80%, 94%);","--palette-violet-1":"hsl(255, 80%, 90%);","--palette-violet-2":"hsl(255, 80%, 86%);","--palette-violet-3":"hsl(255, 80%, 77%);","--palette-violet-4":"hsl(255, 80%, 68%);","--palette-violet-5":"hsl(255, 80%, 59%);","--palette-violet-6":"hsl(255, 80%, 50%);","--palette-violet-7":"hsl(255, 80%, 41%);","--palette-violet-8":"hsl(255, 80%, 32%);","--palette-violet-9":"hsl(255, 80%, 23%);","--palette-indigo-0":"hsl(230, 80%, 94%);","--palette-indigo-1":"hsl(230, 80%, 90%);","--palette-indigo-2":"hsl(230, 80%, 86%);","--palette-indigo-3":"hsl(230, 80%, 77%);","--palette-indigo-4":"hsl(230, 80%, 68%);","--palette-indigo-5":"hsl(230, 80%, 59%);","--palette-indigo-6":"hsl(230, 80%, 50%);","--palette-indigo-7":"hsl(230, 80%, 41%);","--palette-indigo-8":"hsl(230, 80%, 32%);","--palette-indigo-9":"hsl(230, 80%, 23%);","--palette-blue-0":"hsl(208, 80%, 94%);","--palette-blue-1":"hsl(208, 80%, 90%);","--palette-blue-2":"hsl(208, 80%, 86%);","--palette-blue-3":"hsl(208, 80%, 77%);","--palette-blue-4":"hsl(208, 80%, 68%);","--palette-blue-5":"hsl(208, 80%, 59%);","--palette-blue-6":"hsl(208, 80%, 50%);","--palette-blue-7":"hsl(208, 80%, 41%);","--palette-blue-8":"hsl(208, 80%, 32%);","--palette-blue-9":"hsl(208, 80%, 23%);","--palette-cyan-0":"hsl(188, 80%, 94%);","--palette-cyan-1":"hsl(188, 80%, 90%);","--palette-cyan-2":"hsl(188, 80%, 86%);","--palette-cyan-3":"hsl(188, 80%, 77%);","--palette-cyan-4":"hsl(188, 80%, 68%);","--palette-cyan-5":"hsl(188, 80%, 59%);","--palette-cyan-6":"hsl(188, 80%, 50%);","--palette-cyan-7":"hsl(188, 80%, 41%);","--palette-cyan-8":"hsl(188, 80%, 32%);","--palette-cyan-9":"hsl(188, 80%, 23%);","--palette-teal-0":"hsl(162, 80%, 94%);","--palette-teal-1":"hsl(162, 80%, 90%);","--palette-teal-2":"hsl(162, 80%, 86%);","--palette-teal-3":"hsl(162, 80%, 77%);","--palette-teal-4":"hsl(162, 80%, 68%);","--palette-teal-5":"hsl(162, 80%, 59%);","--palette-teal-6":"hsl(162, 80%, 50%);","--palette-teal-7":"hsl(162, 80%, 41%);","--palette-teal-8":"hsl(162, 80%, 32%);","--palette-teal-9":"hsl(162, 80%, 23%);","--palette-green-0":"hsl(131, 80%, 94%);","--palette-green-1":"hsl(131, 80%, 90%);","--palette-green-2":"hsl(131, 80%, 86%);","--palette-green-3":"hsl(131, 80%, 77%);","--palette-green-4":"hsl(131, 80%, 68%);","--palette-green-5":"hsl(131, 80%, 59%);","--palette-green-6":"hsl(131, 80%, 50%);","--palette-green-7":"hsl(131, 80%, 41%);","--palette-green-8":"hsl(131, 80%, 32%);","--palette-green-9":"hsl(131, 80%, 23%);","--palette-lime-0":"hsl(85, 80%, 94%);","--palette-lime-1":"hsl(85, 80%, 90%);","--palette-lime-2":"hsl(85, 80%, 86%);","--palette-lime-3":"hsl(85, 80%, 77%);","--palette-lime-4":"hsl(85, 80%, 68%);","--palette-lime-5":"hsl(85, 80%, 59%);","--palette-lime-6":"hsl(85, 80%, 50%);","--palette-lime-7":"hsl(85, 80%, 41%);","--palette-lime-8":"hsl(85, 80%, 32%);","--palette-lime-9":"hsl(85, 80%, 23%);","--palette-yellow-0":"hsl(39, 80%, 94%);","--palette-yellow-1":"hsl(39, 80%, 90%);","--palette-yellow-2":"hsl(39, 80%, 86%);","--palette-yellow-3":"hsl(39, 80%, 77%);","--palette-yellow-4":"hsl(39, 80%, 68%);","--palette-yellow-5":"hsl(39, 80%, 59%);","--palette-yellow-6":"hsl(39, 80%, 50%);","--palette-yellow-7":"hsl(39, 80%, 41%);","--palette-yellow-8":"hsl(39, 80%, 32%);","--palette-yellow-9":"hsl(39, 80%, 23%);","--palette-orange-0":"hsl(24, 80%, 94%);","--palette-orange-1":"hsl(24, 80%, 90%);","--palette-orange-2":"hsl(24, 80%, 86%);","--palette-orange-3":"hsl(24, 80%, 77%);","--palette-orange-4":"hsl(24, 80%, 68%);","--palette-orange-5":"hsl(24, 80%, 59%);","--palette-orange-6":"hsl(24, 80%, 50%);","--palette-orange-7":"hsl(24, 80%, 41%);","--palette-orange-8":"hsl(24, 80%, 32%);","--palette-orange-9":"hsl(24, 80%, 23%);","--palette-neutral":"hsl(0, 0%, 98%);","--palette-neutral-0":"hsl(0, 0%, 97%);","--palette-neutral-1":"hsl(0, 0%, 93%);","--palette-neutral-2":"hsl(0, 0%, 87%);","--palette-neutral-3":"hsl(0, 0%, 77%);","--palette-neutral-4":"hsl(0, 0%, 68%);","--palette-neutral-5":"hsl(0, 0%, 59%);","--palette-neutral-6":"hsl(0, 0%, 50%);","--palette-neutral-7":"hsl(0, 0%, 41%);","--palette-neutral-8":"hsl(0, 0%, 32%);","--palette-neutral-9":"hsl(0, 0%, 18%);","--color-grey-0":"var(--palette-neutral-0)","--color-grey-1":"var(--palette-neutral-1)","--color-grey-2":"var(--palette-neutral-2)","--color-grey-3":"var(--palette-neutral-3)","--color-grey-4":"var(--palette-neutral-4)","--color-grey-5":"var(--palette-neutral-5)","--color-grey-6":"var(--palette-neutral-6)","--color-grey-7":"var(--palette-neutral-7)","--color-grey-8":"var(--palette-neutral-8)","--color-grey-9":"var(--palette-neutral-9)","--color-clouds-0":"hsl(192, 15%, 99%);","--color-clouds-1":"hsl(192, 15%, 97%);","--color-clouds-2":"hsl(192, 15%, 96%);","--color-clouds-3":"hsl(192, 15%, 95%);","--color-clouds-4":"hsl(192, 15%, 94%);","--color-error":"#F40000","--color-success":"#52C41A"},mr={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"#048FEC","--kos-primary-button-color":"#048FEC","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF","--kos-shell-menu-button-hover-color":"var(--kos-generic-color-grey-70)"},br={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF"},xr={"--kos-generic-color-black":"#262626","--kos-generic-color-blue-additional-1":"#40A9FF","--kos-generic-color-blue-additional-2":"#096DD9","--kos-generic-color-blue-additional-3":"#C8E8FF","--kos-generic-color-blue-primary":"#048FEC","--kos-generic-color-grey-10":"#FAFAFA","--kos-generic-color-grey-15":"#f1f1f1","--kos-generic-color-grey-20":"#DFDFDF","--kos-generic-color-grey-30":"#D9D9D9","--kos-generic-color-grey-40":"#C4C4C4","--kos-generic-color-grey-50":"#ABABAB","--kos-generic-color-grey-60":"#868686","--kos-generic-color-grey-70":"#484848","--kos-generic-color-grey-80":"#2F2F2F","--kos-generic-color-white":"#FFFFFF","--kos-generic-table-header":"#F6F6F6","--kos-system-orange":"#FF8500","--kos-system-green":"#52C41A"},cl={"--kos-connection-manager-heading-font-family":"var(--kos-font-family)","--kos-connection-manager-heading-font-size":"14px","--kos-connection-manager-heading-font-style":"","--kos-connection-manager-heading-font-weight":"","--kos-connection-manager-heading-line-height":"","--kos-connection-manager-item-heading-font-family":"","--kos-connection-manager-item-heading-font-size":"","--kos-connection-manager-item-heading-font-style":"","--kos-connection-manager-item-heading-font-weight":"","--kos-connection-manager-item-heading-line-height":"","--kos-connection-manager-image-name-font-family":"","--kos-connection-manager-image-name-font-size":"","--kos-connection-manager-image-name-font-style":"","--kos-connection-manager-image-name-font-weight":"","--kos-connection-manager-image-name-line-height":"","--kos-connection-manager-view-name-font-family":"","--kos-connection-manager-view-name-font-size":"","--kos-connection-manager-view-name-font-style":"","--kos-connection-manager-view-name-font-weight":"","--kos-connection-manager-view-name-line-height":"","--kos-connection-manager-status-label-font-family":"","--kos-connection-manager-status-label-font-size":"10px","--kos-connection-manager-status-label-font-style":"","--kos-connection-manager-status-label-font-weight":"","--kos-connection-manager-status-label-line-height":"","--kos-connection-manager-status-text-font-family":"","--kos-connection-manager-status-text-font-size":"","--kos-connection-manager-status-text-font-style":"","--kos-connection-manager-status-text-font-weight":"","--kos-connection-manager-status-text-line-height":"","--kos-connection-manager-active-tools-heading-font-family":"","--kos-connection-manager-active-tools-heading-font-size":"10px","--kos-connection-manager-active-tools-heading-font-style":"","--kos-connection-manager-active-tools-heading-font-weight":"700","--kos-connection-manager-active-tools-heading-line-height":"","--kos-connection-manager-active-tools-item-font-family":"","--kos-connection-manager-active-tools-item-font-size":"10px","--kos-connection-manager-active-tools-item-font-style":"","--kos-connection-manager-active-tools-item-font-weight":"400","--kos-connection-manager-active-tools-item-line-height":"","--kos-connection-manager-start-new-tool-font-family":"","--kos-connection-manager-start-new-tool-font-size":"12px","--kos-connection-manager-start-new-tool-font-style":"","--kos-connection-manager-start-new-tool-font-weight":"","--kos-connection-manager-start-new-tool-line-height":"","--kos-connection-manager-input-font-family":"","--kos-connection-manager-input-font-size":"","--kos-connection-manager-input-font-style":"","--kos-connection-manager-input-font-weight":"","--kos-connection-manager-input-line-height":"10px","--kos-connection-manager-icon-small-font-size":"10px","--kos-connection-manager-icon-medium-font-size":"12px","--kos-connection-manager-icon-busy-color":"#0000F4","--kos-connection-manager-icon-error-color":"#F40000","--kos-connection-manager-icon-idle-color":"#858585","--kos-connection-manager-icon-success-color":"#52C41A","--kos-connection-manager-connecting-effect-background-color":"#ECFBDF","--kos-component-button-primary-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-background-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color-disabled":"var(--kos-generic-color-grey-10)","--kos-component-button-secondary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-secondary-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-borderless-background-color":"transparent","--kos-component-button-borderless-border-color":"transparent","--kos-component-button-borderless-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-borderless-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-borderless-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-borderless-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-background-color":"var(--kos-generic-color-white)","--kos-component-checkbox-default-border-color-default":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-border-color-hover":"var(--kos-generic-color-grey-10)","--kos-component-checkbox-default-border-color-clicked":"var(--kos-generic-color-grey-50)","--kos-component-checkbox-default-color":"transparent","--kos-component-checkbox-filled-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-color":"var(--kos-generic-color-white)","--kos-component-checkbox-disabled-background-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-border-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-color":"var(--kos-generic-color-white)","--kos-simulator-config-details-border":"var(--kos-generic-color-grey-30)"},dl={"--kos-size-xxxxs":"1.5rem","--kos-size-xxxs":"3rem","--kos-size-xxs":"6rem","--kos-size-xs":"12rem","--kos-size-s":"15rem","--kos-size-m":"20rem","--kos-size-lg":"25rem","--kos-size-xl":"40rem","--kos-size-xxl":"60rem"},ul={"--kos-border-radius-circle":"50%","--kos-border-radius-large":"0.5rem","--kos-border-radius-medium":"0.25rem","--kos-border-radius-small":"0.125rem","--kos-border-radius":"var(--kos-border-radius-medium)","--kos-spacing-xxxs":".125rem","--kos-spacing-xxs":".25rem","--kos-spacing-xs":".5rem","--kos-spacing-s":".75rem","--kos-spacing-m":"1rem","--kos-spacing-lg":"1.5rem","--kos-spacing-xlg":"2rem","--kos-spacing-xxlg":"3rem"},Nn={"--kos-font-family":"Arial, Helvetica, sans-serif","--kos-line-height-body":"14.4px","--kos-line-height-small":"12px","--kos-line-height-body-modal":"14px","--kos-line-height-body-bold":"13px","--kos-line-height-card-title":"18px","--kos-line-height-card-detail":"14px","--kos-line-height-heading-small":"20px","--kos-line-height-heading-medium":"24px","--kos-line-height-heading-large":"30px","--kos-font-family-body":"var(--kos-font-family)","--kos-font-family-body-bold":"var(--kos-font-family)","--kos-font-family-card-title":"var(--kos-font-family)","--kos-font-family-card-detail":"var(--kos-font-family)","--kos-font-family-heading-small":"var(--kos-font-family)","--kos-font-family-heading-medium":"var(--kos-font-family)","--kos-font-family-heading-large":"var(--kos-font-family)","--kos-font-size-body-modal":"12px","--kos-font-size-body":"12px","--kos-font-size-body-bold":"14px","--kos-font-size-card-title":"16px","--kos-font-size-card-detail":"12px","--kos-font-size-heading-small":"14px","--kos-font-size-heading-medium":"16px","--kos-font-size-heading-large":"20px","--kos-font-weight-body":"400","--kos-font-weight-body-bold":"700","--kos-font-weight-card-title":"700","--kos-font-weight-card-detail":"400","--kos-font-weight-heading-small":"700","--kos-font-weight-heading-medium":"700","--kos-font-weight-heading-large":"700"},fl=M.css`
|
|
533
|
+
`,Ql=e=>e==="studio"?[Xo,qo,...Yo,Zo]:[Xo,qo,...Yo,Zo],Hr={"--palette-red-0":"hsl(0, 80%, 94%);","--palette-red-1":"hsl(0, 80%, 90%);","--palette-red-2":"hsl(0, 80%, 86%);","--palette-red-3":"hsl(0, 80%, 77%);","--palette-red-4":"hsl(0, 80%, 68%);","--palette-red-5":"hsl(0, 80%, 59%);","--palette-red-6":"hsl(0, 80%, 50%);","--palette-red-7":"hsl(0, 80%, 41%);","--palette-red-8":"hsl(0, 80%, 32%);","--palette-red-9":"hsl(0, 80%, 23%);","--palette-pink-0":"hsl(339, 80%, 94%);","--palette-pink-1":"hsl(339, 80%, 90%);","--palette-pink-2":"hsl(339, 80%, 86%);","--palette-pink-3":"hsl(339, 80%, 77%);","--palette-pink-4":"hsl(339, 80%, 68%);","--palette-pink-5":"hsl(339, 80%, 59%);","--palette-pink-6":"hsl(339, 80%, 50%);","--palette-pink-7":"hsl(339, 80%, 41%);","--palette-pink-8":"hsl(339, 80%, 32%);","--palette-pink-9":"hsl(339, 80%, 23%);","--palette-grape-0":"hsl(288, 80%, 94%);","--palette-grape-1":"hsl(288, 80%, 90%);","--palette-grape-2":"hsl(288, 80%, 86%);","--palette-grape-3":"hsl(288, 80%, 77%);","--palette-grape-4":"hsl(288, 80%, 68%);","--palette-grape-5":"hsl(288, 80%, 59%);","--palette-grape-6":"hsl(288, 80%, 50%);","--palette-grape-7":"hsl(288, 80%, 41%);","--palette-grape-8":"hsl(288, 80%, 32%);","--palette-grape-9":"hsl(288, 80%, 23%);","--palette-violet-0":"hsl(255, 80%, 94%);","--palette-violet-1":"hsl(255, 80%, 90%);","--palette-violet-2":"hsl(255, 80%, 86%);","--palette-violet-3":"hsl(255, 80%, 77%);","--palette-violet-4":"hsl(255, 80%, 68%);","--palette-violet-5":"hsl(255, 80%, 59%);","--palette-violet-6":"hsl(255, 80%, 50%);","--palette-violet-7":"hsl(255, 80%, 41%);","--palette-violet-8":"hsl(255, 80%, 32%);","--palette-violet-9":"hsl(255, 80%, 23%);","--palette-indigo-0":"hsl(230, 80%, 94%);","--palette-indigo-1":"hsl(230, 80%, 90%);","--palette-indigo-2":"hsl(230, 80%, 86%);","--palette-indigo-3":"hsl(230, 80%, 77%);","--palette-indigo-4":"hsl(230, 80%, 68%);","--palette-indigo-5":"hsl(230, 80%, 59%);","--palette-indigo-6":"hsl(230, 80%, 50%);","--palette-indigo-7":"hsl(230, 80%, 41%);","--palette-indigo-8":"hsl(230, 80%, 32%);","--palette-indigo-9":"hsl(230, 80%, 23%);","--palette-blue-0":"hsl(208, 80%, 94%);","--palette-blue-1":"hsl(208, 80%, 90%);","--palette-blue-2":"hsl(208, 80%, 86%);","--palette-blue-3":"hsl(208, 80%, 77%);","--palette-blue-4":"hsl(208, 80%, 68%);","--palette-blue-5":"hsl(208, 80%, 59%);","--palette-blue-6":"hsl(208, 80%, 50%);","--palette-blue-7":"hsl(208, 80%, 41%);","--palette-blue-8":"hsl(208, 80%, 32%);","--palette-blue-9":"hsl(208, 80%, 23%);","--palette-cyan-0":"hsl(188, 80%, 94%);","--palette-cyan-1":"hsl(188, 80%, 90%);","--palette-cyan-2":"hsl(188, 80%, 86%);","--palette-cyan-3":"hsl(188, 80%, 77%);","--palette-cyan-4":"hsl(188, 80%, 68%);","--palette-cyan-5":"hsl(188, 80%, 59%);","--palette-cyan-6":"hsl(188, 80%, 50%);","--palette-cyan-7":"hsl(188, 80%, 41%);","--palette-cyan-8":"hsl(188, 80%, 32%);","--palette-cyan-9":"hsl(188, 80%, 23%);","--palette-teal-0":"hsl(162, 80%, 94%);","--palette-teal-1":"hsl(162, 80%, 90%);","--palette-teal-2":"hsl(162, 80%, 86%);","--palette-teal-3":"hsl(162, 80%, 77%);","--palette-teal-4":"hsl(162, 80%, 68%);","--palette-teal-5":"hsl(162, 80%, 59%);","--palette-teal-6":"hsl(162, 80%, 50%);","--palette-teal-7":"hsl(162, 80%, 41%);","--palette-teal-8":"hsl(162, 80%, 32%);","--palette-teal-9":"hsl(162, 80%, 23%);","--palette-green-0":"hsl(131, 80%, 94%);","--palette-green-1":"hsl(131, 80%, 90%);","--palette-green-2":"hsl(131, 80%, 86%);","--palette-green-3":"hsl(131, 80%, 77%);","--palette-green-4":"hsl(131, 80%, 68%);","--palette-green-5":"hsl(131, 80%, 59%);","--palette-green-6":"hsl(131, 80%, 50%);","--palette-green-7":"hsl(131, 80%, 41%);","--palette-green-8":"hsl(131, 80%, 32%);","--palette-green-9":"hsl(131, 80%, 23%);","--palette-lime-0":"hsl(85, 80%, 94%);","--palette-lime-1":"hsl(85, 80%, 90%);","--palette-lime-2":"hsl(85, 80%, 86%);","--palette-lime-3":"hsl(85, 80%, 77%);","--palette-lime-4":"hsl(85, 80%, 68%);","--palette-lime-5":"hsl(85, 80%, 59%);","--palette-lime-6":"hsl(85, 80%, 50%);","--palette-lime-7":"hsl(85, 80%, 41%);","--palette-lime-8":"hsl(85, 80%, 32%);","--palette-lime-9":"hsl(85, 80%, 23%);","--palette-yellow-0":"hsl(39, 80%, 94%);","--palette-yellow-1":"hsl(39, 80%, 90%);","--palette-yellow-2":"hsl(39, 80%, 86%);","--palette-yellow-3":"hsl(39, 80%, 77%);","--palette-yellow-4":"hsl(39, 80%, 68%);","--palette-yellow-5":"hsl(39, 80%, 59%);","--palette-yellow-6":"hsl(39, 80%, 50%);","--palette-yellow-7":"hsl(39, 80%, 41%);","--palette-yellow-8":"hsl(39, 80%, 32%);","--palette-yellow-9":"hsl(39, 80%, 23%);","--palette-orange-0":"hsl(24, 80%, 94%);","--palette-orange-1":"hsl(24, 80%, 90%);","--palette-orange-2":"hsl(24, 80%, 86%);","--palette-orange-3":"hsl(24, 80%, 77%);","--palette-orange-4":"hsl(24, 80%, 68%);","--palette-orange-5":"hsl(24, 80%, 59%);","--palette-orange-6":"hsl(24, 80%, 50%);","--palette-orange-7":"hsl(24, 80%, 41%);","--palette-orange-8":"hsl(24, 80%, 32%);","--palette-orange-9":"hsl(24, 80%, 23%);","--palette-neutral":"hsl(0, 0%, 98%);","--palette-neutral-0":"hsl(0, 0%, 97%);","--palette-neutral-1":"hsl(0, 0%, 93%);","--palette-neutral-2":"hsl(0, 0%, 87%);","--palette-neutral-3":"hsl(0, 0%, 77%);","--palette-neutral-4":"hsl(0, 0%, 68%);","--palette-neutral-5":"hsl(0, 0%, 59%);","--palette-neutral-6":"hsl(0, 0%, 50%);","--palette-neutral-7":"hsl(0, 0%, 41%);","--palette-neutral-8":"hsl(0, 0%, 32%);","--palette-neutral-9":"hsl(0, 0%, 18%);","--color-grey-0":"var(--palette-neutral-0)","--color-grey-1":"var(--palette-neutral-1)","--color-grey-2":"var(--palette-neutral-2)","--color-grey-3":"var(--palette-neutral-3)","--color-grey-4":"var(--palette-neutral-4)","--color-grey-5":"var(--palette-neutral-5)","--color-grey-6":"var(--palette-neutral-6)","--color-grey-7":"var(--palette-neutral-7)","--color-grey-8":"var(--palette-neutral-8)","--color-grey-9":"var(--palette-neutral-9)","--color-clouds-0":"hsl(192, 15%, 99%);","--color-clouds-1":"hsl(192, 15%, 97%);","--color-clouds-2":"hsl(192, 15%, 96%);","--color-clouds-3":"hsl(192, 15%, 95%);","--color-clouds-4":"hsl(192, 15%, 94%);","--color-error":"#F40000","--color-success":"#52C41A"},Vr={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"#048FEC","--kos-primary-button-color":"#048FEC","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF","--kos-shell-menu-button-hover-color":"var(--kos-generic-color-grey-70)"},Ur={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF"},Gr={"--kos-generic-color-black":"#262626","--kos-generic-color-blue-additional-1":"#40A9FF","--kos-generic-color-blue-additional-2":"#096DD9","--kos-generic-color-blue-additional-3":"#C8E8FF","--kos-generic-color-blue-primary":"#048FEC","--kos-generic-color-grey-10":"#FAFAFA","--kos-generic-color-grey-15":"#f1f1f1","--kos-generic-color-grey-20":"#DFDFDF","--kos-generic-color-grey-30":"#D9D9D9","--kos-generic-color-grey-40":"#C4C4C4","--kos-generic-color-grey-50":"#ABABAB","--kos-generic-color-grey-60":"#868686","--kos-generic-color-grey-70":"#484848","--kos-generic-color-grey-80":"#2F2F2F","--kos-generic-color-white":"#FFFFFF","--kos-generic-table-header":"#F6F6F6","--kos-system-orange":"#FF8500","--kos-system-green":"#52C41A"},ec={"--kos-connection-manager-heading-font-family":"var(--kos-font-family)","--kos-connection-manager-heading-font-size":"14px","--kos-connection-manager-heading-font-style":"","--kos-connection-manager-heading-font-weight":"","--kos-connection-manager-heading-line-height":"","--kos-connection-manager-item-heading-font-family":"","--kos-connection-manager-item-heading-font-size":"","--kos-connection-manager-item-heading-font-style":"","--kos-connection-manager-item-heading-font-weight":"","--kos-connection-manager-item-heading-line-height":"","--kos-connection-manager-image-name-font-family":"","--kos-connection-manager-image-name-font-size":"","--kos-connection-manager-image-name-font-style":"","--kos-connection-manager-image-name-font-weight":"","--kos-connection-manager-image-name-line-height":"","--kos-connection-manager-view-name-font-family":"","--kos-connection-manager-view-name-font-size":"","--kos-connection-manager-view-name-font-style":"","--kos-connection-manager-view-name-font-weight":"","--kos-connection-manager-view-name-line-height":"","--kos-connection-manager-status-label-font-family":"","--kos-connection-manager-status-label-font-size":"10px","--kos-connection-manager-status-label-font-style":"","--kos-connection-manager-status-label-font-weight":"","--kos-connection-manager-status-label-line-height":"","--kos-connection-manager-status-text-font-family":"","--kos-connection-manager-status-text-font-size":"","--kos-connection-manager-status-text-font-style":"","--kos-connection-manager-status-text-font-weight":"","--kos-connection-manager-status-text-line-height":"","--kos-connection-manager-active-tools-heading-font-family":"","--kos-connection-manager-active-tools-heading-font-size":"10px","--kos-connection-manager-active-tools-heading-font-style":"","--kos-connection-manager-active-tools-heading-font-weight":"700","--kos-connection-manager-active-tools-heading-line-height":"","--kos-connection-manager-active-tools-item-font-family":"","--kos-connection-manager-active-tools-item-font-size":"10px","--kos-connection-manager-active-tools-item-font-style":"","--kos-connection-manager-active-tools-item-font-weight":"400","--kos-connection-manager-active-tools-item-line-height":"","--kos-connection-manager-start-new-tool-font-family":"","--kos-connection-manager-start-new-tool-font-size":"12px","--kos-connection-manager-start-new-tool-font-style":"","--kos-connection-manager-start-new-tool-font-weight":"","--kos-connection-manager-start-new-tool-line-height":"","--kos-connection-manager-input-font-family":"","--kos-connection-manager-input-font-size":"","--kos-connection-manager-input-font-style":"","--kos-connection-manager-input-font-weight":"","--kos-connection-manager-input-line-height":"10px","--kos-connection-manager-icon-small-font-size":"10px","--kos-connection-manager-icon-medium-font-size":"12px","--kos-connection-manager-icon-busy-color":"#0000F4","--kos-connection-manager-icon-error-color":"#F40000","--kos-connection-manager-icon-idle-color":"#858585","--kos-connection-manager-icon-success-color":"#52C41A","--kos-connection-manager-connecting-effect-background-color":"#ECFBDF","--kos-component-button-primary-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-background-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color-disabled":"var(--kos-generic-color-grey-10)","--kos-component-button-secondary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-secondary-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-borderless-background-color":"transparent","--kos-component-button-borderless-border-color":"transparent","--kos-component-button-borderless-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-borderless-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-borderless-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-borderless-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-background-color":"var(--kos-generic-color-white)","--kos-component-checkbox-default-border-color-default":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-border-color-hover":"var(--kos-generic-color-grey-10)","--kos-component-checkbox-default-border-color-clicked":"var(--kos-generic-color-grey-50)","--kos-component-checkbox-default-color":"transparent","--kos-component-checkbox-filled-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-color":"var(--kos-generic-color-white)","--kos-component-checkbox-disabled-background-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-border-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-color":"var(--kos-generic-color-white)","--kos-simulator-config-details-border":"var(--kos-generic-color-grey-30)"},tc={"--kos-size-xxxxs":"1.5rem","--kos-size-xxxs":"3rem","--kos-size-xxs":"6rem","--kos-size-xs":"12rem","--kos-size-s":"15rem","--kos-size-m":"20rem","--kos-size-lg":"25rem","--kos-size-xl":"40rem","--kos-size-xxl":"60rem"},oc={"--kos-border-radius-circle":"50%","--kos-border-radius-large":"0.5rem","--kos-border-radius-medium":"0.25rem","--kos-border-radius-small":"0.125rem","--kos-border-radius":"var(--kos-border-radius-medium)","--kos-spacing-xxxs":".125rem","--kos-spacing-xxs":".25rem","--kos-spacing-xs":".5rem","--kos-spacing-s":".75rem","--kos-spacing-m":"1rem","--kos-spacing-lg":"1.5rem","--kos-spacing-xlg":"2rem","--kos-spacing-xxlg":"3rem"},tr={"--kos-font-family":"Arial, Helvetica, sans-serif","--kos-line-height-body":"14.4px","--kos-line-height-small":"12px","--kos-line-height-body-modal":"14px","--kos-line-height-body-bold":"13px","--kos-line-height-card-title":"18px","--kos-line-height-card-detail":"14px","--kos-line-height-heading-small":"20px","--kos-line-height-heading-medium":"24px","--kos-line-height-heading-large":"30px","--kos-font-family-body":"var(--kos-font-family)","--kos-font-family-body-bold":"var(--kos-font-family)","--kos-font-family-card-title":"var(--kos-font-family)","--kos-font-family-card-detail":"var(--kos-font-family)","--kos-font-family-heading-small":"var(--kos-font-family)","--kos-font-family-heading-medium":"var(--kos-font-family)","--kos-font-family-heading-large":"var(--kos-font-family)","--kos-font-size-body-modal":"12px","--kos-font-size-body":"12px","--kos-font-size-body-bold":"14px","--kos-font-size-card-title":"16px","--kos-font-size-card-detail":"12px","--kos-font-size-heading-small":"14px","--kos-font-size-heading-medium":"16px","--kos-font-size-heading-large":"20px","--kos-font-weight-body":"400","--kos-font-weight-body-bold":"700","--kos-font-weight-card-title":"700","--kos-font-weight-card-detail":"400","--kos-font-weight-heading-small":"700","--kos-font-weight-heading-medium":"700","--kos-font-weight-heading-large":"700"},nc=M.css`
|
|
534
534
|
scrollbar-gutter: stable;
|
|
535
535
|
//AUTO might be the one that overlays things
|
|
536
536
|
|
|
537
537
|
/* Hide scrollbar for IE, Edge, Firefox, and other browsers */
|
|
538
538
|
scrollbar-width: thin; /* Firefox */
|
|
539
539
|
overflow-y: auto;
|
|
540
|
-
`,
|
|
540
|
+
`,rc=()=>M.css`
|
|
541
541
|
:root {
|
|
542
542
|
--kos-font-size-base: 10px;
|
|
543
543
|
--kos-font-size-small: 10px;
|
|
@@ -546,11 +546,11 @@
|
|
|
546
546
|
font-size: var(--kos-base-font-size);
|
|
547
547
|
}
|
|
548
548
|
:root {
|
|
549
|
-
${M.css(
|
|
550
|
-
${M.css(
|
|
551
|
-
${M.css(
|
|
552
|
-
${M.css(
|
|
553
|
-
${M.css(
|
|
549
|
+
${M.css(Hr)}
|
|
550
|
+
${M.css(oc)}
|
|
551
|
+
${M.css(tc)}
|
|
552
|
+
${M.css(Gr)}
|
|
553
|
+
${M.css(ec)}
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
::-webkit-scrollbar {
|
|
@@ -625,17 +625,17 @@
|
|
|
625
625
|
|
|
626
626
|
@media (-webkit-max-device-pixel-ratio: 1.25) {
|
|
627
627
|
:root {
|
|
628
|
-
${M.css(
|
|
628
|
+
${M.css(tr)}
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
@media (-webkit-min-device-pixel-ratio: 1.25) {
|
|
632
632
|
:root {
|
|
633
|
-
${M.css(
|
|
633
|
+
${M.css(tr)}
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
@media (prefers-color-scheme: light) {
|
|
637
637
|
:root {
|
|
638
|
-
${M.css(
|
|
638
|
+
${M.css(Vr)}
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
:root {
|
|
@@ -654,7 +654,7 @@
|
|
|
654
654
|
}
|
|
655
655
|
@media (prefers-color-scheme: dark) {
|
|
656
656
|
:root {
|
|
657
|
-
${M.css(
|
|
657
|
+
${M.css(Ur)}
|
|
658
658
|
}
|
|
659
659
|
:root {
|
|
660
660
|
--ant-primary-color: var(--kos-primary-color);
|
|
@@ -671,15 +671,15 @@
|
|
|
671
671
|
--ant-font-size-base: var(--kos-font-size-base);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
`;function
|
|
675
|
-
font-family: ${
|
|
676
|
-
line-height: ${
|
|
674
|
+
`;function $t(e){return d.forwardRef(e)}const[Se]=z(["text"]),Kr=["blue","dark","disabled","green","grey","light","purple","red","yellow","orange"],sc=({bold:e,children:t,color:o,ellipsis:n,lineClamp:r,textAlign:s,underline:l,variant:a,...u},h)=>i.jsx(M.ClassNames,{children:({cx:p})=>i.jsx(ac,{"data-variant":a,"data-alignment":s,"data-color":o,ref:h,...u,className:p(u.className,{isBold:e,isUnderlined:l,isEllipsized:n,isLineClamped:r}),children:t})}),E=$t(sc),ic=["left","right","center","justify"],ac=g.span`
|
|
675
|
+
font-family: ${Se("font-family")};
|
|
676
|
+
line-height: ${Se("line-height")};
|
|
677
677
|
vertical-align: bottom;
|
|
678
|
-
font-weight: ${
|
|
678
|
+
font-weight: ${Se("font-weight-normal")};
|
|
679
679
|
margin: 0;
|
|
680
680
|
color: inherit;
|
|
681
681
|
&.isBold {
|
|
682
|
-
font-weight: ${
|
|
682
|
+
font-weight: ${Se("font-weight-bold")};
|
|
683
683
|
}
|
|
684
684
|
&.isEllipsized {
|
|
685
685
|
text-overflow: ellipsis;
|
|
@@ -698,96 +698,96 @@
|
|
|
698
698
|
text-decoration: underline;
|
|
699
699
|
}
|
|
700
700
|
&[data-variant="h1"] {
|
|
701
|
-
font-size: ${
|
|
702
|
-
font-weight: ${
|
|
701
|
+
font-size: ${Se("h1-size")};
|
|
702
|
+
font-weight: ${Se("font-weight-bold")};
|
|
703
703
|
}
|
|
704
704
|
&[data-variant="h2"] {
|
|
705
|
-
font-size: ${
|
|
706
|
-
font-weight: ${
|
|
705
|
+
font-size: ${Se("h2-size")};
|
|
706
|
+
font-weight: ${Se("font-weight-bold")};
|
|
707
707
|
}
|
|
708
708
|
&[data-variant="body"] {
|
|
709
|
-
font-size: ${
|
|
709
|
+
font-size: ${Se("body-size")};
|
|
710
710
|
}
|
|
711
711
|
&[data-variant="small"] {
|
|
712
|
-
font-size: ${
|
|
712
|
+
font-size: ${Se("small-size")};
|
|
713
713
|
}
|
|
714
|
-
${
|
|
714
|
+
${ic.map(e=>`&[data-alignment="${e}"] {
|
|
715
715
|
text-align: ${e};
|
|
716
716
|
}`).join(`
|
|
717
717
|
`)}
|
|
718
|
-
${
|
|
719
|
-
color: ${
|
|
718
|
+
${Kr.map(e=>`&[data-color="${e}"] {
|
|
719
|
+
color: ${Se(`color-${e}`)};
|
|
720
720
|
}`).join(`
|
|
721
721
|
`)}
|
|
722
|
-
`,[
|
|
723
|
-
${
|
|
724
|
-
font-size: ${
|
|
725
|
-
`,onClick:t,className:n?"isDisabled":void 0,...r,children:e})),
|
|
726
|
-
font-weight: ${
|
|
727
|
-
font-family: ${
|
|
728
|
-
line-height: ${
|
|
729
|
-
color: ${
|
|
722
|
+
`,[at]=z(["link"]),hn=d.forwardRef(({children:e,onClick:t,size:o="med",isDisabled:n,...r},s)=>i.jsx("span",{ref:s,css:M.css`
|
|
723
|
+
${lc}
|
|
724
|
+
font-size: ${at(`font-size-${o}`)};
|
|
725
|
+
`,onClick:t,className:n?"isDisabled":void 0,...r,children:e})),lc=M.css`
|
|
726
|
+
font-weight: ${at("font-weight")};
|
|
727
|
+
font-family: ${at("font-family")};
|
|
728
|
+
line-height: ${at("line-height")};
|
|
729
|
+
color: ${at("color")};
|
|
730
730
|
transition: color 0.125s ease-in-out;
|
|
731
731
|
cursor: pointer;
|
|
732
732
|
&:hover:not(.isDisabled) {
|
|
733
|
-
color: ${
|
|
733
|
+
color: ${at("color-hover")};
|
|
734
734
|
}
|
|
735
735
|
&:active:not(.isDisabled) {
|
|
736
|
-
color: ${
|
|
736
|
+
color: ${at("color-active")};
|
|
737
737
|
}
|
|
738
738
|
&.isDisabled {
|
|
739
|
-
color: ${
|
|
739
|
+
color: ${at("color-disabled")};
|
|
740
740
|
pointer-events: none;
|
|
741
741
|
}
|
|
742
|
-
`,
|
|
742
|
+
`,Jo=["black","blue","green","grey","orange","purple","red","white","yellow"],cc=["xxsm","xsm","sm","med","lrg","xlrg","xxlrg","xxxlrg"],Yr=d.createContext(null),dc=({children:e,publicPath:t})=>{const o=d.useMemo(()=>({basePath:t??"/ui/"}),[t]);return i.jsx(Yr.Provider,{value:o,children:e})},qr=()=>{const e=d.useContext(Yr);if(!e)throw new Error("BaseUIComponentsContext cannot be used outside of its provider.");return e},[Tt]=z(["icon"]),uc=d.forwardRef(({iconId:e,size:t="sm",color:o,...n},r)=>{const{basePath:s}=qr();return i.jsx(hc,{viewBox:"0 0 36 36",ref:r,"data-size":t,"data-color":o,xmlns:"http://www.w3.org/2000/svg",...n,children:i.jsx("use",{href:`${s}icon-sprite.svg#${e}`})})}),F=d.memo(uc);F.displayName="Icon";const hc=g.svg`
|
|
743
743
|
fill: currentColor;
|
|
744
744
|
transition: fill 0.125s ease-in-out;
|
|
745
745
|
|
|
746
746
|
// Colors
|
|
747
|
-
${
|
|
748
|
-
fill: ${
|
|
747
|
+
${Jo.map(e=>`&[data-color="${e}"] {
|
|
748
|
+
fill: ${Tt(`fill-${e}`)};
|
|
749
749
|
}`).join("")}
|
|
750
750
|
|
|
751
751
|
// Sizes
|
|
752
|
-
${
|
|
753
|
-
max-height: ${
|
|
754
|
-
max-width: ${
|
|
755
|
-
min-height: ${
|
|
756
|
-
min-width: ${
|
|
752
|
+
${cc.map(e=>`&[data-size="${e}"] {
|
|
753
|
+
max-height: ${Tt(`size-${e}`)};
|
|
754
|
+
max-width: ${Tt(`size-${e}`)};
|
|
755
|
+
min-height: ${Tt(`size-${e}`)};
|
|
756
|
+
min-width: ${Tt(`size-${e}`)};
|
|
757
757
|
}`).join("")}
|
|
758
|
-
`,[
|
|
758
|
+
`,[Zr]=z(["actionable-blurb"]),pc=d.memo(({text:e,actions:t,icon:o,title:n,iconColor:r,iconSize:s,className:l})=>{const a=d.useMemo(()=>{if(!t)return e;let u=e;return t.forEach(({action:h,actionText:p})=>{u=Wr(u,p,f=>i.jsx(hn,{onClick:h,children:f},f))}),u},[t,e]);return i.jsxs(fc,{className:l,children:[i.jsx(gc,{children:i.jsx(F,{iconId:o,size:s??"xsm",color:r??"black"})}),i.jsxs(mc,{className:"blurb-wrapper",children:[i.jsx(E,{color:"dark",variant:"body",bold:!0,children:n}),i.jsx(E,{color:"dark",variant:"body",children:a})]})]})}),fc=g.div`
|
|
759
759
|
width: 100%;
|
|
760
760
|
display: grid;
|
|
761
|
-
grid-template-columns: ${
|
|
762
|
-
|
|
761
|
+
grid-template-columns: ${Zr("icon-column-width")} 1fr;
|
|
762
|
+
`,gc=g.div`
|
|
763
763
|
height: 100%;
|
|
764
764
|
display: flex;
|
|
765
765
|
align-items: flex-start;
|
|
766
766
|
justify-content: flex-start;
|
|
767
|
-
`,
|
|
767
|
+
`,mc=g.div`
|
|
768
768
|
display: flex;
|
|
769
769
|
align-items: flex-start;
|
|
770
770
|
justify-content: flex-start;
|
|
771
771
|
flex-direction: column;
|
|
772
|
-
row-gap: ${
|
|
773
|
-
`,
|
|
772
|
+
row-gap: ${Zr("row-gap")};
|
|
773
|
+
`,bc=({defaultOpen:e=!1,open:t,onOpenChange:o})=>{const[n,r]=d.useState(e),s=t??n,l=o??r;return d.useMemo(()=>({open:s,setOpen:l}),[s,l])},Xr=d.createContext(null),Kt=()=>{const e=d.useContext(Xr);if(e==null)throw new Error("Collapsible components must be wrapped in <Collapsible />");return e},ho=({children:e,...t})=>{const o=bc(t);return i.jsx(Xr.Provider,{value:o,children:e})},pn=({children:e})=>{const{open:t,setOpen:o}=Kt(),n=d.useCallback(()=>{o(!t)},[t,o]);if(d.isValidElement(e))return d.cloneElement(e,{...e.props,onClick:n,"data-state":t?"open":"closed"});throw new Error("Passed CollapsibleTrigger an invalid element")},po=({children:e})=>{const{open:t}=Kt();return t?e:null};function Jr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qr={exports:{}};/*!
|
|
774
774
|
Copyright (c) 2018 Jed Watson.
|
|
775
775
|
Licensed under the MIT License (MIT), see
|
|
776
776
|
http://jedwatson.github.io/classnames
|
|
777
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var s="",
|
|
777
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var s="",l=0;l<arguments.length;l++){var a=arguments[l];a&&(s=r(s,n(a)))}return s}function n(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return o.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var l="";for(var a in s)t.call(s,a)&&s[a]&&(l=r(l,a));return l}function r(s,l){return l?s?s+" "+l:s+l:s}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(Qr);var xc=Qr.exports;const St=Jr(xc),[Me]=z(["icon-button"]),ie=d.forwardRef(({iconId:e,badgeOffset:t,badgeBorderColor:o="white",color:n,className:r,size:s,type:l,isActive:a,badgeColor:u,hasBadge:h,...p},f)=>i.jsxs(yc,{className:St({isActive:a},r),type:l??"button",ref:f,...p,children:[h&&i.jsx(vc,{"data-size":s,"data-border-color":o??n,"data-color":u??n,style:t?{right:t.x,top:t.y}:void 0}),i.jsx(F,{size:s,color:p.disabled?"grey":n??"white",iconId:e,className:"icon-button-icon"})]})),yc=g.button`
|
|
778
778
|
box-sizing: border-box;
|
|
779
779
|
align-items: center;
|
|
780
780
|
justify-content: center;
|
|
781
781
|
display: flex;
|
|
782
782
|
position: relative;
|
|
783
783
|
border: 0px;
|
|
784
|
-
background-color: ${
|
|
785
|
-
border-color: ${
|
|
786
|
-
border-radius: ${
|
|
787
|
-
padding: ${
|
|
788
|
-
cursor: ${
|
|
784
|
+
background-color: ${Me("background-color")};
|
|
785
|
+
border-color: ${Me("border-color")};
|
|
786
|
+
border-radius: ${Me("border-radius")};
|
|
787
|
+
padding: ${Me("padding")};
|
|
788
|
+
cursor: ${Me("cursor")};
|
|
789
789
|
&:disabled {
|
|
790
|
-
cursor: ${
|
|
790
|
+
cursor: ${Me("disabled-cursor")};
|
|
791
791
|
}
|
|
792
792
|
> .icon-button-icon {
|
|
793
793
|
transition: fill-opacity 0.125s ease-in-out;
|
|
@@ -798,30 +798,30 @@
|
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
800
|
&.isActive {
|
|
801
|
-
background-color: ${
|
|
801
|
+
background-color: ${Me("active-background-color")};
|
|
802
802
|
}
|
|
803
|
-
`,
|
|
803
|
+
`,vc=g.div`
|
|
804
804
|
position: absolute;
|
|
805
805
|
border: 1.5px solid ${c("color-black")};
|
|
806
806
|
border-radius: 50%;
|
|
807
|
-
top: ${
|
|
808
|
-
right: ${
|
|
807
|
+
top: ${Me("badge-top")};
|
|
808
|
+
right: ${Me("badge-right")};
|
|
809
809
|
transform: translate(50%, -50%);
|
|
810
810
|
// Border Colors
|
|
811
|
-
${
|
|
812
|
-
border-color: ${
|
|
811
|
+
${Jo.map(e=>`&[data-border-color="${e}"] {
|
|
812
|
+
border-color: ${Me(`badge-fill-${e}`)};
|
|
813
813
|
}`).join("")}
|
|
814
814
|
// Colors
|
|
815
|
-
${
|
|
816
|
-
background-color: ${
|
|
815
|
+
${Jo.map(e=>`&[data-color="${e}"] {
|
|
816
|
+
background-color: ${Me(`badge-fill-${e}`)};
|
|
817
817
|
}`).join("")}
|
|
818
818
|
width: ${c("spacing-8")};
|
|
819
819
|
height: ${c("spacing-8")};
|
|
820
|
-
`,
|
|
820
|
+
`,kc=g(ie)`
|
|
821
821
|
&.isLocked {
|
|
822
822
|
cursor: url("/ui/custom-cursors/locked-cursor.png"), not-allowed !important;
|
|
823
823
|
}
|
|
824
|
-
`,
|
|
824
|
+
`,wc=d.memo(({description:e})=>{const{open:t}=Kt();return i.jsx(Cc,{color:"grey",variant:"small","data-state":t?"open":"closed",children:e})}),Cc=g(E)`
|
|
825
825
|
width: 100%;
|
|
826
826
|
overflow: hidden;
|
|
827
827
|
text-overflow: ellipsis;
|
|
@@ -832,60 +832,60 @@
|
|
|
832
832
|
white-space: normal;
|
|
833
833
|
word-break: break-word;
|
|
834
834
|
}
|
|
835
|
-
`,[
|
|
835
|
+
`,[Be]=z(["collapsible-artifact"]),$c=d.memo(({onExternalClick:e,id:t,name:o,isSelected:n,description:r,VersionList:s,className:l})=>{const a=d.useCallback(()=>{e&&e(t)},[t,e]);return i.jsx(ho,{children:i.jsxs(Sc,{className:l,children:[i.jsxs(Ic,{children:[i.jsx(pn,{children:i.jsx(_c,{color:"black",size:"xxsm",iconId:"CaretRight"})}),i.jsxs(Dc,{children:[i.jsxs(Tc,{children:[i.jsx(E,{css:M.css`
|
|
836
836
|
word-break: break-all;
|
|
837
|
-
`,variant:"small",bold:!0,children:o}),!!n&&i.jsx(E,{variant:"small",color:"blue",children:"Selected"})]}),r&&i.jsx(
|
|
837
|
+
`,variant:"small",bold:!0,children:o}),!!n&&i.jsx(E,{variant:"small",color:"blue",children:"Selected"})]}),r&&i.jsx(wc,{description:r})]}),!!e&&i.jsx(jc,{color:"blue",iconId:"Export",onClick:a,size:"xsm"})]}),i.jsx(po,{children:i.jsx(Ec,{children:i.jsx(Mc,{children:s})})})]})})}),Sc=g.div`
|
|
838
838
|
align-items: flex-start;
|
|
839
|
-
background-color: ${
|
|
840
|
-
border-radius: ${
|
|
841
|
-
border: ${
|
|
839
|
+
background-color: ${Be("background-color")};
|
|
840
|
+
border-radius: ${Be("border-radius")};
|
|
841
|
+
border: ${Be("border-width")} solid ${Be("border-color")};
|
|
842
842
|
display: flex;
|
|
843
843
|
flex-direction: column;
|
|
844
844
|
justify-content: flex-start;
|
|
845
845
|
position: relative;
|
|
846
846
|
width: 100%;
|
|
847
|
-
`,
|
|
847
|
+
`,jc=g(ie)`
|
|
848
848
|
z-index: 1;
|
|
849
|
-
`,
|
|
849
|
+
`,Ic=g.div`
|
|
850
850
|
align-items: flex-start;
|
|
851
851
|
display: flex;
|
|
852
|
-
gap: ${
|
|
853
|
-
padding: ${
|
|
852
|
+
gap: ${Be("name-and-selected-spacing")};
|
|
853
|
+
padding: ${Be("padding")};
|
|
854
854
|
width: 100%;
|
|
855
|
-
`,
|
|
855
|
+
`,_c=g(ie)`
|
|
856
856
|
z-index: 1;
|
|
857
857
|
|
|
858
858
|
&[data-state="open"] {
|
|
859
859
|
transform: rotate(90deg);
|
|
860
860
|
}
|
|
861
|
-
`,
|
|
861
|
+
`,Dc=g.div`
|
|
862
862
|
display: flex;
|
|
863
863
|
flex-direction: column;
|
|
864
864
|
flex: 1;
|
|
865
|
-
gap: ${
|
|
865
|
+
gap: ${Be("name-and-desc-spacing")};
|
|
866
866
|
overflow: hidden;
|
|
867
|
-
`,
|
|
867
|
+
`,Tc=g.div`
|
|
868
868
|
align-items: center;
|
|
869
869
|
display: flex;
|
|
870
870
|
flex-wrap: wrap;
|
|
871
871
|
flex: 1;
|
|
872
|
-
gap: ${
|
|
872
|
+
gap: ${Be("name-and-selected-spacing")};
|
|
873
873
|
justify-content: flex-start;
|
|
874
874
|
width: 100%;
|
|
875
|
-
`,
|
|
876
|
-
border-top: 1px solid ${
|
|
875
|
+
`,Ec=g.div`
|
|
876
|
+
border-top: 1px solid ${Be("border-color")};
|
|
877
877
|
width: 100%;
|
|
878
|
-
`,
|
|
879
|
-
padding: ${
|
|
878
|
+
`,Mc=g.div`
|
|
879
|
+
padding: ${Be("name-and-selected-spacing")};
|
|
880
880
|
width: 100%;
|
|
881
|
-
`,
|
|
881
|
+
`,He=()=>{},zc=e=>(t,o)=>e[t][o]??t,Oc=(e,t)=>d.useReducer(zc(t),e),to=e=>(e==null?void 0:e.animationName)||"none",Rc=(e,t)=>{const[o,n]=d.useState(),r=d.useRef(),s=d.useRef(e),l=d.useRef("none"),a=d.useRef(t);d.useLayoutEffect(()=>{a.current=t},[t]);const[u,h]=Oc(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmounting"},unmounted:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounting:{MOUNT:"mounted",ANIMATION_END:"unmounted"}});d.useEffect(()=>{const m=to(r.current);l.current=u==="mounted"?m:"none"},[u]),d.useLayoutEffect(()=>{const m=r.current,x=s.current;if(x!==e){const y=l.current,w=to(m);e?h("MOUNT"):w==="none"||(m==null?void 0:m.display)==="none"?h("UNMOUNT"):h(x&&y!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,h]),d.useLayoutEffect(()=>{if(o){const m=b=>{const w=to(r.current).includes(b.animationName);b.target===o&&w&&Br.flushSync(()=>h("ANIMATION_END"))},x=b=>{b.target===o&&(l.current=to(r.current))};return o.addEventListener("animationstart",x),o.addEventListener("animationcancel",m),o.addEventListener("animationend",m),()=>{o.removeEventListener("animationstart",x),o.removeEventListener("animationcancel",m),o.removeEventListener("animationend",m)}}else return h("ANIMATION_END"),He},[o,h]);const p=d.useCallback(m=>{m&&(r.current=getComputedStyle(m)),n(m)},[]),f=["mounted","unmounting"].includes(u);return d.useEffect(()=>{a.current&&a.current(f)},[f]),{isPresent:f,ref:p}},es=d.memo(({present:e,children:t,onPresenceChange:o})=>{const n=Rc(e,o);return n.isPresent?d.cloneElement(t,{ref:n.ref,present:e}):null});es.displayName="AnimatePresence";const Nc=({offlineContent:e,onlineContent:t})=>t?e?i.jsx(Fc,{children:i.jsxs(Ac,{children:[i.jsx(or,{$front:!0,children:e}),i.jsx(or,{$back:!0,children:t})]})}):t:e,Fc=g.div`
|
|
882
882
|
flex: 1;
|
|
883
883
|
min-width: 0px;
|
|
884
884
|
height: 100%;
|
|
885
885
|
overflow: visible;
|
|
886
886
|
perspective: 300px;
|
|
887
887
|
perspective-origin: left center;
|
|
888
|
-
`,
|
|
888
|
+
`,Ac=g.div`
|
|
889
889
|
width: 100%;
|
|
890
890
|
height: 100%;
|
|
891
891
|
position: relative;
|
|
@@ -905,7 +905,7 @@
|
|
|
905
905
|
transform: rotateX(360deg);
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
|
-
`,
|
|
908
|
+
`,or=g.div`
|
|
909
909
|
position: absolute;
|
|
910
910
|
width: 100%;
|
|
911
911
|
height: 100%;
|
|
@@ -920,148 +920,196 @@
|
|
|
920
920
|
${({$back:e})=>e&&`
|
|
921
921
|
transform: rotateX(180deg) translateZ(20px);
|
|
922
922
|
`}
|
|
923
|
-
`,[
|
|
924
|
-
font-weight: ${
|
|
925
|
-
font-size: ${
|
|
926
|
-
line-height: ${
|
|
927
|
-
border-radius: ${
|
|
928
|
-
border-width: ${
|
|
929
|
-
cursor: ${
|
|
930
|
-
padding: ${`${
|
|
923
|
+
`,[R,me]=z(["button","icon"]),Lc=d.forwardRef(({variant:e,text:t,disabled:o,className:n,icon:r,...s},l)=>i.jsx(M.ClassNames,{children:({cx:a})=>i.jsxs(Bc,{disabled:o,className:a(e,n),ref:l,...s,children:[r&&i.jsx(Wc,{children:i.jsx(F,{iconId:r,size:"sm",color:"white"})}),t]})})),Pe=d.memo(Lc);Pe.displayName="StudioButton";const Bc=g.button`
|
|
924
|
+
font-weight: ${R("font-weight")};
|
|
925
|
+
font-size: ${R("font-size")};
|
|
926
|
+
line-height: ${R("line-height")};
|
|
927
|
+
border-radius: ${R("br")};
|
|
928
|
+
border-width: ${R("border-width")};
|
|
929
|
+
cursor: ${R("cursor")};
|
|
930
|
+
padding: ${`${R("ypadding")} ${R("xpadding")}`};
|
|
931
931
|
border-style: solid;
|
|
932
932
|
transition: border 0.125s ease-in-out, background 0.125s ease-in-out,
|
|
933
933
|
color 0.125s ease-in-out;
|
|
934
934
|
|
|
935
|
-
background-color: ${
|
|
936
|
-
color: ${
|
|
937
|
-
border-color: ${
|
|
935
|
+
background-color: ${R("bg")};
|
|
936
|
+
color: ${R("color")};
|
|
937
|
+
border-color: ${R("border")};
|
|
938
938
|
display: flex;
|
|
939
939
|
align-items: center;
|
|
940
940
|
justify-content: flex-start;
|
|
941
941
|
white-space: nowrap;
|
|
942
942
|
// This token will let us flip the icon and text if we want to
|
|
943
|
-
flex-direction: ${
|
|
943
|
+
flex-direction: ${R("flex-direction")};
|
|
944
944
|
|
|
945
|
-
${`${
|
|
945
|
+
${`${me("fill-white",!0)}: ${R("color")}`};
|
|
946
946
|
|
|
947
947
|
&.primary-small,
|
|
948
948
|
&.secondary-small,
|
|
949
949
|
&.text-small {
|
|
950
|
-
padding-top: ${
|
|
951
|
-
padding-bottom: ${
|
|
950
|
+
padding-top: ${R("ypadding-small")};
|
|
951
|
+
padding-bottom: ${R("ypadding-small")};
|
|
952
952
|
}
|
|
953
953
|
|
|
954
954
|
&:hover {
|
|
955
|
-
border-color: ${
|
|
956
|
-
color: ${
|
|
957
|
-
background-color: ${
|
|
958
|
-
${`${
|
|
955
|
+
border-color: ${R("border-hover")};
|
|
956
|
+
color: ${R("color-hover")};
|
|
957
|
+
background-color: ${R("bg-hover")};
|
|
958
|
+
${`${me("fill-white",!0)}: ${R("color-hover")}`};
|
|
959
959
|
}
|
|
960
960
|
|
|
961
961
|
&:active {
|
|
962
|
-
border-color: ${
|
|
963
|
-
color: ${
|
|
964
|
-
background-color: ${
|
|
965
|
-
${`${
|
|
962
|
+
border-color: ${R("border-active")};
|
|
963
|
+
color: ${R("color-active")};
|
|
964
|
+
background-color: ${R("bg-active")};
|
|
965
|
+
${`${me("fill-white",!0)}: ${R("color-active")}`};
|
|
966
966
|
}
|
|
967
967
|
|
|
968
968
|
&:disabled {
|
|
969
969
|
cursor: not-allowed;
|
|
970
|
-
border-color: ${
|
|
971
|
-
color: ${
|
|
972
|
-
background-color: ${
|
|
973
|
-
${`${
|
|
970
|
+
border-color: ${R("border-disabled")};
|
|
971
|
+
color: ${R("color-disabled")};
|
|
972
|
+
background-color: ${R("bg-disabled")};
|
|
973
|
+
${`${me("fill-white",!0)}: ${R("color-disabled")}`};
|
|
974
974
|
}
|
|
975
975
|
|
|
976
976
|
// Re-assign bg and color vars for secondary buttons.
|
|
977
977
|
&.secondary,
|
|
978
978
|
&.secondary-small {
|
|
979
|
-
background-color: ${
|
|
980
|
-
color: ${
|
|
981
|
-
border-color: ${
|
|
982
|
-
${`${
|
|
979
|
+
background-color: ${R("bg-secondary")};
|
|
980
|
+
color: ${R("color-secondary")};
|
|
981
|
+
border-color: ${R("border-secondary")};
|
|
982
|
+
${`${me("fill-white",!0)}: ${R("color-secondary")}`};
|
|
983
983
|
&:hover {
|
|
984
|
-
border-color: ${
|
|
985
|
-
color: ${
|
|
986
|
-
background-color: ${
|
|
987
|
-
${`${
|
|
984
|
+
border-color: ${R("border-hover-secondary")};
|
|
985
|
+
color: ${R("color-hover-secondary")};
|
|
986
|
+
background-color: ${R("bg-hover-secondary")};
|
|
987
|
+
${`${me("fill-white",!0)}: ${R("color-hover-secondary")}`};
|
|
988
988
|
}
|
|
989
989
|
|
|
990
990
|
&:active {
|
|
991
|
-
border-color: ${
|
|
992
|
-
color: ${
|
|
993
|
-
background-color: ${
|
|
994
|
-
${`${
|
|
991
|
+
border-color: ${R("border-active-secondary")};
|
|
992
|
+
color: ${R("color-active-secondary")};
|
|
993
|
+
background-color: ${R("bg-active-secondary")};
|
|
994
|
+
${`${me("fill-white",!0)}: ${R("color-active-secondary")}`};
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
&:disabled {
|
|
998
|
-
border-color: ${
|
|
999
|
-
color: ${
|
|
1000
|
-
background-color: ${
|
|
1001
|
-
${`${
|
|
998
|
+
border-color: ${R("border-disabled-secondary")};
|
|
999
|
+
color: ${R("color-disabled-secondary")};
|
|
1000
|
+
background-color: ${R("bg-disabled-secondary")};
|
|
1001
|
+
${`${me("fill-white",!0)}: ${R("color-disabled-secondary")}`};
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
1004
|
|
|
1005
1005
|
// Re-assign bg, color, and border vars for borderless buttons.
|
|
1006
1006
|
&.borderless,
|
|
1007
1007
|
&.borderless-small {
|
|
1008
|
-
background-color: ${
|
|
1009
|
-
color: ${
|
|
1010
|
-
border-color: ${
|
|
1011
|
-
${`${
|
|
1008
|
+
background-color: ${R("bg-borderless")};
|
|
1009
|
+
color: ${R("color-borderless")};
|
|
1010
|
+
border-color: ${R("border-borderless")};
|
|
1011
|
+
${`${me("fill-white",!0)}: ${R("color-borderless")}`};
|
|
1012
1012
|
&:hover {
|
|
1013
|
-
border-color: ${
|
|
1014
|
-
color: ${
|
|
1015
|
-
background-color: ${
|
|
1016
|
-
${`${
|
|
1013
|
+
border-color: ${R("border-hover-borderless")};
|
|
1014
|
+
color: ${R("color-hover-borderless")};
|
|
1015
|
+
background-color: ${R("bg-hover-borderless")};
|
|
1016
|
+
${`${me("fill-white",!0)}: ${R("color-hover-borderless")}`};
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
&:active {
|
|
1020
|
-
border-color: ${
|
|
1021
|
-
color: ${
|
|
1022
|
-
background-color: ${
|
|
1023
|
-
${`${
|
|
1020
|
+
border-color: ${R("border-active-borderless")};
|
|
1021
|
+
color: ${R("color-active-borderless")};
|
|
1022
|
+
background-color: ${R("bg-active-borderless")};
|
|
1023
|
+
${`${me("fill-white",!0)}: ${R("color-active-borderless")}`};
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
1026
|
&:disabled {
|
|
1027
1027
|
cursor: not-allowed;
|
|
1028
|
-
border-color: ${
|
|
1029
|
-
color: ${
|
|
1030
|
-
background-color: ${
|
|
1031
|
-
${`${
|
|
1028
|
+
border-color: ${R("border-disabled-borderless")};
|
|
1029
|
+
color: ${R("color-disabled-borderless")};
|
|
1030
|
+
background-color: ${R("bg-disabled-borderless")};
|
|
1031
|
+
${`${me("fill-white",!0)}: ${R("color-disabled-borderless")}`};
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
`,
|
|
1034
|
+
`,Wc=g.span`
|
|
1035
1035
|
display: flex;
|
|
1036
|
-
margin: ${
|
|
1037
|
-
`,[
|
|
1038
|
-
|
|
1039
|
-
|
|
1036
|
+
margin: ${R("icon-margin")};
|
|
1037
|
+
`,ts=d.createContext(void 0);function os(){const e=d.useContext(ts);if(!e)throw new Error("useButtonGroupContext must be used within a ButtonGroup component");return e}const[gt]=z(["button-group"]),Pc=({value:e,defaultValue:t,onValueChange:o,children:n,className:r})=>{const[s,l]=d.useState(t),a=e??s,u=o??l,h=d.useMemo(()=>({value:a,setValue:u}),[a,u]);return i.jsx(ts.Provider,{value:h,children:i.jsx(Hc,{className:r,children:n})})},Hc=g.div`
|
|
1038
|
+
display: inline-flex;
|
|
1039
|
+
align-items: center;
|
|
1040
|
+
gap: ${gt("gap")};
|
|
1041
|
+
background-color: ${gt("background-color")};
|
|
1042
|
+
border-radius: ${gt("border-radius")};
|
|
1043
|
+
border: ${gt("border-width")} solid ${gt("border-color")};
|
|
1044
|
+
padding: ${gt("padding")};
|
|
1045
|
+
`,[st,Vc]=z(["button-group","icon"]),ns=d.memo(({value:e,iconId:t,label:o,tooltip:n,disabled:r})=>{const{value:s,setValue:l}=os(),a=s===e,u=d.useCallback(()=>{r||l(e)},[e,l,r]);return i.jsxs(Uc,{type:"button","data-active":a,onClick:u,disabled:r,title:n,"aria-pressed":a,children:[t&&i.jsx(F,{iconId:t,size:"sm",color:a?"black":"grey",className:"button-group-icon"}),o&&i.jsx("span",{className:"button-group-label",children:o})]})});ns.displayName="ButtonGroupItem";const Uc=g.button`
|
|
1046
|
+
display: inline-flex;
|
|
1047
|
+
align-items: center;
|
|
1048
|
+
justify-content: center;
|
|
1049
|
+
gap: 4px;
|
|
1050
|
+
border: none;
|
|
1051
|
+
background-color: ${st("item-background-color")};
|
|
1052
|
+
border-radius: ${st("item-border-radius")};
|
|
1053
|
+
padding: ${st("item-padding")};
|
|
1054
|
+
cursor: pointer;
|
|
1055
|
+
transition: background-color 0.125s ease-in-out;
|
|
1056
|
+
|
|
1057
|
+
.button-group-label {
|
|
1058
|
+
color: ${st("item-color")};
|
|
1059
|
+
font-size: 12px;
|
|
1060
|
+
transition: color 0.125s ease-in-out;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.button-group-icon {
|
|
1064
|
+
transition: fill 0.125s ease-in-out;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
&:hover:not(:disabled) {
|
|
1068
|
+
background-color: ${st("item-background-color-hover")};
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
&:disabled {
|
|
1072
|
+
cursor: not-allowed;
|
|
1073
|
+
opacity: 0.5;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
&[data-active="true"] {
|
|
1077
|
+
background-color: ${st("item-background-color-active")};
|
|
1078
|
+
|
|
1079
|
+
.button-group-label {
|
|
1080
|
+
color: ${st("item-color-active")};
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
${`${Vc("fill-grey",!0)}: ${st("item-color-active")}`};
|
|
1084
|
+
}
|
|
1085
|
+
`,[je]=z(["checkbox"]),jt=d.forwardRef((e,t)=>i.jsxs(Gc,{children:[i.jsx(Kc,{ref:t,...e,type:"checkbox"}),i.jsx(nr,{className:"check-icon",children:i.jsx(F,{iconId:"CheckSmall",size:"xsm",color:"white"})}),i.jsx(nr,{className:"minus-icon",children:i.jsx(F,{iconId:"Minus",size:"xsm",color:"white"})})]})),Gc=g.div`
|
|
1086
|
+
height: ${je("size")};
|
|
1087
|
+
width: ${je("size")};
|
|
1040
1088
|
pointer-events: none;
|
|
1041
1089
|
position: relative;
|
|
1042
1090
|
display: flex;
|
|
1043
1091
|
flex-shrink: 0;
|
|
1044
|
-
border: ${
|
|
1045
|
-
background-color: ${
|
|
1046
|
-
border-radius: ${
|
|
1092
|
+
border: ${je("border-width")} solid ${je("border-color")};
|
|
1093
|
+
background-color: ${je("background-color")};
|
|
1094
|
+
border-radius: ${je("border-radius")};
|
|
1047
1095
|
overflow: hidden;
|
|
1048
1096
|
cursor: pointer;
|
|
1049
1097
|
transition: background 0.125s ease-in-out, border 0.125s ease-in-out;
|
|
1050
1098
|
:has(> input:disabled) {
|
|
1051
|
-
background-color: ${
|
|
1099
|
+
background-color: ${je("background-color-disabled")};
|
|
1052
1100
|
cursor: not-allowed;
|
|
1053
1101
|
}
|
|
1054
1102
|
:has(> input:checked),
|
|
1055
1103
|
:has(> input:indeterminate) {
|
|
1056
|
-
background-color: ${
|
|
1057
|
-
border-color: ${
|
|
1104
|
+
background-color: ${je("background-color-checked")};
|
|
1105
|
+
border-color: ${je("border-color-checked")};
|
|
1058
1106
|
}
|
|
1059
1107
|
:has(> input:checked:disabled),
|
|
1060
1108
|
:has(> input:indeterminate:disabled) {
|
|
1061
|
-
border-color: ${
|
|
1062
|
-
background-color: ${
|
|
1109
|
+
border-color: ${je("border-color-checked-disabled")};
|
|
1110
|
+
background-color: ${je("background-color-checked-disabled")};
|
|
1063
1111
|
}
|
|
1064
|
-
`,
|
|
1112
|
+
`,nr=g.div`
|
|
1065
1113
|
opacity: 0;
|
|
1066
1114
|
width: 100%;
|
|
1067
1115
|
height: 100%;
|
|
@@ -1073,7 +1121,7 @@
|
|
|
1073
1121
|
top: 0;
|
|
1074
1122
|
left: 0;
|
|
1075
1123
|
z-index: 1;
|
|
1076
|
-
`,
|
|
1124
|
+
`,Kc=g.input`
|
|
1077
1125
|
margin: 0px;
|
|
1078
1126
|
position: absolute;
|
|
1079
1127
|
top: 0;
|
|
@@ -1098,15 +1146,15 @@
|
|
|
1098
1146
|
opacity: 1;
|
|
1099
1147
|
}
|
|
1100
1148
|
}
|
|
1101
|
-
`;var
|
|
1149
|
+
`;var Yc=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],n=0;n<e.rangeCount;n++)o.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||o.forEach(function(r){e.addRange(r)}),t&&t.focus()}},qc=Yc,rr={"text/plain":"Text","text/html":"Url",default:"Text"},Zc="Copy to clipboard: #{key}, Enter";function Xc(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Jc(e,t){var o,n,r,s,l,a,u=!1;t||(t={}),o=t.debug||!1;try{r=qc(),s=document.createRange(),l=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(p){if(p.stopPropagation(),t.format)if(p.preventDefault(),typeof p.clipboardData>"u"){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=rr[t.format]||rr.default;window.clipboardData.setData(f,e)}else p.clipboardData.clearData(),p.clipboardData.setData(t.format,e);t.onCopy&&(p.preventDefault(),t.onCopy(p.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),l.addRange(s);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");u=!0}catch(p){o&&console.error("unable to copy using execCommand: ",p),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(f){o&&console.error("unable to copy using clipboardData: ",f),o&&console.error("falling back to prompt"),n=Xc("message"in t?t.message:Zc),window.prompt(n,e)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(s):l.removeAllRanges()),a&&document.body.removeChild(a),r()}return u}var Qc=Jc;const ed=Jr(Qc),td=250,od=500,nd=({children:e,color:t,copyable:o=!0,copyText:n,onClick:r,onMouseMove:s,onMouseOut:l,onMouseOver:a,style:u,...h})=>{const p=d.useRef(),f=d.useRef(),m=d.useRef(null),x=d.useRef(null),[b,y]=d.useState(!1),[w,v]=d.useState(!1),$=d.useCallback(I=>{let j=n;j||(j=typeof e=="string"?String(e):""),y(!0),ed(j);const _=()=>{y(!1)};clearTimeout(p.current),p.current=setTimeout(_,od),r==null||r(I)},[e,n,r]),C=d.useCallback(I=>{if(!m.current||!x.current){s==null||s(I);return}const j=x.current.getBoundingClientRect(),_=I.clientX-j.left+9,B=I.clientY-j.top+9;m.current.style.transform=`translate(${_}px, ${B}px)`,s==null||s(I)},[s]),S=d.useCallback(I=>{y(!1),v(!1),clearTimeout(f.current),l==null||l(I)},[l]),k=d.useCallback(I=>{const j=()=>{v(!0)};return clearTimeout(f.current),f.current=setTimeout(j,td),a==null||a(I),()=>{clearTimeout(f.current)}},[a]);return i.jsxs("div",{style:{position:"relative"},children:[i.jsx(rd,{ref:x,children:e,onClick:o?$:r,onMouseMove:o?C:s,onMouseOut:o?S:l,onMouseOver:o?k:a,style:o?b?{...u,opacity:.5,cursor:"default",userSelect:"none"}:{...u,cursor:"default",userSelect:"none"}:{...u,cursor:"default",userSelect:"none"},...h}),o&&i.jsx(F,{ref:m,iconId:"CopyFilled",style:{position:"absolute",transition:"opacity 150ms ease-in-out",top:"0px",left:"0px",opacity:w&&!b?"1":"0"}})]})},rd=g(E)`
|
|
1102
1150
|
position: relative;
|
|
1103
1151
|
transition: opacity 150ms ease-in-out;
|
|
1104
|
-
`,
|
|
1152
|
+
`,sd=({children:e,forwardedRef:t,setFloatingReference:o,getReferenceProps:n,open:r})=>{const s=e.ref,l=O.useMergeRefs([o,t,s]);if(d.isValidElement(e))return d.cloneElement(e,n({ref:l,...e.props,"data-state":r?"open":"closed"}));throw new Error("Passed useDecoratedFloatingUITrigger an invalid child element")};function rs({defaultOpen:e=!1,open:t,onOpenChange:o,dismissOptions:n}={}){const[r,s]=d.useState(e),l=t??r,a=d.useCallback(x=>{t===void 0&&s(x),o==null||o(x)},[t,o]),u=O.useFloating({open:l,onOpenChange:a}),h=u.context,p=O.useClick(h),f=O.useDismiss(h,n?{outsidePressEvent:"mousedown",...n}:{outsidePressEvent:"mousedown"}),m=O.useInteractions([p,f]);return d.useMemo(()=>({open:l,setOpen:a,...m,...u}),[l,a,m,u])}const id=M.css`
|
|
1105
1153
|
background: rgba(0, 0, 0, 0.8);
|
|
1106
1154
|
display: grid;
|
|
1107
1155
|
place-items: center;
|
|
1108
1156
|
z-index: 1;
|
|
1109
|
-
`,
|
|
1157
|
+
`,ss=d.createContext(null),ot=()=>{const e=d.useContext(ss);if(e==null)throw new Error("Dialog components must be wrapped in <Dialog />");return e},fn=d.memo(({children:e,...t})=>{const o=rs(t);return i.jsx(ss.Provider,{value:o,children:e})}),gn=d.forwardRef(({children:e},t)=>{const o=ot();return sd({children:e,forwardedRef:t,setFloatingReference:o.refs.setReference,getReferenceProps:o.getReferenceProps,open:o.open})}),mn=d.forwardRef(({disableScrollLock:e,modal:t,portalRoot:o,portalId:n,trapFocus:r,transitionDuration:s,OverlayStyles:l,disableFocusManagement:a,children:u,initialFocus:h,...p},f)=>{const{context:m,...x}=ot(),b=O.useMergeRefs([x.refs.setFloating,f]),{isMounted:y,status:w}=O.useTransitionStatus(m,{duration:s||0});if(!d.isValidElement(u))throw new Error("Passed an invalid child element to Dialog.");if(!y)return null;const v=t?id:l;return i.jsx(O.FloatingPortal,{id:n,root:o,children:i.jsx(O.FloatingFocusManager,{context:m,modal:r,returnFocus:!1,initialFocus:h,disabled:a,children:i.jsx(O.FloatingOverlay,{css:v,"data-status":w,lockScroll:!e,children:d.cloneElement(u,{...u.props,ref:b,"data-status":w==="initial"?"open":w,...x.getFloatingProps(p)})})})})}),bn=300;function xn(){const e=d.useRef(null),[t,o]=d.useState();return d.useEffect(()=>{const n=new ResizeObserver(([r])=>{r&&o(r.contentRect.width)});return e.current&&n.observe(e.current),()=>n.disconnect()},[]),[e,t]}const ad=g.div`
|
|
1110
1158
|
background-color: transparent;
|
|
1111
1159
|
box-sizing: border-box;
|
|
1112
1160
|
cursor: ew-resize;
|
|
@@ -1126,28 +1174,28 @@
|
|
|
1126
1174
|
right: -4px;
|
|
1127
1175
|
top: 0;
|
|
1128
1176
|
}
|
|
1129
|
-
`,
|
|
1177
|
+
`,Yt=({inverse:e=!1,maxSize:t,minSize:o=200,onChange:n,size:r,...s})=>{const l=d.useRef(0),a=Oa.useDrag(({down:u,movement:[h],first:p})=>{if(!u)return;p&&(l.current=r);let f=l.current-h*(e?-1:1);f<o&&(f=o),t!==void 0&&f>t&&(f=t),n(f)});return i.jsx(ad,{...s,...a()})},ld=({defaultOpen:e=!1,minSize:t,mode:o,onOpenChange:n,open:r,size:s=440})=>{const[l,a]=d.useState(e),[u,h]=d.useState(s),p=r??l,f=n??a;return d.useMemo(()=>({mode:o,open:p,setOpen:f,setSize:h,size:u,minSize:t}),[t,o,p,f,u])},Qo=d.createContext(null),dt=()=>{const e=d.useContext(Qo);if(e==null)throw new Error("Drawer components must be wrapped in <Drawer />");return e},[de]=z(["drawer"]),cd=g.div`
|
|
1130
1178
|
display: flex;
|
|
1131
1179
|
height: 100%;
|
|
1132
1180
|
position: absolute;
|
|
1133
1181
|
width: 100%;
|
|
1134
1182
|
z-index: 1;
|
|
1135
1183
|
pointer-events: none;
|
|
1136
|
-
`,
|
|
1184
|
+
`,is=M.css`
|
|
1137
1185
|
pointer-events: none;
|
|
1138
1186
|
display: grid;
|
|
1139
1187
|
overflow: hidden !important;
|
|
1140
1188
|
z-index: 1;
|
|
1141
|
-
`,
|
|
1189
|
+
`,dd=M.css`
|
|
1142
1190
|
place-items: start;
|
|
1143
|
-
${
|
|
1144
|
-
`,
|
|
1191
|
+
${is};
|
|
1192
|
+
`,ud=M.css`
|
|
1145
1193
|
place-items: end;
|
|
1146
|
-
${
|
|
1147
|
-
`,
|
|
1194
|
+
${is};
|
|
1195
|
+
`,as=g.div`
|
|
1148
1196
|
align-items: flex-start;
|
|
1149
1197
|
animation-timing-function: ease-in-out;
|
|
1150
|
-
border-color: ${
|
|
1198
|
+
border-color: ${de("border-color")};
|
|
1151
1199
|
border-style: solid;
|
|
1152
1200
|
border-width: 0px;
|
|
1153
1201
|
display: flex;
|
|
@@ -1159,61 +1207,61 @@
|
|
|
1159
1207
|
width: 100%;
|
|
1160
1208
|
// We add 50ms here to hedge against a race condition between
|
|
1161
1209
|
// the css animation finishing and the floating-ui transition helper hiding the content.
|
|
1162
|
-
animation-duration: ${
|
|
1163
|
-
`,
|
|
1210
|
+
animation-duration: ${bn+10}ms;
|
|
1211
|
+
`,ls=g.div`
|
|
1164
1212
|
display: flex;
|
|
1165
1213
|
height: 100%;
|
|
1166
1214
|
width: 100%;
|
|
1167
|
-
`,
|
|
1215
|
+
`,cs=g.div`
|
|
1168
1216
|
flex: 1;
|
|
1169
1217
|
width: 100%;
|
|
1170
1218
|
height: 100%;
|
|
1171
|
-
`,
|
|
1172
|
-
border-right-width: ${
|
|
1173
|
-
box-shadow: ${
|
|
1219
|
+
`,hd=d.forwardRef(({children:e,className:t,...o},n)=>{const{minSize:r,size:s,setSize:l}=dt(),[a,u]=xn(),h=u!==void 0,p=s/(u||1);return i.jsx(ls,{ref:a,children:h&&i.jsxs(i.Fragment,{children:[i.jsx(as,{ref:n,className:t,style:{flexGrow:p},...o,children:e}),i.jsx(Yt,{inverse:!0,size:s,minSize:r,onChange:l}),i.jsx(cs,{style:{flexGrow:1-p}})]})})}),pd=d.forwardRef(({children:e,className:t,...o},n)=>{const{minSize:r,size:s,setSize:l}=dt(),[a,u]=xn(),h=u!==void 0,p=s/(u||1);return i.jsx(ls,{ref:a,children:h&&i.jsxs(i.Fragment,{children:[i.jsx(cs,{style:{flexGrow:1-p}}),i.jsx(Yt,{size:s,minSize:r,onChange:l}),i.jsx(as,{ref:n,className:t,style:{flexGrow:p},...o,children:e})]})})}),fd=M.keyframes({"0%":{transform:"translateX(-100%)"},"100%":{transform:"translateX(0%)"}}),gd=M.keyframes({"0%":{transform:"translateX(0%)"},"100%":{transform:"translateX(-100%)"}}),md=g(hd)`
|
|
1220
|
+
border-right-width: ${de("border-width")};
|
|
1221
|
+
box-shadow: ${de("left-drop-shadow")};
|
|
1174
1222
|
&[data-status="open"] {
|
|
1175
|
-
animation-name: ${
|
|
1223
|
+
animation-name: ${fd};
|
|
1176
1224
|
}
|
|
1177
1225
|
&[data-status="close"] {
|
|
1178
|
-
animation-name: ${
|
|
1226
|
+
animation-name: ${gd};
|
|
1179
1227
|
}
|
|
1180
|
-
`,
|
|
1181
|
-
border-left-width: ${
|
|
1182
|
-
box-shadow: ${
|
|
1228
|
+
`,bd=M.keyframes({from:{transform:"translateX(100%)"},to:{transform:"translateX(0%)"}}),xd=M.keyframes({from:{transform:"translateX(0%)"},to:{transform:"translateX(100%)"}}),yd=g(pd)`
|
|
1229
|
+
border-left-width: ${de("border-width")};
|
|
1230
|
+
box-shadow: ${de("right-drop-shadow")};
|
|
1183
1231
|
&[data-status="open"] {
|
|
1184
|
-
animation-name: ${
|
|
1232
|
+
animation-name: ${bd};
|
|
1185
1233
|
}
|
|
1186
1234
|
&[data-status="close"] {
|
|
1187
|
-
animation-name: ${
|
|
1235
|
+
animation-name: ${xd};
|
|
1188
1236
|
}
|
|
1189
|
-
`,
|
|
1237
|
+
`,ds=g.div`
|
|
1190
1238
|
width: 100%;
|
|
1191
1239
|
pointer-events: all;
|
|
1192
1240
|
height: fit-content;
|
|
1193
1241
|
animation-timing-function: ease-in-out;
|
|
1194
1242
|
border-width: 0px;
|
|
1195
|
-
border-color: ${
|
|
1243
|
+
border-color: ${de("border-color")};
|
|
1196
1244
|
border-style: solid;
|
|
1197
1245
|
// We add 50ms here to hedge against a race condition between
|
|
1198
1246
|
// the css animation finishing and the floating-ui transition helper hiding the content.
|
|
1199
|
-
animation-duration: ${
|
|
1200
|
-
`,
|
|
1201
|
-
border-bottom-width: ${
|
|
1247
|
+
animation-duration: ${bn+10}ms;
|
|
1248
|
+
`,vd=M.keyframes({from:{transform:"translateY(-30px)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),kd=M.keyframes({from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-30px)",opacity:0}}),wd=g(ds)`
|
|
1249
|
+
border-bottom-width: ${de("border-width")};
|
|
1202
1250
|
&[data-status="open"] {
|
|
1203
|
-
animation-name: ${
|
|
1251
|
+
animation-name: ${vd};
|
|
1204
1252
|
}
|
|
1205
1253
|
&[data-status="close"] {
|
|
1206
|
-
animation-name: ${
|
|
1254
|
+
animation-name: ${kd};
|
|
1207
1255
|
}
|
|
1208
|
-
`,
|
|
1209
|
-
border-top-width: ${
|
|
1256
|
+
`,us=M.keyframes({from:{transform:"translateY(30px)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),hs=M.keyframes({from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(30px)",opacity:0}}),Cd=g(ds)`
|
|
1257
|
+
border-top-width: ${de("border-width")};
|
|
1210
1258
|
&[data-status="open"] {
|
|
1211
|
-
animation-name: ${
|
|
1259
|
+
animation-name: ${us};
|
|
1212
1260
|
}
|
|
1213
1261
|
&[data-status="close"] {
|
|
1214
|
-
animation-name: ${
|
|
1262
|
+
animation-name: ${hs};
|
|
1215
1263
|
}
|
|
1216
|
-
`,
|
|
1264
|
+
`,ps=g.div`
|
|
1217
1265
|
display: flex;
|
|
1218
1266
|
align-items: flex-start;
|
|
1219
1267
|
justify-content: flex-start;
|
|
@@ -1222,100 +1270,100 @@
|
|
|
1222
1270
|
pointer-events: all;
|
|
1223
1271
|
width: fit-content;
|
|
1224
1272
|
border-width: 0px;
|
|
1225
|
-
border-color: ${
|
|
1273
|
+
border-color: ${de("border-color")};
|
|
1226
1274
|
border-style: solid;
|
|
1227
|
-
|
|
1228
|
-
border-right-width: ${
|
|
1229
|
-
box-shadow: ${
|
|
1230
|
-
`,
|
|
1231
|
-
border-left-width: ${
|
|
1232
|
-
box-shadow: ${
|
|
1233
|
-
`,
|
|
1275
|
+
`,$d=d.forwardRef(({children:e,className:t},o)=>{const{size:n,setSize:r}=dt();return i.jsxs(i.Fragment,{children:[i.jsx(Yt,{inverse:!0,size:n,onChange:r}),i.jsx(ps,{ref:o,className:t,style:{width:n},children:e})]})}),Sd=d.forwardRef(({children:e,className:t},o)=>{const{size:n,setSize:r}=dt();return i.jsxs(i.Fragment,{children:[i.jsx(Yt,{size:n,onChange:r}),i.jsx(ps,{ref:o,className:t,style:{width:n},children:e})]})}),jd=g($d)`
|
|
1276
|
+
border-right-width: ${de("border-width")};
|
|
1277
|
+
box-shadow: ${de("left-drop-shadow")};
|
|
1278
|
+
`,Id=g(Sd)`
|
|
1279
|
+
border-left-width: ${de("border-width")};
|
|
1280
|
+
box-shadow: ${de("right-drop-shadow")};
|
|
1281
|
+
`,fs=g.div`
|
|
1234
1282
|
width: 100%;
|
|
1235
1283
|
pointer-events: all;
|
|
1236
1284
|
height: fit-content;
|
|
1237
1285
|
border-width: 0px;
|
|
1238
|
-
border-color: ${
|
|
1286
|
+
border-color: ${de("border-color")};
|
|
1239
1287
|
border-style: solid;
|
|
1240
|
-
`,
|
|
1241
|
-
border-bottom-width: ${
|
|
1242
|
-
`,
|
|
1243
|
-
border-top-width: ${
|
|
1288
|
+
`,_d=g(fs)`
|
|
1289
|
+
border-bottom-width: ${de("border-width")};
|
|
1290
|
+
`,Dd=g(fs)`
|
|
1291
|
+
border-top-width: ${de("border-width")};
|
|
1244
1292
|
&[data-status="open"] {
|
|
1245
|
-
animation-name: ${
|
|
1293
|
+
animation-name: ${us};
|
|
1246
1294
|
}
|
|
1247
1295
|
&[data-status="close"] {
|
|
1248
|
-
animation-name: ${
|
|
1296
|
+
animation-name: ${hs};
|
|
1249
1297
|
}
|
|
1250
|
-
`,
|
|
1298
|
+
`,Td={escapeKey:!0,outsidePress:!1},Ed=d.memo(({children:e,...t})=>{const o=ld(t);return t.mode==="dialog"?i.jsx(Qo.Provider,{value:o,children:i.jsx(fn,{onOpenChange:o.setOpen,open:o.open,defaultOpen:t.defaultOpen??!1,dismissOptions:Td,children:e})}):i.jsx(Qo.Provider,{value:o,children:e})}),Md=d.memo(({children:e})=>{const{mode:t,open:o,setOpen:n}=dt(),r=d.useCallback(()=>{n(!o)},[o,n]);if(t==="dialog")return i.jsx(gn,{children:e});if(d.isValidElement(e))return d.cloneElement(e,{...e.props,onClick:r,"data-state":o?"open":"closed"});throw new Error("Passed DialogTrigger an invalid element")}),zd=d.memo(({children:e,OverlayStyles:t,...o})=>{const{mode:n,open:r}=dt();if(n==="dialog")return i.jsx(mn,{disableScrollLock:!0,disableFocusManagement:!0,OverlayStyles:t,transitionDuration:bn,...o,children:e});if(t)throw new Error("OverlayStyles are not used in inline drawers.");return r?n==="inline-float"?i.jsx(cd,{children:e}):e:null}),[Et]=z(["drawer"]),Od=d.memo(({children:e,className:t,closeIcon:o,showCloseButton:n=!0,title:r,textVariant:s="h2",textBold:l=!1,inheritTextColor:a=!1})=>{const{setOpen:u}=dt(),h=d.useCallback(()=>{u(!1)},[u]);return i.jsxs(Rd,{className:t,children:[i.jsx(E,{bold:l,color:a?void 0:"dark",variant:s,children:r}),e,n&&i.jsx(ie,{onClick:h,iconId:o||"Close",size:"sm",color:a?void 0:"blue"})]})}),Rd=g.div`
|
|
1251
1299
|
width: 100%;
|
|
1252
1300
|
display: flex;
|
|
1253
1301
|
align-items: center;
|
|
1254
1302
|
justify-content: space-between;
|
|
1255
|
-
height: ${
|
|
1256
|
-
background-color: ${
|
|
1257
|
-
border-bottom: ${
|
|
1258
|
-
padding: 0px ${
|
|
1259
|
-
`,[
|
|
1303
|
+
height: ${Et("header-height")};
|
|
1304
|
+
background-color: ${Et("header-bg")};
|
|
1305
|
+
border-bottom: ${Et("header-border-size")} solid ${Et("header-border-color")};
|
|
1306
|
+
padding: 0px ${Et("header-x-padding")};
|
|
1307
|
+
`,[sr]=z(["horizontal-rule"]),Nd=g.div`
|
|
1260
1308
|
width: 100%;
|
|
1261
|
-
border-bottom: ${
|
|
1262
|
-
${
|
|
1263
|
-
`,[
|
|
1309
|
+
border-bottom: ${sr("border-width")} solid
|
|
1310
|
+
${sr("border-color")};
|
|
1311
|
+
`,[ne]=z(["input"]),It=d.forwardRef(({className:e,type:t,prefixIconId:o,prefixIconColor:n,prefixSize:r,isSmall:s,autoCapitalize:l="off",autoComplete:a="off",autoCorrect:u="off",suffixIconColor:h,suffixIcon:p,suffixIconId:f,suffixSize:m,onSuffixIconClick:x,onEnter:b,onKeyDown:y,onClear:w,...v},$)=>{const C=t==="password",[S,k]=d.useState(!1),[I,j]=d.useState(t),_=d.useCallback(()=>{j(S?"password":"text"),k(!S)},[S]),B=U=>{U.key==="Enter"&&(b==null||b()),y==null||y(U)};if(d.useEffect(()=>{j(t)},[t]),w&&C)throw new Error("Password inputs cannot have an onClear handler.");if(p&&C)throw new Error("Password inputs cannot have a suffix icon.");if(w&&p)throw new Error("Inputs with an onClear handler cannot have a suffix icon.");return i.jsx(M.ClassNames,{children:({cx:U})=>i.jsxs(Fd,{children:[i.jsx(Ad,{type:I,className:U(e,{isSmall:s,hasLeftIcon:!!o,hasRightIcon:!!C||!!f}),ref:$,autoCapitalize:C?"off":l,autoComplete:C?"current-password":a,autoCorrect:C?"off":u,onKeyDown:B,...v}),o&&i.jsx(Ld,{iconId:o,color:n||"black",size:r||"sm"}),(C||!!f||!!p||w&&!!v.value)&&i.jsx(Bd,{children:p||(f?i.jsx(F,{iconId:f,color:h??"black",size:m||"sm",onClick:x}):w?i.jsx(ie,{iconId:"Close",size:"sm",color:"black",onClick:w}):i.jsx(ie,{onClick:_,iconId:S?"Eye":"EyeInvisible",size:"sm",color:n??"black"}))})]})})}),Fd=g.div`
|
|
1264
1312
|
width: 100%;
|
|
1265
1313
|
height: fit-content;
|
|
1266
1314
|
position: relative;
|
|
1267
1315
|
display: flex;
|
|
1268
|
-
`,
|
|
1269
|
-
border: ${
|
|
1270
|
-
border-radius: ${
|
|
1271
|
-
height: ${
|
|
1272
|
-
line-height: ${
|
|
1316
|
+
`,Ad=g.input`
|
|
1317
|
+
border: ${ne("border-width")} solid ${ne("border-color")};
|
|
1318
|
+
border-radius: ${ne("border-radius")};
|
|
1319
|
+
height: ${ne("height")};
|
|
1320
|
+
line-height: ${ne("line-height")};
|
|
1273
1321
|
width: 100%;
|
|
1274
|
-
background-color: ${
|
|
1275
|
-
padding: ${
|
|
1322
|
+
background-color: ${ne("background-color")};
|
|
1323
|
+
padding: ${ne("padding-y")} ${ne("padding-x")};
|
|
1276
1324
|
outline: none;
|
|
1277
1325
|
box-shadow: none;
|
|
1278
|
-
font-size: ${
|
|
1279
|
-
font-weight: ${
|
|
1280
|
-
font-family: ${
|
|
1281
|
-
color: ${
|
|
1326
|
+
font-size: ${ne("font-size")};
|
|
1327
|
+
font-weight: ${ne("font-weight")};
|
|
1328
|
+
font-family: ${ne("font-family")};
|
|
1329
|
+
color: ${ne("color")};
|
|
1282
1330
|
transition: border 0.2s ease-in-out, background 0.2s ease-in-out;
|
|
1283
1331
|
:active:not(:disabled):not(:read-only):not([aria-invalid="true"]),
|
|
1284
1332
|
:focus:not(:disabled):not(:read-only):not([aria-invalid="true"]) {
|
|
1285
|
-
border-color: ${
|
|
1333
|
+
border-color: ${ne("border-color-active")};
|
|
1286
1334
|
}
|
|
1287
1335
|
&[aria-invalid="true"]:not(:disabled) {
|
|
1288
|
-
border-color: ${
|
|
1336
|
+
border-color: ${ne("border-color-invalid")};
|
|
1289
1337
|
~ svg {
|
|
1290
|
-
fill: ${
|
|
1338
|
+
fill: ${ne("border-color-invalid")};
|
|
1291
1339
|
}
|
|
1292
1340
|
}
|
|
1293
1341
|
:disabled,
|
|
1294
1342
|
:read-only {
|
|
1295
1343
|
cursor: not-allowed;
|
|
1296
|
-
color: ${
|
|
1297
|
-
background-color: ${
|
|
1344
|
+
color: ${ne("color-disabled")};
|
|
1345
|
+
background-color: ${ne("background-color-disabled")};
|
|
1298
1346
|
~ svg {
|
|
1299
|
-
fill: ${
|
|
1347
|
+
fill: ${ne("color-disabled")};
|
|
1300
1348
|
}
|
|
1301
1349
|
}
|
|
1302
1350
|
&.isSmall {
|
|
1303
|
-
padding: ${
|
|
1351
|
+
padding: ${ne("padding-y-small")} ${ne("padding-x")};
|
|
1304
1352
|
}
|
|
1305
1353
|
&.hasLeftIcon {
|
|
1306
|
-
padding-left: ${
|
|
1354
|
+
padding-left: ${ne("padding-left-icon")};
|
|
1307
1355
|
}
|
|
1308
1356
|
&.hasRightIcon {
|
|
1309
|
-
padding-right: ${
|
|
1357
|
+
padding-right: ${ne("padding-right-icon")};
|
|
1310
1358
|
}
|
|
1311
|
-
`,
|
|
1359
|
+
`,Ld=g(F)`
|
|
1312
1360
|
position: absolute;
|
|
1313
1361
|
top: 50%;
|
|
1314
1362
|
transform: translateY(-50%);
|
|
1315
1363
|
pointer-events: none;
|
|
1316
1364
|
z-index: 1;
|
|
1317
|
-
left: ${
|
|
1318
|
-
`,
|
|
1365
|
+
left: ${ne("icon-left")};
|
|
1366
|
+
`,Bd=g.div`
|
|
1319
1367
|
position: absolute;
|
|
1320
1368
|
right: 8px;
|
|
1321
1369
|
top: 50%;
|
|
@@ -1323,26 +1371,26 @@
|
|
|
1323
1371
|
z-index: 1;
|
|
1324
1372
|
display: grid;
|
|
1325
1373
|
place-content: center;
|
|
1326
|
-
`;
|
|
1374
|
+
`;It.displayName="Input";const Wd=d.forwardRef(({onSearch:e,onChange:t,value:o,placeholder:n,prefixIconColor:r,suffixIconColor:s,...l},a)=>i.jsx(It,{...l,ref:a,autoComplete:"off",prefixIconColor:r??"black",prefixIconId:"Search",prefixSize:"xsm",suffixIconColor:s??"blue",suffixIconId:o?"Close":void 0,suffixSize:"xsm",onSuffixIconClick:()=>{t==null||t(""),e==null||e("")},placeholder:n||"Search for...",onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),e(u.currentTarget.value))},onChange:u=>{t==null||t(u.target.value)},value:o})),[Pd]=z(["label"]),gs=M.css`
|
|
1327
1375
|
align-items: center;
|
|
1328
1376
|
display: flex;
|
|
1329
|
-
gap: ${
|
|
1330
|
-
`,
|
|
1331
|
-
color: ${
|
|
1332
|
-
`,
|
|
1377
|
+
gap: ${Pd("gap")};
|
|
1378
|
+
`,ms=({variant:e="body",...t})=>i.jsx(E,{css:gs,variant:e,...t}),yn=({children:e,prefix:t,suffix:o,...n})=>i.jsxs(ms,{...n,children:[t,e,o]}),[Hd]=z(["label-with-action"]),Vd=M.css([gs,{gap:Hd("gap")}]),Ud=({action:e,variant:t="h2",...o})=>i.jsx(yn,{css:Vd,suffix:e,variant:t,...o}),[Gd]=z(["label-with-content-link"]),Kd=M.css`
|
|
1379
|
+
color: ${Gd("color")};
|
|
1380
|
+
`,Yd=e=>i.jsx(yn,{css:Kd,...e}),qd=new RegExp(/^[a-zA-Z0-9 _.-]*$/),bs=new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),Zd=new RegExp(/^\d+$/),Xd=new RegExp(/^\S*$/),Jd=new RegExp(/^[a-zA-Z].*/),xs=new RegExp(/^[-a-zA-Z0-9-_'().-]+(\s+[-a-zA-Z0-9-_'().-]+)*$/);var ys=(e=>(e.email="email",e))(ys||{});const Qd=()=>({email:e=>bs.test(e)}),eu=12;var At=(e=>(e.noDigit="noDigit",e.noUpperCase="noUpperCase",e.noSpecialCharacter="noSpecialCharacter",e.tooSimilar="tooSimilar",e))(At||{});const tu=(e,t)=>({...e?{tooSimilar:(o,n)=>{const r=n[t??"password_current"];return r?o!==r:!0}}:{tooSimilar:()=>!0},noDigit:o=>new RegExp(/\d/).test(o),noSpecialCharacter:o=>new RegExp(/[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]+/).test(o),noUpperCase:o=>new RegExp(/[A-Z]+/).test(o)}),vs=e=>typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string",ou=e=>{if(vs(e))return e.message},nu=()=>{let e=!1,t=[];const o=new Map,n=new window.ResizeObserver((r,s)=>{t=t.concat(r),e||window.requestAnimationFrame(()=>{const l=new Set;t.forEach(a=>{if(!l.has(a.target)){l.add(a.target);const u=o.get(a.target);u&&u.forEach(h=>h(a,s))}}),t=[],e=!1}),e=!0});return{observer:n,subscribe(r,s){n.observe(r);const l=o.get(r)??[];l.push(s),o.set(r,l)},unsubscribe(r,s){const l=o.get(r)??[];if(l.length===1){n.unobserve(r),o.delete(r);return}const a=l.indexOf(s);a!==-1&&l.splice(a,1),o.set(r,l)}}};let Mo;const ru=()=>Mo||(Mo=nu()),ks=(e,t)=>{const o=ru(),n=d.useRef(t);return d.useLayoutEffect(()=>{n.current=t},[t]),d.useLayoutEffect(()=>{let r=!1;const s=e&&"current"in e?e.current:e;if(!s)return He;const l=(a,u)=>{r||n.current(a,u)};return o.subscribe(s,l),()=>{r=!0,o.unsubscribe(s,l)}},[e,o]),o.observer},fo=e=>{const t=d.useRef(null),o=d.useRef(null),n=d.useCallback(()=>{if(!t.current)return;const l=o.current,a=t.current;if(a!==null&&l!==null){const u=a.getAttribute("data-original");a.textContent!==u&&(a.textContent=u);const p=a.textContent,f=a.offsetWidth,m=l.offsetWidth;if(f>m&&p){const x=p.length,b=f/x,w=Math.ceil((f-m)/b)/2+1.5,v=Math.floor(x/2-w),$=Math.ceil(x/2+w),C=p.substr(0,v),S=p.substr($);a.textContent=`${C.trim()}...${S.trim()}`}}},[]),r=d.useCallback(l=>{n()},[n]);ks(o,r),d.useEffect(()=>n(),[e.children,n]);const s=d.useCallback(l=>{t.current=l,o.current=(l==null?void 0:l.parentElement)??null},[]);return i.jsx(su,{"data-original":e.children,ref:s,...e})},su=g(E)`
|
|
1333
1381
|
white-space: nowrap;
|
|
1334
1382
|
word-break: keep-all;
|
|
1335
1383
|
overflow: visible;
|
|
1336
|
-
`,
|
|
1384
|
+
`,iu=g.div`
|
|
1337
1385
|
display: grid;
|
|
1338
1386
|
width: 100%;
|
|
1339
1387
|
height: 100%;
|
|
1340
1388
|
position: relative;
|
|
1341
1389
|
|
|
1342
1390
|
${({orientation:e})=>e==="horizontal"?"grid-template-columns: auto 2px auto;":"grid-template-rows: auto 2px auto;"}
|
|
1343
|
-
`,
|
|
1391
|
+
`,ws=g.div`
|
|
1344
1392
|
overflow: auto;
|
|
1345
|
-
`,
|
|
1393
|
+
`,au=g(ws)``,lu=g(ws)``,cu=g.div`
|
|
1346
1394
|
${({orientation:e})=>e==="horizontal"?"width: 1px; cursor: col-resize;":"height: 1px; cursor: row-resize;"}
|
|
1347
1395
|
|
|
1348
1396
|
background-color: ${c("color-grey20")};
|
|
@@ -1356,7 +1404,41 @@
|
|
|
1356
1404
|
${({orientation:e})=>e==="horizontal"?"top: 0; bottom: 0; left: -4px; right: -4px;":"left: 0; right: 0; top: -4px; bottom: -4px;"}
|
|
1357
1405
|
cursor: inherit;
|
|
1358
1406
|
}
|
|
1359
|
-
`;function
|
|
1407
|
+
`;function du(e,t){let o,n;return function(...r){const s=this;n?(clearTimeout(o),o=setTimeout(function(){Date.now()-n>=t&&(e.apply(s,r),n=Date.now())},t-(Date.now()-n))):(e.apply(s,r),n=Date.now())}}const uu=({initialStartSizePct:e=50,startClampSizePx:t=210,minStartSizePct:o=10,minEndSizePct:n=10,startContent:r,endContent:s,orientation:l="horizontal"})=>{const a=d.useRef(null),[u,h]=d.useState(null);d.useEffect(()=>{if(a.current&&u===null){const y=a.current.getBoundingClientRect(),w=l==="horizontal"?y.width:y.height,v=e/100*w,$=Math.max(t,v),C=$/w*100;h($);const S=C,k=100-C;l==="horizontal"?a.current.style.gridTemplateColumns=`${S}% 2px ${k}%`:a.current.style.gridTemplateRows=`${S}% 2px ${k}%`}},[e,t,u,l]);const p=d.useCallback(()=>{if(!a.current||u===null)return;const y=a.current.getBoundingClientRect(),w=l==="horizontal"?y.width:y.height;let v=Math.round(u/w*100),$=100-v;if($<n){$=n,v=100-$;const C=Math.round(v/100*w);h(C)}if(v<o){v=o,$=100-v;const C=Math.round(v/100*w);h(C)}l==="horizontal"?a.current.style.gridTemplateColumns=`${u}px 2px auto`:a.current.style.gridTemplateRows=`${u}px 2px auto`},[u,o,n,l]),f=d.useCallback(du(p,50),[p]);d.useEffect(()=>(window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)),[f]);const m=y=>{y.preventDefault(),document.addEventListener("mousemove",x),document.addEventListener("mouseup",b)},x=y=>{if(!a.current)return;const w=a.current.getBoundingClientRect(),v=l==="horizontal"?w.width:w.height,$=l==="horizontal"?y.clientX-w.left:y.clientY-w.top,C=Math.max(t,$),S=Math.round(C/v*100),k=100-S;S>=o&&k>=n&&(h($),l==="horizontal"?a.current.style.gridTemplateColumns=`${S}% 2px ${k}%`:a.current.style.gridTemplateRows=`${S}% 2px ${k}%`)},b=()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",b)};return i.jsxs(iu,{ref:a,orientation:l,children:[i.jsx(au,{children:r}),i.jsx(cu,{onMouseDown:m,orientation:l}),i.jsx(lu,{children:s})]})},[Ie]=z(["radio-button"]),Cs=d.forwardRef(({checked:e,onChange:t,...o},n)=>i.jsx(hu,{onClick:t,ref:n,readOnly:!0,type:"radio",checked:!!e,...o})),hu=g.input`
|
|
1408
|
+
appearance: none;
|
|
1409
|
+
-webkit-appearance: none;
|
|
1410
|
+
margin: 0;
|
|
1411
|
+
background-color: ${Ie("background-color")};
|
|
1412
|
+
appearance: none;
|
|
1413
|
+
width: ${Ie("size")};
|
|
1414
|
+
height: ${Ie("size")};
|
|
1415
|
+
border: ${Ie("border-width")} solid ${Ie("border-color")};
|
|
1416
|
+
border-radius: 50%;
|
|
1417
|
+
display: grid;
|
|
1418
|
+
place-content: center;
|
|
1419
|
+
::before {
|
|
1420
|
+
content: "";
|
|
1421
|
+
width: ${Ie("check-size")};
|
|
1422
|
+
height: ${Ie("check-size")};
|
|
1423
|
+
border-radius: 50%;
|
|
1424
|
+
transform: scale(0);
|
|
1425
|
+
transition: transform 0.125s ease-in-out;
|
|
1426
|
+
background-color: ${Ie("border-color-checked")};
|
|
1427
|
+
}
|
|
1428
|
+
:checked::before {
|
|
1429
|
+
transform: scale(1);
|
|
1430
|
+
}
|
|
1431
|
+
:checked:not(:disabled) {
|
|
1432
|
+
border-color: ${Ie("border-color-checked")};
|
|
1433
|
+
}
|
|
1434
|
+
:disabled {
|
|
1435
|
+
cursor: not-allowed;
|
|
1436
|
+
::before {
|
|
1437
|
+
background-color: ${Ie("border-color")};
|
|
1438
|
+
}
|
|
1439
|
+
background-color: ${Ie("background-color-disabled")};
|
|
1440
|
+
}
|
|
1441
|
+
`;function tt(e,t){if(!e)throw console.error(t),Error(t)}function pu(e,t=document){var n;if(t instanceof HTMLElement&&((n=t==null?void 0:t.dataset)==null?void 0:n.resizablePanelGroupId)===e)return t;const o=t.querySelector(`[data-resizable-panel-group][data-resizable-panel-group-id="${e}"]`);return o||null}const fu=e=>e.type.startsWith("mouse"),gu=e=>e.type.startsWith("pointer"),go=e=>{if(gu(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(fu(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}},$s=(e,t)=>{const o=e==="horizontal",{x:n,y:r}=go(t);return o?n:r},Ss=(e,t=document)=>{const o=t.querySelector(`[data-resizable-panel-group-handle-id="${e}"]`);return o||null},mu=(e,t,o,n,r)=>{const s=Ss(t,r);tt(s,`No resize handle element found for id "${t}"`);const l=s.getAttribute("data-resizable-panel-group-id");tt(l,"Resize handle element has no group id attribute");const{initialCursorPosition:a}=n,u=$s(o,e),h=pu(l,r);return tt(h,`No group element found for id "${l}"`),u-a},bu=(e,t,o,n,r)=>n==null?0:mu(e,t,o,n,r),ir=e=>{if(!e||e.dataset.resizablePanelGroupPanel===void 0)return!1;const t=window.getComputedStyle(e);return t.flex!=="1"&&t.flexGrow!=="1"},ar=(e,t,o=document)=>{const n=Array.from(o.querySelectorAll(`[data-resizable-panel-group-element][data-resizable-panel-group-id="${t}"]`)),r=n.findIndex(s=>!!(s.dataset&&s.dataset.resizablePanelGroupHandleId===e));if(r>=0){const s=n[r-1];if(ir(s))return{element:s,panelPosition:"left"};const l=n[r+1];if(ir(l))return{element:l,panelPosition:"right"}}return null},zo=(e,t=document)=>Array.from(t.querySelectorAll(`[data-resizable-panel-group-element][data-resizable-panel-group-id="${e}"]`)).filter(n=>n.dataset&&n.dataset.resizablePanelGroupPanel!==void 0),Lt=(e,t,o)=>{const n=e.dataset[t];let r;if(n)if(n.includes("px"))r=Number(n.replace("px",""));else if(n.includes("%")){if(o){const s=Number(n.replace("%",""));r=o*(s/100)}}else r=Number(n);return r},xu=(e,t,o,n,r,s)=>{t==="vertical"?(e.style.height=`${o}px`,r&&(e.style.minHeight=`${r}px`),s&&(e.style.maxHeight=`${s}px`)):(e.style.width=`${o}px`,r&&(e.style.minWidth=`${r}px`),s&&(e.style.maxWidth=`${s}px`)),e.setAttribute("data-collapsed",`${n}`)},Oo=(e,t,o,n)=>{const r=t==="horizontal"?e.getBoundingClientRect().width:e.getBoundingClientRect().height,s=e.parentElement,l=t==="horizontal"?s==null?void 0:s.getBoundingClientRect().width:s==null?void 0:s.getBoundingClientRect().height,a=Lt(e,"resizablePanelMinSize",l),u=Lt(e,"resizablePanelMaxSize",l),h=Lt(e,"resizablePanelCollapsedSize",l);let p=o??r;const f=a?a*.33:50;a&&r===a?n&&p<a&&h&&a-p>f?p=h:p<a&&(p=a):u&&r===u?p>u&&(p=u):h&&r===h&&(!n&&p>h&&a&&p-h>f?p=a:p=h);const m=p===h;p===r||!l||xu(e,t,p,m,m?h:a,u)},js=d.createContext(null),Is=({children:e,direction:t,onResizeEnd:o})=>{const n=d.useId(),r=d.useRef(null),[s,l]=d.useState(null),a=d.useRef({dragState:s,id:n,initialResizePanelSize:null,direction:t,lastResizedPanelId:null,panelPosition:"left"});d.useLayoutEffect(()=>{a.current.direction=t,a.current.dragState=s,a.current.id=n});const u=d.useCallback((x,b)=>{const{direction:y}=a.current;if(!r.current)return;const w=Ss(x,r.current);tt(w,`Drag handle element not found for id "${x}"`);const v=$s(y,b);l({dragHandleId:x,dragHandleRect:w.getBoundingClientRect(),initialCursorPosition:v});const $=ar(x,a.current.id,r.current);if($){const{element:C,panelPosition:S}=$,k=C.getBoundingClientRect();a.current.initialResizePanelSize=y==="vertical"?k.height:k.width,a.current.lastResizedPanelId=C.dataset.resizablePanelId??null,a.current.panelPosition=S}},[]),h=d.useCallback(()=>{const{direction:x,lastResizedPanelId:b}=a.current;if(o&&b&&r.current){const w=zo(a.current.id,r.current).find(v=>v.dataset.resizablePanelId===b);if(w){const v=w.getBoundingClientRect(),$=x==="vertical"?v.height:v.width;o(b,$)}}l(null),a.current.initialResizePanelSize=null,a.current.lastResizedPanelId=null,a.current.panelPosition="left"},[o]),p=d.useCallback(x=>{const{direction:b}=a.current,w=zo(a.current.id,r.current??void 0).find(v=>v.dataset.resizablePanelId===x);if(w){const v=w.parentElement,$=b==="horizontal"?v==null?void 0:v.getBoundingClientRect().width:v==null?void 0:v.getBoundingClientRect().height,C=w.dataset.collapsed==="true",S=Lt(w,"resizablePanelMinSize",$),k=Lt(w,"resizablePanelCollapsedSize",$);Oo(w,b,C?S:k,!C)}},[]);d.useEffect(()=>{const x=()=>{zo(a.current.id,r.current??void 0).forEach(y=>{Oo(y,a.current.direction)})};return window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}},[]);const f=d.useCallback(x=>b=>{b.preventDefault();const y=r.current;if(!y)return()=>null;const{direction:w,dragState:v,panelPosition:$}=a.current;let C=bu(b,x,w,v,y);if($==="right"&&(C=-C),C!==0&&r.current){const S=ar(x,a.current.id,r.current);if(S&&a.current.initialResizePanelSize!==null){const{element:k}=S,I=a.current.initialResizePanelSize;let j=I+C;j=j<0?0:j,Oo(k,w,j,I>j)}}},[]),m=d.useMemo(()=>({id:n,startDragging:u,stopDragging:h,direction:t,registerResizeHandle:f,togglePanelCollapse:p}),[n,u,h,t,f,p]);return i.jsx(js.Provider,{value:m,children:e(r,n)})},vn=()=>{const e=d.useContext(js);if(!e)throw new Error("Unable to use ResizablePanelGroupContext outside of a ResizablePanelGroupContextProvider");return e},_s=({children:e,direction:t,className:o,onResizeEnd:n})=>i.jsx(Is,{direction:t,onResizeEnd:n,children:(r,s)=>i.jsx(yu,{"data-resizable-panel-group":"","data-resizable-panel-group-id":s,className:St(o,{isVertical:t==="vertical"}),ref:r,children:e})}),yu=g.div`
|
|
1360
1442
|
width: 100%;
|
|
1361
1443
|
height: 100%;
|
|
1362
1444
|
overflow: auto;
|
|
@@ -1366,60 +1448,60 @@
|
|
|
1366
1448
|
&.isVertical {
|
|
1367
1449
|
flex-direction: column;
|
|
1368
1450
|
}
|
|
1369
|
-
`,
|
|
1451
|
+
`,kn=({children:e,maxSize:t,minSize:o,defaultSize:n,collapsedSize:r,className:s,panelId:l})=>{const{id:a,direction:u}=vn(),h=typeof t=="string"?t:t?`${t}px`:void 0,p=typeof o=="string"?o:o?`${o}px`:void 0,f=typeof n=="string"?n:n?`${n}px`:void 0;return i.jsx(vu,{className:s,style:u==="horizontal"?{maxWidth:h,minWidth:p,width:f??"auto",height:"100%"}:{maxHeight:h,minHeight:p,height:f??"auto",width:"100%"},"data-resizable-panel-group-element":"","data-resizable-panel-group-panel":"","data-resizable-panel-max-size":t,"data-resizable-panel-min-size":o,"data-resizable-panel-collapsed-size":r,"data-resizable-panel-id":l,"data-resizable-panel-group-id":a,"data-collapsed":!1,children:e})},vu=g.div`
|
|
1370
1452
|
flex-shrink: 0;
|
|
1371
1453
|
overflow: clip;
|
|
1372
|
-
`,
|
|
1454
|
+
`,Ds=g(kn)`
|
|
1373
1455
|
flex: 1;
|
|
1374
|
-
`;let
|
|
1456
|
+
`;let en=null,pt=null;function ku(e){switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize";default:return"auto"}}function wu(){pt!==null&&(document.head.removeChild(pt),en=null,pt=null)}function Ro(e){const t=ku(e);en!==t&&(en=t,pt===null&&(pt=document.createElement("style"),document.head.appendChild(pt)),pt.innerHTML=`*{cursor: ${t}!important;}`)}const Cu=(e,t,o)=>e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y;function $u(e,t){if(e===t)throw new Error("Cannot compare node with itself");const o={a:dr(e),b:dr(t)};let n;for(;o.a.at(-1)===o.b.at(-1);)e=o.a.pop(),t=o.b.pop(),n=e;tt(n,"Stacking order can only be calculated for elements with a common ancestor");const r={a:cr(lr(o.a)),b:cr(lr(o.b))};if(r.a===r.b){const s=n.childNodes,l={a:o.a.at(-1),b:o.b.at(-1)};let a=s.length;for(;a--;){const u=s[a];if(u===l.a)return 1;if(u===l.b)return-1}}return Math.sign(r.a-r.b)}const Su=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ju(e){const t=getComputedStyle(Ts(e)??e).display;return t==="flex"||t==="inline-flex"}function Iu(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||ju(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Su.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function lr(e){let t=e.length;for(;t--;){const o=e[t];if(tt(o,"Missing node"),Iu(o))return o}return null}function cr(e){return e&&Number(getComputedStyle(e).zIndex)||0}function dr(e){const t=[];for(;e;)t.push(e),e=Ts(e);return t}function Ts(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}let vt=!1;const _u=()=>{if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"},Re=[],Ht=new Set,Du=_u()==="coarse",lt=new Map,Tu=(e,t,o,n)=>{const{ownerDocument:r}=e,s={direction:t,element:e,hitAreaMargins:o,setResizeHandlerState:n},l=lt.get(r)??0;return lt.set(r,l+1),Ht.add(s),ao(),function(){Ht.delete(s);const u=lt.get(r)??1;if(lt.set(r,u-1),ao(),u===1&<.delete(r),Re.includes(s)){const h=Re.indexOf(s);h>=0&&Re.splice(h,1),Cn(),n("up",!0,null)}}},wn=({target:e,x:t,y:o})=>{Re.splice(0);let n=null;e instanceof HTMLElement&&(n=e),Ht.forEach(r=>{const{element:s,hitAreaMargins:l}=r,a=s.getBoundingClientRect(),{bottom:u,left:h,right:p,top:f}=a,m=Du?l.coarse:l.fine;if(t>=h-m&&t<=p+m&&o>=f-m&&o<=u+m){if(n!==null&&document.contains(n)&&s!==n&&!s.contains(n)&&!n.contains(s)&&$u(n,s)>0){let b=n,y=!1;for(;b&&!b.contains(s);){if(Cu(b.getBoundingClientRect(),a)){y=!0;break}b=b.parentElement}if(y)return}Re.push(r)}})},ur=e=>{const{target:t}=e,{x:o,y:n}=go(e);vt=!0,wn({target:t,x:o,y:n}),ao(),Re.length>0&&(lo("down",e),e.preventDefault(),e.stopPropagation())},Mt=e=>{const{x:t,y:o}=go(e);if(vt&&e.buttons===0&&(vt=!1,lo("up",e)),!vt){const{target:n}=e;wn({target:n,x:t,y:o})}lo("move",e),Cn(),Re.length>0&&e.preventDefault()},mt=e=>{const{target:t}=e,{x:o,y:n}=go(e);vt=!1,Re.length>0&&e.preventDefault(),lo("up",e),wn({target:t,x:o,y:n}),Cn(),ao()},ao=()=>{lt.forEach((e,t)=>{const{body:o}=t;o.removeEventListener("contextmenu",mt),o.removeEventListener("pointerdown",ur),o.removeEventListener("pointerleave",Mt),o.removeEventListener("pointermove",Mt)}),window.removeEventListener("pointerup",mt),window.removeEventListener("pointercancel",mt),Ht.size>0&&(vt?(Re.length>0&<.forEach((e,t)=>{const{body:o}=t;e>0&&(o.addEventListener("contextmenu",mt),o.addEventListener("pointerleave",Mt),o.addEventListener("pointermove",Mt))}),window.addEventListener("pointerup",mt),window.addEventListener("pointercancel",mt)):lt.forEach((e,t)=>{const{body:o}=t;e>0&&(o.addEventListener("pointerdown",ur,{capture:!0}),o.addEventListener("pointermove",Mt))}))},lo=(e,t)=>{Ht.forEach(o=>{const{setResizeHandlerState:n}=o,r=Re.includes(o);n(e,r,t)})},Cn=()=>{let e=!1,t=!1;Re.forEach(o=>{const{direction:n}=o;n==="horizontal"?e=!0:t=!0}),e&&t?Ro("intersection"):e?Ro("horizontal"):t?Ro("vertical"):wu()},[No]=z(["resizable-panels"]),Es=d.memo(({className:e,disabled:t})=>{const{id:o,startDragging:n,stopDragging:r,direction:s,registerResizeHandle:l}=vn(),a=d.useId(),[u,h]=d.useState("inactive"),[p,f]=d.useState(null),m=d.useRef(null),x=d.useRef({state:u});return d.useLayoutEffect(()=>{x.current.state=u}),d.useEffect(()=>{if(t)f(null);else{const b=l(a);f(()=>b)}},[t,a,l]),d.useEffect(()=>{if(t||p==null)return;const b=m.current;return tt(b,"Element ref not attached"),Tu(b,s,{coarse:15,fine:5},(w,v,$)=>{if(v)switch(w){case"down":{h("drag"),tt($,'Expected event to be defined for "down" action'),n(a,$);break}case"move":{const{state:C}=x.current;C!=="drag"&&h("hover"),tt($,'Expected event to be defined for "move" action'),p($);break}case"up":{h("hover"),r();break}}else h("inactive")})},[s,t,a,p,n,r]),i.jsx(Eu,{"data-resizable-panel-group-element":"","data-resizable-panel-group-id":o,"data-resizable-panel-group-handle-id":a,className:St(e,{isVertical:s==="vertical",isHovered:u==="hover",isDragging:u==="drag"}),ref:m})}),Eu=g.div`
|
|
1375
1457
|
height: 100%;
|
|
1376
1458
|
width: 1px;
|
|
1377
1459
|
flex-shrink: 0;
|
|
1378
|
-
background-color: ${
|
|
1460
|
+
background-color: ${No("border-color")};
|
|
1379
1461
|
transition: background 0.125s ease-in-out;
|
|
1380
1462
|
&.isHovered {
|
|
1381
|
-
background-color: ${
|
|
1463
|
+
background-color: ${No("border-color-hover")};
|
|
1382
1464
|
}
|
|
1383
1465
|
&.isDragging {
|
|
1384
|
-
background-color: ${
|
|
1466
|
+
background-color: ${No("border-color-drag")};
|
|
1385
1467
|
}
|
|
1386
1468
|
&.isVertical {
|
|
1387
1469
|
width: 100%;
|
|
1388
1470
|
height: 1px;
|
|
1389
1471
|
}
|
|
1390
|
-
`,
|
|
1472
|
+
`,Ms=({children:e,open:t,disableScrollLock:o,className:n,status:r})=>t?i.jsx(O.FloatingPortal,{children:i.jsx(Mu,{className:n,lockScroll:!o,"data-status":r,children:e})}):null,Mu=g(O.FloatingOverlay)`
|
|
1391
1473
|
background: rgba(0, 0, 0, 0.8);
|
|
1392
1474
|
display: grid;
|
|
1393
1475
|
place-items: center;
|
|
1394
1476
|
z-index: 1;
|
|
1395
|
-
`,
|
|
1477
|
+
`,zu=[O.flip()],zs=[O.flip(),O.size({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}})],[tn]=z(["select"]),$n=d.createContext(null),Sn=()=>{const e=d.useContext($n);if(e===null)throw new Error("Select context used outside of the SelectContextProvider");return e},Ou=()=>Promise.resolve(),_t=({children:e,onSelect:t,Reference:o,disabled:n,selectedIndex:r,onSelectedIndexChange:s,className:l,matchReferenceWidth:a,isFocusTrapDisabled:u,menuPlacement:h,onOpenChange:p,onBeforeOpen:f=Ou,showOpenState:m=!1})=>{const[x,b]=d.useState(!1),[y,w]=d.useState(null),[v,$]=d.useState(null),C=r??v,S=s??$,k=d.useCallback(Q=>{Q?f().then(()=>{b(Q),p&&p(Q)}):(b(Q),p&&p(Q))},[f,p]),{refs:I,floatingStyles:j,context:_}=O.useFloating({placement:h||"bottom-end",open:x,onOpenChange:k,whileElementsMounted:O.autoUpdate,middleware:a?zs:zu}),B=d.useRef([]),U=d.useRef([]),P=d.useCallback(Q=>{var G;S(Q),Q!==null&&t(((G=B.current[Q])==null?void 0:G.dataset.key)||""),b(!1),p&&p(!1)},[p,t,S]),L=O.useListNavigation(_,{listRef:B,activeIndex:y,selectedIndex:C,focusItemOnHover:!u,focusItemOnOpen:!u,onNavigate:w}),Z=O.useClick(_,{enabled:!n}),se=O.useDismiss(_),J=O.useRole(_,{role:"listbox"}),{getReferenceProps:X,getFloatingProps:$e,getItemProps:ae}=O.useInteractions([L,Z,se,J]),ue=d.useMemo(()=>({activeIndex:y,selectedIndex:C,open:x,getItemProps:ae,handleSelect:P,setIsOpen:b}),[y,x,C,ae,P]);return i.jsxs($n.Provider,{value:ue,children:[i.jsx(Ru,{ref:I.setReference,tabIndex:0,...X({onClick(Q){Q.stopPropagation()}}),children:m?i.jsxs(Fu,{children:[o??i.jsx(ie,{className:"select-reference",size:"sm",iconId:"Ellipsis",color:"blue"}),i.jsx(F,{size:"xsm",iconId:x?"CaretUp":"CaretDown"})]}):o??i.jsx(ie,{className:"select-reference",size:"sm",iconId:"Ellipsis",color:"blue"})}),x&&i.jsx(O.FloatingPortal,{children:i.jsx(O.FloatingFocusManager,{disabled:u,context:_,modal:!1,children:i.jsx(Nu,{ref:I.setFloating,style:j,className:l,...$e(),children:i.jsx(O.FloatingList,{elementsRef:B,labelsRef:U,children:e})})})})]})},Ru=g.div`
|
|
1396
1478
|
align-items: center;
|
|
1397
1479
|
display: flex;
|
|
1398
|
-
font-size: ${
|
|
1480
|
+
font-size: ${tn("font-size")};
|
|
1399
1481
|
cursor: default;
|
|
1400
1482
|
user-select: none;
|
|
1401
|
-
`,
|
|
1483
|
+
`,Nu=g.div`
|
|
1402
1484
|
display: flex;
|
|
1403
1485
|
flex-direction: column;
|
|
1404
|
-
border: ${
|
|
1486
|
+
border: ${tn("border-size")} solid ${tn("border-color")};
|
|
1405
1487
|
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
|
|
1406
1488
|
background-color: ${c("color-white")};
|
|
1407
1489
|
outline: 0;
|
|
1408
1490
|
z-index: 2;
|
|
1409
1491
|
overflow: auto;
|
|
1410
|
-
`,
|
|
1492
|
+
`,Fu=g.div`
|
|
1411
1493
|
display: flex;
|
|
1412
1494
|
align-items: center;
|
|
1413
1495
|
justify-content: flex-start;
|
|
1414
1496
|
gap: 2px;
|
|
1415
|
-
`,[
|
|
1416
|
-
color: ${
|
|
1497
|
+
`,[Fe,hr]=z(["option","text"]),ct=d.memo(({label:e,optionKey:t,disabled:o,className:n,prefixIconId:r,prefixIconColor:s,suffixIconId:l,textColor:a,suffixIconColor:u,disableSelectionStyle:h,disableEnterSelection:p})=>{const{activeIndex:f,selectedIndex:m,getItemProps:x,handleSelect:b}=Sn(),{ref:y,index:w}=O.useListItem({label:t}),v=f!==null&&f!==-1&&f===w,$=!h&&m!==null&&m!==-1&&m===w,C=d.useCallback(S=>{o||(S.stopPropagation(),b(w))},[o,b,w]);return i.jsx(M.ClassNames,{children:({cx:S})=>i.jsxs(Au,{className:S({isActive:v,isSelected:$,disabled:o},n),ref:y,"data-key":t,role:"option","data-color":a,"aria-selected":v&&$,tabIndex:v?0:-1,...x({onClick:k=>C(k),onKeyDown:!p&&!o?k=>{k.code==="Enter"&&b(w)}:void 0}),children:[!!r&&i.jsx(F,{iconId:r,size:"sm",color:o?"grey":s??"black"}),e,!!l&&i.jsx(Lu,{iconId:l,size:"sm",color:o?"grey":u??"black"})]})})}),Au=g.div`
|
|
1498
|
+
color: ${Fe("color")};
|
|
1417
1499
|
cursor: pointer;
|
|
1418
1500
|
font-size: inherit;
|
|
1419
|
-
background-color: ${
|
|
1420
|
-
font-family: ${
|
|
1421
|
-
font-size: ${
|
|
1422
|
-
padding: ${
|
|
1501
|
+
background-color: ${Fe("bg-color")};
|
|
1502
|
+
font-family: ${Fe("font-family")};
|
|
1503
|
+
font-size: ${Fe("font-size")};
|
|
1504
|
+
padding: ${Fe("padding")};
|
|
1423
1505
|
min-width: 96px;
|
|
1424
1506
|
line-height: 18px;
|
|
1425
1507
|
display: flex;
|
|
@@ -1429,47 +1511,47 @@
|
|
|
1429
1511
|
overflow: hidden;
|
|
1430
1512
|
outline: 0;
|
|
1431
1513
|
flex-shrink: 0;
|
|
1432
|
-
column-gap: ${
|
|
1433
|
-
${
|
|
1434
|
-
color: ${
|
|
1514
|
+
column-gap: ${Fe("column-gap")};
|
|
1515
|
+
${Kr.map(e=>`&[data-color="${e}"] {
|
|
1516
|
+
color: ${hr(`color-${e}`)};
|
|
1435
1517
|
}`).join(`
|
|
1436
1518
|
`)}
|
|
1437
|
-
${`${
|
|
1519
|
+
${`${hr("body-size",!0)}: ${Fe("font-size")}`};
|
|
1438
1520
|
&.isActive {
|
|
1439
|
-
background: ${
|
|
1521
|
+
background: ${Fe("bg-color-active")};
|
|
1440
1522
|
}
|
|
1441
1523
|
&.isSelected {
|
|
1442
|
-
font-weight: ${
|
|
1524
|
+
font-weight: ${Fe("font-weight-selected")};
|
|
1443
1525
|
}
|
|
1444
1526
|
&.disabled {
|
|
1445
|
-
color: ${
|
|
1527
|
+
color: ${Fe("color-disabled")};
|
|
1446
1528
|
cursor: not-allowed;
|
|
1447
1529
|
}
|
|
1448
|
-
`,
|
|
1530
|
+
`,Lu=g(F)`
|
|
1449
1531
|
transform: translate(-2px, -1px);
|
|
1450
|
-
`,
|
|
1532
|
+
`,Bu=({actionItems:e,disabled:t,onSelect:o})=>{const n=d.useMemo(()=>e.map(r=>i.jsx(ct,{disabled:t||r.disabled,label:i.jsx(Wu,{label:r.label,iconId:r.iconId,iconSize:r.iconSize,disabled:r.disabled,level:r.level},r.key),optionKey:r.key},r.key)),[e,t]);return i.jsx(_t,{disabled:t,onSelect:o,children:n})},oo=e=>{switch(e){case"normal":return;case"info":return"blue";case"error":return"red";case"warn":return"yellow";default:return}},Wu=d.memo(({label:e,iconId:t,level:o,disabled:n,iconSize:r})=>i.jsxs(Pu,{children:[i.jsx(F,{iconId:t,size:r||"sm",color:n?"grey":oo(o)?oo(o):"black"}),i.jsx(E,{variant:"body",color:n?"grey":oo(o)?oo(o):"dark",children:e})]})),Pu=g.div`
|
|
1451
1533
|
display: flex;
|
|
1452
1534
|
gap: 8px;
|
|
1453
1535
|
align-items: center;
|
|
1454
|
-
`,[
|
|
1455
|
-
padding: ${
|
|
1536
|
+
`,[Hu]=z(["shell-icon-button"]),Vu=g(ie)`
|
|
1537
|
+
padding: ${Hu("padding")};
|
|
1456
1538
|
|
|
1457
1539
|
--studio-c-icon-button-badge-top: 6px;
|
|
1458
1540
|
--studio-c-icon-button-badge-right: 6px;
|
|
1459
|
-
`,
|
|
1541
|
+
`,Uu=e=>i.jsx(Vu,{badgeBorderColor:"black",...e}),Os=d.createContext(null),mo=()=>{const e=d.useContext(Os);if(e===null)throw new Error("Unable to use TabContext outside of a TabProvider");return e},Gu=d.memo(({children:e,activeTab:t,onTabChange:o,defaultActiveTab:n})=>{const[r,s]=d.useState(n),l=o??s,a=t??r,u=d.useMemo(()=>({onTabChange:l,activeTab:a}),[a,l]);return i.jsx(Os.Provider,{value:u,children:e})}),[Fo]=z(["tab"]),Ku=d.memo(({value:e,text:t,disabled:o,iconColor:n,iconId:r})=>{const{activeTab:s,onTabChange:l}=mo(),a=e===s,u=d.useCallback(()=>{a||l(e)},[l,e,a]);return i.jsxs(Yu,{"data-value":e,onClick:u,disabled:o,children:[!!r&&i.jsx(F,{iconId:r,color:n??"black",size:"sm"}),i.jsx(E,{color:o?"grey":"dark",variant:"body",bold:a,children:t})]})}),Yu=g.button`
|
|
1460
1542
|
cursor: pointer;
|
|
1461
1543
|
outline: none;
|
|
1462
1544
|
border: none;
|
|
1463
1545
|
display: flex;
|
|
1464
1546
|
align-items: center;
|
|
1465
1547
|
justify-content: flex-start;
|
|
1466
|
-
column-gap: ${
|
|
1548
|
+
column-gap: ${Fo("column-gap")};
|
|
1467
1549
|
background-color: transparent;
|
|
1468
|
-
padding: ${
|
|
1550
|
+
padding: ${Fo("trigger-padding-y")} ${Fo("trigger-padding-x")};
|
|
1469
1551
|
&:disabled {
|
|
1470
1552
|
cursor: not-allowed;
|
|
1471
1553
|
}
|
|
1472
|
-
`,[
|
|
1554
|
+
`,[Bt]=z(["tab"]),qu=({children:e,className:t})=>{const{activeTab:o}=mo(),n=d.useRef(null),r=d.useRef(null);return d.useEffect(()=>{if(r.current&&n.current){const s=r.current.querySelector(`[data-value=${o}]`);if(s){const l=s.getBoundingClientRect(),a=s.offsetLeft;n.current.style.width=`${l.width}px`,n.current.style.left=`${a}px`}}},[o,e]),i.jsxs(Zu,{ref:r,className:t,children:[i.jsx(Xu,{ref:n}),e]})},Zu=g.div`
|
|
1473
1555
|
width: 100%;
|
|
1474
1556
|
height: fit-content;
|
|
1475
1557
|
display: flex;
|
|
@@ -1477,39 +1559,39 @@
|
|
|
1477
1559
|
justify-content: space-between;
|
|
1478
1560
|
align-items: flex-start;
|
|
1479
1561
|
position: relative;
|
|
1480
|
-
border-bottom: ${
|
|
1481
|
-
${
|
|
1562
|
+
border-bottom: ${Bt("trigger-list-underline-height")} solid
|
|
1563
|
+
${Bt("trigger-list-underline-color")};
|
|
1482
1564
|
background-color: transparent;
|
|
1483
|
-
`,
|
|
1565
|
+
`,Xu=g.div`
|
|
1484
1566
|
position: absolute;
|
|
1485
1567
|
bottom: 0px;
|
|
1486
|
-
transform: translateY(${
|
|
1487
|
-
height: ${
|
|
1488
|
-
background-color: ${
|
|
1568
|
+
transform: translateY(${Bt("trigger-list-underline-height")});
|
|
1569
|
+
height: ${Bt("indicator-height")};
|
|
1570
|
+
background-color: ${Bt("indicator-color")};
|
|
1489
1571
|
transition: all 0.25s ease-in-out;
|
|
1490
|
-
`,
|
|
1572
|
+
`,Ju=({children:e,className:t,style:o,value:n})=>{const{activeTab:r}=mo(),s=n===r;return i.jsx(Qu,{className:t,"data-active":s?"true":"false",style:o,children:e})},Qu=g.div`
|
|
1491
1573
|
display: none;
|
|
1492
1574
|
&[data-active="true"] {
|
|
1493
1575
|
display: block;
|
|
1494
1576
|
}
|
|
1495
|
-
`,[
|
|
1496
|
-
background-color: ${e=>
|
|
1497
|
-
border-radius: ${
|
|
1498
|
-
border: 1px solid ${
|
|
1577
|
+
`,[ye]=z(["tag"]),eh={purple:ye("color-light"),orange:ye("color-light"),light:ye("color-dark"),blue:ye("color-dark"),green:ye("color-light"),red:ye("color-light"),disabled:ye("color-disabled")},th={purple:"light",orange:"light",light:"dark",blue:"dark",green:"light",red:"light",disabled:"disabled"},oh=g.div`
|
|
1578
|
+
background-color: ${e=>ye(`bg-color-${e.color}`)};
|
|
1579
|
+
border-radius: ${ye("border-radius")};
|
|
1580
|
+
border: 1px solid ${ye("border-color")};
|
|
1499
1581
|
display: flex;
|
|
1500
|
-
color: ${e=>
|
|
1501
|
-
height: ${
|
|
1582
|
+
color: ${e=>eh[e.color]};
|
|
1583
|
+
height: ${ye("height")};
|
|
1502
1584
|
max-width: 160px;
|
|
1503
1585
|
align-items: center;
|
|
1504
|
-
padding: ${
|
|
1586
|
+
padding: ${ye("padding")};
|
|
1505
1587
|
align-items: center;
|
|
1506
1588
|
justify-content: center;
|
|
1507
1589
|
gap: 4px;
|
|
1508
|
-
`,
|
|
1590
|
+
`,co=e=>{const t=typeof e.children=="string"?i.jsx(E,{color:th[e.color],variant:"body",children:e.children}):e.children;return i.jsx(oh,{...e,children:t})},nh=({tagName:e,onRemove:t,color:o="light"})=>i.jsxs(co,{color:o,children:[i.jsx(E,{variant:"body",children:e}),i.jsx(F,{size:"xxsm",iconId:"Close",onClick:()=>t(e)})]},`key-tag-${e}`),rh=({search:e,style:t,children:o,highlightColor:n,highlightTextColor:r})=>{const s=n||"yellow",l=d.useMemo(()=>Array.isArray(e)?e:[e].filter(Boolean),[e]);if(!l||l.length===0)return i.jsx(i.Fragment,{children:o});const a=h=>{const p=new RegExp(`(${l.join("|")})`,"gi");return h.split(p).map((m,x)=>l.some(b=>b.toLowerCase()===m.toLowerCase())?i.jsx("span",{style:t||{backgroundColor:s,color:r??void 0},children:m},x):m)},u=h=>typeof h=="string"?a(h):d.isValidElement(h)?d.cloneElement(h,{children:d.Children.map(h.props.children,u)}):h;return i.jsx(i.Fragment,{children:d.Children.map(o,u)})},[be]=z(["badge"]),sh=({color:e,children:t,position:o,radius:n,hide:r})=>i.jsxs(ih,{children:[!r&&i.jsx(ah,{"data-color":e,"data-position":o??"top-right","data-radius":n??4}),t]}),ih=g.div`
|
|
1509
1591
|
width: fit-content;
|
|
1510
1592
|
height: fit-content;
|
|
1511
1593
|
position: relative;
|
|
1512
|
-
`,
|
|
1594
|
+
`,ah=g.div`
|
|
1513
1595
|
position: absolute;
|
|
1514
1596
|
z-index: 2;
|
|
1515
1597
|
border-radius: 50%;
|
|
@@ -1521,28 +1603,28 @@
|
|
|
1521
1603
|
0 8px 8px hsl(0deg 0% 0% / 0.075), 0 16px 16px hsl(0deg 0% 0% / 0.075);
|
|
1522
1604
|
// Color
|
|
1523
1605
|
&[data-color="blue"] {
|
|
1524
|
-
background-color: ${
|
|
1525
|
-
border-color: ${
|
|
1606
|
+
background-color: ${be("color-blue")};
|
|
1607
|
+
border-color: ${be("color-blue-border")};
|
|
1526
1608
|
}
|
|
1527
1609
|
&[data-color="red"] {
|
|
1528
|
-
background-color: ${
|
|
1529
|
-
border-color: ${
|
|
1610
|
+
background-color: ${be("color-red")};
|
|
1611
|
+
border-color: ${be("color-red-border")};
|
|
1530
1612
|
}
|
|
1531
1613
|
&[data-color="white"] {
|
|
1532
|
-
background-color: ${
|
|
1533
|
-
border-color: ${
|
|
1614
|
+
background-color: ${be("color-white")};
|
|
1615
|
+
border-color: ${be("color-white-border")};
|
|
1534
1616
|
}
|
|
1535
1617
|
&[data-color="black"] {
|
|
1536
|
-
background-color: ${
|
|
1537
|
-
border-color: ${
|
|
1618
|
+
background-color: ${be("color-black")};
|
|
1619
|
+
border-color: ${be("color-black-border")};
|
|
1538
1620
|
}
|
|
1539
1621
|
&[data-color="orange"] {
|
|
1540
|
-
background-color: ${
|
|
1541
|
-
border-color: ${
|
|
1622
|
+
background-color: ${be("color-orange")};
|
|
1623
|
+
border-color: ${be("color-orange-border")};
|
|
1542
1624
|
}
|
|
1543
1625
|
&[data-color="green"] {
|
|
1544
|
-
background-color: ${
|
|
1545
|
-
border-color: ${
|
|
1626
|
+
background-color: ${be("color-green")};
|
|
1627
|
+
border-color: ${be("color-green-border")};
|
|
1546
1628
|
}
|
|
1547
1629
|
// Position
|
|
1548
1630
|
&[data-position="top-right"] {
|
|
@@ -1585,100 +1667,100 @@
|
|
|
1585
1667
|
height: ${c("spacing-16")};
|
|
1586
1668
|
--xform-factor: ${c("spacing-8")};
|
|
1587
1669
|
}
|
|
1588
|
-
`,[
|
|
1670
|
+
`,[pe]=z(["textarea"]),jn=d.forwardRef(({autoCapitalize:e="off",autoComplete:t="off",autoCorrect:o="off",className:n,...r},s)=>i.jsx(lh,{autoCapitalize:e,autoComplete:t,autoCorrect:o,className:n,ref:s,...r})),lh=g.textarea`
|
|
1589
1671
|
display: flex;
|
|
1590
|
-
min-height: ${
|
|
1591
|
-
padding: ${
|
|
1592
|
-
font-size: ${
|
|
1593
|
-
font-family: ${
|
|
1594
|
-
font-weight: ${
|
|
1595
|
-
color: ${
|
|
1672
|
+
min-height: ${pe("min-height")};
|
|
1673
|
+
padding: ${pe("padding")};
|
|
1674
|
+
font-size: ${pe("font-size")};
|
|
1675
|
+
font-family: ${pe("font-family")};
|
|
1676
|
+
font-weight: ${pe("font-weight")};
|
|
1677
|
+
color: ${pe("color")};
|
|
1596
1678
|
width: 100%;
|
|
1597
1679
|
outline: none;
|
|
1598
1680
|
box-shadow: none;
|
|
1599
|
-
border: ${
|
|
1600
|
-
border-radius: ${
|
|
1681
|
+
border: ${pe("border-width")} solid ${pe("border-color")};
|
|
1682
|
+
border-radius: ${pe("border-radius")};
|
|
1601
1683
|
:active:not(:disabled):not(:read-only),
|
|
1602
1684
|
:focus:not(:disabled):not(:read-only) {
|
|
1603
|
-
border-color: ${
|
|
1685
|
+
border-color: ${pe("border-color-active")};
|
|
1604
1686
|
}
|
|
1605
1687
|
&[aria-invalid="true"]:not(:disabled):not(:read-only) {
|
|
1606
|
-
border-color: ${
|
|
1688
|
+
border-color: ${pe("border-color-invalid")};
|
|
1607
1689
|
}
|
|
1608
1690
|
:disabled,
|
|
1609
1691
|
:read-only {
|
|
1610
1692
|
cursor: not-allowed;
|
|
1611
|
-
color: ${
|
|
1612
|
-
background-color: ${
|
|
1693
|
+
color: ${pe("color-disabled")};
|
|
1694
|
+
background-color: ${pe("background-color-disabled")};
|
|
1613
1695
|
}
|
|
1614
|
-
`;
|
|
1696
|
+
`;jn.displayName="Textarea";const[ch,_e,xe]=z(["toggle-container","toggle-track","toggle-thumb"]),pr=g(F)`
|
|
1615
1697
|
opacity: 0;
|
|
1616
1698
|
position: absolute;
|
|
1617
1699
|
transition-duration: 150ms;
|
|
1618
1700
|
transition-property: opacity;
|
|
1619
1701
|
transition-timing-function: ease-in-out;
|
|
1620
|
-
`,
|
|
1702
|
+
`,dh=g.div`
|
|
1621
1703
|
align-items: center;
|
|
1622
1704
|
display: flex;
|
|
1623
|
-
gap: ${
|
|
1705
|
+
gap: ${ch("gap")};
|
|
1624
1706
|
justify-content: center;
|
|
1625
1707
|
position: relative;
|
|
1626
|
-
`,
|
|
1708
|
+
`,Rs=g.div`
|
|
1627
1709
|
align-items: center;
|
|
1628
|
-
border-radius: ${
|
|
1710
|
+
border-radius: ${_e("border-radius")};
|
|
1629
1711
|
cursor: pointer;
|
|
1630
1712
|
display: flex;
|
|
1631
|
-
height: calc(${
|
|
1632
|
-
padding: ${
|
|
1713
|
+
height: calc(${_e("padding-vertical")} * 2 + ${xe("height")} + 2px);
|
|
1714
|
+
padding: ${_e("padding-vertical")} ${_e("padding-horizontal")};
|
|
1633
1715
|
position: relative;
|
|
1634
|
-
transition-duration: ${
|
|
1716
|
+
transition-duration: ${_e("transition-duration")};
|
|
1635
1717
|
transition-property: background-color;
|
|
1636
1718
|
transition-timing-function: ease-in-out;
|
|
1637
1719
|
|
|
1638
1720
|
// background-color...
|
|
1639
|
-
background-color: ${
|
|
1721
|
+
background-color: ${_e("background-color-unchecked-enabled")};
|
|
1640
1722
|
&.isDisabled,
|
|
1641
1723
|
&.isReadOnly {
|
|
1642
|
-
background-color: ${
|
|
1724
|
+
background-color: ${_e("background-color-unchecked-disabled")};
|
|
1643
1725
|
cursor: not-allowed;
|
|
1644
1726
|
}
|
|
1645
1727
|
&.isChecked {
|
|
1646
|
-
background-color: ${
|
|
1728
|
+
background-color: ${_e("background-color-checked-enabled")};
|
|
1647
1729
|
&.isDisabled,
|
|
1648
1730
|
&.isReadOnly {
|
|
1649
|
-
background-color: ${
|
|
1731
|
+
background-color: ${_e("background-color-checked-disabled")};
|
|
1650
1732
|
cursor: not-allowed;
|
|
1651
1733
|
}
|
|
1652
1734
|
}
|
|
1653
1735
|
|
|
1654
1736
|
// width...
|
|
1655
|
-
width: calc(${
|
|
1737
|
+
width: calc(${_e("padding-horizontal")} * 2 + ${xe("width")} * 2);
|
|
1656
1738
|
&.showIcons {
|
|
1657
1739
|
width: ${`calc(
|
|
1658
|
-
${
|
|
1740
|
+
${_e("padding-horizontal")} * 2 + ${xe("width")} * 2 + 4px
|
|
1659
1741
|
)`};
|
|
1660
1742
|
}
|
|
1661
|
-
`,
|
|
1662
|
-
border-radius: ${
|
|
1663
|
-
box-shadow: ${
|
|
1664
|
-
height: ${
|
|
1665
|
-
transition-duration: ${
|
|
1743
|
+
`,Ns=g.div`
|
|
1744
|
+
border-radius: ${xe("border-radius")};
|
|
1745
|
+
box-shadow: ${xe("box-shadow")};
|
|
1746
|
+
height: ${xe("height")};
|
|
1747
|
+
transition-duration: ${xe("transition-duration")};
|
|
1666
1748
|
transition-property: transform;
|
|
1667
1749
|
transition-timing-function: ease-in-out;
|
|
1668
|
-
width: ${
|
|
1750
|
+
width: ${xe("width")};
|
|
1669
1751
|
|
|
1670
1752
|
// background-color...
|
|
1671
|
-
background-color: ${
|
|
1753
|
+
background-color: ${xe("background-color-unchecked-enabled")};
|
|
1672
1754
|
&.isDisabled,
|
|
1673
1755
|
&.isReadOnly {
|
|
1674
|
-
background-color: ${
|
|
1756
|
+
background-color: ${xe("background-color-unchecked-disabled")};
|
|
1675
1757
|
cursor: not-allowed;
|
|
1676
1758
|
}
|
|
1677
1759
|
&.isChecked {
|
|
1678
|
-
background-color: ${
|
|
1760
|
+
background-color: ${xe("background-color-checked-enabled")};
|
|
1679
1761
|
&.isDisabled,
|
|
1680
1762
|
&.isReadOnly {
|
|
1681
|
-
background-color: ${
|
|
1763
|
+
background-color: ${xe("background-color-checked-disabled")};
|
|
1682
1764
|
cursor: not-allowed;
|
|
1683
1765
|
}
|
|
1684
1766
|
}
|
|
@@ -1691,12 +1773,12 @@
|
|
|
1691
1773
|
transform: translate(calc(100% + 4px), 0px);
|
|
1692
1774
|
}
|
|
1693
1775
|
}
|
|
1694
|
-
`,
|
|
1776
|
+
`,bo=({checked:e,disabled:t,label:o,labelVariant:n="small",onChange:r,showIcons:s,readOnly:l,id:a,...u})=>{const[h,p]=d.useState(e??!1);d.useEffect(()=>{p(e??!1)},[e]);const f=d.useCallback(()=>{t||l||(p(!h),r==null||r(!h))},[h,t,l,r]);return i.jsx(M.ClassNames,{children:({cx:m})=>i.jsxs(dh,{children:[o&&i.jsx(E,{color:t?"disabled":"grey",variant:n,children:o}),i.jsxs(Rs,{id:a,className:m({isReadOnly:l},h&&"isChecked",t&&"isDisabled",s&&"showIcons"),...u,onClick:f,children:[s&&i.jsxs(i.Fragment,{children:[i.jsx(pr,{color:"white",iconId:"Close",size:"xxsm",style:{opacity:h?0:1,right:"3px"}}),i.jsx(pr,{color:"white",iconId:"Check",size:"xxsm",style:{opacity:h?1:0}})]}),i.jsx(Ns,{className:m(h&&"isChecked",s&&"showIcons",{isReadOnly:l}),...u})]})]})})},uh=g.div`
|
|
1695
1777
|
display: inline-block;
|
|
1696
1778
|
line-height: 0;
|
|
1697
|
-
`,
|
|
1779
|
+
`,hh=g.div`
|
|
1698
1780
|
z-index: 2;
|
|
1699
|
-
`,
|
|
1781
|
+
`,Fs=({arrow:e,children:t,content:o,open:n,openDelay:r=250,className:s,placement:l,offset:a,disabled:u})=>{const h=d.useRef(null),[p,f]=d.useState(n);d.useEffect(()=>{n!==void 0&&f(n)},[n]);const{refs:m,floatingStyles:x,context:b}=O.useFloating({open:p,onOpenChange:n===void 0?f:void 0,placement:l??"top",whileElementsMounted:O.autoUpdate,middleware:[O.offset(a??12),O.flip({fallbackAxisSideDirection:"start"}),O.shift(),O.arrow({element:h})]}),y=O.useHover(b,{move:!1,restMs:r}),w=O.useFocus(b),v=O.useDismiss(b),$=O.useRole(b,{role:"tooltip"}),{getReferenceProps:C,getFloatingProps:S}=O.useInteractions(u?[]:[y,w,v,$]);return i.jsxs(i.Fragment,{children:[i.jsx(uh,{className:s,ref:m.setReference,...C(),children:t}),i.jsx(O.FloatingPortal,{children:p&&i.jsxs(hh,{ref:m.setFloating,style:x,...S(),children:[i.jsx(O.FloatingArrow,{...e,ref:h,context:b}),o]})})]})},As=g.div`
|
|
1700
1782
|
background-color: #ffffff;
|
|
1701
1783
|
border-radius: 0px;
|
|
1702
1784
|
box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.12);
|
|
@@ -1704,120 +1786,120 @@
|
|
|
1704
1786
|
display: flex;
|
|
1705
1787
|
align-items: center;
|
|
1706
1788
|
padding: ${e=>e.contain&&"7px 10px"};
|
|
1707
|
-
`,
|
|
1789
|
+
`,Ls={fill:"#ffffff",height:12,tipRadius:0,width:14},xo=({arrow:e=Ls,children:t,contain:o=!0,content:n,...r})=>i.jsx(Fs,{arrow:e,content:i.jsx(As,{contain:o,children:i.jsx(E,{color:"dark",variant:"body",children:n})}),...r,children:t}),ph=g.div`
|
|
1708
1790
|
display: flex;
|
|
1709
1791
|
flex-direction: column;
|
|
1710
1792
|
min-width: 160px;
|
|
1711
|
-
`,
|
|
1793
|
+
`,fh=g.div`
|
|
1712
1794
|
display: flex;
|
|
1713
1795
|
gap: 8px;
|
|
1714
1796
|
height: 28px;
|
|
1715
1797
|
padding: 7px 10px;
|
|
1716
|
-
`,
|
|
1798
|
+
`,gh=g.div`
|
|
1717
1799
|
border-top: 1px solid #dfdfdf;
|
|
1718
|
-
`,
|
|
1800
|
+
`,mh=g.div`
|
|
1719
1801
|
padding: 7px 12px;
|
|
1720
|
-
`,
|
|
1802
|
+
`,bh=e=>{switch(e){case"error":return"red";case"info":return"blue";case"success":return"green";case"warning":return"orange";default:return"blue"}},xh=e=>{switch(e){case"error":case"info":return"ExclamationCircle";case"success":return"CheckCircle";case"warning":return"Warning";default:return"ExclamationCircle"}},yh=({message:e,title:t="Information",type:o="info"})=>i.jsxs(ph,{children:[i.jsxs(fh,{children:[i.jsx(F,{color:bh(o),iconId:xh(o)}),i.jsx(E,{bold:!0,variant:"body",children:t})]}),i.jsx(gh,{}),i.jsx(mh,{children:i.jsx(E,{variant:"body",children:e})})]}),In=({children:e,open:t,openDelay:o,className:n,...r})=>i.jsx(xo,{contain:!1,content:i.jsx(yh,{...r}),open:t,openDelay:o,className:n,children:e}),Bs=g.div`
|
|
1721
1803
|
background-color: #000000;
|
|
1722
1804
|
border-radius: 4px;
|
|
1723
1805
|
color: #ffffff;
|
|
1724
1806
|
display: flex;
|
|
1725
1807
|
gap: 8px;
|
|
1726
1808
|
padding: ${e=>e.contain&&"4px 8px"};
|
|
1727
|
-
`,
|
|
1809
|
+
`,Ws={fill:"#000000",height:10,tipRadius:2,width:11},yo=d.forwardRef(({arrow:e=Ws,children:t,contain:o=!0,content:n,...r},s)=>i.jsx(Fs,{arrow:e,content:i.jsx(Bs,{contain:o,children:i.jsx(E,{color:"light",variant:"small",children:n})}),...r,children:d.isValidElement(t)?d.cloneElement(t,{ref:s}):t})),Ps=({title:e,...t})=>i.jsx(In,{...t,title:e??"Error",type:"error"}),vh=g.div`
|
|
1728
1810
|
display: flex;
|
|
1729
1811
|
gap: 4px;
|
|
1730
|
-
`,
|
|
1812
|
+
`,kh=({label:e,value:t})=>i.jsxs(vh,{children:[i.jsx(F,{iconId:"CheckSquare",size:"sm",color:"purple"}),i.jsxs(E,{bold:!0,variant:"body",children:[e,":"]}),i.jsx(E,{variant:"body",children:t})]}),Hs=({children:e,open:t,openDelay:o,...n})=>i.jsx(xo,{content:i.jsx(kh,{...n}),open:t,openDelay:o,children:e}),Vs=d.forwardRef(({variant:e,...t},o)=>{let n;switch(e){case"alert":n=In;break;case"dark":n=yo;break;case"error":n=Ps;break;case"light":n=xo;break;case"selector":n=Hs;break}return i.jsx(n,{...t,ref:o})}),Us=d.createContext(null),wh=({children:e,value:t})=>i.jsx(Us.Provider,{value:t,children:e}),Gs=()=>{const e=d.useContext(Us);if(!e)throw new Error("Unable to use MultiSelectContext outside of its provider.");return e},[zt]=z(["multi-select"]),Ks=g.div`
|
|
1731
1813
|
width: 100%;
|
|
1732
|
-
padding: ${
|
|
1814
|
+
padding: ${zt("item-padding-y")} ${zt("item-padding-x")};
|
|
1733
1815
|
display: flex;
|
|
1734
1816
|
align-items: center;
|
|
1735
1817
|
justify-content: flex-start;
|
|
1736
|
-
column-gap: ${
|
|
1737
|
-
background-color: ${
|
|
1818
|
+
column-gap: ${zt("item-gap")};
|
|
1819
|
+
background-color: ${zt("background")};
|
|
1738
1820
|
cursor: pointer;
|
|
1739
1821
|
transition: background 0.125s ease-in-out;
|
|
1740
1822
|
&:hover {
|
|
1741
|
-
background-color: ${
|
|
1823
|
+
background-color: ${zt("item-hover-bg")};
|
|
1742
1824
|
}
|
|
1743
|
-
`,[
|
|
1744
|
-
border-bottom: ${
|
|
1825
|
+
`,[no]=z(["multi-select"]),Ch=d.memo(({SelectAllItemTemplate:e,options:t})=>{const{selected:o,onSetSelected:n,setOpen:r}=Gs(),s=d.useRef(null),{isAllSelected:l,isPartiallySelected:a}=d.useMemo(()=>{const h=t.every(p=>o.some(f=>f.value===p.value));return{isAllSelected:h,isPartiallySelected:!h&&o.length!==0}},[o,t]),u=d.useCallback(()=>{n(l?[]:t),r(!1)},[l,r,n,t]);return d.useEffect(()=>{s.current&&(s.current.indeterminate=a)},[a]),e?i.jsx(e,{onToggleSelectAll:u,isAllSelected:l,isPartiallySelected:a}):i.jsxs($h,{onClick:u,children:[i.jsx(jt,{ref:s,onChange:He,checked:l}),i.jsx(E,{variant:"body",color:"dark",children:l?"Deselect All":"Select All"})]})}),$h=g(Ks)`
|
|
1826
|
+
border-bottom: ${no("border")} solid ${no("select-all-border-color")};
|
|
1745
1827
|
position: sticky;
|
|
1746
1828
|
top: 0;
|
|
1747
1829
|
z-index: 2;
|
|
1748
|
-
padding-top: calc(${
|
|
1749
|
-
background-color: ${
|
|
1750
|
-
`,
|
|
1751
|
-
padding: ${
|
|
1830
|
+
padding-top: calc(${no("item-padding-y")} * 2);
|
|
1831
|
+
background-color: ${no("background")};
|
|
1832
|
+
`,Sh=d.memo(({value:e,label:t,isSelected:o,ListItemTemplate:n,onToggleSelect:r})=>n?i.jsx(n,{value:e,label:t,isSelected:o}):i.jsxs(Ks,{onClick:()=>r({value:e,label:t}),children:[i.jsx(jt,{onChange:He,checked:o}),i.jsx(E,{variant:"body",color:"dark",children:t})]})),[bt]=z(["multi-select"]),jh=d.memo(({value:e,label:t,onRemove:o,SelectedItemTemplate:n})=>n?i.jsx(n,{value:e,label:t,onRemove:o}):i.jsxs(Ih,{children:[i.jsx(E,{variant:"body",color:"dark",children:t}),i.jsx(ie,{size:"xxsm",color:"black",iconId:"Close",onClick:()=>o({value:e,label:t})})]})),Ih=g.div`
|
|
1833
|
+
padding: ${bt("selected-item-padding-y")} ${bt("selected-item-padding-x")};
|
|
1752
1834
|
display: flex;
|
|
1753
1835
|
align-items: center;
|
|
1754
1836
|
justify-content: flex-start;
|
|
1755
|
-
column-gap: ${
|
|
1756
|
-
background-color: ${
|
|
1837
|
+
column-gap: ${bt("selected-item-gap")};
|
|
1838
|
+
background-color: ${bt("selected-item-background")};
|
|
1757
1839
|
transition: background 0.125s ease-in-out;
|
|
1758
|
-
border-radius: ${
|
|
1840
|
+
border-radius: ${bt("selected-item-radius")};
|
|
1759
1841
|
:hover {
|
|
1760
|
-
background-color: ${
|
|
1842
|
+
background-color: ${bt("selected-item-background-hover")};
|
|
1761
1843
|
}
|
|
1762
|
-
`,[
|
|
1844
|
+
`,[ce]=z(["multi-select"]),Ys=d.memo(({options:e,selected:t,className:o,closeOnSelect:n,onChange:r,disabled:s,selectAllHidden:l,SelectAllItemTemplate:a,ListItemTemplate:u,SelectedItemTemplate:h})=>{const[p,f]=d.useState(!1),m=d.useCallback(j=>{console.log({_open:j}),f(j)},[]),{refs:x,floatingStyles:b,context:y}=O.useFloating({placement:"bottom",open:p,onOpenChange:m,whileElementsMounted:O.autoUpdate,middleware:zs}),w=O.useClick(y,{enabled:!s,toggle:!!n}),v=O.useDismiss(y),$=O.useRole(y,{role:"listbox"}),{getReferenceProps:C,getFloatingProps:S}=O.useInteractions([w,v,$]),k=d.useCallback(j=>{t.some(_=>_.value===j.value)?r(t.filter(_=>_.value!==j.value)):r([...t,j])},[r,t]),I=d.useMemo(()=>({open:p,setOpen:f,selected:t,onToggleSelect:k,onSetSelected:r}),[k,p,t,r]);return console.log({open:p}),i.jsx(wh,{value:I,children:i.jsxs(_h,{ref:x.setReference,className:o,...C({onClick(j){j.stopPropagation()}}),children:[t.map(j=>M.createElement(jh,{SelectedItemTemplate:h,...j,key:j.value,onRemove:k})),p&&i.jsx(O.FloatingPortal,{children:i.jsx(O.FloatingFocusManager,{context:y,modal:!1,children:i.jsxs(Dh,{ref:x.setFloating,style:b,className:St({selectAllHidden:!!l||!!a}),...S(),children:[!l&&i.jsx(Ch,{SelectAllItemTemplate:a,options:e}),e.map(j=>i.jsx(Sh,{label:j.label,value:j.value,onToggleSelect:k,isSelected:t.some(_=>j.value===_.value),ListItemTemplate:u},j.value))]})})})]})})}),_h=g.div`
|
|
1763
1845
|
width: 100%;
|
|
1764
1846
|
height: fit-content;
|
|
1765
1847
|
min-height: 28px;
|
|
1766
|
-
padding: ${
|
|
1767
|
-
border-radius: ${
|
|
1848
|
+
padding: ${ce("padding-y")} ${ce("padding-x")};
|
|
1849
|
+
border-radius: ${ce("border-radius")};
|
|
1768
1850
|
display: flex;
|
|
1769
1851
|
align-items: flex-start;
|
|
1770
1852
|
justify-content: flex-start;
|
|
1771
|
-
border-width: ${
|
|
1853
|
+
border-width: ${ce("border")};
|
|
1772
1854
|
border-style: solid;
|
|
1773
|
-
border-color: ${
|
|
1774
|
-
background-color: ${
|
|
1775
|
-
gap: ${
|
|
1855
|
+
border-color: ${ce("border-color")};
|
|
1856
|
+
background-color: ${ce("background")};
|
|
1857
|
+
gap: ${ce("gap")};
|
|
1776
1858
|
&:hover {
|
|
1777
|
-
border-color: ${
|
|
1859
|
+
border-color: ${ce("hover-border-color")};
|
|
1778
1860
|
}
|
|
1779
|
-
`,
|
|
1861
|
+
`,Dh=g.div`
|
|
1780
1862
|
display: flex;
|
|
1781
1863
|
flex-direction: column;
|
|
1782
|
-
border: ${
|
|
1864
|
+
border: ${ce("border")} solid ${ce("border-color")};
|
|
1783
1865
|
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
|
|
1784
1866
|
outline: 0;
|
|
1785
|
-
border-radius: ${
|
|
1867
|
+
border-radius: ${ce("border-radius")};
|
|
1786
1868
|
z-index: 2;
|
|
1787
1869
|
max-height: 160px;
|
|
1788
1870
|
overflow: auto;
|
|
1789
|
-
padding-bottom: ${
|
|
1790
|
-
padding-left: ${
|
|
1791
|
-
padding-right: ${
|
|
1792
|
-
background-color: ${
|
|
1871
|
+
padding-bottom: ${ce("list-padding")};
|
|
1872
|
+
padding-left: ${ce("list-padding")};
|
|
1873
|
+
padding-right: ${ce("list-padding")};
|
|
1874
|
+
background-color: ${ce("background")};
|
|
1793
1875
|
&.selectAllHidden {
|
|
1794
|
-
padding-top: ${
|
|
1876
|
+
padding-top: ${ce("list-padding")};
|
|
1795
1877
|
}
|
|
1796
|
-
`,
|
|
1878
|
+
`,Th=d.memo(({className:e})=>{const t=d.useId();return i.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{clipPath:`url(#${t}-clip-0)`,children:[i.jsx("mask",{id:`${t}-mask-1`,style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"48",height:"48",children:i.jsx("path",{d:"M47.95 0H0V47.95H47.95V0Z",fill:"white"})}),i.jsxs("g",{mask:`url(#${t}-mask-1)`,children:[i.jsx("path",{d:"M36.9766 0H10.9735C4.913 0 0 4.913 0 10.9735V36.9766C0 43.037 4.913 47.95 10.9735 47.95H36.9766C43.037 47.95 47.95 43.037 47.95 36.9766V10.9735C47.95 4.913 43.037 0 36.9766 0Z",fill:"black"}),i.jsx("path",{d:"M30.8827 24.7424C30.8827 25.7291 30.6646 26.6208 30.2341 27.393C29.8056 28.1617 29.2034 28.7704 28.4449 29.2013C27.6857 29.6323 26.8124 29.8504 25.8494 29.8504C24.8864 29.8504 24.0126 29.6323 23.2536 29.2013C22.495 28.7704 21.8929 28.1623 21.4643 27.393C21.0339 26.6208 20.8157 25.7291 20.8157 24.7424C20.8157 24.0474 20.9643 23.4216 21.258 22.8811C21.5493 22.345 21.9583 21.92 22.4736 21.6186C22.9907 21.3166 23.5864 21.1638 24.245 21.1638C24.9037 21.1638 25.5 21.3166 26.0166 21.6186C26.5319 21.92 26.9409 22.3444 27.2321 22.8811C27.5259 23.4216 27.6744 24.0481 27.6744 24.7424C27.6744 23.7556 27.4563 22.864 27.0259 22.0917C26.5973 21.3226 25.9951 20.7144 25.2366 20.2834C24.4781 19.8524 23.6049 19.6343 22.6407 19.6343C21.6764 19.6343 20.8039 19.8524 20.0453 20.2834C19.2867 20.7144 18.6846 21.3231 18.256 22.0917C17.8256 22.864 17.6074 23.7556 17.6074 24.7424C17.6074 25.9764 17.8951 27.0964 18.4628 28.0707C19.0311 29.0468 19.8288 29.8184 20.833 30.3636C21.8334 30.9068 22.9819 31.182 24.2457 31.182C25.5094 31.182 26.6586 30.9068 27.659 30.3636C28.663 29.8184 29.4607 29.0474 30.029 28.0707C30.5967 27.0964 30.8844 25.9764 30.8844 24.7424H30.8827Z",fill:"white"}),i.jsx("path",{d:"M17.6073 24.7424C17.6073 23.7556 17.8255 22.864 18.2558 22.0917C18.6845 21.3232 19.2866 20.7144 20.0452 20.2834C20.8042 19.8524 21.6775 19.6343 22.6405 19.6343C23.6035 19.6343 24.4773 19.8524 25.2365 20.2834C25.9949 20.7144 26.5972 21.3226 27.0258 22.0917C27.456 22.864 27.6743 23.7556 27.6743 24.7424C27.6743 25.4373 27.5256 26.0633 27.232 26.6036C26.9408 27.1399 26.5318 27.5649 26.0163 27.8663C25.4992 28.1682 24.9036 28.321 24.2449 28.321C23.5862 28.321 22.99 28.1682 22.4735 27.8663C21.958 27.5649 21.549 27.1404 21.2578 26.6036C20.9642 26.0633 20.8155 25.4367 20.8155 24.7424C20.8155 25.7292 21.0338 26.6209 21.464 27.393C21.8926 28.1623 22.4949 28.7704 23.2533 29.2014C24.0119 29.6323 24.8852 29.8506 25.8493 29.8506C26.8135 29.8506 27.6862 29.6323 28.4446 29.2014C29.2032 28.7704 29.8053 28.1617 30.234 27.393C30.6643 26.6209 30.8825 25.7292 30.8825 24.7424C30.8825 23.5083 30.5948 22.3884 30.027 21.4142C29.4588 20.438 28.661 19.6664 27.657 19.1213C26.6566 18.578 25.508 18.3027 24.2443 18.3027C22.9805 18.3027 21.8315 18.578 20.831 19.1213C19.8269 19.6664 19.0292 20.4374 18.4609 21.4142C17.8932 22.3884 17.6055 23.5083 17.6055 24.7424H17.6073Z",fill:"white"}),i.jsx("path",{d:"M17.6072 24.7424C17.6072 23.7556 17.8253 22.864 18.2558 22.0917C18.6843 21.3232 19.2865 20.7144 20.045 20.2834C20.8042 19.8524 21.6775 19.6343 22.6405 19.6343C23.6035 19.6343 24.4773 19.8524 25.2363 20.2834C25.9949 20.7144 26.597 21.3226 27.0256 22.0917C27.456 22.864 27.6742 23.7556 27.6742 24.7424C27.6742 25.4373 27.5256 26.0633 27.2319 26.6036C26.9406 27.1399 26.5316 27.5649 26.0163 27.8663C25.4992 28.1682 24.9035 28.321 24.2449 28.321C23.5862 28.321 22.9899 28.1682 22.4733 27.8663C21.958 27.5649 21.549 27.1404 21.2578 26.6036C20.964 26.0633 20.8155 25.4367 20.8155 24.7424C20.8155 25.7292 21.0336 26.6209 21.464 27.393C21.8926 28.1623 22.4948 28.7704 23.2533 29.2014C24.0118 29.6323 24.885 29.8504 25.8492 29.8504C26.8135 29.8504 27.686 29.6323 28.4446 29.2014C29.2032 28.7704 29.8053 28.1617 30.2339 27.393C30.6643 26.6209 30.8825 25.7292 30.8825 24.7424C30.8825 23.5083 30.5948 22.3884 30.027 21.4142C29.4588 20.438 28.661 19.6664 27.657 19.1213C26.6565 18.578 25.508 18.3027 24.2442 18.3027C22.9805 18.3027 21.8313 18.578 20.8309 19.1213C19.8269 19.6664 19.0292 20.4374 18.4609 21.4142C17.8932 22.3884 17.6055 23.5083 17.6055 24.7424H17.6072Z",fill:`url(#${t}-paint-0)`}),i.jsx("path",{d:"M41.6791 24.6258C41.0531 23.9767 40.1179 23.5308 38.8969 23.3002L36.5435 22.8692C35.7981 22.7276 35.4831 22.5744 35.3499 22.4704C35.1865 22.3431 35.1073 22.2075 35.1073 22.0559C35.1073 21.9627 35.1073 21.6791 35.6429 21.4015C36.0525 21.1892 36.5798 21.0817 37.2099 21.0817C38.3548 21.0817 39.4248 21.4585 40.3902 22.2022C40.4639 22.2592 40.5561 22.2902 40.6488 22.2902C40.7791 22.2902 40.8991 22.2314 40.9793 22.1291L42.2705 20.4789C42.4096 20.3012 42.3841 20.0462 42.2116 19.8981C41.5946 19.3691 40.8641 18.9702 40.0383 18.7128C39.1662 18.4411 38.2425 18.3032 37.2925 18.3032C36.2821 18.3032 35.3618 18.4595 34.5569 18.7675C33.7378 19.0814 33.0875 19.5409 32.6238 20.1329C32.1535 20.7339 31.9152 21.4479 31.9152 22.2539C31.9152 23.1479 32.2159 23.9077 32.8086 24.5122C33.3906 25.1061 34.2698 25.5175 35.4218 25.7362L37.9572 26.2165C38.5236 26.3301 38.9231 26.4757 39.1449 26.6487C39.3392 26.8009 39.4296 26.9691 39.4296 27.1795C39.4296 27.4749 39.2572 27.7247 38.9029 27.9428C38.5142 28.1818 37.9839 28.3036 37.3271 28.3036C35.9058 28.3036 34.6585 27.8589 33.6206 26.9816C33.5452 26.9179 33.4495 26.8829 33.3508 26.8829C33.2242 26.8829 33.1052 26.9388 33.0251 27.0369L31.6275 28.7369C31.4823 28.9135 31.5038 29.1704 31.6756 29.3219C32.2921 29.8652 33.0988 30.2998 34.0736 30.6137C35.1062 30.9465 36.2398 31.1154 37.4435 31.1154C38.4576 31.1154 39.3642 30.9465 40.1388 30.6137C40.9258 30.2754 41.5446 29.7887 41.9798 29.1662C42.4173 28.5397 42.6391 27.8102 42.6391 26.9982C42.6391 26.0834 42.3168 25.2851 41.6808 24.6252L41.6791 24.6258Z",fill:`url(#${t}-paint-1)`}),i.jsx("path",{d:"M12.9952 24.6802L18.8296 19.0464C19.0549 18.8271 19.0123 18.6261 18.9817 18.5529C18.9513 18.4799 18.8477 18.3032 18.5312 18.3032H15.5957C15.3764 18.3032 15.0963 18.4129 14.9319 18.5712L10.0172 23.3951V18.7357C10.0172 18.4981 9.82227 18.3032 9.58476 18.3032H7.26443C7.02692 18.3032 6.83203 18.4981 6.83203 18.7357V30.6249C6.83203 30.8624 7.02692 31.0574 7.26443 31.0574H9.58476C9.82227 31.0574 10.0172 30.8624 10.0172 30.6249V25.9655L14.9319 30.7894C15.0902 30.9417 15.3703 31.0574 15.5896 31.0574H18.525C18.8417 31.0574 18.9453 30.8807 18.9757 30.8077C19.0062 30.7345 19.0487 30.5335 18.8234 30.3142L12.9952 24.6802Z",fill:"white"})]})]}),i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:`${t}-paint-0`,x1:"24.2439",y1:"19.4779",x2:"24.2439",y2:"28.6754",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{offset:"0.0358168",stopColor:"#82E1FF"}),i.jsx("stop",{offset:"0.228529",stopColor:"#78E6A0"}),i.jsx("stop",{offset:"0.436866",stopColor:"#FFB400"}),i.jsx("stop",{offset:"0.619161",stopColor:"#FF8700"}),i.jsx("stop",{offset:"0.811872",stopColor:"#FF5A00"}),i.jsx("stop",{offset:"1",stopColor:"#F40000"})]}),i.jsxs("linearGradient",{id:`${t}-paint-1`,x1:"37.0852",y1:"19.6069",x2:"37.0852",y2:"29.8117",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{offset:"0.0358168",stopColor:"#82E1FF"}),i.jsx("stop",{offset:"0.228529",stopColor:"#78E6A0"}),i.jsx("stop",{offset:"0.436866",stopColor:"#FFB400"}),i.jsx("stop",{offset:"0.619161",stopColor:"#FF8700"}),i.jsx("stop",{offset:"0.811872",stopColor:"#FF5A00"}),i.jsx("stop",{offset:"1",stopColor:"#F40000"})]}),i.jsx("clipPath",{id:`${t}-clip-0`,children:i.jsx("rect",{width:"48",height:"48",fill:"white"})})]})]})}),[De]=z(["collapsible-artifact-version"]),Eh=d.memo(({onListItemAction:e,isSelected:t,isInherited:o,id:n,name:r,createdAt:s,description:l})=>{const a=d.useCallback(()=>{e&&!o&&e(n,t?"deselect":"select")},[n,o,t,e]);return i.jsx(M.ClassNames,{children:({cx:u})=>i.jsxs(Mh,{onClick:a,className:u({isSelected:t,isInherited:o}),children:[i.jsxs(zh,{children:[i.jsxs(Oh,{children:[i.jsx(E,{variant:"small",color:"dark",bold:!0,children:r}),!!s&&i.jsx(E,{color:"grey",variant:"small",children:s})]}),l&&i.jsx(fo,{color:"grey",variant:"small",children:`${l}${l}`})]}),t?i.jsx(Rh,{size:"xsm",color:"blue",iconId:t?"Check":"InfoCircle"}):o?i.jsx(F,{iconId:"Inherited",color:"purple"}):null]})})}),Mh=g.div`
|
|
1797
1879
|
width: 100%;
|
|
1798
1880
|
position: relative;
|
|
1799
1881
|
display: flex;
|
|
1800
|
-
padding: ${
|
|
1801
|
-
border-radius: ${
|
|
1802
|
-
background-color: ${
|
|
1803
|
-
border: ${
|
|
1882
|
+
padding: ${De("padding")};
|
|
1883
|
+
border-radius: ${De("border-radius")};
|
|
1884
|
+
background-color: ${De("background-color")};
|
|
1885
|
+
border: ${De("border-width")} solid ${De("border-color")};
|
|
1804
1886
|
cursor: pointer;
|
|
1805
1887
|
transition: border-color 0.125s ease-in-out, background 0.125s ease-in-out;
|
|
1806
1888
|
&.isInherited {
|
|
1807
|
-
background-color: ${
|
|
1808
|
-
border-color: ${
|
|
1889
|
+
background-color: ${De("background-color-inherited")};
|
|
1890
|
+
border-color: ${De("border-color-inherited")};
|
|
1809
1891
|
}
|
|
1810
1892
|
&.isSelected {
|
|
1811
|
-
background-color: ${
|
|
1812
|
-
border-color: ${
|
|
1893
|
+
background-color: ${De("background-color-selected")};
|
|
1894
|
+
border-color: ${De("border-color-selected")};
|
|
1813
1895
|
}
|
|
1814
1896
|
:hover:not(.isSelected) {
|
|
1815
|
-
background-color: ${
|
|
1897
|
+
background-color: ${De("background-color-hover")};
|
|
1816
1898
|
}
|
|
1817
1899
|
:hover:not(.isSelected):not(.isInherited) {
|
|
1818
|
-
border-color: ${
|
|
1900
|
+
border-color: ${De("border-color-hover")};
|
|
1819
1901
|
}
|
|
1820
|
-
`,
|
|
1902
|
+
`,zh=g.div`
|
|
1821
1903
|
width: 100%;
|
|
1822
1904
|
display: flex;
|
|
1823
1905
|
align-items: flex-start;
|
|
@@ -1825,48 +1907,48 @@
|
|
|
1825
1907
|
flex-direction: column;
|
|
1826
1908
|
row-gap: 1px;
|
|
1827
1909
|
overflow: hidden;
|
|
1828
|
-
`,
|
|
1910
|
+
`,Oh=g.div`
|
|
1829
1911
|
width: 100%;
|
|
1830
1912
|
display: flex;
|
|
1831
1913
|
align-items: center;
|
|
1832
1914
|
justify-content: flex-start;
|
|
1833
1915
|
gap: 8px;
|
|
1834
|
-
`,
|
|
1916
|
+
`,Rh=g(F)`
|
|
1835
1917
|
position: absolute;
|
|
1836
1918
|
top: 50%;
|
|
1837
1919
|
transform: translateY(-50%);
|
|
1838
1920
|
right: 8px;
|
|
1839
|
-
`,[
|
|
1921
|
+
`,[Wt,Ao,Nh]=z(["collapsible-list-container","collapsible-list-header-container","collapsible-list-toggled-container"]),Fh=({headerContent:e,toggledContent:t,isOpen:o,onOpenChange:n})=>i.jsx(ho,{open:o,onOpenChange:n,children:i.jsxs(Lh,{children:[i.jsx(pn,{children:i.jsxs(Bh,{children:[i.jsx(ie,{className:"caret-button",color:"black",size:"xsm",iconId:"CaretRight"}),e]})}),i.jsx(po,{children:i.jsx(Ah,{children:t})})]})}),Ah=g.div`
|
|
1840
1922
|
flex-direction: column;
|
|
1841
|
-
gap: ${
|
|
1842
|
-
`,
|
|
1843
|
-
border-radius: ${
|
|
1844
|
-
border: ${
|
|
1923
|
+
gap: ${Nh("gap")};
|
|
1924
|
+
`,Lh=g.div`
|
|
1925
|
+
border-radius: ${Wt("border-radius")};
|
|
1926
|
+
border: ${Wt("border-width")} solid ${Wt("border-color")};
|
|
1845
1927
|
display: flex;
|
|
1846
1928
|
flex-direction: column;
|
|
1847
1929
|
overflow: hidden;
|
|
1848
1930
|
position: relative;
|
|
1849
|
-
`,
|
|
1931
|
+
`,Bh=g.div`
|
|
1850
1932
|
align-items: center;
|
|
1851
|
-
background-color: ${
|
|
1933
|
+
background-color: ${Ao("background-color")};
|
|
1852
1934
|
cursor: pointer;
|
|
1853
1935
|
display: flex;
|
|
1854
|
-
gap: ${
|
|
1855
|
-
padding: ${
|
|
1936
|
+
gap: ${Ao("gap")};
|
|
1937
|
+
padding: ${Ao("padding")};
|
|
1856
1938
|
|
|
1857
1939
|
&[data-state="open"] > .caret-button {
|
|
1858
1940
|
transform: rotate(90deg);
|
|
1859
1941
|
}
|
|
1860
1942
|
|
|
1861
1943
|
&[data-state="open"] {
|
|
1862
|
-
border-bottom: ${
|
|
1863
|
-
${
|
|
1944
|
+
border-bottom: ${Wt("border-width")} solid
|
|
1945
|
+
${Wt("border-color")};
|
|
1864
1946
|
}
|
|
1865
|
-
`,[
|
|
1947
|
+
`,[fr]=z(["combobox"]),Wh=d.memo(({isDeletable:e,inputText:t,setInputText:o,onSelectionChange:n,placeholder:r,setIsOpen:s,tooltipText:l,onKeyDown:a})=>{const u=d.useCallback(p=>{o(p.target.value??"")},[o]),h=d.useCallback(()=>{o(""),n("select",void 0),s(!1)},[n,o,s]);return i.jsxs(Ph,{children:[i.jsx(Vh,{value:t,onChange:u,onKeyDown:a,placeholder:r,autoFocus:!0,className:e?"isDeletable":void 0}),e&&i.jsx(Hh,{children:i.jsx(Vs,{variant:"dark",content:l,children:i.jsx(ie,{onClick:h,iconId:"DeleteOutlined",color:"red",size:"sm"})})})]})}),Ph=g.div`
|
|
1866
1948
|
width: 100%;
|
|
1867
1949
|
position: relative;
|
|
1868
1950
|
display: flex;
|
|
1869
|
-
`,
|
|
1951
|
+
`,Hh=g.div`
|
|
1870
1952
|
position: absolute;
|
|
1871
1953
|
right: 8px;
|
|
1872
1954
|
top: 50%;
|
|
@@ -1874,55 +1956,55 @@
|
|
|
1874
1956
|
align-items: center;
|
|
1875
1957
|
justify-content: center;
|
|
1876
1958
|
transform: translateY(-50%);
|
|
1877
|
-
`,
|
|
1878
|
-
border-radius: ${
|
|
1879
|
-
height: ${
|
|
1959
|
+
`,Vh=g(It)`
|
|
1960
|
+
border-radius: ${fr("input-border-radius")};
|
|
1961
|
+
height: ${fr("height")};
|
|
1880
1962
|
width: 100%;
|
|
1881
1963
|
|
|
1882
1964
|
&.isDeletable {
|
|
1883
1965
|
padding-right: ${c("spacing-32")};
|
|
1884
1966
|
}
|
|
1885
|
-
`,
|
|
1886
|
-
border-radius: ${
|
|
1967
|
+
`,Uh=d.memo(({name:e})=>i.jsxs(i.Fragment,{children:[i.jsx(F,{iconId:"Check",color:"black",className:"option-label-icon",size:"xsm"}),i.jsx(fo,{variant:"body",color:"dark",children:e})]})),[ze,Gh]=z(["combobox","option"]),Kh=({optionsToRender:e,inputText:t,handleSelectionChange:o,handleInputChange:n,isDeletable:r,OptionLabelComponent:s,placeholder:l,createNode:a,createText:u,className:h,onEnter:p,t:f})=>{const{setIsOpen:m,selectedIndex:x}=Sn(),b=d.useCallback(()=>{o("create",{id:t,name:t}),m(!1)},[t,m,o]),y=d.useMemo(()=>!e.length||!e.some(v=>v.name.toLowerCase()===t.toLowerCase()),[t,e]),w=d.useCallback(v=>{v.code==="Enter"&&t&&p&&p(t,()=>m(!1))},[t,p,m]);return i.jsxs(qh,{className:h,children:[i.jsx(Wh,{inputText:t,setIsOpen:m,onSelectionChange:o,setInputText:n,isDeletable:r,onKeyDown:p?w:void 0,placeholder:l??"Enter a name",tooltipText:(f==null?void 0:f("comboBox.tooltipText"))??"Remove?"}),e.map((v,$)=>i.jsx(Jh,{label:s?i.jsx(s,{...v,selected:x===$}):i.jsx(Uh,{name:v.name}),optionKey:v.id,disabled:v.isHeader},v.id)),y&&t?a?i.jsx(Xh,{onClick:b,children:a}):i.jsx(Zh,{size:"med",onClick:b,children:u??"Create?"}):null]})},qs=({children:e,deletable:t,options:o,selected:n,onInputChange:r,onSelectionChange:s,requiresSelection:l,...a})=>{const u=d.useRef(n==null?void 0:n.id),[h,p]=d.useState(l?"":(n==null?void 0:n.name)??""),f=!!n&&n.name===h,m=t!==void 0?t:f&&!l;d.useLayoutEffect(()=>{u.current!==(n==null?void 0:n.id)&&(p(l?"":(n==null?void 0:n.name)??""),u.current=n==null?void 0:n.id)},[n,l]);const x=d.useCallback($=>{p($),r==null||r($)},[r]),b=d.useCallback(($,C)=>{u.current=C==null?void 0:C.id,p(l?"":(C==null?void 0:C.name)??""),s($,C==null?void 0:C.id)},[s,l]),y=d.useCallback($=>{const C=o.find(S=>S.id===$);C&&b("select",C)},[b,o]),w=d.useMemo(()=>f?o:o.filter($=>$.name.toLowerCase().includes(h.toLowerCase())||$.isHeader),[h,o,f]),v=d.useMemo(()=>w.findIndex($=>$.id===(n==null?void 0:n.id)),[w,n==null?void 0:n.id]);return i.jsx(Yh,{selectedIndex:v,isFocusTrapDisabled:!0,onSelect:y,Reference:e,children:i.jsx(Kh,{...a,handleInputChange:x,handleSelectionChange:b,optionsToRender:w,isDeletable:m,inputText:h})})},Yh=g(_t)`
|
|
1968
|
+
border-radius: ${ze("border-radius")};
|
|
1887
1969
|
overflow: hidden;
|
|
1888
|
-
`,
|
|
1970
|
+
`,qh=g.div`
|
|
1889
1971
|
width: 200px;
|
|
1890
1972
|
height: auto;
|
|
1891
1973
|
display: flex;
|
|
1892
1974
|
flex-direction: column;
|
|
1893
1975
|
align-items: flex-start;
|
|
1894
1976
|
justify-content: flex-start;
|
|
1895
|
-
background-color: ${
|
|
1896
|
-
border-radius: ${
|
|
1897
|
-
box-shadow: ${
|
|
1898
|
-
padding: ${
|
|
1899
|
-
row-gap: ${
|
|
1900
|
-
`,
|
|
1901
|
-
padding: ${
|
|
1902
|
-
`,
|
|
1977
|
+
background-color: ${ze("background-color")};
|
|
1978
|
+
border-radius: ${ze("border-radius")};
|
|
1979
|
+
box-shadow: ${ze("box-shadow")};
|
|
1980
|
+
padding: ${ze("padding")};
|
|
1981
|
+
row-gap: ${ze("row-gap")};
|
|
1982
|
+
`,Zh=g(hn)`
|
|
1983
|
+
padding: ${Gh("padding")};
|
|
1984
|
+
`,Xh=g.div`
|
|
1903
1985
|
cursor: pointer;
|
|
1904
1986
|
width: 100%;
|
|
1905
|
-
`,
|
|
1987
|
+
`,Jh=g(ct)`
|
|
1906
1988
|
width: 100%;
|
|
1907
1989
|
display: flex;
|
|
1908
1990
|
align-items: center;
|
|
1909
1991
|
justify-content: flex-start;
|
|
1910
|
-
background-color: ${
|
|
1911
|
-
border-radius: ${
|
|
1912
|
-
column-gap: ${
|
|
1992
|
+
background-color: ${ze("background-color")};
|
|
1993
|
+
border-radius: ${ze("selection-border-radius")};
|
|
1994
|
+
column-gap: ${ze("option-column-gap")};
|
|
1913
1995
|
transition: background 0.125s ease-in-out;
|
|
1914
1996
|
overflow: hidden;
|
|
1915
1997
|
> .option-label-icon {
|
|
1916
1998
|
display: none;
|
|
1917
1999
|
}
|
|
1918
2000
|
&.isSelected {
|
|
1919
|
-
background-color: ${
|
|
2001
|
+
background-color: ${ze("background-color-selected")};
|
|
1920
2002
|
> .option-label-icon {
|
|
1921
2003
|
display: block;
|
|
1922
2004
|
}
|
|
1923
2005
|
}
|
|
1924
2006
|
&.isActive:not(.isSelected) {
|
|
1925
|
-
background-color: ${
|
|
2007
|
+
background-color: ${ze("background-color-active")};
|
|
1926
2008
|
}
|
|
1927
2009
|
&.disabled {
|
|
1928
2010
|
cursor: initial;
|
|
@@ -1931,7 +2013,7 @@
|
|
|
1931
2013
|
font-weight: ${c("font-weight-bold")};
|
|
1932
2014
|
}
|
|
1933
2015
|
}
|
|
1934
|
-
`,
|
|
2016
|
+
`,Zs=g.div`
|
|
1935
2017
|
height: 20px;
|
|
1936
2018
|
width: 240px;
|
|
1937
2019
|
display: grid;
|
|
@@ -1952,69 +2034,69 @@
|
|
|
1952
2034
|
pointer-events: none;
|
|
1953
2035
|
background-color: ${c("color-grey10")};
|
|
1954
2036
|
}
|
|
1955
|
-
`,
|
|
2037
|
+
`,Qh=e=>typeof e=="string"?e.trim().length>0||"Required":!0,ep=e=>{const{register:t}=e,o=d.useCallback((r,s)=>{if(!s||!s.required)return t(r,s);const l=typeof s.validate=="function"?{default:s.validate}:s.validate,a={...s,validate:{...l,whitespaces:Qh}};return t(r,a)},[t]),n=d.useMemo(()=>({...e.control,register:o}),[e.control,o]);return{...e,register:o,control:n}};function Xs({children:e,onSubmit:t,onRootErrorChange:o,className:n,defaultValues:r,variant:s="submit",...l}){const a=q.useForm({shouldUnregister:!0,defaultValues:r,...l,mode:s==="blur"?"onBlur":l.mode}),u=ep(a),h=u.formState.errors.root;d.useEffect(()=>{o&&o(h)},[h,o]);const p=d.useCallback(async f=>{await t(f,u.setError)},[u.setError,t]);return i.jsx(q.FormProvider,{...u,children:i.jsx("form",{className:n,onSubmit:s==="blur"?void 0:u.handleSubmit(p),onBlur:s==="blur"?u.handleSubmit(p):void 0,children:e})})}const tp=d.memo(()=>i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M5.99961 3.6001C5.35761 3.6001 4.75761 3.8481 4.30361 4.3041C3.84961 4.7581 3.59961 5.3581 3.59961 6.0001C3.59961 6.6421 3.84961 7.2421 4.30361 7.6961C4.75761 8.1481 5.35961 8.4001 5.99961 8.4001C6.63961 8.4001 7.24161 8.1501 7.69561 7.6961C8.14761 7.2421 8.39961 6.6401 8.39961 6.0001C8.39961 5.3601 8.14961 4.7581 7.69561 4.3041C7.24161 3.8481 6.64161 3.6001 5.99961 3.6001Z",fill:"#262626"})})),op=e=>e===void 0?i.jsx(tp,{}):e?i.jsx(F,{iconId:"Check",color:"green",size:"sm"}):i.jsx(F,{iconId:"Close",color:"red",size:"sm"}),Js=d.memo(({isBlank:e,requirements:t,metRequirements:o,bulletGetter:n,className:r,t:s,title:l})=>i.jsxs(np,{className:r,children:[!!l&&i.jsx(E,{color:"dark",bold:!0,variant:"body",children:l}),i.jsx(rp,{children:t.map(a=>{const u=e?void 0:o.includes(a.id);return i.jsxs(sp,{children:[n?n(a.id,u):op(u),i.jsx(ip,{variant:"body",color:"dark",children:s?s(a.textKey):a.id})]},a.id)})})]})),np=g.div`
|
|
1956
2038
|
display: flex;
|
|
1957
2039
|
align-items: flex-start;
|
|
1958
2040
|
justify-content: flex-start;
|
|
1959
2041
|
flex-direction: column;
|
|
1960
|
-
`,
|
|
2042
|
+
`,rp=g.ul`
|
|
1961
2043
|
margin: 0px;
|
|
1962
2044
|
padding-left: 0px;
|
|
1963
2045
|
row-gap: 4px;
|
|
1964
2046
|
list-style-type: none;
|
|
1965
2047
|
list-style-position: inside;
|
|
1966
|
-
`,
|
|
2048
|
+
`,sp=g.li`
|
|
1967
2049
|
margin: 0;
|
|
1968
2050
|
align-items: center;
|
|
1969
2051
|
display: flex;
|
|
1970
2052
|
justify-content: flex-start;
|
|
1971
|
-
`,
|
|
2053
|
+
`,ip=g(E)`
|
|
1972
2054
|
margin-left: 4px;
|
|
1973
|
-
`,
|
|
2055
|
+
`,ap=()=>q.useFormContext(),[gr]=z(["form"]),_n=[{textKey:"passwordRequirements.length",id:"length"},{textKey:"passwordRequirements.uppercaseAndNumber",id:"uppercaseAndNumber"},{textKey:"passwordRequirements.specialCharacter",id:"specialCharacter"}],Qs=[{textKey:"passwordRequirements.tooSimilar",id:"tooSimilar"},..._n],lp=d.memo(({name:e,t,hasLabel:o,includeTooSimilar:n})=>{const{getFieldState:r,formState:s}=ap(),{error:l,isDirty:a}=r(e??"password",s),u=d.useMemo(()=>{const h=(l==null?void 0:l.types)??{},p=[];return!h.minLength&&!h.required&&p.push("length"),!h.tooSimilar&&n&&p.push("tooSimilar"),!h[At.noDigit]&&!h[At.noUpperCase]&&p.push("uppercaseAndNumber"),h[At.noSpecialCharacter]||p.push("specialCharacter"),p},[l==null?void 0:l.types,n]);return i.jsx(M.ClassNames,{children:({cx:h})=>i.jsx(cp,{t,className:h({hasLabel:o}),isBlank:!a&&!l,requirements:n?Qs:_n,title:(t==null?void 0:t("passwordRequirements.title"))??"Password Requirements",metRequirements:u})})}),cp=g(Js)`
|
|
1974
2056
|
width: 100%;
|
|
1975
2057
|
align-items: flex-start;
|
|
1976
2058
|
justify-content: flex-start;
|
|
1977
2059
|
&.hasLabel {
|
|
1978
|
-
padding-left: calc(${
|
|
1979
|
-
}
|
|
1980
|
-
`,[
|
|
1981
|
-
font-family: ${
|
|
1982
|
-
font-size: ${
|
|
1983
|
-
font-weight: ${
|
|
1984
|
-
height: ${
|
|
1985
|
-
line-height: ${
|
|
2060
|
+
padding-left: calc(${gr("label-width")} + ${gr("label-column-gap")});
|
|
2061
|
+
}
|
|
2062
|
+
`,[ut]=z(["form"]),Ce=d.forwardRef(({className:e,required:t,formItemId:o,isValid:n,...r},s)=>i.jsx(M.ClassNames,{children:({cx:l})=>i.jsx(dp,{ref:s,"aria-required":t,"aria-invalid":!n,className:l(e,"form-label"),htmlFor:o,...r})})),dp=g.label`
|
|
2063
|
+
font-family: ${ut("label-font-family")};
|
|
2064
|
+
font-size: ${ut("label-font-size")};
|
|
2065
|
+
font-weight: ${ut("label-font-weight")};
|
|
2066
|
+
height: ${ut("label-height")};
|
|
2067
|
+
line-height: ${ut("label-line-height")};
|
|
1986
2068
|
text-align: right;
|
|
1987
2069
|
width: 100%;
|
|
1988
2070
|
&[aria-required="true"] {
|
|
1989
2071
|
::before {
|
|
1990
2072
|
content: "*";
|
|
1991
|
-
padding-right: ${
|
|
1992
|
-
color: ${
|
|
2073
|
+
padding-right: ${ut("label-star-padding")};
|
|
2074
|
+
color: ${ut("label-error-color")};
|
|
1993
2075
|
}
|
|
1994
2076
|
}
|
|
1995
|
-
`;
|
|
2077
|
+
`;Ce.displayName="FormLabel";const[Lo]=z(["form"]),Ve=d.memo(({handleError:e,name:t,hasLabel:o})=>{const{getFieldState:n,formState:r}=q.useFormContext(),{error:s}=n(t,r);if(!s)return null;const l=e==="message"?s.message:e(s);return l?i.jsx(up,{className:o?"hasLabel":void 0,variant:"body",color:"red",children:l}):null}),up=g(E)`
|
|
1996
2078
|
width: 100%;
|
|
1997
|
-
margin-top: ${
|
|
2079
|
+
margin-top: ${Lo("error-message-top-margin")};
|
|
1998
2080
|
&.hasLabel {
|
|
1999
|
-
padding-left: calc(${
|
|
2081
|
+
padding-left: calc(${Lo("label-width")} + ${Lo("label-column-gap")});
|
|
2000
2082
|
}
|
|
2001
|
-
`,[
|
|
2083
|
+
`,[on]=z(["form"]),nt=g.div`
|
|
2002
2084
|
display: flex;
|
|
2003
2085
|
align-items: center;
|
|
2004
2086
|
justify-content: flex-start;
|
|
2005
2087
|
flex-direction: column;
|
|
2006
2088
|
width: 100%;
|
|
2007
2089
|
position: relative;
|
|
2008
|
-
`,
|
|
2090
|
+
`,Ue=g.div`
|
|
2009
2091
|
display: grid;
|
|
2010
2092
|
align-items: center;
|
|
2011
2093
|
grid-template-columns: 1fr;
|
|
2012
2094
|
width: 100%;
|
|
2013
|
-
column-gap: ${
|
|
2095
|
+
column-gap: ${on("label-column-gap")};
|
|
2014
2096
|
&.hasLabel {
|
|
2015
|
-
grid-template-columns: ${
|
|
2097
|
+
grid-template-columns: ${on("label-width")} 1fr;
|
|
2016
2098
|
}
|
|
2017
|
-
`,
|
|
2099
|
+
`,ei=g(Ue)`
|
|
2018
2100
|
align-items: flex-start;
|
|
2019
2101
|
|
|
2020
2102
|
/*
|
|
@@ -2025,71 +2107,65 @@
|
|
|
2025
2107
|
can help...
|
|
2026
2108
|
|
|
2027
2109
|
& label {
|
|
2028
|
-
padding: ${
|
|
2110
|
+
padding: ${on("label-area-padding")};
|
|
2029
2111
|
} */
|
|
2030
|
-
`,
|
|
2112
|
+
`,Dn=g.input`
|
|
2031
2113
|
visibility: hidden;
|
|
2032
2114
|
position: absolute;
|
|
2033
2115
|
right: 0;
|
|
2034
2116
|
top: 0;
|
|
2035
2117
|
pointer-events: none;
|
|
2036
|
-
`,
|
|
2118
|
+
`,hp=({name:e,disabled:t,label:o,className:n,handleError:r,showIcons:s,readOnly:l,...a})=>{const{control:u}=q.useFormContext(),{field:{onChange:h,value:p,disabled:f},fieldState:{error:m}}=q.useController({name:e,control:u,rules:a,disabled:t}),x=d.useId();return i.jsx(M.ClassNames,{children:({cx:b})=>i.jsxs(nt,{children:[i.jsxs(Ue,{className:b({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:x,isValid:!m,required:!!a.required,children:o}),i.jsx(pp,{children:i.jsx(bo,{checked:p,disabled:f,readOnly:l,onChange:h,showIcons:s,id:x})})]}),!!r&&i.jsx(Ve,{handleError:r,name:e,hasLabel:!!o})]})})},pp=g.div`
|
|
2037
2119
|
width: 100%;
|
|
2038
2120
|
display: flex;
|
|
2039
2121
|
align-items: center;
|
|
2040
2122
|
justify-content: flex-start;
|
|
2041
|
-
`,
|
|
2123
|
+
`,fp=({name:e,disabled:t,label:o,placeholder:n,className:r,handleError:s,autoFocus:l,wrap:a,readOnly:u,...h},p)=>{const{control:f}=q.useFormContext(),{field:{ref:m,...x},fieldState:{error:b}}=q.useController({name:e,control:f,rules:h,disabled:t}),y=d.useId(),w=O.useMergeRefs([m,p]);return i.jsx(M.ClassNames,{children:({cx:v})=>i.jsxs(nt,{children:[i.jsxs(ei,{className:v({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:y,isValid:!b,required:!!h.required,children:o}),i.jsx(jn,{...x,id:y,placeholder:n,ref:w,autoComplete:"off",className:v(r,"form-text-area"),"aria-invalid":!!b,autoFocus:l,readOnly:u,wrap:a})]}),!!s&&i.jsx(Ve,{handleError:s,name:e,hasLabel:!!o})]})})},gp=$t(fp),mp=({onSubmit:e,enabledIfClean:t,disabled:o,...n},r)=>{const{handleSubmit:s,setError:l,formState:{isValid:a,isSubmitting:u,dirtyFields:h}}=q.useFormContext(),p=d.useCallback(async x=>{console.log("[FormSubmit] _onSubmit data:",x),console.log("[FormSubmit] _onSubmit data keys:",Object.keys(x)),await e(x,l)},[l,e]),f=Object.keys(h).length>0,m=!a||u||!t&&!f||o;return i.jsx(Pe,{type:"submit",...n,ref:r,disabled:m,onClick:s(p)})},Tn=$t(mp),ti=({disabled:e,isSmall:t,children:o,value:n,id:r,placeholder:s,prefixIcon:l,prefixIconColor:a,className:u,getLabel:h,getIcon:p,onSelect:f,onKeyDown:m})=>{var I,j;const x=d.useRef(n);d.useEffect(()=>{x.current=n},[n]);const b=d.useCallback(_=>{let B=p==null?void 0:p(_),U=h==null?void 0:h(_),P;return _&&d.Children.forEach(o,L=>{d.isValidElement(L)&&L.props.optionKey&&L.props.optionKey===_&&(P=L)}),P!==void 0&&d.isValidElement(P)&&P.props.label&&(U=U??P.props.label,B=B??P.props.prefixIconId),{label:U??"",iconId:B}},[o,p,h]),y=d.useCallback((_,B)=>{let U=null;return d.Children.forEach(_,(P,L)=>{d.isValidElement(P)&&P.props.optionKey&&P.props.optionKey===B&&(U=L)}),U},[]),[w,v]=d.useState(y(o,n));d.useEffect(()=>{v(y(o,x.current))},[o,y]);const[$,C]=d.useState((I=b(n))==null?void 0:I.label),[S,k]=d.useState((j=b(n))==null?void 0:j.iconId);return d.useEffect(()=>{const _=b(n);C(_==null?void 0:_.label),k(_==null?void 0:_.iconId)},[n,b]),i.jsx(M.ClassNames,{children:({cx:_})=>i.jsx(xp,{onSelect:f,disabled:e,matchReferenceWidth:!0,selectedIndex:w,onSelectedIndexChange:v,Reference:i.jsx(bp,{value:$??"",disabled:e,onChange:He,id:r,onKeyDown:m,isSmall:t,prefixIconId:l||S,prefixIconColor:a,type:"text",placeholder:s,autoComplete:"off",className:_(u,"form-input"),suffixIconId:"Down",suffixIconColor:e?"grey":"black"}),children:o})})},bp=g(It)`
|
|
2042
2124
|
caret-color: transparent;
|
|
2043
2125
|
user-select: none;
|
|
2044
2126
|
-webkit-user-select: none;
|
|
2045
|
-
`,
|
|
2127
|
+
`,xp=g(_t)`
|
|
2046
2128
|
max-height: 300px;
|
|
2047
|
-
|
|
2048
|
-
width: 100%;
|
|
2049
|
-
min-height: 40px;
|
|
2050
|
-
display: flex;
|
|
2051
|
-
align-items: center;
|
|
2052
|
-
padding: 8px 0;
|
|
2053
|
-
`,Tf=({areaField:e,name:t,disabled:o,readOnly:n,label:r,handleError:s,children:a,className:l,...u})=>{const{control:f}=K.useFormContext(),{field:p,fieldState:{error:h,...m}}=K.useController({name:t,control:f,rules:u,disabled:o}),x=d.useId(),b=e?ws:We;return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(Ke,{className:l,children:[i.jsxs(b,{className:y("form-input-wrapper",{hasLabel:!!r}),children:[r&&i.jsx(ke,{formItemId:x,isValid:!h,required:!!u.required,children:r}),a(p,{error:h,readOnly:n,...m})]}),!!s&&i.jsx(Le,{handleError:s,name:t,hasLabel:!!r})]})})},Df=({name:e,disabled:t,label:o,className:n,handleError:r,readOnly:s,...a},l)=>{const{control:u}=K.useFormContext(),{field:{ref:f,...p},fieldState:{error:h}}=K.useController({name:e,control:u,rules:a,disabled:t}),m=d.useId(),x=z.useMergeRefs([f,l]),b=d.useCallback(y=>{y.target.blur(),p.onChange(y)},[p]);return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(Ke,{children:[i.jsxs(We,{className:y({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:m,isValid:!h,required:!!a.required,children:o}),i.jsx(bt,{checked:!!p.value,disabled:p.disabled||s,onChange:b,id:m,ref:x,className:y(n,"form-checkbox"),"aria-invalid":!!h})]}),!!r&&i.jsx(Le,{handleError:r,name:e,hasLabel:!!o})]})})},Mf=gt(Df),[Rt]=O(["form"]),Zn=({control:e,name:t,t:o,readOnly:n})=>{const{field:{onChange:r,value:s,disabled:a}}=K.useController({name:t,control:e,rules:{},disabled:!1}),l=d.useId();return i.jsxs(Ef,{children:[i.jsx(zf,{isValid:!0,formItemId:l,children:(o==null?void 0:o(`access.${t==="locked"?"lock":"hide"}Label`))??t==="locked"?"Lock":"Hide"}),i.jsx(io,{checked:s,readOnly:a||n,onChange:r,id:l})]})},Ef=g.div`
|
|
2129
|
+
`,yp=({name:e,disabled:t,label:o,handleError:n,children:r,placeholder:s,prefixIcon:l,prefixIconColor:a,className:u,readOnly:h,onSelectionChange:p,...f})=>{const{control:m}=q.useFormContext(),{field:{ref:x,...b},fieldState:{error:y}}=q.useController({name:e,control:m,rules:f,disabled:t}),w=d.useId(),{onChange:v}=b,$=d.useCallback(C=>{v(C),p&&p(C)},[v,p]);return i.jsx(M.ClassNames,{children:({cx:C})=>i.jsxs(nt,{children:[i.jsxs(Ue,{className:C({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:w,isValid:!y,required:!!f.required,children:o}),i.jsx(ti,{disabled:t||h,onSelect:$,className:u,id:w,value:b.value,children:r})]}),!!n&&i.jsx(Ve,{handleError:n,name:e,hasLabel:!!o}),i.jsx(Dn,{ref:x,...b})]})})},vp=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:l,prefixIconId:a,prefixIconColor:u,suffixIconColor:h,suffixIconId:p,autoFocus:f,readOnly:m,bold:x,...b},y)=>{const{control:w}=q.useFormContext(),{field:{ref:v,...$},fieldState:{error:C}}=q.useController({name:e,control:w,rules:b,disabled:t}),S=d.useId(),k=O.useMergeRefs([v,y]);return i.jsx(M.ClassNames,{children:({cx:I})=>i.jsxs(nt,{children:[i.jsxs(Ue,{className:I({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:S,isValid:!C,required:!!b.required,children:o}),i.jsx(It,{...$,onChange:j=>{b.autoTrim?$.onChange(j.target.value.trim()):$.onChange(j.target.value)},id:S,type:r,autoFocus:f,placeholder:n,ref:k,autoComplete:"off",prefixIconColor:u,prefixIconId:a,suffixIconId:p,suffixIconColor:h,className:I(s,"form-input"),"aria-invalid":!!C,readOnly:m})]}),!!l&&i.jsx(Ve,{handleError:l,name:e,hasLabel:!!o})]})})},En=$t(vp),kp=({areaField:e,name:t,disabled:o,readOnly:n,label:r,handleError:s,children:l,className:a,...u})=>{const{control:h}=q.useFormContext(),{field:p,fieldState:{error:f,...m}}=q.useController({name:t,control:h,rules:u,disabled:o}),x=d.useId(),b=e?ei:Ue;return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(nt,{className:a,children:[i.jsxs(b,{className:y("form-input-wrapper",{hasLabel:!!r}),children:[r&&i.jsx(Ce,{formItemId:x,isValid:!f,required:!!u.required,children:r}),l(p,{error:f,readOnly:n,...m})]}),!!s&&i.jsx(Ve,{handleError:s,name:t,hasLabel:!!r})]})})},wp=({name:e,disabled:t,label:o,className:n,handleError:r,readOnly:s,...l},a)=>{const{control:u}=q.useFormContext(),{field:{ref:h,...p},fieldState:{error:f}}=q.useController({name:e,control:u,rules:l,disabled:t}),m=d.useId(),x=O.useMergeRefs([h,a]),b=d.useCallback(y=>{y.target.blur(),p.onChange(y)},[p]);return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(nt,{children:[i.jsxs(Ue,{className:y({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:m,isValid:!f,required:!!l.required,children:o}),i.jsx(jt,{checked:!!p.value,disabled:p.disabled||s,onChange:b,id:m,ref:x,className:y(n,"form-checkbox"),"aria-invalid":!!f})]}),!!r&&i.jsx(Ve,{handleError:r,name:e,hasLabel:!!o})]})})},Cp=$t(wp),[Pt]=z(["form"]),mr=({control:e,name:t,t:o,readOnly:n})=>{const{field:{onChange:r,value:s,disabled:l}}=q.useController({name:t,control:e,rules:{},disabled:!1}),a=d.useId();return i.jsxs($p,{children:[i.jsx(Sp,{isValid:!0,formItemId:a,children:(o==null?void 0:o(`access.${t==="locked"?"lock":"hide"}Label`))??t==="locked"?"Lock":"Hide"}),i.jsx(bo,{checked:s,readOnly:l||n,onChange:r,id:a})]})},$p=g.div`
|
|
2054
2130
|
display: flex;
|
|
2055
2131
|
align-items: center;
|
|
2056
2132
|
justify-content: flex-start;
|
|
2057
|
-
column-gap: ${
|
|
2058
|
-
`,
|
|
2133
|
+
column-gap: ${Pt("access-toggle-gap")};
|
|
2134
|
+
`,Sp=g(Ce)`
|
|
2059
2135
|
width: auto;
|
|
2060
|
-
`,
|
|
2136
|
+
`,jp=({className:e,t,isAdmin:o,hideHide:n,hideLock:r})=>{const{control:s}=q.useFormContext(),l=q.useWatch();return o?i.jsxs(Ip,{className:e,children:[i.jsx(E,{textAlign:"right",variant:"body",color:"dark",children:(t==null?void 0:t("access.label"))??"Access:"}),i.jsxs(_p,{children:[!n&&i.jsx(mr,{name:"hidden",readOnly:!!l.locked,control:s}),!r&&i.jsx(mr,{name:"locked",control:s})]})]}):null},Ip=g.div`
|
|
2061
2137
|
width: 100%;
|
|
2062
2138
|
display: grid;
|
|
2063
2139
|
align-items: center;
|
|
2064
2140
|
background-color: ${c("color-grey10")};
|
|
2065
2141
|
border-radius: ${c("spacing-4")};
|
|
2066
|
-
grid-template-columns: ${
|
|
2067
|
-
height: ${
|
|
2068
|
-
column-gap: ${
|
|
2069
|
-
`,
|
|
2142
|
+
grid-template-columns: ${Pt("label-width")} 1fr;
|
|
2143
|
+
height: ${Pt("access-toggle-height")};
|
|
2144
|
+
column-gap: ${Pt("label-column-gap")};
|
|
2145
|
+
`,_p=g.div`
|
|
2070
2146
|
width: 100%;
|
|
2071
2147
|
height: 100%;
|
|
2072
2148
|
display: flex;
|
|
2073
2149
|
align-items: center;
|
|
2074
2150
|
justify-content: flex-start;
|
|
2075
|
-
column-gap: ${
|
|
2076
|
-
`,
|
|
2151
|
+
column-gap: ${Pt("label-column-gap")};
|
|
2152
|
+
`,Dp=d.memo(({nameBlackList:e,maxLength:t,t:o,...n})=>{const r=d.useCallback(s=>xs.test(s)?t&&s.length>t?(o==null?void 0:o("form.tooLongName"))??`Cannot be longer than ${t}.`:e&&e.includes(s)?(o==null?void 0:o("form.duplicateName"))??"This name is already taken":!0:(o==null?void 0:o("form.noLeadingOrTrailingSpacesName"))??"Cannot have leading or trailing spaces.",[t,e,o]);return i.jsx(En,{validate:r,handleError:"message",name:"name",...n})}),Tp=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:l,prefixIconId:a,prefixIconColor:u,suffixIconColor:h,suffixIconId:p,autoFocus:f,readOnly:m,options:x,useLabelAsValue:b,...y})=>{const{control:w}=q.useFormContext(),{field:{ref:v,...$},fieldState:{error:C}}=q.useController({name:e,control:w,rules:y,disabled:t}),S=d.useId(),k=d.useCallback((j,_)=>{$.onChange(_??"")},[$]),I=d.useMemo(()=>{if($.value)return{id:$.value,name:$.value}},[$.value]);return i.jsx(M.ClassNames,{children:({cx:j})=>i.jsxs(nt,{children:[i.jsxs(Ue,{className:j({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:S,isValid:!C,required:!!y.required,children:o}),i.jsx(qs,{options:x,selected:I,onSelectionChange:k,children:i.jsxs(Ep,{children:[i.jsx(fo,{variant:"body",color:"dark",children:$.value}),i.jsx(Mp,{children:i.jsx(F,{iconId:"Down",size:"sm",color:"black"})})]})})]}),!!l&&i.jsx(Ve,{handleError:l,name:e,hasLabel:!!o}),i.jsx(Dn,{ref:v,...$})]})})},Ep=g(Zs)`
|
|
2077
2153
|
height: 29px;
|
|
2078
2154
|
width: 100%;
|
|
2079
|
-
`,
|
|
2155
|
+
`,Mp=g.div`
|
|
2080
2156
|
width: 100%;
|
|
2081
2157
|
height: 100%;
|
|
2082
2158
|
display: flex;
|
|
2083
2159
|
align-items: center;
|
|
2084
2160
|
justify-content: center;
|
|
2085
|
-
`,
|
|
2161
|
+
`,zp=({name:e,disabled:t,label:o,handleError:n,readOnly:r,placeholder:s,...l})=>{const{control:a}=q.useFormContext(),u=d.useRef(null),{field:{ref:h,value:p,onChange:f,...m},fieldState:{error:x}}=q.useController({name:e,control:a,rules:l,disabled:t}),b=d.useId(),y=O.useMergeRefs([h,u]),w=d.useCallback(()=>{u.current&&u.current.click()},[]),v=d.useCallback(S=>{S.preventDefault()},[]),$=d.useCallback(S=>{S.preventDefault();let k=!1;if(S.dataTransfer.items.length)for(let I=0;I<S.dataTransfer.items.length&&!k;I++){const j=S.dataTransfer.items[I];if(j.kind==="file"){const _=j.getAsFile();_&&(k=!0,f(_))}}},[f]),C=d.useCallback(()=>{f(void 0)},[f]);return i.jsx(M.ClassNames,{children:({cx:S})=>i.jsxs(nt,{children:[i.jsxs(Ue,{className:S({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:b,isValid:!x,required:!!l.required,children:o}),p?i.jsxs(Np,{children:[i.jsx(F,{iconId:"File",size:"sm",color:"black"}),i.jsx(E,{variant:"body",color:"dark",children:p.name}),i.jsx(Fp,{onClick:C,iconId:"Close",size:"sm",color:"black"})]}):i.jsxs(Op,{onDrop:$,onClick:w,onDragOver:v,children:[i.jsx(F,{iconId:"File",size:"med",color:"black"}),i.jsx(E,{variant:"body",color:"dark",children:s})]}),i.jsx(Rp,{value:p==null?void 0:p.fileName,...m,id:b,onChange:k=>{k.target.files&&f(k.target.files[0])},type:"file",ref:y})]}),!!n&&i.jsx(Ve,{handleError:n,name:e,hasLabel:!!o})]})})},oi=g.div`
|
|
2086
2162
|
width: 100%;
|
|
2087
2163
|
padding: ${c("spacing-12")};
|
|
2088
2164
|
display: flex;
|
|
2089
2165
|
border: 1px solid ${c("color-grey30")};
|
|
2090
2166
|
background-color: ${c("color-grey10")};
|
|
2091
2167
|
border-radius: ${c("spacing-6")};
|
|
2092
|
-
`,
|
|
2168
|
+
`,Op=g(oi)`
|
|
2093
2169
|
align-items: center;
|
|
2094
2170
|
justify-content: center;
|
|
2095
2171
|
flex-direction: column;
|
|
@@ -2099,58 +2175,176 @@
|
|
|
2099
2175
|
:hover {
|
|
2100
2176
|
border-color: ${c("color-grey50")};
|
|
2101
2177
|
}
|
|
2102
|
-
`,
|
|
2178
|
+
`,Rp=g.input`
|
|
2103
2179
|
display: none;
|
|
2104
|
-
`,
|
|
2180
|
+
`,Np=g(oi)`
|
|
2105
2181
|
align-items: flex-start;
|
|
2106
2182
|
justify-content: flex-start;
|
|
2107
2183
|
column-gap: ${c("spacing-4")};
|
|
2108
|
-
`,
|
|
2184
|
+
`,Fp=g(ie)`
|
|
2109
2185
|
margin-left: auto;
|
|
2110
|
-
`,
|
|
2186
|
+
`,Ap=({name:e,disabled:t,label:o,handleError:n,options:r,selectAllHidden:s,SelectAllItemTemplate:l,ListItemTemplate:a,SelectedItemTemplate:u,className:h,readOnly:p,closeOnSelect:f,...m})=>{const{control:x}=q.useFormContext(),{field:{value:b,onChange:y},fieldState:{error:w}}=q.useController({name:e,control:x,rules:m,disabled:t}),v=d.useId(),$=d.useCallback(C=>{y(C)},[y]);return i.jsx(M.ClassNames,{children:({cx:C})=>i.jsxs(nt,{children:[i.jsxs(Ue,{className:C({hasLabel:!!o}),children:[o&&i.jsx(Ce,{formItemId:v,isValid:!w,required:!!m.required,children:o}),i.jsx(Ys,{disabled:t||p,options:r,closeOnSelect:f,onChange:$,selected:b,className:h,SelectAllItemTemplate:l,ListItemTemplate:a,SelectedItemTemplate:u})]}),!!n&&i.jsx(Ve,{handleError:n,name:e,hasLabel:!!o})]})})},qt=(e,t)=>{const[o,n]=d.useState(!1);return d.useEffect(()=>{async function r(){var s;e!=null&&e.init&&(await((s=e.init)==null?void 0:s.call(e)),t==null||t()),n(!0)}return r(),()=>{var s;(s=e==null?void 0:e.dispose)==null||s.call(e)}},[t,e]),o},Dt=d.createContext({isSelected:()=>!1,selected:[],toggleSelection:He,isDisabled:!1}),Ge=()=>{const e=d.useContext(Dt);return e||{isSelected:()=>!1,selected:[],toggleSelection:He,isDisabled:!1}},Mn=Symbol.for("kos.list.source"),Vt="__kos_source__";function uo(e,t){return{...e,[Mn]:t}}function Ut(e){return e[Mn]??e[Vt]}function Lp(e,t){if(t in e)return e[t];const o=Ut(e);if(o&&typeof o=="object"&&t in o)return o[t]}function Bp(e){return typeof e=="object"&&e!==null&&"locked"in e&&typeof e.locked=="boolean"}const zn=({groupName:e})=>i.jsx(Wp,{children:i.jsx(Pp,{variant:"small",bold:!0,children:e})});zn.displayName="AsyncListGroupHeader";const Wp=g.div`
|
|
2187
|
+
display: flex;
|
|
2188
|
+
align-items: center;
|
|
2189
|
+
padding: 6px 12px 2px 12px;
|
|
2190
|
+
margin-top: 4px;
|
|
2191
|
+
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
|
2192
|
+
|
|
2193
|
+
&:first-of-type {
|
|
2194
|
+
border-top: none;
|
|
2195
|
+
margin-top: 0;
|
|
2196
|
+
}
|
|
2197
|
+
`,Pp=g(E)`
|
|
2198
|
+
text-transform: uppercase;
|
|
2199
|
+
font-size: 10px;
|
|
2200
|
+
letter-spacing: 0.5px;
|
|
2201
|
+
opacity: 0.6;
|
|
2202
|
+
`;function ni(e){return(e==null?void 0:e.build)!==void 0}const Hp=W.kosComponent(({item:e,provider:t,ItemTemplate:o,itemIconMap:n,itemActions:r,itemDecorators:s,itemContentRenderer:l,disableSelectionStyling:a=!1})=>{var w;const u=d.useContext(Dt),h=d.useMemo(()=>{if(!n)return;if(typeof n=="function")return n(e);const v=e.type;return v?n[v]:void 0},[n,e]),p=d.useMemo(()=>{if(!(r!=null&&r.length))return;const v=t.originalItems.get(e.id);if(v)return r.filter($=>!$.visibleFor||$.visibleFor(e)).map($=>({id:$.id,iconId:$.iconId,color:$.color,tooltip:$.tooltip,label:$.label,isPrimary:$.isPrimary,onClick:()=>$.onClick(e.id,v)}))},[r,e,t]),f=(()=>{if(s!=null&&s.length)return s.filter(v=>!v.visibleFor||v.visibleFor(e)).map(v=>({id:v.id,iconId:v.iconId,color:v.color,tooltip:v.tooltip}))})(),m=((w=u==null?void 0:u.selected)==null?void 0:w.includes(e.id))??!1,x=l?l(e,m):void 0,b=ni(o)?o.build(e):o,y=Ut(e);return i.jsx(wt.Observer,{children:()=>i.jsx(b,{...e,...y!==void 0?{[Vt]:y}:{},iconId:h==null?void 0:h.iconId,iconColor:h==null?void 0:h.color,actions:p,decorators:f,"data-disable-selection-styling":a,children:x},e.id)})}),Vp=W.kosComponent(({dataProvider:e,ItemTemplate:t,itemIconMap:o,itemActions:n,itemDecorators:r,itemContentRenderer:s,emptyState:l,loadingState:a,className:u,onInit:h,disableSelectionStyling:p=!1,groupExpression:f})=>{const[m,x]=d.useState(!1);return d.useEffect(()=>e?((async()=>{await e.init(),x(!0),h==null||h()})(),()=>{e.dispose()}):void 0,[e,h]),!m||!e?(typeof l=="function"?null:l)||null:i.jsx(wt.Observer,{children:()=>{const b=e.isLoading??!1,y=e.items.length>0,w=typeof a=="function"?a(e):a,v=typeof l=="function"?l(e):l;return i.jsxs("div",{className:u,children:[b&&!y&&w,!b&&!y&&v,(()=>{const $=e.items,C=j=>i.jsx(Hp,{item:j,provider:e,ItemTemplate:t,itemIconMap:o,itemActions:n,itemDecorators:r,itemContentRenderer:s,disableSelectionStyling:p},j.id);if(!f)return $.map(C);const S=[],k=new Map;for(const j of $){const _=f(j);if(_===void 0)S.push(j);else{const B=k.get(_);B?B.push(j):k.set(_,[j])}}const I=Array.from(k.keys()).sort((j,_)=>j.localeCompare(_));return i.jsxs(i.Fragment,{children:[S.map(C),I.map(j=>i.jsxs(d.Fragment,{children:[i.jsx(zn,{groupName:j}),(k.get(j)??[]).map(C)]},`group-${j}`))]})})()]})}})}),[Bo,Up]=z(["option","select"]),On=({trigger:e,onSelection:t,children:o})=>i.jsx(Kp,{Reference:e,onSelect:t,menuPlacement:"bottom-start",children:o}),Gp=g(ct)`
|
|
2203
|
+
${`${Bo("bg-color",!0)}: ${c("color-black")}`};
|
|
2204
|
+
${`${Bo("color",!0)}: ${c("color-white")}`};
|
|
2205
|
+
${`${Bo("bg-color-active",!0)}: ${c("color-grey70")}`};
|
|
2206
|
+
gap: 0px;
|
|
2207
|
+
cursor: pointer;
|
|
2208
|
+
`,Kp=g(_t)`
|
|
2209
|
+
${`${Up("border-color",!0)}: ${c("color-black")}`};
|
|
2210
|
+
z-index: 15;
|
|
2211
|
+
`,Rn=g.div`
|
|
2212
|
+
cursor: default;
|
|
2213
|
+
border-bottom: 0.5px solid ${c("color-grey60")};
|
|
2214
|
+
pointer-events: none;
|
|
2215
|
+
`,[Wo,Yp]=z(["option","select"]),br=3,vo=d.memo(({actions:e,isSelected:t=!1,disableSelectionStyling:o=!1})=>{const{inlinePrimary:n,overflowPrimary:r,secondary:s}=d.useMemo(()=>{const f=e.filter(x=>x.isPrimary),m=e.filter(x=>!x.isPrimary);return{inlinePrimary:f.slice(0,br),overflowPrimary:f.slice(br),secondary:m}},[e]),l=r.length>0||s.length>0,a=t&&!o?"white":void 0,u=d.useMemo(()=>{const f=new Map;for(const m of e)f.set(m.id,m);return f},[e]),h=d.useCallback((f,m)=>{f.stopPropagation(),m.disabled||m.onClick()},[]),p=d.useCallback(f=>{const m=u.get(f);m&&!m.disabled&&m.onClick()},[u]);return e.length===0?null:i.jsxs(qp,{onClick:f=>f.stopPropagation(),children:[n.map(f=>i.jsx(yr,{onClick:m=>h(m,f),title:f.tooltip,type:"button",disabled:f.disabled,children:i.jsx(F,{size:"sm",iconId:f.iconId,color:a??f.color})},f.id)),l&&i.jsx(Zp,{children:i.jsxs(On,{trigger:i.jsx(yr,{title:"More actions",type:"button",children:i.jsx(F,{size:"sm",iconId:"Ellipsis",color:a??"blue"})}),onSelection:p,children:[r.map(f=>i.jsx(xr,{optionKey:f.id,label:i.jsxs(vr,{children:[i.jsx(F,{iconId:f.iconId,color:f.disabled?"grey":f.color||"blue",size:"sm"}),i.jsx(kr,{children:f.label||f.tooltip||f.id})]}),disabled:f.disabled,disableSelectionStyle:!0},f.id)),r.length>0&&s.length>0&&i.jsx(Rn,{}),s.map(f=>i.jsx(xr,{optionKey:f.id,label:i.jsxs(vr,{children:[f.iconId?i.jsx(F,{iconId:f.iconId,color:f.disabled?"grey":f.color||"blue",size:"sm"}):i.jsx(Xp,{}),i.jsx(kr,{children:f.label||f.tooltip||f.id})]}),disabled:f.disabled,disableSelectionStyle:!0},f.id))]})})]})});vo.displayName="ItemActionBar";const qp=g.div`
|
|
2216
|
+
display: flex;
|
|
2217
|
+
align-items: center;
|
|
2218
|
+
gap: 4px;
|
|
2219
|
+
margin-left: auto;
|
|
2220
|
+
padding-left: 8px;
|
|
2221
|
+
`,xr=g(ct)`
|
|
2222
|
+
${`${Wo("bg-color",!0)}: ${c("color-white")}`};
|
|
2223
|
+
${`${Wo("color",!0)}: ${c("color-black")}`};
|
|
2224
|
+
${`${Wo("bg-color-active",!0)}: ${c("color-grey20")}`};
|
|
2225
|
+
gap: 0px;
|
|
2226
|
+
cursor: pointer;
|
|
2227
|
+
`,Zp=g.div`
|
|
2228
|
+
${`${Yp("border-color",!0)}: ${c("color-grey40")}`};
|
|
2229
|
+
`,yr=g.button`
|
|
2230
|
+
background: none;
|
|
2231
|
+
border: none;
|
|
2232
|
+
padding: 4px;
|
|
2233
|
+
margin: 0;
|
|
2234
|
+
cursor: pointer;
|
|
2235
|
+
display: flex;
|
|
2236
|
+
align-items: center;
|
|
2237
|
+
justify-content: center;
|
|
2238
|
+
color: inherit;
|
|
2239
|
+
opacity: 0.7;
|
|
2240
|
+
transition: opacity 0.15s ease;
|
|
2241
|
+
|
|
2242
|
+
&:hover:not(:disabled) {
|
|
2243
|
+
opacity: 1;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
&:active:not(:disabled) {
|
|
2247
|
+
opacity: 0.5;
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
&:disabled {
|
|
2251
|
+
cursor: not-allowed;
|
|
2252
|
+
opacity: 0.3;
|
|
2253
|
+
}
|
|
2254
|
+
`,vr=g.div`
|
|
2255
|
+
display: flex;
|
|
2256
|
+
align-items: center;
|
|
2257
|
+
gap: 8px;
|
|
2258
|
+
`,kr=g.span`
|
|
2259
|
+
font-size: 13px;
|
|
2260
|
+
white-space: nowrap;
|
|
2261
|
+
`,Xp=g.div`
|
|
2262
|
+
width: 16px;
|
|
2263
|
+
height: 16px;
|
|
2264
|
+
`;function nn(e){return e.context!==void 0}const Nn=d.createContext(null),Fn=({children:e,dataProvider:t,onListItemAction:o})=>{const[n,r]=d.useState(),s=d.useMemo(()=>t?{action:o,data:n}:{data:new Map,action:o},[t,n,o]);return d.useEffect(()=>{var a;const l=u=>{r(u)};if(t&&nn(t)){const u=t.context;(a=t.addContextChangeListener)==null||a.call(t,l),u&&r(u)}return()=>{var u;t&&nn(t)&&((u=t==null?void 0:t.removeContextChangeListener)==null||u.call(t,l))}},[t]),i.jsx(Nn.Provider,{value:s,children:e})},Jp=()=>{const e=d.useContext(Nn);return e||W.KosLog.info("useListDataContext must be used within a DataProviderContextProvider"),e},[qe]=z(["studio-list-item"]),Qp=20,ri=W.kosComponent(({id:e,name:t,subText:o,children:n,iconId:r,iconColor:s,actions:l,decorators:a,className:u,disabled:h=!1,"data-depth":p=0,"data-indent-size":f=Qp,"data-disable-selection-styling":m=!1})=>{const{selected:x,toggleSelection:b,isDisabled:y}=Ge(),w=d.useCallback(()=>{!h&&!y&&b(e)},[e,b,h,y]),v=x.includes(e),$=h||y,C=typeof f=="string"?Number(f):f,S=p>0?{marginLeft:`${p*C}px`}:void 0;return i.jsxs(ef,{className:u,onClick:w,$isSelected:v,$isDisabled:$,$disableSelectionStyling:m,"data-depth":p,style:S,children:[r&&i.jsx(F,{size:"sm",iconId:r,color:s}),i.jsx(tf,{children:n||i.jsxs(i.Fragment,{children:[i.jsx(E,{variant:"body",bold:v,children:t}),o&&i.jsx(of,{variant:"small",color:"dark",children:o})]})}),a&&a.length>0&&i.jsx(nf,{children:a.map(k=>i.jsx(rf,{size:"sm",iconId:k.iconId,color:v&&!m?"white":k.color,title:k.tooltip},k.id))}),l&&l.length>0&&i.jsx(vo,{actions:l,isSelected:v,disableSelectionStyling:m})]})});ri.displayName="StudioNamedListItem";const ef=g.div`
|
|
2265
|
+
display: flex;
|
|
2266
|
+
align-items: center;
|
|
2267
|
+
gap: ${qe("column-gap")};
|
|
2268
|
+
padding-left: ${qe("padding-left")};
|
|
2269
|
+
padding-top: ${qe("padding-y")};
|
|
2270
|
+
padding-bottom: ${qe("padding-y")};
|
|
2271
|
+
padding-right: ${qe("padding-right")};
|
|
2272
|
+
min-height: 22px;
|
|
2273
|
+
|
|
2274
|
+
cursor: ${({$isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
2275
|
+
color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?qe("color-selected"):"inherit"};
|
|
2276
|
+
background-color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?qe("background-color-selected"):"transparent"};
|
|
2277
|
+
opacity: ${({$isDisabled:e})=>e?.5:1};
|
|
2278
|
+
transition: background-color 0.15s ease;
|
|
2279
|
+
|
|
2280
|
+
&:hover {
|
|
2281
|
+
background-color: ${({$isSelected:e,$isDisabled:t,$disableSelectionStyling:o})=>t?"transparent":o?"rgba(0, 0, 0, 0.05)":e?qe("background-color-selected"):"rgba(0, 0, 0, 0.05)"};
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
&:active {
|
|
2285
|
+
background-color: ${({$isDisabled:e,$disableSelectionStyling:t})=>e?"transparent":t?"rgba(0, 0, 0, 0.1)":qe("background-color-selected")};
|
|
2286
|
+
}
|
|
2287
|
+
`,tf=g.div`
|
|
2288
|
+
display: flex;
|
|
2289
|
+
flex-direction: column;
|
|
2290
|
+
gap: 2px;
|
|
2291
|
+
flex: 1;
|
|
2292
|
+
min-width: 0; /* Allow text truncation */
|
|
2293
|
+
`,of=g(E)`
|
|
2294
|
+
overflow: hidden;
|
|
2295
|
+
text-overflow: ellipsis;
|
|
2296
|
+
white-space: nowrap;
|
|
2297
|
+
`,nf=g.div`
|
|
2298
|
+
display: flex;
|
|
2299
|
+
align-items: center;
|
|
2300
|
+
gap: 4px;
|
|
2301
|
+
padding-left: 8px;
|
|
2302
|
+
`,rf=g(F)`
|
|
2303
|
+
opacity: 0.8;
|
|
2304
|
+
`,sf=e=>t=>o=>()=>o.call(e,t);class An{constructor(t,o,n,r){T(this,"parent");T(this,"_itemMap");T(this,"disposer");T(this,"_items");T(this,"listeners",[]);T(this,"context");T(this,"resolvedItems");T(this,"resolver");T(this,"version");T(this,"initialized");this.parent=t,this.context=D.observable.map(new Map(Object.entries(r||{}))),this.version=0,this._itemMap=n,this.initialized=!1,this._items=D.observable.map(new Map),this.resolvedItems=[],this.resolver=o.bind(t),this.listeners=[],D.makeObservable(this,{items:D.computed,initialized:D.observable,version:D.observable,refresh:D.action,resolvedItems:D.observable,context:D.observable})}filterByInputItem(t,o){return!!t}sortByInputItem(t,o){var n;return t.name?(n=t.name)==null?void 0:n.localeCompare(o.name):-1}filterItem(t,o){return!0}sortItem(t,o){return 0}refresh(){this.version=this.version+1}get items(){if(!this.initialized||this.version<0)return[];const t=this.resolvedItems,o=[...new Set(t)],n=h=>this._itemMap(h,this.context),r=h=>this.filterByInputItem(h,this.context),s=o.filter(r.bind(this)).sort(this.sortByInputItem.bind(this)).map(n),l=h=>this.filterItem(h,this.context),a=s.filter(l.bind(this)).sort(this.sortItem.bind(this));return Array.from(this._items.keys()).filter(h=>!a.find(p=>p.id===h)).forEach(h=>{W.kosAction(()=>{this._items.delete(h)})}),a.reduce((h,p)=>{if(!h.has(p.id))W.kosAction(()=>{h.set(p.id,p)});else{const f=h.get(p.id);f&&W.kosAction(()=>{const m=Object.assign(f,p);h.set(p.id,m)})}return h},this._items),a.map(h=>this._items.get(h.id))}async init(){if(!this.initialized){if(W.isKosDataModel(this.parent)&&await W.whenReady(this.parent),this.resolver){const t=sf(this.parent)(this.context)(this.resolver);this.disposer=D.reaction(t,o=>{this.resolvedItems=o,this.refresh()},{fireImmediately:!0})}W.kosAction(()=>{this.initialized=!0})}}whenReady(){return new Promise(t=>{const o=W.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}updateContextValue(t,o){W.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}dispose(){this.disposer&&this.disposer(),W.kosAction(()=>{this.initialized=!1})}}const af=e=>e.data!==void 0,si=e=>t=>()=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(r=>{const s=e[r];af(s)?o.push(...s.data):Array.isArray(s)&&o.push(...s)}),o};class Ln extends An{constructor(o,n,r,s){super(o,si(o)(n),r,s);T(this,"_key");this._key=Array.isArray(n)?n:[n]}}class lf extends Ln{constructor(t,o,n,r){super(t,o,n,r),D.makeObservable(this,{groups:D.computed,itemsByGroup:D.computed})}get itemsByGroup(){return this.items.reduce((t,o)=>{const n=o.group.groupId;return t[n]||(t[n]=[]),t[n].push(o),t},{})}get groups(){return this.items.map(t=>t.group).sort(this.sortGroup.bind(this))}getGroupItems(t){return this.itemsByGroup[t]||[]}sortGroup(t,o){return t.name.localeCompare(o.name)}}class cf{constructor(t,o=[]){T(this,"items");T(this,"parent");this.parent=t,this.items=o.map(n=>({id:`${this.parent.id}-${n.name.toString()}`,name:n.key||n.name.toString(),data:n,value:this.parent[n.name]}))}}class ii{constructor(t,o,n,r,s){T(this,"parent");T(this,"_itemMap");T(this,"rootResolver");T(this,"childResolver");T(this,"rootDisposer");T(this,"rootTrackingFn");T(this,"childTrackingFn");T(this,"_nodes");T(this,"_rootIds");T(this,"context");T(this,"version");T(this,"initialized");T(this,"_expandingAll",!1);T(this,"_childDisposers",new Map);this.parent=t,this.context=D.observable.map(new Map(Object.entries(s||{}))),this._nodes=D.observable.map(new Map),this._rootIds=D.observable.array([]),this.version=0,this.initialized=!1,this._itemMap=r,this.rootResolver=o.bind(t),this.childResolver=n.bind(t),D.makeObservable(this,{context:D.observable,version:D.observable,initialized:D.observable,tree:D.computed,rootItems:D.computed,loadingStates:D.computed,loadedChildren:D.computed,originalItems:D.computed,expandBranch:D.action,collapseBranch:D.action,clearCache:D.action,refresh:D.action,expandAll:D.action})}filterByInputItem(t,o){return!0}sortByInputItem(t,o){return 0}filterItem(t,o){return!0}sortItem(t,o){return 0}async getRootItems(){return await this.rootResolver.call(this.parent,this.context)}async getChildren(t,o){return await this.childResolver.call(this.parent,t,o)}itemMap(t,o){return this._itemMap(t,o)}refresh(){this.version=this.version+1}updateContextValue(t,o){W.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}get tree(){return this.version,this._rootIds.map(t=>this.buildBranch(t)).filter(t=>t!==null)}get rootItems(){return this._rootIds.map(t=>{var o;return(o=this._nodes.get(t))==null?void 0:o.original}).filter(t=>t!==void 0)}get loadingStates(){const t=new Map;return this._nodes.forEach((o,n)=>{t.set(n,{status:o.fetchState,error:o.error,timestamp:o.timestamp})}),t}get loadedChildren(){const t=new Map;return this._nodes.forEach((o,n)=>{if(o.fetchState==="loaded"&&o.childIds.length>0){const r=o.childIds.map(s=>{var l;return(l=this._nodes.get(s))==null?void 0:l.original}).filter(s=>s!==void 0);t.set(n,r)}}),t}get originalItems(){const t=new Map;return this._nodes.forEach((o,n)=>{t.set(n,o.original)}),t}buildBranch(t){const o=this._nodes.get(t);if(!o||!this.filterByInputItem(o.original,this.context)||!this.filterItem(o.transformed,this.context))return null;const n=o.childIds.map(r=>this.buildBranch(r)).filter(r=>r!==null);return n.sort((r,s)=>this.sortItem(r,s)),{...o.transformed,branches:n,loadingState:{status:o.fetchState,error:o.error,timestamp:o.timestamp},hasChildren:o.hasChildren,isLeaf:o.hasChildren===!1}}setNode(t,o,n="idle"){const r=this.getItemId(t),s=this._nodes.get(r);if(s&&s.parentId!==o){const a=s.parentId;if(a){const u=this._nodes.get(a);if(u){const h=u.childIds.indexOf(r);h!==-1&&u.childIds.splice(h,1)}}}const l={original:t,transformed:uo(this._itemMap(t,this.context),t),parentId:o,childIds:(s==null?void 0:s.childIds)??[],hasChildren:this.hasChildren(t),fetchState:(s==null?void 0:s.fetchState)??n,error:s==null?void 0:s.error,timestamp:s==null?void 0:s.timestamp};return this._nodes.set(r,l),r}setChildren(t,o){const n=this._nodes.get(t);if(!n)return;const l=[...o.filter(a=>this.filterByInputItem(a,this.context))].sort(this.sortByInputItem.bind(this)).map(a=>this.setNode(a,t));D.runInAction(()=>{n.childIds=l,n.fetchState="loaded",n.timestamp=Date.now()})}async expandBranch(t,o){const n=this._nodes.get(t);if(!n){console.warn(`expandBranch: Node ${t} not found`);return}if(!(n.fetchState==="loading"||n.fetchState==="loaded")){D.runInAction(()=>{n.fetchState="loading",n.timestamp=Date.now()});try{const r=await this.getChildren(o,this.context);D.runInAction(()=>{this.setChildren(t,r)}),this.setupChildReaction(t,o)}catch(r){D.runInAction(()=>{n.fetchState="error",n.error=r,n.timestamp=Date.now()})}}}setupChildReaction(t,o){const n=this._childDisposers.get(t);n&&n();const r=W.kosAutoEffect(()=>{this.childTrackingFn?this.childTrackingFn(this.parent,o,this.context):this.childResolver.call(this.parent,o,this.context),this.reloadChildren(t,o)});this._childDisposers.set(t,r)}async reloadChildren(t,o){const n=this._nodes.get(t);if(!(!n||n.fetchState!=="loaded"))try{const r=await this.getChildren(o,this.context);D.runInAction(()=>{const s=new Set(n.childIds),u=[...r.filter(p=>this.filterByInputItem(p,this.context))].sort(this.sortByInputItem.bind(this)).map(p=>this.setNode(p,t)),h=new Set(u);for(const p of s)if(!h.has(p)){const f=this._nodes.get(p);f&&(this.disposeChildReaction(p),this.removeChildrenRecursively(f.childIds)),this._nodes.delete(p)}n.childIds=u,n.timestamp=Date.now()})}catch(r){console.error(`Failed to reload children for ${t}:`,r)}}disposeChildReaction(t){const o=this._childDisposers.get(t);o&&(o(),this._childDisposers.delete(t))}async expandAll(){if(!this._expandingAll){this._expandingAll=!0;try{await this.expandNodesRecursively(this._rootIds.slice())}finally{this._expandingAll=!1}}}async expandNodesRecursively(t){const o=t.map(s=>this._nodes.get(s)).filter(s=>s!==void 0&&s.hasChildren!==!1);if(o.length===0)return;const n=o.filter(s=>s.fetchState==="idle");n.length>0&&await Promise.all(n.map(s=>this.expandBranch(this.getItemId(s.original),s.original)));const r=[];for(const s of o)r.push(...s.childIds);r.length>0&&await this.expandNodesRecursively(r)}collapseBranch(t){const o=this._nodes.get(t);o&&(this.disposeChildReaction(t),D.runInAction(()=>{this.disposeDescendantReactions(o.childIds),this.removeChildrenRecursively(o.childIds),o.childIds=[],o.fetchState="idle",o.error=void 0,o.timestamp=Date.now()}))}disposeDescendantReactions(t){for(const o of t){this.disposeChildReaction(o);const n=this._nodes.get(o);n&&this.disposeDescendantReactions(n.childIds)}}removeChildrenRecursively(t){for(const o of t){const n=this._nodes.get(o);n&&(this.removeChildrenRecursively(n.childIds),this._nodes.delete(o))}}clearCache(t){t?this.collapseBranch(t):(this._childDisposers.forEach(o=>o()),this._childDisposers.clear(),D.runInAction(()=>{const o=new Set(this._rootIds),n=[];this._nodes.forEach((r,s)=>{o.has(s)?(r.childIds=[],r.fetchState="idle",r.error=void 0):n.push(s)}),n.forEach(r=>this._nodes.delete(r))}))}async init(){this.initialized&&D.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1}),W.isKosDataModel(this.parent)&&await W.whenReady(this.parent);try{const t=await this.getRootItems();D.runInAction(()=>{const r=[...t.filter(s=>this.filterByInputItem(s,this.context))].sort(this.sortByInputItem.bind(this)).map(s=>this.setNode(s));this._rootIds.replace(r),this.initialized=!0})}catch(t){console.error("Failed to load root items:",t),D.runInAction(()=>{this.initialized=!0})}this.rootDisposer=W.kosAutoEffect(()=>{this.rootTrackingFn?this.rootTrackingFn(this.parent,this.context):this.rootResolver.call(this.parent,this.context),this.reloadRoots()})}async reloadRoots(){if(this.initialized)try{const t=await this.getRootItems();D.runInAction(()=>{const o=new Set(this._rootIds),s=[...t.filter(a=>this.filterByInputItem(a,this.context))].sort(this.sortByInputItem.bind(this)).map(a=>this.setNode(a)),l=new Set(s);for(const a of o)if(!l.has(a)){const u=this._nodes.get(a);u&&this.removeChildrenRecursively(u.childIds),this._nodes.delete(a)}this._rootIds.replace(s)})}catch(t){console.error("Failed to reload root items:",t)}}whenReady(){return new Promise(t=>{const o=W.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}dispose(){this.rootDisposer&&this.rootDisposer(),this._childDisposers.forEach(t=>t()),this._childDisposers.clear(),D.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1})}}function Gt(e){return e.build!==void 0}const df=g.div`
|
|
2111
2305
|
width: 100%;
|
|
2112
|
-
`,
|
|
2306
|
+
`,uf=(e,t,o)=>e.items.map(n=>{const r=Gt(t)?t.build(n):t;return i.jsx(r,{"data-key":n.id,...n,onListItemAction:o},n.id)}),Bn=W.kosComponent(({dataProvider:e,firstChild:t,ItemTemplate:o,lastChild:n,onListItemAction:r,onInit:s,emptyState:l,className:a,itemListRenderer:u=uf})=>{const h=qt(e,s),p=h&&e?u(e,o,r):[];return i.jsx(Fn,{dataProvider:e||void 0,onListItemAction:r,children:i.jsxs(df,{className:a,children:[t,h?p.length===0&&l?l:p:null,n]})})}),ko=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:l,className:a,...u})=>{const[h,p]=d.useState(o??[]),f=d.useRef(h??[]);d.useLayoutEffect(()=>{f.current=h},[h]),d.useEffect(()=>{p(o??[])},[o]);const m=d.useCallback(y=>{t(y,f.current.includes(y)?"unselected":"selected"),p(w=>e?[y]:w.includes(y)?w.filter(v=>v!==y):[...w,y])},[e,t]),x=d.useCallback(y=>f.current.includes(y),[]),b=d.useMemo(()=>({isSelected:x,selected:h,toggleSelection:m,isDisabled:!!n}),[x,h,m,n]);return d.useEffect(()=>{var y,w;if(r&&(s!=null&&s.items)&&f.current.length===0){let v;l?v=(y=l(s.items))==null?void 0:y.id:v=(w=s.items[0])==null?void 0:w.id,v&&m(v)}},[r,s==null?void 0:s.items,l,m]),i.jsx(Dt.Provider,{value:b,children:i.jsx(Bn,{dataProvider:s,className:a,...u})})});function ai(e){return e.build!==void 0}const hf=e=>(t,o,n)=>t.groups.reduce((s,l)=>s.find(a=>a.groupId===l.groupId)?s:[...s,l],[]).map(s=>{const l=ai(e)?e.build(s):e,u=t.getGroupItems(s.groupId).map(h=>{const p=Gt(o)?o.build(h):o;return i.jsx(p,{"data-key":h.id,...h,onListItemAction:n},h.id)});return i.jsx(l,{groupId:s.groupId,name:s.name,children:u},s.groupId)}),Wn=d.createContext({openedGroups:[],toggleGroup:He});function pf(e){const t=e.supportMultipleOpen??!0,[o,n]=d.useState(e.openedGroups??[]),r=d.useCallback(l=>{var a;(a=e.onGroupOpen)==null||a.call(e,l,o.includes(l)?"closed":"opened"),n(u=>t?u.includes(l)?u.filter(h=>h!==l):[...u,l]:[l])},[o,e,t]);d.useEffect(()=>{n(e.openedGroups??[])},[e.openedGroups]);const s=d.useMemo(()=>({openedGroups:o,toggleGroup:r}),[o,r]);return i.jsx(Wn.Provider,{value:s,children:i.jsx(ko,{...e,itemListRenderer:hf(e.GroupTemplate)})})}const li=()=>{const e=d.useContext(Wn);return e||{openedGroups:[],toggleGroup:He}},ff=({children:e,name:t,groupId:o,className:n})=>{const{openedGroups:r,toggleGroup:s}=li(),l=r.includes(o),a=d.useCallback(()=>{s(o)},[o,s]);return i.jsxs(ci,{className:n,children:[i.jsxs(mf,{"data-open":l,onClick:a,children:[l?i.jsx(F,{iconId:"CaretDown",size:"xsm"}):i.jsx(F,{iconId:"CaretRight",size:"xsm"}),i.jsx(E,{variant:"body",bold:!0,children:t})]}),i.jsx(bf,{children:l?i.jsx(xf,{className:"list-container",children:e}):null})]},o)},gf=({children:e,groupId:t,className:o})=>i.jsx(ci,{className:o,children:e},t),ci=g.div`
|
|
2113
2307
|
display: flex;
|
|
2114
2308
|
flex-direction: column;
|
|
2115
2309
|
padding-bottom: 8px;
|
|
2116
|
-
`,
|
|
2310
|
+
`,mf=g.div`
|
|
2117
2311
|
display: flex;
|
|
2118
2312
|
flex: 0;
|
|
2119
2313
|
cursor: pointer;
|
|
2120
2314
|
gap: 4px;
|
|
2121
2315
|
padding-inline: 12px 12px;
|
|
2122
2316
|
align-items: center;
|
|
2123
|
-
`,
|
|
2317
|
+
`,bf=g.div`
|
|
2124
2318
|
display: flex;
|
|
2125
2319
|
flex-direction: column;
|
|
2126
|
-
`,
|
|
2320
|
+
`,xf=g.div`
|
|
2127
2321
|
padding-inline-start: 16px;
|
|
2128
2322
|
align-items: center;
|
|
2129
2323
|
gap: 6px;
|
|
2130
2324
|
padding-block-start: 8px;
|
|
2131
|
-
`,
|
|
2325
|
+
`,Zt=g.div`
|
|
2132
2326
|
align-items: center;
|
|
2133
2327
|
align-self: stretch;
|
|
2134
2328
|
background: var(--Grey-White, #fff);
|
|
2135
2329
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2136
2330
|
display: flex;
|
|
2137
|
-
|
|
2331
|
+
`,Pn=g(Zt)`
|
|
2138
2332
|
padding: 0 0 6px 0;
|
|
2139
|
-
`,
|
|
2333
|
+
`,di=g(Zt)`
|
|
2140
2334
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2141
|
-
`,
|
|
2335
|
+
`,ui=g(Pn)`
|
|
2142
2336
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2143
|
-
`,
|
|
2337
|
+
`,wo=g.div`
|
|
2144
2338
|
align-items: center;
|
|
2145
2339
|
display: flex;
|
|
2146
2340
|
gap: 16px;
|
|
2147
2341
|
height: 30px;
|
|
2148
2342
|
justify-content: center;
|
|
2149
2343
|
padding: 8px;
|
|
2150
|
-
`,
|
|
2344
|
+
`,hi=g(wo)`
|
|
2151
2345
|
height: initial;
|
|
2152
2346
|
padding: 0 4px 0 14px;
|
|
2153
|
-
`,
|
|
2347
|
+
`,Co=g.div`
|
|
2154
2348
|
align-items: center;
|
|
2155
2349
|
align-self: stretch;
|
|
2156
2350
|
display: flex;
|
|
@@ -2159,10 +2353,10 @@
|
|
|
2159
2353
|
height: 30px;
|
|
2160
2354
|
justify-content: space-between;
|
|
2161
2355
|
padding: 8px 8px 8px 4px;
|
|
2162
|
-
`,
|
|
2356
|
+
`,pi=g(Co)`
|
|
2163
2357
|
height: initial;
|
|
2164
2358
|
padding: 0;
|
|
2165
|
-
`,
|
|
2359
|
+
`,fi=d.memo(({className:e,disabled:t,id:o,label:n,mode:r="standard",name:s,showDivider:l=!0})=>{const{selected:a,toggleSelection:u,isDisabled:h}=Ge(),p=d.useCallback(()=>{u(o)},[o,u]),f=r==="compact"?hi:wo,m=r==="compact"?pi:Co,x=l?r==="compact"?ui:di:r==="compact"?Pn:Zt;return i.jsxs(x,{className:e,children:[i.jsx(f,{children:i.jsx(jt,{disabled:h||t,checked:a.includes(o),onChange:p})}),i.jsxs(m,{children:[i.jsx(E,{variant:"body",children:s}),!!n&&i.jsx(E,{color:"grey",variant:"body",children:n})]})]})}),yf=g.div`
|
|
2166
2360
|
display: flex;
|
|
2167
2361
|
padding: 4px 12px 4px 4px;
|
|
2168
2362
|
align-items: center;
|
|
@@ -2170,14 +2364,14 @@
|
|
|
2170
2364
|
align-self: stretch;
|
|
2171
2365
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2172
2366
|
background: var(--Grey-White, #fff);
|
|
2173
|
-
`,
|
|
2367
|
+
`,vf=g.div`
|
|
2174
2368
|
display: flex;
|
|
2175
2369
|
height: 30px;
|
|
2176
2370
|
padding: 8px;
|
|
2177
2371
|
justify-content: center;
|
|
2178
2372
|
align-items: center;
|
|
2179
2373
|
gap: 16px;
|
|
2180
|
-
`,
|
|
2374
|
+
`,kf=g.div`
|
|
2181
2375
|
flex: 1 1 auto;
|
|
2182
2376
|
display: flex;
|
|
2183
2377
|
align-items: center;
|
|
@@ -2186,15 +2380,15 @@
|
|
|
2186
2380
|
padding: 8px 8px 8px 4px;
|
|
2187
2381
|
gap: 4px;
|
|
2188
2382
|
align-self: stretch;
|
|
2189
|
-
`,
|
|
2383
|
+
`,wf=e=>{const{selected:t,toggleSelection:o,isDisabled:n}=Ge(),r=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsxs(yf,{children:[i.jsx(vf,{children:i.jsx("input",{onChange:r,type:"checkbox",checked:t.includes(e.id),disabled:n})}),i.jsx(kf,{children:i.jsx(E,{variant:"body",children:e.name})})]})},[Le]=z(["named-list-item"]),Cf=d.memo(({id:e,iconId:t,iconColor:o,suffixIcons:n,name:r,className:s,subText:l,subTextColor:a})=>{const{selected:u,toggleSelection:h,isDisabled:p}=Ge(),f=d.useCallback(()=>{p||h(e)},[e,h,p]),m=u.includes(e);return i.jsx(M.ClassNames,{children:({cx:x})=>i.jsxs($f,{className:x(s,{isSelected:m,isDisabled:p}),onClick:f,children:[i.jsxs(Sf,{children:[t&&i.jsx(F,{size:"sm",iconId:t,color:o}),i.jsx(E,{className:"named-list-item-text",variant:"body",children:r}),!!n&&i.jsx(If,{children:n.map(({iconId:b,iconColor:y})=>i.jsx(F,{size:"xsm",iconId:b,color:m?"white":y},b))})]}),!!l&&i.jsx(jf,{className:x({hasIcon:!!t}),children:i.jsx(_f,{color:a??"dark",variant:"body",children:l})})]})})}),$f=g.div`
|
|
2190
2384
|
display: flex;
|
|
2191
|
-
padding-top: ${
|
|
2192
|
-
padding-right: ${
|
|
2193
|
-
padding-bottom: ${
|
|
2194
|
-
padding-left: ${
|
|
2385
|
+
padding-top: ${Le("padding-y")};
|
|
2386
|
+
padding-right: ${Le("padding-right")};
|
|
2387
|
+
padding-bottom: ${Le("padding-y")};
|
|
2388
|
+
padding-left: ${Le("padding-left")};
|
|
2195
2389
|
align-items: flex-start;
|
|
2196
2390
|
justify-content: flex-start;
|
|
2197
|
-
gap: ${
|
|
2391
|
+
gap: ${Le("row-gap")};
|
|
2198
2392
|
color: inherit;
|
|
2199
2393
|
background-color: transparent;
|
|
2200
2394
|
flex-direction: column;
|
|
@@ -2203,37 +2397,37 @@
|
|
|
2203
2397
|
cursor: unset;
|
|
2204
2398
|
}
|
|
2205
2399
|
&.isSelected {
|
|
2206
|
-
color: ${
|
|
2207
|
-
background-color: ${
|
|
2400
|
+
color: ${Le("color-selected")};
|
|
2401
|
+
background-color: ${Le("background-color-selected")};
|
|
2208
2402
|
}
|
|
2209
|
-
`,
|
|
2403
|
+
`,Sf=g.div`
|
|
2210
2404
|
width: 100%;
|
|
2211
2405
|
display: flex;
|
|
2212
2406
|
align-items: center;
|
|
2213
2407
|
justify-content: flex-start;
|
|
2214
|
-
gap: ${
|
|
2215
|
-
`,
|
|
2408
|
+
gap: ${Le("column-gap")};
|
|
2409
|
+
`,jf=g.div`
|
|
2216
2410
|
width: 100%;
|
|
2217
2411
|
display: flex;
|
|
2218
2412
|
align-items: center;
|
|
2219
2413
|
justify-content: flex-start;
|
|
2220
2414
|
&.hasIcon {
|
|
2221
|
-
padding-left: ${
|
|
2415
|
+
padding-left: ${Le("subtext-padding-with-icon")};
|
|
2222
2416
|
}
|
|
2223
|
-
`,
|
|
2417
|
+
`,If=g.div`
|
|
2224
2418
|
display: flex;
|
|
2225
2419
|
align-items: center;
|
|
2226
2420
|
justify-content: flex-end;
|
|
2227
2421
|
margin-left: auto;
|
|
2228
|
-
gap: ${
|
|
2229
|
-
`,
|
|
2422
|
+
gap: ${Le("column-gap")};
|
|
2423
|
+
`,_f=g(E)`
|
|
2230
2424
|
-webkit-box-orient: vertical;
|
|
2231
2425
|
-webkit-line-clamp: 2;
|
|
2232
2426
|
display: -webkit-box;
|
|
2233
2427
|
overflow-wrap: anywhere;
|
|
2234
2428
|
overflow: hidden;
|
|
2235
2429
|
text-overflow: ellipsis;
|
|
2236
|
-
`,
|
|
2430
|
+
`,Df=g.div`
|
|
2237
2431
|
display: flex;
|
|
2238
2432
|
padding: ${c("spacing-8")} ${c("spacing-10")};
|
|
2239
2433
|
align-items: center;
|
|
@@ -2246,11 +2440,11 @@
|
|
|
2246
2440
|
color: ${c("color-white")};
|
|
2247
2441
|
background-color: ${c("color-primary")};
|
|
2248
2442
|
}
|
|
2249
|
-
`,
|
|
2443
|
+
`,Tf=e=>{const{selected:t,toggleSelection:o}=Ge(),n=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsx(M.ClassNames,{children:({cx:r})=>i.jsxs(Df,{className:r({isSelected:t.includes(e.id)}),onClick:n,children:[e.iconId&&i.jsx(F,{size:"sm",iconId:e.iconId}),i.jsx(E,{variant:"body",children:e.name})]})})},Ef=e=>{const[t,o]=d.useState(e);return{onGroupOpen:d.useCallback(async(r,s)=>{o((l=[])=>s==="opened"&&!(l!=null&&l.includes(r))?[...l,r]:s==="closed"&&l.includes(r)?l.filter(a=>a!==r):l)},[]),openedGroups:t}},Mf=(e,t={})=>{const[o,n]=d.useState(t),r=d.useCallback((l,a)=>{var f;const u=(f=e==null?void 0:e.items.find(m=>m.id===l))==null?void 0:f.group.groupId;if(!u)return;const h=o[u]||[],p=a==="selected"?{...o,[u]:[...h,l]}:{...o,[u]:h.filter(m=>m!==l)};n(p)},[e==null?void 0:e.items,o]);return{clear:d.useCallback(()=>{n({})},[]),groupSelection:o,onSelect:r}},zf=(e=[],t=!0)=>{const[o,n]=d.useState(e),r=d.useCallback(l=>{n(a=>t?[l]:a.includes(l)?a.filter(u=>u!==l):[...a,l])},[t]);return{clear:d.useCallback(()=>{n([])},[]),onSelect:r,selected:o}};class Of extends An{constructor(o,n,r,s,l){super(o,n,r,l);T(this,"parentIdKey");T(this,"idKey");this.parentIdKey=s.parentIdKey,this.idKey=s.idKey,D.makeObservable(this,{tree:D.computed,childBranchLookup:D.computed,itemsById:D.computed})}sortBranch(o,n){return o.name.localeCompare(n.name)}get itemsById(){return this.items.reduce((o,n)=>({...o,[n[this.idKey]]:n}),{})}get childBranchLookup(){return this.items.reduce((o,n)=>{let r=n[this.parentIdKey];return(!r||this.itemsById[r]===void 0)&&(r="ROOT"),r&&o[r]?(o[r].push(n),o):(o[r]=[n],o)},{ROOT:[]})}get tree(){const o=r=>{const s=[];for(const l in r){let a={...r[l],branches:[]};const u=this.childBranchLookup[a[this.idKey]];a&&(u&&(a={...a,branches:o(u)}),s.push(a))}return s},n=this.childBranchLookup.ROOT;return n?o(n):[]}}const gi=d.createContext(null),Rf=W.kosComponent(({children:e,singleBranchOnly:t,openedBranches:o,setOpenedBranches:n,dataProvider:r})=>{const[s,l]=d.useState([]),a=o??s,u=n??l,h=d.useRef(a);d.useLayoutEffect(()=>{h.current=a},[a]);const p=d.useCallback(m=>{if(!(r!=null&&r.tree))return;const x=m[r.idKey],b=h.current.includes(x),y=v=>v.branches.flatMap($=>{const C=$[r.idKey];return $.branches.length?[C,...y($)]:[]}),w=y(m);if(t){const v=[],$=C=>{const S=C[r.parentIdKey];if(S){const k=r.itemsById[S];k&&(v.push(S),$(k))}};$(m),u(b?v:[...v,x])}else{const v=b?h.current.filter($=>x!==$&&!w.includes($)):[...h.current,x];u(v)}},[r==null?void 0:r.idKey,r==null?void 0:r.itemsById,r==null?void 0:r.parentIdKey,r==null?void 0:r.tree,u,t]),f=d.useMemo(()=>({openedBranches:a,toggleBranch:p}),[a,p]);return i.jsx(gi.Provider,{value:f,children:e})}),mi=()=>{const e=d.useContext(gi);if(e===null)throw new Error("TreeContext can only be used inside children of TreeContextProvider");return e};function bi(e){return e.build!==void 0}const Nf=e=>(t,o,n)=>{const r=(s,l)=>{if(!s.branches.length&&s.isGroup)return null;if(s.branches.length){const a=bi(e)?e.build(s):e,u=s.branches.map(h=>{if(h.branches.length)return r(h,!0);{const p=Gt(o)?o.build(h):o;return i.jsx(p,{"data-key":h.id,...h,onListItemAction:n},h.id)}});return i.jsx(M.ClassNames,{children:({cx:h})=>i.jsx(a,{className:h({isNotRoot:l},s.className),...s,children:u},s.id)},s.id)}else{const a=Gt(o)?o.build(s):o;return i.jsx(a,{"data-key":s.id,...s,onListItemAction:n},s.id)}};return t.tree.map(s=>r(s))},Ff=W.kosComponent(({dataProvider:e,ItemTemplate:t,onSelect:o,BranchTemplate:n,openedBranches:r,setOpenedBranches:s,singleBranchOnly:l,className:a,autoSelectFirstItem:u,selected:h,emptyState:p,getFirstItem:f,onListItemAction:m})=>i.jsx(Rf,{dataProvider:e,openedBranches:r,setOpenedBranches:s,singleBranchOnly:l,children:i.jsx(ko,{onSelect:o,dataProvider:e,ItemTemplate:t,autoSelectFirstItem:u,emptyState:p,className:a,selected:h,onListItemAction:m,getFirstItem:f,itemListRenderer:Nf(n)})}));function Af(e){return(e==null?void 0:e.build)!==void 0}const xi=d.createContext(null),Lf=()=>{const e=d.useContext(xi);if(e===null)throw new Error("useAsyncTreeContext can only be used inside AsyncTreeList");return e},yi=W.kosComponent(({branch:e,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:l,onBranchSelect:a,selectedBranchId:u,branchEmptyState:h=i.jsx("div",{style:{paddingLeft:"32px",color:"#999"},children:"No items"}),depth:p=0,nodeIconMap:f,nodeActions:m,nodeDecorators:x,expandedMode:b=!1,indentSize:y,isNodeSelectable:w,branchContentRenderer:v,itemContentRenderer:$,disableSelectionStyling:C=!1})=>{const S=Lf();d.useEffect(()=>{const G=S.openedBranches.includes(e.id),ee=e.loadingState.status==="idle",Ye=!e.isLeaf;if(G&&ee&&Ye){const Ne=t.originalItems.get(e.id);Ne&&t.expandBranch(e.id,Ne)}},[S.openedBranches,e.id,e.loadingState.status,e.isLeaf,t]);const k=d.useMemo(()=>{if(!f)return;if(typeof f=="function")return f(e);const G=e.type;return G?f[G]:void 0},[f,e]),I=d.useMemo(()=>{if(!(m!=null&&m.length))return;const G=t.originalItems.get(e.id);if(G)return m.filter(ee=>!ee.visibleFor||ee.visibleFor(e)).map(ee=>({id:ee.id,iconId:ee.iconId,color:ee.color,tooltip:ee.tooltip,label:ee.label,isPrimary:ee.isPrimary,onClick:()=>ee.onClick(e.id,G)}))},[m,e,t]),j=(()=>{if(x!=null&&x.length)return x.filter(G=>!G.visibleFor||G.visibleFor(e)).map(G=>({id:G.id,iconId:G.iconId,color:G.color,tooltip:G.tooltip}))})(),_=async()=>{if(S.openedBranches.includes(e.id))s==null||s(e.id);else if(e.loadingState.status==="idle"){const ee=t.originalItems.get(e.id);ee&&(await(r==null?void 0:r(e.id,ee)),await t.expandBranch(e.id,ee))}S.toggleBranch(e.id)},B=()=>{const G=t.originalItems.get(e.id);G&&(a==null||a(e.id,G))},U=Ge();if(e.isLeaf){const G=Af(n)?n.build(e):n,ee=U.selected.includes(e.id),Ye=$?$(e,ee):void 0,Ne=Ut(e);return i.jsx(G,{"data-key":e.id,...e,...Ne!==void 0?{[Vt]:Ne}:{},onListItemAction:l,"data-depth":p,"data-indent-size":y,"data-disable-selection-styling":C,iconId:k==null?void 0:k.iconId,iconColor:k==null?void 0:k.color,actions:I,decorators:j,children:Ye},e.id)}const P=bi(o)?o.build(e):o,L=b||S.openedBranches.includes(e.id),Z=e.loadingState.status==="loading",se=e.loadingState.status==="error",J=e.loadingState.status==="loaded",X=u===e.id,$e=L?e.branches.length>0?e.branches.map(G=>i.jsx(yi,{branch:G,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:l,onBranchSelect:a,selectedBranchId:u,branchEmptyState:h,depth:p+1,nodeIconMap:f,nodeActions:m,nodeDecorators:x,expandedMode:b,indentSize:y,isNodeSelectable:w,branchContentRenderer:v,itemContentRenderer:$,disableSelectionStyling:C},G.id)):J&&h?[h]:[]:[],ae=v?v(e,X):void 0,ue=w?w(e):!0,Q=Ut(e);return i.jsx(wt.Observer,{children:()=>i.jsx(P,{className:e.className,...e,...Q!==void 0?{[Vt]:Q}:{},onClick:b?B:_,onSelect:B,"data-loading":Z,"data-error":se,"data-open":L,"data-selected":X,"data-expanded-mode":b,"data-depth":p,"data-indent-size":y,"data-selectable":ue,"data-disable-selection-styling":C,iconId:k==null?void 0:k.iconId,iconColor:k==null?void 0:k.color,actions:I,decorators:j,content:ae,children:$e})})}),vi=W.kosComponent(({dataProvider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:l,selectedBranchId:a,emptyState:u,branchEmptyState:h,className:p,singleBranchOnly:f,openedBranches:m,setOpenedBranches:x,nodeIconMap:b,nodeActions:y,nodeDecorators:w,expandedMode:v=!1,indentSize:$,isNodeSelectable:C,branchContentRenderer:S,itemContentRenderer:k,disableSelectionStyling:I=!1})=>{const[j,_]=d.useState(!1),[B,U]=d.useState([]),P=m??B,L=x??U;d.useEffect(()=>e?((async()=>{await e.init(),_(!0)})(),()=>{e.dispose()}):void 0,[e]),d.useEffect(()=>{var X;!v||!j||!e||(X=e.expandAll)==null||X.call(e)},[v,j,e]);const Z=d.useCallback(X=>{const $e=P.includes(X);L(f?$e?[]:[X]:$e?P.filter(ae=>ae!==X):[...P,X])},[P,L,f]),se=d.useMemo(()=>({openedBranches:P,toggleBranch:Z}),[P,Z]);if(!j||!e)return u||null;const J=m&&m.length>0&&e.tree.some(X=>m.includes(X.id)&&!X.isLeaf&&X.loadingState.status!=="loaded");return i.jsx(xi.Provider,{value:se,children:i.jsx(wt.Observer,{children:()=>i.jsxs("div",{className:p,style:J?{visibility:"hidden"}:void 0,children:[e.tree.length===0&&u,e.tree.map(X=>i.jsx(yi,{branch:X,provider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:l,selectedBranchId:a,branchEmptyState:h,nodeIconMap:b,nodeActions:y,nodeDecorators:w,expandedMode:v,indentSize:$,isNodeSelectable:C,branchContentRenderer:S,itemContentRenderer:k,disableSelectionStyling:I},X.id))]})})})}),Bf=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,...l})=>{const[a,u]=d.useState(o??[]),h=d.useRef(a??[]);d.useLayoutEffect(()=>{h.current=a},[a]),d.useEffect(()=>{u(o??[])},[o]);const p=d.useCallback(x=>{t(x,h.current.includes(x)?"unselected":"selected"),u(b=>e?[x]:b.includes(x)?b.filter(y=>y!==x):[...b,x])},[e,t]),f=d.useCallback(x=>h.current.includes(x),[]),m=d.useMemo(()=>({isSelected:f,selected:a,toggleSelection:p,isDisabled:!!n}),[f,a,p,n]);return d.useEffect(()=>{var x;if(r&&(s!=null&&s.rootItems)&&h.current.length===0){const b=(x=s.rootItems[0])==null?void 0:x.id;b&&p(b)}},[r,s==null?void 0:s.rootItems,p]),i.jsx(Dt.Provider,{value:m,children:i.jsx(vi,{dataProvider:s,...l})})}),Wf=({children:e,id:t,className:o})=>i.jsx(M.ClassNames,{children:({cx:n})=>i.jsx(Pf,{className:n("anonymous-branch",o),children:e},t)}),Pf=g.div`
|
|
2250
2444
|
display: flex;
|
|
2251
2445
|
flex-direction: column;
|
|
2252
2446
|
width: 100%;
|
|
2253
|
-
`,[
|
|
2447
|
+
`,[Ee]=z(["named-collapsible-branch"]),Hf=20,Vf=W.kosComponent(({children:e,className:t,onClick:o,onSelect:n,"data-loading":r,"data-open":s,"data-expanded-mode":l,"data-depth":a=0,"data-indent-size":u=Hf,"data-selectable":h=!0,"data-disable-selection-styling":p=!1,iconId:f,iconColor:m,actions:x,decorators:b,content:y,...w})=>{const{isSelected:v,toggleSelection:$,selected:C}=Ge(),S=h&&C.includes(w.id),k=B=>{B.stopPropagation(),o==null||o()},I=()=>{h?($(w.id),n==null||n()):o==null||o()},j=typeof u=="string"?Number(u):u,_=a>0?{marginLeft:`${a*j}px`}:void 0;return i.jsxs(Yf,{className:t,isOpen:s,style:_,children:[i.jsxs(qf,{"data-loading":r,"data-selected":S,onClick:I,$isSelected:S,$disableSelectionStyling:p,children:[!l&&i.jsx(Uf,{onClick:k,type:"button",children:i.jsx(Gf,{iconId:"CaretRight",size:"xxsm",$isOpen:s})}),f&&i.jsx(F,{size:"sm",iconId:f,color:m}),i.jsxs(Kf,{children:[y||i.jsx(E,{variant:"body",bold:!0,children:w.name}),r&&i.jsx(E,{variant:"body",children:"(Loading...)"})]}),b&&b.length>0&&i.jsx(Jf,{children:b.map(B=>i.jsx(Qf,{size:"sm",iconId:B.iconId,color:S&&!p?"white":B.color,title:B.tooltip},B.id))}),x&&x.length>0&&i.jsx(vo,{actions:x,isSelected:S,disableSelectionStyling:p})]}),i.jsx(Zf,{className:"inner-container",children:i.jsx(Xf,{className:"list-container",children:e})})]},w.id)}),Uf=g.button`
|
|
2254
2448
|
background: none;
|
|
2255
2449
|
border: none;
|
|
2256
2450
|
padding: 0;
|
|
@@ -2269,89 +2463,63 @@
|
|
|
2269
2463
|
&:active {
|
|
2270
2464
|
opacity: 0.5;
|
|
2271
2465
|
}
|
|
2272
|
-
`,
|
|
2466
|
+
`,Gf=g(F)`
|
|
2273
2467
|
transition: transform 0.2s ease-in-out;
|
|
2274
2468
|
transform: ${({$isOpen:e})=>e?"rotate(90deg)":"rotate(0deg)"};
|
|
2275
|
-
`,
|
|
2469
|
+
`,Kf=g.div`
|
|
2276
2470
|
display: flex;
|
|
2277
2471
|
align-items: center;
|
|
2278
|
-
gap: ${
|
|
2472
|
+
gap: ${Ee("column-gap")};
|
|
2279
2473
|
flex: 1;
|
|
2280
|
-
`,
|
|
2474
|
+
`,Yf=g.div`
|
|
2281
2475
|
display: flex;
|
|
2282
2476
|
flex-direction: column;
|
|
2283
|
-
${({isOpen:e})=>e?`gap: ${
|
|
2284
|
-
`,
|
|
2477
|
+
${({isOpen:e})=>e?`gap: ${Ee("padding-y")}`:""}
|
|
2478
|
+
`,qf=g.div`
|
|
2285
2479
|
align-items: center;
|
|
2286
|
-
gap: ${
|
|
2480
|
+
gap: ${Ee("column-gap")};
|
|
2287
2481
|
display: flex;
|
|
2288
2482
|
flex: 0;
|
|
2289
2483
|
min-height: 22px;
|
|
2290
|
-
padding-left: ${
|
|
2291
|
-
padding-top: ${
|
|
2292
|
-
padding-bottom: ${
|
|
2293
|
-
padding-right: ${
|
|
2484
|
+
padding-left: ${Ee("padding-left")};
|
|
2485
|
+
padding-top: ${Ee("padding-y")};
|
|
2486
|
+
padding-bottom: ${Ee("padding-y")};
|
|
2487
|
+
padding-right: ${Ee("padding-right")};
|
|
2294
2488
|
|
|
2295
2489
|
cursor: pointer;
|
|
2296
|
-
color: ${({$isSelected:e})=>e?
|
|
2297
|
-
background-color: ${({$isSelected:e})=>e?
|
|
2490
|
+
color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?Ee("color-selected"):"inherit"};
|
|
2491
|
+
background-color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?Ee("background-color-selected"):"transparent"};
|
|
2298
2492
|
transition: background-color 0.15s ease;
|
|
2299
2493
|
|
|
2300
2494
|
&:hover {
|
|
2301
|
-
background-color: ${({$isSelected:e})=>e?
|
|
2495
|
+
background-color: ${({$isSelected:e,$disableSelectionStyling:t})=>t?"rgba(0, 0, 0, 0.05)":e?Ee("background-color-selected"):"rgba(0, 0, 0, 0.05)"};
|
|
2302
2496
|
}
|
|
2303
2497
|
|
|
2304
2498
|
&:active {
|
|
2305
|
-
background-color: ${
|
|
2499
|
+
background-color: ${({$disableSelectionStyling:e})=>e?"rgba(0, 0, 0, 0.1)":Ee("background-color-selected")};
|
|
2306
2500
|
}
|
|
2307
|
-
`,
|
|
2501
|
+
`,Zf=g.div`
|
|
2308
2502
|
display: flex;
|
|
2309
2503
|
flex-direction: column;
|
|
2310
|
-
`,
|
|
2504
|
+
`,Xf=g.div`
|
|
2311
2505
|
display: flex;
|
|
2312
2506
|
flex-direction: column;
|
|
2313
2507
|
row-gap: 4px;
|
|
2314
|
-
`,
|
|
2508
|
+
`,Jf=g.div`
|
|
2315
2509
|
display: flex;
|
|
2316
2510
|
align-items: center;
|
|
2317
2511
|
gap: 4px;
|
|
2318
2512
|
padding-left: 8px;
|
|
2319
|
-
`,
|
|
2513
|
+
`,Qf=g(F)`
|
|
2320
2514
|
opacity: 0.8;
|
|
2321
|
-
`,
|
|
2322
|
-
display: flex;
|
|
2323
|
-
align-items: center;
|
|
2324
|
-
gap: 4px;
|
|
2325
|
-
margin-left: auto;
|
|
2326
|
-
padding-left: 8px;
|
|
2327
|
-
`,Wp=g.button`
|
|
2328
|
-
background: none;
|
|
2329
|
-
border: none;
|
|
2330
|
-
padding: 4px;
|
|
2331
|
-
margin: 0;
|
|
2332
|
-
cursor: pointer;
|
|
2333
|
-
display: flex;
|
|
2334
|
-
align-items: center;
|
|
2335
|
-
justify-content: center;
|
|
2336
|
-
color: inherit;
|
|
2337
|
-
opacity: 0.7;
|
|
2338
|
-
transition: opacity 0.15s ease;
|
|
2339
|
-
|
|
2340
|
-
&:hover {
|
|
2341
|
-
opacity: 1;
|
|
2342
|
-
}
|
|
2343
|
-
|
|
2344
|
-
&:active {
|
|
2345
|
-
opacity: 0.5;
|
|
2346
|
-
}
|
|
2347
|
-
`,Bp=L.kosComponent(({children:e,className:t,...o})=>{const{openedBranches:n,toggleBranch:r}=Ns(),s=n.includes(o.id),a=d.useCallback(()=>{r(o)},[o,r]);return i.jsxs(Pp,{className:t,children:[i.jsxs(Hp,{"data-open":s,onClick:a,children:[s?i.jsx(_,{iconId:"CaretDown",size:"xxsm"}):i.jsx(_,{iconId:"CaretRight",size:"xxsm"}),i.jsx(E,{variant:"body",bold:!0,children:o.name})]}),i.jsx(Vp,{className:"inner-container",children:s?i.jsx(Gp,{className:"list-container",children:e}):null})]},o.id)}),Pp=g.div`
|
|
2515
|
+
`,eg=W.kosComponent(({children:e,className:t,...o})=>{const{openedBranches:n,toggleBranch:r}=mi(),s=n.includes(o.id),l=d.useCallback(()=>{r(o)},[o,r]);return i.jsxs(tg,{className:t,children:[i.jsxs(og,{"data-open":s,onClick:l,children:[s?i.jsx(F,{iconId:"CaretDown",size:"xxsm"}):i.jsx(F,{iconId:"CaretRight",size:"xxsm"}),i.jsx(E,{variant:"body",bold:!0,children:o.name})]}),i.jsx(ng,{className:"inner-container",children:s?i.jsx(rg,{className:"list-container",children:e}):null})]},o.id)}),tg=g.div`
|
|
2348
2516
|
display: flex;
|
|
2349
2517
|
flex-direction: column;
|
|
2350
2518
|
|
|
2351
2519
|
&.isNotRoot {
|
|
2352
2520
|
padding-left: 12px;
|
|
2353
2521
|
}
|
|
2354
|
-
`,
|
|
2522
|
+
`,og=g.div`
|
|
2355
2523
|
align-items: center;
|
|
2356
2524
|
column-gap: 4px;
|
|
2357
2525
|
cursor: pointer;
|
|
@@ -2359,90 +2527,90 @@
|
|
|
2359
2527
|
flex: 0;
|
|
2360
2528
|
min-height: 22px;
|
|
2361
2529
|
padding-right: 12px;
|
|
2362
|
-
`,
|
|
2530
|
+
`,ng=g.div`
|
|
2363
2531
|
display: flex;
|
|
2364
2532
|
flex-direction: column;
|
|
2365
|
-
`,
|
|
2533
|
+
`,rg=g.div`
|
|
2366
2534
|
display: flex;
|
|
2367
2535
|
flex-direction: column;
|
|
2368
2536
|
row-gap: 4px;
|
|
2369
|
-
`,
|
|
2537
|
+
`,ki=d.memo(({autoScrollToBottom:e=!1,className:t,itemCount:o,itemHeight:n,onBottom:r,overscanAmount:s,renderRow:l})=>{const[a,u]=d.useState(0),[h,p]=d.useState(0),f=d.useRef(null),m=d.useRef(null),x=o*n,b=Math.ceil(h/n),y=Math.max(Math.floor(a/n-(s??0)),0),w=Math.min(o-1,y+b+(s??0)),v=C=>{u(C.currentTarget.scrollTop)};d.useLayoutEffect(()=>{const C=()=>{f.current&&p(f.current.clientHeight)};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]),d.useEffect(()=>{e&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[o,e]);const $=[];for(let C=y;C<=w;C++)$.push(l(C,{top:C*n,height:n,position:"absolute",width:"100%"}));return d.useEffect(()=>{const C=()=>{const k=m.current;if(!k)return;const I=k.scrollHeight-k.scrollTop<=k.clientHeight+n;!e&&I&&(r==null||r())},S=m.current;return S&&S.addEventListener("scroll",C),()=>{S&&S.removeEventListener("scroll",C)}},[e,n,r]),i.jsx(sg,{ref:f,children:i.jsx(ig,{ref:m,style:{height:h},onScroll:v,className:t,children:i.jsx(ag,{style:{height:x},children:$})})})}),sg=g.div`
|
|
2370
2538
|
height: 100%;
|
|
2371
2539
|
width: 100%;
|
|
2372
2540
|
overflow-y: hidden;
|
|
2373
2541
|
position: relative;
|
|
2374
|
-
`,
|
|
2542
|
+
`,ig=g.div`
|
|
2375
2543
|
overflow-y: auto;
|
|
2376
2544
|
width: 100%;
|
|
2377
2545
|
position: relative;
|
|
2378
|
-
`,
|
|
2546
|
+
`,ag=g.div`
|
|
2379
2547
|
position: relative;
|
|
2380
2548
|
width: 100%;
|
|
2381
|
-
`,
|
|
2549
|
+
`,wi=W.kosComponent(({dataProvider:e,ItemTemplate:t,onListItemAction:o,onInit:n,emptyState:r,...s})=>{const l=qt(e,n),a=d.useCallback((u,h)=>{const p=e==null?void 0:e.items.find((f,m)=>m===u);if(p){const f=Gt(t)?t.build(p):t;return i.jsx(f,{"data-key":p.id,style:h,...p,onListItemAction:o},p.id)}return null},[t,e==null?void 0:e.items,o]);return i.jsx(Fn,{dataProvider:e||void 0,onListItemAction:o,children:l?(e==null?void 0:e.items.length)===0&&r?r:i.jsx(ki,{itemCount:(e==null?void 0:e.items.length)??0,renderRow:a,...s}):null})}),lg=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:l,...a})=>{const[u,h]=d.useState(o??[]),p=d.useRef(u??[]);d.useLayoutEffect(()=>{p.current=u},[u]),d.useEffect(()=>{h(o??[])},[o]);const f=d.useCallback(b=>{t(b,p.current.includes(b)?"unselected":"selected"),h(y=>e?[b]:y.includes(b)?y.filter(w=>w!==b):[...y,b])},[e,t]),m=d.useCallback(b=>p.current.includes(b),[]),x=d.useMemo(()=>({isSelected:m,selected:u,toggleSelection:f,isDisabled:!!n}),[m,u,f,n]);return d.useEffect(()=>{var b,y;if(r&&(s!=null&&s.items)&&p.current.length===0){let w;l?w=(b=l(s.items))==null?void 0:b.id:w=(y=s.items[0])==null?void 0:y.id,w&&f(w)}},[r,s==null?void 0:s.items,l,f]),i.jsx(Dt.Provider,{value:x,children:i.jsx(wi,{dataProvider:s,...a})})}),[ke]=z(["modal"]),Ci=g.div`
|
|
2382
2550
|
width: fit-content;
|
|
2383
2551
|
height: fit-content;
|
|
2384
2552
|
display: flex;
|
|
2385
2553
|
align-items: flex-start;
|
|
2386
2554
|
justify-content: flex-start;
|
|
2387
2555
|
flex-direction: column;
|
|
2388
|
-
background-color: ${
|
|
2389
|
-
|
|
2390
|
-
padding: ${
|
|
2391
|
-
column-gap: ${
|
|
2556
|
+
background-color: ${ke("background-color")};
|
|
2557
|
+
`,$i=g.div`
|
|
2558
|
+
padding: ${ke("headerPadding")};
|
|
2559
|
+
column-gap: ${ke("headerGap")};
|
|
2392
2560
|
width: 100%;
|
|
2393
2561
|
display: flex;
|
|
2394
2562
|
align-items: center;
|
|
2395
2563
|
justify-content: flex-start;
|
|
2396
|
-
border-bottom: ${
|
|
2397
|
-
`,
|
|
2398
|
-
padding: ${
|
|
2564
|
+
border-bottom: ${ke("border-width")} solid ${ke("border-color")};
|
|
2565
|
+
`,Si=g.div`
|
|
2566
|
+
padding: ${ke("contentYPadding")} ${ke("contentXPadding")};
|
|
2399
2567
|
width: fit-content;
|
|
2400
|
-
`,
|
|
2401
|
-
padding: ${
|
|
2402
|
-
border-top: ${
|
|
2568
|
+
`,Hn=g.div`
|
|
2569
|
+
padding: ${ke("footerYPadding")} ${ke("footerXPadding")};
|
|
2570
|
+
border-top: ${ke("border-width")} solid ${ke("border-color")};
|
|
2403
2571
|
width: 100%;
|
|
2404
2572
|
display: flex;
|
|
2405
2573
|
align-items: center;
|
|
2406
2574
|
justify-content: flex-end;
|
|
2407
|
-
`,
|
|
2408
|
-
width: ${
|
|
2575
|
+
`,cg=g.div`
|
|
2576
|
+
width: ${ke("base-content-width")};
|
|
2409
2577
|
display: flex;
|
|
2410
2578
|
align-items: flex-start;
|
|
2411
2579
|
justify-content: flex-start;
|
|
2412
2580
|
flex-direction: column;
|
|
2413
|
-
|
|
2414
|
-
column-gap: ${
|
|
2415
|
-
`,
|
|
2581
|
+
`,$o=d.forwardRef(({header:e,footer:t,content:o,footerWrapper:n,headerWrapper:r,contentWrapper:s},l)=>{const a=r??$i,u=s??Si,h=n??Hn;return i.jsxs(Ci,{ref:l,children:[i.jsx(a,{children:e}),i.jsx(u,{children:o}),i.jsx(h,{children:t})]})}),dg=d.forwardRef(({level:e,headerText:t,content:o,acceptButtonVariant:n,acceptButtonText:r,onAccept:s},l)=>{const a=d.useMemo(()=>{if(e==="error")return{iconId:"ExclamationCircle",color:"red"};if(e==="warn")return{iconId:"Warning",color:"orange"};if(e==="success")return{iconId:"CheckCircle",color:"green"};if(e==="info")return{iconId:"InfoCircle",color:"blue"}},[e]),{setOpen:u}=ot(),h=d.useCallback(()=>{s&&s(),u(!1)},[u,s]);return i.jsx($o,{ref:l,header:i.jsxs(i.Fragment,{children:[!!a&&i.jsx(F,{iconId:a.iconId,color:a.color}),i.jsx(E,{variant:"h2",color:"dark",children:t})]}),content:o,footer:i.jsx(Pe,{onClick:h,variant:n??"primary",text:r??"Okay"})})}),[ug]=z(["modal"]),hg=d.forwardRef(({onConfirm:e,onCancel:t,headerText:o,confirmText:n,cancelText:r,content:s,confirmButtonVariant:l,cancelButtonVariant:a,confirmDisabled:u,headerIcon:h,headerIconColor:p,contentWrapper:f,cancelDisabled:m},x)=>{const{setOpen:b}=ot(),y=d.useCallback(()=>{e(()=>b(!1))},[e,b]),w=d.useCallback(()=>{t&&t(),b(!1)},[t,b]);return i.jsx($o,{ref:x,header:i.jsxs(i.Fragment,{children:[!!h&&i.jsx(F,{iconId:h,color:p??"black"}),i.jsx(E,{variant:"h2",color:"dark",children:o})]}),contentWrapper:f,content:s,footerWrapper:pg,footer:i.jsxs(i.Fragment,{children:[i.jsx(Pe,{text:r??"Cancel",onClick:w,disabled:m,variant:a??"borderless"}),i.jsx(Pe,{onClick:y,variant:l??"primary",text:n??"Confirm",disabled:u})]})})}),pg=g(Hn)`
|
|
2582
|
+
column-gap: ${ug("footerGap")};
|
|
2583
|
+
`,fg=d.memo(({headerText:e})=>i.jsxs(i.Fragment,{children:[i.jsx(F,{iconId:"ExclamationCircle",color:"red",size:"lrg"}),i.jsx(E,{variant:"h2",color:"dark",children:e})]})),gg=d.memo(({contentText:e,compareText:t,errorText:o})=>{const n=d.useCallback(s=>s.message&&s.message!==""?s.message:o??"That does not match.",[o]),r=d.useCallback(s=>s===t,[t]);return i.jsxs(mg,{children:[i.jsx(E,{variant:"body",color:"dark",children:e}),i.jsx(En,{name:"matchText",handleError:n,validate:r})]})}),mg=g.div`
|
|
2416
2584
|
width: 288px;
|
|
2417
2585
|
display: flex;
|
|
2418
2586
|
align-items: flex-start;
|
|
2419
2587
|
justify-content: flex-start;
|
|
2420
2588
|
flex-direction: column;
|
|
2421
2589
|
row-gap: 8px;
|
|
2422
|
-
`,
|
|
2590
|
+
`,bg=d.memo(({onSubmit:e})=>{const{setOpen:t}=ot(),o=d.useCallback(()=>{t(!1)},[t]);return i.jsxs(i.Fragment,{children:[i.jsx(Pe,{type:"button",text:"Cancel",onClick:o,variant:"borderless"}),i.jsx(Tn,{onSubmit:e,variant:"primary",text:"Delete"})]})}),xg={matchText:""},yg=d.forwardRef(({compareText:e,headerText:t,contentText:o,errorText:n,onConfirm:r},s)=>{const{setOpen:l}=ot(),a=d.useCallback((u,h)=>{r(u,()=>l(!1),h)},[r,l]);return i.jsx(vg,{onSubmit:a,mode:"onChange",delayError:400,defaultValues:xg,children:i.jsx($o,{ref:s,header:i.jsx(fg,{headerText:t}),content:i.jsx(gg,{compareText:e,contentText:o,errorText:n}),footer:i.jsx(bg,{onSubmit:a})})})}),vg=g(Xs)`
|
|
2423
2591
|
height: fit-content;
|
|
2424
2592
|
width: fit-content;
|
|
2425
|
-
`,
|
|
2426
|
-
background: ${
|
|
2593
|
+
`,kg=({className:e,defaultValues:t,header:o,submitText:n,cancelText:r,onCancel:s,enabledIfClean:l,onSubmit:a,content:u,submitButtonVariant:h,cancelButtonVariant:p,variant:f="submit",ContentWrapper:m,disabled:x,...b},y)=>{const w=q.useForm({shouldUnregister:!0,defaultValues:t,disabled:x,...b,mode:f==="blur"?"onBlur":b.mode}),{setOpen:v}=ot(),{setError:$,reset:C}=w,S=d.useCallback(_=>{a({data:_,closeModal:()=>v(!1),setError:$,resetForm:C})},[a,C,$,v]),k=d.useCallback(()=>{s==null||s(C),v(!1)},[s,C,v]),I=d.useCallback(_=>S(_),[S]),j=m??Si;return i.jsx(q.FormProvider,{...w,children:i.jsxs(Ci,{ref:y,as:"form",className:e,onSubmit:f==="blur"?void 0:w.handleSubmit(S),onBlur:f==="blur"?w.handleSubmit(S):void 0,children:[i.jsx($i,{children:o}),i.jsx(j,{children:u}),i.jsxs(Hn,{children:[i.jsx(Pe,{text:r??"Cancel",onClick:k,type:"button",variant:p??"borderless"}),f!=="blur"&&i.jsx(Tn,{onSubmit:I,variant:h??"primary",text:n??"Submit",enabledIfClean:l,disabled:x})]})]})})},wg=$t(kg),[Cg]=z(["modal"]),$g={escapeKey:!0,outsidePress:!1,bubbles:!1};function Sg(e){const{type:t,open:o,defaultOpen:n,onOpenChange:r,children:s,initialFocus:l,...a}=e,u=t==="confirm"?hg:t==="status"?dg:t==="confirm-delete"?yg:t==="form"?wg:$o;return i.jsxs(fn,{dismissOptions:$g,open:o,defaultOpen:n,onOpenChange:r,children:[i.jsx(mn,{initialFocus:l,OverlayStyles:ji,trapFocus:!0,children:i.jsx(u,{...a})}),!!s&&s]})}const jg=({children:e})=>i.jsx(gn,{children:e}),ji=M.css`
|
|
2594
|
+
background: ${Cg("overlay-background")};
|
|
2427
2595
|
display: grid;
|
|
2428
2596
|
place-items: center;
|
|
2429
2597
|
z-index: 2;
|
|
2430
|
-
`,[
|
|
2598
|
+
`,[ht]=z(["named-section-header"]),Ii=g.div`
|
|
2431
2599
|
align-items: flex-start;
|
|
2432
|
-
background-color: ${
|
|
2433
|
-
border-bottom: ${
|
|
2434
|
-
border-radius: ${
|
|
2600
|
+
background-color: ${ht("bg")};
|
|
2601
|
+
border-bottom: ${ht("border-width")} solid ${ht("border-color")};
|
|
2602
|
+
border-radius: ${ht("border-radius")} ${ht("border-radius")} 0px 0px;
|
|
2435
2603
|
display: flex;
|
|
2436
|
-
padding: ${
|
|
2437
|
-
column-gap: ${
|
|
2604
|
+
padding: ${ht("padding")};
|
|
2605
|
+
column-gap: ${ht("gap")};
|
|
2438
2606
|
&.isCollapsed {
|
|
2439
2607
|
border-bottom-width: 0px;
|
|
2440
2608
|
}
|
|
2441
|
-
`,
|
|
2442
|
-
border-color: ${
|
|
2443
|
-
border-radius: ${
|
|
2609
|
+
`,Ig=d.memo(({children:e})=>{const{setOpen:t,open:o}=Kt(),n=d.useCallback(r=>{r.stopPropagation(),t(!o)},[o,t]);return i.jsxs(Ii,{className:St("header-wrapper",{isCollapsed:o}),children:[i.jsx(ie,{iconId:o?"CaretDown":"CaretUp",onClick:n,size:"xsm",color:"black"}),e]})}),[Ze]=z(["named-section"]),_g=e=>e.variant==="selectable",_i=e=>{const{variant:t,className:o,children:n,header:r,isCollapsible:s}=e,l=d.useRef(null),[a,u,h]=_g(e)?[e.disabled,e.isSelected,e.onClick]:[e.disabled,!1,void 0],p=e.ContentWrapper??Tg,f=d.useCallback(m=>{h&&l.current&&l.current.contains(m.target)&&h()},[h]);return i.jsx(M.ClassNames,{children:({cx:m})=>i.jsx(Dg,{"data-variant":t,className:m(o,{disabled:a,isSelected:u}),onClick:f,ref:l,children:s?i.jsxs(ho,{defaultOpen:!0,children:[i.jsx(Ig,{children:r}),i.jsx(po,{children:i.jsx(p,{children:n})})]}):i.jsxs(i.Fragment,{children:[i.jsx(Ii,{className:"header-wrapper",children:r}),i.jsx(p,{children:n})]})})})},Dg=g.div`
|
|
2610
|
+
border-color: ${Ze("border-color")};
|
|
2611
|
+
border-radius: ${Ze("border-radius")};
|
|
2444
2612
|
border-style: solid;
|
|
2445
|
-
border-width: ${
|
|
2613
|
+
border-width: ${Ze("border-width")};
|
|
2446
2614
|
display: flex;
|
|
2447
2615
|
flex-direction: column;
|
|
2448
2616
|
width: 100%;
|
|
@@ -2452,19 +2620,19 @@
|
|
|
2452
2620
|
}
|
|
2453
2621
|
&[data-variant="selectable"] {
|
|
2454
2622
|
&.isSelected {
|
|
2455
|
-
outline-color: ${
|
|
2456
|
-
outline-width: ${
|
|
2457
|
-
outline-offset: calc(-1.5 * ${
|
|
2623
|
+
outline-color: ${Ze("selected-border-color")};
|
|
2624
|
+
outline-width: ${Ze("selected-border-width")};
|
|
2625
|
+
outline-offset: calc(-1.5 * ${Ze("selected-border-width")});
|
|
2458
2626
|
}
|
|
2459
2627
|
cursor: pointer;
|
|
2460
2628
|
outline-color: transparent;
|
|
2461
|
-
outline-offset: calc(-1.5 * ${
|
|
2629
|
+
outline-offset: calc(-1.5 * ${Ze("hover-border-width")});
|
|
2462
2630
|
outline-style: solid;
|
|
2463
|
-
outline-width: ${
|
|
2631
|
+
outline-width: ${Ze("hover-border-width")};
|
|
2464
2632
|
|
|
2465
2633
|
&:hover {
|
|
2466
2634
|
opacity: 1;
|
|
2467
|
-
outline-color: ${
|
|
2635
|
+
outline-color: ${Ze("selected-border-color")};
|
|
2468
2636
|
}
|
|
2469
2637
|
}
|
|
2470
2638
|
&[data-variant="scrollable"] {
|
|
@@ -2474,101 +2642,67 @@
|
|
|
2474
2642
|
top: 0;
|
|
2475
2643
|
}
|
|
2476
2644
|
}
|
|
2477
|
-
`,
|
|
2645
|
+
`,Tg=g.div`
|
|
2478
2646
|
display: flex;
|
|
2479
2647
|
width: 100%;
|
|
2480
|
-
`,[
|
|
2648
|
+
`,[So]=z(["named-section-header"]),Eg=d.memo(({name:e,description:t,prefix:o,suffix:n,children:r,...s})=>i.jsxs(Mg,{...s,className:t?"hasDesc":void 0,children:[i.jsxs(zg,{children:[i.jsxs(Og,{children:[o,i.jsx(E,{color:"dark",bold:!0,variant:"body",children:e}),n]}),!!t&&i.jsx(E,{color:"grey",variant:"small",children:t})]}),!!r&&i.jsx(Rg,{children:r})]})),Mg=g.div`
|
|
2481
2649
|
width: 100%;
|
|
2482
2650
|
display: flex;
|
|
2483
2651
|
align-items: center;
|
|
2484
|
-
column-gap: ${
|
|
2652
|
+
column-gap: ${So("gap")};
|
|
2485
2653
|
justify-content: space-between;
|
|
2486
2654
|
&.hasDesc {
|
|
2487
2655
|
align-items: flex-start;
|
|
2488
2656
|
}
|
|
2489
|
-
`,
|
|
2657
|
+
`,zg=g.div`
|
|
2490
2658
|
display: flex;
|
|
2491
2659
|
align-items: flex-start;
|
|
2492
2660
|
justify-content: center;
|
|
2493
2661
|
flex-direction: column;
|
|
2494
|
-
row-gap: ${
|
|
2495
|
-
`,
|
|
2662
|
+
row-gap: ${So("row-gap")};
|
|
2663
|
+
`,Og=g.div`
|
|
2496
2664
|
display: flex;
|
|
2497
2665
|
align-items: center;
|
|
2498
2666
|
justify-content: flex-start;
|
|
2499
|
-
column-gap: ${
|
|
2500
|
-
`,
|
|
2667
|
+
column-gap: ${So("row-gap")};
|
|
2668
|
+
`,Rg=g.div`
|
|
2501
2669
|
display: flex;
|
|
2502
2670
|
align-items: center;
|
|
2503
2671
|
justify-content: flex-end;
|
|
2504
|
-
row-gap: ${
|
|
2505
|
-
`,[
|
|
2672
|
+
row-gap: ${So("row-gap")};
|
|
2673
|
+
`,[so]=z(["image-config-page-header"]),Ng=e=>e?Array.isArray(e)?e.map(t=>i.jsx(co,{color:"light",children:t},t)):i.jsx(co,{color:"light",children:e}):null,Fg=({action:e,description:t,title:o,titleTag:n,subTitle:r,...s})=>i.jsxs(Ag,{...s,children:[i.jsxs(Bg,{children:[i.jsxs(Lg,{children:[i.jsx(E,{variant:"h1",children:o}),Ng(n)]}),t&&i.jsx(E,{variant:"body",color:"grey",children:t}),r&&i.jsx(E,{variant:"body",color:"dark",children:r})]}),e]}),Ag=g.div`
|
|
2506
2674
|
align-items: center;
|
|
2507
|
-
background: ${
|
|
2675
|
+
background: ${so("bg")};
|
|
2508
2676
|
display: flex;
|
|
2509
|
-
gap: ${
|
|
2510
|
-
padding: 0 0 ${
|
|
2677
|
+
gap: ${so("gap")};
|
|
2678
|
+
padding: 0 0 ${so("padding-bottom")} 0;
|
|
2511
2679
|
width: 100%;
|
|
2512
|
-
`,
|
|
2680
|
+
`,Lg=g.div`
|
|
2513
2681
|
width: 100%;
|
|
2514
2682
|
display: flex;
|
|
2515
2683
|
align-items: center;
|
|
2516
2684
|
column-gap: ${c("spacing-8")};
|
|
2517
2685
|
justify-content: flex-start;
|
|
2518
|
-
`,
|
|
2686
|
+
`,Bg=g.div`
|
|
2519
2687
|
display: flex;
|
|
2520
2688
|
flex-direction: column;
|
|
2521
2689
|
flex: 1;
|
|
2522
|
-
gap: ${
|
|
2523
|
-
`,
|
|
2524
|
-
appearance: none;
|
|
2525
|
-
-webkit-appearance: none;
|
|
2526
|
-
margin: 0;
|
|
2527
|
-
background-color: ${Se("background-color")};
|
|
2528
|
-
appearance: none;
|
|
2529
|
-
width: ${Se("size")};
|
|
2530
|
-
height: ${Se("size")};
|
|
2531
|
-
border: ${Se("border-width")} solid ${Se("border-color")};
|
|
2532
|
-
border-radius: 50%;
|
|
2533
|
-
display: grid;
|
|
2534
|
-
place-content: center;
|
|
2535
|
-
::before {
|
|
2536
|
-
content: "";
|
|
2537
|
-
width: ${Se("check-size")};
|
|
2538
|
-
height: ${Se("check-size")};
|
|
2539
|
-
border-radius: 50%;
|
|
2540
|
-
transform: scale(0);
|
|
2541
|
-
transition: transform 0.125s ease-in-out;
|
|
2542
|
-
background-color: ${Se("border-color-checked")};
|
|
2543
|
-
}
|
|
2544
|
-
:checked::before {
|
|
2545
|
-
transform: scale(1);
|
|
2546
|
-
}
|
|
2547
|
-
:checked:not(:disabled) {
|
|
2548
|
-
border-color: ${Se("border-color-checked")};
|
|
2549
|
-
}
|
|
2550
|
-
:disabled {
|
|
2551
|
-
cursor: not-allowed;
|
|
2552
|
-
::before {
|
|
2553
|
-
background-color: ${Se("border-color")};
|
|
2554
|
-
}
|
|
2555
|
-
background-color: ${Se("background-color-disabled")};
|
|
2556
|
-
}
|
|
2557
|
-
`;function zh(e){if(e=typeof e=="number"?e:parseInt(e),e===0)return"0.00 B";const t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP".charAt(t)+"B"}const Vo=new IntersectionObserver(([e])=>{const t=e.boundingClientRect.top-e.intersectionRect.top<0,o=e.boundingClientRect.bottom-e.intersectionRect.bottom>0;e.target.classList.toggle("isStuckTop",t),e.target.classList.toggle("isStuckBottom",o)},{threshold:[1]}),Oh=(e,t)=>{if(e==="\\"||e==="/")return"/";if(e.length<=1)return e;const n=e.replace(/\\/g,"/").split(/[/\\]+/);return t!==!1&&n[n.length-1]===""&&n.pop(),n.join("/")},[ae]=O(["select-view-list"]),qs=d.memo(({id:e,name:t,icon:o,onListItemAction:n,isSelectDisabled:r})=>{const{selected:s,viewing:a}=Dh(),l=d.useRef(null),u=d.useRef(null),f=d.useRef(!1),p=s===e,h=a===e;d.useEffect(()=>{u.current&&(p?(Vo.observe(u.current),f.current=!0):f.current&&(f.current=!1,Vo.unobserve(u.current)))},[p]);const m=d.useCallback(()=>{n==null||n(e,"select")},[n,e]),x=d.useCallback(b=>{l.current&&l.current.contains(b.target)||n==null||n(e,"view")},[e,n]);return i.jsx(M.ClassNames,{children:({cx:b})=>i.jsx(Ih,{ref:u,className:b({isSelected:p}),onClick:x,children:i.jsxs(Rh,{className:b({isViewing:h}),children:[i.jsx(Mh,{ref:l,checked:p,disabled:r,onChange:m}),i.jsxs(Nh,{color:"dark",bold:p,variant:"body",children:[t,o]}),i.jsx(_,{iconId:"Right",color:"blue",size:"sm"})]})})})}),Ih=g.div`
|
|
2690
|
+
gap: ${so("title-gap")};
|
|
2691
|
+
`,Di=d.createContext(null),Wg=()=>{const e=d.useContext(Di);if(e===null)throw new Error("Unable to use SelectViewListContext outside of its provider.");return e};function Pg(e){if(e=typeof e=="number"?e:parseInt(e),e===0)return"0.00 B";const t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP".charAt(t)+"B"}const rn=new IntersectionObserver(([e])=>{const t=e.boundingClientRect.top-e.intersectionRect.top<0,o=e.boundingClientRect.bottom-e.intersectionRect.bottom>0;e.target.classList.toggle("isStuckTop",t),e.target.classList.toggle("isStuckBottom",o)},{threshold:[1]}),Hg=(e,t)=>{if(e==="\\"||e==="/")return"/";if(e.length<=1)return e;const n=e.replace(/\\/g,"/").split(/[/\\]+/);return t!==!1&&n[n.length-1]===""&&n.pop(),n.join("/")},[he]=z(["select-view-list"]),Ti=d.memo(({id:e,name:t,icon:o,onListItemAction:n,isSelectDisabled:r})=>{const{selected:s,viewing:l}=Wg(),a=d.useRef(null),u=d.useRef(null),h=d.useRef(!1),p=s===e,f=l===e;d.useEffect(()=>{u.current&&(p?(rn.observe(u.current),h.current=!0):h.current&&(h.current=!1,rn.unobserve(u.current)))},[p]);const m=d.useCallback(()=>{n==null||n(e,"select")},[n,e]),x=d.useCallback(b=>{a.current&&a.current.contains(b.target)||n==null||n(e,"view")},[e,n]);return i.jsx(M.ClassNames,{children:({cx:b})=>i.jsx(Vg,{ref:u,className:b({isSelected:p}),onClick:x,children:i.jsxs(Ug,{className:b({isViewing:f}),children:[i.jsx(Cs,{ref:a,checked:p,disabled:r,onChange:m}),i.jsxs(Gg,{color:"dark",bold:p,variant:"body",children:[t,o]}),i.jsx(F,{iconId:"Right",color:"blue",size:"sm"})]})})})}),Vg=g.div`
|
|
2558
2692
|
width: 100%;
|
|
2559
2693
|
display: flex;
|
|
2560
2694
|
height: auto;
|
|
2561
2695
|
flex-shrink: 0;
|
|
2562
2696
|
align-items: center;
|
|
2563
2697
|
justify-content: flex-start;
|
|
2564
|
-
border-bottom: ${
|
|
2698
|
+
border-bottom: ${he("border-width")} solid ${he("border-color")};
|
|
2565
2699
|
|
|
2566
2700
|
&:first-of-type {
|
|
2567
|
-
border-top-color: ${
|
|
2701
|
+
border-top-color: ${he("border-color")};
|
|
2568
2702
|
}
|
|
2569
2703
|
|
|
2570
2704
|
:not(:first-of-type):not(.isStuckBottom):has(div.isViewing) {
|
|
2571
|
-
border-top-color: ${
|
|
2705
|
+
border-top-color: ${he("background-color-viewing")};
|
|
2572
2706
|
}
|
|
2573
2707
|
|
|
2574
2708
|
&.isSelected {
|
|
@@ -2579,38 +2713,38 @@
|
|
|
2579
2713
|
|
|
2580
2714
|
&.isStuckBottom {
|
|
2581
2715
|
box-shadow: 0px -6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
2582
|
-
border-top: ${
|
|
2583
|
-
border-top-color: ${
|
|
2716
|
+
border-top: ${he("border-width")} solid ${he("background-color")};
|
|
2717
|
+
border-top-color: ${he("border-color")};
|
|
2584
2718
|
}
|
|
2585
2719
|
|
|
2586
2720
|
&.isStuckTop {
|
|
2587
2721
|
box-shadow: 0px 6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
2588
2722
|
}
|
|
2589
|
-
`,
|
|
2723
|
+
`,Ug=g.div`
|
|
2590
2724
|
width: 100%;
|
|
2591
2725
|
display: flex;
|
|
2592
2726
|
flex-shrink: 0;
|
|
2593
2727
|
align-items: center;
|
|
2594
2728
|
justify-content: flex-start;
|
|
2595
|
-
height: ${
|
|
2596
|
-
padding-left: ${
|
|
2597
|
-
padding-right: ${
|
|
2598
|
-
background-color: ${
|
|
2729
|
+
height: ${he("item-height")};
|
|
2730
|
+
padding-left: ${he("padding-left")};
|
|
2731
|
+
padding-right: ${he("padding-right")};
|
|
2732
|
+
background-color: ${he("background-color")};
|
|
2599
2733
|
transition: background 0.125s ease-in-out;
|
|
2600
2734
|
&.isViewing {
|
|
2601
|
-
background-color: ${
|
|
2735
|
+
background-color: ${he("background-color-viewing")};
|
|
2602
2736
|
}
|
|
2603
|
-
`,
|
|
2737
|
+
`,Gg=g(E)`
|
|
2604
2738
|
flex: 1;
|
|
2605
2739
|
overflow: hidden;
|
|
2606
2740
|
text-overflow: ellipsis;
|
|
2607
2741
|
white-space: nowrap;
|
|
2608
|
-
padding-left: ${
|
|
2609
|
-
padding-right: ${
|
|
2610
|
-
gap: ${
|
|
2742
|
+
padding-left: ${he("padding-left")};
|
|
2743
|
+
padding-right: ${he("padding-right")};
|
|
2744
|
+
gap: ${he("gap")};
|
|
2611
2745
|
align-items: center;
|
|
2612
2746
|
display: flex;
|
|
2613
|
-
`,
|
|
2747
|
+
`,Kg=({className:e,dp:t,emptyState:o,firstChild:n,lastChild:r,onListItemAction:s,selected:l,viewing:a})=>{const u=d.useMemo(()=>({selected:l,viewing:a}),[l,a]);return i.jsx(Di.Provider,{value:u,children:i.jsx(Yg,{className:e,dataProvider:t,emptyState:o,firstChild:n,ItemTemplate:Ti,lastChild:r,onListItemAction:s})})},Yg=g(Bn)`
|
|
2614
2748
|
height: 100%;
|
|
2615
2749
|
width: 100%;
|
|
2616
2750
|
align-items: flex-start;
|
|
@@ -2626,99 +2760,86 @@
|
|
|
2626
2760
|
::-webkit-scrollbar-thumb {
|
|
2627
2761
|
border-left: 3px solid transparent;
|
|
2628
2762
|
}
|
|
2629
|
-
`,
|
|
2763
|
+
`,Ei=d.createContext(!1),qg=()=>d.useContext(Ei),Zg=d.memo(({title:e,disabled:t,onToggleShowSelected:o,t:n})=>i.jsxs(Xg,{children:[i.jsx(E,{variant:"h2",color:"dark",children:e}),i.jsxs(Jg,{children:[i.jsx(E,{variant:"small",color:"grey",children:(n==null?void 0:n("selectedOnly"))??"MISSING T FUNC"}),i.jsx(bo,{disabled:t,onChange:o})]})]})),Xg=g.div`
|
|
2630
2764
|
display: flex;
|
|
2631
2765
|
align-items: center;
|
|
2632
2766
|
width: 100%;
|
|
2633
2767
|
justify-content: space-between;
|
|
2634
2768
|
gap: ${c("spacing-8")};
|
|
2635
|
-
`,
|
|
2769
|
+
`,Jg=g.div`
|
|
2636
2770
|
display: flex;
|
|
2637
2771
|
align-items: center;
|
|
2638
2772
|
gap: ${c("spacing-4")};
|
|
2639
|
-
`,
|
|
2773
|
+
`,Qg=d.memo(e=>{const{selected:t}=Ge(),o=qg(),n=t.includes(e.id);return o&&!n?null:i.jsx(fi,{...e})}),em=g(_i)`
|
|
2640
2774
|
overflow: hidden;
|
|
2641
|
-
`,
|
|
2775
|
+
`,tm=g.div`
|
|
2642
2776
|
overflow-x: hidden;
|
|
2643
2777
|
overflow-y: auto;
|
|
2644
|
-
`,
|
|
2778
|
+
`,om=W.kosComponent(({defaultShowSelected:e,disabled:t,title:o,selected:n,onSelect:r,emptyMessage:s,dataProvider:l,className:a,onSelectAll:u,t:h})=>{const[p,f]=d.useState(e??!1),m=d.useRef(null),x=d.useCallback(y=>{f(y)},[]);d.useEffect(()=>{const y=l;y&&y.updateContextValue&&(y==null||y.updateContextValue("isOnlySelectedVisible",p))},[l,p]),d.useEffect(()=>{const y=l;y&&y.updateContextValue&&(y==null||y.updateContextValue("selected",n))},[l,n]),d.useEffect(()=>{m.current&&n&&(n.length&&n.length!==(l==null?void 0:l.items.length)?m.current.indeterminate!==!0&&(l!=null&&l.items.length)&&(m.current.indeterminate=!0):m.current.indeterminate===!0&&(m.current.indeterminate=!1))},[l==null?void 0:l.items,n]);const b=d.useCallback(()=>{u&&u(n&&n.length>0?"deselect":"select")},[u,n]);return i.jsx(Ei.Provider,{value:p,children:i.jsx(em,{className:a,variant:"display",header:i.jsx(Zg,{title:o,disabled:t,t:h,onToggleShowSelected:x}),ContentWrapper:tm,children:i.jsxs(nm,{children:[!!u&&!!(l!=null&&l.items.length)&&i.jsxs(Zt,{children:[i.jsx(wo,{children:i.jsx(jt,{ref:m,disabled:t,checked:!!n&&!!n.length&&n.length===l.items.length,onChange:b})}),i.jsx(Co,{children:i.jsx(E,{bold:!0,variant:"body",children:(h==null?void 0:h("selectAll"))??"MISSING T FUNC"})})]}),i.jsx(ko,{disabled:t,selected:n,isSingleSelect:!1,onSelect:r,emptyState:s?i.jsx(rm,{children:i.jsx(E,{variant:"body",color:"grey",children:s})}):void 0,ItemTemplate:Qg,dataProvider:l})]})})})}),nm=g.div`
|
|
2645
2779
|
width: 100%;
|
|
2646
2780
|
display: flex;
|
|
2647
2781
|
flex-direction: column;
|
|
2648
2782
|
align-items: flex-start;
|
|
2649
2783
|
justify-content: flex-start;
|
|
2650
|
-
`,
|
|
2784
|
+
`,rm=g.div`
|
|
2651
2785
|
width: 100%;
|
|
2652
2786
|
display: flex;
|
|
2653
2787
|
align-items: center;
|
|
2654
2788
|
justify-content: center;
|
|
2655
2789
|
padding: ${c("spacing-12")} ${c("spacing-20")};
|
|
2656
|
-
`;class
|
|
2657
|
-
${`${Do("bg-color",!0)}: ${c("color-black")}`};
|
|
2658
|
-
${`${Do("color",!0)}: ${c("color-white")}`};
|
|
2659
|
-
${`${Do("bg-color-active",!0)}: ${c("color-grey70")}`};
|
|
2660
|
-
gap: 0px;
|
|
2661
|
-
cursor: pointer;
|
|
2662
|
-
`,Jh=g(yt)`
|
|
2663
|
-
${`${qh("border-color",!0)}: ${c("color-black")}`};
|
|
2664
|
-
z-index: 15;
|
|
2665
|
-
`,Qh=g.div`
|
|
2666
|
-
cursor: default;
|
|
2667
|
-
border-bottom: 0.5px solid ${c("color-grey60")};
|
|
2668
|
-
pointer-events: none;
|
|
2669
|
-
`,[Go]=O(["shell-menu"]),eg=({className:e,left:t,right:o})=>i.jsxs(tg,{className:e,children:[i.jsx(Xn,{children:t}),!!o&&i.jsx(Xn,{children:o})]}),tg=g.div`
|
|
2790
|
+
`;class sm extends Ln{constructor(o,n,r,s){super(o,n,r,{...s,isOnlySelectedVisible:(s==null?void 0:s.isOnlySelectedVisible)??!1,selected:(s==null?void 0:s.selected)??[]});T(this,"itemMapper");T(this,"observableItems");this.itemMapper=r,this.observableItems=D.observable.map(new Map)}get items(){if(!this.initialized||this.version<0)return[];const o=this.resolvedItems,n=[...new Set(o)],r=u=>this.itemMapper(u,this.context),s=u=>this.filterByInputItem(u,this.context),l=n.filter(s.bind(this)).filter(this.context.get("isOnlySelectedVisible")===!0?u=>(this.context.get("selected")??[]).includes(u.id):()=>!0).sort(this.sortByInputItem.bind(this)).map(r);return Array.from(this.observableItems.keys()).filter(u=>!l.find(h=>h.id===u)).forEach(u=>{W.kosAction(()=>{this.observableItems.delete(u)})}),l.reduce((u,h)=>{if(!u.has(h.id))W.kosAction(()=>{u.set(h.id,h)});else{const p=u.get(h.id);p&&W.kosAction(()=>{const f=Object.assign(p,h);u.set(h.id,f)})}return u},this.observableItems),l.map(u=>this.observableItems.get(u.id))}}const[sn]=z(["shell-menu"]),im=({className:e,left:t,right:o})=>i.jsxs(am,{className:e,children:[i.jsx(wr,{children:t}),!!o&&i.jsx(wr,{children:o})]}),am=g.div`
|
|
2670
2791
|
align-items: center;
|
|
2671
|
-
column-gap: ${
|
|
2792
|
+
column-gap: ${sn("section-gap")};
|
|
2672
2793
|
display: flex;
|
|
2673
2794
|
height: 100%;
|
|
2674
2795
|
justify-content: space-between;
|
|
2675
|
-
padding: 0px ${
|
|
2796
|
+
padding: 0px ${sn("padding-x")};
|
|
2676
2797
|
width: 100%;
|
|
2677
|
-
`,
|
|
2798
|
+
`,wr=g.div`
|
|
2678
2799
|
align-items: center;
|
|
2679
|
-
column-gap: ${
|
|
2800
|
+
column-gap: ${sn("link-gap")};
|
|
2680
2801
|
display: flex;
|
|
2681
2802
|
height: 100%;
|
|
2682
2803
|
justify-content: flex-start;
|
|
2683
|
-
`,[
|
|
2684
|
-
padding: ${
|
|
2804
|
+
`,[Cr]=z(["shell-menu"]),lm=d.memo(({text:e,onClick:t,isActive:o})=>i.jsx(cm,{onClick:t,variant:"body",color:"light",bold:o,children:e})),cm=g(E)`
|
|
2805
|
+
padding: ${Cr("link-padding-y")} ${Cr("link-padding-x")};
|
|
2685
2806
|
line-height: unset;
|
|
2686
2807
|
cursor: pointer;
|
|
2687
|
-
`,[
|
|
2808
|
+
`,[Xe]=z(["ingredient-card"]),dm=d.memo(({id:e,name:t,trouble:o,ingredientName:n,assigned:r,onListItemAction:s,blocked:l,isSmall:a})=>{const{selected:u,toggleSelection:h}=Ge(),{t:p}=W.useKosTranslation("dispenser"),f=d.useMemo(()=>u.includes(e),[u,e]),m=d.useCallback(()=>{s&&s(e,"delete")},[e,s]),x=d.useCallback(y=>{s&&s(e,y)},[e,s]),b=d.useCallback(()=>{h(e)},[e,h]);return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(um,{className:y("holder-list-item",{isSelected:f,isSmall:a}),onClick:b,children:[i.jsxs(hm,{children:[i.jsxs(pm,{children:[i.jsx(E,{variant:a?"small":"body",color:"dark",children:t}),!!o&&i.jsx(yo,{content:o,children:i.jsx(F,{iconId:"ExclamationCircle",color:"red",size:a?"xsm":"sm"})})]}),!!n&&i.jsxs(fm,{children:[i.jsx(ie,{iconId:"DeleteOutlined",color:"blue",size:a?"xsm":"sm",onClick:m,disabled:!r}),i.jsxs(_t,{Reference:i.jsx(ie,{iconId:"Ellipsis",color:"black",size:a?"xsm":"sm"}),onSelect:x,children:[i.jsx(ct,{optionKey:"remove",label:p("holder.removeOption"),disableSelectionStyle:!0,disabled:!r}),i.jsx(ct,{optionKey:"block",disableSelectionStyle:!0,disabled:!r,label:p(`holder.${l?"unblockOption":"blockOption"}`)})]})]})]}),i.jsx(gm,{className:y({isIngredientLess:n===void 0}),children:n?i.jsx(E,{color:"dark",variant:a?"small":"body",bold:!0,children:n}):i.jsx(Pe,{variant:a?"borderless-small":"borderless",text:p("holder.assignButton"),icon:"Plus"})})]})})}),um=g.div`
|
|
2688
2809
|
width: 100%;
|
|
2689
2810
|
height: 100%;
|
|
2690
|
-
border: ${
|
|
2811
|
+
border: ${Xe("border")} solid ${Xe("border-color")};
|
|
2691
2812
|
transition: border 0.125s ease-in-out;
|
|
2692
|
-
border-radius: ${
|
|
2693
|
-
padding: ${
|
|
2813
|
+
border-radius: ${Xe("border-radius")};
|
|
2814
|
+
padding: ${Xe("padding")};
|
|
2694
2815
|
display: flex;
|
|
2695
2816
|
flex-direction: column;
|
|
2696
2817
|
align-items: flex-start;
|
|
2697
2818
|
justify-content: flex-start;
|
|
2698
2819
|
cursor: pointer;
|
|
2699
2820
|
&.isSmall {
|
|
2700
|
-
padding: ${
|
|
2821
|
+
padding: ${Xe("padding-small")};
|
|
2701
2822
|
}
|
|
2702
2823
|
&.isSelected {
|
|
2703
|
-
border-color: ${
|
|
2824
|
+
border-color: ${Xe("border-color-selected")};
|
|
2704
2825
|
}
|
|
2705
|
-
`,
|
|
2826
|
+
`,hm=g.div`
|
|
2706
2827
|
width: 100%;
|
|
2707
2828
|
display: flex;
|
|
2708
2829
|
align-items: center;
|
|
2709
2830
|
justify-content: flex-start;
|
|
2710
|
-
column-gap: ${
|
|
2711
|
-
`,
|
|
2831
|
+
column-gap: ${Xe("column-gap")};
|
|
2832
|
+
`,pm=g.div`
|
|
2712
2833
|
flex: 1;
|
|
2713
2834
|
display: flex;
|
|
2714
2835
|
align-items: center;
|
|
2715
2836
|
justify-content: flex-start;
|
|
2716
|
-
column-gap: ${
|
|
2717
|
-
`,
|
|
2837
|
+
column-gap: ${Xe("column-gap")};
|
|
2838
|
+
`,fm=g.div`
|
|
2718
2839
|
display: flex;
|
|
2719
2840
|
align-items: center;
|
|
2720
|
-
column-gap: ${
|
|
2721
|
-
`,
|
|
2841
|
+
column-gap: ${Xe("column-gap")};
|
|
2842
|
+
`,gm=g.div`
|
|
2722
2843
|
width: 100%;
|
|
2723
2844
|
display: flex;
|
|
2724
2845
|
align-items: center;
|
|
@@ -2727,25 +2848,25 @@
|
|
|
2727
2848
|
&.isIngredientLess {
|
|
2728
2849
|
justify-content: center;
|
|
2729
2850
|
}
|
|
2730
|
-
`,
|
|
2851
|
+
`,mm=["settings","devices","tools","performance"],bm=["viewBrowse","manage","configure","troubleshoot","store","main"],xm=mm.map(e=>bm.map(t=>({start:e,end:t}))).flatMap(e=>e),[we,Mi]=z(["branded-header","icon"]),ym=g.div`
|
|
2731
2852
|
width: 100%;
|
|
2732
2853
|
display: flex;
|
|
2733
2854
|
flex-direction: column;
|
|
2734
2855
|
align-items: flex-start;
|
|
2735
2856
|
justify-content: flex-start;
|
|
2736
|
-
border-bottom: ${
|
|
2737
|
-
`,
|
|
2857
|
+
border-bottom: ${we("border-bottom-size")} solid ${we("border-bottom-color")};
|
|
2858
|
+
`,vm=g.div`
|
|
2738
2859
|
width: 100%;
|
|
2739
2860
|
display: flex;
|
|
2740
2861
|
align-items: center;
|
|
2741
2862
|
justify-content: flex-start;
|
|
2742
2863
|
max-height: 52px;
|
|
2743
|
-
`;g.div``;const
|
|
2864
|
+
`;g.div``;const km=g.div`
|
|
2744
2865
|
display: flex;
|
|
2745
2866
|
flex: 1;
|
|
2746
2867
|
gap: 16px;
|
|
2747
2868
|
padding: 12px 20px 12px 16px;
|
|
2748
|
-
`,
|
|
2869
|
+
`,wm=g.div`
|
|
2749
2870
|
flex: 1;
|
|
2750
2871
|
display: flex;
|
|
2751
2872
|
align-items: center;
|
|
@@ -2755,39 +2876,39 @@
|
|
|
2755
2876
|
/* &.hasDescription {
|
|
2756
2877
|
align-items: flex-start;
|
|
2757
2878
|
} */
|
|
2758
|
-
`,
|
|
2879
|
+
`,Cm=g.div`
|
|
2759
2880
|
flex: 1;
|
|
2760
2881
|
overflow: hidden;
|
|
2761
2882
|
display: flex;
|
|
2762
2883
|
flex-direction: column;
|
|
2763
2884
|
align-items: flex-start;
|
|
2764
2885
|
justify-content: flex-start;
|
|
2765
|
-
row-gap: ${
|
|
2886
|
+
row-gap: ${we("text-wrapper-gap")};
|
|
2766
2887
|
`;g.img`
|
|
2767
2888
|
height: 100%;
|
|
2768
|
-
`;const
|
|
2769
|
-
${
|
|
2889
|
+
`;const zi=M.css`
|
|
2890
|
+
${xm.map(({start:e,end:t})=>`&[data-gradient="${e}-${t}"] {
|
|
2770
2891
|
background: linear-gradient(
|
|
2771
2892
|
90deg,
|
|
2772
|
-
${
|
|
2773
|
-
${
|
|
2893
|
+
${we(`startColor-${e}`)} 0%,
|
|
2894
|
+
${we(`endColor-${t}`)} 100%
|
|
2774
2895
|
);
|
|
2775
2896
|
}`)}
|
|
2776
|
-
|
|
2897
|
+
`,$m=g.div`
|
|
2777
2898
|
background-color: ${e=>e.color};
|
|
2778
|
-
height: ${
|
|
2779
|
-
width: ${
|
|
2780
|
-
border-radius: ${
|
|
2899
|
+
height: ${we("badge-size")};
|
|
2900
|
+
width: ${we("badge-size")};
|
|
2901
|
+
border-radius: ${we("badge-radius")};
|
|
2781
2902
|
position: relative;
|
|
2782
|
-
${`${
|
|
2903
|
+
${`${Mi("size-xxlrg",!0)}: 52px`};
|
|
2783
2904
|
`;g.div`
|
|
2784
|
-
height: ${
|
|
2785
|
-
width: ${
|
|
2786
|
-
border-radius: ${
|
|
2905
|
+
height: ${we("badge-size")};
|
|
2906
|
+
width: ${we("badge-size")};
|
|
2907
|
+
border-radius: ${we("badge-radius")};
|
|
2787
2908
|
position: relative;
|
|
2788
|
-
${`${
|
|
2789
|
-
${
|
|
2790
|
-
`;const
|
|
2909
|
+
${`${Mi("size-xxlrg",!0)}: calc(100% - 2px)`};
|
|
2910
|
+
${zi}
|
|
2911
|
+
`;const Sm=g.div`
|
|
2791
2912
|
width: 100%;
|
|
2792
2913
|
height: 100%;
|
|
2793
2914
|
position: absolute;
|
|
@@ -2803,10 +2924,10 @@
|
|
|
2803
2924
|
align-items: center;
|
|
2804
2925
|
justify-content: center;
|
|
2805
2926
|
position: relative;
|
|
2806
|
-
height: ${
|
|
2927
|
+
height: ${we("line-height")};
|
|
2807
2928
|
overflow: hidden;
|
|
2808
|
-
${
|
|
2809
|
-
`;const
|
|
2929
|
+
${zi}
|
|
2930
|
+
`;const jm=g.div`
|
|
2810
2931
|
width: 100%;
|
|
2811
2932
|
height: 100%;
|
|
2812
2933
|
position: absolute;
|
|
@@ -2815,62 +2936,62 @@
|
|
|
2815
2936
|
z-index: 1;
|
|
2816
2937
|
background-color: ${c("color-grey60")};
|
|
2817
2938
|
opacity: 0.5;
|
|
2818
|
-
`,
|
|
2939
|
+
`,Im=g(E)`
|
|
2819
2940
|
display: -webkit-box;
|
|
2820
2941
|
-webkit-line-clamp: 2;
|
|
2821
2942
|
-webkit-box-orient: vertical;
|
|
2822
2943
|
overflow: hidden;
|
|
2823
2944
|
text-overflow: ellipsis;
|
|
2824
|
-
`,
|
|
2825
|
-
padding: ${
|
|
2826
|
-
background-color: ${
|
|
2827
|
-
color: ${
|
|
2828
|
-
font-size: ${
|
|
2829
|
-
font-weight: ${
|
|
2945
|
+
`,_m=e=>i.jsx(Im,{...e,variant:"body",color:"dark"}),Dm=d.memo(({color:e,title:t,description:o,icon:n,Action:r,isOffline:s})=>i.jsx(M.ClassNames,{children:({cx:l})=>i.jsx(ym,{children:i.jsxs(vm,{children:[i.jsxs($m,{color:e,children:[i.jsx(Sm,{children:n&&i.jsx(F,{iconId:n,size:"xxlrg",color:"white"})}),!!s&&i.jsx(jm,{})]}),i.jsxs(km,{children:[i.jsx(wm,{className:l({hasDescription:!!o}),children:i.jsxs(Cm,{children:[i.jsx(E,{variant:"h1",children:t}),!!o&&i.jsx(_m,{children:o})]})}),!!r&&i.jsx(r,{})]})]})})})),Oi=d.createContext(null),Ri=W.kosComponent(({children:e,t,isSortable:o,onListItemAction:n})=>{const r=d.useMemo(()=>({t,isSortable:!!o,onListItemAction:n}),[o,t,n]);return i.jsx(Oi.Provider,{value:r,children:e})}),Vn=()=>{const e=d.useContext(Oi);if(e===null)throw new Error("TableContext must be used within a TableContextProvider");return e},[it]=z(["table"]),jo=g.td`
|
|
2946
|
+
padding: ${it("cell-padding-y")} ${it("cell-padding-x")};
|
|
2947
|
+
background-color: ${it("background-color")};
|
|
2948
|
+
color: ${it("cell-color")};
|
|
2949
|
+
font-size: ${it("cell-font-size")};
|
|
2950
|
+
font-weight: ${it("cell-font-weight")};
|
|
2830
2951
|
&.isSortable {
|
|
2831
|
-
padding-right: ${
|
|
2952
|
+
padding-right: ${it("cell-padding-right-sortable")};
|
|
2832
2953
|
}
|
|
2833
2954
|
&:first-of-type {
|
|
2834
|
-
padding-left: ${
|
|
2955
|
+
padding-left: ${it("cell-padding-left-first-in-row")};
|
|
2835
2956
|
}
|
|
2836
|
-
`,
|
|
2957
|
+
`,Un=d.memo(({cell:e})=>{const{isSortable:t}=Vn();return i.jsx(jo,{className:t&&e.column.getCanSort()?"isSortable":void 0,children:ve.flexRender(e.column.columnDef.cell,e.getContext())},e.id)}),[$r]=z(["table"]),kt=g.tr`
|
|
2837
2958
|
width: 100%;
|
|
2838
|
-
border-bottom: ${
|
|
2839
|
-
|
|
2959
|
+
border-bottom: ${$r("row-border-bottom-size")} solid ${$r("border-color")};
|
|
2960
|
+
`,Tm=d.memo(({row:e,TdComponent:t})=>{const o=t??Un;return i.jsx(kt,{children:e.getVisibleCells().map(n=>i.jsx(o,{cell:n},n.id))})}),[Em]=z(["table"]),Mm=e=>e.id,zm=({items:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:h,disabled:p,...f})=>{const[m,x]=d.useState([]),b=ve.useReactTable({columns:t,meta:{disabled:p},data:e,getCoreRowModel:ve.getCoreRowModel(),getSortedRowModel:r?ve.getSortedRowModel():void 0,getRowId:o??Mm,onSortingChange:r?x:void 0,state:{sorting:m}}),y=a??Tm,w=!b.getRowModel().rows.length;return w&&h?n??null:i.jsx(Ri,{onListItemAction:u,isSortable:r,t:s,children:i.jsxs(Nm,{...f,children:[i.jsx(Fm,{children:b.getHeaderGroups().map(v=>i.jsx(kt,{children:v.headers.map($=>i.jsx(d.Fragment,{children:ve.flexRender($.column.columnDef.header,$.getContext())},$.id))},v.id))}),i.jsx(Am,{children:w?i.jsx(kt,{children:i.jsx(jo,{colSpan:t.length,children:n??null})}):b.getRowModel().rows.map(v=>i.jsx(y,{row:v,TdComponent:l??Un},v.id))})]})})},Om=[],Rm=W.kosComponent(({dataProvider:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:h,disabled:p,...f})=>(qt(e),i.jsx(wt.Observer,{children:()=>{const m=e?e.items:Om;return i.jsx(zm,{items:m,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:h,disabled:p,...f})}}))),Nm=g.table`
|
|
2840
2961
|
width: 100%;
|
|
2841
2962
|
overflow: auto;
|
|
2842
2963
|
border-collapse: collapse;
|
|
2843
|
-
font-family: ${
|
|
2964
|
+
font-family: ${Em("font-family")};
|
|
2844
2965
|
table-layout: fixed;
|
|
2845
|
-
`,
|
|
2966
|
+
`,Fm=g.thead`
|
|
2846
2967
|
width: 100%;
|
|
2847
|
-
`,
|
|
2968
|
+
`,Am=g.tbody`
|
|
2848
2969
|
width: 100%;
|
|
2849
|
-
`,[
|
|
2850
|
-
padding: ${
|
|
2851
|
-
background-color: ${
|
|
2852
|
-
color: ${
|
|
2853
|
-
font-size: ${
|
|
2854
|
-
font-weight: ${
|
|
2970
|
+
`,[Te]=z(["table"]),Lm=(e,t)=>e?e==="desc"?(t==null?void 0:t("table.sort",{direction:t==null?void 0:t("table.ascending"),defaultValue:"Click to sort ascending"}))??"Click to sort ascending":(t==null?void 0:t("table.cancelSort",{defaultValue:"Cancel sort"}))??"Cancel sort":(t==null?void 0:t("table.sort",{direction:t==null?void 0:t("table.descending"),defaultValue:"Click to sort descending"}))??"Click to sort descending",an=d.memo(({width:e,isBlank:t,toggleSorting:o,id:n,alignment:r,sortValue:s,canSort:l,isVirtual:a})=>{const{isSortable:u,t:h}=Vn(),p=d.useCallback(()=>{o()},[o]);return i.jsx(Bm,{className:St({isSortable:u&&l,isSorted:s!==!1}),style:{width:e??"auto",display:a?"flex":"table-cell"},children:i.jsxs(Wm,{"data-alignment":r,children:[!t&&((h==null?void 0:h(`table.header.${n}`))??n),u&&l&&i.jsx(yo,{content:Lm(s,h),children:i.jsx(ie,{iconId:s?s==="asc"?"SortAscending":"SortDescending":"Sort",size:"sm",onClick:p,color:"grey"})})]})})}),Bm=g.th`
|
|
2971
|
+
padding: ${Te("cell-padding-y")} ${Te("cell-padding-x")};
|
|
2972
|
+
background-color: ${Te("header-background-color")};
|
|
2973
|
+
color: ${Te("head-color")};
|
|
2974
|
+
font-size: ${Te("head-font-size")};
|
|
2975
|
+
font-weight: ${Te("head-font-weight")};
|
|
2855
2976
|
&.isSortable {
|
|
2856
2977
|
transition: background 0.125s ease-in-out;
|
|
2857
|
-
padding-right: ${
|
|
2978
|
+
padding-right: ${Te("cell-padding-right-sortable")};
|
|
2858
2979
|
cursor: pointer;
|
|
2859
2980
|
:hover {
|
|
2860
|
-
background-color: ${
|
|
2981
|
+
background-color: ${Te("header-background-color-hover")};
|
|
2861
2982
|
}
|
|
2862
2983
|
}
|
|
2863
2984
|
&.isSorted {
|
|
2864
|
-
background-color: ${
|
|
2985
|
+
background-color: ${Te("header-background-color-hover")};
|
|
2865
2986
|
}
|
|
2866
2987
|
&:first-of-type {
|
|
2867
|
-
padding-left: ${
|
|
2988
|
+
padding-left: ${Te("cell-padding-left-first-in-row")};
|
|
2868
2989
|
}
|
|
2869
|
-
`,
|
|
2990
|
+
`,Wm=g.div`
|
|
2870
2991
|
display: flex;
|
|
2871
2992
|
align-items: center;
|
|
2872
2993
|
justify-content: space-between;
|
|
2873
|
-
column-gap: ${
|
|
2994
|
+
column-gap: ${Te("head-gap-sortable")};
|
|
2874
2995
|
&[data-alignment="left"] {
|
|
2875
2996
|
justify-content: flex-start;
|
|
2876
2997
|
}
|
|
@@ -2880,43 +3001,43 @@
|
|
|
2880
3001
|
&[data-alignment="center"] {
|
|
2881
3002
|
justify-content: center;
|
|
2882
3003
|
}
|
|
2883
|
-
`,
|
|
3004
|
+
`,Pm=()=>{const e=ve.createColumnHelper();return{displayColumn:r=>s=>e.display({header:({column:l,header:a})=>{var u,h,p;return i.jsx(an,{id:a.id,canSort:l.getCanSort(),width:(u=l.columnDef.meta)==null?void 0:u.width,alignment:(h=l.columnDef.meta)==null?void 0:h.headerAlign,isBlank:(p=l.columnDef.meta)==null?void 0:p.isBlank,toggleSorting:l.toggleSorting,sortValue:l.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},a.id)},...s,meta:{...s.meta,width:"auto",...r}}),accessorColumn:r=>(s,l)=>e.accessor(s,{header:({column:a,header:u})=>{var h,p,f;return i.jsx(an,{id:u.id,canSort:a.getCanSort(),width:(h=a.columnDef.meta)==null?void 0:h.width,alignment:(p=a.columnDef.meta)==null?void 0:p.headerAlign,isBlank:(f=a.columnDef.meta)==null?void 0:f.isBlank,toggleSorting:a.toggleSorting,sortValue:a.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},u.id)},...l,meta:{...l.meta,width:"auto",...r}}),groupColumn:r=>s=>e.group({...s,meta:{...s.meta,width:"auto",...r}})}};function xt(e,t,o){let n=o.initialDeps??[],r;function s(){var l,a,u,h;let p;o.key&&((l=o.debug)!=null&&l.call(o))&&(p=Date.now());const f=e();if(!(f.length!==n.length||f.some((b,y)=>n[y]!==b)))return r;n=f;let x;if(o.key&&((a=o.debug)!=null&&a.call(o))&&(x=Date.now()),r=t(...f),o.key&&((u=o.debug)!=null&&u.call(o))){const b=Math.round((Date.now()-p)*100)/100,y=Math.round((Date.now()-x)*100)/100,w=y/16,v=($,C)=>{for($=String($);$.length<C;)$=" "+$;return $};console.info(`%c⏱ ${v(y,5)} /${v(b,5)} ms`,`
|
|
2884
3005
|
font-size: .6rem;
|
|
2885
3006
|
font-weight: bold;
|
|
2886
|
-
color: hsl(${Math.max(0,Math.min(120-120*k,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(f=o==null?void 0:o.onChange)==null||f.call(o,r),r}return s.updateDeps=a=>{n=a},s}function er(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Fg=(e,t)=>Math.abs(e-t)<1.01,Ag=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},tr=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},_g=e=>e,Lg=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=t;r<=o;r++)n.push(r);return n},Wg=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;const r=a=>{const{width:l,height:u}=a;t({width:Math.round(l),height:Math.round(u)})};if(r(tr(o)),!n.ResizeObserver)return()=>{};const s=new n.ResizeObserver(a=>{const l=()=>{const u=a[0];if(u!=null&&u.borderBoxSize){const f=u.borderBoxSize[0];if(f){r({width:f.inlineSize,height:f.blockSize});return}}r(tr(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},or={passive:!0},nr=typeof window>"u"?!0:"onscrollend"in window,Bg=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&nr?()=>{}:Ag(n,()=>{t(r,!1)},e.options.isScrollingResetDelay),a=p=>()=>{const{horizontal:h,isRtl:m}=e.options;r=h?o.scrollLeft*(m&&-1||1):o.scrollTop,s(),t(r,p)},l=a(!0),u=a(!1);u(),o.addEventListener("scroll",l,or);const f=e.options.useScrollendEvent&&nr;return f&&o.addEventListener("scrollend",u,or),()=>{o.removeEventListener("scroll",l),f&&o.removeEventListener("scrollend",u)}},Pg=(e,t,o)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[o.options.horizontal?"inlineSize":"blockSize"])}return e[o.options.horizontal?"offsetWidth":"offsetHeight"]},Hg=(e,{adjustments:t=0,behavior:o},n)=>{var r,s;const a=e+t;(s=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||s.call(r,{[n.options.horizontal?"left":"top"]:a,behavior:o})};class Vg{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const n=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(r=>{r.forEach(s=>{const a=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),o=null},observe:r=>{var s;return(s=n())==null?void 0:s.observe(r,{box:"border-box"})},unobserve:r=>{var s;return(s=n())==null?void 0:s.unobserve(r)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([n,r])=>{typeof r>"u"&&delete o[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:_g,rangeExtractor:Lg,onChange:()=>{},measureElement:Pg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...o}},this.notify=o=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,o)},this.maybeNotify=ct(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,n)=>{const r=new Map,s=new Map;for(let a=n-1;a>=0;a--){const l=o[a];if(r.has(l.lane))continue;const u=s.get(l.lane);if(u==null||l.end>u.end?s.set(l.lane,l):l.end<u.end&&r.set(l.lane,!0),r.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((a,l)=>a.end===l.end?a.index-l.index:a.end-l.end)[0]:void 0},this.getMeasurementOptions=ct(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,n,r,s,a)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:a}),{key:!1}),this.getMeasurements=ct(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:a},l)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=this.measurementsCache.slice(0,u);for(let p=u;p<o;p++){const h=s(p),m=this.options.lanes===1?f[p-1]:this.getFurthestMeasurement(f,p),x=m?m.end+this.options.gap:n+r,b=l.get(h),y=typeof b=="number"?b:this.options.estimateSize(p),k=x+y,w=m?m.lane:p%this.options.lanes;f[p]={index:p,start:x,size:y,end:k,key:h,lane:w}}return this.measurementsCache=f,f},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ct(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?Gg({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ct(()=>{let o=null,n=null;const r=this.calculateRange();return r&&(o=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,o,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,o,n]},(o,n,r,s,a)=>s===null||a===null?[]:o({startIndex:s,endIndex:a,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const n=this.options.indexAttribute,r=o.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(o,n)=>{const r=this.indexFromElement(o),s=this.measurementsCache[r];if(!s)return;const a=s.key,l=this.elementsCache.get(a);l!==o&&(l&&this.observer.unobserve(l),this.observer.observe(o),this.elementsCache.set(a,o)),o.isConnected&&this.resizeItem(r,this.options.measureElement(o,n,this))},this.resizeItem=(o,n)=>{const r=this.measurementsCache[o];if(!r)return;const s=this.itemSizeCache.get(r.key)??r.size,a=n-s;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,a,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=o=>{if(!o){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(o,void 0)},this.getVirtualItems=ct(()=>[this.getVirtualIndexes(),this.getMeasurements()],(o,n)=>{const r=[];for(let s=0,a=o.length;s<a;s++){const l=o[s],u=n[l];r.push(u)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const n=this.getMeasurements();if(n.length!==0)return er(n[ti(0,n.length-1,r=>er(n[r]).start,o)])},this.getOffsetForAlignment=(o,n,r=0)=>{const s=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=o>=a+s?"end":"start"),n==="center"?o+=(r-s)/2:n==="end"&&(o-=s);const l=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(l,o),0)},this.getOffsetForIndex=(o,n="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const r=this.measurementsCache[o];if(!r)return;const s=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(r.end>=a+s-this.options.scrollPaddingEnd)n="end";else if(r.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const l=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(o,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(o,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o=Math.max(0,Math.min(o,this.options.count-1));let s=0;const a=10,l=f=>{if(!this.targetWindow)return;const p=this.getOffsetForIndex(o,f);if(!p){console.warn("Failed to get offset for index:",o);return}const[h,m]=p;this._scrollToOffset(h,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const x=this.getScrollOffset(),b=this.getOffsetForIndex(o,m);if(!b){console.warn("Failed to get offset for index:",o);return}Fg(b[0],x)||u(m)})},u=f=>{this.targetWindow&&(s++,s<a?this.targetWindow.requestAnimationFrame(()=>l(f)):console.warn(`Failed to scroll to index ${o} after ${a} attempts.`))};l(n)},this.scrollBy=(o,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var o;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((o=n[n.length-1])==null?void 0:o.end)??0;else{const s=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&s.some(l=>l===null);){const l=n[a];s[l.lane]===null&&(s[l.lane]=l.end),a--}r=Math.max(...s.filter(l=>l!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(o,{adjustments:n,behavior:r})=>{this.options.scrollToFn(o,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ti=(e,t,o,n)=>{for(;e<=t;){const r=(e+t)/2|0,s=o(r);if(s<n)e=r+1;else if(s>n)t=r-1;else return r}return e>0?e-1:0};function Gg({measurements:e,outerSize:t,scrollOffset:o,lanes:n}){const r=e.length-1,s=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let a=ti(0,r,s,o),l=a;if(n===1)for(;l<r&&e[l].end<o+t;)l++;else if(n>1){const u=Array(n).fill(0);for(;l<r&&u.some(p=>p<o+t);){const p=e[l];u[p.lane]=p.end,l++}const f=Array(n).fill(o+t);for(;a>=0&&f.some(p=>p>=o);){const p=e[a];f[p.lane]=p.start,a--}a=Math.max(0,a-a%n),l=Math.min(r,l+(n-1-l%n))}return{startIndex:a,endIndex:l}}const rr=typeof document<"u"?Xt.useLayoutEffect:Xt.useEffect;function Ug(e){const t=Xt.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var a;s?ur.flushSync(t):t(),(a=e.onChange)==null||a.call(e,r,s)}},[n]=Xt.useState(()=>new Vg(o));return n.setOptions(o),rr(()=>n._didMount(),[]),rr(()=>n._willUpdate()),n}function Yg(e){return Ug({observeElementRect:Wg,observeElementOffset:Bg,scrollToFn:Hg,...e})}const[oi]=O(["table"]),Kg=[],qg=e=>e.id,Zg=L.kosComponent(({dataProvider:e,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:a,TdComponent:l,TrComponent:u,onListItemAction:f,renderEmptyAsStandalone:p,...h})=>{Lt(e);const m=d.useRef(null),[x,b]=d.useState([]),y=be.useReactTable({columns:t,data:e?e==null?void 0:e.items:Kg,getCoreRowModel:be.getCoreRowModel(),getSortedRowModel:s?be.getSortedRowModel():void 0,getRowId:n??qg,onSortingChange:s?b:void 0,state:{sorting:x}}),k=!y.getRowModel().rows.length;return k&&p?r??null:i.jsx(ei,{onListItemAction:f,isSortable:s,t:a,children:i.jsx(Qg,{className:o,ref:m,children:i.jsxs(em,{...h,children:[i.jsx(tm,{children:y.getHeaderGroups().map(w=>i.jsx(pt,{style:{display:"flex"},children:w.headers.map($=>i.jsx(d.Fragment,{children:be.flexRender($.column.columnDef.header,$.getContext())},$.id))},w.id))}),i.jsx(Xg,{isEmpty:k,numColumns:t.length,emptyState:r,table:y,tableContainerRef:m})]})})})}),Xg=L.kosComponent(({table:e,tableContainerRef:t,trClassName:o,isEmpty:n,emptyState:r,numColumns:s})=>{const{rows:a}=e.getRowModel(),l=Yg({count:a.length,estimateSize:()=>33,getScrollElement:()=>t.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?u=>u==null?void 0:u.getBoundingClientRect().height:void 0,overscan:5});return i.jsx(om,{style:{position:"relative",height:`${l.getTotalSize()}px`},children:n?i.jsx(pt,{children:i.jsx(go,{colSpan:s,children:r??null})}):l.getVirtualItems().map(u=>{const f=a[u.index];return i.jsx(Jg,{trClassName:o,row:f,virtualRow:u,rowVirtualizer:l},f.id)})})}),Jg=L.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n})=>i.jsx(pt,{"data-index":o.index,ref:r=>n.measureElement(r),className:e,style:{display:"flex",position:"absolute",transform:`translateY(${o.start}px)`,width:"100%"},children:t.getVisibleCells().map(r=>{var s;return i.jsx(go,{style:{display:"flex",width:((s=r.column.columnDef.meta)==null?void 0:s.width)??r.column.getSize()},children:be.flexRender(r.column.columnDef.cell,r.getContext())},r.id)})},t.id)),Qg=g.div`
|
|
3007
|
+
color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(h=o==null?void 0:o.onChange)==null||h.call(o,r),r}return s.updateDeps=l=>{n=l},s}function Sr(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Hm=(e,t)=>Math.abs(e-t)<1.01,Vm=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},jr=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},Um=e=>e,Gm=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=t;r<=o;r++)n.push(r);return n},Km=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;const r=l=>{const{width:a,height:u}=l;t({width:Math.round(a),height:Math.round(u)})};if(r(jr(o)),!n.ResizeObserver)return()=>{};const s=new n.ResizeObserver(l=>{const a=()=>{const u=l[0];if(u!=null&&u.borderBoxSize){const h=u.borderBoxSize[0];if(h){r({width:h.inlineSize,height:h.blockSize});return}}r(jr(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},Ir={passive:!0},_r=typeof window>"u"?!0:"onscrollend"in window,Ym=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&_r?()=>{}:Vm(n,()=>{t(r,!1)},e.options.isScrollingResetDelay),l=p=>()=>{const{horizontal:f,isRtl:m}=e.options;r=f?o.scrollLeft*(m&&-1||1):o.scrollTop,s(),t(r,p)},a=l(!0),u=l(!1);u(),o.addEventListener("scroll",a,Ir);const h=e.options.useScrollendEvent&&_r;return h&&o.addEventListener("scrollend",u,Ir),()=>{o.removeEventListener("scroll",a),h&&o.removeEventListener("scrollend",u)}},qm=(e,t,o)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[o.options.horizontal?"inlineSize":"blockSize"])}return e[o.options.horizontal?"offsetWidth":"offsetHeight"]},Zm=(e,{adjustments:t=0,behavior:o},n)=>{var r,s;const l=e+t;(s=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||s.call(r,{[n.options.horizontal?"left":"top"]:l,behavior:o})};class Xm{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const n=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(r=>{r.forEach(s=>{const l=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),o=null},observe:r=>{var s;return(s=n())==null?void 0:s.observe(r,{box:"border-box"})},unobserve:r=>{var s;return(s=n())==null?void 0:s.unobserve(r)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([n,r])=>{typeof r>"u"&&delete o[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Um,rangeExtractor:Gm,onChange:()=>{},measureElement:qm,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...o}},this.notify=o=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,o)},this.maybeNotify=xt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,n)=>{const r=new Map,s=new Map;for(let l=n-1;l>=0;l--){const a=o[l];if(r.has(a.lane))continue;const u=s.get(a.lane);if(u==null||a.end>u.end?s.set(a.lane,a):a.end<u.end&&r.set(a.lane,!0),r.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((l,a)=>l.end===a.end?l.index-a.index:l.end-a.end)[0]:void 0},this.getMeasurementOptions=xt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,n,r,s,l)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:l}),{key:!1}),this.getMeasurements=xt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:l},a)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const h=this.measurementsCache.slice(0,u);for(let p=u;p<o;p++){const f=s(p),m=this.options.lanes===1?h[p-1]:this.getFurthestMeasurement(h,p),x=m?m.end+this.options.gap:n+r,b=a.get(f),y=typeof b=="number"?b:this.options.estimateSize(p),w=x+y,v=m?m.lane:p%this.options.lanes;h[p]={index:p,start:x,size:y,end:w,key:f,lane:v}}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=xt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?Jm({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=xt(()=>{let o=null,n=null;const r=this.calculateRange();return r&&(o=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,o,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,o,n]},(o,n,r,s,l)=>s===null||l===null?[]:o({startIndex:s,endIndex:l,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const n=this.options.indexAttribute,r=o.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(o,n)=>{const r=this.indexFromElement(o),s=this.measurementsCache[r];if(!s)return;const l=s.key,a=this.elementsCache.get(l);a!==o&&(a&&this.observer.unobserve(a),this.observer.observe(o),this.elementsCache.set(l,o)),o.isConnected&&this.resizeItem(r,this.options.measureElement(o,n,this))},this.resizeItem=(o,n)=>{const r=this.measurementsCache[o];if(!r)return;const s=this.itemSizeCache.get(r.key)??r.size,l=n-s;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,l,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=o=>{if(!o){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(o,void 0)},this.getVirtualItems=xt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(o,n)=>{const r=[];for(let s=0,l=o.length;s<l;s++){const a=o[s],u=n[a];r.push(u)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const n=this.getMeasurements();if(n.length!==0)return Sr(n[Ni(0,n.length-1,r=>Sr(n[r]).start,o)])},this.getOffsetForAlignment=(o,n,r=0)=>{const s=this.getSize(),l=this.getScrollOffset();n==="auto"&&(n=o>=l+s?"end":"start"),n==="center"?o+=(r-s)/2:n==="end"&&(o-=s);const a=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(a,o),0)},this.getOffsetForIndex=(o,n="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const r=this.measurementsCache[o];if(!r)return;const s=this.getSize(),l=this.getScrollOffset();if(n==="auto")if(r.end>=l+s-this.options.scrollPaddingEnd)n="end";else if(r.start<=l+this.options.scrollPaddingStart)n="start";else return[l,n];const a=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(o,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(o,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o=Math.max(0,Math.min(o,this.options.count-1));let s=0;const l=10,a=h=>{if(!this.targetWindow)return;const p=this.getOffsetForIndex(o,h);if(!p){console.warn("Failed to get offset for index:",o);return}const[f,m]=p;this._scrollToOffset(f,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const x=this.getScrollOffset(),b=this.getOffsetForIndex(o,m);if(!b){console.warn("Failed to get offset for index:",o);return}Hm(b[0],x)||u(m)})},u=h=>{this.targetWindow&&(s++,s<l?this.targetWindow.requestAnimationFrame(()=>a(h)):console.warn(`Failed to scroll to index ${o} after ${l} attempts.`))};a(n)},this.scrollBy=(o,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var o;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((o=n[n.length-1])==null?void 0:o.end)??0;else{const s=Array(this.options.lanes).fill(null);let l=n.length-1;for(;l>=0&&s.some(a=>a===null);){const a=n[l];s[a.lane]===null&&(s[a.lane]=a.end),l--}r=Math.max(...s.filter(a=>a!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(o,{adjustments:n,behavior:r})=>{this.options.scrollToFn(o,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const Ni=(e,t,o,n)=>{for(;e<=t;){const r=(e+t)/2|0,s=o(r);if(s<n)e=r+1;else if(s>n)t=r-1;else return r}return e>0?e-1:0};function Jm({measurements:e,outerSize:t,scrollOffset:o,lanes:n}){const r=e.length-1,s=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let l=Ni(0,r,s,o),a=l;if(n===1)for(;a<r&&e[a].end<o+t;)a++;else if(n>1){const u=Array(n).fill(0);for(;a<r&&u.some(p=>p<o+t);){const p=e[a];u[p.lane]=p.end,a++}const h=Array(n).fill(o+t);for(;l>=0&&h.some(p=>p>=o);){const p=e[l];h[p.lane]=p.start,l--}l=Math.max(0,l-l%n),a=Math.min(r,a+(n-1-a%n))}return{startIndex:l,endIndex:a}}const Dr=typeof document<"u"?io.useLayoutEffect:io.useEffect;function Qm(e){const t=io.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var l;s?Br.flushSync(t):t(),(l=e.onChange)==null||l.call(e,r,s)}},[n]=io.useState(()=>new Xm(o));return n.setOptions(o),Dr(()=>n._didMount(),[]),Dr(()=>n._willUpdate()),n}function eb(e){return Qm({observeElementRect:Km,observeElementOffset:Ym,scrollToFn:Zm,...e})}const[Fi]=z(["table"]),tb=e=>e.id,ob=({items:e,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,onListItemAction:a,renderEmptyAsStandalone:u,...h})=>{const p=d.useRef(null),[f,m]=d.useState([]),x=ve.useReactTable({columns:t,data:e,getCoreRowModel:ve.getCoreRowModel(),getSortedRowModel:s?ve.getSortedRowModel():void 0,getRowId:n??tb,onSortingChange:s?m:void 0,state:{sorting:f}}),b=!x.getRowModel().rows.length;return b&&u?r??null:i.jsx(Ri,{onListItemAction:a,isSortable:s,t:l,children:i.jsx(ab,{className:o,ref:p,children:i.jsxs(lb,{...h,children:[i.jsx(cb,{children:x.getHeaderGroups().map(y=>i.jsx(kt,{style:{display:"flex"},children:y.headers.map(w=>i.jsx(d.Fragment,{children:ve.flexRender(w.column.columnDef.header,w.getContext())},w.id))},y.id))}),i.jsx(sb,{isEmpty:b,numColumns:t.length,emptyState:r,table:x,tableContainerRef:p})]})})})},nb=[],rb=W.kosComponent(({dataProvider:e,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,TdComponent:a,TrComponent:u,onListItemAction:h,renderEmptyAsStandalone:p,...f})=>(qt(e),i.jsx(wt.Observer,{children:()=>{const m=e?e.items:nb;return i.jsx(ob,{items:m,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,onListItemAction:h,renderEmptyAsStandalone:p,...f})}}))),sb=W.kosComponent(({table:e,tableContainerRef:t,trClassName:o,isEmpty:n,emptyState:r,numColumns:s})=>{const{rows:l}=e.getRowModel(),a=eb({count:l.length,estimateSize:()=>33,getScrollElement:()=>t.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?u=>u==null?void 0:u.getBoundingClientRect().height:void 0,overscan:5});return i.jsx(db,{style:{position:"relative",height:`${a.getTotalSize()}px`},children:n?i.jsx(kt,{children:i.jsx(jo,{colSpan:s,children:r??null})}):a.getVirtualItems().map(u=>{const h=l[u.index];return i.jsx(ib,{trClassName:o,row:h,virtualRow:u,rowVirtualizer:a},h.id)})})}),ib=W.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n})=>i.jsx(kt,{"data-index":o.index,ref:r=>n.measureElement(r),className:e,style:{display:"flex",position:"absolute",transform:`translateY(${o.start}px)`,width:"100%"},children:t.getVisibleCells().map(r=>{var s;return i.jsx(jo,{style:{display:"flex",width:((s=r.column.columnDef.meta)==null?void 0:s.width)??r.column.getSize()},children:ve.flexRender(r.column.columnDef.cell,r.getContext())},r.id)})},t.id)),ab=g.div`
|
|
2887
3008
|
width: 100%;
|
|
2888
3009
|
display: grid;
|
|
2889
3010
|
overflow: auto;
|
|
2890
|
-
`,
|
|
3011
|
+
`,lb=g.table`
|
|
2891
3012
|
width: 100%;
|
|
2892
3013
|
border-collapse: collapse;
|
|
2893
|
-
font-family: ${
|
|
3014
|
+
font-family: ${Fi("font-family")};
|
|
2894
3015
|
table-layout: fixed;
|
|
2895
|
-
`,
|
|
3016
|
+
`,cb=g.thead`
|
|
2896
3017
|
width: 100%;
|
|
2897
3018
|
position: sticky;
|
|
2898
|
-
background-color: ${
|
|
3019
|
+
background-color: ${Fi("header-background-color")};
|
|
2899
3020
|
top: 0;
|
|
2900
3021
|
z-index: 1;
|
|
2901
|
-
`,
|
|
3022
|
+
`,db=g.tbody`
|
|
2902
3023
|
width: 100%;
|
|
2903
|
-
`,[
|
|
3024
|
+
`,[yt]=z(["button"]),ub=d.memo(({onClick:e,open:t,buttonText:o,text:n})=>i.jsx(hb,{open:t,children:i.jsxs(pb,{children:[i.jsx(E,{variant:"h2",color:"light",children:n}),i.jsx(Pe,{variant:"borderless",text:o,onClick:e})]})})),hb=g(Ms)`
|
|
2904
3025
|
z-index: 5;
|
|
2905
|
-
`,
|
|
3026
|
+
`,pb=g.div`
|
|
2906
3027
|
display: flex;
|
|
2907
3028
|
align-items: center;
|
|
2908
3029
|
justify-content: center;
|
|
2909
3030
|
flex-direction: column;
|
|
2910
3031
|
row-gap: ${c("spacing-12")};
|
|
2911
|
-
${`${
|
|
2912
|
-
${`${
|
|
2913
|
-
${`${
|
|
2914
|
-
${`${
|
|
2915
|
-
${`${
|
|
2916
|
-
${`${
|
|
2917
|
-
`;function im(e,t,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:o}).format(t).split(/\s/g).slice(2).join(" ")}const Mo={},Mt={};function rt(e,t){try{const n=(Mo[e]||(Mo[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in Mt?Mt[n]:sr(n,n.split(":"))}catch{if(e in Mt)return Mt[e];const o=e==null?void 0:e.match(am);return o?sr(e,o.slice(1)):NaN}}const am=/([+-]\d\d):?(\d\d)?/;function sr(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Mt[e]=o*60+n>0?o*60+n+r:o*60-n-r}class Fe extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(rt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),ni(this),Yo(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new Fe(...o,t):new Fe(Date.now(),t)}withTimeZone(t){return new Fe(+this,t)}getTimezoneOffset(){const t=-rt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Yo(this),+this}[Symbol.for("constructDateFrom")](t){return new Fe(+new Date(t),this.timeZone)}}const ir=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ir.test(e))return;const t=e.replace(ir,"$1UTC");Fe.prototype[t]&&(e.startsWith("get")?Fe.prototype[e]=function(){return this.internal[t]()}:(Fe.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),lm(this),+this},Fe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Yo(this),+this}))});function Yo(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-rt(e.timeZone,e)*60))}function lm(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),ni(e)}function ni(e){const t=rt(e.timeZone,e),o=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),a=r-s,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const u=r-o;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const f=new Date(+e);f.setUTCSeconds(0);const p=r>0?f.getSeconds():(f.getSeconds()-60)%60,h=Math.round(-(rt(e.timeZone,e)*60))%60;(h||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+h),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+h+p));const m=rt(e.timeZone,e),x=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-x,k=x!==o,w=y-u;if(k&&w){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w);const $=rt(e.timeZone,e),v=$>0?Math.floor($):Math.ceil($),S=x-v;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class re extends Fe{static tz(t,...o){return o.length?new re(...o,t):new re(Date.now(),t)}toISOString(){const[t,o,n]=this.tzComponents(),r=`${t}${o}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,o,n,r]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${n} ${o} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[o,n,r]=this.tzComponents();return`${t} GMT${o}${n}${r} (${im(this.timeZone,this)})`}toLocaleString(t,o){return Date.prototype.toLocaleString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleDateString(t,o){return Date.prototype.toLocaleDateString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleTimeString(t,o){return Date.prototype.toLocaleTimeString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),o=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),r=String(Math.abs(t)%60).padStart(2,"0");return[o,n,r]}withTimeZone(t){return new re(+this,t)}[Symbol.for("constructDateFrom")](t){return new re(+new Date(t),this.timeZone)}}const cm={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},dm=(e,t,o)=>{let n;const r=cm[e];return typeof r=="string"?n=r:t===1?n=r.one:n=r.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+n:n+" ago":n};function Eo(e){return(t={})=>{const o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const um={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},fm={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hm={date:Eo({formats:um,defaultWidth:"full"}),time:Eo({formats:fm,defaultWidth:"full"}),dateTime:Eo({formats:pm,defaultWidth:"full"})},gm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mm=(e,t,o,n)=>gm[e];function Tt(e){return(t,o)=>{const n=o!=null&&o.context?String(o.context):"standalone";let r;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=o!=null&&o.width?String(o.width):a;r=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=o!=null&&o.width?String(o.width):e.defaultWidth;r=e.values[l]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return r[s]}}const bm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xm={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ym={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},km={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Cm=(e,t)=>{const o=Number(e),n=o%100;if(n>20||n<10)switch(n%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},$m={ordinalNumber:Cm,era:Tt({values:bm,defaultWidth:"wide"}),quarter:Tt({values:xm,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Tt({values:ym,defaultWidth:"wide"}),day:Tt({values:km,defaultWidth:"wide"}),dayPeriod:Tt({values:vm,defaultWidth:"wide",formattingValues:wm,defaultFormattingWidth:"wide"})};function Dt(e){return(t,o={})=>{const n=o.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const a=s[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?jm(l,h=>h.test(a)):Sm(l,h=>h.test(a));let f;f=e.valueCallback?e.valueCallback(u):u,f=o.valueCallback?o.valueCallback(f):f;const p=t.slice(a.length);return{value:f,rest:p}}}function Sm(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function jm(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function Tm(e){return(t,o={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=o.valueCallback?o.valueCallback(a):a;const l=t.slice(r.length);return{value:a,rest:l}}}const Dm=/^(\d+)(th|st|nd|rd)?/i,Mm=/\d+/i,Em={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zm={any:[/^b/i,/^(a|c)/i]},Om={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Im={any:[/1/i,/2/i,/3/i,/4/i]},Rm={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Nm={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fm={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Am={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_m={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Lm={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Wm={ordinalNumber:Tm({matchPattern:Dm,parsePattern:Mm,valueCallback:e=>parseInt(e,10)}),era:Dt({matchPatterns:Em,defaultMatchWidth:"wide",parsePatterns:zm,defaultParseWidth:"any"}),quarter:Dt({matchPatterns:Om,defaultMatchWidth:"wide",parsePatterns:Im,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Dt({matchPatterns:Rm,defaultMatchWidth:"wide",parsePatterns:Nm,defaultParseWidth:"any"}),day:Dt({matchPatterns:Fm,defaultMatchWidth:"wide",parsePatterns:Am,defaultParseWidth:"any"}),dayPeriod:Dt({matchPatterns:_m,defaultMatchWidth:"any",parsePatterns:Lm,defaultParseWidth:"any"})},ri={code:"en-US",formatDistance:dm,formatLong:hm,formatRelative:mm,localize:$m,match:Wm,options:{weekStartsOn:0,firstWeekContainsDate:1}},ar=5,Bm=4;function Pm(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,ar*7-1);return t.getMonth(e)===t.getMonth(s)?ar:Bm}function si(e,t){const o=t.startOfMonth(e),n=o.getDay();return n===1?o:n===0?t.addDays(o,-1*6):t.addDays(o,-1*(n-1))}function Hm(e,t){const o=si(e,t),n=Pm(e,t);return t.addDays(o,n*7-1)}class qe{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?re.tz(this.options.timeZone):new this.Date},this.newDate=(n,r,s)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(n,r,s):this.options.timeZone?new re(n,r,s,this.options.timeZone):new Date(n,r,s)},this.addDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,r):Y.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):Y.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):Y.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):Y.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):Y.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):Y.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):Y.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):Hm(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):Y.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):Y.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):Y.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):Y.endOfYear(n)},this.format=(n,r,s)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(n,r,this.options):Y.format(n,r,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.getISOWeek?this.overrides.getISOWeek(n):Y.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):Y.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):Y.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):Y.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):Y.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):Y.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):Y.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):Y.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):Y.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):Y.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):Y.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):Y.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):Y.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):Y.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):si(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):Y.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):Y.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):Y.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):Y.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):Y.startOfYear(n)},this.options={locale:ri,...t},this.overrides=o}getDigitMap(){const{numerals:t="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let r=0;r<10;r++)n[r.toString()]=o.format(r);return n}replaceDigits(t){const o=this.getDigitMap();return t.replace(/\d/g,n=>o[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}}const Be=new qe;class ii{constructor(t,o,n=Be){this.date=t,this.displayMonth=o,this.outside=!!(o&&!n.isSameMonth(t,o)),this.dateLib=n}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Vm{constructor(t,o){this.date=t,this.weeks=o}}class Gm{constructor(t,o){this.days=o,this.weekNumber=t}}function Um(e){return d.createElement("button",{...e})}function Ym(e){return d.createElement("span",{...e})}function Km(e){const{size:t=24,orientation:o="left",className:n}=e;return d.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},o==="up"&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function qm(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function Zm(e){const{day:t,modifiers:o,...n}=e,r=d.useRef(null);return d.useEffect(()=>{var s;o.focused&&((s=r.current)==null||s.focus())},[o.focused]),d.createElement("button",{ref:r,...n})}var A;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(A||(A={}));var Q;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Q||(Q={}));var Ee;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Ee||(Ee={}));var ue;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ue||(ue={}));function Xm(e){const{options:t,className:o,components:n,classNames:r,...s}=e,a=[r[A.Dropdown],o].join(" "),l=t==null?void 0:t.find(({value:u})=>u===s.value);return d.createElement("span",{"data-disabled":s.disabled,className:r[A.DropdownRoot]},d.createElement(n.Select,{className:a,...s},t==null?void 0:t.map(({value:u,label:f,disabled:p})=>d.createElement(n.Option,{key:u,value:u,disabled:p},f))),d.createElement("span",{className:r[A.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[A.Chevron]})))}function Jm(e){return d.createElement("div",{...e})}function Qm(e){return d.createElement("div",{...e})}function eb(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function tb(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function ob(e){return d.createElement("table",{...e})}function nb(e){return d.createElement("div",{...e})}const ai=d.createContext(void 0);function Pt(){const e=d.useContext(ai);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function rb(e){const{components:t}=Pt();return d.createElement(t.Dropdown,{...e})}function sb(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:r,...s}=e,{components:a,classNames:l,labels:{labelPrevious:u,labelNext:f}}=Pt(),p=d.useCallback(m=>{r&&(o==null||o(m))},[r,o]),h=d.useCallback(m=>{n&&(t==null||t(m))},[n,t]);return d.createElement("nav",{...s},d.createElement(a.PreviousMonthButton,{type:"button",className:l[A.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":u(n),onClick:h},d.createElement(a.Chevron,{disabled:n?void 0:!0,className:l[A.Chevron],orientation:"left"})),d.createElement(a.NextMonthButton,{type:"button",className:l[A.NextMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":f(r),onClick:p},d.createElement(a.Chevron,{disabled:r?void 0:!0,orientation:"right",className:l[A.Chevron]})))}function ib(e){const{components:t}=Pt();return d.createElement(t.Button,{...e})}function ab(e){return d.createElement("option",{...e})}function lb(e){const{components:t}=Pt();return d.createElement(t.Button,{...e})}function cb(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function db(e){return d.createElement("select",{...e})}function ub(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function fb(e){return d.createElement("th",{...e})}function pb(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function hb(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function gb(e){return d.createElement("th",{...e})}function mb(e){return d.createElement("tbody",{...e})}function bb(e){const{components:t}=Pt();return d.createElement(t.Dropdown,{...e})}const xb=Object.freeze(Object.defineProperty({__proto__:null,Button:Um,CaptionLabel:Ym,Chevron:Km,Day:qm,DayButton:Zm,Dropdown:Xm,DropdownNav:Jm,Footer:Qm,Month:eb,MonthCaption:tb,MonthGrid:ob,Months:nb,MonthsDropdown:rb,Nav:sb,NextMonthButton:ib,Option:ab,PreviousMonthButton:lb,Root:cb,Select:db,Week:ub,WeekNumber:hb,WeekNumberHeader:gb,Weekday:fb,Weekdays:pb,Weeks:mb,YearsDropdown:bb},Symbol.toStringTag,{value:"Module"}));function Ve(e,t,o=!1,n=Be){let{from:r,to:s}=e;const{differenceInCalendarDays:a,isSameDay:l}=n;return r&&s?(a(s,r)<0&&([r,s]=[s,r]),a(t,r)>=(o?1:0)&&a(s,t)>=(o?1:0)):!o&&s?l(s,t):!o&&r?l(r,t):!1}function li(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Dn(e){return!!(e&&typeof e=="object"&&"from"in e)}function ci(e){return!!(e&&typeof e=="object"&&"after"in e)}function di(e){return!!(e&&typeof e=="object"&&"before"in e)}function ui(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function fi(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ge(e,t,o=Be){const n=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:s,isAfter:a}=o;return n.some(l=>{if(typeof l=="boolean")return l;if(o.isDate(l))return r(e,l);if(fi(l,o))return l.includes(e);if(Dn(l))return Ve(l,e,!1,o);if(ui(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(li(l)){const u=s(l.before,e),f=s(l.after,e),p=u>0,h=f<0;return a(l.before,l.after)?h&&p:p||h}return ci(l)?s(e,l.after)>0:di(l)?s(l.before,e)>0:typeof l=="function"?l(e):!1})}function yb(e,t,o,n,r){const{disabled:s,hidden:a,modifiers:l,showOutsideDays:u,broadcastCalendar:f,today:p}=t,{isSameDay:h,isSameMonth:m,startOfMonth:x,isBefore:b,endOfMonth:y,isAfter:k}=r,w=o&&x(o),$=n&&y(n),v={[Q.focused]:[],[Q.outside]:[],[Q.disabled]:[],[Q.hidden]:[],[Q.today]:[]},S={};for(const C of e){const{date:T,displayMonth:j}=C,D=!!(j&&!m(T,j)),W=!!(w&&b(T,w)),V=!!($&&k(T,$)),R=!!(s&&Ge(T,s,r)),N=!!(a&&Ge(T,a,r))||W||V||!f&&!u&&D||f&&u===!1&&D,q=h(T,p??r.today());D&&v.outside.push(C),R&&v.disabled.push(C),N&&v.hidden.push(C),q&&v.today.push(C),l&&Object.keys(l).forEach(oe=>{const te=l==null?void 0:l[oe];te&&Ge(T,te,r)&&(S[oe]?S[oe].push(C):S[oe]=[C])})}return C=>{const T={[Q.focused]:!1,[Q.disabled]:!1,[Q.hidden]:!1,[Q.outside]:!1,[Q.today]:!1},j={};for(const D in v){const W=v[D];T[D]=W.some(V=>V===C)}for(const D in S)j[D]=S[D].some(W=>W===C);return{...T,...j}}}function kb(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[Q[s]]?r.push(t[Q[s]]):t[Ee[s]]&&r.push(t[Ee[s]]),r),[t[A.Day]])}function vb(e){return{...xb,...e}}function wb(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([o,n])=>{o.startsWith("data-")&&(t[o]=n)}),t}function Cb(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in Q)e[Q[t]]=`rdp-${Q[t]}`;for(const t in Ee)e[Ee[t]]=`rdp-${Ee[t]}`;for(const t in ue)e[ue[t]]=`rdp-${ue[t]}`;return e}function pi(e,t,o){return(o??new qe(t)).format(e,"LLLL y")}const $b=pi;function Sb(e,t,o){return(o??new qe(t)).format(e,"d")}function jb(e,t=Be){return t.format(e,"LLLL")}function Tb(e,t,o){return(o??new qe(t)).format(e,"cccccc")}function Db(e,t=Be){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Mb(){return""}function hi(e,t=Be){return t.format(e,"yyyy")}const Eb=hi,zb=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:pi,formatDay:Sb,formatMonthCaption:$b,formatMonthDropdown:jb,formatWeekNumber:Db,formatWeekNumberHeader:Mb,formatWeekdayName:Tb,formatYearCaption:Eb,formatYearDropdown:hi},Symbol.toStringTag,{value:"Module"}));function Ob(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...zb,...e}}function Ib(e,t,o,n,r){const{startOfMonth:s,startOfYear:a,endOfYear:l,eachMonthOfInterval:u,getMonth:f}=r;return u({start:a(e),end:l(e)}).map(m=>{const x=n.formatMonthDropdown(m,r),b=f(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:b,label:x,disabled:y}})}function Rb(e,t={},o={}){let n={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function Nb(e,t,o){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),s=[];for(let a=0;a<7;a++){const l=e.addDays(r,a);s.push(l)}return s}function Fb(e,t,o,n,r=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,addYears:l,getYear:u,isBefore:f,isSameYear:p}=n,h=s(e),m=a(t),x=[];let b=h;for(;f(b,m)||p(b,m);)x.push(b),b=l(b,1);return r&&x.reverse(),x.map(y=>{const k=o.formatYearDropdown(y,n);return{value:u(y),label:k,disabled:!1}})}function gi(e,t,o,n){let r=(n??new qe(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const Ab=gi;function mi(e,t,o){return(o??new qe(t)).format(e,"LLLL y")}const _b=mi;function Lb(e,t,o,n){let r=(n??new qe(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function Wb(e){return"Choose the Month"}function Bb(){return""}function Pb(e){return"Go to the Next Month"}function Hb(e){return"Go to the Previous Month"}function Vb(e,t,o){return(o??new qe(t)).format(e,"cccc")}function Gb(e,t){return`Week ${e}`}function Ub(e){return"Week Number"}function Yb(e){return"Choose the Year"}const Kb=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:_b,labelDay:Ab,labelDayButton:gi,labelGrid:mi,labelGridcell:Lb,labelMonthDropdown:Wb,labelNav:Bb,labelNext:Pb,labelPrevious:Hb,labelWeekNumber:Gb,labelWeekNumberHeader:Ub,labelWeekday:Vb,labelYearDropdown:Yb},Symbol.toStringTag,{value:"Module"})),Ht=e=>e instanceof HTMLElement?e:null,zo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],qb=e=>Ht(e.querySelector("[data-animated-month]")),Oo=e=>Ht(e.querySelector("[data-animated-caption]")),Io=e=>Ht(e.querySelector("[data-animated-weeks]")),Zb=e=>Ht(e.querySelector("[data-animated-nav]")),Xb=e=>Ht(e.querySelector("[data-animated-weekdays]"));function Jb(e,t,{classNames:o,months:n,focused:r,dateLib:s}){const a=d.useRef(null),l=d.useRef(n),u=d.useRef(!1);d.useLayoutEffect(()=>{const f=l.current;if(l.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||f.length===0||n.length!==f.length)return;const p=s.isSameMonth(n[0].date,f[0].date),h=s.isAfter(n[0].date,f[0].date),m=h?o[ue.caption_after_enter]:o[ue.caption_before_enter],x=h?o[ue.weeks_after_enter]:o[ue.weeks_before_enter],b=a.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(zo(y).forEach(v=>{if(!(v instanceof HTMLElement))return;const S=qb(v);S&&v.contains(S)&&v.removeChild(S);const C=Oo(v);C&&C.classList.remove(m);const T=Io(v);T&&T.classList.remove(x)}),a.current=y):a.current=null,u.current||p||r)return;const k=b instanceof HTMLElement?zo(b):[],w=zo(e.current);if(w!=null&&w.every($=>$ instanceof HTMLElement)&&k&&k.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=Zb(e.current);$&&($.style.zIndex="1"),w.forEach((v,S)=>{const C=k[S];if(!C)return;v.style.position="relative",v.style.overflow="hidden";const T=Oo(v);T&&T.classList.add(m);const j=Io(v);j&&j.classList.add(x);const D=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),T&&T.classList.remove(m),j&&j.classList.remove(x),v.style.position="",v.style.overflow="",v.contains(C)&&v.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const W=Xb(C);W&&(W.style.opacity="0");const V=Oo(C);V&&(V.classList.add(h?o[ue.caption_before_exit]:o[ue.caption_after_exit]),V.addEventListener("animationend",D));const R=Io(C);R&&R.classList.add(h?o[ue.weeks_before_exit]:o[ue.weeks_after_exit]),v.insertBefore(C,v.firstChild)})}})}function Qb(e,t,o,n){const r=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:u}=o??{},{addDays:f,differenceInCalendarDays:p,differenceInCalendarMonths:h,endOfBroadcastWeek:m,endOfISOWeek:x,endOfMonth:b,endOfWeek:y,isAfter:k,startOfBroadcastWeek:w,startOfISOWeek:$,startOfWeek:v}=n,S=u?w(r,n):a?$(r):v(r),C=u?m(s):a?x(b(s)):y(b(s)),T=p(C,S),j=h(s,r)+1,D=[];for(let R=0;R<=T;R++){const N=f(S,R);if(t&&k(N,t))break;D.push(N)}const V=(u?35:42)*j;if(l&&D.length<V){const R=V-D.length;for(let N=0;N<R;N++){const q=f(D[D.length-1],1);D.push(q)}}return D}function ex(e){const t=[];return e.reduce((o,n)=>{const r=n.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return o.concat(r.slice())},t.slice())}function tx(e,t,o,n){const{numberOfMonths:r=1}=o,s=[];for(let a=0;a<r;a++){const l=n.addMonths(e,a);if(t&&l>t)break;s.push(l)}return s}function lr(e,t,o,n){const{month:r,defaultMonth:s,today:a=n.today(),numberOfMonths:l=1}=e;let u=r||s||a;const{differenceInCalendarMonths:f,addMonths:p,startOfMonth:h}=n;if(o&&f(o,u)<l-1){const m=-1*(l-1);u=p(o,m)}return t&&f(u,t)<0&&(u=t),h(u)}function ox(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:l,endOfWeek:u,getISOWeek:f,getWeek:p,startOfBroadcastWeek:h,startOfISOWeek:m,startOfWeek:x}=n,b=e.reduce((y,k)=>{const w=o.broadcastCalendar?h(k,n):o.ISOWeek?m(k):x(k),$=o.broadcastCalendar?s(k):o.ISOWeek?a(l(k)):u(l(k)),v=t.filter(j=>j>=w&&j<=$),S=o.broadcastCalendar?35:42;if(o.fixedWeeks&&v.length<S){const j=t.filter(D=>{const W=S-v.length;return D>$&&D<=r($,W)});v.push(...j)}const C=v.reduce((j,D)=>{const W=o.ISOWeek?f(D):p(D),V=j.find(N=>N.weekNumber===W),R=new ii(D,k,n);return V?V.days.push(R):j.push(new Gm(W,[R])),j},[]),T=new Vm(k,C);return y.push(T),y},[]);return o.reverseMonths?b.reverse():b}function nx(e,t){let{startMonth:o,endMonth:n}=e;const{startOfYear:r,startOfDay:s,startOfMonth:a,endOfMonth:l,addYears:u,endOfYear:f,newDate:p,today:h}=t,{fromYear:m,toYear:x,fromMonth:b,toMonth:y}=e;!o&&b&&(o=b),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&x&&(n=p(x,11,31));const k=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=a(o):m?o=p(m,0,1):!o&&k&&(o=r(u(e.today??h(),-100))),n?n=l(n):x?n=p(x,11,31):!n&&k&&(n=f(e.today??h())),[o&&s(o),n&&s(n)]}function rx(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s=1}=o,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:u}=n,f=r?s:1,p=a(e);if(!t)return l(p,f);if(!(u(t,e)<s))return l(p,f)}function sx(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s}=o,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:u}=n,f=r?s??1:1,p=a(e);if(!t)return l(p,-f);if(!(u(p,t)<=0))return l(p,-f)}function ix(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function mo(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function ax(e,t){const[o,n]=nx(e,t),{startOfMonth:r,endOfMonth:s}=t,a=lr(e,o,n,t),[l,u]=mo(a,e.month?a:void 0);d.useEffect(()=>{const T=lr(e,o,n,t);u(T)},[e.timeZone]);const f=tx(l,n,e,t),p=Qb(f,e.endMonth?s(e.endMonth):void 0,e,t),h=ox(f,p,e,t),m=ix(h),x=ex(h),b=sx(l,o,e,t),y=rx(l,n,e,t),{disableNavigation:k,onMonthChange:w}=e,$=T=>m.some(j=>j.days.some(D=>D.isEqualTo(T))),v=T=>{if(k)return;let j=r(T);o&&j<r(o)&&(j=r(o)),n&&j>r(n)&&(j=r(n)),u(j),w==null||w(j)};return{months:h,weeks:m,days:x,navStart:o,navEnd:n,previousMonth:b,nextMonth:y,goToMonth:v,goToDay:T=>{$(T)||v(T.date)}}}var Ie;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ie||(Ie={}));function cr(e){return!e[Q.disabled]&&!e[Q.hidden]&&!e[Q.outside]}function lx(e,t,o,n){let r,s=-1;for(const a of e){const l=t(a);cr(l)&&(l[Q.focused]&&s<Ie.FocusedModifier?(r=a,s=Ie.FocusedModifier):n!=null&&n.isEqualTo(a)&&s<Ie.LastFocused?(r=a,s=Ie.LastFocused):o(a.date)&&s<Ie.Selected?(r=a,s=Ie.Selected):l[Q.today]&&s<Ie.Today&&(r=a,s=Ie.Today))}return r||(r=e.find(a=>cr(t(a)))),r}function cx(e,t,o,n,r,s,a){const{ISOWeek:l,broadcastCalendar:u}=s,{addDays:f,addMonths:p,addWeeks:h,addYears:m,endOfBroadcastWeek:x,endOfISOWeek:b,endOfWeek:y,max:k,min:w,startOfBroadcastWeek:$,startOfISOWeek:v,startOfWeek:S}=a;let T={day:f,week:h,month:p,year:m,startOfWeek:j=>u?$(j,a):l?v(j):S(j),endOfWeek:j=>u?x(j):l?b(j):y(j)}[e](o,t==="after"?1:-1);return t==="before"&&n?T=k([n,T]):t==="after"&&r&&(T=w([r,T])),T}function bi(e,t,o,n,r,s,a,l=0){if(l>365)return;const u=cx(e,t,o.date,n,r,s,a),f=!!(s.disabled&&Ge(u,s.disabled,a)),p=!!(s.hidden&&Ge(u,s.hidden,a)),h=u,m=new ii(u,h,a);return!f&&!p?m:bi(e,t,m,n,r,s,a,l+1)}function dx(e,t,o,n,r){const{autoFocus:s}=e,[a,l]=d.useState(),u=lx(t.days,o,n||(()=>!1),a),[f,p]=d.useState(s?u:void 0);return{isFocusTarget:y=>!!(u!=null&&u.isEqualTo(y)),setFocused:p,focused:f,blur:()=>{l(f),p(void 0)},moveFocus:(y,k)=>{if(!f)return;const w=bi(y,k,f,t.navStart,t.navEnd,e,r);w&&(t.goToDay(w),p(w))}}}function ux(e,t){const{selected:o,required:n,onSelect:r}=e,[s,a]=mo(o,r?o:void 0),l=r?o:s,{isSameDay:u}=t,f=x=>(l==null?void 0:l.some(b=>u(b,x)))??!1,{min:p,max:h}=e;return{selected:l,select:(x,b,y)=>{let k=[...l??[]];if(f(x)){if((l==null?void 0:l.length)===p||n&&(l==null?void 0:l.length)===1)return;k=l==null?void 0:l.filter(w=>!u(w,x))}else(l==null?void 0:l.length)===h?k=[x]:k=[...k,x];return r||a(k),r==null||r(k,x,b,y),k},isSelected:f}}function fx(e,t,o=0,n=0,r=!1,s=Be){const{from:a,to:l}=t||{},{isSameDay:u,isAfter:f,isBefore:p}=s;let h;if(!a&&!l)h={from:e,to:o>0?void 0:e};else if(a&&!l)u(a,e)?o===0?h={from:a,to:e}:r?h={from:a,to:void 0}:h=void 0:p(e,a)?h={from:e,to:a}:h={from:a,to:e};else if(a&&l)if(u(a,e)&&u(l,e))r?h={from:a,to:l}:h=void 0;else if(u(a,e))h={from:a,to:o>0?void 0:e};else if(u(l,e))h={from:e,to:o>0?void 0:e};else if(p(e,a))h={from:e,to:l};else if(f(e,a))h={from:a,to:e};else if(f(e,l))h={from:a,to:e};else throw new Error("Invalid range");if(h!=null&&h.from&&(h!=null&&h.to)){const m=s.differenceInCalendarDays(h.to,h.from);n>0&&m>n?h={from:e,to:void 0}:o>1&&m<o&&(h={from:e,to:void 0})}return h}function px(e,t,o=Be){const n=Array.isArray(t)?t:[t];let r=e.from;const s=o.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let l=0;l<=a;l++){if(n.includes(r.getDay()))return!0;r=o.addDays(r,1)}return!1}function dr(e,t,o=Be){return Ve(e,t.from,!1,o)||Ve(e,t.to,!1,o)||Ve(t,e.from,!1,o)||Ve(t,e.to,!1,o)}function hx(e,t,o=Be){const n=Array.isArray(t)?t:[t];if(n.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:o.isDate(l)?Ve(e,l,!1,o):fi(l,o)?l.some(u=>Ve(e,u,!1,o)):Dn(l)?l.from&&l.to?dr(e,{from:l.from,to:l.to},o):!1:ui(l)?px(e,l.dayOfWeek,o):li(l)?o.isAfter(l.before,l.after)?dr(e,{from:o.addDays(l.after,1),to:o.addDays(l.before,-1)},o):Ge(e.from,l,o)||Ge(e.to,l,o):ci(l)||di(l)?Ge(e.from,l,o)||Ge(e.to,l,o):!1))return!0;const a=n.filter(l=>typeof l=="function");if(a.length){let l=e.from;const u=o.differenceInCalendarDays(e.to,e.from);for(let f=0;f<=u;f++){if(a.some(p=>p(l)))return!0;l=o.addDays(l,1)}}return!1}function gx(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:a}=e,[l,u]=mo(r,a?r:void 0),f=a?r:l;return{selected:f,select:(m,x,b)=>{const{min:y,max:k}=e,w=m?fx(m,f,y,k,s,t):void 0;return n&&o&&(w!=null&&w.from)&&w.to&&hx({from:w.from,to:w.to},o,t)&&(w.from=m,w.to=void 0),a||u(w),a==null||a(w,m,x,b),w},isSelected:m=>f&&Ve(f,m,!1,t)}}function mx(e,t){const{selected:o,required:n,onSelect:r}=e,[s,a]=mo(o,r?o:void 0),l=r?o:s,{isSameDay:u}=t;return{selected:l,select:(h,m,x)=>{let b=h;return!n&&l&&l&&u(h,l)&&(b=void 0),r||a(b),r==null||r(b,h,m,x),b},isSelected:h=>l?u(l,h):!1}}function bx(e,t){const o=mx(e,t),n=ux(e,t),r=gx(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function xx(e){var Rn;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new re(t.today,t.timeZone)),t.month&&(t.month=new re(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new re(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new re(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new re(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new re(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Rn=t.selected)==null?void 0:Rn.map(H=>new re(H,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new re(t.selected.from,t.timeZone):void 0,to:t.selected.to?new re(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:a,classNames:l}=d.useMemo(()=>{const H={...ri,...t.locale};return{dateLib:new qe({locale:H,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:vb(t.components),formatters:Ob(t.formatters),labels:{...Kb,...t.labels},locale:H,classNames:{...Cb(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:u,mode:f,navLayout:p,numberOfMonths:h=1,onDayBlur:m,onDayClick:x,onDayFocus:b,onDayKeyDown:y,onDayMouseEnter:k,onDayMouseLeave:w,onNextClick:$,onPrevClick:v,showWeekNumber:S,styles:C}=t,{formatCaption:T,formatDay:j,formatMonthDropdown:D,formatWeekNumber:W,formatWeekNumberHeader:V,formatWeekdayName:R,formatYearDropdown:N}=n,q=ax(t,s),{days:oe,months:te,navStart:st,navEnd:kt,previousMonth:le,nextMonth:ce,goToMonth:ee}=q,it=yb(oe,t,st,kt,s),{isSelected:vt,select:wt,selected:Vt}=bx(t,s)??{},{blur:Mn,focused:Gt,isFocusTarget:yi,moveFocus:En,setFocused:Ut}=dx(t,q,it,vt??(()=>!1),s),{labelDayButton:ki,labelGridcell:vi,labelGrid:wi,labelMonthDropdown:Ci,labelNav:zn,labelPrevious:$i,labelNext:Si,labelWeekday:ji,labelWeekNumber:Ti,labelWeekNumberHeader:Di,labelYearDropdown:Mi}=r,Ei=d.useMemo(()=>Nb(s,t.ISOWeek),[s,t.ISOWeek]),On=f!==void 0||x!==void 0,bo=d.useCallback(()=>{le&&(ee(le),v==null||v(le))},[le,ee,v]),xo=d.useCallback(()=>{ce&&(ee(ce),$==null||$(ce))},[ee,ce,$]),zi=d.useCallback((H,Z)=>B=>{B.preventDefault(),B.stopPropagation(),Ut(H),wt==null||wt(H.date,Z,B),x==null||x(H.date,Z,B)},[wt,x,Ut]),Oi=d.useCallback((H,Z)=>B=>{Ut(H),b==null||b(H.date,Z,B)},[b,Ut]),Ii=d.useCallback((H,Z)=>B=>{Mn(),m==null||m(H.date,Z,B)},[Mn,m]),Ri=d.useCallback((H,Z)=>B=>{const X={ArrowLeft:[B.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[B.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[B.shiftKey?"year":"week","after"],ArrowUp:[B.shiftKey?"year":"week","before"],PageUp:[B.shiftKey?"year":"month","before"],PageDown:[B.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(X[B.key]){B.preventDefault(),B.stopPropagation();const[fe,U]=X[B.key];En(fe,U)}y==null||y(H.date,Z,B)},[En,y,t.dir]),Ni=d.useCallback((H,Z)=>B=>{k==null||k(H.date,Z,B)},[k]),Fi=d.useCallback((H,Z)=>B=>{w==null||w(H.date,Z,B)},[w]),Ai=d.useCallback(H=>Z=>{const B=Number(Z.target.value),X=s.setMonth(s.startOfMonth(H),B);ee(X)},[s,ee]),_i=d.useCallback(H=>Z=>{const B=Number(Z.target.value),X=s.setYear(s.startOfMonth(H),B);ee(X)},[s,ee]),{className:Li,style:Wi}=d.useMemo(()=>({className:[l[A.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[A.Root],...t.style}}),[l,t.className,t.style,C]),Bi=wb(t),In=d.useRef(null);Jb(In,!!t.animate,{classNames:l,months:te,focused:Gt,dateLib:s});const Pi={dayPickerProps:t,selected:Vt,select:wt,isSelected:vt,months:te,nextMonth:ce,previousMonth:le,goToMonth:ee,getModifiers:it,components:o,classNames:l,styles:C,labels:r,formatters:n};return d.createElement(ai.Provider,{value:Pi},d.createElement(o.Root,{rootRef:t.animate?In:void 0,className:Li,style:Wi,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Bi},d.createElement(o.Months,{className:l[A.Months],style:C==null?void 0:C[A.Months]},!t.hideNavigation&&!p&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":zn(),onPreviousClick:bo,onNextClick:xo,previousMonth:le,nextMonth:ce}),te.map((H,Z)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:l[A.Month],style:C==null?void 0:C[A.Month],key:Z,displayIndex:Z,calendarMonth:H},p==="around"&&!t.hideNavigation&&Z===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:l[A.PreviousMonthButton],tabIndex:le?void 0:-1,"aria-disabled":le?void 0:!0,"aria-label":$i(le),onClick:bo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:le?void 0:!0,className:l[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[A.MonthCaption],style:C==null?void 0:C[A.MonthCaption],calendarMonth:H,displayIndex:Z},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:l[A.Dropdowns],style:C==null?void 0:C[A.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:l[A.MonthsDropdown],"aria-label":Ci(),classNames:l,components:o,disabled:!!t.disableNavigation,onChange:Ai(H.date),options:Ib(H.date,st,kt,n,s),style:C==null?void 0:C[A.Dropdown],value:s.getMonth(H.date)}):d.createElement("span",null,D(H.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:l[A.YearsDropdown],"aria-label":Mi(s.options),classNames:l,components:o,disabled:!!t.disableNavigation,onChange:_i(H.date),options:Fb(st,kt,n,s,!!t.reverseYears),style:C==null?void 0:C[A.Dropdown],value:s.getYear(H.date)}):d.createElement("span",null,N(H.date,s)),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},T(H.date,s.options,s))):d.createElement(o.CaptionLabel,{className:l[A.CaptionLabel],role:"status","aria-live":"polite"},T(H.date,s.options,s))),p==="around"&&!t.hideNavigation&&Z===h-1&&d.createElement(o.NextMonthButton,{type:"button",className:l[A.NextMonthButton],tabIndex:ce?void 0:-1,"aria-disabled":ce?void 0:!0,"aria-label":Si(ce),onClick:xo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:ce?void 0:!0,className:l[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Z===h-1&&p==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":zn(),onPreviousClick:bo,onNextClick:xo,previousMonth:le,nextMonth:ce}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":wi(H.date,s.options,s)||void 0,className:l[A.MonthGrid],style:C==null?void 0:C[A.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[A.Weekdays],style:C==null?void 0:C[A.Weekdays]},S&&d.createElement(o.WeekNumberHeader,{"aria-label":Di(s.options),className:l[A.WeekNumberHeader],style:C==null?void 0:C[A.WeekNumberHeader],scope:"col"},V()),Ei.map(B=>d.createElement(o.Weekday,{"aria-label":ji(B,s.options,s),className:l[A.Weekday],key:String(B),style:C==null?void 0:C[A.Weekday],scope:"col"},R(B,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[A.Weeks],style:C==null?void 0:C[A.Weeks]},H.weeks.map(B=>d.createElement(o.Week,{className:l[A.Week],key:B.weekNumber,style:C==null?void 0:C[A.Week],week:B},S&&d.createElement(o.WeekNumber,{week:B,style:C==null?void 0:C[A.WeekNumber],"aria-label":Ti(B.weekNumber,{locale:a}),className:l[A.WeekNumber],scope:"row",role:"rowheader"},W(B.weekNumber,s)),B.days.map(X=>{const{date:fe}=X,U=it(X);if(U[Q.focused]=!U.hidden&&!!(Gt!=null&&Gt.isEqualTo(X)),U[Ee.selected]=(vt==null?void 0:vt(fe))||U.selected,Dn(Vt)){const{from:yo,to:ko}=Vt;U[Ee.range_start]=!!(yo&&ko&&s.isSameDay(fe,yo)),U[Ee.range_end]=!!(yo&&ko&&s.isSameDay(fe,ko)),U[Ee.range_middle]=Ve(Vt,fe,!0,s)}const Hi=Rb(U,C,t.modifiersStyles),Vi=kb(U,l,t.modifiersClassNames),Gi=!On&&!U.hidden?vi(fe,U,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(fe,"yyyy-MM-dd")}_${s.format(X.displayMonth,"yyyy-MM")}`,day:X,modifiers:U,className:Vi.join(" "),style:Hi,role:"gridcell","aria-selected":U.selected||void 0,"aria-label":Gi,"data-day":s.format(fe,"yyyy-MM-dd"),"data-month":X.outside?s.format(fe,"yyyy-MM"):void 0,"data-selected":U.selected||void 0,"data-disabled":U.disabled||void 0,"data-hidden":U.hidden||void 0,"data-outside":X.outside||void 0,"data-focused":U.focused||void 0,"data-today":U.today||void 0},!U.hidden&&On?d.createElement(o.DayButton,{className:l[A.DayButton],style:C==null?void 0:C[A.DayButton],type:"button",day:X,modifiers:U,disabled:U.disabled||void 0,tabIndex:yi(X)?0:-1,"aria-label":ki(fe,U,s.options,s),onClick:zi(X,U),onBlur:Ii(X,U),onFocus:Oi(X,U),onKeyDown:Ri(X,U),onMouseEnter:Ni(X,U),onMouseLeave:Fi(X,U)},j(fe,s.options,s)):!U.hidden&&j(X.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:l[A.Footer],style:C==null?void 0:C[A.Footer],role:"status","aria-live":"polite"},t.footer)))}const yx=d.memo(({...e})=>i.jsx(kx,{mode:"single",...e})),kx=g(xx)`
|
|
3032
|
+
${`${yt("bg-borderless",!0)}: transparent`};
|
|
3033
|
+
${`${yt("border-borderless",!0)}: transparent`};
|
|
3034
|
+
${`${yt("color-borderless",!0)}: ${c("color-white")}`};
|
|
3035
|
+
${`${yt("border-hover-borderless",!0)}: ${c("color-white")}`};
|
|
3036
|
+
${`${yt("color-hover-borderless",!0)}: ${c("color-white")}`};
|
|
3037
|
+
${`${yt("bg-hover-borderless",!0)}: transparent`};
|
|
3038
|
+
`;function fb(e,t,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:o}).format(t).split(/\s/g).slice(2).join(" ")}const Po={},Nt={};function ft(e,t){try{const n=(Po[e]||(Po[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in Nt?Nt[n]:Tr(n,n.split(":"))}catch{if(e in Nt)return Nt[e];const o=e==null?void 0:e.match(gb);return o?Tr(e,o.slice(1)):NaN}}const gb=/([+-]\d\d):?(\d\d)?/;function Tr(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Nt[e]=o*60+n>0?o*60+n+r:o*60-n-r}class We extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ft(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Ai(this),ln(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new We(...o,t):new We(Date.now(),t)}withTimeZone(t){return new We(+this,t)}getTimezoneOffset(){const t=-ft(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ln(this),+this}[Symbol.for("constructDateFrom")](t){return new We(+new Date(t),this.timeZone)}}const Er=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Er.test(e))return;const t=e.replace(Er,"$1UTC");We.prototype[t]&&(e.startsWith("get")?We.prototype[e]=function(){return this.internal[t]()}:(We.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),mb(this),+this},We.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ln(this),+this}))});function ln(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-ft(e.timeZone,e)*60))}function mb(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Ai(e)}function Ai(e){const t=ft(e.timeZone,e),o=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),l=r-s,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();l&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+l);const u=r-o;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const h=new Date(+e);h.setUTCSeconds(0);const p=r>0?h.getSeconds():(h.getSeconds()-60)%60,f=Math.round(-(ft(e.timeZone,e)*60))%60;(f||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+p));const m=ft(e.timeZone,e),x=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-x,w=x!==o,v=y-u;if(w&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const $=ft(e.timeZone,e),C=$>0?Math.floor($):Math.ceil($),S=x-C;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class le extends We{static tz(t,...o){return o.length?new le(...o,t):new le(Date.now(),t)}toISOString(){const[t,o,n]=this.tzComponents(),r=`${t}${o}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,o,n,r]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${n} ${o} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[o,n,r]=this.tzComponents();return`${t} GMT${o}${n}${r} (${fb(this.timeZone,this)})`}toLocaleString(t,o){return Date.prototype.toLocaleString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleDateString(t,o){return Date.prototype.toLocaleDateString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleTimeString(t,o){return Date.prototype.toLocaleTimeString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),o=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),r=String(Math.abs(t)%60).padStart(2,"0");return[o,n,r]}withTimeZone(t){return new le(+this,t)}[Symbol.for("constructDateFrom")](t){return new le(+new Date(t),this.timeZone)}}const bb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xb=(e,t,o)=>{let n;const r=bb[e];return typeof r=="string"?n=r:t===1?n=r.one:n=r.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+n:n+" ago":n};function Ho(e){return(t={})=>{const o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const yb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wb={date:Ho({formats:yb,defaultWidth:"full"}),time:Ho({formats:vb,defaultWidth:"full"}),dateTime:Ho({formats:kb,defaultWidth:"full"})},Cb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$b=(e,t,o,n)=>Cb[e];function Ot(e){return(t,o)=>{const n=o!=null&&o.context?String(o.context):"standalone";let r;if(n==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,a=o!=null&&o.width?String(o.width):l;r=e.formattingValues[a]||e.formattingValues[l]}else{const l=e.defaultWidth,a=o!=null&&o.width?String(o.width):e.defaultWidth;r=e.values[a]||e.values[l]}const s=e.argumentCallback?e.argumentCallback(t):t;return r[s]}}const Sb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ib={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_b={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Db={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Tb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Eb=(e,t)=>{const o=Number(e),n=o%100;if(n>20||n<10)switch(n%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},Mb={ordinalNumber:Eb,era:Ot({values:Sb,defaultWidth:"wide"}),quarter:Ot({values:jb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ot({values:Ib,defaultWidth:"wide"}),day:Ot({values:_b,defaultWidth:"wide"}),dayPeriod:Ot({values:Db,defaultWidth:"wide",formattingValues:Tb,defaultFormattingWidth:"wide"})};function Rt(e){return(t,o={})=>{const n=o.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const l=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(a)?Ob(a,f=>f.test(l)):zb(a,f=>f.test(l));let h;h=e.valueCallback?e.valueCallback(u):u,h=o.valueCallback?o.valueCallback(h):h;const p=t.slice(l.length);return{value:h,rest:p}}}function zb(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function Ob(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function Rb(e){return(t,o={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],s=t.match(e.parsePattern);if(!s)return null;let l=e.valueCallback?e.valueCallback(s[0]):s[0];l=o.valueCallback?o.valueCallback(l):l;const a=t.slice(r.length);return{value:l,rest:a}}}const Nb=/^(\d+)(th|st|nd|rd)?/i,Fb=/\d+/i,Ab={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Lb={any:[/^b/i,/^(a|c)/i]},Bb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Wb={any:[/1/i,/2/i,/3/i,/4/i]},Pb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Hb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ub={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Gb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Kb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Yb={ordinalNumber:Rb({matchPattern:Nb,parsePattern:Fb,valueCallback:e=>parseInt(e,10)}),era:Rt({matchPatterns:Ab,defaultMatchWidth:"wide",parsePatterns:Lb,defaultParseWidth:"any"}),quarter:Rt({matchPatterns:Bb,defaultMatchWidth:"wide",parsePatterns:Wb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Rt({matchPatterns:Pb,defaultMatchWidth:"wide",parsePatterns:Hb,defaultParseWidth:"any"}),day:Rt({matchPatterns:Vb,defaultMatchWidth:"wide",parsePatterns:Ub,defaultParseWidth:"any"}),dayPeriod:Rt({matchPatterns:Gb,defaultMatchWidth:"any",parsePatterns:Kb,defaultParseWidth:"any"})},Li={code:"en-US",formatDistance:xb,formatLong:wb,formatRelative:$b,localize:Mb,match:Yb,options:{weekStartsOn:0,firstWeekContainsDate:1}},Mr=5,qb=4;function Zb(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,Mr*7-1);return t.getMonth(e)===t.getMonth(s)?Mr:qb}function Bi(e,t){const o=t.startOfMonth(e),n=o.getDay();return n===1?o:n===0?t.addDays(o,-1*6):t.addDays(o,-1*(n-1))}function Xb(e,t){const o=Bi(e,t),n=Zb(e,t);return t.addDays(o,n*7-1)}class rt{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?le.tz(this.options.timeZone):new this.Date},this.newDate=(n,r,s)=>{var l;return(l=this.overrides)!=null&&l.newDate?this.overrides.newDate(n,r,s):this.options.timeZone?new le(n,r,s,this.options.timeZone):new Date(n,r,s)},this.addDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,r):Y.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):Y.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):Y.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):Y.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):Y.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):Y.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):Y.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):Xb(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):Y.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):Y.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):Y.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):Y.endOfYear(n)},this.format=(n,r,s)=>{var a;const l=(a=this.overrides)!=null&&a.format?this.overrides.format(n,r,this.options):Y.format(n,r,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(l):l},this.getISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.getISOWeek?this.overrides.getISOWeek(n):Y.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):Y.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):Y.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):Y.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):Y.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):Y.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):Y.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):Y.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):Y.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):Y.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):Y.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):Y.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):Y.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):Y.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):Bi(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):Y.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):Y.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):Y.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):Y.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):Y.startOfYear(n)},this.options={locale:Li,...t},this.overrides=o}getDigitMap(){const{numerals:t="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let r=0;r<10;r++)n[r.toString()]=o.format(r);return n}replaceDigits(t){const o=this.getDigitMap();return t.replace(/\d/g,n=>o[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}}const Ke=new rt;class Wi{constructor(t,o,n=Ke){this.date=t,this.displayMonth=o,this.outside=!!(o&&!n.isSameMonth(t,o)),this.dateLib=n}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Jb{constructor(t,o){this.date=t,this.weeks=o}}class Qb{constructor(t,o){this.days=o,this.weekNumber=t}}function ex(e){return d.createElement("button",{...e})}function tx(e){return d.createElement("span",{...e})}function ox(e){const{size:t=24,orientation:o="left",className:n}=e;return d.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},o==="up"&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function nx(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function rx(e){const{day:t,modifiers:o,...n}=e,r=d.useRef(null);return d.useEffect(()=>{var s;o.focused&&((s=r.current)==null||s.focus())},[o.focused]),d.createElement("button",{ref:r,...n})}var A;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(A||(A={}));var re;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(re||(re={}));var Oe;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Oe||(Oe={}));var fe;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(fe||(fe={}));function sx(e){const{options:t,className:o,components:n,classNames:r,...s}=e,l=[r[A.Dropdown],o].join(" "),a=t==null?void 0:t.find(({value:u})=>u===s.value);return d.createElement("span",{"data-disabled":s.disabled,className:r[A.DropdownRoot]},d.createElement(n.Select,{className:l,...s},t==null?void 0:t.map(({value:u,label:h,disabled:p})=>d.createElement(n.Option,{key:u,value:u,disabled:p},h))),d.createElement("span",{className:r[A.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[A.Chevron]})))}function ix(e){return d.createElement("div",{...e})}function ax(e){return d.createElement("div",{...e})}function lx(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function cx(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function dx(e){return d.createElement("table",{...e})}function ux(e){return d.createElement("div",{...e})}const Pi=d.createContext(void 0);function Xt(){const e=d.useContext(Pi);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function hx(e){const{components:t}=Xt();return d.createElement(t.Dropdown,{...e})}function px(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:r,...s}=e,{components:l,classNames:a,labels:{labelPrevious:u,labelNext:h}}=Xt(),p=d.useCallback(m=>{r&&(o==null||o(m))},[r,o]),f=d.useCallback(m=>{n&&(t==null||t(m))},[n,t]);return d.createElement("nav",{...s},d.createElement(l.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":u(n),onClick:f},d.createElement(l.Chevron,{disabled:n?void 0:!0,className:a[A.Chevron],orientation:"left"})),d.createElement(l.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":h(r),onClick:p},d.createElement(l.Chevron,{disabled:r?void 0:!0,orientation:"right",className:a[A.Chevron]})))}function fx(e){const{components:t}=Xt();return d.createElement(t.Button,{...e})}function gx(e){return d.createElement("option",{...e})}function mx(e){const{components:t}=Xt();return d.createElement(t.Button,{...e})}function bx(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function xx(e){return d.createElement("select",{...e})}function yx(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function vx(e){return d.createElement("th",{...e})}function kx(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function wx(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function Cx(e){return d.createElement("th",{...e})}function $x(e){return d.createElement("tbody",{...e})}function Sx(e){const{components:t}=Xt();return d.createElement(t.Dropdown,{...e})}const jx=Object.freeze(Object.defineProperty({__proto__:null,Button:ex,CaptionLabel:tx,Chevron:ox,Day:nx,DayButton:rx,Dropdown:sx,DropdownNav:ix,Footer:ax,Month:lx,MonthCaption:cx,MonthGrid:dx,Months:ux,MonthsDropdown:hx,Nav:px,NextMonthButton:fx,Option:gx,PreviousMonthButton:mx,Root:bx,Select:xx,Week:yx,WeekNumber:wx,WeekNumberHeader:Cx,Weekday:vx,Weekdays:kx,Weeks:$x,YearsDropdown:Sx},Symbol.toStringTag,{value:"Module"}));function Je(e,t,o=!1,n=Ke){let{from:r,to:s}=e;const{differenceInCalendarDays:l,isSameDay:a}=n;return r&&s?(l(s,r)<0&&([r,s]=[s,r]),l(t,r)>=(o?1:0)&&l(s,t)>=(o?1:0)):!o&&s?a(s,t):!o&&r?a(r,t):!1}function Hi(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Gn(e){return!!(e&&typeof e=="object"&&"from"in e)}function Vi(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ui(e){return!!(e&&typeof e=="object"&&"before"in e)}function Gi(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ki(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Qe(e,t,o=Ke){const n=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:s,isAfter:l}=o;return n.some(a=>{if(typeof a=="boolean")return a;if(o.isDate(a))return r(e,a);if(Ki(a,o))return a.includes(e);if(Gn(a))return Je(a,e,!1,o);if(Gi(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(Hi(a)){const u=s(a.before,e),h=s(a.after,e),p=u>0,f=h<0;return l(a.before,a.after)?f&&p:p||f}return Vi(a)?s(e,a.after)>0:Ui(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function Ix(e,t,o,n,r){const{disabled:s,hidden:l,modifiers:a,showOutsideDays:u,broadcastCalendar:h,today:p}=t,{isSameDay:f,isSameMonth:m,startOfMonth:x,isBefore:b,endOfMonth:y,isAfter:w}=r,v=o&&x(o),$=n&&y(n),C={[re.focused]:[],[re.outside]:[],[re.disabled]:[],[re.hidden]:[],[re.today]:[]},S={};for(const k of e){const{date:I,displayMonth:j}=k,_=!!(j&&!m(I,j)),B=!!(v&&b(I,v)),U=!!($&&w(I,$)),P=!!(s&&Qe(I,s,r)),L=!!(l&&Qe(I,l,r))||B||U||!h&&!u&&_||h&&u===!1&&_,Z=f(I,p??r.today());_&&C.outside.push(k),P&&C.disabled.push(k),L&&C.hidden.push(k),Z&&C.today.push(k),a&&Object.keys(a).forEach(se=>{const J=a==null?void 0:a[se];J&&Qe(I,J,r)&&(S[se]?S[se].push(k):S[se]=[k])})}return k=>{const I={[re.focused]:!1,[re.disabled]:!1,[re.hidden]:!1,[re.outside]:!1,[re.today]:!1},j={};for(const _ in C){const B=C[_];I[_]=B.some(U=>U===k)}for(const _ in S)j[_]=S[_].some(B=>B===k);return{...I,...j}}}function _x(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[re[s]]?r.push(t[re[s]]):t[Oe[s]]&&r.push(t[Oe[s]]),r),[t[A.Day]])}function Dx(e){return{...jx,...e}}function Tx(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([o,n])=>{o.startsWith("data-")&&(t[o]=n)}),t}function Ex(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in re)e[re[t]]=`rdp-${re[t]}`;for(const t in Oe)e[Oe[t]]=`rdp-${Oe[t]}`;for(const t in fe)e[fe[t]]=`rdp-${fe[t]}`;return e}function Yi(e,t,o){return(o??new rt(t)).format(e,"LLLL y")}const Mx=Yi;function zx(e,t,o){return(o??new rt(t)).format(e,"d")}function Ox(e,t=Ke){return t.format(e,"LLLL")}function Rx(e,t,o){return(o??new rt(t)).format(e,"cccccc")}function Nx(e,t=Ke){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Fx(){return""}function qi(e,t=Ke){return t.format(e,"yyyy")}const Ax=qi,Lx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Yi,formatDay:zx,formatMonthCaption:Mx,formatMonthDropdown:Ox,formatWeekNumber:Nx,formatWeekNumberHeader:Fx,formatWeekdayName:Rx,formatYearCaption:Ax,formatYearDropdown:qi},Symbol.toStringTag,{value:"Module"}));function Bx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Lx,...e}}function Wx(e,t,o,n,r){const{startOfMonth:s,startOfYear:l,endOfYear:a,eachMonthOfInterval:u,getMonth:h}=r;return u({start:l(e),end:a(e)}).map(m=>{const x=n.formatMonthDropdown(m,r),b=h(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:b,label:x,disabled:y}})}function Px(e,t={},o={}){let n={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function Hx(e,t,o){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),s=[];for(let l=0;l<7;l++){const a=e.addDays(r,l);s.push(a)}return s}function Vx(e,t,o,n,r=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:l,addYears:a,getYear:u,isBefore:h,isSameYear:p}=n,f=s(e),m=l(t),x=[];let b=f;for(;h(b,m)||p(b,m);)x.push(b),b=a(b,1);return r&&x.reverse(),x.map(y=>{const w=o.formatYearDropdown(y,n);return{value:u(y),label:w,disabled:!1}})}function Zi(e,t,o,n){let r=(n??new rt(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const Ux=Zi;function Xi(e,t,o){return(o??new rt(t)).format(e,"LLLL y")}const Gx=Xi;function Kx(e,t,o,n){let r=(n??new rt(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function Yx(e){return"Choose the Month"}function qx(){return""}function Zx(e){return"Go to the Next Month"}function Xx(e){return"Go to the Previous Month"}function Jx(e,t,o){return(o??new rt(t)).format(e,"cccc")}function Qx(e,t){return`Week ${e}`}function e0(e){return"Week Number"}function t0(e){return"Choose the Year"}const o0=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Gx,labelDay:Ux,labelDayButton:Zi,labelGrid:Xi,labelGridcell:Kx,labelMonthDropdown:Yx,labelNav:qx,labelNext:Zx,labelPrevious:Xx,labelWeekNumber:Qx,labelWeekNumberHeader:e0,labelWeekday:Jx,labelYearDropdown:t0},Symbol.toStringTag,{value:"Module"})),Jt=e=>e instanceof HTMLElement?e:null,Vo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],n0=e=>Jt(e.querySelector("[data-animated-month]")),Uo=e=>Jt(e.querySelector("[data-animated-caption]")),Go=e=>Jt(e.querySelector("[data-animated-weeks]")),r0=e=>Jt(e.querySelector("[data-animated-nav]")),s0=e=>Jt(e.querySelector("[data-animated-weekdays]"));function i0(e,t,{classNames:o,months:n,focused:r,dateLib:s}){const l=d.useRef(null),a=d.useRef(n),u=d.useRef(!1);d.useLayoutEffect(()=>{const h=a.current;if(a.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||h.length===0||n.length!==h.length)return;const p=s.isSameMonth(n[0].date,h[0].date),f=s.isAfter(n[0].date,h[0].date),m=f?o[fe.caption_after_enter]:o[fe.caption_before_enter],x=f?o[fe.weeks_after_enter]:o[fe.weeks_before_enter],b=l.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(Vo(y).forEach(C=>{if(!(C instanceof HTMLElement))return;const S=n0(C);S&&C.contains(S)&&C.removeChild(S);const k=Uo(C);k&&k.classList.remove(m);const I=Go(C);I&&I.classList.remove(x)}),l.current=y):l.current=null,u.current||p||r)return;const w=b instanceof HTMLElement?Vo(b):[],v=Vo(e.current);if(v!=null&&v.every($=>$ instanceof HTMLElement)&&w&&w.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=r0(e.current);$&&($.style.zIndex="1"),v.forEach((C,S)=>{const k=w[S];if(!k)return;C.style.position="relative",C.style.overflow="hidden";const I=Uo(C);I&&I.classList.add(m);const j=Go(C);j&&j.classList.add(x);const _=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),I&&I.classList.remove(m),j&&j.classList.remove(x),C.style.position="",C.style.overflow="",C.contains(k)&&C.removeChild(k)};k.style.pointerEvents="none",k.style.position="absolute",k.style.overflow="hidden",k.setAttribute("aria-hidden","true");const B=s0(k);B&&(B.style.opacity="0");const U=Uo(k);U&&(U.classList.add(f?o[fe.caption_before_exit]:o[fe.caption_after_exit]),U.addEventListener("animationend",_));const P=Go(k);P&&P.classList.add(f?o[fe.weeks_before_exit]:o[fe.weeks_after_exit]),C.insertBefore(k,C.firstChild)})}})}function a0(e,t,o,n){const r=e[0],s=e[e.length-1],{ISOWeek:l,fixedWeeks:a,broadcastCalendar:u}=o??{},{addDays:h,differenceInCalendarDays:p,differenceInCalendarMonths:f,endOfBroadcastWeek:m,endOfISOWeek:x,endOfMonth:b,endOfWeek:y,isAfter:w,startOfBroadcastWeek:v,startOfISOWeek:$,startOfWeek:C}=n,S=u?v(r,n):l?$(r):C(r),k=u?m(s):l?x(b(s)):y(b(s)),I=p(k,S),j=f(s,r)+1,_=[];for(let P=0;P<=I;P++){const L=h(S,P);if(t&&w(L,t))break;_.push(L)}const U=(u?35:42)*j;if(a&&_.length<U){const P=U-_.length;for(let L=0;L<P;L++){const Z=h(_[_.length-1],1);_.push(Z)}}return _}function l0(e){const t=[];return e.reduce((o,n)=>{const r=n.weeks.reduce((s,l)=>s.concat(l.days.slice()),t.slice());return o.concat(r.slice())},t.slice())}function c0(e,t,o,n){const{numberOfMonths:r=1}=o,s=[];for(let l=0;l<r;l++){const a=n.addMonths(e,l);if(t&&a>t)break;s.push(a)}return s}function zr(e,t,o,n){const{month:r,defaultMonth:s,today:l=n.today(),numberOfMonths:a=1}=e;let u=r||s||l;const{differenceInCalendarMonths:h,addMonths:p,startOfMonth:f}=n;if(o&&h(o,u)<a-1){const m=-1*(a-1);u=p(o,m)}return t&&h(u,t)<0&&(u=t),f(u)}function d0(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:l,endOfMonth:a,endOfWeek:u,getISOWeek:h,getWeek:p,startOfBroadcastWeek:f,startOfISOWeek:m,startOfWeek:x}=n,b=e.reduce((y,w)=>{const v=o.broadcastCalendar?f(w,n):o.ISOWeek?m(w):x(w),$=o.broadcastCalendar?s(w):o.ISOWeek?l(a(w)):u(a(w)),C=t.filter(j=>j>=v&&j<=$),S=o.broadcastCalendar?35:42;if(o.fixedWeeks&&C.length<S){const j=t.filter(_=>{const B=S-C.length;return _>$&&_<=r($,B)});C.push(...j)}const k=C.reduce((j,_)=>{const B=o.ISOWeek?h(_):p(_),U=j.find(L=>L.weekNumber===B),P=new Wi(_,w,n);return U?U.days.push(P):j.push(new Qb(B,[P])),j},[]),I=new Jb(w,k);return y.push(I),y},[]);return o.reverseMonths?b.reverse():b}function u0(e,t){let{startMonth:o,endMonth:n}=e;const{startOfYear:r,startOfDay:s,startOfMonth:l,endOfMonth:a,addYears:u,endOfYear:h,newDate:p,today:f}=t,{fromYear:m,toYear:x,fromMonth:b,toMonth:y}=e;!o&&b&&(o=b),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&x&&(n=p(x,11,31));const w=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=l(o):m?o=p(m,0,1):!o&&w&&(o=r(u(e.today??f(),-100))),n?n=a(n):x?n=p(x,11,31):!n&&w&&(n=h(e.today??f())),[o&&s(o),n&&s(n)]}function h0(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s=1}=o,{startOfMonth:l,addMonths:a,differenceInCalendarMonths:u}=n,h=r?s:1,p=l(e);if(!t)return a(p,h);if(!(u(t,e)<s))return a(p,h)}function p0(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s}=o,{startOfMonth:l,addMonths:a,differenceInCalendarMonths:u}=n,h=r?s??1:1,p=l(e);if(!t)return a(p,-h);if(!(u(p,t)<=0))return a(p,-h)}function f0(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function Io(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function g0(e,t){const[o,n]=u0(e,t),{startOfMonth:r,endOfMonth:s}=t,l=zr(e,o,n,t),[a,u]=Io(l,e.month?l:void 0);d.useEffect(()=>{const I=zr(e,o,n,t);u(I)},[e.timeZone]);const h=c0(a,n,e,t),p=a0(h,e.endMonth?s(e.endMonth):void 0,e,t),f=d0(h,p,e,t),m=f0(f),x=l0(f),b=p0(a,o,e,t),y=h0(a,n,e,t),{disableNavigation:w,onMonthChange:v}=e,$=I=>m.some(j=>j.days.some(_=>_.isEqualTo(I))),C=I=>{if(w)return;let j=r(I);o&&j<r(o)&&(j=r(o)),n&&j>r(n)&&(j=r(n)),u(j),v==null||v(j)};return{months:f,weeks:m,days:x,navStart:o,navEnd:n,previousMonth:b,nextMonth:y,goToMonth:C,goToDay:I=>{$(I)||C(I.date)}}}var Ae;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ae||(Ae={}));function Or(e){return!e[re.disabled]&&!e[re.hidden]&&!e[re.outside]}function m0(e,t,o,n){let r,s=-1;for(const l of e){const a=t(l);Or(a)&&(a[re.focused]&&s<Ae.FocusedModifier?(r=l,s=Ae.FocusedModifier):n!=null&&n.isEqualTo(l)&&s<Ae.LastFocused?(r=l,s=Ae.LastFocused):o(l.date)&&s<Ae.Selected?(r=l,s=Ae.Selected):a[re.today]&&s<Ae.Today&&(r=l,s=Ae.Today))}return r||(r=e.find(l=>Or(t(l)))),r}function b0(e,t,o,n,r,s,l){const{ISOWeek:a,broadcastCalendar:u}=s,{addDays:h,addMonths:p,addWeeks:f,addYears:m,endOfBroadcastWeek:x,endOfISOWeek:b,endOfWeek:y,max:w,min:v,startOfBroadcastWeek:$,startOfISOWeek:C,startOfWeek:S}=l;let I={day:h,week:f,month:p,year:m,startOfWeek:j=>u?$(j,l):a?C(j):S(j),endOfWeek:j=>u?x(j):a?b(j):y(j)}[e](o,t==="after"?1:-1);return t==="before"&&n?I=w([n,I]):t==="after"&&r&&(I=v([r,I])),I}function Ji(e,t,o,n,r,s,l,a=0){if(a>365)return;const u=b0(e,t,o.date,n,r,s,l),h=!!(s.disabled&&Qe(u,s.disabled,l)),p=!!(s.hidden&&Qe(u,s.hidden,l)),f=u,m=new Wi(u,f,l);return!h&&!p?m:Ji(e,t,m,n,r,s,l,a+1)}function x0(e,t,o,n,r){const{autoFocus:s}=e,[l,a]=d.useState(),u=m0(t.days,o,n||(()=>!1),l),[h,p]=d.useState(s?u:void 0);return{isFocusTarget:y=>!!(u!=null&&u.isEqualTo(y)),setFocused:p,focused:h,blur:()=>{a(h),p(void 0)},moveFocus:(y,w)=>{if(!h)return;const v=Ji(y,w,h,t.navStart,t.navEnd,e,r);v&&(t.goToDay(v),p(v))}}}function y0(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=Io(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t,h=x=>(a==null?void 0:a.some(b=>u(b,x)))??!1,{min:p,max:f}=e;return{selected:a,select:(x,b,y)=>{let w=[...a??[]];if(h(x)){if((a==null?void 0:a.length)===p||n&&(a==null?void 0:a.length)===1)return;w=a==null?void 0:a.filter(v=>!u(v,x))}else(a==null?void 0:a.length)===f?w=[x]:w=[...w,x];return r||l(w),r==null||r(w,x,b,y),w},isSelected:h}}function v0(e,t,o=0,n=0,r=!1,s=Ke){const{from:l,to:a}=t||{},{isSameDay:u,isAfter:h,isBefore:p}=s;let f;if(!l&&!a)f={from:e,to:o>0?void 0:e};else if(l&&!a)u(l,e)?o===0?f={from:l,to:e}:r?f={from:l,to:void 0}:f=void 0:p(e,l)?f={from:e,to:l}:f={from:l,to:e};else if(l&&a)if(u(l,e)&&u(a,e))r?f={from:l,to:a}:f=void 0;else if(u(l,e))f={from:l,to:o>0?void 0:e};else if(u(a,e))f={from:e,to:o>0?void 0:e};else if(p(e,l))f={from:e,to:a};else if(h(e,l))f={from:l,to:e};else if(h(e,a))f={from:l,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const m=s.differenceInCalendarDays(f.to,f.from);n>0&&m>n?f={from:e,to:void 0}:o>1&&m<o&&(f={from:e,to:void 0})}return f}function k0(e,t,o=Ke){const n=Array.isArray(t)?t:[t];let r=e.from;const s=o.differenceInCalendarDays(e.to,e.from),l=Math.min(s,6);for(let a=0;a<=l;a++){if(n.includes(r.getDay()))return!0;r=o.addDays(r,1)}return!1}function Rr(e,t,o=Ke){return Je(e,t.from,!1,o)||Je(e,t.to,!1,o)||Je(t,e.from,!1,o)||Je(t,e.to,!1,o)}function w0(e,t,o=Ke){const n=Array.isArray(t)?t:[t];if(n.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:o.isDate(a)?Je(e,a,!1,o):Ki(a,o)?a.some(u=>Je(e,u,!1,o)):Gn(a)?a.from&&a.to?Rr(e,{from:a.from,to:a.to},o):!1:Gi(a)?k0(e,a.dayOfWeek,o):Hi(a)?o.isAfter(a.before,a.after)?Rr(e,{from:o.addDays(a.after,1),to:o.addDays(a.before,-1)},o):Qe(e.from,a,o)||Qe(e.to,a,o):Vi(a)||Ui(a)?Qe(e.from,a,o)||Qe(e.to,a,o):!1))return!0;const l=n.filter(a=>typeof a=="function");if(l.length){let a=e.from;const u=o.differenceInCalendarDays(e.to,e.from);for(let h=0;h<=u;h++){if(l.some(p=>p(a)))return!0;a=o.addDays(a,1)}}return!1}function C0(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:l}=e,[a,u]=Io(r,l?r:void 0),h=l?r:a;return{selected:h,select:(m,x,b)=>{const{min:y,max:w}=e,v=m?v0(m,h,y,w,s,t):void 0;return n&&o&&(v!=null&&v.from)&&v.to&&w0({from:v.from,to:v.to},o,t)&&(v.from=m,v.to=void 0),l||u(v),l==null||l(v,m,x,b),v},isSelected:m=>h&&Je(h,m,!1,t)}}function $0(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=Io(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t;return{selected:a,select:(f,m,x)=>{let b=f;return!n&&a&&a&&u(f,a)&&(b=void 0),r||l(b),r==null||r(b,f,m,x),b},isSelected:f=>a?u(a,f):!1}}function S0(e,t){const o=$0(e,t),n=y0(e,t),r=C0(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function j0(e){var er;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new le(t.today,t.timeZone)),t.month&&(t.month=new le(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new le(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new le(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new le(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new le(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(er=t.selected)==null?void 0:er.map(V=>new le(V,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new le(t.selected.from,t.timeZone):void 0,to:t.selected.to?new le(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:l,classNames:a}=d.useMemo(()=>{const V={...Li,...t.locale};return{dateLib:new rt({locale:V,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Dx(t.components),formatters:Bx(t.formatters),labels:{...o0,...t.labels},locale:V,classNames:{...Ex(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:u,mode:h,navLayout:p,numberOfMonths:f=1,onDayBlur:m,onDayClick:x,onDayFocus:b,onDayKeyDown:y,onDayMouseEnter:w,onDayMouseLeave:v,onNextClick:$,onPrevClick:C,showWeekNumber:S,styles:k}=t,{formatCaption:I,formatDay:j,formatMonthDropdown:_,formatWeekNumber:B,formatWeekNumberHeader:U,formatWeekdayName:P,formatYearDropdown:L}=n,Z=g0(t,s),{days:se,months:J,navStart:X,navEnd:$e,previousMonth:ae,nextMonth:ue,goToMonth:Q}=Z,G=Ix(se,t,X,$e,s),{isSelected:ee,select:Ye,selected:Ne}=S0(t,s)??{},{blur:qn,focused:Qt,isFocusTarget:sa,moveFocus:Zn,setFocused:eo}=x0(t,Z,G,ee??(()=>!1),s),{labelDayButton:ia,labelGridcell:aa,labelGrid:la,labelMonthDropdown:ca,labelNav:Xn,labelPrevious:da,labelNext:ua,labelWeekday:ha,labelWeekNumber:pa,labelWeekNumberHeader:fa,labelYearDropdown:ga}=r,ma=d.useMemo(()=>Hx(s,t.ISOWeek),[s,t.ISOWeek]),Jn=h!==void 0||x!==void 0,_o=d.useCallback(()=>{ae&&(Q(ae),C==null||C(ae))},[ae,Q,C]),Do=d.useCallback(()=>{ue&&(Q(ue),$==null||$(ue))},[Q,ue,$]),ba=d.useCallback((V,te)=>H=>{H.preventDefault(),H.stopPropagation(),eo(V),Ye==null||Ye(V.date,te,H),x==null||x(V.date,te,H)},[Ye,x,eo]),xa=d.useCallback((V,te)=>H=>{eo(V),b==null||b(V.date,te,H)},[b,eo]),ya=d.useCallback((V,te)=>H=>{qn(),m==null||m(V.date,te,H)},[qn,m]),va=d.useCallback((V,te)=>H=>{const oe={ArrowLeft:[H.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[H.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[H.shiftKey?"year":"week","after"],ArrowUp:[H.shiftKey?"year":"week","before"],PageUp:[H.shiftKey?"year":"month","before"],PageDown:[H.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(oe[H.key]){H.preventDefault(),H.stopPropagation();const[ge,K]=oe[H.key];Zn(ge,K)}y==null||y(V.date,te,H)},[Zn,y,t.dir]),ka=d.useCallback((V,te)=>H=>{w==null||w(V.date,te,H)},[w]),wa=d.useCallback((V,te)=>H=>{v==null||v(V.date,te,H)},[v]),Ca=d.useCallback(V=>te=>{const H=Number(te.target.value),oe=s.setMonth(s.startOfMonth(V),H);Q(oe)},[s,Q]),$a=d.useCallback(V=>te=>{const H=Number(te.target.value),oe=s.setYear(s.startOfMonth(V),H);Q(oe)},[s,Q]),{className:Sa,style:ja}=d.useMemo(()=>({className:[a[A.Root],t.className].filter(Boolean).join(" "),style:{...k==null?void 0:k[A.Root],...t.style}}),[a,t.className,t.style,k]),Ia=Tx(t),Qn=d.useRef(null);i0(Qn,!!t.animate,{classNames:a,months:J,focused:Qt,dateLib:s});const _a={dayPickerProps:t,selected:Ne,select:Ye,isSelected:ee,months:J,nextMonth:ue,previousMonth:ae,goToMonth:Q,getModifiers:G,components:o,classNames:a,styles:k,labels:r,formatters:n};return d.createElement(Pi.Provider,{value:_a},d.createElement(o.Root,{rootRef:t.animate?Qn:void 0,className:Sa,style:ja,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Ia},d.createElement(o.Months,{className:a[A.Months],style:k==null?void 0:k[A.Months]},!t.hideNavigation&&!p&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:k==null?void 0:k[A.Nav],"aria-label":Xn(),onPreviousClick:_o,onNextClick:Do,previousMonth:ae,nextMonth:ue}),J.map((V,te)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:a[A.Month],style:k==null?void 0:k[A.Month],key:te,displayIndex:te,calendarMonth:V},p==="around"&&!t.hideNavigation&&te===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:ae?void 0:-1,"aria-disabled":ae?void 0:!0,"aria-label":da(ae),onClick:_o,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:ae?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[A.MonthCaption],style:k==null?void 0:k[A.MonthCaption],calendarMonth:V,displayIndex:te},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:a[A.Dropdowns],style:k==null?void 0:k[A.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:a[A.MonthsDropdown],"aria-label":ca(),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:Ca(V.date),options:Wx(V.date,X,$e,n,s),style:k==null?void 0:k[A.Dropdown],value:s.getMonth(V.date)}):d.createElement("span",null,_(V.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:a[A.YearsDropdown],"aria-label":ga(s.options),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:$a(V.date),options:Vx(X,$e,n,s,!!t.reverseYears),style:k==null?void 0:k[A.Dropdown],value:s.getYear(V.date)}):d.createElement("span",null,L(V.date,s)),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},I(V.date,s.options,s))):d.createElement(o.CaptionLabel,{className:a[A.CaptionLabel],role:"status","aria-live":"polite"},I(V.date,s.options,s))),p==="around"&&!t.hideNavigation&&te===f-1&&d.createElement(o.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:ue?void 0:-1,"aria-disabled":ue?void 0:!0,"aria-label":ua(ue),onClick:Do,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:ue?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),te===f-1&&p==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:k==null?void 0:k[A.Nav],"aria-label":Xn(),onPreviousClick:_o,onNextClick:Do,previousMonth:ae,nextMonth:ue}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":h==="multiple"||h==="range","aria-label":la(V.date,s.options,s)||void 0,className:a[A.MonthGrid],style:k==null?void 0:k[A.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[A.Weekdays],style:k==null?void 0:k[A.Weekdays]},S&&d.createElement(o.WeekNumberHeader,{"aria-label":fa(s.options),className:a[A.WeekNumberHeader],style:k==null?void 0:k[A.WeekNumberHeader],scope:"col"},U()),ma.map(H=>d.createElement(o.Weekday,{"aria-label":ha(H,s.options,s),className:a[A.Weekday],key:String(H),style:k==null?void 0:k[A.Weekday],scope:"col"},P(H,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[A.Weeks],style:k==null?void 0:k[A.Weeks]},V.weeks.map(H=>d.createElement(o.Week,{className:a[A.Week],key:H.weekNumber,style:k==null?void 0:k[A.Week],week:H},S&&d.createElement(o.WeekNumber,{week:H,style:k==null?void 0:k[A.WeekNumber],"aria-label":pa(H.weekNumber,{locale:l}),className:a[A.WeekNumber],scope:"row",role:"rowheader"},B(H.weekNumber,s)),H.days.map(oe=>{const{date:ge}=oe,K=G(oe);if(K[re.focused]=!K.hidden&&!!(Qt!=null&&Qt.isEqualTo(oe)),K[Oe.selected]=(ee==null?void 0:ee(ge))||K.selected,Gn(Ne)){const{from:To,to:Eo}=Ne;K[Oe.range_start]=!!(To&&Eo&&s.isSameDay(ge,To)),K[Oe.range_end]=!!(To&&Eo&&s.isSameDay(ge,Eo)),K[Oe.range_middle]=Je(Ne,ge,!0,s)}const Da=Px(K,k,t.modifiersStyles),Ta=_x(K,a,t.modifiersClassNames),Ea=!Jn&&!K.hidden?aa(ge,K,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(ge,"yyyy-MM-dd")}_${s.format(oe.displayMonth,"yyyy-MM")}`,day:oe,modifiers:K,className:Ta.join(" "),style:Da,role:"gridcell","aria-selected":K.selected||void 0,"aria-label":Ea,"data-day":s.format(ge,"yyyy-MM-dd"),"data-month":oe.outside?s.format(ge,"yyyy-MM"):void 0,"data-selected":K.selected||void 0,"data-disabled":K.disabled||void 0,"data-hidden":K.hidden||void 0,"data-outside":oe.outside||void 0,"data-focused":K.focused||void 0,"data-today":K.today||void 0},!K.hidden&&Jn?d.createElement(o.DayButton,{className:a[A.DayButton],style:k==null?void 0:k[A.DayButton],type:"button",day:oe,modifiers:K,disabled:K.disabled||void 0,tabIndex:sa(oe)?0:-1,"aria-label":ia(ge,K,s.options,s),onClick:ba(oe,K),onBlur:ya(oe,K),onFocus:xa(oe,K),onKeyDown:va(oe,K),onMouseEnter:ka(oe,K),onMouseLeave:wa(oe,K)},j(ge,s.options,s)):!K.hidden&&j(oe.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:a[A.Footer],style:k==null?void 0:k[A.Footer],role:"status","aria-live":"polite"},t.footer)))}const I0=d.memo(({...e})=>i.jsx(_0,{mode:"single",...e})),_0=g(j0)`
|
|
2918
3039
|
font-family: ${c("font-family-default")};
|
|
2919
|
-
`,
|
|
3040
|
+
`,D0=({rightMenu:e,leftMenu:t,className:o})=>i.jsxs(T0,{className:o,children:[t,i.jsx(E0,{children:e})]}),T0=g.div`
|
|
2920
3041
|
align-items: center;
|
|
2921
3042
|
background-color: ${c("color-black")};
|
|
2922
3043
|
display: flex;
|
|
@@ -2925,10 +3046,10 @@
|
|
|
2925
3046
|
justify-content: space-between;
|
|
2926
3047
|
padding: 0px ${c("spacing-20")};
|
|
2927
3048
|
width: 100%;
|
|
2928
|
-
`,
|
|
3049
|
+
`,E0=g.div`
|
|
2929
3050
|
display: flex;
|
|
2930
3051
|
align-items: center;
|
|
2931
|
-
|
|
3052
|
+
`,M0=d.memo(({title:e,message:t})=>i.jsxs(z0,{children:[i.jsx(E,{variant:"body",bold:!0,children:e}),i.jsx(E,{variant:"body",color:"grey",children:t})]})),z0=g.div`
|
|
2932
3053
|
display: flex;
|
|
2933
3054
|
padding: ${c("spacing-8")} ${c("spacing-10")}
|
|
2934
3055
|
${c("spacing-8")} ${c("spacing-20")};
|
|
@@ -2939,7 +3060,7 @@
|
|
|
2939
3060
|
max-width: 100%;
|
|
2940
3061
|
word-wrap: break-word;
|
|
2941
3062
|
overflow-wrap: break-word;
|
|
2942
|
-
`,
|
|
3063
|
+
`,O0=({groups:e,onSelectionChange:t,value:o,showSelectAll:n=!0,showClearAll:r=!0,placement:s="bottom-end",className:l,buttonContent:a,disabled:u=!1})=>{const[h,p]=d.useState(()=>{const L={};return e.forEach(Z=>{L[Z.id]=new Set}),L}),[f,m]=d.useState(!1),x=o??h,b=o!==void 0,y=d.useCallback(L=>{b||p(L),t(L)},[b,t]),{refs:w,floatingStyles:v,context:$}=O.useFloating({placement:s,open:f,onOpenChange:m,whileElementsMounted:O.autoUpdate,middleware:[O.offset(4),O.flip(),O.shift({padding:8})]}),C=O.useClick($,{enabled:!u}),S=O.useDismiss($),k=O.useRole($),{getReferenceProps:I,getFloatingProps:j}=O.useInteractions([C,S,k]),_=d.useCallback((L,Z)=>{const se={...x},J=new Set(x[L]);J.has(Z)?J.delete(Z):J.add(Z),se[L]=J,y(se)},[x,y]),B=d.useCallback(L=>{const Z=e.find(J=>J.id===L);if(!Z)return;const se={...x};se[L]=new Set(Z.options.map(J=>J.value)),y(se)},[e,x,y]),U=d.useCallback(()=>{const L={};e.forEach(Z=>{L[Z.id]=new Set}),y(L)},[e,y]),P=d.useMemo(()=>Object.values(x).some(L=>L.size>0),[x]);return i.jsxs(i.Fragment,{children:[i.jsx(R0,{ref:w.setReference,className:l,$isActive:P,$isDisabled:u,...I(),children:a||i.jsxs(i.Fragment,{children:[i.jsx(F,{iconId:"Filter",size:"sm",color:P?"blue":"grey"}),P&&i.jsx(N0,{})]})}),f&&i.jsx(O.FloatingPortal,{children:i.jsx(O.FloatingFocusManager,{context:$,modal:!1,children:i.jsxs(F0,{ref:w.setFloating,style:v,...j(),children:[i.jsxs(A0,{children:[i.jsx(E,{variant:"body",bold:!0,children:"Filters"}),i.jsxs(L0,{children:[r&&P&&i.jsx(B0,{onClick:U,children:i.jsx(E,{variant:"small",color:"blue",children:"Clear all"})}),i.jsx(W0,{onClick:()=>m(!1),children:i.jsx(F,{iconId:"Close",size:"sm",color:"grey"})})]})]}),i.jsx(P0,{children:e.map(L=>i.jsxs(H0,{children:[i.jsxs(V0,{children:[i.jsx(E,{variant:"small",bold:!0,children:L.label}),n&&i.jsx(U0,{onClick:()=>B(L.id),children:i.jsx(E,{variant:"small",color:"blue",children:"Select all"})})]}),i.jsx(G0,{children:L.options.map(Z=>{var J;const se=((J=x[L.id])==null?void 0:J.has(Z.value))||!1;return i.jsxs(K0,{$isSelected:se,onClick:()=>_(L.id,Z.value),children:[i.jsx(Y0,{$isChecked:se,children:se&&i.jsx(F,{iconId:"Check",size:"xsm",color:"white"})}),i.jsx(E,{variant:"small",children:Z.label})]},Z.value)})})]},L.id))})]})})})]})},R0=g.button`
|
|
2943
3064
|
display: flex;
|
|
2944
3065
|
align-items: center;
|
|
2945
3066
|
justify-content: center;
|
|
@@ -2958,7 +3079,7 @@
|
|
|
2958
3079
|
background-color: ${e=>e.$isActive?c("color-additional1"):c("color-grey10")};
|
|
2959
3080
|
border-color: ${e=>e.$isActive?c("color-blue"):c("color-grey40")};
|
|
2960
3081
|
}
|
|
2961
|
-
`,
|
|
3082
|
+
`,N0=g.div`
|
|
2962
3083
|
position: absolute;
|
|
2963
3084
|
top: 4px;
|
|
2964
3085
|
right: 4px;
|
|
@@ -2966,7 +3087,7 @@
|
|
|
2966
3087
|
height: 6px;
|
|
2967
3088
|
background-color: ${c("color-blue")};
|
|
2968
3089
|
border-radius: 50%;
|
|
2969
|
-
`,
|
|
3090
|
+
`,F0=g.div`
|
|
2970
3091
|
background-color: ${c("color-white")};
|
|
2971
3092
|
border: 1px solid ${c("color-grey30")};
|
|
2972
3093
|
border-radius: ${c("spacing-4")};
|
|
@@ -2974,17 +3095,17 @@
|
|
|
2974
3095
|
min-width: 280px;
|
|
2975
3096
|
max-width: 320px;
|
|
2976
3097
|
z-index: 1000;
|
|
2977
|
-
`,
|
|
3098
|
+
`,A0=g.div`
|
|
2978
3099
|
display: flex;
|
|
2979
3100
|
align-items: center;
|
|
2980
3101
|
justify-content: space-between;
|
|
2981
3102
|
padding: ${c("spacing-12")} ${c("spacing-16")};
|
|
2982
3103
|
border-bottom: 1px solid ${c("color-grey20")};
|
|
2983
|
-
`,
|
|
3104
|
+
`,L0=g.div`
|
|
2984
3105
|
display: flex;
|
|
2985
3106
|
align-items: center;
|
|
2986
3107
|
gap: ${c("spacing-8")};
|
|
2987
|
-
`,
|
|
3108
|
+
`,B0=g.button`
|
|
2988
3109
|
background: none;
|
|
2989
3110
|
border: none;
|
|
2990
3111
|
padding: 0;
|
|
@@ -2994,7 +3115,7 @@
|
|
|
2994
3115
|
&:hover {
|
|
2995
3116
|
text-decoration: underline;
|
|
2996
3117
|
}
|
|
2997
|
-
`,
|
|
3118
|
+
`,W0=g.button`
|
|
2998
3119
|
background: none;
|
|
2999
3120
|
border: none;
|
|
3000
3121
|
padding: 0;
|
|
@@ -3009,20 +3130,20 @@
|
|
|
3009
3130
|
&:hover {
|
|
3010
3131
|
background-color: ${c("color-grey10")};
|
|
3011
3132
|
}
|
|
3012
|
-
`,
|
|
3133
|
+
`,P0=g.div`
|
|
3013
3134
|
padding: ${c("spacing-12")};
|
|
3014
3135
|
max-height: 400px;
|
|
3015
3136
|
overflow-y: auto;
|
|
3016
|
-
`,
|
|
3137
|
+
`,H0=g.div`
|
|
3017
3138
|
&:not(:last-child) {
|
|
3018
3139
|
margin-bottom: ${c("spacing-16")};
|
|
3019
3140
|
}
|
|
3020
|
-
`,
|
|
3141
|
+
`,V0=g.div`
|
|
3021
3142
|
display: flex;
|
|
3022
3143
|
align-items: center;
|
|
3023
3144
|
justify-content: space-between;
|
|
3024
3145
|
margin-bottom: ${c("spacing-8")};
|
|
3025
|
-
`,
|
|
3146
|
+
`,U0=g.button`
|
|
3026
3147
|
background: none;
|
|
3027
3148
|
border: none;
|
|
3028
3149
|
padding: 0;
|
|
@@ -3032,11 +3153,11 @@
|
|
|
3032
3153
|
&:hover {
|
|
3033
3154
|
text-decoration: underline;
|
|
3034
3155
|
}
|
|
3035
|
-
`,
|
|
3156
|
+
`,G0=g.div`
|
|
3036
3157
|
display: flex;
|
|
3037
3158
|
flex-direction: column;
|
|
3038
3159
|
gap: ${c("spacing-4")};
|
|
3039
|
-
`,
|
|
3160
|
+
`,K0=g.div`
|
|
3040
3161
|
display: flex;
|
|
3041
3162
|
align-items: center;
|
|
3042
3163
|
gap: ${c("spacing-8")};
|
|
@@ -3048,7 +3169,7 @@
|
|
|
3048
3169
|
&:hover {
|
|
3049
3170
|
background-color: ${e=>e.$isSelected?c("color-additional1"):c("color-grey10")};
|
|
3050
3171
|
}
|
|
3051
|
-
`,
|
|
3172
|
+
`,Y0=g.div`
|
|
3052
3173
|
width: 16px;
|
|
3053
3174
|
height: 16px;
|
|
3054
3175
|
border: 1.5px solid
|
|
@@ -3059,20 +3180,133 @@
|
|
|
3059
3180
|
align-items: center;
|
|
3060
3181
|
justify-content: center;
|
|
3061
3182
|
flex-shrink: 0;
|
|
3062
|
-
`,
|
|
3183
|
+
`,[q0,Ko,Z0]=z(["view-header","option","select"]),Nr=3,Kn=d.memo(({actions:e})=>{const{inlinePrimary:t,overflowPrimary:o,secondary:n}=d.useMemo(()=>{const a=e.filter(h=>h.isPrimary),u=e.filter(h=>!h.isPrimary);return{inlinePrimary:a.slice(0,Nr),overflowPrimary:a.slice(Nr),secondary:u}},[e]),r=o.length>0||n.length>0,s=d.useMemo(()=>{const a=new Map;for(const u of e)a.set(u.id,u);return a},[e]),l=d.useCallback(a=>{const u=s.get(a);u&&!u.disabled&&u.onClick()},[s]);return e.length===0?null:i.jsxs(X0,{children:[t.map(a=>i.jsx(ie,{iconId:a.iconId,color:a.color||"grey",size:"sm",onClick:a.onClick,disabled:a.disabled,title:a.tooltip,"aria-label":a.tooltip||a.label||a.id},a.id)),r&&i.jsx(J0,{children:i.jsxs(On,{trigger:i.jsx(Q0,{title:"More actions",type:"button",children:i.jsx(F,{size:"sm",iconId:"Ellipsis",color:"blue"})}),onSelection:l,children:[o.map(a=>i.jsx(Fr,{optionKey:a.id,label:i.jsxs(Ar,{children:[i.jsx(F,{iconId:a.iconId,color:a.disabled?"grey":a.color||"blue",size:"sm"}),i.jsx(Lr,{children:a.label||a.tooltip||a.id})]}),disabled:a.disabled,disableSelectionStyle:!0},a.id)),o.length>0&&n.length>0&&i.jsx(Rn,{}),n.map(a=>i.jsx(Fr,{optionKey:a.id,label:i.jsxs(Ar,{children:[a.iconId?i.jsx(F,{iconId:a.iconId,color:a.disabled?"grey":a.color||"blue",size:"sm"}):i.jsx(ey,{}),i.jsx(Lr,{children:a.label||a.tooltip||a.id})]}),disabled:a.disabled,disableSelectionStyle:!0},a.id))]})})]})});Kn.displayName="ActionBar";const X0=g.div`
|
|
3184
|
+
display: flex;
|
|
3185
|
+
align-items: center;
|
|
3186
|
+
gap: ${q0("actions-gap")};
|
|
3187
|
+
flex-shrink: 0;
|
|
3188
|
+
`,Fr=g(ct)`
|
|
3189
|
+
${`${Ko("bg-color",!0)}: ${c("color-white")}`};
|
|
3190
|
+
${`${Ko("color",!0)}: ${c("color-black")}`};
|
|
3191
|
+
${`${Ko("bg-color-active",!0)}: ${c("color-grey20")}`};
|
|
3192
|
+
gap: 0px;
|
|
3193
|
+
cursor: pointer;
|
|
3194
|
+
`,J0=g.div`
|
|
3195
|
+
${`${Z0("border-color",!0)}: ${c("color-grey40")}`};
|
|
3196
|
+
`,Q0=g.button`
|
|
3197
|
+
background: none;
|
|
3198
|
+
border: none;
|
|
3199
|
+
padding: 4px;
|
|
3200
|
+
margin: 0;
|
|
3201
|
+
cursor: pointer;
|
|
3202
|
+
display: flex;
|
|
3203
|
+
align-items: center;
|
|
3204
|
+
justify-content: center;
|
|
3205
|
+
color: inherit;
|
|
3206
|
+
opacity: 0.7;
|
|
3207
|
+
transition: opacity 0.15s ease;
|
|
3208
|
+
|
|
3209
|
+
&:hover:not(:disabled) {
|
|
3210
|
+
opacity: 1;
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
&:active:not(:disabled) {
|
|
3214
|
+
opacity: 0.5;
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
&:disabled {
|
|
3218
|
+
cursor: not-allowed;
|
|
3219
|
+
opacity: 0.3;
|
|
3220
|
+
}
|
|
3221
|
+
`,Ar=g.div`
|
|
3222
|
+
display: flex;
|
|
3223
|
+
align-items: center;
|
|
3224
|
+
gap: 8px;
|
|
3225
|
+
`,Lr=g.span`
|
|
3226
|
+
font-size: 13px;
|
|
3227
|
+
white-space: nowrap;
|
|
3228
|
+
`,ey=g.div`
|
|
3229
|
+
width: 16px;
|
|
3230
|
+
height: 16px;
|
|
3231
|
+
`,[et]=z(["view-header"]),Yn=d.memo(({title:e,subtitle:t,icon:o,actions:n,headerContent:r,collapsible:s,collapsed:l,onToggleCollapse:a})=>{const u=d.useMemo(()=>n&&n.length>0,[n]);return i.jsx(ty,{children:i.jsxs(oy,{children:[i.jsxs(ny,{children:[s&&i.jsx(ie,{iconId:l?"CaretRight":"CaretDown",color:"grey",size:"sm",onClick:a,"aria-label":l?"Expand view":"Collapse view"}),o&&i.jsx(ry,{children:i.jsx(F,{iconId:o.iconId,color:o.color||"blue",size:"sm"})}),i.jsxs(sy,{children:[i.jsx(E,{variant:"h2",children:e}),t&&i.jsx(iy,{variant:"small",color:"grey",children:t})]})]}),(r||n&&n.length>0)&&i.jsxs(ay,{children:[r,u&&n?i.jsx(Kn,{actions:n}):n==null?void 0:n.map(h=>i.jsx(ie,{iconId:h.iconId,color:h.color||"grey",size:"sm",onClick:h.onClick,disabled:h.disabled,title:h.tooltip,"aria-label":h.tooltip||h.id},h.id))]})]})})});Yn.displayName="ViewHeader";const ty=g.div`
|
|
3232
|
+
background-color: ${et("background-color")};
|
|
3233
|
+
border-bottom: ${et("border-bottom-width")} solid ${et("border-color")};
|
|
3234
|
+
padding: ${et("padding")};
|
|
3235
|
+
`,oy=g.div`
|
|
3236
|
+
display: flex;
|
|
3237
|
+
align-items: center;
|
|
3238
|
+
justify-content: space-between;
|
|
3239
|
+
gap: ${et("gap")};
|
|
3240
|
+
`,ny=g.div`
|
|
3241
|
+
display: flex;
|
|
3242
|
+
align-items: center;
|
|
3243
|
+
gap: ${et("left-gap")};
|
|
3244
|
+
flex: 1;
|
|
3245
|
+
min-width: 0; /* Allow text truncation */
|
|
3246
|
+
`,ry=g.div`
|
|
3247
|
+
display: flex;
|
|
3248
|
+
align-items: center;
|
|
3249
|
+
flex-shrink: 0;
|
|
3250
|
+
`,sy=g.div`
|
|
3251
|
+
display: flex;
|
|
3252
|
+
flex-direction: column;
|
|
3253
|
+
gap: ${et("text-gap")};
|
|
3254
|
+
min-width: 0; /* Allow text truncation */
|
|
3255
|
+
`,iy=g(E)`
|
|
3256
|
+
font-size: ${et("subtitle-font-size")};
|
|
3257
|
+
`,ay=g.div`
|
|
3258
|
+
display: flex;
|
|
3259
|
+
align-items: center;
|
|
3260
|
+
gap: ${et("actions-gap")};
|
|
3261
|
+
flex-shrink: 0;
|
|
3262
|
+
`,[Ft]=z(["view"]),Qi=d.memo(({title:e,subtitle:t,icon:o,actions:n,headerContent:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:a,onToggleCollapse:u,children:h,className:p,onFocus:f})=>{const[m,x]=d.useState(l),b=a!==void 0?a:m,y=d.useCallback(()=>{u?u():x(w=>!w)},[u]);return i.jsxs(ly,{className:p,tabIndex:0,onFocus:f,collapsed:b,children:[i.jsx(Yn,{title:e,subtitle:t,icon:o,actions:n,headerContent:r,collapsible:s,collapsed:b,onToggleCollapse:y}),!b&&i.jsx(cy,{children:h})]})});Qi.displayName="View";const ly=g.div`
|
|
3263
|
+
display: flex;
|
|
3264
|
+
flex-direction: column;
|
|
3265
|
+
width: 100%;
|
|
3266
|
+
background-color: ${Ft("background-color")};
|
|
3267
|
+
border: ${Ft("border-width")} solid ${Ft("border-color")};
|
|
3268
|
+
border-radius: ${Ft("border-radius")};
|
|
3269
|
+
overflow: hidden;
|
|
3270
|
+
|
|
3271
|
+
/* When collapsed, don't take up flex space - only show header */
|
|
3272
|
+
${({collapsed:e})=>e&&`
|
|
3273
|
+
flex: 0 0 auto !important;
|
|
3274
|
+
`}
|
|
3275
|
+
`,cy=g.div`
|
|
3276
|
+
display: flex;
|
|
3277
|
+
flex-direction: column;
|
|
3278
|
+
flex: 1;
|
|
3279
|
+
overflow: auto;
|
|
3280
|
+
padding: ${Ft("content-padding")};
|
|
3281
|
+
`,[ro]=z(["view-container"]),ea=d.memo(({id:e,direction:t="vertical",gap:o,children:n,className:r})=>i.jsx(dy,{id:e,direction:t,gap:o,className:r,children:n}));ea.displayName="ViewContainer";const dy=g.div`
|
|
3282
|
+
display: flex;
|
|
3283
|
+
flex-direction: ${({direction:e})=>e==="vertical"?"column":"row"};
|
|
3284
|
+
gap: ${({direction:e,gap:t})=>t!==void 0?typeof t=="number"?`${t}px`:t:ro(e==="vertical"?"vertical-gap":"horizontal-gap")};
|
|
3285
|
+
padding: ${ro("padding")};
|
|
3286
|
+
background-color: ${ro("background-color")};
|
|
3287
|
+
width: 100%;
|
|
3288
|
+
height: 100%;
|
|
3289
|
+
|
|
3290
|
+
/* Distribute child views evenly - each gets equal space */
|
|
3291
|
+
> * {
|
|
3292
|
+
flex: 1;
|
|
3293
|
+
min-height: 0;
|
|
3294
|
+
min-width: 0;
|
|
3295
|
+
}
|
|
3296
|
+
`,uy=d.memo(({listMaxSize:e,listMinSize:t,listCollapsedSize:o,disabled:n,List:r,Details:s,ListPanelComponent:l=kn})=>i.jsx(hy,{style:{"--studio-c-table-cell-padding-y":c("spacing-8")},children:i.jsxs(_s,{direction:"horizontal",children:[i.jsx(l,{minSize:t,maxSize:e,collapsedSize:o,children:i.jsx(ta,{children:i.jsx(r,{disabled:n})})}),i.jsx(Es,{}),i.jsx(Ds,{children:i.jsx(py,{children:i.jsx(s,{})})})]})})),hy=g.div`
|
|
3063
3297
|
width: 100%;
|
|
3064
3298
|
height: 100%;
|
|
3065
3299
|
display: flex;
|
|
3066
3300
|
align-items: flex-start;
|
|
3067
3301
|
justify-content: flex-start;
|
|
3068
|
-
`,
|
|
3302
|
+
`,ta=g.div`
|
|
3069
3303
|
height: 100%;
|
|
3070
3304
|
width: 100%;
|
|
3071
3305
|
display: flex;
|
|
3072
3306
|
align-items: flex-start;
|
|
3073
3307
|
justify-content: flex-start;
|
|
3074
3308
|
flex-direction: column;
|
|
3075
|
-
`,
|
|
3309
|
+
`,py=g(ta)`
|
|
3076
3310
|
overflow: auto;
|
|
3077
|
-
`;let Ko=null;const Vx=()=>Ko,Gx=({ref:e,data:t,canDrag:o=!0,transformDragData:n=f=>f,onDrop:r,onDragStart:s,onDragEnd:a,onDragOver:l,onDragLeave:u})=>{const[f,p]=d.useState(!1),[h,m]=d.useState(!1),x=v=>{v.preventDefault(),v.stopPropagation()},b=d.useCallback(v=>{x(v),m(!0),v.dataTransfer&&(v.dataTransfer.dropEffect="move"),l==null||l(v)},[l]),y=d.useCallback(v=>{x(v),m(!1),u==null||u(v)},[u]),k=d.useCallback(v=>{x(v),p(!1),m(!1),Ko=null,a==null||a(v)},[a]),w=d.useCallback(v=>{var C;x(v),p(!1),m(!1);let S=null;try{S=JSON.parse(((C=v.dataTransfer)==null?void 0:C.getData("application/json"))??"null")}catch(T){console.error("Invalid drag data:",T)}S&&(r==null||r(S,v))},[r]),$=d.useCallback(v=>{var C;if(!o)return;v.stopPropagation(),p(!0),m(!1),v.dataTransfer&&(v.dataTransfer.effectAllowed="move");const S=n(t);Ko=S,(C=v.dataTransfer)==null||C.setData("application/json",JSON.stringify(S)),s==null||s(t,v)},[o,t,s,n]);return d.useEffect(()=>{const v=e.current,S={dragover:C=>b(C),dragenter:C=>b(C),dragleave:C=>y(C),drop:C=>w(C),dragstart:C=>$(C),dragend:C=>k(C)};return v&&Object.entries(S).forEach(([C,T])=>v.addEventListener(C,T)),()=>{Object.entries(S).forEach(([C,T])=>{v&&v.removeEventListener(C,T)})}},[e,b,y,w,$,k]),{dragging:f,over:h}};Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>K.useFormContext});Object.defineProperty(exports,"useFormController",{enumerable:!0,get:()=>K.useController});Object.defineProperty(exports,"useWatchForm",{enumerable:!0,get:()=>K.useWatch});Object.defineProperty(exports,"renderTableContents",{enumerable:!0,get:()=>be.flexRender});exports.ActionSelect=Vd;exports.ActionableBlurb=wl;exports.AlertTooltip=pn;exports.AlternatingStatus=Gl;exports.AnimatePresence=jr;exports.AnonymousBranch=Tp;exports.AnonymousGroup=op;exports.ArtifactVersion=Nu;exports.AsyncNamedCollapsibleBranch=Mp;exports.AsyncTreeList=Ls;exports.Badge=cu;exports.BaseAsyncTreeDataProvider=Zf;exports.BaseModalContent=Zp;exports.BaseObservableDataProvider=kn;exports.BaseUIComponentsContextProvider=yl;exports.BottomDialogDrawer=Dc;exports.BottomInlineDrawer=Rc;exports.BrandedHeader=Cg;exports.Button=Ae;exports.CheckBox=bt;exports.CheckListItemCheck=uo;exports.CheckListItemCheckCompact=zs;exports.CheckListItemContainer=Bt;exports.CheckListItemContainerCompact=$n;exports.CheckListItemContainerWithDivider=Ms;exports.CheckListItemContainerWithDividerCompact=Es;exports.CheckListItemName=fo;exports.CheckListItemNameCompact=Os;exports.CheckListItemTemplate=Is;exports.Collapsible=to;exports.CollapsibleArtifact=Il;exports.CollapsibleContent=oo;exports.CollapsibleList=Bu;exports.CollapsibleTrigger=Jo;exports.ComboBox=bs;exports.CopyableText=lc;exports.DarkTooltip=lo;exports.DarkTooltipStyle=ls;exports.DatePicker=yx;exports.DescriptionListItemTemplate=cp;exports.Dialog=Qo;exports.DialogContent=tn;exports.DialogTrigger=en;exports.Drawer=Fc;exports.DrawerContent=_c;exports.DrawerHeader=Lc;exports.DrawerTrigger=Ac;exports.Dropdown=Cs;exports.DropdownMenu=Zh;exports.EMAIL_PATTERN=Wr;exports.EmailRequirementKeys=Pr;exports.EmptyListMessage=$x;exports.EndOverlayStyle=mc;exports.ErrorTooltip=ds;exports.FIRST_CHAR_ALPHA=nd;exports.FakeInputReference=xs;exports.FilterPanel=jx;exports.FlexHandle=_t;exports.FlexResizablePanel=Xr;exports.Form=ys;exports.FormAccessToggles=Of;exports.FormCheckbox=Mf;exports.FormComboBox=Ff;exports.FormErrorMessage=Le;exports.FormField=Tf;exports.FormFileInput=Lf;exports.FormInput=bn;exports.FormInputWrapper=We;exports.FormLabel=ke;exports.FormMultiSelect=Vf;exports.FormNameInput=Nf;exports.FormSelect=$f;exports.FormSubmit=mn;exports.FormTextArea=kf;exports.FormToggle=bf;exports.GroupContext=Cn;exports.GroupList=ep;exports.GroupedObservableDataProvider=Kf;exports.HiddenFormInput=gn;exports.HolderListItemTemplate=rg;exports.HorizontalRule=Bc;exports.Icon=_;exports.IconButton=ne;exports.Input=xt;exports.InputSearch=Uc;exports.ItemSelectionList=Gh;exports.ItemSelectionListDataProvider=Kh;exports.KOSLogo=Ru;exports.Label=Lr;exports.LabelWithAction=Zc;exports.LabelWithContent=rn;exports.LabelWithContentLink=Qc;exports.LeftDialogDrawer=vc;exports.LeftInlineDrawer=zc;exports.LightTooltip=ao;exports.LightTooltipStyle=is;exports.Link=Xo;exports.List=wn;exports.ListContext=xn;exports.ListContextProvider=yn;exports.ListWithDetailsLayout=Bx;exports.LockedButton=El;exports.MenuWrapper=vx;exports.MiddleTruncateText=no;exports.Modal=fh;exports.ModalOverlayStyles=Gs;exports.ModalTrigger=ph;exports.MultiSelect=ms;exports.NO_LEADING_OR_TRAILING_SPACES_PATTERN=Br;exports.NO_SPACES_PATTERN=od;exports.NUMBERS_ONLY_PATTERN=td;exports.NamedCollapsibleBranch=Bp;exports.NamedCollapsibleGroup=tp;exports.NamedListItemTemplate=dp;exports.NamedSection=Ys;exports.NamedSectionHeader=xh;exports.ObservableDataProvider=vn;exports.Option=ft;exports.PASSWORD_MIN_LENGTH=sd;exports.PASSWORD_REQUIREMENTS=hn;exports.PASSWORD_REQUIREMENTS_TOO_SIMILAR=vs;exports.PageHeader=$h;exports.PaneSplitter=md;exports.PasswordRequirementKeys=Et;exports.PasswordRequirementsList=pf;exports.PropertyDataProvider=qf;exports.RequirementsList=ks;exports.ResizablePanel=an;exports.ResizablePanelGroup=Zr;exports.ResizablePanelGroupContextProvider=qr;exports.ResizablePanelHandle=Qr;exports.RightDialogDrawer=$c;exports.RightInlineDrawer=Oc;exports.ScreenOverlay=es;exports.ScreenOverlayWithAction=nm;exports.Select=yt;exports.SelectAsyncTreeList=jp;exports.SelectContext=dn;exports.SelectList=co;exports.SelectListContext=Wt;exports.SelectSeparator=Qh;exports.SelectViewList=Fh;exports.SelectViewListItem=qs;exports.SelectorTooltip=us;exports.ShellIconButton=qd;exports.ShellMenu=eg;exports.ShellMenuLink=og;exports.StartOverlayStyle=gc;exports.StickyObserver=Vo;exports.StyledSelectOption=Xh;exports.Tab=Zd;exports.TabPane=ou;exports.TabTrigger=Xd;exports.TabTriggerList=Qd;exports.Table=Dg;exports.TableHeader=Uo;exports.TableNamedListItemTemplate=bp;exports.TableTd=Tn;exports.Tag=eo;exports.TagWithRemove=au;exports.Text=E;exports.TextHighlight=lu;exports.Textarea=fn;exports.Toggle=io;exports.ToggleThumb=rs;exports.ToggleTrack=ns;exports.Tooltip=fs;exports.TopDialogDrawer=Tc;exports.TopInlineDrawer=Ic;exports.TreeDataProvider=vp;exports.TreeList=$p;exports.USERNAME_PATTERN=ed;exports.VirtualList=Ws;exports.VirtualTable=Zg;exports.VirtualizedList=Bs;exports.VirtualizedSelectList=qp;exports.baseComponentStyles=hr;exports.baseGenericStyles=No;exports.baseSemanticStyles=Fo;exports.componentStudioTokenCss=nl;exports.componentStyles=Ro;exports.createLocalComponentHelper=Qa;exports.createLocalComponentTokenCss=el;exports.createLocalTokenSystem=Ja;exports.createTableColumnHelper=Ng;exports.darkTooltipArrow=cs;exports.getByteString=zh;exports.getComponentTokenHelpers=O;exports.getCurrentDragData=Vx;exports.getEmailValidation=rd;exports.getErrorMessage=ad;exports.getGlobalToken=F;exports.getPasswordValidation=id;exports.getSemanticToken=c;exports.getStyles=ll;exports.globalStudioTokenCss=ol;exports.isContextAware=Ho;exports.isErrorWithMessage=Hr;exports.isGroupFactory=js;exports.keyResolver=Ss;exports.lightTooltipArrow=as;exports.noop=_e;exports.normalizePathDisplay=Oh;exports.rootStyles=Ao;exports.scrollbarStyle=fl;exports.semanticStudioTokenCss=tl;exports.stringComponentInsert=pr;exports.studioColors=gr;exports.studioDarkColors=br;exports.studioGenericColor=xr;exports.studioLightColors=mr;exports.studioTheme=pl;exports.transformLocalTokenObject=qo;exports.useBaseUIComponentsContext=vr;exports.useCollapsibleContext=At;exports.useContainerWidth=nn;exports.useDialogContext=Ye;exports.useDialogContextValue=Tr;exports.useDragDrop=Gx;exports.useDrawerContext=Qe;exports.useGroupSelection=yp;exports.useListContext=Gf;exports.useListGroupContext=Ts;exports.useLoadDataProvider=Lt;exports.useModalContext=Ye;exports.useMultiSelectContext=hs;exports.useOpenedGroups=xp;exports.useResizablePanelGroupContext=sn;exports.useResizeObserver=Vr;exports.useSelectContext=un;exports.useSelectListContext=et;exports.useSelection=kp;exports.useTabContext=so;exports.useTableContext=jn;exports.useTreeListContext=Ns;
|
|
3311
|
+
`;let cn=null;const fy=()=>cn,gy=({ref:e,data:t,canDrag:o=!0,transformDragData:n=h=>h,onDrop:r,onDragStart:s,onDragEnd:l,onDragOver:a,onDragLeave:u})=>{const[h,p]=d.useState(!1),[f,m]=d.useState(!1),x=C=>{C.preventDefault(),C.stopPropagation()},b=d.useCallback(C=>{x(C),m(!0),C.dataTransfer&&(C.dataTransfer.dropEffect="move"),a==null||a(C)},[a]),y=d.useCallback(C=>{x(C),m(!1),u==null||u(C)},[u]),w=d.useCallback(C=>{x(C),p(!1),m(!1),cn=null,l==null||l(C)},[l]),v=d.useCallback(C=>{var k;x(C),p(!1),m(!1);let S=null;try{S=JSON.parse(((k=C.dataTransfer)==null?void 0:k.getData("application/json"))??"null")}catch(I){console.error("Invalid drag data:",I)}S&&(r==null||r(S,C))},[r]),$=d.useCallback(C=>{var k;if(!o)return;C.stopPropagation(),p(!0),m(!1),C.dataTransfer&&(C.dataTransfer.effectAllowed="move");const S=n(t);cn=S,(k=C.dataTransfer)==null||k.setData("application/json",JSON.stringify(S)),s==null||s(t,C)},[o,t,s,n]);return d.useEffect(()=>{const C=e.current,S={dragover:k=>b(k),dragenter:k=>b(k),dragleave:k=>y(k),drop:k=>v(k),dragstart:k=>$(k),dragend:k=>w(k)};return C&&Object.entries(S).forEach(([k,I])=>C.addEventListener(k,I)),()=>{Object.entries(S).forEach(([k,I])=>{C&&C.removeEventListener(k,I)})}},[e,b,y,v,$,w]),{dragging:h,over:f}};class my{constructor(t){T(this,"model");T(this,"itemsExpression");T(this,"transformer");T(this,"autoDispose");T(this,"_itemsById",D.observable.map(new Map));T(this,"originalItems",new Map);T(this,"_isInitialized",!1);T(this,"_isDisposed",!1);T(this,"_reactionDisposer",null);this.model=t.model,this.itemsExpression=t.itemsExpression,this.transformer=t.transformer,this.autoDispose=t.autoDispose??!0,D.makeObservable(this,{items:D.computed})}get items(){return Array.from(this._itemsById.values()).sort((t,o)=>t.name.localeCompare(o.name))}get isInitialized(){return this._isInitialized}get isDisposed(){return this._isDisposed}async init(){if(!this._isInitialized){if(this._isDisposed)throw new Error("Cannot initialize a disposed ObservableListDataProvider");this._reactionDisposer=D.reaction(()=>{try{if(!this.model)return{raw:[],transformed:[]};const t=this.itemsExpression(this.model)||[],o=t.map(n=>uo(this.transformer(n),n));return{raw:t,transformed:o}}catch{return{raw:[],transformed:[]}}},({raw:t,transformed:o})=>{this.updateItemsFromTransformed(t,o)},{fireImmediately:!0}),this._isInitialized=!0}}dispose(){this._isDisposed||(this._reactionDisposer&&(this._reactionDisposer(),this._reactionDisposer=null),this._itemsById.clear(),this.originalItems.clear(),this._isDisposed=!0,this._isInitialized=!1)}async whenReady(){if(!this._isInitialized)throw new Error("ObservableListDataProvider must be initialized before calling whenReady()");return Promise.resolve()}async refresh(){if(!this._isInitialized||this._isDisposed)return;const t=this.itemsExpression(this.model);this.updateItems(t)}updateItemsFromTransformed(t,o){const n=new Map,r=new Map;o.forEach((s,l)=>{n.set(s.id,s),r.set(s.id,t[l])}),D.runInAction(()=>{for(const[s]of this._itemsById)n.has(s)||(this._itemsById.delete(s),this.originalItems.delete(s));for(const[s,l]of n)this._itemsById.set(s,l),this.originalItems.set(s,r.get(s))})}updateItems(t){const o=t.map(n=>uo(this.transformer(n),n));this.updateItemsFromTransformed(t,o)}}function oa(e){return new my(e)}const by="/kos/model/ready/";class na{constructor(t){T(this,"itemsExpression");T(this,"transformer");T(this,"autoDispose",!0);T(this,"_modelId");T(this,"_context");T(this,"_innerProvider",null);T(this,"_isInitialized",!1);T(this,"_isDisposed",!1);T(this,"_isLoading",!1);T(this,"_eventBusUnsubscribe",null);T(this,"_modelIdReactionDisposer",null);T(this,"_currentModelId");T(this,"_modelType");T(this,"_shouldActivate");T(this,"_items",D.observable.array([]));this._modelType=t.modelType,this._modelId=t.modelId,this._context=t.context,this._shouldActivate=t.activate??!1,this.itemsExpression=t.itemsExpression,this.transformer=t.transformer,D.makeObservable(this,{_innerProvider:D.observable.ref,_isLoading:D.observable,items:D.computed,model:D.computed,isLoading:D.computed})}get model(){var t;return(t=this._innerProvider)==null?void 0:t.model}get items(){var t;return((t=this._innerProvider)==null?void 0:t.items)??[]}get isInitialized(){return this._isInitialized}get isDisposed(){return this._isDisposed}get isLoading(){return this._isLoading||!!this._currentModelId&&!this._innerProvider&&this._isInitialized}get originalItems(){var t;return((t=this._innerProvider)==null?void 0:t.originalItems)??new Map}async init(){if(!this._isInitialized){if(this._isDisposed&&(this._isDisposed=!1),typeof this._modelId=="function"){const t=this._modelId;this._modelIdReactionDisposer=D.reaction(()=>{try{return t(this._context)}catch{return}},o=>{o!==this._currentModelId&&this.handleModelIdChange(o)},{fireImmediately:!0,scheduler:o=>queueMicrotask(o)})}else this._currentModelId=this._modelId,this.subscribeToModelLifecycle(this._modelId);this._isInitialized=!0}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),D.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._currentModelId=t}),t&&this.subscribeToModelLifecycle(t)}subscribeToModelLifecycle(t){const o=this.getModelFromManager(t);if(o){this.createInnerProvider(o);return}const n=`${by}${this._modelType}/${t}`,r=W.EventBus.subscribe(n,()=>{const s=this.getModelFromManager(t);s&&this.createInnerProvider(s)});this._eventBusUnsubscribe=r.unsubscribe}async createInnerProvider(t){if(this._innerProvider)return;const o=oa({model:t,itemsExpression:this.itemsExpression,transformer:this.transformer,autoDispose:!1});D.runInAction(()=>{this._isLoading=!1,this._innerProvider=o}),await o.init()}getModelFromManager(t){var o;try{const n=W.getKosModelSync(t);return this._shouldActivate&&((o=n==null?void 0:n.model)!=null&&o.activate)&&(D.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{D.runInAction(()=>{this._isLoading=!1})})),n==null?void 0:n.model}catch{return null}}dispose(){this._isDisposed||(this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),D.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._currentModelId=void 0)}async whenReady(){if(!this._isInitialized)throw new Error("LifecycleAwareListProvider must be initialized before calling whenReady()");return this._innerProvider&&this._innerProvider.whenReady?this._innerProvider.whenReady():Promise.resolve()}async refresh(){return this._innerProvider&&this._innerProvider.refresh?this._innerProvider.refresh():Promise.resolve()}}function xy(e){return new na(e)}const yy="/kos/model/ready/";class vy extends ii{constructor(o,n,r,s,l,a){super(o,async function(){return n(this)},async function(u){return r(this,u)},a);T(this,"_hasChildrenExpr");T(this,"_childrenExpr");T(this,"_getItemIdFn");this._hasChildrenExpr=s,this._childrenExpr=r,this._getItemIdFn=l,this.rootTrackingFn=u=>{n(u)},this.childTrackingFn=(u,h)=>{r(u,h)}}hasChildren(o){return this._hasChildrenExpr(this.parent,o)}getItemId(o){return this._getItemIdFn(o)}}class ra{constructor(t){T(this,"_modelId");T(this,"_context");T(this,"_innerProvider",null);T(this,"_isInitialized",!1);T(this,"_isInitializing",!1);T(this,"_isDisposed",!1);T(this,"_isLoading",!1);T(this,"_eventBusUnsubscribe",null);T(this,"_modelIdReactionDisposer",null);T(this,"_currentModelId");T(this,"_modelType");T(this,"_shouldActivate");T(this,"_rootsExpression");T(this,"_childrenExpression");T(this,"_hasChildrenExpression");T(this,"_getItemIdFn");T(this,"_transformer");this._modelType=t.modelType,this._modelId=t.modelId,this._context=t.context,this._shouldActivate=t.activate??!1,this._rootsExpression=t.rootsExpression,this._childrenExpression=t.childrenExpression,this._hasChildrenExpression=t.hasChildrenExpression,this._getItemIdFn=t.getItemId,this._transformer=t.transformer,D.makeObservable(this,{_innerProvider:D.observable.ref,_isLoading:D.observable,_isInitialized:D.observable,tree:D.computed,originalItems:D.computed,initialized:D.computed,isLoading:D.computed})}get tree(){var t;return((t=this._innerProvider)==null?void 0:t.tree)??[]}get originalItems(){var t;return((t=this._innerProvider)==null?void 0:t.originalItems)??new Map}get initialized(){var t;return this._isInitialized&&!!((t=this._innerProvider)!=null&&t.initialized)}get isLoading(){return this._isLoading||!!this._currentModelId&&!this._innerProvider&&this._isInitialized}hasChildren(t){return this._innerProvider?this._innerProvider.hasChildren(t):"unknown"}getItemId(t){return this._getItemIdFn(t)}async init(){if(!this._isInitializing){if(this._isInitialized&&(this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._isInitialized=!1,this._currentModelId=void 0),this._isDisposed&&(this._isDisposed=!1),this._isInitializing=!0,typeof this._modelId=="function"){const t=this._modelId;this._modelIdReactionDisposer=D.reaction(()=>{try{return t(this._context)}catch{return}},o=>{o!==this._currentModelId&&this.handleModelIdChange(o)},{fireImmediately:!0,scheduler:o=>queueMicrotask(o)})}else this._currentModelId=this._modelId,await this.subscribeToModelLifecycle(this._modelId);D.runInAction(()=>{this._isInitialized=!0,this._isInitializing=!1})}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),D.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._currentModelId=t}),t&&this.subscribeToModelLifecycle(t)}async subscribeToModelLifecycle(t){if(this._innerProvider)return;const o=this.getModelFromManager(t);if(o){await this.createInnerProvider(o);return}const n=`${yy}${this._modelType}/${t}`,r=W.EventBus.subscribe(n,()=>{const s=this.getModelFromManager(t);s&&this.createInnerProvider(s)});this._eventBusUnsubscribe=r.unsubscribe}async createInnerProvider(t){if(this._innerProvider)return;const o=new vy(t,this._rootsExpression,this._childrenExpression,this._hasChildrenExpression,this._getItemIdFn,this._transformer);D.runInAction(()=>{this._isLoading=!1,this._innerProvider=o}),await o.init()}getModelFromManager(t){var o;try{const n=W.getKosModelSync(t);return this._shouldActivate&&((o=n==null?void 0:n.model)!=null&&o.activate)&&(D.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{D.runInAction(()=>{this._isLoading=!1})})),n==null?void 0:n.model}catch{return null}}async expandBranch(t,o){return this._innerProvider?this._innerProvider.expandBranch(t,o):Promise.resolve()}async expandAll(){return this._innerProvider?this._innerProvider.expandAll():Promise.resolve()}collapseBranch(t){this._innerProvider&&this._innerProvider.collapseBranch(t)}clearCache(t){this._innerProvider&&this._innerProvider.clearCache(t)}refresh(){this._innerProvider&&this._innerProvider.refresh()}async whenReady(){return this._innerProvider?this._innerProvider.whenReady():Promise.resolve()}dispose(){this._isDisposed||(this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),D.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._isInitializing=!1,this._currentModelId=void 0)}}function ky(e){return new ra(e)}Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>q.useFormContext});Object.defineProperty(exports,"useFormController",{enumerable:!0,get:()=>q.useController});Object.defineProperty(exports,"useWatchForm",{enumerable:!0,get:()=>q.useWatch});Object.defineProperty(exports,"renderTableContents",{enumerable:!0,get:()=>ve.flexRender});exports.ActionBar=Kn;exports.ActionSelect=Bu;exports.ActionableBlurb=pc;exports.AlertTooltip=In;exports.AlternatingStatus=Nc;exports.AnimatePresence=es;exports.AnonymousBranch=Wf;exports.AnonymousGroup=gf;exports.ArtifactVersion=Eh;exports.AsyncList=Vp;exports.AsyncListGroupHeader=zn;exports.AsyncNamedCollapsibleBranch=Vf;exports.AsyncTreeList=vi;exports.Badge=sh;exports.BaseAsyncTreeDataProvider=ii;exports.BaseModalContent=cg;exports.BaseObservableDataProvider=An;exports.BaseUIComponentsContextProvider=dc;exports.BottomDialogDrawer=Cd;exports.BottomInlineDrawer=Dd;exports.BrandedHeader=Dm;exports.Button=Pe;exports.ButtonGroup=Pc;exports.ButtonGroupItem=ns;exports.CheckBox=jt;exports.CheckListItemCheck=wo;exports.CheckListItemCheckCompact=hi;exports.CheckListItemContainer=Zt;exports.CheckListItemContainerCompact=Pn;exports.CheckListItemContainerWithDivider=di;exports.CheckListItemContainerWithDividerCompact=ui;exports.CheckListItemName=Co;exports.CheckListItemNameCompact=pi;exports.CheckListItemTemplate=fi;exports.Collapsible=ho;exports.CollapsibleArtifact=$c;exports.CollapsibleContent=po;exports.CollapsibleList=Fh;exports.CollapsibleTrigger=pn;exports.ComboBox=qs;exports.CopyableText=nd;exports.DarkTooltip=yo;exports.DarkTooltipStyle=Bs;exports.DatePicker=I0;exports.DescriptionListItemTemplate=wf;exports.Dialog=fn;exports.DialogContent=mn;exports.DialogTrigger=gn;exports.Drawer=Ed;exports.DrawerContent=zd;exports.DrawerHeader=Od;exports.DrawerTrigger=Md;exports.Dropdown=ti;exports.DropdownMenu=On;exports.EMAIL_PATTERN=bs;exports.EmailRequirementKeys=ys;exports.EmptyListMessage=M0;exports.EndOverlayStyle=ud;exports.ErrorTooltip=Ps;exports.FIRST_CHAR_ALPHA=Jd;exports.FakeInputReference=Zs;exports.FilterPanel=O0;exports.FlexHandle=Yt;exports.FlexResizablePanel=Ds;exports.Form=Xs;exports.FormAccessToggles=jp;exports.FormCheckbox=Cp;exports.FormComboBox=Tp;exports.FormErrorMessage=Ve;exports.FormField=kp;exports.FormFileInput=zp;exports.FormInput=En;exports.FormInputWrapper=Ue;exports.FormLabel=Ce;exports.FormMultiSelect=Ap;exports.FormNameInput=Dp;exports.FormSelect=yp;exports.FormSubmit=Tn;exports.FormTextArea=gp;exports.FormToggle=hp;exports.GroupContext=Wn;exports.GroupList=pf;exports.GroupedObservableDataProvider=lf;exports.HiddenFormInput=Dn;exports.HolderListItemTemplate=dm;exports.HorizontalRule=Nd;exports.Icon=F;exports.IconButton=ie;exports.Input=It;exports.InputSearch=Wd;exports.ItemActionBar=vo;exports.ItemSelectionList=om;exports.ItemSelectionListDataProvider=sm;exports.KOSLogo=Th;exports.Label=ms;exports.LabelWithAction=Ud;exports.LabelWithContent=yn;exports.LabelWithContentLink=Yd;exports.LeftDialogDrawer=md;exports.LeftInlineDrawer=jd;exports.LifecycleAwareListProvider=na;exports.LifecycleAwareTreeProvider=ra;exports.LightTooltip=xo;exports.LightTooltipStyle=As;exports.Link=hn;exports.List=Bn;exports.ListContext=Nn;exports.ListContextProvider=Fn;exports.ListWithDetailsLayout=uy;exports.LockedButton=kc;exports.MenuWrapper=D0;exports.MiddleTruncateText=fo;exports.Modal=Sg;exports.ModalOverlayStyles=ji;exports.ModalTrigger=jg;exports.MultiSelect=Ys;exports.NO_LEADING_OR_TRAILING_SPACES_PATTERN=xs;exports.NO_SPACES_PATTERN=Xd;exports.NUMBERS_ONLY_PATTERN=Zd;exports.NamedCollapsibleBranch=eg;exports.NamedCollapsibleGroup=ff;exports.NamedListItemTemplate=Cf;exports.NamedSection=_i;exports.NamedSectionHeader=Eg;exports.ObservableDataProvider=Ln;exports.Option=ct;exports.PASSWORD_MIN_LENGTH=eu;exports.PASSWORD_REQUIREMENTS=_n;exports.PASSWORD_REQUIREMENTS_TOO_SIMILAR=Qs;exports.PageHeader=Fg;exports.PaneSplitter=uu;exports.PasswordRequirementKeys=At;exports.PasswordRequirementsList=lp;exports.PropertyDataProvider=cf;exports.RadioButton=Cs;exports.RequirementsList=Js;exports.ResizablePanel=kn;exports.ResizablePanelGroup=_s;exports.ResizablePanelGroupContextProvider=Is;exports.ResizablePanelHandle=Es;exports.RightDialogDrawer=yd;exports.RightInlineDrawer=Id;exports.SOURCE_PROP_KEY=Vt;exports.SOURCE_SYMBOL=Mn;exports.ScreenOverlay=Ms;exports.ScreenOverlayWithAction=ub;exports.Select=_t;exports.SelectAsyncTreeList=Bf;exports.SelectContext=$n;exports.SelectList=ko;exports.SelectListContext=Dt;exports.SelectSeparator=Rn;exports.SelectViewList=Kg;exports.SelectViewListItem=Ti;exports.SelectorTooltip=Hs;exports.ShellIconButton=Uu;exports.ShellMenu=im;exports.ShellMenuLink=lm;exports.StartOverlayStyle=dd;exports.StickyObserver=rn;exports.StudioNamedListItem=ri;exports.StyledSelectOption=Gp;exports.Tab=Gu;exports.TabPane=Ju;exports.TabTrigger=Ku;exports.TabTriggerList=qu;exports.Table=Rm;exports.TableHeader=an;exports.TableNamedListItemTemplate=Tf;exports.TableTd=Un;exports.Tag=co;exports.TagWithRemove=nh;exports.Text=E;exports.TextHighlight=rh;exports.Textarea=jn;exports.Toggle=bo;exports.ToggleThumb=Ns;exports.ToggleTrack=Rs;exports.Tooltip=Vs;exports.TopDialogDrawer=wd;exports.TopInlineDrawer=_d;exports.TreeDataProvider=Of;exports.TreeList=Ff;exports.USERNAME_PATTERN=qd;exports.View=Qi;exports.ViewContainer=ea;exports.ViewHeader=Yn;exports.VirtualList=ki;exports.VirtualTable=rb;exports.VirtualizedList=wi;exports.VirtualizedSelectList=lg;exports.attachSource=uo;exports.baseComponentStyles=Pr;exports.baseGenericStyles=qo;exports.baseSemanticStyles=Zo;exports.componentStudioTokenCss=Yl;exports.componentStyles=Yo;exports.createLifecycleAwareProvider=xy;exports.createLifecycleAwareTreeProvider=ky;exports.createLocalComponentHelper=Vl;exports.createLocalComponentTokenCss=Ul;exports.createLocalTokenSystem=Hl;exports.createObservableListProvider=oa;exports.createTableColumnHelper=Pm;exports.darkTooltipArrow=Ws;exports.getByteString=Pg;exports.getComponentTokenHelpers=z;exports.getCurrentDragData=fy;exports.getEmailValidation=Qd;exports.getErrorMessage=ou;exports.getGlobalToken=N;exports.getPasswordValidation=tu;exports.getPropertyWithFallback=Lp;exports.getSemanticToken=c;exports.getSource=Ut;exports.getStyles=Ql;exports.globalStudioTokenCss=Kl;exports.isContextAware=nn;exports.isErrorWithMessage=vs;exports.isGroupFactory=ai;exports.isItemTemplateFactory=ni;exports.isLockedAware=Bp;exports.keyResolver=si;exports.lightTooltipArrow=Ls;exports.noop=He;exports.normalizePathDisplay=Hg;exports.rootStyles=Xo;exports.scrollbarStyle=nc;exports.semanticStudioTokenCss=Gl;exports.stringComponentInsert=Wr;exports.studioColors=Hr;exports.studioDarkColors=Ur;exports.studioGenericColor=Gr;exports.studioLightColors=Vr;exports.studioTheme=rc;exports.transformLocalTokenObject=dn;exports.useBaseUIComponentsContext=qr;exports.useButtonGroupContext=os;exports.useCollapsibleContext=Kt;exports.useContainerWidth=xn;exports.useDialogContext=ot;exports.useDialogContextValue=rs;exports.useDragDrop=gy;exports.useDrawerContext=dt;exports.useGroupSelection=Mf;exports.useListContext=Jp;exports.useListGroupContext=li;exports.useLoadDataProvider=qt;exports.useModalContext=ot;exports.useMultiSelectContext=Gs;exports.useOpenedGroups=Ef;exports.useResizablePanelGroupContext=vn;exports.useResizeObserver=ks;exports.useSelectContext=Sn;exports.useSelectListContext=Ge;exports.useSelection=zf;exports.useTabContext=mo;exports.useTableContext=Vn;exports.useTreeListContext=mi;
|
|
3078
3312
|
//# sourceMappingURL=index.cjs.map
|