From 84f4c3bf46f5d401f91294e2dc984207308705c1 Mon Sep 17 00:00:00 2001 From: OfficialDakari Date: Thu, 3 Apr 2025 18:19:40 +0500 Subject: [PATCH] create divider --- dist/react-you-ui.js | 2 +- dist/react-you-ui.mjs | 36 +- dist/react-you-ui10.js | 39 +- dist/react-you-ui10.mjs | 195 +--- dist/react-you-ui11.js | 68 +- dist/react-you-ui11.mjs | 330 +++--- dist/react-you-ui12.js | 103 +- dist/react-you-ui12.mjs | 691 +++++-------- dist/react-you-ui13.js | 131 ++- dist/react-you-ui13.mjs | 991 +++++++++--------- dist/react-you-ui14.js | 111 +- dist/react-you-ui14.mjs | 720 ++++++++----- dist/react-you-ui15.js | 101 +- dist/react-you-ui15.mjs | 627 +++++------- dist/react-you-ui16.js | 133 ++- dist/react-you-ui16.mjs | 870 +++++++--------- dist/react-you-ui17.js | 119 ++- dist/react-you-ui17.mjs | 699 +++++++++---- dist/react-you-ui18.js | 105 +- dist/react-you-ui18.mjs | 427 ++++---- dist/react-you-ui19.js | 91 +- dist/react-you-ui19.mjs | 315 +++--- dist/react-you-ui20.js | 81 +- dist/react-you-ui20.mjs | 481 +++------ dist/react-you-ui21.js | 110 +- dist/react-you-ui21.mjs | 605 ++++++----- dist/react-you-ui22.js | 180 ++-- dist/react-you-ui22.mjs | 839 +++++---------- dist/react-you-ui23.js | 267 +++-- dist/react-you-ui23.mjs | 1203 +++++++++------------- dist/react-you-ui24.js | 248 +++-- dist/react-you-ui24.mjs | 994 +++++++++++++----- dist/react-you-ui25.js | 216 ++-- dist/react-you-ui25.mjs | 838 +++++---------- dist/react-you-ui26.js | 208 +++- dist/react-you-ui26.mjs | 1625 +++++++++++------------------- dist/react-you-ui27.js | 18 + dist/react-you-ui27.mjs | 1047 +++++++++++++++++++ dist/react-you-ui4.js | 2 +- dist/react-you-ui4.mjs | 2 +- dist/react-you-ui9.js | 2 +- dist/react-you-ui9.mjs | 42 +- dist/src/components/Divider.d.ts | 12 + src/components/Divider.tsx | 38 + 44 files changed, 8021 insertions(+), 7941 deletions(-) create mode 100644 dist/react-you-ui27.js create mode 100644 dist/react-you-ui27.mjs create mode 100644 dist/src/components/Divider.d.ts create mode 100644 src/components/Divider.tsx diff --git a/dist/react-you-ui.js b/dist/react-you-ui.js index 9fa4951..49a2ce7 100644 --- a/dist/react-you-ui.js +++ b/dist/react-you-ui.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./react-you-ui22.js"),s=require("./react-you-ui24.js"),i=require("./react-you-ui10.js"),c=require("./react-you-ui14.js"),p=require("./react-you-ui23.js"),u=require("./react-you-ui11.js"),a=require("./react-you-ui16.js"),m=require("./react-you-ui12.js"),h=require("./react-you-ui17.js"),l=require("./react-you-ui26.js"),q=require("./react-you-ui3.js"),_=require("./react-you-ui21.js"),e=require("./react-you-ui25.js"),t=require("./react-you-ui19.js"),n=require("./react-you-ui20.js"),B=require("./react-you-ui18.js"),T=require("./react-you-ui15.js"),d=require("./react-you-ui4.js"),C=require("./react-you-ui8.js"),F=require("./react-you-ui9.js"),b=require("./react-you-ui5.js"),o=require("./react-you-ui6.js"),g=require("./react-you-ui13.js");exports.TextField=r.TextField;exports.Button=s.Button;exports.Checkbox=i.Checkbox;exports.Radio=c.Radio;exports.Select=p.Select;exports.Switch=u.Switch;exports.Slider=a.Slider;exports.Dialog=m.Dialog;exports.List=h.List;exports.Box=l.Box;exports.Typography=q.Typography;exports.IconButton=_.IconButton;exports.AssistChip=e.AssistChip;exports.ChipSet=e.ChipSet;exports.FilterChip=e.FilterChip;exports.InputChip=e.InputChip;exports.BrandedFAB=t.BrandedFAB;exports.FAB=t.FAB;exports.Tab=n.Tab;exports.Tabs=n.Tabs;exports.CircularProgress=B.CircularProgress;exports.Menu=T.Menu;exports.Paper=d.Paper;exports.FormLabel=C.FormLabel;exports.AppBar=F.AppBar;exports.Link=b.Link;exports.ThemeProvider=o.ThemeProvider;exports.usePalette=o.usePalette;exports.useTheme=o.useTheme;exports.createTheme=g.createTheme; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./react-you-ui23.js"),s=require("./react-you-ui25.js"),i=require("./react-you-ui11.js"),c=require("./react-you-ui15.js"),p=require("./react-you-ui24.js"),u=require("./react-you-ui12.js"),a=require("./react-you-ui17.js"),m=require("./react-you-ui13.js"),h=require("./react-you-ui18.js"),l=require("./react-you-ui27.js"),q=require("./react-you-ui3.js"),_=require("./react-you-ui22.js"),e=require("./react-you-ui26.js"),t=require("./react-you-ui20.js"),n=require("./react-you-ui21.js"),B=require("./react-you-ui19.js"),T=require("./react-you-ui16.js"),d=require("./react-you-ui4.js"),C=require("./react-you-ui8.js"),F=require("./react-you-ui10.js"),b=require("./react-you-ui5.js"),o=require("./react-you-ui6.js"),g=require("./react-you-ui14.js");exports.TextField=r.TextField;exports.Button=s.Button;exports.Checkbox=i.Checkbox;exports.Radio=c.Radio;exports.Select=p.Select;exports.Switch=u.Switch;exports.Slider=a.Slider;exports.Dialog=m.Dialog;exports.List=h.List;exports.Box=l.Box;exports.Typography=q.Typography;exports.IconButton=_.IconButton;exports.AssistChip=e.AssistChip;exports.ChipSet=e.ChipSet;exports.FilterChip=e.FilterChip;exports.InputChip=e.InputChip;exports.BrandedFAB=t.BrandedFAB;exports.FAB=t.FAB;exports.Tab=n.Tab;exports.Tabs=n.Tabs;exports.CircularProgress=B.CircularProgress;exports.Menu=T.Menu;exports.Paper=d.Paper;exports.FormLabel=C.FormLabel;exports.AppBar=F.AppBar;exports.Link=b.Link;exports.ThemeProvider=o.ThemeProvider;exports.usePalette=o.usePalette;exports.useTheme=o.useTheme;exports.createTheme=g.createTheme; diff --git a/dist/react-you-ui.mjs b/dist/react-you-ui.mjs index f987439..d0c9ec7 100644 --- a/dist/react-you-ui.mjs +++ b/dist/react-you-ui.mjs @@ -1,26 +1,26 @@ -import { TextField as e } from "./react-you-ui22.mjs"; -import { Button as p } from "./react-you-ui24.mjs"; -import { Checkbox as x } from "./react-you-ui10.mjs"; -import { Radio as i } from "./react-you-ui14.mjs"; -import { Select as h } from "./react-you-ui23.mjs"; -import { Switch as l } from "./react-you-ui11.mjs"; -import { Slider as u } from "./react-you-ui16.mjs"; -import { Dialog as T } from "./react-you-ui12.mjs"; -import { List as d } from "./react-you-ui17.mjs"; -import { Box as F } from "./react-you-ui26.mjs"; +import { TextField as e } from "./react-you-ui23.mjs"; +import { Button as p } from "./react-you-ui25.mjs"; +import { Checkbox as x } from "./react-you-ui11.mjs"; +import { Radio as i } from "./react-you-ui15.mjs"; +import { Select as h } from "./react-you-ui24.mjs"; +import { Switch as l } from "./react-you-ui12.mjs"; +import { Slider as u } from "./react-you-ui17.mjs"; +import { Dialog as T } from "./react-you-ui13.mjs"; +import { List as d } from "./react-you-ui18.mjs"; +import { Box as F } from "./react-you-ui27.mjs"; import { Typography as A } from "./react-you-ui3.mjs"; -import { IconButton as S } from "./react-you-ui21.mjs"; -import { AssistChip as L, ChipSet as k, FilterChip as y, InputChip as I } from "./react-you-ui25.mjs"; -import { BrandedFAB as w, FAB as D } from "./react-you-ui19.mjs"; -import { Tab as R, Tabs as j } from "./react-you-ui20.mjs"; -import { CircularProgress as z } from "./react-you-ui18.mjs"; -import { Menu as G } from "./react-you-ui15.mjs"; +import { IconButton as S } from "./react-you-ui22.mjs"; +import { AssistChip as L, ChipSet as k, FilterChip as y, InputChip as I } from "./react-you-ui26.mjs"; +import { BrandedFAB as w, FAB as D } from "./react-you-ui20.mjs"; +import { Tab as R, Tabs as j } from "./react-you-ui21.mjs"; +import { CircularProgress as z } from "./react-you-ui19.mjs"; +import { Menu as G } from "./react-you-ui16.mjs"; import { Paper as J } from "./react-you-ui4.mjs"; import { FormLabel as N } from "./react-you-ui8.mjs"; -import { AppBar as Q } from "./react-you-ui9.mjs"; +import { AppBar as Q } from "./react-you-ui10.mjs"; import { Link as V } from "./react-you-ui5.mjs"; import { ThemeProvider as X, usePalette as Y, useTheme as Z } from "./react-you-ui6.mjs"; -import { createTheme as $ } from "./react-you-ui13.mjs"; +import { createTheme as $ } from "./react-you-ui14.mjs"; export { Q as AppBar, L as AssistChip, diff --git a/dist/react-you-ui10.js b/dist/react-you-ui10.js index 3d1e271..0a88831 100644 --- a/dist/react-you-ui10.js +++ b/dist/react-you-ui10.js @@ -1,38 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),R=require("react"),V=require("./create-component-D9KTUrcf.js"),e=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const n=require("./animation-A38fZ1oY.js"),B=require("./delegate-4958lG3m.js"),v=require("./form-label-activation-CYEOF_US.js"),D=require("./redispatch-event-C93E51ce.js"),m=require("./validator-DUxooTr6.js"),M=require("./element-internals-OOm6rgx-.js"),u=require("./form-associated-CxXMoMPu.js"),S=require("./checkbox-validator-CeFJv7iw.js");/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const T=B.mixinDelegatesAria(m.mixinConstraintValidation(u.mixinFormAssociated(M.mixinElementInternals(e.r))));let t=class extends T{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",r=>{!v.isActivationClick(r)||!this.input||(this.focus(),v.dispatchActivationClick(this.input))})}update(r){(r.has("checked")||r.has("disabled")||r.has("indeterminate"))&&(this.prevChecked=r.get("checked")??this.checked,this.prevDisabled=r.get("disabled")??this.disabled,this.prevIndeterminate=r.get("indeterminate")??this.indeterminate),super.update(r)}render(){const r=!this.prevChecked&&!this.prevIndeterminate,o=this.prevChecked&&!this.prevIndeterminate,d=this.prevIndeterminate,a=this.checked&&!this.indeterminate,i=this.indeterminate,l=e.e$1({disabled:this.disabled,selected:a||i,unselected:!a&&!i,checked:a,indeterminate:i,"prev-unselected":r,"prev-checked":o,"prev-indeterminate":d,"prev-disabled":this.prevDisabled}),{ariaLabel:h,ariaInvalid:p}=this;return e.x` -
- - -
-
- - - -
- `}handleInput(r){const o=r.target;this.checked=o.checked,this.indeterminate=o.indeterminate}handleChange(r){D.redispatchEvent(this,r)}[u.getFormValue](){return!this.checked||this.indeterminate?null:this.value}[u.getFormState](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(r){this.checked=r==="true"}[m.createValidator](){return new S.CheckboxValidator(()=>this)}[m.getValidityAnchor](){return this.input}};t.shadowRootOptions={...e.r.shadowRootOptions,delegatesFocus:!0};e.__decorate([e.n({type:Boolean})],t.prototype,"checked",void 0);e.__decorate([e.n({type:Boolean})],t.prototype,"indeterminate",void 0);e.__decorate([e.n({type:Boolean})],t.prototype,"required",void 0);e.__decorate([e.n()],t.prototype,"value",void 0);e.__decorate([n.r()],t.prototype,"prevChecked",void 0);e.__decorate([n.r()],t.prototype,"prevDisabled",void 0);e.__decorate([n.r()],t.prototype,"prevIndeterminate",void 0);e.__decorate([n.e$1("input")],t.prototype,"input",void 0);/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const F=e.i$1`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}} -`;/** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let s=class extends t{};s.styles=[F];s=e.__decorate([e.t$1("md-checkbox")],s);const j=V.o({tagName:"md-checkbox",react:R,elementClass:s}),L=({checked:c,indeterminate:r,id:o,disabled:d,hidden:a,ariaLabel:i,ariaLabelledBy:l,ariaDescribedBy:h,ariaControls:p,required:b,onInput:k,onChange:x,onClick:y,onMouseDown:f,onMouseUp:g,onMouseEnter:w,onFocus:C,onBlur:_,className:q,style:$,tabIndex:z,name:I,...A})=>E.jsx(j,{...A,id:o,value:c?"on":"off",indeterminate:r,disabled:d||!1,required:b,checked:c,hidden:a,"touch-target":"wrapper","aria-label":i,"aria-labelledby":l,"aria-describedby":h,"aria-controls":p,"aria-required":b,onInput:k,onChange:x,onClick:y,onMouseDown:f,onMouseUp:g,onMouseEnter:w,onFocus:C,onBlur:_,className:q,style:$,tabIndex:z,name:I||void 0});exports.Checkbox=L; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("./react-you-ui27.js"),i=e=>{const{className:t,id:n,children:r,style:s,...o}=e;return a.jsx(c.Box,{className:t,id:n,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 16px",backgroundColor:"transparent",...s},...o,children:r})};exports.AppBar=i; diff --git a/dist/react-you-ui10.mjs b/dist/react-you-ui10.mjs index ca18440..0686790 100644 --- a/dist/react-you-ui10.mjs +++ b/dist/react-you-ui10.mjs @@ -1,176 +1,25 @@ -import { jsx as R } from "react/jsx-runtime"; -import V from "react"; -import { o as _ } from "./create-component-CVXl33PD.mjs"; -import { r as v, _ as t, n as d, c as q, x as E, E as m, a as F, b as T } from "./class-map-CwiboTfb.mjs"; -import "./ripple-pQcEjR05.mjs"; -import { r as b, a as M } from "./animation-DjClVFum.mjs"; -import { m as S } from "./delegate-BXi1gVeU.mjs"; -import { i as G, d as L } from "./form-label-activation-ed0HgVsy.mjs"; -import { r as N } from "./redispatch-event-taWUbWUt.mjs"; -import { m as O, c as Y, g as j } from "./validator-DZt1_yHv.mjs"; -import { m as H } from "./element-internals-3IY9gE4L.mjs"; -import { m as J, g as K, a as P } from "./form-associated-CyYeHPMb.mjs"; -import { C as Q } from "./checkbox-validator-Cy4iemH_.mjs"; -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const U = S(O(J(H(v)))); -let r = class extends U { - constructor() { - super(), this.checked = !1, this.indeterminate = !1, this.required = !1, this.value = "on", this.prevChecked = !1, this.prevDisabled = !1, this.prevIndeterminate = !1, this.addEventListener("click", (e) => { - !G(e) || !this.input || (this.focus(), L(this.input)); - }); - } - update(e) { - (e.has("checked") || e.has("disabled") || e.has("indeterminate")) && (this.prevChecked = e.get("checked") ?? this.checked, this.prevDisabled = e.get("disabled") ?? this.disabled, this.prevIndeterminate = e.get("indeterminate") ?? this.indeterminate), super.update(e); - } - render() { - const e = !this.prevChecked && !this.prevIndeterminate, o = this.prevChecked && !this.prevIndeterminate, n = this.prevIndeterminate, a = this.checked && !this.indeterminate, i = this.indeterminate, l = q({ - disabled: this.disabled, - selected: a || i, - unselected: !a && !i, - checked: a, - indeterminate: i, - "prev-unselected": e, - "prev-checked": o, - "prev-indeterminate": n, - "prev-disabled": this.prevDisabled - }), { ariaLabel: h, ariaInvalid: p } = this; - return E` -
- - -
-
- - - -
- `; - } - handleInput(e) { - const o = e.target; - this.checked = o.checked, this.indeterminate = o.indeterminate; - } - handleChange(e) { - N(this, e); - } - [K]() { - return !this.checked || this.indeterminate ? null : this.value; - } - [P]() { - return String(this.checked); - } - formResetCallback() { - this.checked = this.hasAttribute("checked"); - } - formStateRestoreCallback(e) { - this.checked = e === "true"; - } - [Y]() { - return new Q(() => this); - } - [j]() { - return this.input; - } +import { jsx as p } from "react/jsx-runtime"; +import { Box as a } from "./react-you-ui27.mjs"; +const c = (e) => { + const { className: t, id: r, children: n, style: s, ...o } = e; + return /* @__PURE__ */ p( + a, + { + className: t, + id: r, + style: { + display: "flex", + alignItems: "center", + justifyContent: "space-between", + padding: "16px 16px", + backgroundColor: "transparent", + ...s + }, + ...o, + children: n + } + ); }; -r.shadowRootOptions = { - ...v.shadowRootOptions, - delegatesFocus: !0 -}; -t([ - d({ type: Boolean }) -], r.prototype, "checked", void 0); -t([ - d({ type: Boolean }) -], r.prototype, "indeterminate", void 0); -t([ - d({ type: Boolean }) -], r.prototype, "required", void 0); -t([ - d() -], r.prototype, "value", void 0); -t([ - b() -], r.prototype, "prevChecked", void 0); -t([ - b() -], r.prototype, "prevDisabled", void 0); -t([ - b() -], r.prototype, "prevIndeterminate", void 0); -t([ - M("input") -], r.prototype, "input", void 0); -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const W = F`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}} -`; -/** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let s = class extends r { -}; -s.styles = [W]; -s = t([ - T("md-checkbox") -], s); -const X = _({ - tagName: "md-checkbox", - react: V, - elementClass: s -}), be = ({ checked: c, indeterminate: e, id: o, disabled: n, hidden: a, ariaLabel: i, ariaLabelledBy: l, ariaDescribedBy: h, ariaControls: p, required: u, onInput: k, onChange: x, onClick: f, onMouseDown: y, onMouseUp: g, onMouseEnter: w, onFocus: C, onBlur: z, className: $, style: I, tabIndex: A, name: B, ...D }) => /* @__PURE__ */ R( - X, - { - ...D, - id: o, - value: c ? "on" : "off", - indeterminate: e, - disabled: n || !1, - required: u, - checked: c, - hidden: a, - "touch-target": "wrapper", - "aria-label": i, - "aria-labelledby": l, - "aria-describedby": h, - "aria-controls": p, - "aria-required": u, - onInput: k, - onChange: x, - onClick: f, - onMouseDown: y, - onMouseUp: g, - onMouseEnter: w, - onFocus: C, - onBlur: z, - className: $, - style: I, - tabIndex: A, - name: B || void 0 - } -); export { - be as Checkbox + c as AppBar }; diff --git a/dist/react-you-ui11.js b/dist/react-you-ui11.js index 3bbe231..3d1e271 100644 --- a/dist/react-you-ui11.js +++ b/dist/react-you-ui11.js @@ -1,62 +1,38 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),_=require("react"),O=require("./create-component-D9KTUrcf.js"),e=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const B=require("./animation-A38fZ1oY.js"),A=require("./delegate-4958lG3m.js"),m=require("./form-label-activation-CYEOF_US.js"),M=require("./redispatch-event-C93E51ce.js"),p=require("./validator-DUxooTr6.js"),R=require("./element-internals-OOm6rgx-.js"),u=require("./form-associated-CxXMoMPu.js"),H=require("./checkbox-validator-CeFJv7iw.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),R=require("react"),V=require("./create-component-D9KTUrcf.js"),e=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const n=require("./animation-A38fZ1oY.js"),B=require("./delegate-4958lG3m.js"),v=require("./form-label-activation-CYEOF_US.js"),D=require("./redispatch-event-C93E51ce.js"),m=require("./validator-DUxooTr6.js"),M=require("./element-internals-OOm6rgx-.js"),u=require("./form-associated-CxXMoMPu.js"),S=require("./checkbox-validator-CeFJv7iw.js");/** * @license - * Copyright 2023 Google LLC + * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const f=Symbol("dispatchHooks");function L(s,r){const t=s[f];if(!t)throw new Error(`'${s.type}' event needs setupDispatchHooks().`);t.addEventListener("after",r)}const v=new WeakMap;function D(s,...r){let t=v.get(s);t||(t=new Set,v.set(s,t));for(const c of r){if(t.has(c))continue;let i=!1;s.addEventListener(c,a=>{if(i)return;a.stopImmediatePropagation();const d=Reflect.construct(a.constructor,[a.type,a]),n=new EventTarget;d[f]=n,i=!0;const l=s.dispatchEvent(d);i=!1,l||a.preventDefault(),n.dispatchEvent(new Event("after"))},{capture:!0}),t.add(c)}}/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const V=A.mixinDelegatesAria(p.mixinConstraintValidation(u.mixinFormAssociated(R.mixinElementInternals(e.r))));let o=class extends V{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",r=>{!m.isActivationClick(r)||!this.input||(this.focus(),m.dispatchActivationClick(this.input))}),D(this,"keydown"),this.addEventListener("keydown",r=>{L(r,()=>{r.defaultPrevented||r.key!=="Enter"||this.disabled||!this.input||this.input.click()})})}render(){return e.x` -
+ */const T=B.mixinDelegatesAria(m.mixinConstraintValidation(u.mixinFormAssociated(M.mixinElementInternals(e.r))));let t=class extends T{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",r=>{!v.isActivationClick(r)||!this.input||(this.focus(),v.dispatchActivationClick(this.input))})}update(r){(r.has("checked")||r.has("disabled")||r.has("indeterminate"))&&(this.prevChecked=r.get("checked")??this.checked,this.prevDisabled=r.get("disabled")??this.disabled,this.prevIndeterminate=r.get("indeterminate")??this.indeterminate),super.update(r)}render(){const r=!this.prevChecked&&!this.prevIndeterminate,o=this.prevChecked&&!this.prevIndeterminate,d=this.prevIndeterminate,a=this.checked&&!this.indeterminate,i=this.indeterminate,l=e.e$1({disabled:this.disabled,selected:a||i,unselected:!a&&!i,checked:a,indeterminate:i,"prev-unselected":r,"prev-checked":o,"prev-indeterminate":d,"prev-disabled":this.prevDisabled}),{ariaLabel:h,ariaInvalid:p}=this;return e.x` +
- - ${this.renderHandle()} -
- `}getRenderClasses(){return{selected:this.selected,unselected:!this.selected,disabled:this.disabled}}renderHandle(){const r={"with-icon":this.showOnlySelectedIcon?this.selected:this.icons};return e.x` - ${this.renderTouchTarget()} - - - - ${this.shouldShowIcons()?this.renderIcons():e.x``} - - - `}renderIcons(){return e.x` -
- ${this.renderOnIcon()} - ${this.showOnlySelectedIcon?e.x``:this.renderOffIcon()} -
- `}renderOnIcon(){return e.x` - - - +
+
+ + + -
- `}renderOffIcon(){return e.x` - - - - - - `}renderTouchTarget(){return e.x``}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(r){const t=r.target;this.selected=t.checked}handleChange(r){M.redispatchEvent(this,r)}[u.getFormValue](){return this.selected?this.value:null}[u.getFormState](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute("selected")}formStateRestoreCallback(r){this.selected=r==="true"}[p.createValidator](){return new H.CheckboxValidator(()=>({checked:this.selected,required:this.required}))}[p.getValidityAnchor](){return this.input}};o.shadowRootOptions={mode:"open",delegatesFocus:!0};e.__decorate([e.n({type:Boolean})],o.prototype,"selected",void 0);e.__decorate([e.n({type:Boolean})],o.prototype,"icons",void 0);e.__decorate([e.n({type:Boolean,attribute:"show-only-selected-icon"})],o.prototype,"showOnlySelectedIcon",void 0);e.__decorate([e.n({type:Boolean})],o.prototype,"required",void 0);e.__decorate([e.n()],o.prototype,"value",void 0);e.__decorate([B.e$1("input")],o.prototype,"input",void 0);/** +
+ `}handleInput(r){const o=r.target;this.checked=o.checked,this.indeterminate=o.indeterminate}handleChange(r){D.redispatchEvent(this,r)}[u.getFormValue](){return!this.checked||this.indeterminate?null:this.value}[u.getFormState](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(r){this.checked=r==="true"}[m.createValidator](){return new S.CheckboxValidator(()=>this)}[m.getValidityAnchor](){return this.input}};t.shadowRootOptions={...e.r.shadowRootOptions,delegatesFocus:!0};e.__decorate([e.n({type:Boolean})],t.prototype,"checked",void 0);e.__decorate([e.n({type:Boolean})],t.prototype,"indeterminate",void 0);e.__decorate([e.n({type:Boolean})],t.prototype,"required",void 0);e.__decorate([e.n()],t.prototype,"value",void 0);e.__decorate([n.r()],t.prototype,"prevChecked",void 0);e.__decorate([n.r()],t.prototype,"prevDisabled",void 0);e.__decorate([n.r()],t.prototype,"prevIndeterminate",void 0);e.__decorate([n.e$1("input")],t.prototype,"input",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const j=e.i$1`@layer styles, hcm;@layer styles{:host{display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-switch-track-height, 32px))/2) 0px}md-focus-ring{--md-focus-ring-shape-start-start: var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-start-end: var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-end: var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-start: var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}.switch{align-items:center;display:inline-flex;flex-shrink:0;position:relative;width:var(--md-switch-track-width, 52px);height:var(--md-switch-track-height, 32px);border-start-start-radius:var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}input{appearance:none;height:max(100%,var(--md-switch-touch-target-size, 48px));outline:none;margin:0;position:absolute;width:max(100%,var(--md-switch-touch-target-size, 48px));z-index:1;cursor:inherit;top:50%;left:50%;transform:translate(-50%, -50%)}:host([touch-target=none]) input{display:none}}@layer styles{.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.disabled .track::before,.disabled .track::after{transition:none;opacity:var(--md-switch-disabled-track-opacity, 0.12)}.disabled .track::before{background-clip:content-box}.selected .track::before{background-color:var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4))}.selected:hover .track::before{background-color:var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4))}.selected:focus-within .track::before{background-color:var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4))}.selected:active .track::before{background-color:var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4))}.selected.disabled .track{background-clip:border-box}.selected.disabled .track::before{background-color:var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20))}.unselected .track::before{background-color:var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));border-style:solid;border-width:var(--md-switch-track-outline-width, 2px)}.unselected:hover .track::before{background-color:var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:focus-visible .track::before{background-color:var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:active .track::before{background-color:var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected.disabled .track::before{background-color:var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20))}}@layer hcm{@media(forced-colors: active){.selected .track::before{background:ButtonText;border-color:ButtonText}.disabled .track::before{border-color:GrayText;opacity:1}.disabled.selected .track::before{background:GrayText}}}@layer styles{.handle-container{display:flex;place-content:center;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.selected .handle-container{margin-inline-start:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.unselected .handle-container{margin-inline-end:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--md-switch-handle-shape-start-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-handle-shape-start-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-handle-shape-end-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-handle-shape-end-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));height:var(--md-switch-handle-height, 16px);width:var(--md-switch-handle-width, 16px);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.disabled .handle,.disabled .handle::before{transition:none}.selected .handle{height:var(--md-switch-selected-handle-height, 24px);width:var(--md-switch-selected-handle-width, 24px)}.handle.with-icon{height:var(--md-switch-with-icon-handle-height, 24px);width:var(--md-switch-with-icon-handle-width, 24px)}.selected:not(.disabled):active .handle,.unselected:not(.disabled):active .handle{height:var(--md-switch-pressed-handle-height, 28px);width:var(--md-switch-pressed-handle-width, 28px);transition-timing-function:linear;transition-duration:100ms}.selected .handle::before{background-color:var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff))}.selected:hover .handle::before{background-color:var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:focus-within .handle::before{background-color:var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:active .handle::before{background-color:var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected.disabled .handle::before{background-color:var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));opacity:var(--md-switch-disabled-selected-handle-opacity, 1)}.unselected .handle::before{background-color:var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e))}.unselected:hover .handle::before{background-color:var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:focus-within .handle::before{background-color:var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:active .handle::before{background-color:var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected.disabled .handle::before{background-color:var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-handle-opacity, 0.38)}md-ripple{border-radius:var(--md-switch-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-switch-state-layer-size, 40px);inset:unset;width:var(--md-switch-state-layer-size, 40px)}.selected md-ripple{--md-ripple-hover-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12)}.unselected md-ripple{--md-ripple-hover-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12)}}@layer hcm{@media(forced-colors: active){.unselected .handle::before{background:ButtonText}.disabled .handle::before{opacity:1}.disabled.unselected .handle::before{background:GrayText}}}@layer styles{.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;fill:currentColor;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.disabled .icon{transition:none}.selected .icon--on,.unselected .icon--off{opacity:1}.unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--md-switch-icon-size, 16px);height:var(--md-switch-icon-size, 16px);color:var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:hover .icon--off{color:var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:focus-within .icon--off{color:var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:active .icon--off{color:var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected.disabled .icon--off{color:var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));opacity:var(--md-switch-disabled-icon-opacity, 0.38)}.icon--on{width:var(--md-switch-selected-icon-size, 16px);height:var(--md-switch-selected-icon-size, 16px);color:var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:hover .icon--on{color:var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:focus-within .icon--on{color:var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:active .icon--on{color:var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected.disabled .icon--on{color:var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon--off{fill:Canvas}.icon--on{fill:ButtonText}.disabled.unselected .icon--off,.disabled.selected .icon--on{opacity:1}.disabled .icon--on{fill:GrayText}}} + */const F=e.i$1`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}} `;/** * @license - * Copyright 2021 Google LLC + * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let h=class extends o{};h.styles=[j];h=e.__decorate([e.t$1("md-switch")],h);const P=O.o({tagName:"md-switch",react:_,elementClass:h}),F=({checked:s,id:r,disabled:t,hidden:c,ariaLabel:i,ariaLabelledBy:a,ariaDescribedBy:d,ariaControls:n,required:l,onInput:b,onChange:w,onClick:y,onMouseDown:g,onMouseUp:k,onMouseEnter:x,onFocus:S,onBlur:$,className:E,style:q,tabIndex:I,name:T,...z})=>C.jsx(P,{...z,id:r,disabled:t||!1,required:l,selected:s,hidden:c,"touch-target":"wrapper","aria-label":i,"aria-labelledby":a,"aria-describedby":d,"aria-controls":n,"aria-required":l,onInput:b,onChange:w,onClick:y,onMouseDown:g,onMouseUp:k,onMouseEnter:x,onFocus:S,onBlur:$,className:E,style:q,tabIndex:I,name:T||void 0});exports.Switch=F; + */let s=class extends t{};s.styles=[F];s=e.__decorate([e.t$1("md-checkbox")],s);const j=V.o({tagName:"md-checkbox",react:R,elementClass:s}),L=({checked:c,indeterminate:r,id:o,disabled:d,hidden:a,ariaLabel:i,ariaLabelledBy:l,ariaDescribedBy:h,ariaControls:p,required:b,onInput:k,onChange:x,onClick:y,onMouseDown:f,onMouseUp:g,onMouseEnter:w,onFocus:C,onBlur:_,className:q,style:$,tabIndex:z,name:I,...A})=>E.jsx(j,{...A,id:o,value:c?"on":"off",indeterminate:r,disabled:d||!1,required:b,checked:c,hidden:a,"touch-target":"wrapper","aria-label":i,"aria-labelledby":l,"aria-describedby":h,"aria-controls":p,"aria-required":b,onInput:k,onChange:x,onClick:y,onMouseDown:f,onMouseUp:g,onMouseEnter:w,onFocus:C,onBlur:_,className:q,style:$,tabIndex:z,name:I||void 0});exports.Checkbox=L; diff --git a/dist/react-you-ui11.mjs b/dist/react-you-ui11.mjs index 6f5c1f6..ca18440 100644 --- a/dist/react-you-ui11.mjs +++ b/dist/react-you-ui11.mjs @@ -1,254 +1,176 @@ -import { jsx as O } from "react/jsx-runtime"; -import B from "react"; -import { o as A } from "./create-component-CVXl33PD.mjs"; -import { _ as c, n, x as s, c as u, E as H, r as R, a as _, b as M } from "./class-map-CwiboTfb.mjs"; +import { jsx as R } from "react/jsx-runtime"; +import V from "react"; +import { o as _ } from "./create-component-CVXl33PD.mjs"; +import { r as v, _ as t, n as d, c as q, x as E, E as m, a as F, b as T } from "./class-map-CwiboTfb.mjs"; import "./ripple-pQcEjR05.mjs"; -import { a as q } from "./animation-DjClVFum.mjs"; -import { m as D } from "./delegate-BXi1gVeU.mjs"; -import { i as L, d as V } from "./form-label-activation-ed0HgVsy.mjs"; -import { r as F } from "./redispatch-event-taWUbWUt.mjs"; -import { m as G, c as P, g as j } from "./validator-DZt1_yHv.mjs"; -import { m as N } from "./element-internals-3IY9gE4L.mjs"; -import { m as Z, g as K, a as U } from "./form-associated-CyYeHPMb.mjs"; -import { C as W } from "./checkbox-validator-Cy4iemH_.mjs"; +import { r as b, a as M } from "./animation-DjClVFum.mjs"; +import { m as S } from "./delegate-BXi1gVeU.mjs"; +import { i as G, d as L } from "./form-label-activation-ed0HgVsy.mjs"; +import { r as N } from "./redispatch-event-taWUbWUt.mjs"; +import { m as O, c as Y, g as j } from "./validator-DZt1_yHv.mjs"; +import { m as H } from "./element-internals-3IY9gE4L.mjs"; +import { m as J, g as K, a as P } from "./form-associated-CyYeHPMb.mjs"; +import { C as Q } from "./checkbox-validator-Cy4iemH_.mjs"; /** * @license - * Copyright 2023 Google LLC + * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const f = Symbol("dispatchHooks"); -function Y(t, e) { - const r = t[f]; - if (!r) - throw new Error(`'${t.type}' event needs setupDispatchHooks().`); - r.addEventListener("after", e); -} -const v = /* @__PURE__ */ new WeakMap(); -function J(t, ...e) { - let r = v.get(t); - r || (r = /* @__PURE__ */ new Set(), v.set(t, r)); - for (const i of e) { - if (r.has(i)) - continue; - let d = !1; - t.addEventListener(i, (a) => { - if (d) - return; - a.stopImmediatePropagation(); - const l = Reflect.construct(a.constructor, [ - a.type, - a - ]), h = new EventTarget(); - l[f] = h, d = !0; - const p = t.dispatchEvent(l); - d = !1, p || a.preventDefault(), h.dispatchEvent(new Event("after")); - }, { - // Ensure this listener runs before other listeners. - // `setupDispatchHooks()` should be called in constructors to also - // ensure they run before any other externally-added capture listeners. - capture: !0 - }), r.add(i); - } -} -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const Q = D(G(Z(N(R)))); -let o = class extends Q { +const U = S(O(J(H(v)))); +let r = class extends U { constructor() { - super(), this.selected = !1, this.icons = !1, this.showOnlySelectedIcon = !1, this.required = !1, this.value = "on", this.addEventListener("click", (e) => { - !L(e) || !this.input || (this.focus(), V(this.input)); - }), J(this, "keydown"), this.addEventListener("keydown", (e) => { - Y(e, () => { - e.defaultPrevented || e.key !== "Enter" || this.disabled || !this.input || this.input.click(); - }); + super(), this.checked = !1, this.indeterminate = !1, this.required = !1, this.value = "on", this.prevChecked = !1, this.prevDisabled = !1, this.prevIndeterminate = !1, this.addEventListener("click", (e) => { + !G(e) || !this.input || (this.focus(), L(this.input)); }); } + update(e) { + (e.has("checked") || e.has("disabled") || e.has("indeterminate")) && (this.prevChecked = e.get("checked") ?? this.checked, this.prevDisabled = e.get("disabled") ?? this.disabled, this.prevIndeterminate = e.get("indeterminate") ?? this.indeterminate), super.update(e); + } render() { - return s` -
+ const e = !this.prevChecked && !this.prevIndeterminate, o = this.prevChecked && !this.prevIndeterminate, n = this.prevIndeterminate, a = this.checked && !this.indeterminate, i = this.indeterminate, l = q({ + disabled: this.disabled, + selected: a || i, + unselected: !a && !i, + checked: a, + indeterminate: i, + "prev-unselected": e, + "prev-checked": o, + "prev-indeterminate": n, + "prev-disabled": this.prevDisabled + }), { ariaLabel: h, ariaInvalid: p } = this; + return E` +
- - ${this.renderHandle()} +
+
+ + +
`; } - getRenderClasses() { - return { - selected: this.selected, - unselected: !this.selected, - disabled: this.disabled - }; - } - renderHandle() { - const e = { - "with-icon": this.showOnlySelectedIcon ? this.selected : this.icons - }; - return s` - ${this.renderTouchTarget()} - - - - ${this.shouldShowIcons() ? this.renderIcons() : s``} - - - `; - } - renderIcons() { - return s` -
- ${this.renderOnIcon()} - ${this.showOnlySelectedIcon ? s`` : this.renderOffIcon()} -
- `; - } - /** - * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024 - */ - renderOnIcon() { - return s` - - - - - - `; - } - /** - * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aclose%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024 - */ - renderOffIcon() { - return s` - - - - - - `; - } - renderTouchTarget() { - return s``; - } - shouldShowIcons() { - return this.icons || this.showOnlySelectedIcon; - } handleInput(e) { - const r = e.target; - this.selected = r.checked; + const o = e.target; + this.checked = o.checked, this.indeterminate = o.indeterminate; } handleChange(e) { - F(this, e); + N(this, e); } [K]() { - return this.selected ? this.value : null; - } - [U]() { - return String(this.selected); - } - formResetCallback() { - this.selected = this.hasAttribute("selected"); - } - formStateRestoreCallback(e) { - this.selected = e === "true"; + return !this.checked || this.indeterminate ? null : this.value; } [P]() { - return new W(() => ({ - checked: this.selected, - required: this.required - })); + return String(this.checked); + } + formResetCallback() { + this.checked = this.hasAttribute("checked"); + } + formStateRestoreCallback(e) { + this.checked = e === "true"; + } + [Y]() { + return new Q(() => this); } [j]() { return this.input; } }; -o.shadowRootOptions = { - mode: "open", +r.shadowRootOptions = { + ...v.shadowRootOptions, delegatesFocus: !0 }; -c([ - n({ type: Boolean }) -], o.prototype, "selected", void 0); -c([ - n({ type: Boolean }) -], o.prototype, "icons", void 0); -c([ - n({ type: Boolean, attribute: "show-only-selected-icon" }) -], o.prototype, "showOnlySelectedIcon", void 0); -c([ - n({ type: Boolean }) -], o.prototype, "required", void 0); -c([ - n() -], o.prototype, "value", void 0); -c([ - q("input") -], o.prototype, "input", void 0); +t([ + d({ type: Boolean }) +], r.prototype, "checked", void 0); +t([ + d({ type: Boolean }) +], r.prototype, "indeterminate", void 0); +t([ + d({ type: Boolean }) +], r.prototype, "required", void 0); +t([ + d() +], r.prototype, "value", void 0); +t([ + b() +], r.prototype, "prevChecked", void 0); +t([ + b() +], r.prototype, "prevDisabled", void 0); +t([ + b() +], r.prototype, "prevIndeterminate", void 0); +t([ + M("input") +], r.prototype, "input", void 0); /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const X = _`@layer styles, hcm;@layer styles{:host{display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-switch-track-height, 32px))/2) 0px}md-focus-ring{--md-focus-ring-shape-start-start: var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-start-end: var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-end: var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-start: var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}.switch{align-items:center;display:inline-flex;flex-shrink:0;position:relative;width:var(--md-switch-track-width, 52px);height:var(--md-switch-track-height, 32px);border-start-start-radius:var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}input{appearance:none;height:max(100%,var(--md-switch-touch-target-size, 48px));outline:none;margin:0;position:absolute;width:max(100%,var(--md-switch-touch-target-size, 48px));z-index:1;cursor:inherit;top:50%;left:50%;transform:translate(-50%, -50%)}:host([touch-target=none]) input{display:none}}@layer styles{.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.disabled .track::before,.disabled .track::after{transition:none;opacity:var(--md-switch-disabled-track-opacity, 0.12)}.disabled .track::before{background-clip:content-box}.selected .track::before{background-color:var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4))}.selected:hover .track::before{background-color:var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4))}.selected:focus-within .track::before{background-color:var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4))}.selected:active .track::before{background-color:var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4))}.selected.disabled .track{background-clip:border-box}.selected.disabled .track::before{background-color:var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20))}.unselected .track::before{background-color:var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));border-style:solid;border-width:var(--md-switch-track-outline-width, 2px)}.unselected:hover .track::before{background-color:var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:focus-visible .track::before{background-color:var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:active .track::before{background-color:var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected.disabled .track::before{background-color:var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20))}}@layer hcm{@media(forced-colors: active){.selected .track::before{background:ButtonText;border-color:ButtonText}.disabled .track::before{border-color:GrayText;opacity:1}.disabled.selected .track::before{background:GrayText}}}@layer styles{.handle-container{display:flex;place-content:center;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.selected .handle-container{margin-inline-start:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.unselected .handle-container{margin-inline-end:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--md-switch-handle-shape-start-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-handle-shape-start-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-handle-shape-end-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-handle-shape-end-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));height:var(--md-switch-handle-height, 16px);width:var(--md-switch-handle-width, 16px);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.disabled .handle,.disabled .handle::before{transition:none}.selected .handle{height:var(--md-switch-selected-handle-height, 24px);width:var(--md-switch-selected-handle-width, 24px)}.handle.with-icon{height:var(--md-switch-with-icon-handle-height, 24px);width:var(--md-switch-with-icon-handle-width, 24px)}.selected:not(.disabled):active .handle,.unselected:not(.disabled):active .handle{height:var(--md-switch-pressed-handle-height, 28px);width:var(--md-switch-pressed-handle-width, 28px);transition-timing-function:linear;transition-duration:100ms}.selected .handle::before{background-color:var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff))}.selected:hover .handle::before{background-color:var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:focus-within .handle::before{background-color:var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:active .handle::before{background-color:var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected.disabled .handle::before{background-color:var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));opacity:var(--md-switch-disabled-selected-handle-opacity, 1)}.unselected .handle::before{background-color:var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e))}.unselected:hover .handle::before{background-color:var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:focus-within .handle::before{background-color:var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:active .handle::before{background-color:var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected.disabled .handle::before{background-color:var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-handle-opacity, 0.38)}md-ripple{border-radius:var(--md-switch-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-switch-state-layer-size, 40px);inset:unset;width:var(--md-switch-state-layer-size, 40px)}.selected md-ripple{--md-ripple-hover-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12)}.unselected md-ripple{--md-ripple-hover-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12)}}@layer hcm{@media(forced-colors: active){.unselected .handle::before{background:ButtonText}.disabled .handle::before{opacity:1}.disabled.unselected .handle::before{background:GrayText}}}@layer styles{.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;fill:currentColor;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.disabled .icon{transition:none}.selected .icon--on,.unselected .icon--off{opacity:1}.unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--md-switch-icon-size, 16px);height:var(--md-switch-icon-size, 16px);color:var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:hover .icon--off{color:var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:focus-within .icon--off{color:var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:active .icon--off{color:var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected.disabled .icon--off{color:var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));opacity:var(--md-switch-disabled-icon-opacity, 0.38)}.icon--on{width:var(--md-switch-selected-icon-size, 16px);height:var(--md-switch-selected-icon-size, 16px);color:var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:hover .icon--on{color:var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:focus-within .icon--on{color:var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:active .icon--on{color:var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected.disabled .icon--on{color:var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon--off{fill:Canvas}.icon--on{fill:ButtonText}.disabled.unselected .icon--off,.disabled.selected .icon--on{opacity:1}.disabled .icon--on{fill:GrayText}}} +const W = F`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}} `; /** * @license - * Copyright 2021 Google LLC + * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let m = class extends o { +let s = class extends r { }; -m.styles = [X]; -m = c([ - M("md-switch") -], m); -const ee = A({ - tagName: "md-switch", - react: B, - elementClass: m -}), fe = ({ checked: t, id: e, disabled: r, hidden: i, ariaLabel: d, ariaLabelledBy: a, ariaDescribedBy: l, ariaControls: h, required: p, onInput: b, onChange: w, onClick: y, onMouseDown: g, onMouseUp: k, onMouseEnter: x, onFocus: S, onBlur: E, className: I, style: $, tabIndex: z, name: C, ...T }) => /* @__PURE__ */ O( - ee, +s.styles = [W]; +s = t([ + T("md-checkbox") +], s); +const X = _({ + tagName: "md-checkbox", + react: V, + elementClass: s +}), be = ({ checked: c, indeterminate: e, id: o, disabled: n, hidden: a, ariaLabel: i, ariaLabelledBy: l, ariaDescribedBy: h, ariaControls: p, required: u, onInput: k, onChange: x, onClick: f, onMouseDown: y, onMouseUp: g, onMouseEnter: w, onFocus: C, onBlur: z, className: $, style: I, tabIndex: A, name: B, ...D }) => /* @__PURE__ */ R( + X, { - ...T, - id: e, - disabled: r || !1, - required: p, - selected: t, - hidden: i, + ...D, + id: o, + value: c ? "on" : "off", + indeterminate: e, + disabled: n || !1, + required: u, + checked: c, + hidden: a, "touch-target": "wrapper", - "aria-label": d, - "aria-labelledby": a, - "aria-describedby": l, - "aria-controls": h, - "aria-required": p, - onInput: b, - onChange: w, - onClick: y, - onMouseDown: g, - onMouseUp: k, - onMouseEnter: x, - onFocus: S, - onBlur: E, - className: I, - style: $, - tabIndex: z, - name: C || void 0 + "aria-label": i, + "aria-labelledby": l, + "aria-describedby": h, + "aria-controls": p, + "aria-required": u, + onInput: k, + onChange: x, + onClick: f, + onMouseDown: y, + onMouseUp: g, + onMouseEnter: w, + onFocus: C, + onBlur: z, + className: $, + style: I, + tabIndex: A, + name: B || void 0 } ); export { - fe as Switch + be as Checkbox }; diff --git a/dist/react-you-ui12.js b/dist/react-you-ui12.js index 084803b..3bbe231 100644 --- a/dist/react-you-ui12.js +++ b/dist/react-you-ui12.js @@ -1,63 +1,62 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),F=require("react"),T=require("./create-component-D9KTUrcf.js"),t=require("./class-map-DV5418hw.js");require("./divider-B6Y1F7cS.js");const s=require("./animation-A38fZ1oY.js"),k=require("./delegate-4958lG3m.js"),D=require("./redispatch-event-C93E51ce.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),_=require("react"),O=require("./create-component-D9KTUrcf.js"),e=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const B=require("./animation-A38fZ1oY.js"),A=require("./delegate-4958lG3m.js"),m=require("./form-label-activation-CYEOF_US.js"),M=require("./redispatch-event-C93E51ce.js"),p=require("./validator-DUxooTr6.js"),R=require("./element-internals-OOm6rgx-.js"),u=require("./form-associated-CxXMoMPu.js"),H=require("./checkbox-validator-CeFJv7iw.js");/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const I={dialog:[[[{transform:"translateY(-50px)"},{transform:"translateY(0)"}],{duration:500,easing:s.EASING.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:"linear"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}],[[{height:"35%"},{height:"100%"}],{duration:500,easing:s.EASING.EMPHASIZED,pseudoElement:"::before"}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:"linear",fill:"forwards"}]]},O={dialog:[[[{transform:"translateY(0)"},{transform:"translateY(-50px)"}],{duration:150,easing:s.EASING.EMPHASIZED_ACCELERATE}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:"linear"}]],container:[[[{height:"100%"},{height:"35%"}],{duration:150,easing:s.EASING.EMPHASIZED_ACCELERATE,pseudoElement:"::before"}],[[{opacity:"1"},{opacity:"0"}],{delay:100,duration:50,easing:"linear",pseudoElement:"::before"}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]]};/** + */const f=Symbol("dispatchHooks");function L(s,r){const t=s[f];if(!t)throw new Error(`'${s.type}' event needs setupDispatchHooks().`);t.addEventListener("after",r)}const v=new WeakMap;function D(s,...r){let t=v.get(s);t||(t=new Set,v.set(s,t));for(const c of r){if(t.has(c))continue;let i=!1;s.addEventListener(c,a=>{if(i)return;a.stopImmediatePropagation();const d=Reflect.construct(a.constructor,[a.type,a]),n=new EventTarget;d[f]=n,i=!0;const l=s.dispatchEvent(d);i=!1,l||a.preventDefault(),n.dispatchEvent(new Event("after"))},{capture:!0}),t.add(c)}}/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const $=k.mixinDelegatesAria(t.r);let n=class extends ${get open(){return this.isOpen}set open(e){e!==this.isOpen&&(this.isOpen=e,e?(this.setAttribute("open",""),this.show()):(this.removeAttribute("open"),this.close()))}constructor(){super(),this.quick=!1,this.returnValue="",this.noFocusTrap=!1,this.getOpenAnimation=()=>I,this.getCloseAnimation=()=>O,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener("submit",this.handleSubmit)}async show(){var o;this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;const e=this.dialog;if(e.open||!this.isOpening){this.isOpening=!1;return}if(!this.dispatchEvent(new Event("open",{cancelable:!0}))){this.open=!1,this.isOpening=!1;return}e.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),(o=this.querySelector("[autofocus]"))==null||o.focus(),await this.animateDialog(this.getOpenAnimation()),this.dispatchEvent(new Event("opened")),this.isOpening=!1}async close(e=this.returnValue){if(this.isOpening=!1,!this.isConnected){this.open=!1;return}await this.updateComplete;const i=this.dialog;if(!i.open||this.isOpening){this.open=!1;return}const o=this.returnValue;if(this.returnValue=e,!this.dispatchEvent(new Event("close",{cancelable:!0}))){this.returnValue=o;return}await this.animateDialog(this.getCloseAnimation()),i.close(e),this.open=!1,this.dispatchEvent(new Event("closed"))}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}render(){const e=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),i={"has-headline":this.hasHeadline,"has-actions":this.hasActions,"has-icon":this.hasIcon,scrollable:e,"show-top-divider":e&&!this.isAtScrollTop,"show-bottom-divider":e&&!this.isAtScrollBottom},o=this.open&&!this.noFocusTrap,r=t.x` - - `,{ariaLabel:l}=this;return t.x` -
- - ${o?r:t.E} -
-
- -

- -

- -
-
-
-
- -
-
-
-
- - -
-
- ${o?r:t.E} -
- `}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const i of e)this.handleAnchorIntersection(i)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent){this.nextClickIsFromContent=!1;return}this.dispatchEvent(new Event("cancel",{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){const i=e.target,{submitter:o}=e;i.method!=="dialog"||!o||this.close(o.getAttribute("value")??this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const i=!D.redispatchEvent(this,e);e.preventDefault(),!i&&this.close()}handleClose(){var e;this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,(e=this.dialog)==null||e.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(e){e.key==="Escape"&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){var A;if((A=this.cancelAnimations)==null||A.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:i,scrim:o,container:r,headline:l,content:d,actions:c}=this;if(!i||!o||!r||!l||!d||!c)return;const{container:h,dialog:u,scrim:m,headline:p,content:y,actions:b}=e,x=[[i,u??[]],[o,m??[]],[r,h??[]],[l,p??[]],[d,y??[]],[c,b??[]]],g=[];for(const[C,E]of x)for(const _ of E){const w=C.animate(..._);this.cancelAnimations.signal.addEventListener("abort",()=>{w.cancel()}),g.push(w)}await Promise.all(g.map(C=>C.finished.catch(()=>{})))}handleHeadlineChange(e){const i=e.target;this.hasHeadline=i.assignedElements().length>0}handleActionsChange(e){const i=e.target;this.hasActions=i.assignedElements().length>0}handleIconChange(e){const i=e.target;this.hasIcon=i.assignedElements().length>0}handleAnchorIntersection(e){const{target:i,isIntersecting:o}=e;i===this.topAnchor&&(this.isAtScrollTop=o),i===this.bottomAnchor&&(this.isAtScrollBottom=o)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){var p;const[i,o]=this.getFirstAndLastFocusableChildren();if(!i||!o){(p=this.dialog)==null||p.focus();return}const r=e.target===this.firstFocusTrap,l=!r,d=e.relatedTarget===i,c=e.relatedTarget===o,h=!d&&!c;if(l&&c||r&&h){i.focus();return}if(r&&d||l&&h){o.focus();return}}getFirstAndLastFocusableChildren(){if(!this.treewalker)return[null,null];let e=null,i=null;for(this.treewalker.currentNode=this.treewalker.root;this.treewalker.nextNode();){const o=this.treewalker.currentNode;S(o)&&(e||(e=o),i=o)}return[e,i]}};t.__decorate([t.n({type:Boolean})],n.prototype,"open",null);t.__decorate([t.n({type:Boolean})],n.prototype,"quick",void 0);t.__decorate([t.n({attribute:!1})],n.prototype,"returnValue",void 0);t.__decorate([t.n()],n.prototype,"type",void 0);t.__decorate([t.n({type:Boolean,attribute:"no-focus-trap"})],n.prototype,"noFocusTrap",void 0);t.__decorate([s.e$1("dialog")],n.prototype,"dialog",void 0);t.__decorate([s.e$1(".scrim")],n.prototype,"scrim",void 0);t.__decorate([s.e$1(".container")],n.prototype,"container",void 0);t.__decorate([s.e$1(".headline")],n.prototype,"headline",void 0);t.__decorate([s.e$1(".content")],n.prototype,"content",void 0);t.__decorate([s.e$1(".actions")],n.prototype,"actions",void 0);t.__decorate([s.r()],n.prototype,"isAtScrollTop",void 0);t.__decorate([s.r()],n.prototype,"isAtScrollBottom",void 0);t.__decorate([s.e$1(".scroller")],n.prototype,"scroller",void 0);t.__decorate([s.e$1(".top.anchor")],n.prototype,"topAnchor",void 0);t.__decorate([s.e$1(".bottom.anchor")],n.prototype,"bottomAnchor",void 0);t.__decorate([s.e$1(".focus-trap")],n.prototype,"firstFocusTrap",void 0);t.__decorate([s.r()],n.prototype,"hasHeadline",void 0);t.__decorate([s.r()],n.prototype,"hasActions",void 0);t.__decorate([s.r()],n.prototype,"hasIcon",void 0);function S(a){var l;const e=":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])",i=":not(:disabled,[disabled])";return a.matches(e+i+':not([tabindex^="-"])')?!0:!a.localName.includes("-")||!a.matches(i)?!1:((l=a.shadowRoot)==null?void 0:l.delegatesFocus)??!1}/** + */const V=A.mixinDelegatesAria(p.mixinConstraintValidation(u.mixinFormAssociated(R.mixinElementInternals(e.r))));let o=class extends V{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",r=>{!m.isActivationClick(r)||!this.input||(this.focus(),m.dispatchActivationClick(this.input))}),D(this,"keydown"),this.addEventListener("keydown",r=>{L(r,()=>{r.defaultPrevented||r.key!=="Enter"||this.disabled||!this.input||this.input.click()})})}render(){return e.x` +
+ + + + ${this.renderHandle()} +
+ `}getRenderClasses(){return{selected:this.selected,unselected:!this.selected,disabled:this.disabled}}renderHandle(){const r={"with-icon":this.showOnlySelectedIcon?this.selected:this.icons};return e.x` + ${this.renderTouchTarget()} + + + + ${this.shouldShowIcons()?this.renderIcons():e.x``} + + + `}renderIcons(){return e.x` +
+ ${this.renderOnIcon()} + ${this.showOnlySelectedIcon?e.x``:this.renderOffIcon()} +
+ `}renderOnIcon(){return e.x` + + + + + + `}renderOffIcon(){return e.x` + + + + + + `}renderTouchTarget(){return e.x``}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(r){const t=r.target;this.selected=t.checked}handleChange(r){M.redispatchEvent(this,r)}[u.getFormValue](){return this.selected?this.value:null}[u.getFormState](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute("selected")}formStateRestoreCallback(r){this.selected=r==="true"}[p.createValidator](){return new H.CheckboxValidator(()=>({checked:this.selected,required:this.required}))}[p.getValidityAnchor](){return this.input}};o.shadowRootOptions={mode:"open",delegatesFocus:!0};e.__decorate([e.n({type:Boolean})],o.prototype,"selected",void 0);e.__decorate([e.n({type:Boolean})],o.prototype,"icons",void 0);e.__decorate([e.n({type:Boolean,attribute:"show-only-selected-icon"})],o.prototype,"showOnlySelectedIcon",void 0);e.__decorate([e.n({type:Boolean})],o.prototype,"required",void 0);e.__decorate([e.n()],o.prototype,"value",void 0);e.__decorate([B.e$1("input")],o.prototype,"input",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const P=t.i$1`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}} + */const j=e.i$1`@layer styles, hcm;@layer styles{:host{display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-switch-track-height, 32px))/2) 0px}md-focus-ring{--md-focus-ring-shape-start-start: var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-start-end: var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-end: var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-start: var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}.switch{align-items:center;display:inline-flex;flex-shrink:0;position:relative;width:var(--md-switch-track-width, 52px);height:var(--md-switch-track-height, 32px);border-start-start-radius:var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}input{appearance:none;height:max(100%,var(--md-switch-touch-target-size, 48px));outline:none;margin:0;position:absolute;width:max(100%,var(--md-switch-touch-target-size, 48px));z-index:1;cursor:inherit;top:50%;left:50%;transform:translate(-50%, -50%)}:host([touch-target=none]) input{display:none}}@layer styles{.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.disabled .track::before,.disabled .track::after{transition:none;opacity:var(--md-switch-disabled-track-opacity, 0.12)}.disabled .track::before{background-clip:content-box}.selected .track::before{background-color:var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4))}.selected:hover .track::before{background-color:var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4))}.selected:focus-within .track::before{background-color:var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4))}.selected:active .track::before{background-color:var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4))}.selected.disabled .track{background-clip:border-box}.selected.disabled .track::before{background-color:var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20))}.unselected .track::before{background-color:var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));border-style:solid;border-width:var(--md-switch-track-outline-width, 2px)}.unselected:hover .track::before{background-color:var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:focus-visible .track::before{background-color:var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:active .track::before{background-color:var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected.disabled .track::before{background-color:var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20))}}@layer hcm{@media(forced-colors: active){.selected .track::before{background:ButtonText;border-color:ButtonText}.disabled .track::before{border-color:GrayText;opacity:1}.disabled.selected .track::before{background:GrayText}}}@layer styles{.handle-container{display:flex;place-content:center;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.selected .handle-container{margin-inline-start:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.unselected .handle-container{margin-inline-end:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--md-switch-handle-shape-start-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-handle-shape-start-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-handle-shape-end-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-handle-shape-end-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));height:var(--md-switch-handle-height, 16px);width:var(--md-switch-handle-width, 16px);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.disabled .handle,.disabled .handle::before{transition:none}.selected .handle{height:var(--md-switch-selected-handle-height, 24px);width:var(--md-switch-selected-handle-width, 24px)}.handle.with-icon{height:var(--md-switch-with-icon-handle-height, 24px);width:var(--md-switch-with-icon-handle-width, 24px)}.selected:not(.disabled):active .handle,.unselected:not(.disabled):active .handle{height:var(--md-switch-pressed-handle-height, 28px);width:var(--md-switch-pressed-handle-width, 28px);transition-timing-function:linear;transition-duration:100ms}.selected .handle::before{background-color:var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff))}.selected:hover .handle::before{background-color:var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:focus-within .handle::before{background-color:var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:active .handle::before{background-color:var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected.disabled .handle::before{background-color:var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));opacity:var(--md-switch-disabled-selected-handle-opacity, 1)}.unselected .handle::before{background-color:var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e))}.unselected:hover .handle::before{background-color:var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:focus-within .handle::before{background-color:var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:active .handle::before{background-color:var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected.disabled .handle::before{background-color:var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-handle-opacity, 0.38)}md-ripple{border-radius:var(--md-switch-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-switch-state-layer-size, 40px);inset:unset;width:var(--md-switch-state-layer-size, 40px)}.selected md-ripple{--md-ripple-hover-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12)}.unselected md-ripple{--md-ripple-hover-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12)}}@layer hcm{@media(forced-colors: active){.unselected .handle::before{background:ButtonText}.disabled .handle::before{opacity:1}.disabled.unselected .handle::before{background:GrayText}}}@layer styles{.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;fill:currentColor;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.disabled .icon{transition:none}.selected .icon--on,.unselected .icon--off{opacity:1}.unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--md-switch-icon-size, 16px);height:var(--md-switch-icon-size, 16px);color:var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:hover .icon--off{color:var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:focus-within .icon--off{color:var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:active .icon--off{color:var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected.disabled .icon--off{color:var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));opacity:var(--md-switch-disabled-icon-opacity, 0.38)}.icon--on{width:var(--md-switch-selected-icon-size, 16px);height:var(--md-switch-selected-icon-size, 16px);color:var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:hover .icon--on{color:var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:focus-within .icon--on{color:var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:active .icon--on{color:var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected.disabled .icon--on{color:var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon--off{fill:Canvas}.icon--on{fill:ButtonText}.disabled.unselected .icon--off,.disabled.selected .icon--on{opacity:1}.disabled .icon--on{fill:GrayText}}} `;/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let f=class extends n{};f.styles=[P];f=t.__decorate([t.t$1("md-dialog")],f);const N=T.o({react:F,tagName:"md-dialog",elementClass:f,events:{onClose:"close",onShow:"show",onOpen:"open",onOpened:"opened",onClosed:"closed",onCancel:"cancel"}}),L=a=>{const{children:e,quick:i,returnValue:o,noFocusTrap:r,open:l,fullScreen:d,style:c,className:h,id:u,onClose:m,onShow:p,onOpen:y,onOpened:b,onClosed:x,onCancel:g}=a;return v.jsx(N,{quick:i,returnValue:o,noFocusTrap:r,open:l,style:{...c,...d?{width:"100vw",height:"100vh",maxWidth:"100vw",maxHeight:"100vh"}:{}},className:h,id:u,onClose:m,onShow:p,onOpen:y,onOpened:b,onClosed:x,onCancel:g,children:e})},z=a=>v.jsx("div",{slot:"headline",...a,children:a.children}),H=a=>v.jsx("div",{slot:"content",...a,children:a.children}),q=a=>v.jsx("div",{slot:"actions",...a,children:a.children});exports.Dialog=L;exports.DialogActions=q;exports.DialogContent=H;exports.DialogTitle=z; + */let h=class extends o{};h.styles=[j];h=e.__decorate([e.t$1("md-switch")],h);const P=O.o({tagName:"md-switch",react:_,elementClass:h}),F=({checked:s,id:r,disabled:t,hidden:c,ariaLabel:i,ariaLabelledBy:a,ariaDescribedBy:d,ariaControls:n,required:l,onInput:b,onChange:w,onClick:y,onMouseDown:g,onMouseUp:k,onMouseEnter:x,onFocus:S,onBlur:$,className:E,style:q,tabIndex:I,name:T,...z})=>C.jsx(P,{...z,id:r,disabled:t||!1,required:l,selected:s,hidden:c,"touch-target":"wrapper","aria-label":i,"aria-labelledby":a,"aria-describedby":d,"aria-controls":n,"aria-required":l,onInput:b,onChange:w,onClick:y,onMouseDown:g,onMouseUp:k,onMouseEnter:x,onFocus:S,onBlur:$,className:E,style:q,tabIndex:I,name:T||void 0});exports.Switch=F; diff --git a/dist/react-you-ui12.mjs b/dist/react-you-ui12.mjs index 9ddbd61..6f5c1f6 100644 --- a/dist/react-you-ui12.mjs +++ b/dist/react-you-ui12.mjs @@ -1,495 +1,254 @@ -import { jsx as C } from "react/jsx-runtime"; -import S from "react"; -import { o as P } from "./create-component-CVXl33PD.mjs"; -import { _ as o, n as u, r as $, x as O, c as L, E as h, a as N, b as z } from "./class-map-CwiboTfb.mjs"; -import "./divider-Diu_1O5h.mjs"; -import { E as b, r as g, a as l } from "./animation-DjClVFum.mjs"; -import { m as H } from "./delegate-BXi1gVeU.mjs"; -import { r as _ } from "./redispatch-event-taWUbWUt.mjs"; +import { jsx as O } from "react/jsx-runtime"; +import B from "react"; +import { o as A } from "./create-component-CVXl33PD.mjs"; +import { _ as c, n, x as s, c as u, E as H, r as R, a as _, b as M } from "./class-map-CwiboTfb.mjs"; +import "./ripple-pQcEjR05.mjs"; +import { a as q } from "./animation-DjClVFum.mjs"; +import { m as D } from "./delegate-BXi1gVeU.mjs"; +import { i as L, d as V } from "./form-label-activation-ed0HgVsy.mjs"; +import { r as F } from "./redispatch-event-taWUbWUt.mjs"; +import { m as G, c as P, g as j } from "./validator-DZt1_yHv.mjs"; +import { m as N } from "./element-internals-3IY9gE4L.mjs"; +import { m as Z, g as K, a as U } from "./form-associated-CyYeHPMb.mjs"; +import { C as W } from "./checkbox-validator-Cy4iemH_.mjs"; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const M = { - dialog: [ - [ - // Dialog slide down - [{ transform: "translateY(-50px)" }, { transform: "translateY(0)" }], - { duration: 500, easing: b.EMPHASIZED } - ] - ], - scrim: [ - [ - // Scrim fade in - [{ opacity: 0 }, { opacity: 0.32 }], - { duration: 500, easing: "linear" } - ] - ], - container: [ - [ - // Container fade in - [{ opacity: 0 }, { opacity: 1 }], - { duration: 50, easing: "linear", pseudoElement: "::before" } - ], - [ - // Container grow - // Note: current spec says to grow from 0dp->100% and shrink from - // 100%->35%. We change this to 35%->100% to simplify the animation that - // is supposed to clip content as it grows. From 0dp it's possible to see - // text/actions appear before the container has fully grown. - [{ height: "35%" }, { height: "100%" }], - { duration: 500, easing: b.EMPHASIZED, pseudoElement: "::before" } - ] - ], - headline: [ - [ - // Headline fade in - [{ opacity: 0 }, { opacity: 0, offset: 0.2 }, { opacity: 1 }], - { duration: 250, easing: "linear", fill: "forwards" } - ] - ], - content: [ - [ - // Content fade in - [{ opacity: 0 }, { opacity: 0, offset: 0.2 }, { opacity: 1 }], - { duration: 250, easing: "linear", fill: "forwards" } - ] - ], - actions: [ - [ - // Actions fade in - [{ opacity: 0 }, { opacity: 0, offset: 0.5 }, { opacity: 1 }], - { duration: 300, easing: "linear", fill: "forwards" } - ] - ] -}, V = { - dialog: [ - [ - // Dialog slide up - [{ transform: "translateY(0)" }, { transform: "translateY(-50px)" }], - { duration: 150, easing: b.EMPHASIZED_ACCELERATE } - ] - ], - scrim: [ - [ - // Scrim fade out - [{ opacity: 0.32 }, { opacity: 0 }], - { duration: 150, easing: "linear" } - ] - ], - container: [ - [ - // Container shrink - [{ height: "100%" }, { height: "35%" }], - { - duration: 150, - easing: b.EMPHASIZED_ACCELERATE, - pseudoElement: "::before" - } - ], - [ - // Container fade out - [{ opacity: "1" }, { opacity: "0" }], - { delay: 100, duration: 50, easing: "linear", pseudoElement: "::before" } - ] - ], - headline: [ - [ - // Headline fade out - [{ opacity: 1 }, { opacity: 0 }], - { duration: 100, easing: "linear", fill: "forwards" } - ] - ], - content: [ - [ - // Content fade out - [{ opacity: 1 }, { opacity: 0 }], - { duration: 100, easing: "linear", fill: "forwards" } - ] - ], - actions: [ - [ - // Actions fade out - [{ opacity: 1 }, { opacity: 0 }], - { duration: 100, easing: "linear", fill: "forwards" } - ] - ] -}; +const f = Symbol("dispatchHooks"); +function Y(t, e) { + const r = t[f]; + if (!r) + throw new Error(`'${t.type}' event needs setupDispatchHooks().`); + r.addEventListener("after", e); +} +const v = /* @__PURE__ */ new WeakMap(); +function J(t, ...e) { + let r = v.get(t); + r || (r = /* @__PURE__ */ new Set(), v.set(t, r)); + for (const i of e) { + if (r.has(i)) + continue; + let d = !1; + t.addEventListener(i, (a) => { + if (d) + return; + a.stopImmediatePropagation(); + const l = Reflect.construct(a.constructor, [ + a.type, + a + ]), h = new EventTarget(); + l[f] = h, d = !0; + const p = t.dispatchEvent(l); + d = !1, p || a.preventDefault(), h.dispatchEvent(new Event("after")); + }, { + // Ensure this listener runs before other listeners. + // `setupDispatchHooks()` should be called in constructors to also + // ensure they run before any other externally-added capture listeners. + capture: !0 + }), r.add(i); + } +} /** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const W = H($); -let s = class extends W { - // We do not use `delegatesFocus: true` due to a Chromium bug with - // selecting text. - // See https://bugs.chromium.org/p/chromium/issues/detail?id=950357 - /** - * Opens the dialog when set to `true` and closes it when set to `false`. - */ - get open() { - return this.isOpen; - } - set open(e) { - e !== this.isOpen && (this.isOpen = e, e ? (this.setAttribute("open", ""), this.show()) : (this.removeAttribute("open"), this.close())); - } +const Q = D(G(Z(N(R)))); +let o = class extends Q { constructor() { - super(), this.quick = !1, this.returnValue = "", this.noFocusTrap = !1, this.getOpenAnimation = () => M, this.getCloseAnimation = () => V, this.isOpen = !1, this.isOpening = !1, this.isConnectedPromise = this.getIsConnectedPromise(), this.isAtScrollTop = !1, this.isAtScrollBottom = !1, this.nextClickIsFromContent = !1, this.hasHeadline = !1, this.hasActions = !1, this.hasIcon = !1, this.escapePressedWithoutCancel = !1, this.treewalker = document.createTreeWalker(this, NodeFilter.SHOW_ELEMENT), this.addEventListener("submit", this.handleSubmit); - } - /** - * Opens the dialog and fires a cancelable `open` event. After a dialog's - * animation, an `opened` event is fired. - * - * Add an `autofocus` attribute to a child of the dialog that should - * receive focus after opening. - * - * @return A Promise that resolves after the animation is finished and the - * `opened` event was fired. - */ - async show() { - var i; - this.isOpening = !0, await this.isConnectedPromise, await this.updateComplete; - const e = this.dialog; - if (e.open || !this.isOpening) { - this.isOpening = !1; - return; - } - if (!this.dispatchEvent(new Event("open", { cancelable: !0 }))) { - this.open = !1, this.isOpening = !1; - return; - } - e.showModal(), this.open = !0, this.scroller && (this.scroller.scrollTop = 0), (i = this.querySelector("[autofocus]")) == null || i.focus(), await this.animateDialog(this.getOpenAnimation()), this.dispatchEvent(new Event("opened")), this.isOpening = !1; - } - /** - * Closes the dialog and fires a cancelable `close` event. After a dialog's - * animation, a `closed` event is fired. - * - * @param returnValue A return value usually indicating which button was used - * to close a dialog. If a dialog is canceled by clicking the scrim or - * pressing Escape, it will not change the return value after closing. - * @return A Promise that resolves after the animation is finished and the - * `closed` event was fired. - */ - async close(e = this.returnValue) { - if (this.isOpening = !1, !this.isConnected) { - this.open = !1; - return; - } - await this.updateComplete; - const t = this.dialog; - if (!t.open || this.isOpening) { - this.open = !1; - return; - } - const i = this.returnValue; - if (this.returnValue = e, !this.dispatchEvent(new Event("close", { cancelable: !0 }))) { - this.returnValue = i; - return; - } - await this.animateDialog(this.getCloseAnimation()), t.close(e), this.open = !1, this.dispatchEvent(new Event("closed")); - } - connectedCallback() { - super.connectedCallback(), this.isConnectedPromiseResolve(); - } - disconnectedCallback() { - super.disconnectedCallback(), this.isConnectedPromise = this.getIsConnectedPromise(); - } - render() { - const e = this.open && !(this.isAtScrollTop && this.isAtScrollBottom), t = { - "has-headline": this.hasHeadline, - "has-actions": this.hasActions, - "has-icon": this.hasIcon, - scrollable: e, - "show-top-divider": e && !this.isAtScrollTop, - "show-bottom-divider": e && !this.isAtScrollBottom - }, i = this.open && !this.noFocusTrap, a = O` - - `, { ariaLabel: r } = this; - return O` -
- - ${i ? a : h} -
-
- -

- -

- -
-
-
-
- -
-
-
-
- - -
-
- ${i ? a : h} -
- `; - } - firstUpdated() { - this.intersectionObserver = new IntersectionObserver((e) => { - for (const t of e) - this.handleAnchorIntersection(t); - }, { root: this.scroller }), this.intersectionObserver.observe(this.topAnchor), this.intersectionObserver.observe(this.bottomAnchor); - } - handleDialogClick() { - if (this.nextClickIsFromContent) { - this.nextClickIsFromContent = !1; - return; - } - this.dispatchEvent(new Event("cancel", { cancelable: !0 })) && this.close(); - } - handleContentClick() { - this.nextClickIsFromContent = !0; - } - handleSubmit(e) { - const t = e.target, { submitter: i } = e; - t.method !== "dialog" || !i || this.close(i.getAttribute("value") ?? this.returnValue); - } - handleCancel(e) { - if (e.target !== this.dialog) - return; - this.escapePressedWithoutCancel = !1; - const t = !_(this, e); - e.preventDefault(), !t && this.close(); - } - handleClose() { - var e; - this.escapePressedWithoutCancel && (this.escapePressedWithoutCancel = !1, (e = this.dialog) == null || e.dispatchEvent(new Event("cancel", { cancelable: !0 }))); - } - handleKeydown(e) { - e.key === "Escape" && (this.escapePressedWithoutCancel = !0, setTimeout(() => { - this.escapePressedWithoutCancel = !1; - })); - } - async animateDialog(e) { - var k; - if ((k = this.cancelAnimations) == null || k.abort(), this.cancelAnimations = new AbortController(), this.quick) - return; - const { dialog: t, scrim: i, container: a, headline: r, content: d, actions: c } = this; - if (!t || !i || !a || !r || !d || !c) - return; - const { container: p, dialog: f, scrim: v, headline: m, content: w, actions: A } = e, E = [ - [t, f ?? []], - [i, v ?? []], - [a, p ?? []], - [r, m ?? []], - [d, w ?? []], - [c, A ?? []] - ], y = []; - for (const [F, I] of E) - for (const D of I) { - const T = F.animate(...D); - this.cancelAnimations.signal.addEventListener("abort", () => { - T.cancel(); - }), y.push(T); - } - await Promise.all(y.map((F) => F.finished.catch(() => { - }))); - } - handleHeadlineChange(e) { - const t = e.target; - this.hasHeadline = t.assignedElements().length > 0; - } - handleActionsChange(e) { - const t = e.target; - this.hasActions = t.assignedElements().length > 0; - } - handleIconChange(e) { - const t = e.target; - this.hasIcon = t.assignedElements().length > 0; - } - handleAnchorIntersection(e) { - const { target: t, isIntersecting: i } = e; - t === this.topAnchor && (this.isAtScrollTop = i), t === this.bottomAnchor && (this.isAtScrollBottom = i); - } - getIsConnectedPromise() { - return new Promise((e) => { - this.isConnectedPromiseResolve = e; + super(), this.selected = !1, this.icons = !1, this.showOnlySelectedIcon = !1, this.required = !1, this.value = "on", this.addEventListener("click", (e) => { + !L(e) || !this.input || (this.focus(), V(this.input)); + }), J(this, "keydown"), this.addEventListener("keydown", (e) => { + Y(e, () => { + e.defaultPrevented || e.key !== "Enter" || this.disabled || !this.input || this.input.click(); + }); }); } - handleFocusTrapFocus(e) { - var m; - const [t, i] = this.getFirstAndLastFocusableChildren(); - if (!t || !i) { - (m = this.dialog) == null || m.focus(); - return; - } - const a = e.target === this.firstFocusTrap, r = !a, d = e.relatedTarget === t, c = e.relatedTarget === i, p = !d && !c; - if (r && c || a && p) { - t.focus(); - return; - } - if (a && d || r && p) { - i.focus(); - return; - } + render() { + return s` +
+ + + + ${this.renderHandle()} +
+ `; } - getFirstAndLastFocusableChildren() { - if (!this.treewalker) - return [null, null]; - let e = null, t = null; - for (this.treewalker.currentNode = this.treewalker.root; this.treewalker.nextNode(); ) { - const i = this.treewalker.currentNode; - B(i) && (e || (e = i), t = i); - } - return [e, t]; + getRenderClasses() { + return { + selected: this.selected, + unselected: !this.selected, + disabled: this.disabled + }; + } + renderHandle() { + const e = { + "with-icon": this.showOnlySelectedIcon ? this.selected : this.icons + }; + return s` + ${this.renderTouchTarget()} + + + + ${this.shouldShowIcons() ? this.renderIcons() : s``} + + + `; + } + renderIcons() { + return s` +
+ ${this.renderOnIcon()} + ${this.showOnlySelectedIcon ? s`` : this.renderOffIcon()} +
+ `; + } + /** + * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024 + */ + renderOnIcon() { + return s` + + + + + + `; + } + /** + * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aclose%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024 + */ + renderOffIcon() { + return s` + + + + + + `; + } + renderTouchTarget() { + return s``; + } + shouldShowIcons() { + return this.icons || this.showOnlySelectedIcon; + } + handleInput(e) { + const r = e.target; + this.selected = r.checked; + } + handleChange(e) { + F(this, e); + } + [K]() { + return this.selected ? this.value : null; + } + [U]() { + return String(this.selected); + } + formResetCallback() { + this.selected = this.hasAttribute("selected"); + } + formStateRestoreCallback(e) { + this.selected = e === "true"; + } + [P]() { + return new W(() => ({ + checked: this.selected, + required: this.required + })); + } + [j]() { + return this.input; } }; -o([ - u({ type: Boolean }) -], s.prototype, "open", null); -o([ - u({ type: Boolean }) -], s.prototype, "quick", void 0); -o([ - u({ attribute: !1 }) -], s.prototype, "returnValue", void 0); -o([ - u() -], s.prototype, "type", void 0); -o([ - u({ type: Boolean, attribute: "no-focus-trap" }) -], s.prototype, "noFocusTrap", void 0); -o([ - l("dialog") -], s.prototype, "dialog", void 0); -o([ - l(".scrim") -], s.prototype, "scrim", void 0); -o([ - l(".container") -], s.prototype, "container", void 0); -o([ - l(".headline") -], s.prototype, "headline", void 0); -o([ - l(".content") -], s.prototype, "content", void 0); -o([ - l(".actions") -], s.prototype, "actions", void 0); -o([ - g() -], s.prototype, "isAtScrollTop", void 0); -o([ - g() -], s.prototype, "isAtScrollBottom", void 0); -o([ - l(".scroller") -], s.prototype, "scroller", void 0); -o([ - l(".top.anchor") -], s.prototype, "topAnchor", void 0); -o([ - l(".bottom.anchor") -], s.prototype, "bottomAnchor", void 0); -o([ - l(".focus-trap") -], s.prototype, "firstFocusTrap", void 0); -o([ - g() -], s.prototype, "hasHeadline", void 0); -o([ - g() -], s.prototype, "hasActions", void 0); -o([ - g() -], s.prototype, "hasIcon", void 0); -function B(n) { - var r; - const e = ":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])", t = ":not(:disabled,[disabled])"; - return n.matches(e + t + ':not([tabindex^="-"])') ? !0 : !n.localName.includes("-") || !n.matches(t) ? !1 : ((r = n.shadowRoot) == null ? void 0 : r.delegatesFocus) ?? !1; -} +o.shadowRootOptions = { + mode: "open", + delegatesFocus: !0 +}; +c([ + n({ type: Boolean }) +], o.prototype, "selected", void 0); +c([ + n({ type: Boolean }) +], o.prototype, "icons", void 0); +c([ + n({ type: Boolean, attribute: "show-only-selected-icon" }) +], o.prototype, "showOnlySelectedIcon", void 0); +c([ + n({ type: Boolean }) +], o.prototype, "required", void 0); +c([ + n() +], o.prototype, "value", void 0); +c([ + q("input") +], o.prototype, "input", void 0); /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const R = N`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}} +const X = _`@layer styles, hcm;@layer styles{:host{display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-switch-track-height, 32px))/2) 0px}md-focus-ring{--md-focus-ring-shape-start-start: var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-start-end: var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-end: var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-start: var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}.switch{align-items:center;display:inline-flex;flex-shrink:0;position:relative;width:var(--md-switch-track-width, 52px);height:var(--md-switch-track-height, 32px);border-start-start-radius:var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}input{appearance:none;height:max(100%,var(--md-switch-touch-target-size, 48px));outline:none;margin:0;position:absolute;width:max(100%,var(--md-switch-touch-target-size, 48px));z-index:1;cursor:inherit;top:50%;left:50%;transform:translate(-50%, -50%)}:host([touch-target=none]) input{display:none}}@layer styles{.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.disabled .track::before,.disabled .track::after{transition:none;opacity:var(--md-switch-disabled-track-opacity, 0.12)}.disabled .track::before{background-clip:content-box}.selected .track::before{background-color:var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4))}.selected:hover .track::before{background-color:var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4))}.selected:focus-within .track::before{background-color:var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4))}.selected:active .track::before{background-color:var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4))}.selected.disabled .track{background-clip:border-box}.selected.disabled .track::before{background-color:var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20))}.unselected .track::before{background-color:var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));border-style:solid;border-width:var(--md-switch-track-outline-width, 2px)}.unselected:hover .track::before{background-color:var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:focus-visible .track::before{background-color:var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:active .track::before{background-color:var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected.disabled .track::before{background-color:var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20))}}@layer hcm{@media(forced-colors: active){.selected .track::before{background:ButtonText;border-color:ButtonText}.disabled .track::before{border-color:GrayText;opacity:1}.disabled.selected .track::before{background:GrayText}}}@layer styles{.handle-container{display:flex;place-content:center;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.selected .handle-container{margin-inline-start:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.unselected .handle-container{margin-inline-end:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--md-switch-handle-shape-start-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-handle-shape-start-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-handle-shape-end-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-handle-shape-end-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));height:var(--md-switch-handle-height, 16px);width:var(--md-switch-handle-width, 16px);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.disabled .handle,.disabled .handle::before{transition:none}.selected .handle{height:var(--md-switch-selected-handle-height, 24px);width:var(--md-switch-selected-handle-width, 24px)}.handle.with-icon{height:var(--md-switch-with-icon-handle-height, 24px);width:var(--md-switch-with-icon-handle-width, 24px)}.selected:not(.disabled):active .handle,.unselected:not(.disabled):active .handle{height:var(--md-switch-pressed-handle-height, 28px);width:var(--md-switch-pressed-handle-width, 28px);transition-timing-function:linear;transition-duration:100ms}.selected .handle::before{background-color:var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff))}.selected:hover .handle::before{background-color:var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:focus-within .handle::before{background-color:var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:active .handle::before{background-color:var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected.disabled .handle::before{background-color:var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));opacity:var(--md-switch-disabled-selected-handle-opacity, 1)}.unselected .handle::before{background-color:var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e))}.unselected:hover .handle::before{background-color:var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:focus-within .handle::before{background-color:var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:active .handle::before{background-color:var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected.disabled .handle::before{background-color:var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-handle-opacity, 0.38)}md-ripple{border-radius:var(--md-switch-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-switch-state-layer-size, 40px);inset:unset;width:var(--md-switch-state-layer-size, 40px)}.selected md-ripple{--md-ripple-hover-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12)}.unselected md-ripple{--md-ripple-hover-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12)}}@layer hcm{@media(forced-colors: active){.unselected .handle::before{background:ButtonText}.disabled .handle::before{opacity:1}.disabled.unselected .handle::before{background:GrayText}}}@layer styles{.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;fill:currentColor;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.disabled .icon{transition:none}.selected .icon--on,.unselected .icon--off{opacity:1}.unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--md-switch-icon-size, 16px);height:var(--md-switch-icon-size, 16px);color:var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:hover .icon--off{color:var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:focus-within .icon--off{color:var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:active .icon--off{color:var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected.disabled .icon--off{color:var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));opacity:var(--md-switch-disabled-icon-opacity, 0.38)}.icon--on{width:var(--md-switch-selected-icon-size, 16px);height:var(--md-switch-selected-icon-size, 16px);color:var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:hover .icon--on{color:var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:focus-within .icon--on{color:var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:active .icon--on{color:var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected.disabled .icon--on{color:var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon--off{fill:Canvas}.icon--on{fill:ButtonText}.disabled.unselected .icon--off,.disabled.selected .icon--on{opacity:1}.disabled .icon--on{fill:GrayText}}} `; /** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let x = class extends s { +let m = class extends o { }; -x.styles = [R]; -x = o([ - z("md-dialog") -], x); -const q = P({ - react: S, - tagName: "md-dialog", - elementClass: x, - events: { - onClose: "close", - onShow: "show", - onOpen: "open", - onOpened: "opened", - onClosed: "closed", - onCancel: "cancel" +m.styles = [X]; +m = c([ + M("md-switch") +], m); +const ee = A({ + tagName: "md-switch", + react: B, + elementClass: m +}), fe = ({ checked: t, id: e, disabled: r, hidden: i, ariaLabel: d, ariaLabelledBy: a, ariaDescribedBy: l, ariaControls: h, required: p, onInput: b, onChange: w, onClick: y, onMouseDown: g, onMouseUp: k, onMouseEnter: x, onFocus: S, onBlur: E, className: I, style: $, tabIndex: z, name: C, ...T }) => /* @__PURE__ */ O( + ee, + { + ...T, + id: e, + disabled: r || !1, + required: p, + selected: t, + hidden: i, + "touch-target": "wrapper", + "aria-label": d, + "aria-labelledby": a, + "aria-describedby": l, + "aria-controls": h, + "aria-required": p, + onInput: b, + onChange: w, + onClick: y, + onMouseDown: g, + onMouseUp: k, + onMouseEnter: x, + onFocus: S, + onBlur: E, + className: I, + style: $, + tabIndex: z, + name: C || void 0 } -}), te = (n) => { - const { children: e, quick: t, returnValue: i, noFocusTrap: a, open: r, fullScreen: d, style: c, className: p, id: f, onClose: v, onShow: m, onOpen: w, onOpened: A, onClosed: E, onCancel: y } = n; - return /* @__PURE__ */ C( - q, - { - quick: t, - returnValue: i, - noFocusTrap: a, - open: r, - style: { - ...c, - ...d ? { - width: "100vw", - height: "100vh", - maxWidth: "100vw", - maxHeight: "100vh" - } : {} - }, - className: p, - id: f, - onClose: v, - onShow: m, - onOpen: w, - onOpened: A, - onClosed: E, - onCancel: y, - children: e - } - ); -}, ie = (n) => /* @__PURE__ */ C("div", { slot: "headline", ...n, children: n.children }), oe = (n) => /* @__PURE__ */ C("div", { slot: "content", ...n, children: n.children }), se = (n) => /* @__PURE__ */ C("div", { slot: "actions", ...n, children: n.children }); +); export { - te as Dialog, - se as DialogActions, - oe as DialogContent, - ie as DialogTitle + fe as Switch }; diff --git a/dist/react-you-ui13.js b/dist/react-you-ui13.js index cc7a918..084803b 100644 --- a/dist/react-you-ui13.js +++ b/dist/react-you-ui13.js @@ -1,76 +1,63 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./string_utils-Bad7L8P5.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),F=require("react"),T=require("./create-component-D9KTUrcf.js"),t=require("./class-map-DV5418hw.js");require("./divider-B6Y1F7cS.js");const s=require("./animation-A38fZ1oY.js"),k=require("./delegate-4958lG3m.js"),D=require("./redispatch-event-C93E51ce.js");/** * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class p{static harmonize(r,t){const e=i.Hct.fromInt(r),n=i.Hct.fromInt(t),a=i.differenceDegrees(e.hue,n.hue),o=Math.min(a*.5,15),c=i.sanitizeDegreesDouble(e.hue+o*i.rotationDirection(e.hue,n.hue));return i.Hct.from(c,e.chroma,e.tone).toInt()}static hctHue(r,t,e){const n=p.cam16Ucs(r,t,e),a=i.Cam16.fromInt(n),o=i.Cam16.fromInt(r);return i.Hct.from(a.hue,o.chroma,i.lstarFromArgb(r)).toInt()}static cam16Ucs(r,t,e){const n=i.Cam16.fromInt(r),a=i.Cam16.fromInt(t),o=n.jstar,c=n.astar,f=n.bstar,C=a.jstar,d=a.astar,y=a.bstar,l=o+(C-o)*e,g=c+(d-c)*e,H=f+(y-f)*e;return i.Cam16.fromUcs(l,g,H).toInt()}}/** + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const I={dialog:[[[{transform:"translateY(-50px)"},{transform:"translateY(0)"}],{duration:500,easing:s.EASING.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:"linear"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}],[[{height:"35%"},{height:"100%"}],{duration:500,easing:s.EASING.EMPHASIZED,pseudoElement:"::before"}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:"linear",fill:"forwards"}]]},O={dialog:[[[{transform:"translateY(0)"},{transform:"translateY(-50px)"}],{duration:150,easing:s.EASING.EMPHASIZED_ACCELERATE}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:"linear"}]],container:[[[{height:"100%"},{height:"35%"}],{duration:150,easing:s.EASING.EMPHASIZED_ACCELERATE,pseudoElement:"::before"}],[[{opacity:"1"},{opacity:"0"}],{delay:100,duration:50,easing:"linear",pseudoElement:"::before"}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]]};/** * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class u{static fromInt(r){const t=i.Hct.fromInt(r);return u.fromHct(t)}static fromHct(r){return new u(r.hue,r.chroma,r)}static fromHueAndChroma(r,t){const e=new S(r,t).create();return new u(r,t,e)}constructor(r,t,e){this.hue=r,this.chroma=t,this.keyColor=e,this.cache=new Map}tone(r){let t=this.cache.get(r);return t===void 0&&(t=i.Hct.from(this.hue,this.chroma,r).toInt(),this.cache.set(r,t)),t}getHct(r){return i.Hct.fromInt(this.tone(r))}}class S{constructor(r,t){this.hue=r,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let n=0,a=100;for(;n=this.requestedChroma-.01)if(Math.abs(n-50)I,this.getCloseAnimation=()=>O,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener("submit",this.handleSubmit)}async show(){var o;this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;const e=this.dialog;if(e.open||!this.isOpening){this.isOpening=!1;return}if(!this.dispatchEvent(new Event("open",{cancelable:!0}))){this.open=!1,this.isOpening=!1;return}e.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),(o=this.querySelector("[autofocus]"))==null||o.focus(),await this.animateDialog(this.getOpenAnimation()),this.dispatchEvent(new Event("opened")),this.isOpening=!1}async close(e=this.returnValue){if(this.isOpening=!1,!this.isConnected){this.open=!1;return}await this.updateComplete;const i=this.dialog;if(!i.open||this.isOpening){this.open=!1;return}const o=this.returnValue;if(this.returnValue=e,!this.dispatchEvent(new Event("close",{cancelable:!0}))){this.returnValue=o;return}await this.animateDialog(this.getCloseAnimation()),i.close(e),this.open=!1,this.dispatchEvent(new Event("closed"))}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}render(){const e=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),i={"has-headline":this.hasHeadline,"has-actions":this.hasActions,"has-icon":this.hasIcon,scrollable:e,"show-top-divider":e&&!this.isAtScrollTop,"show-bottom-divider":e&&!this.isAtScrollBottom},o=this.open&&!this.noFocusTrap,r=t.x` + + `,{ariaLabel:l}=this;return t.x` +
+ + ${o?r:t.E} +
+
+ +

+ +

+ +
+
+
+
+ +
+
+
+
+ + +
+
+ ${o?r:t.E} +
+ `}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const i of e)this.handleAnchorIntersection(i)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent){this.nextClickIsFromContent=!1;return}this.dispatchEvent(new Event("cancel",{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){const i=e.target,{submitter:o}=e;i.method!=="dialog"||!o||this.close(o.getAttribute("value")??this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const i=!D.redispatchEvent(this,e);e.preventDefault(),!i&&this.close()}handleClose(){var e;this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,(e=this.dialog)==null||e.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(e){e.key==="Escape"&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){var A;if((A=this.cancelAnimations)==null||A.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:i,scrim:o,container:r,headline:l,content:d,actions:c}=this;if(!i||!o||!r||!l||!d||!c)return;const{container:h,dialog:u,scrim:m,headline:p,content:y,actions:b}=e,x=[[i,u??[]],[o,m??[]],[r,h??[]],[l,p??[]],[d,y??[]],[c,b??[]]],g=[];for(const[C,E]of x)for(const _ of E){const w=C.animate(..._);this.cancelAnimations.signal.addEventListener("abort",()=>{w.cancel()}),g.push(w)}await Promise.all(g.map(C=>C.finished.catch(()=>{})))}handleHeadlineChange(e){const i=e.target;this.hasHeadline=i.assignedElements().length>0}handleActionsChange(e){const i=e.target;this.hasActions=i.assignedElements().length>0}handleIconChange(e){const i=e.target;this.hasIcon=i.assignedElements().length>0}handleAnchorIntersection(e){const{target:i,isIntersecting:o}=e;i===this.topAnchor&&(this.isAtScrollTop=o),i===this.bottomAnchor&&(this.isAtScrollBottom=o)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){var p;const[i,o]=this.getFirstAndLastFocusableChildren();if(!i||!o){(p=this.dialog)==null||p.focus();return}const r=e.target===this.firstFocusTrap,l=!r,d=e.relatedTarget===i,c=e.relatedTarget===o,h=!d&&!c;if(l&&c||r&&h){i.focus();return}if(r&&d||l&&h){o.focus();return}}getFirstAndLastFocusableChildren(){if(!this.treewalker)return[null,null];let e=null,i=null;for(this.treewalker.currentNode=this.treewalker.root;this.treewalker.nextNode();){const o=this.treewalker.currentNode;S(o)&&(e||(e=o),i=o)}return[e,i]}};t.__decorate([t.n({type:Boolean})],n.prototype,"open",null);t.__decorate([t.n({type:Boolean})],n.prototype,"quick",void 0);t.__decorate([t.n({attribute:!1})],n.prototype,"returnValue",void 0);t.__decorate([t.n()],n.prototype,"type",void 0);t.__decorate([t.n({type:Boolean,attribute:"no-focus-trap"})],n.prototype,"noFocusTrap",void 0);t.__decorate([s.e$1("dialog")],n.prototype,"dialog",void 0);t.__decorate([s.e$1(".scrim")],n.prototype,"scrim",void 0);t.__decorate([s.e$1(".container")],n.prototype,"container",void 0);t.__decorate([s.e$1(".headline")],n.prototype,"headline",void 0);t.__decorate([s.e$1(".content")],n.prototype,"content",void 0);t.__decorate([s.e$1(".actions")],n.prototype,"actions",void 0);t.__decorate([s.r()],n.prototype,"isAtScrollTop",void 0);t.__decorate([s.r()],n.prototype,"isAtScrollBottom",void 0);t.__decorate([s.e$1(".scroller")],n.prototype,"scroller",void 0);t.__decorate([s.e$1(".top.anchor")],n.prototype,"topAnchor",void 0);t.__decorate([s.e$1(".bottom.anchor")],n.prototype,"bottomAnchor",void 0);t.__decorate([s.e$1(".focus-trap")],n.prototype,"firstFocusTrap",void 0);t.__decorate([s.r()],n.prototype,"hasHeadline",void 0);t.__decorate([s.r()],n.prototype,"hasActions",void 0);t.__decorate([s.r()],n.prototype,"hasIcon",void 0);function S(a){var l;const e=":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])",i=":not(:disabled,[disabled])";return a.matches(e+i+':not([tabindex^="-"])')?!0:!a.localName.includes("-")||!a.matches(i)?!1:((l=a.shadowRoot)==null?void 0:l.delegatesFocus)??!1}/** * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class s{static of(r){return new s(r,!1)}static contentOf(r){return new s(r,!0)}static fromColors(r){return s.createPaletteFromColors(!1,r)}static contentFromColors(r){return s.createPaletteFromColors(!0,r)}static createPaletteFromColors(r,t){const e=new s(t.primary,r);if(t.secondary){const n=new s(t.secondary,r);e.a2=n.a1}if(t.tertiary){const n=new s(t.tertiary,r);e.a3=n.a1}if(t.error){const n=new s(t.error,r);e.error=n.a1}if(t.neutral){const n=new s(t.neutral,r);e.n1=n.n1}if(t.neutralVariant){const n=new s(t.neutralVariant,r);e.n2=n.n2}return e}constructor(r,t){const e=i.Hct.fromInt(r),n=e.hue,a=e.chroma;t?(this.a1=u.fromHueAndChroma(n,a),this.a2=u.fromHueAndChroma(n,a/3),this.a3=u.fromHueAndChroma(n+60,a/2),this.n1=u.fromHueAndChroma(n,Math.min(a/12,4)),this.n2=u.fromHueAndChroma(n,Math.min(a/6,8))):(this.a1=u.fromHueAndChroma(n,Math.max(48,a)),this.a2=u.fromHueAndChroma(n,16),this.a3=u.fromHueAndChroma(n+60,24),this.n1=u.fromHueAndChroma(n,4),this.n2=u.fromHueAndChroma(n,8)),this.error=u.fromHueAndChroma(25,84)}}/** + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const P=t.i$1`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}} +`;/** * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class m{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(r){return m.lightFromCorePalette(s.of(r))}static dark(r){return m.darkFromCorePalette(s.of(r))}static lightContent(r){return m.lightFromCorePalette(s.contentOf(r))}static darkContent(r){return m.darkFromCorePalette(s.contentOf(r))}static lightFromCorePalette(r){return new m({primary:r.a1.tone(40),onPrimary:r.a1.tone(100),primaryContainer:r.a1.tone(90),onPrimaryContainer:r.a1.tone(10),secondary:r.a2.tone(40),onSecondary:r.a2.tone(100),secondaryContainer:r.a2.tone(90),onSecondaryContainer:r.a2.tone(10),tertiary:r.a3.tone(40),onTertiary:r.a3.tone(100),tertiaryContainer:r.a3.tone(90),onTertiaryContainer:r.a3.tone(10),error:r.error.tone(40),onError:r.error.tone(100),errorContainer:r.error.tone(90),onErrorContainer:r.error.tone(10),background:r.n1.tone(99),onBackground:r.n1.tone(10),surface:r.n1.tone(99),onSurface:r.n1.tone(10),surfaceVariant:r.n2.tone(90),onSurfaceVariant:r.n2.tone(30),outline:r.n2.tone(50),outlineVariant:r.n2.tone(80),shadow:r.n1.tone(0),scrim:r.n1.tone(0),inverseSurface:r.n1.tone(20),inverseOnSurface:r.n1.tone(95),inversePrimary:r.a1.tone(80)})}static darkFromCorePalette(r){return new m({primary:r.a1.tone(80),onPrimary:r.a1.tone(20),primaryContainer:r.a1.tone(30),onPrimaryContainer:r.a1.tone(90),secondary:r.a2.tone(80),onSecondary:r.a2.tone(20),secondaryContainer:r.a2.tone(30),onSecondaryContainer:r.a2.tone(90),tertiary:r.a3.tone(80),onTertiary:r.a3.tone(20),tertiaryContainer:r.a3.tone(30),onTertiaryContainer:r.a3.tone(90),error:r.error.tone(80),onError:r.error.tone(20),errorContainer:r.error.tone(30),onErrorContainer:r.error.tone(80),background:r.n1.tone(10),onBackground:r.n1.tone(90),surface:r.n1.tone(10),onSurface:r.n1.tone(90),surfaceVariant:r.n2.tone(30),onSurfaceVariant:r.n2.tone(80),outline:r.n2.tone(60),outlineVariant:r.n2.tone(30),shadow:r.n1.tone(0),scrim:r.n1.tone(0),inverseSurface:r.n1.tone(90),inverseOnSurface:r.n1.tone(20),inversePrimary:r.a1.tone(40)})}constructor(r){this.props=r}toJSON(){return{...this.props}}}/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function w(h,r=[]){const t=s.of(h);return{source:h,schemes:{light:m.light(h),dark:m.dark(h)},palettes:{primary:t.a1,secondary:t.a2,tertiary:t.a3,neutral:t.n1,neutralVariant:t.n2,error:t.error},customColors:r.map(e=>b(h,e))}}function b(h,r){let t=r.value;const e=t,n=h;r.blend&&(t=p.harmonize(e,n));const o=s.of(t).a1;return{color:r,value:t,light:{color:o.tone(40),onColor:o.tone(100),colorContainer:o.tone(90),onColorContainer:o.tone(10)},dark:{color:o.tone(80),onColor:o.tone(20),colorContainer:o.tone(30),onColorContainer:o.tone(90)}}}function k(h){const r=i.argbFromHex(h);return w(r)}exports.createTheme=k; + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let f=class extends n{};f.styles=[P];f=t.__decorate([t.t$1("md-dialog")],f);const N=T.o({react:F,tagName:"md-dialog",elementClass:f,events:{onClose:"close",onShow:"show",onOpen:"open",onOpened:"opened",onClosed:"closed",onCancel:"cancel"}}),L=a=>{const{children:e,quick:i,returnValue:o,noFocusTrap:r,open:l,fullScreen:d,style:c,className:h,id:u,onClose:m,onShow:p,onOpen:y,onOpened:b,onClosed:x,onCancel:g}=a;return v.jsx(N,{quick:i,returnValue:o,noFocusTrap:r,open:l,style:{...c,...d?{width:"100vw",height:"100vh",maxWidth:"100vw",maxHeight:"100vh"}:{}},className:h,id:u,onClose:m,onShow:p,onOpen:y,onOpened:b,onClosed:x,onCancel:g,children:e})},z=a=>v.jsx("div",{slot:"headline",...a,children:a.children}),H=a=>v.jsx("div",{slot:"content",...a,children:a.children}),q=a=>v.jsx("div",{slot:"actions",...a,children:a.children});exports.Dialog=L;exports.DialogActions=q;exports.DialogContent=H;exports.DialogTitle=z; diff --git a/dist/react-you-ui13.mjs b/dist/react-you-ui13.mjs index 844035c..9ddbd61 100644 --- a/dist/react-you-ui13.mjs +++ b/dist/react-you-ui13.mjs @@ -1,504 +1,495 @@ -import { H as u, d as w, s as k, r as v, C as f, l as V, a as b } from "./string_utils-B4bsIQ5w.mjs"; +import { jsx as C } from "react/jsx-runtime"; +import S from "react"; +import { o as P } from "./create-component-CVXl33PD.mjs"; +import { _ as o, n as u, r as $, x as O, c as L, E as h, a as N, b as z } from "./class-map-CwiboTfb.mjs"; +import "./divider-Diu_1O5h.mjs"; +import { E as b, r as g, a as l } from "./animation-DjClVFum.mjs"; +import { m as H } from "./delegate-BXi1gVeU.mjs"; +import { r as _ } from "./redispatch-event-taWUbWUt.mjs"; /** * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 */ -class C { - /** - * Blend the design color's HCT hue towards the key color's HCT - * hue, in a way that leaves the original color recognizable and - * recognizably shifted towards the key color. - * - * @param designColor ARGB representation of an arbitrary color. - * @param sourceColor ARGB representation of the main theme color. - * @return The design color with a hue shifted towards the - * system's color, a slightly warmer/cooler variant of the design - * color's hue. - */ - static harmonize(r, t) { - const e = u.fromInt(r), n = u.fromInt(t), a = w(e.hue, n.hue), o = Math.min(a * 0.5, 15), c = k(e.hue + o * v(e.hue, n.hue)); - return u.from(c, e.chroma, e.tone).toInt(); - } - /** - * Blends hue from one color into another. The chroma and tone of - * the original color are maintained. - * - * @param from ARGB representation of color - * @param to ARGB representation of color - * @param amount how much blending to perform; 0.0 >= and <= 1.0 - * @return from, with a hue blended towards to. Chroma and tone - * are constant. - */ - static hctHue(r, t, e) { - const n = C.cam16Ucs(r, t, e), a = f.fromInt(n), o = f.fromInt(r); - return u.from(a.hue, o.chroma, V(r)).toInt(); - } - /** - * Blend in CAM16-UCS space. - * - * @param from ARGB representation of color - * @param to ARGB representation of color - * @param amount how much blending to perform; 0.0 >= and <= 1.0 - * @return from, blended towards to. Hue, chroma, and tone will - * change. - */ - static cam16Ucs(r, t, e) { - const n = f.fromInt(r), a = f.fromInt(t), o = n.jstar, c = n.astar, p = n.bstar, d = a.jstar, y = a.astar, l = a.bstar, g = o + (d - o) * e, S = c + (y - c) * e, H = p + (l - p) * e; - return f.fromUcs(g, S, H).toInt(); - } -} -/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class i { - /** - * @param argb ARGB representation of a color - * @return Tones matching that color's hue and chroma. - */ - static fromInt(r) { - const t = u.fromInt(r); - return i.fromHct(t); - } - /** - * @param hct Hct - * @return Tones matching that color's hue and chroma. - */ - static fromHct(r) { - return new i(r.hue, r.chroma, r); - } - /** - * @param hue HCT hue - * @param chroma HCT chroma - * @return Tones matching hue and chroma. - */ - static fromHueAndChroma(r, t) { - const e = new A(r, t).create(); - return new i(r, t, e); - } - constructor(r, t, e) { - this.hue = r, this.chroma = t, this.keyColor = e, this.cache = /* @__PURE__ */ new Map(); - } - /** - * @param tone HCT tone, measured from 0 to 100. - * @return ARGB representation of a color with that tone. - */ - tone(r) { - let t = this.cache.get(r); - return t === void 0 && (t = u.from(this.hue, this.chroma, r).toInt(), this.cache.set(r, t)), t; - } - /** - * @param tone HCT tone. - * @return HCT representation of a color with that tone. - */ - getHct(r) { - return u.fromInt(this.tone(r)); - } -} -class A { - constructor(r, t) { - this.hue = r, this.requestedChroma = t, this.chromaCache = /* @__PURE__ */ new Map(), this.maxChromaValue = 200; - } - /** - * Creates a key color from a [hue] and a [chroma]. - * The key color is the first tone, starting from T50, matching the given hue - * and chroma. - * - * @return Key color [Hct] - */ - create() { - let n = 0, a = 100; - for (; n < a; ) { - const o = Math.floor((n + a) / 2), c = this.maxChroma(o) < this.maxChroma(o + 1); - if (this.maxChroma(o) >= this.requestedChroma - 0.01) - if (Math.abs(n - 50) < Math.abs(a - 50)) - a = o; - else { - if (n === o) - return u.from(this.hue, this.requestedChroma, n); - n = o; - } - else - c ? n = o + 1 : a = o; - } - return u.from(this.hue, this.requestedChroma, n); - } - // Find the maximum chroma for a given tone - maxChroma(r) { - if (this.chromaCache.has(r)) - return this.chromaCache.get(r); - const t = u.from(this.hue, this.maxChromaValue, r).chroma; - return this.chromaCache.set(r, t), t; - } -} -/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class s { - /** - * @param argb ARGB representation of a color - */ - static of(r) { - return new s(r, !1); - } - /** - * @param argb ARGB representation of a color - */ - static contentOf(r) { - return new s(r, !0); - } - /** - * Create a [CorePalette] from a set of colors - */ - static fromColors(r) { - return s.createPaletteFromColors(!1, r); - } - /** - * Create a content [CorePalette] from a set of colors - */ - static contentFromColors(r) { - return s.createPaletteFromColors(!0, r); - } - static createPaletteFromColors(r, t) { - const e = new s(t.primary, r); - if (t.secondary) { - const n = new s(t.secondary, r); - e.a2 = n.a1; - } - if (t.tertiary) { - const n = new s(t.tertiary, r); - e.a3 = n.a1; - } - if (t.error) { - const n = new s(t.error, r); - e.error = n.a1; - } - if (t.neutral) { - const n = new s(t.neutral, r); - e.n1 = n.n1; - } - if (t.neutralVariant) { - const n = new s(t.neutralVariant, r); - e.n2 = n.n2; - } - return e; - } - constructor(r, t) { - const e = u.fromInt(r), n = e.hue, a = e.chroma; - t ? (this.a1 = i.fromHueAndChroma(n, a), this.a2 = i.fromHueAndChroma(n, a / 3), this.a3 = i.fromHueAndChroma(n + 60, a / 2), this.n1 = i.fromHueAndChroma(n, Math.min(a / 12, 4)), this.n2 = i.fromHueAndChroma(n, Math.min(a / 6, 8))) : (this.a1 = i.fromHueAndChroma(n, Math.max(48, a)), this.a2 = i.fromHueAndChroma(n, 16), this.a3 = i.fromHueAndChroma(n + 60, 24), this.n1 = i.fromHueAndChroma(n, 4), this.n2 = i.fromHueAndChroma(n, 8)), this.error = i.fromHueAndChroma(25, 84); - } -} -/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class m { - get primary() { - return this.props.primary; - } - get onPrimary() { - return this.props.onPrimary; - } - get primaryContainer() { - return this.props.primaryContainer; - } - get onPrimaryContainer() { - return this.props.onPrimaryContainer; - } - get secondary() { - return this.props.secondary; - } - get onSecondary() { - return this.props.onSecondary; - } - get secondaryContainer() { - return this.props.secondaryContainer; - } - get onSecondaryContainer() { - return this.props.onSecondaryContainer; - } - get tertiary() { - return this.props.tertiary; - } - get onTertiary() { - return this.props.onTertiary; - } - get tertiaryContainer() { - return this.props.tertiaryContainer; - } - get onTertiaryContainer() { - return this.props.onTertiaryContainer; - } - get error() { - return this.props.error; - } - get onError() { - return this.props.onError; - } - get errorContainer() { - return this.props.errorContainer; - } - get onErrorContainer() { - return this.props.onErrorContainer; - } - get background() { - return this.props.background; - } - get onBackground() { - return this.props.onBackground; - } - get surface() { - return this.props.surface; - } - get onSurface() { - return this.props.onSurface; - } - get surfaceVariant() { - return this.props.surfaceVariant; - } - get onSurfaceVariant() { - return this.props.onSurfaceVariant; - } - get outline() { - return this.props.outline; - } - get outlineVariant() { - return this.props.outlineVariant; - } - get shadow() { - return this.props.shadow; - } - get scrim() { - return this.props.scrim; - } - get inverseSurface() { - return this.props.inverseSurface; - } - get inverseOnSurface() { - return this.props.inverseOnSurface; - } - get inversePrimary() { - return this.props.inversePrimary; - } - /** - * @param argb ARGB representation of a color. - * @return Light Material color scheme, based on the color's hue. - */ - static light(r) { - return m.lightFromCorePalette(s.of(r)); - } - /** - * @param argb ARGB representation of a color. - * @return Dark Material color scheme, based on the color's hue. - */ - static dark(r) { - return m.darkFromCorePalette(s.of(r)); - } - /** - * @param argb ARGB representation of a color. - * @return Light Material content color scheme, based on the color's hue. - */ - static lightContent(r) { - return m.lightFromCorePalette(s.contentOf(r)); - } - /** - * @param argb ARGB representation of a color. - * @return Dark Material content color scheme, based on the color's hue. - */ - static darkContent(r) { - return m.darkFromCorePalette(s.contentOf(r)); - } - /** - * Light scheme from core palette - */ - static lightFromCorePalette(r) { - return new m({ - primary: r.a1.tone(40), - onPrimary: r.a1.tone(100), - primaryContainer: r.a1.tone(90), - onPrimaryContainer: r.a1.tone(10), - secondary: r.a2.tone(40), - onSecondary: r.a2.tone(100), - secondaryContainer: r.a2.tone(90), - onSecondaryContainer: r.a2.tone(10), - tertiary: r.a3.tone(40), - onTertiary: r.a3.tone(100), - tertiaryContainer: r.a3.tone(90), - onTertiaryContainer: r.a3.tone(10), - error: r.error.tone(40), - onError: r.error.tone(100), - errorContainer: r.error.tone(90), - onErrorContainer: r.error.tone(10), - background: r.n1.tone(99), - onBackground: r.n1.tone(10), - surface: r.n1.tone(99), - onSurface: r.n1.tone(10), - surfaceVariant: r.n2.tone(90), - onSurfaceVariant: r.n2.tone(30), - outline: r.n2.tone(50), - outlineVariant: r.n2.tone(80), - shadow: r.n1.tone(0), - scrim: r.n1.tone(0), - inverseSurface: r.n1.tone(20), - inverseOnSurface: r.n1.tone(95), - inversePrimary: r.a1.tone(80) - }); - } - /** - * Dark scheme from core palette - */ - static darkFromCorePalette(r) { - return new m({ - primary: r.a1.tone(80), - onPrimary: r.a1.tone(20), - primaryContainer: r.a1.tone(30), - onPrimaryContainer: r.a1.tone(90), - secondary: r.a2.tone(80), - onSecondary: r.a2.tone(20), - secondaryContainer: r.a2.tone(30), - onSecondaryContainer: r.a2.tone(90), - tertiary: r.a3.tone(80), - onTertiary: r.a3.tone(20), - tertiaryContainer: r.a3.tone(30), - onTertiaryContainer: r.a3.tone(90), - error: r.error.tone(80), - onError: r.error.tone(20), - errorContainer: r.error.tone(30), - onErrorContainer: r.error.tone(80), - background: r.n1.tone(10), - onBackground: r.n1.tone(90), - surface: r.n1.tone(10), - onSurface: r.n1.tone(90), - surfaceVariant: r.n2.tone(30), - onSurfaceVariant: r.n2.tone(80), - outline: r.n2.tone(60), - outlineVariant: r.n2.tone(30), - shadow: r.n1.tone(0), - scrim: r.n1.tone(0), - inverseSurface: r.n1.tone(90), - inverseOnSurface: r.n1.tone(20), - inversePrimary: r.a1.tone(40) - }); - } - constructor(r) { - this.props = r; - } - toJSON() { - return { - ...this.props - }; - } -} -/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function I(h, r = []) { - const t = s.of(h); - return { - source: h, - schemes: { - light: m.light(h), - dark: m.dark(h) - }, - palettes: { - primary: t.a1, - secondary: t.a2, - tertiary: t.a3, - neutral: t.n1, - neutralVariant: t.n2, - error: t.error - }, - customColors: r.map((e) => F(h, e)) - }; -} -function F(h, r) { - let t = r.value; - const e = t, n = h; - r.blend && (t = C.harmonize(e, n)); - const o = s.of(t).a1; - return { - color: r, - value: t, - light: { - color: o.tone(40), - onColor: o.tone(100), - colorContainer: o.tone(90), - onColorContainer: o.tone(10) - }, - dark: { - color: o.tone(80), - onColor: o.tone(20), - colorContainer: o.tone(30), - onColorContainer: o.tone(90) - } - }; -} -function P(h) { - const r = b(h); - return I(r); -} -export { - P as createTheme +const M = { + dialog: [ + [ + // Dialog slide down + [{ transform: "translateY(-50px)" }, { transform: "translateY(0)" }], + { duration: 500, easing: b.EMPHASIZED } + ] + ], + scrim: [ + [ + // Scrim fade in + [{ opacity: 0 }, { opacity: 0.32 }], + { duration: 500, easing: "linear" } + ] + ], + container: [ + [ + // Container fade in + [{ opacity: 0 }, { opacity: 1 }], + { duration: 50, easing: "linear", pseudoElement: "::before" } + ], + [ + // Container grow + // Note: current spec says to grow from 0dp->100% and shrink from + // 100%->35%. We change this to 35%->100% to simplify the animation that + // is supposed to clip content as it grows. From 0dp it's possible to see + // text/actions appear before the container has fully grown. + [{ height: "35%" }, { height: "100%" }], + { duration: 500, easing: b.EMPHASIZED, pseudoElement: "::before" } + ] + ], + headline: [ + [ + // Headline fade in + [{ opacity: 0 }, { opacity: 0, offset: 0.2 }, { opacity: 1 }], + { duration: 250, easing: "linear", fill: "forwards" } + ] + ], + content: [ + [ + // Content fade in + [{ opacity: 0 }, { opacity: 0, offset: 0.2 }, { opacity: 1 }], + { duration: 250, easing: "linear", fill: "forwards" } + ] + ], + actions: [ + [ + // Actions fade in + [{ opacity: 0 }, { opacity: 0, offset: 0.5 }, { opacity: 1 }], + { duration: 300, easing: "linear", fill: "forwards" } + ] + ] +}, V = { + dialog: [ + [ + // Dialog slide up + [{ transform: "translateY(0)" }, { transform: "translateY(-50px)" }], + { duration: 150, easing: b.EMPHASIZED_ACCELERATE } + ] + ], + scrim: [ + [ + // Scrim fade out + [{ opacity: 0.32 }, { opacity: 0 }], + { duration: 150, easing: "linear" } + ] + ], + container: [ + [ + // Container shrink + [{ height: "100%" }, { height: "35%" }], + { + duration: 150, + easing: b.EMPHASIZED_ACCELERATE, + pseudoElement: "::before" + } + ], + [ + // Container fade out + [{ opacity: "1" }, { opacity: "0" }], + { delay: 100, duration: 50, easing: "linear", pseudoElement: "::before" } + ] + ], + headline: [ + [ + // Headline fade out + [{ opacity: 1 }, { opacity: 0 }], + { duration: 100, easing: "linear", fill: "forwards" } + ] + ], + content: [ + [ + // Content fade out + [{ opacity: 1 }, { opacity: 0 }], + { duration: 100, easing: "linear", fill: "forwards" } + ] + ], + actions: [ + [ + // Actions fade out + [{ opacity: 1 }, { opacity: 0 }], + { duration: 100, easing: "linear", fill: "forwards" } + ] + ] +}; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const W = H($); +let s = class extends W { + // We do not use `delegatesFocus: true` due to a Chromium bug with + // selecting text. + // See https://bugs.chromium.org/p/chromium/issues/detail?id=950357 + /** + * Opens the dialog when set to `true` and closes it when set to `false`. + */ + get open() { + return this.isOpen; + } + set open(e) { + e !== this.isOpen && (this.isOpen = e, e ? (this.setAttribute("open", ""), this.show()) : (this.removeAttribute("open"), this.close())); + } + constructor() { + super(), this.quick = !1, this.returnValue = "", this.noFocusTrap = !1, this.getOpenAnimation = () => M, this.getCloseAnimation = () => V, this.isOpen = !1, this.isOpening = !1, this.isConnectedPromise = this.getIsConnectedPromise(), this.isAtScrollTop = !1, this.isAtScrollBottom = !1, this.nextClickIsFromContent = !1, this.hasHeadline = !1, this.hasActions = !1, this.hasIcon = !1, this.escapePressedWithoutCancel = !1, this.treewalker = document.createTreeWalker(this, NodeFilter.SHOW_ELEMENT), this.addEventListener("submit", this.handleSubmit); + } + /** + * Opens the dialog and fires a cancelable `open` event. After a dialog's + * animation, an `opened` event is fired. + * + * Add an `autofocus` attribute to a child of the dialog that should + * receive focus after opening. + * + * @return A Promise that resolves after the animation is finished and the + * `opened` event was fired. + */ + async show() { + var i; + this.isOpening = !0, await this.isConnectedPromise, await this.updateComplete; + const e = this.dialog; + if (e.open || !this.isOpening) { + this.isOpening = !1; + return; + } + if (!this.dispatchEvent(new Event("open", { cancelable: !0 }))) { + this.open = !1, this.isOpening = !1; + return; + } + e.showModal(), this.open = !0, this.scroller && (this.scroller.scrollTop = 0), (i = this.querySelector("[autofocus]")) == null || i.focus(), await this.animateDialog(this.getOpenAnimation()), this.dispatchEvent(new Event("opened")), this.isOpening = !1; + } + /** + * Closes the dialog and fires a cancelable `close` event. After a dialog's + * animation, a `closed` event is fired. + * + * @param returnValue A return value usually indicating which button was used + * to close a dialog. If a dialog is canceled by clicking the scrim or + * pressing Escape, it will not change the return value after closing. + * @return A Promise that resolves after the animation is finished and the + * `closed` event was fired. + */ + async close(e = this.returnValue) { + if (this.isOpening = !1, !this.isConnected) { + this.open = !1; + return; + } + await this.updateComplete; + const t = this.dialog; + if (!t.open || this.isOpening) { + this.open = !1; + return; + } + const i = this.returnValue; + if (this.returnValue = e, !this.dispatchEvent(new Event("close", { cancelable: !0 }))) { + this.returnValue = i; + return; + } + await this.animateDialog(this.getCloseAnimation()), t.close(e), this.open = !1, this.dispatchEvent(new Event("closed")); + } + connectedCallback() { + super.connectedCallback(), this.isConnectedPromiseResolve(); + } + disconnectedCallback() { + super.disconnectedCallback(), this.isConnectedPromise = this.getIsConnectedPromise(); + } + render() { + const e = this.open && !(this.isAtScrollTop && this.isAtScrollBottom), t = { + "has-headline": this.hasHeadline, + "has-actions": this.hasActions, + "has-icon": this.hasIcon, + scrollable: e, + "show-top-divider": e && !this.isAtScrollTop, + "show-bottom-divider": e && !this.isAtScrollBottom + }, i = this.open && !this.noFocusTrap, a = O` + + `, { ariaLabel: r } = this; + return O` +
+ + ${i ? a : h} +
+
+ +

+ +

+ +
+
+
+
+ +
+
+
+
+ + +
+
+ ${i ? a : h} +
+ `; + } + firstUpdated() { + this.intersectionObserver = new IntersectionObserver((e) => { + for (const t of e) + this.handleAnchorIntersection(t); + }, { root: this.scroller }), this.intersectionObserver.observe(this.topAnchor), this.intersectionObserver.observe(this.bottomAnchor); + } + handleDialogClick() { + if (this.nextClickIsFromContent) { + this.nextClickIsFromContent = !1; + return; + } + this.dispatchEvent(new Event("cancel", { cancelable: !0 })) && this.close(); + } + handleContentClick() { + this.nextClickIsFromContent = !0; + } + handleSubmit(e) { + const t = e.target, { submitter: i } = e; + t.method !== "dialog" || !i || this.close(i.getAttribute("value") ?? this.returnValue); + } + handleCancel(e) { + if (e.target !== this.dialog) + return; + this.escapePressedWithoutCancel = !1; + const t = !_(this, e); + e.preventDefault(), !t && this.close(); + } + handleClose() { + var e; + this.escapePressedWithoutCancel && (this.escapePressedWithoutCancel = !1, (e = this.dialog) == null || e.dispatchEvent(new Event("cancel", { cancelable: !0 }))); + } + handleKeydown(e) { + e.key === "Escape" && (this.escapePressedWithoutCancel = !0, setTimeout(() => { + this.escapePressedWithoutCancel = !1; + })); + } + async animateDialog(e) { + var k; + if ((k = this.cancelAnimations) == null || k.abort(), this.cancelAnimations = new AbortController(), this.quick) + return; + const { dialog: t, scrim: i, container: a, headline: r, content: d, actions: c } = this; + if (!t || !i || !a || !r || !d || !c) + return; + const { container: p, dialog: f, scrim: v, headline: m, content: w, actions: A } = e, E = [ + [t, f ?? []], + [i, v ?? []], + [a, p ?? []], + [r, m ?? []], + [d, w ?? []], + [c, A ?? []] + ], y = []; + for (const [F, I] of E) + for (const D of I) { + const T = F.animate(...D); + this.cancelAnimations.signal.addEventListener("abort", () => { + T.cancel(); + }), y.push(T); + } + await Promise.all(y.map((F) => F.finished.catch(() => { + }))); + } + handleHeadlineChange(e) { + const t = e.target; + this.hasHeadline = t.assignedElements().length > 0; + } + handleActionsChange(e) { + const t = e.target; + this.hasActions = t.assignedElements().length > 0; + } + handleIconChange(e) { + const t = e.target; + this.hasIcon = t.assignedElements().length > 0; + } + handleAnchorIntersection(e) { + const { target: t, isIntersecting: i } = e; + t === this.topAnchor && (this.isAtScrollTop = i), t === this.bottomAnchor && (this.isAtScrollBottom = i); + } + getIsConnectedPromise() { + return new Promise((e) => { + this.isConnectedPromiseResolve = e; + }); + } + handleFocusTrapFocus(e) { + var m; + const [t, i] = this.getFirstAndLastFocusableChildren(); + if (!t || !i) { + (m = this.dialog) == null || m.focus(); + return; + } + const a = e.target === this.firstFocusTrap, r = !a, d = e.relatedTarget === t, c = e.relatedTarget === i, p = !d && !c; + if (r && c || a && p) { + t.focus(); + return; + } + if (a && d || r && p) { + i.focus(); + return; + } + } + getFirstAndLastFocusableChildren() { + if (!this.treewalker) + return [null, null]; + let e = null, t = null; + for (this.treewalker.currentNode = this.treewalker.root; this.treewalker.nextNode(); ) { + const i = this.treewalker.currentNode; + B(i) && (e || (e = i), t = i); + } + return [e, t]; + } +}; +o([ + u({ type: Boolean }) +], s.prototype, "open", null); +o([ + u({ type: Boolean }) +], s.prototype, "quick", void 0); +o([ + u({ attribute: !1 }) +], s.prototype, "returnValue", void 0); +o([ + u() +], s.prototype, "type", void 0); +o([ + u({ type: Boolean, attribute: "no-focus-trap" }) +], s.prototype, "noFocusTrap", void 0); +o([ + l("dialog") +], s.prototype, "dialog", void 0); +o([ + l(".scrim") +], s.prototype, "scrim", void 0); +o([ + l(".container") +], s.prototype, "container", void 0); +o([ + l(".headline") +], s.prototype, "headline", void 0); +o([ + l(".content") +], s.prototype, "content", void 0); +o([ + l(".actions") +], s.prototype, "actions", void 0); +o([ + g() +], s.prototype, "isAtScrollTop", void 0); +o([ + g() +], s.prototype, "isAtScrollBottom", void 0); +o([ + l(".scroller") +], s.prototype, "scroller", void 0); +o([ + l(".top.anchor") +], s.prototype, "topAnchor", void 0); +o([ + l(".bottom.anchor") +], s.prototype, "bottomAnchor", void 0); +o([ + l(".focus-trap") +], s.prototype, "firstFocusTrap", void 0); +o([ + g() +], s.prototype, "hasHeadline", void 0); +o([ + g() +], s.prototype, "hasActions", void 0); +o([ + g() +], s.prototype, "hasIcon", void 0); +function B(n) { + var r; + const e = ":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])", t = ":not(:disabled,[disabled])"; + return n.matches(e + t + ':not([tabindex^="-"])') ? !0 : !n.localName.includes("-") || !n.matches(t) ? !1 : ((r = n.shadowRoot) == null ? void 0 : r.delegatesFocus) ?? !1; +} +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const R = N`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}} +`; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let x = class extends s { +}; +x.styles = [R]; +x = o([ + z("md-dialog") +], x); +const q = P({ + react: S, + tagName: "md-dialog", + elementClass: x, + events: { + onClose: "close", + onShow: "show", + onOpen: "open", + onOpened: "opened", + onClosed: "closed", + onCancel: "cancel" + } +}), te = (n) => { + const { children: e, quick: t, returnValue: i, noFocusTrap: a, open: r, fullScreen: d, style: c, className: p, id: f, onClose: v, onShow: m, onOpen: w, onOpened: A, onClosed: E, onCancel: y } = n; + return /* @__PURE__ */ C( + q, + { + quick: t, + returnValue: i, + noFocusTrap: a, + open: r, + style: { + ...c, + ...d ? { + width: "100vw", + height: "100vh", + maxWidth: "100vw", + maxHeight: "100vh" + } : {} + }, + className: p, + id: f, + onClose: v, + onShow: m, + onOpen: w, + onOpened: A, + onClosed: E, + onCancel: y, + children: e + } + ); +}, ie = (n) => /* @__PURE__ */ C("div", { slot: "headline", ...n, children: n.children }), oe = (n) => /* @__PURE__ */ C("div", { slot: "content", ...n, children: n.children }), se = (n) => /* @__PURE__ */ C("div", { slot: "actions", ...n, children: n.children }); +export { + te as Dialog, + se as DialogActions, + oe as DialogContent, + ie as DialogTitle }; diff --git a/dist/react-you-ui14.js b/dist/react-you-ui14.js index f918323..cc7a918 100644 --- a/dist/react-you-ui14.js +++ b/dist/react-you-ui14.js @@ -1,45 +1,76 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),C=require("react"),E=require("./create-component-D9KTUrcf.js"),o=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const I=require("./animation-A38fZ1oY.js"),q=require("./form-label-activation-CYEOF_US.js"),f=require("./validator-DUxooTr6.js"),b=require("./element-internals-OOm6rgx-.js"),R=require("./focusable-D3uHX6nn.js"),k=require("./form-associated-CxXMoMPu.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./string_utils-Bad7L8P5.js");/** * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */class S extends f.Validator{computeValidity(e){this.radioElement||(this.radioElement=document.createElement("input"),this.radioElement.type="radio",this.radioElement.name="group");let i=!1,t=!1;for(const{checked:r,required:a}of e)a&&(i=!0),r&&(t=!0);return this.radioElement.checked=t,this.radioElement.required=i,{validity:{valueMissing:i&&!t},validationMessage:this.radioElement.validationMessage}}equals(e,i){if(e.length!==i.length)return!1;for(let t=0;t({checked:i,required:t}))}}/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class p{static harmonize(r,t){const e=i.Hct.fromInt(r),n=i.Hct.fromInt(t),a=i.differenceDegrees(e.hue,n.hue),o=Math.min(a*.5,15),c=i.sanitizeDegreesDouble(e.hue+o*i.rotationDirection(e.hue,n.hue));return i.Hct.from(c,e.chroma,e.tone).toInt()}static hctHue(r,t,e){const n=p.cam16Ucs(r,t,e),a=i.Cam16.fromInt(n),o=i.Cam16.fromInt(r);return i.Hct.from(a.hue,o.chroma,i.lstarFromArgb(r)).toInt()}static cam16Ucs(r,t,e){const n=i.Cam16.fromInt(r),a=i.Cam16.fromInt(t),o=n.jstar,c=n.astar,f=n.bstar,C=a.jstar,d=a.astar,y=a.bstar,l=o+(C-o)*e,g=c+(d-c)*e,H=f+(y-f)*e;return i.Cam16.fromUcs(l,g,H).toInt()}}/** * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */class A{get controls(){const e=this.host.getAttribute("name");return!e||!this.root||!this.host.isConnected?[this.host]:Array.from(this.root.querySelectorAll(`[name="${e}"]`))}constructor(e){this.host=e,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=i=>{const t=i.key==="ArrowDown",r=i.key==="ArrowUp",a=i.key==="ArrowLeft",m=i.key==="ArrowRight";if(!a&&!m&&!t&&!r)return;const c=this.controls;if(!c.length)return;i.preventDefault();const p=getComputedStyle(this.host).direction==="rtl"?a||t:m||t,h=c.indexOf(this.host);let s=p?h+1:h-1;for(;s!==h;){s>=c.length?s=0:s<0&&(s=c.length-1);const n=c[s];if(n.hasAttribute("disabled")){p?s++:s--;continue}for(const d of c)d!==n&&(d.checked=!1,d.tabIndex=-1,d.blur());n.checked=!0,n.tabIndex=0,n.focus(),n.dispatchEvent(new Event("change",{bubbles:!0}));break}}}hostConnected(){this.root=this.host.getRootNode(),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("focusin",this.handleFocusIn),this.host.addEventListener("focusout",this.handleFocusOut),this.host.checked&&this.uncheckSiblings(),this.updateTabIndices()}hostDisconnected(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("focusin",this.handleFocusIn),this.host.removeEventListener("focusout",this.handleFocusOut),this.updateTabIndices(),this.root=null}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(const e of this.controls)e!==this.host&&(e.checked=!1)}updateTabIndices(){const e=this.controls,i=e.find(t=>t.checked);if(i||this.focused){const t=i||this.host;t.tabIndex=0;for(const r of e)r!==t&&(r.tabIndex=-1);return}for(const t of e)t.tabIndex=0}}/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class u{static fromInt(r){const t=i.Hct.fromInt(r);return u.fromHct(t)}static fromHct(r){return new u(r.hue,r.chroma,r)}static fromHueAndChroma(r,t){const e=new S(r,t).create();return new u(r,t,e)}constructor(r,t,e){this.hue=r,this.chroma=t,this.keyColor=e,this.cache=new Map}tone(r){let t=this.cache.get(r);return t===void 0&&(t=i.Hct.from(this.hue,this.chroma,r).toInt(),this.cache.set(r,t)),t}getHct(r){return i.Hct.fromInt(this.tone(r))}}class S{constructor(r,t){this.hue=r,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let n=0,a=100;for(;n=this.requestedChroma-.01)if(Math.abs(n-50)
- `}updated(){this[b.internals].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(q.isActivationClick(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==" "||e.defaultPrevented)&&this.click()}[(x=y,k.getFormValue)](){return this.checked?this.value:null}[k.getFormState](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[f.createValidator](){return new S(()=>this.selectionController?this.selectionController.controls:[this])}[f.getValidityAnchor](){return this.container}};o.__decorate([o.n({type:Boolean})],u.prototype,"checked",null);o.__decorate([o.n({type:Boolean})],u.prototype,"required",void 0);o.__decorate([o.n()],u.prototype,"value",void 0);o.__decorate([I.e$1(".container")],u.prototype,"container",void 0);/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class s{static of(r){return new s(r,!1)}static contentOf(r){return new s(r,!0)}static fromColors(r){return s.createPaletteFromColors(!1,r)}static contentFromColors(r){return s.createPaletteFromColors(!0,r)}static createPaletteFromColors(r,t){const e=new s(t.primary,r);if(t.secondary){const n=new s(t.secondary,r);e.a2=n.a1}if(t.tertiary){const n=new s(t.tertiary,r);e.a3=n.a1}if(t.error){const n=new s(t.error,r);e.error=n.a1}if(t.neutral){const n=new s(t.neutral,r);e.n1=n.n1}if(t.neutralVariant){const n=new s(t.neutralVariant,r);e.n2=n.n2}return e}constructor(r,t){const e=i.Hct.fromInt(r),n=e.hue,a=e.chroma;t?(this.a1=u.fromHueAndChroma(n,a),this.a2=u.fromHueAndChroma(n,a/3),this.a3=u.fromHueAndChroma(n+60,a/2),this.n1=u.fromHueAndChroma(n,Math.min(a/12,4)),this.n2=u.fromHueAndChroma(n,Math.min(a/6,8))):(this.a1=u.fromHueAndChroma(n,Math.max(48,a)),this.a2=u.fromHueAndChroma(n,16),this.a3=u.fromHueAndChroma(n+60,24),this.n1=u.fromHueAndChroma(n,4),this.n2=u.fromHueAndChroma(n,8)),this.error=u.fromHueAndChroma(25,84)}}/** * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const _=o.i$1`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}} -`;/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class m{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(r){return m.lightFromCorePalette(s.of(r))}static dark(r){return m.darkFromCorePalette(s.of(r))}static lightContent(r){return m.lightFromCorePalette(s.contentOf(r))}static darkContent(r){return m.darkFromCorePalette(s.contentOf(r))}static lightFromCorePalette(r){return new m({primary:r.a1.tone(40),onPrimary:r.a1.tone(100),primaryContainer:r.a1.tone(90),onPrimaryContainer:r.a1.tone(10),secondary:r.a2.tone(40),onSecondary:r.a2.tone(100),secondaryContainer:r.a2.tone(90),onSecondaryContainer:r.a2.tone(10),tertiary:r.a3.tone(40),onTertiary:r.a3.tone(100),tertiaryContainer:r.a3.tone(90),onTertiaryContainer:r.a3.tone(10),error:r.error.tone(40),onError:r.error.tone(100),errorContainer:r.error.tone(90),onErrorContainer:r.error.tone(10),background:r.n1.tone(99),onBackground:r.n1.tone(10),surface:r.n1.tone(99),onSurface:r.n1.tone(10),surfaceVariant:r.n2.tone(90),onSurfaceVariant:r.n2.tone(30),outline:r.n2.tone(50),outlineVariant:r.n2.tone(80),shadow:r.n1.tone(0),scrim:r.n1.tone(0),inverseSurface:r.n1.tone(20),inverseOnSurface:r.n1.tone(95),inversePrimary:r.a1.tone(80)})}static darkFromCorePalette(r){return new m({primary:r.a1.tone(80),onPrimary:r.a1.tone(20),primaryContainer:r.a1.tone(30),onPrimaryContainer:r.a1.tone(90),secondary:r.a2.tone(80),onSecondary:r.a2.tone(20),secondaryContainer:r.a2.tone(30),onSecondaryContainer:r.a2.tone(90),tertiary:r.a3.tone(80),onTertiary:r.a3.tone(20),tertiaryContainer:r.a3.tone(30),onTertiaryContainer:r.a3.tone(90),error:r.error.tone(80),onError:r.error.tone(20),errorContainer:r.error.tone(30),onErrorContainer:r.error.tone(80),background:r.n1.tone(10),onBackground:r.n1.tone(90),surface:r.n1.tone(10),onSurface:r.n1.tone(90),surfaceVariant:r.n2.tone(30),onSurfaceVariant:r.n2.tone(80),outline:r.n2.tone(60),outlineVariant:r.n2.tone(30),shadow:r.n1.tone(0),scrim:r.n1.tone(0),inverseSurface:r.n1.tone(90),inverseOnSurface:r.n1.tone(20),inversePrimary:r.a1.tone(40)})}constructor(r){this.props=r}toJSON(){return{...this.props}}}/** * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let v=class extends u{};v.styles=[_];v=o.__decorate([o.t$1("md-radio")],v);const F=E.o({react:C,tagName:"md-radio",elementClass:v}),T=l=>{const{checked:e,value:i,required:t,disabled:r,name:a,ariaLabel:m,className:c,style:g,id:p,iconColor:h,selectedIconColor:s,iconSize:n,...d}=l;return w.jsx(F,{checked:e,value:i,required:t,disabled:r||!1,name:a,className:c,style:{...g,"--md-radio-icon-color":h||"var(--md-sys-on-surface-variant)","--md-radio-selected-icon-color":s||"var(--md-sys-color-primary)","--md-radio-icon-size":n||"20px"},id:p,"aria-label":m,...d})};exports.Radio=T; + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function w(h,r=[]){const t=s.of(h);return{source:h,schemes:{light:m.light(h),dark:m.dark(h)},palettes:{primary:t.a1,secondary:t.a2,tertiary:t.a3,neutral:t.n1,neutralVariant:t.n2,error:t.error},customColors:r.map(e=>b(h,e))}}function b(h,r){let t=r.value;const e=t,n=h;r.blend&&(t=p.harmonize(e,n));const o=s.of(t).a1;return{color:r,value:t,light:{color:o.tone(40),onColor:o.tone(100),colorContainer:o.tone(90),onColorContainer:o.tone(10)},dark:{color:o.tone(80),onColor:o.tone(20),colorContainer:o.tone(30),onColorContainer:o.tone(90)}}}function k(h){const r=i.argbFromHex(h);return w(r)}exports.createTheme=k; diff --git a/dist/react-you-ui14.mjs b/dist/react-you-ui14.mjs index f77d91e..844035c 100644 --- a/dist/react-you-ui14.mjs +++ b/dist/react-you-ui14.mjs @@ -1,274 +1,504 @@ -import { jsx as x } from "react/jsx-runtime"; -import w from "react"; -import { o as C } from "./create-component-CVXl33PD.mjs"; -import { _ as h, n as y, r as E, x as I, c as R, a as S, b as A } from "./class-map-CwiboTfb.mjs"; -import "./ripple-pQcEjR05.mjs"; -import { a as q } from "./animation-DjClVFum.mjs"; -import { i as L } from "./form-label-activation-ed0HgVsy.mjs"; -import { V as $, m as F, c as z, g as D } from "./validator-DZt1_yHv.mjs"; -import { m as T, i as k } from "./element-internals-3IY9gE4L.mjs"; -import { m as V } from "./focusable-CDJoU7XD.mjs"; -import { m as K, g as M, a as _ } from "./form-associated-CyYeHPMb.mjs"; +import { H as u, d as w, s as k, r as v, C as f, l as V, a as b } from "./string_utils-B4bsIQ5w.mjs"; /** * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -class B extends $ { - computeValidity(e) { - this.radioElement || (this.radioElement = document.createElement("input"), this.radioElement.type = "radio", this.radioElement.name = "group"); - let i = !1, t = !1; - for (const { checked: o, required: r } of e) - r && (i = !0), o && (t = !0); - return this.radioElement.checked = t, this.radioElement.required = i, { - validity: { - valueMissing: i && !t - }, - validationMessage: this.radioElement.validationMessage - }; +class C { + /** + * Blend the design color's HCT hue towards the key color's HCT + * hue, in a way that leaves the original color recognizable and + * recognizably shifted towards the key color. + * + * @param designColor ARGB representation of an arbitrary color. + * @param sourceColor ARGB representation of the main theme color. + * @return The design color with a hue shifted towards the + * system's color, a slightly warmer/cooler variant of the design + * color's hue. + */ + static harmonize(r, t) { + const e = u.fromInt(r), n = u.fromInt(t), a = w(e.hue, n.hue), o = Math.min(a * 0.5, 15), c = k(e.hue + o * v(e.hue, n.hue)); + return u.from(c, e.chroma, e.tone).toInt(); } - equals(e, i) { - if (e.length !== i.length) - return !1; - for (let t = 0; t < e.length; t++) { - const o = e[t], r = i[t]; - if (o.checked !== r.checked || o.required !== r.required) - return !1; - } - return !0; + /** + * Blends hue from one color into another. The chroma and tone of + * the original color are maintained. + * + * @param from ARGB representation of color + * @param to ARGB representation of color + * @param amount how much blending to perform; 0.0 >= and <= 1.0 + * @return from, with a hue blended towards to. Chroma and tone + * are constant. + */ + static hctHue(r, t, e) { + const n = C.cam16Ucs(r, t, e), a = f.fromInt(n), o = f.fromInt(r); + return u.from(a.hue, o.chroma, V(r)).toInt(); } - copy(e) { - return e.map(({ checked: i, required: t }) => ({ - checked: i, - required: t - })); + /** + * Blend in CAM16-UCS space. + * + * @param from ARGB representation of color + * @param to ARGB representation of color + * @param amount how much blending to perform; 0.0 >= and <= 1.0 + * @return from, blended towards to. Hue, chroma, and tone will + * change. + */ + static cam16Ucs(r, t, e) { + const n = f.fromInt(r), a = f.fromInt(t), o = n.jstar, c = n.astar, p = n.bstar, d = a.jstar, y = a.astar, l = a.bstar, g = o + (d - o) * e, S = c + (y - c) * e, H = p + (l - p) * e; + return f.fromUcs(g, S, H).toInt(); } } /** * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -class O { +class i { /** - * All single selection elements in the host element's root with the same - * `name` attribute, including the host element. + * @param argb ARGB representation of a color + * @return Tones matching that color's hue and chroma. */ - get controls() { - const e = this.host.getAttribute("name"); - return !e || !this.root || !this.host.isConnected ? [this.host] : Array.from(this.root.querySelectorAll(`[name="${e}"]`)); + static fromInt(r) { + const t = u.fromInt(r); + return i.fromHct(t); } - constructor(e) { - this.host = e, this.focused = !1, this.root = null, this.handleFocusIn = () => { - this.focused = !0, this.updateTabIndices(); - }, this.handleFocusOut = () => { - this.focused = !1, this.updateTabIndices(); - }, this.handleKeyDown = (i) => { - const t = i.key === "ArrowDown", o = i.key === "ArrowUp", r = i.key === "ArrowLeft", u = i.key === "ArrowRight"; - if (!r && !u && !t && !o) - return; - const a = this.controls; - if (!a.length) - return; - i.preventDefault(); - const p = getComputedStyle(this.host).direction === "rtl" ? r || t : u || t, l = a.indexOf(this.host); - let s = p ? l + 1 : l - 1; - for (; s !== l; ) { - s >= a.length ? s = 0 : s < 0 && (s = a.length - 1); - const c = a[s]; - if (c.hasAttribute("disabled")) { - p ? s++ : s--; - continue; + /** + * @param hct Hct + * @return Tones matching that color's hue and chroma. + */ + static fromHct(r) { + return new i(r.hue, r.chroma, r); + } + /** + * @param hue HCT hue + * @param chroma HCT chroma + * @return Tones matching hue and chroma. + */ + static fromHueAndChroma(r, t) { + const e = new A(r, t).create(); + return new i(r, t, e); + } + constructor(r, t, e) { + this.hue = r, this.chroma = t, this.keyColor = e, this.cache = /* @__PURE__ */ new Map(); + } + /** + * @param tone HCT tone, measured from 0 to 100. + * @return ARGB representation of a color with that tone. + */ + tone(r) { + let t = this.cache.get(r); + return t === void 0 && (t = u.from(this.hue, this.chroma, r).toInt(), this.cache.set(r, t)), t; + } + /** + * @param tone HCT tone. + * @return HCT representation of a color with that tone. + */ + getHct(r) { + return u.fromInt(this.tone(r)); + } +} +class A { + constructor(r, t) { + this.hue = r, this.requestedChroma = t, this.chromaCache = /* @__PURE__ */ new Map(), this.maxChromaValue = 200; + } + /** + * Creates a key color from a [hue] and a [chroma]. + * The key color is the first tone, starting from T50, matching the given hue + * and chroma. + * + * @return Key color [Hct] + */ + create() { + let n = 0, a = 100; + for (; n < a; ) { + const o = Math.floor((n + a) / 2), c = this.maxChroma(o) < this.maxChroma(o + 1); + if (this.maxChroma(o) >= this.requestedChroma - 0.01) + if (Math.abs(n - 50) < Math.abs(a - 50)) + a = o; + else { + if (n === o) + return u.from(this.hue, this.requestedChroma, n); + n = o; } - for (const n of a) - n !== c && (n.checked = !1, n.tabIndex = -1, n.blur()); - c.checked = !0, c.tabIndex = 0, c.focus(), c.dispatchEvent(new Event("change", { bubbles: !0 })); - break; - } - }; - } - hostConnected() { - this.root = this.host.getRootNode(), this.host.addEventListener("keydown", this.handleKeyDown), this.host.addEventListener("focusin", this.handleFocusIn), this.host.addEventListener("focusout", this.handleFocusOut), this.host.checked && this.uncheckSiblings(), this.updateTabIndices(); - } - hostDisconnected() { - this.host.removeEventListener("keydown", this.handleKeyDown), this.host.removeEventListener("focusin", this.handleFocusIn), this.host.removeEventListener("focusout", this.handleFocusOut), this.updateTabIndices(), this.root = null; - } - /** - * Should be called whenever the host's `checked` property changes - * synchronously. - */ - handleCheckedChange() { - this.host.checked && (this.uncheckSiblings(), this.updateTabIndices()); - } - uncheckSiblings() { - for (const e of this.controls) - e !== this.host && (e.checked = !1); - } - /** - * Updates the `tabindex` of the host and its siblings. - */ - updateTabIndices() { - const e = this.controls, i = e.find((t) => t.checked); - if (i || this.focused) { - const t = i || this.host; - t.tabIndex = 0; - for (const o of e) - o !== t && (o.tabIndex = -1); - return; + else + c ? n = o + 1 : a = o; } - for (const t of e) - t.tabIndex = 0; + return u.from(this.hue, this.requestedChroma, n); + } + // Find the maximum chroma for a given tone + maxChroma(r) { + if (this.chromaCache.has(r)) + return this.chromaCache.get(r); + const t = u.from(this.hue, this.maxChromaValue, r).chroma; + return this.chromaCache.set(r, t), t; } } /** * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -var g; -const v = Symbol("checked"); -let N = 0; -const U = F(K(T(V(E)))); -let m = class extends U { +class s { /** - * Whether or not the radio is selected. + * @param argb ARGB representation of a color */ - get checked() { - return this[v]; + static of(r) { + return new s(r, !1); } - set checked(e) { - const i = this.checked; - i !== e && (this[v] = e, this.requestUpdate("checked", i), this.selectionController.handleCheckedChange()); + /** + * @param argb ARGB representation of a color + */ + static contentOf(r) { + return new s(r, !0); } - constructor() { - super(), this.maskId = `cutout${++N}`, this[g] = !1, this.required = !1, this.value = "on", this.selectionController = new O(this), this.addController(this.selectionController), this[k].role = "radio", this.addEventListener("click", this.handleClick.bind(this)), this.addEventListener("keydown", this.handleKeydown.bind(this)); + /** + * Create a [CorePalette] from a set of colors + */ + static fromColors(r) { + return s.createPaletteFromColors(!1, r); } - render() { - const e = { checked: this.checked }; - return I` - - `; + /** + * Create a content [CorePalette] from a set of colors + */ + static contentFromColors(r) { + return s.createPaletteFromColors(!0, r); } - updated() { - this[k].ariaChecked = String(this.checked); - } - async handleClick(e) { - this.disabled || (await 0, !e.defaultPrevented && (L(e) && this.focus(), this.checked = !0, this.dispatchEvent(new Event("change", { bubbles: !0 })), this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })))); - } - async handleKeydown(e) { - await 0, !(e.key !== " " || e.defaultPrevented) && this.click(); - } - [(g = v, M)]() { - return this.checked ? this.value : null; - } - [_]() { - return String(this.checked); - } - formResetCallback() { - this.checked = this.hasAttribute("checked"); - } - formStateRestoreCallback(e) { - this.checked = e === "true"; - } - [z]() { - return new B(() => this.selectionController ? this.selectionController.controls : [this]); - } - [D]() { - return this.container; - } -}; -h([ - y({ type: Boolean }) -], m.prototype, "checked", null); -h([ - y({ type: Boolean }) -], m.prototype, "required", void 0); -h([ - y() -], m.prototype, "value", void 0); -h([ - q(".container") -], m.prototype, "container", void 0); -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const P = S`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}} -`; -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let f = class extends m { -}; -f.styles = [P]; -f = h([ - A("md-radio") -], f); -const j = C({ - react: w, - tagName: "md-radio", - elementClass: f -}), re = (d) => { - const { - checked: e, - value: i, - required: t, - disabled: o, - name: r, - ariaLabel: u, - className: a, - style: b, - id: p, - iconColor: l, - selectedIconColor: s, - iconSize: c, - ...n - } = d; - return /* @__PURE__ */ x( - j, - { - checked: e, - value: i, - required: t, - disabled: o || !1, - name: r, - className: a, - style: { - ...b, - "--md-radio-icon-color": l || "var(--md-sys-on-surface-variant)", - "--md-radio-selected-icon-color": s || "var(--md-sys-color-primary)", - "--md-radio-icon-size": c || "20px" - }, - id: p, - "aria-label": u, - ...n + static createPaletteFromColors(r, t) { + const e = new s(t.primary, r); + if (t.secondary) { + const n = new s(t.secondary, r); + e.a2 = n.a1; } - ); -}; + if (t.tertiary) { + const n = new s(t.tertiary, r); + e.a3 = n.a1; + } + if (t.error) { + const n = new s(t.error, r); + e.error = n.a1; + } + if (t.neutral) { + const n = new s(t.neutral, r); + e.n1 = n.n1; + } + if (t.neutralVariant) { + const n = new s(t.neutralVariant, r); + e.n2 = n.n2; + } + return e; + } + constructor(r, t) { + const e = u.fromInt(r), n = e.hue, a = e.chroma; + t ? (this.a1 = i.fromHueAndChroma(n, a), this.a2 = i.fromHueAndChroma(n, a / 3), this.a3 = i.fromHueAndChroma(n + 60, a / 2), this.n1 = i.fromHueAndChroma(n, Math.min(a / 12, 4)), this.n2 = i.fromHueAndChroma(n, Math.min(a / 6, 8))) : (this.a1 = i.fromHueAndChroma(n, Math.max(48, a)), this.a2 = i.fromHueAndChroma(n, 16), this.a3 = i.fromHueAndChroma(n + 60, 24), this.n1 = i.fromHueAndChroma(n, 4), this.n2 = i.fromHueAndChroma(n, 8)), this.error = i.fromHueAndChroma(25, 84); + } +} +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class m { + get primary() { + return this.props.primary; + } + get onPrimary() { + return this.props.onPrimary; + } + get primaryContainer() { + return this.props.primaryContainer; + } + get onPrimaryContainer() { + return this.props.onPrimaryContainer; + } + get secondary() { + return this.props.secondary; + } + get onSecondary() { + return this.props.onSecondary; + } + get secondaryContainer() { + return this.props.secondaryContainer; + } + get onSecondaryContainer() { + return this.props.onSecondaryContainer; + } + get tertiary() { + return this.props.tertiary; + } + get onTertiary() { + return this.props.onTertiary; + } + get tertiaryContainer() { + return this.props.tertiaryContainer; + } + get onTertiaryContainer() { + return this.props.onTertiaryContainer; + } + get error() { + return this.props.error; + } + get onError() { + return this.props.onError; + } + get errorContainer() { + return this.props.errorContainer; + } + get onErrorContainer() { + return this.props.onErrorContainer; + } + get background() { + return this.props.background; + } + get onBackground() { + return this.props.onBackground; + } + get surface() { + return this.props.surface; + } + get onSurface() { + return this.props.onSurface; + } + get surfaceVariant() { + return this.props.surfaceVariant; + } + get onSurfaceVariant() { + return this.props.onSurfaceVariant; + } + get outline() { + return this.props.outline; + } + get outlineVariant() { + return this.props.outlineVariant; + } + get shadow() { + return this.props.shadow; + } + get scrim() { + return this.props.scrim; + } + get inverseSurface() { + return this.props.inverseSurface; + } + get inverseOnSurface() { + return this.props.inverseOnSurface; + } + get inversePrimary() { + return this.props.inversePrimary; + } + /** + * @param argb ARGB representation of a color. + * @return Light Material color scheme, based on the color's hue. + */ + static light(r) { + return m.lightFromCorePalette(s.of(r)); + } + /** + * @param argb ARGB representation of a color. + * @return Dark Material color scheme, based on the color's hue. + */ + static dark(r) { + return m.darkFromCorePalette(s.of(r)); + } + /** + * @param argb ARGB representation of a color. + * @return Light Material content color scheme, based on the color's hue. + */ + static lightContent(r) { + return m.lightFromCorePalette(s.contentOf(r)); + } + /** + * @param argb ARGB representation of a color. + * @return Dark Material content color scheme, based on the color's hue. + */ + static darkContent(r) { + return m.darkFromCorePalette(s.contentOf(r)); + } + /** + * Light scheme from core palette + */ + static lightFromCorePalette(r) { + return new m({ + primary: r.a1.tone(40), + onPrimary: r.a1.tone(100), + primaryContainer: r.a1.tone(90), + onPrimaryContainer: r.a1.tone(10), + secondary: r.a2.tone(40), + onSecondary: r.a2.tone(100), + secondaryContainer: r.a2.tone(90), + onSecondaryContainer: r.a2.tone(10), + tertiary: r.a3.tone(40), + onTertiary: r.a3.tone(100), + tertiaryContainer: r.a3.tone(90), + onTertiaryContainer: r.a3.tone(10), + error: r.error.tone(40), + onError: r.error.tone(100), + errorContainer: r.error.tone(90), + onErrorContainer: r.error.tone(10), + background: r.n1.tone(99), + onBackground: r.n1.tone(10), + surface: r.n1.tone(99), + onSurface: r.n1.tone(10), + surfaceVariant: r.n2.tone(90), + onSurfaceVariant: r.n2.tone(30), + outline: r.n2.tone(50), + outlineVariant: r.n2.tone(80), + shadow: r.n1.tone(0), + scrim: r.n1.tone(0), + inverseSurface: r.n1.tone(20), + inverseOnSurface: r.n1.tone(95), + inversePrimary: r.a1.tone(80) + }); + } + /** + * Dark scheme from core palette + */ + static darkFromCorePalette(r) { + return new m({ + primary: r.a1.tone(80), + onPrimary: r.a1.tone(20), + primaryContainer: r.a1.tone(30), + onPrimaryContainer: r.a1.tone(90), + secondary: r.a2.tone(80), + onSecondary: r.a2.tone(20), + secondaryContainer: r.a2.tone(30), + onSecondaryContainer: r.a2.tone(90), + tertiary: r.a3.tone(80), + onTertiary: r.a3.tone(20), + tertiaryContainer: r.a3.tone(30), + onTertiaryContainer: r.a3.tone(90), + error: r.error.tone(80), + onError: r.error.tone(20), + errorContainer: r.error.tone(30), + onErrorContainer: r.error.tone(80), + background: r.n1.tone(10), + onBackground: r.n1.tone(90), + surface: r.n1.tone(10), + onSurface: r.n1.tone(90), + surfaceVariant: r.n2.tone(30), + onSurfaceVariant: r.n2.tone(80), + outline: r.n2.tone(60), + outlineVariant: r.n2.tone(30), + shadow: r.n1.tone(0), + scrim: r.n1.tone(0), + inverseSurface: r.n1.tone(90), + inverseOnSurface: r.n1.tone(20), + inversePrimary: r.a1.tone(40) + }); + } + constructor(r) { + this.props = r; + } + toJSON() { + return { + ...this.props + }; + } +} +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +function I(h, r = []) { + const t = s.of(h); + return { + source: h, + schemes: { + light: m.light(h), + dark: m.dark(h) + }, + palettes: { + primary: t.a1, + secondary: t.a2, + tertiary: t.a3, + neutral: t.n1, + neutralVariant: t.n2, + error: t.error + }, + customColors: r.map((e) => F(h, e)) + }; +} +function F(h, r) { + let t = r.value; + const e = t, n = h; + r.blend && (t = C.harmonize(e, n)); + const o = s.of(t).a1; + return { + color: r, + value: t, + light: { + color: o.tone(40), + onColor: o.tone(100), + colorContainer: o.tone(90), + onColorContainer: o.tone(10) + }, + dark: { + color: o.tone(80), + onColor: o.tone(20), + colorContainer: o.tone(30), + onColorContainer: o.tone(90) + } + }; +} +function P(h) { + const r = b(h); + return I(r); +} export { - re as Radio + P as createTheme }; diff --git a/dist/react-you-ui15.js b/dist/react-you-ui15.js index bbcd0fb..f918323 100644 --- a/dist/react-you-ui15.js +++ b/dist/react-you-ui15.js @@ -1,74 +1,45 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),b=require("react"),f=require("./create-component-D9KTUrcf.js"),o=require("./menuItemController-XIsQ9HIe.js"),t=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const l=require("./item-DvSwYnPq.js"),g=require("./animation-A38fZ1oY.js"),p=require("./query-assigned-elements-BYttmtWz.js"),E=require("./query-assigned-nodes-Dl8k4w_-.js"),c=require("./static-B9XIUGOk.js"),C=require("./delegate-4958lG3m.js");/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const T=C.mixinDelegatesAria(t.r);class n extends T{constructor(){super(...arguments),this.disabled=!1,this.type="menuitem",this.href="",this.target="",this.keepOpen=!1,this.selected=!1,this.menuItemController=new o.MenuItemController(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.menuItemController.typeaheadText}set typeaheadText(e){this.menuItemController.setTypeaheadText(e)}render(){return this.renderListItem(t.x` - -
- ${this.renderRipple()} ${this.renderFocusRing()} -
- - - ${this.renderBody()} -
- `)}renderListItem(e){const i=this.type==="link";let s;switch(this.menuItemController.tagName){case"a":s=c.i`a`;break;case"button":s=c.i`button`;break;default:case"li":s=c.i`li`;break}const r=i&&this.target?this.target:t.E;return c.u` - <${s} - id="item" - tabindex=${this.disabled&&!i?-1:0} - role=${this.menuItemController.role} - aria-label=${this.ariaLabel||t.E} - aria-selected=${this.ariaSelected||t.E} - aria-checked=${this.ariaChecked||t.E} - aria-expanded=${this.ariaExpanded||t.E} - aria-haspopup=${this.ariaHasPopup||t.E} - class="list-item ${t.e$1(this.getRenderClasses())}" - href=${this.href||t.E} - target=${r} - @click=${this.menuItemController.onClick} - @keydown=${this.menuItemController.onKeydown} - >${e} - `}renderRipple(){return t.x` `}renderFocusRing(){return t.x` `}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return t.x` - - - - - - `}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}n.shadowRootOptions={...t.r.shadowRootOptions,delegatesFocus:!0};t.__decorate([t.n({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0);t.__decorate([t.n()],n.prototype,"type",void 0);t.__decorate([t.n()],n.prototype,"href",void 0);t.__decorate([t.n()],n.prototype,"target",void 0);t.__decorate([t.n({type:Boolean,attribute:"keep-open"})],n.prototype,"keepOpen",void 0);t.__decorate([t.n({type:Boolean})],n.prototype,"selected",void 0);t.__decorate([g.e$1(".list-item")],n.prototype,"listItemRoot",void 0);t.__decorate([p.o({slot:"headline"})],n.prototype,"headlineElements",void 0);t.__decorate([p.o({slot:"supporting-text"})],n.prototype,"supportingTextElements",void 0);t.__decorate([E.n({slot:""})],n.prototype,"defaultElements",void 0);t.__decorate([t.n({attribute:"typeahead-text"})],n.prototype,"typeaheadText",null);/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let h=class extends n{};h.styles=[o.styles];h=t.__decorate([t.t$1("md-menu-item")],h);/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),C=require("react"),E=require("./create-component-D9KTUrcf.js"),o=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const I=require("./animation-A38fZ1oY.js"),q=require("./form-label-activation-CYEOF_US.js"),f=require("./validator-DUxooTr6.js"),b=require("./element-internals-OOm6rgx-.js"),R=require("./focusable-D3uHX6nn.js"),k=require("./form-associated-CxXMoMPu.js");/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let u=class extends t.r{get item(){return this.items[0]??null}get menu(){return this.menus[0]??null}constructor(){super(),this.anchorCorner=o.Corner.START_END,this.menuCorner=o.Corner.START_START,this.hoverOpenDelay=400,this.hoverCloseDelay=400,this.isSubMenu=!0,this.previousOpenTimeout=0,this.previousCloseTimeout=0,this.onMouseenter=()=>{var e;clearTimeout(this.previousOpenTimeout),clearTimeout(this.previousCloseTimeout),!((e=this.menu)!=null&&e.open)&&(this.hoverOpenDelay?this.previousOpenTimeout=setTimeout(()=>{this.show()},this.hoverOpenDelay):this.show())},this.onMouseleave=()=>{clearTimeout(this.previousCloseTimeout),clearTimeout(this.previousOpenTimeout),this.hoverCloseDelay?this.previousCloseTimeout=setTimeout(()=>{this.close()},this.hoverCloseDelay):this.close()},this.addEventListener("mouseenter",this.onMouseenter),this.addEventListener("mouseleave",this.onMouseleave)}render(){return t.x` - - - - - `}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(o.createActivateTypeaheadEvent()),this.dispatchEvent(l.createDeactivateItemsEvent()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const i=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(l.createDeactivateItemsEvent()),this.dispatchEvent(o.createDeactivateTypeaheadEvent()),this.item.selected=!0,!i){let s=d=>{};const r=new Promise(d=>{s=d});e.addEventListener("opened",s,{once:!0}),await r}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(o.createActivateTypeaheadEvent()),e.quick=!0,e.close(),this.dispatchEvent(l.createDeactivateItemsEvent());let i=r=>{};const s=new Promise(r=>{i=r});e.addEventListener("closed",i,{once:!0}),await s}onSlotchange(){var i;if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",(i=this.menu)!=null&&i.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const i=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const s=i&&(o.NavigableKey.LEFT===e.code||o.NavigableKey.RIGHT===e.code);if((e.code===o.SelectionKey.SPACE||s)&&(e.preventDefault(),s&&e.stopPropagation()),!i)return;const r=this.menu;if(!r)return;const d=r.items,y=l.getFirstActivatableItem(d);if(y){await this.show(),y.tabIndex=0,y.focus();return}}onCloseSubmenu(e){const{itemPath:i,reason:s}=e.detail;if(i.push(this.item),this.dispatchEvent(o.createActivateTypeaheadEvent()),s.kind===o.CloseReason.KEYDOWN&&s.key===o.KeydownCloseKey.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(l.createRequestActivationEvent());return}this.dispatchEvent(l.createDeactivateItemsEvent())}async onSubMenuKeydown(e){var r;if(e.defaultPrevented)return;const{close:i,keyCode:s}=this.isSubmenuCloseKey(e.code);i&&(e.preventDefault(),(s===o.NavigableKey.LEFT||s===o.NavigableKey.RIGHT)&&e.stopPropagation(),await this.close(),l.deactivateActiveItem(this.menu.items),(r=this.item)==null||r.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){const s=getComputedStyle(this).direction==="rtl"?o.NavigableKey.LEFT:o.NavigableKey.RIGHT;switch(e){case s:case o.SelectionKey.SPACE:case o.SelectionKey.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){const s=getComputedStyle(this).direction==="rtl"?o.NavigableKey.RIGHT:o.NavigableKey.LEFT;switch(e){case s:case o.KeydownCloseKey.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}};t.__decorate([t.n({attribute:"anchor-corner"})],u.prototype,"anchorCorner",void 0);t.__decorate([t.n({attribute:"menu-corner"})],u.prototype,"menuCorner",void 0);t.__decorate([t.n({type:Number,attribute:"hover-open-delay"})],u.prototype,"hoverOpenDelay",void 0);t.__decorate([t.n({type:Number,attribute:"hover-close-delay"})],u.prototype,"hoverCloseDelay",void 0);t.__decorate([t.n({type:Boolean,reflect:!0,attribute:"md-sub-menu"})],u.prototype,"isSubMenu",void 0);t.__decorate([p.o({slot:"item",flatten:!0})],u.prototype,"items",void 0);t.__decorate([p.o({slot:"menu",flatten:!0})],u.prototype,"menus",void 0);/** + */class S extends f.Validator{computeValidity(e){this.radioElement||(this.radioElement=document.createElement("input"),this.radioElement.type="radio",this.radioElement.name="group");let i=!1,t=!1;for(const{checked:r,required:a}of e)a&&(i=!0),r&&(t=!0);return this.radioElement.checked=t,this.radioElement.required=i,{validity:{valueMissing:i&&!t},validationMessage:this.radioElement.validationMessage}}equals(e,i){if(e.length!==i.length)return!1;for(let t=0;t({checked:i,required:t}))}}/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class A{get controls(){const e=this.host.getAttribute("name");return!e||!this.root||!this.host.isConnected?[this.host]:Array.from(this.root.querySelectorAll(`[name="${e}"]`))}constructor(e){this.host=e,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=i=>{const t=i.key==="ArrowDown",r=i.key==="ArrowUp",a=i.key==="ArrowLeft",m=i.key==="ArrowRight";if(!a&&!m&&!t&&!r)return;const c=this.controls;if(!c.length)return;i.preventDefault();const p=getComputedStyle(this.host).direction==="rtl"?a||t:m||t,h=c.indexOf(this.host);let s=p?h+1:h-1;for(;s!==h;){s>=c.length?s=0:s<0&&(s=c.length-1);const n=c[s];if(n.hasAttribute("disabled")){p?s++:s--;continue}for(const d of c)d!==n&&(d.checked=!1,d.tabIndex=-1,d.blur());n.checked=!0,n.tabIndex=0,n.focus(),n.dispatchEvent(new Event("change",{bubbles:!0}));break}}}hostConnected(){this.root=this.host.getRootNode(),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("focusin",this.handleFocusIn),this.host.addEventListener("focusout",this.handleFocusOut),this.host.checked&&this.uncheckSiblings(),this.updateTabIndices()}hostDisconnected(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("focusin",this.handleFocusIn),this.host.removeEventListener("focusout",this.handleFocusOut),this.updateTabIndices(),this.root=null}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(const e of this.controls)e!==this.host&&(e.checked=!1)}updateTabIndices(){const e=this.controls,i=e.find(t=>t.checked);if(i||this.focused){const t=i||this.host;t.tabIndex=0;for(const r of e)r!==t&&(r.tabIndex=-1);return}for(const t of e)t.tabIndex=0}}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */var x;const y=Symbol("checked");let $=0;const L=f.mixinConstraintValidation(k.mixinFormAssociated(b.mixinElementInternals(R.mixinFocusable(o.r))));let u=class extends L{get checked(){return this[y]}set checked(e){const i=this.checked;i!==e&&(this[y]=e,this.requestUpdate("checked",i),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId=`cutout${++$}`,this[x]=!1,this.required=!1,this.value="on",this.selectionController=new A(this),this.addController(this.selectionController),this[b.internals].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e={checked:this.checked};return o.x` + + `}updated(){this[b.internals].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(q.isActivationClick(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==" "||e.defaultPrevented)&&this.click()}[(x=y,k.getFormValue)](){return this.checked?this.value:null}[k.getFormState](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[f.createValidator](){return new S(()=>this.selectionController?this.selectionController.controls:[this])}[f.getValidityAnchor](){return this.container}};o.__decorate([o.n({type:Boolean})],u.prototype,"checked",null);o.__decorate([o.n({type:Boolean})],u.prototype,"required",void 0);o.__decorate([o.n()],u.prototype,"value",void 0);o.__decorate([I.e$1(".container")],u.prototype,"container",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const _=t.i$1`:host{position:relative;display:flex;flex-direction:column} + */const _=o.i$1`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}} `;/** * @license - * Copyright 2023 Google LLC + * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let m=class extends u{};m.styles=[_];m=t.__decorate([t.t$1("md-sub-menu")],m);const S=f.o({react:b,tagName:"md-menu",elementClass:o.MdMenu}),x=f.o({react:b,tagName:"md-menu-item",elementClass:h,events:{"close-menu":"onCloseMenu"}}),M=f.o({react:b,tagName:"md-sub-menu",elementClass:m}),I=a=>v.jsx(S,{...a}),$=a=>v.jsx(M,{...a}),w=a=>v.jsx(x,{...a});exports.Menu=I;exports.MenuItem=w;exports.SubMenu=$; + */let v=class extends u{};v.styles=[_];v=o.__decorate([o.t$1("md-radio")],v);const F=E.o({react:C,tagName:"md-radio",elementClass:v}),T=l=>{const{checked:e,value:i,required:t,disabled:r,name:a,ariaLabel:m,className:c,style:g,id:p,iconColor:h,selectedIconColor:s,iconSize:n,...d}=l;return w.jsx(F,{checked:e,value:i,required:t,disabled:r||!1,name:a,className:c,style:{...g,"--md-radio-icon-color":h||"var(--md-sys-on-surface-variant)","--md-radio-selected-icon-color":s||"var(--md-sys-color-primary)","--md-radio-icon-size":n||"20px"},id:p,"aria-label":m,...d})};exports.Radio=T; diff --git a/dist/react-you-ui15.mjs b/dist/react-you-ui15.mjs index 1c0f00c..f77d91e 100644 --- a/dist/react-you-ui15.mjs +++ b/dist/react-you-ui15.mjs @@ -1,411 +1,274 @@ -import { jsx as E } from "react/jsx-runtime"; -import T from "react"; -import { o as S } from "./create-component-CVXl33PD.mjs"; -import { M as I, s as R, C as M, c as b, a as k, N as l, S as g, b as O, K as x, d as A } from "./menuItemController-CeB921ip.mjs"; -import { r as $, _ as s, n as r, x as d, E as m, c as K, b as w, a as D } from "./class-map-CwiboTfb.mjs"; +import { jsx as x } from "react/jsx-runtime"; +import w from "react"; +import { o as C } from "./create-component-CVXl33PD.mjs"; +import { _ as h, n as y, r as E, x as I, c as R, a as S, b as A } from "./class-map-CwiboTfb.mjs"; import "./ripple-pQcEjR05.mjs"; -import { c as p, g as P, a as L, d as N } from "./item-CpL4zUlE.mjs"; -import { a as F } from "./animation-DjClVFum.mjs"; -import { o as f } from "./query-assigned-elements-DUhez03i.mjs"; -import { n as H } from "./query-assigned-nodes-MKI2zKDb.mjs"; -import { i as C, u as B } from "./static-DdXEOlS4.mjs"; -import { m as _ } from "./delegate-BXi1gVeU.mjs"; -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const G = _($); -class i extends G { - constructor() { - super(...arguments), this.disabled = !1, this.type = "menuitem", this.href = "", this.target = "", this.keepOpen = !1, this.selected = !1, this.menuItemController = new I(this, { - getHeadlineElements: () => this.headlineElements, - getSupportingTextElements: () => this.supportingTextElements, - getDefaultElements: () => this.defaultElements, - getInteractiveElement: () => this.listItemRoot - }); - } - /** - * The text that is selectable via typeahead. If not set, defaults to the - * innerText of the item slotted into the `"headline"` slot. - */ - get typeaheadText() { - return this.menuItemController.typeaheadText; - } - set typeaheadText(e) { - this.menuItemController.setTypeaheadText(e); - } - render() { - return this.renderListItem(d` - -
- ${this.renderRipple()} ${this.renderFocusRing()} -
- - - ${this.renderBody()} -
- `); - } - /** - * Renders the root list item. - * - * @param content the child content of the list item. - */ - renderListItem(e) { - const o = this.type === "link"; - let t; - switch (this.menuItemController.tagName) { - case "a": - t = C`a`; - break; - case "button": - t = C`button`; - break; - default: - case "li": - t = C`li`; - break; - } - const n = o && this.target ? this.target : m; - return B` - <${t} - id="item" - tabindex=${this.disabled && !o ? -1 : 0} - role=${this.menuItemController.role} - aria-label=${this.ariaLabel || m} - aria-selected=${this.ariaSelected || m} - aria-checked=${this.ariaChecked || m} - aria-expanded=${this.ariaExpanded || m} - aria-haspopup=${this.ariaHasPopup || m} - class="list-item ${K(this.getRenderClasses())}" - href=${this.href || m} - target=${n} - @click=${this.menuItemController.onClick} - @keydown=${this.menuItemController.onKeydown} - >${e} - `; - } - /** - * Handles rendering of the ripple element. - */ - renderRipple() { - return d` `; - } - /** - * Handles rendering of the focus ring. - */ - renderFocusRing() { - return d` `; - } - /** - * Classes applied to the list item root. - */ - getRenderClasses() { - return { - disabled: this.disabled, - selected: this.selected - }; - } - /** - * Handles rendering the headline and supporting text. - */ - renderBody() { - return d` - - - - - - `; - } - focus() { - var e; - (e = this.listItemRoot) == null || e.focus(); - } -} -i.shadowRootOptions = { - ...$.shadowRootOptions, - delegatesFocus: !0 -}; -s([ - r({ type: Boolean, reflect: !0 }) -], i.prototype, "disabled", void 0); -s([ - r() -], i.prototype, "type", void 0); -s([ - r() -], i.prototype, "href", void 0); -s([ - r() -], i.prototype, "target", void 0); -s([ - r({ type: Boolean, attribute: "keep-open" }) -], i.prototype, "keepOpen", void 0); -s([ - r({ type: Boolean }) -], i.prototype, "selected", void 0); -s([ - F(".list-item") -], i.prototype, "listItemRoot", void 0); -s([ - f({ slot: "headline" }) -], i.prototype, "headlineElements", void 0); -s([ - f({ slot: "supporting-text" }) -], i.prototype, "supportingTextElements", void 0); -s([ - H({ slot: "" }) -], i.prototype, "defaultElements", void 0); -s([ - r({ attribute: "typeahead-text" }) -], i.prototype, "typeaheadText", null); -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let c = class extends i { -}; -c.styles = [R]; -c = s([ - w("md-menu-item") -], c); +import { a as q } from "./animation-DjClVFum.mjs"; +import { i as L } from "./form-label-activation-ed0HgVsy.mjs"; +import { V as $, m as F, c as z, g as D } from "./validator-DZt1_yHv.mjs"; +import { m as T, i as k } from "./element-internals-3IY9gE4L.mjs"; +import { m as V } from "./focusable-CDJoU7XD.mjs"; +import { m as K, g as M, a as _ } from "./form-associated-CyYeHPMb.mjs"; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let u = class extends $ { - get item() { - return this.items[0] ?? null; - } - get menu() { - return this.menus[0] ?? null; - } - constructor() { - super(), this.anchorCorner = M.START_END, this.menuCorner = M.START_START, this.hoverOpenDelay = 400, this.hoverCloseDelay = 400, this.isSubMenu = !0, this.previousOpenTimeout = 0, this.previousCloseTimeout = 0, this.onMouseenter = () => { - var e; - clearTimeout(this.previousOpenTimeout), clearTimeout(this.previousCloseTimeout), !((e = this.menu) != null && e.open) && (this.hoverOpenDelay ? this.previousOpenTimeout = setTimeout(() => { - this.show(); - }, this.hoverOpenDelay) : this.show()); - }, this.onMouseleave = () => { - clearTimeout(this.previousCloseTimeout), clearTimeout(this.previousOpenTimeout), this.hoverCloseDelay ? this.previousCloseTimeout = setTimeout(() => { - this.close(); - }, this.hoverCloseDelay) : this.close(); - }, this.addEventListener("mouseenter", this.onMouseenter), this.addEventListener("mouseleave", this.onMouseleave); - } - render() { - return d` - - - - - `; - } - firstUpdated() { - this.onSlotchange(); - } - /** - * Shows the submenu. - */ - async show() { - const e = this.menu; - if (!e || e.open) - return; - e.addEventListener("closed", () => { - this.item.ariaExpanded = "false", this.dispatchEvent(b()), this.dispatchEvent(p()), e.ariaHidden = "true"; - }, { once: !0 }), e.positioning === "document" && (e.positioning = "absolute"), e.quick = !0, e.hasOverflow = !0, e.anchorCorner = this.anchorCorner, e.menuCorner = this.menuCorner, e.anchorElement = this.item, e.defaultFocus = "first-item", e.removeAttribute("aria-hidden"), e.skipRestoreFocus = !1; - const o = e.open; - if (e.show(), this.item.ariaExpanded = "true", this.item.ariaHasPopup = "menu", e.id && this.item.setAttribute("aria-controls", e.id), this.dispatchEvent(p()), this.dispatchEvent(k()), this.item.selected = !0, !o) { - let t = (h) => { - }; - const n = new Promise((h) => { - t = h; - }); - e.addEventListener("opened", t, { once: !0 }), await n; - } - } - /** - * Closes the submenu. - */ - async close() { - const e = this.menu; - if (!e || !e.open) - return; - this.dispatchEvent(b()), e.quick = !0, e.close(), this.dispatchEvent(p()); - let o = (n) => { +class B extends $ { + computeValidity(e) { + this.radioElement || (this.radioElement = document.createElement("input"), this.radioElement.type = "radio", this.radioElement.name = "group"); + let i = !1, t = !1; + for (const { checked: o, required: r } of e) + r && (i = !0), o && (t = !0); + return this.radioElement.checked = t, this.radioElement.required = i, { + validity: { + valueMissing: i && !t + }, + validationMessage: this.radioElement.validationMessage }; - const t = new Promise((n) => { - o = n; - }); - e.addEventListener("closed", o, { once: !0 }), await t; } - onSlotchange() { - var o; - if (!this.item) - return; - this.item.ariaExpanded = "false", this.item.ariaHasPopup = "menu", (o = this.menu) != null && o.id && this.item.setAttribute("aria-controls", this.menu.id), this.item.keepOpen = !0; - const e = this.menu; - e && (e.isSubmenu = !0, e.ariaHidden = "true"); - } - onClick() { - this.show(); - } - /** - * On item keydown handles opening the submenu. - */ - async onKeydown(e) { - const o = this.isSubmenuOpenKey(e.code); - if (e.defaultPrevented) - return; - const t = o && (l.LEFT === e.code || l.RIGHT === e.code); - if ((e.code === g.SPACE || t) && (e.preventDefault(), t && e.stopPropagation()), !o) - return; - const n = this.menu; - if (!n) - return; - const h = n.items, v = P(h); - if (v) { - await this.show(), v.tabIndex = 0, v.focus(); - return; - } - } - onCloseSubmenu(e) { - const { itemPath: o, reason: t } = e.detail; - if (o.push(this.item), this.dispatchEvent(b()), t.kind === O.KEYDOWN && t.key === x.ESCAPE) { - e.stopPropagation(), this.item.dispatchEvent(L()); - return; - } - this.dispatchEvent(p()); - } - async onSubMenuKeydown(e) { - var n; - if (e.defaultPrevented) - return; - const { close: o, keyCode: t } = this.isSubmenuCloseKey(e.code); - o && (e.preventDefault(), (t === l.LEFT || t === l.RIGHT) && e.stopPropagation(), await this.close(), N(this.menu.items), (n = this.item) == null || n.focus(), this.item.tabIndex = 0, this.item.focus()); - } - /** - * Determines whether the given KeyboardEvent code is one that should open - * the submenu. This is RTL-aware. By default, left, right, space, or enter. - * - * @param code The native KeyboardEvent code. - * @return Whether or not the key code should open the submenu. - */ - isSubmenuOpenKey(e) { - const t = getComputedStyle(this).direction === "rtl" ? l.LEFT : l.RIGHT; - switch (e) { - case t: - case g.SPACE: - case g.ENTER: - return !0; - default: + equals(e, i) { + if (e.length !== i.length) + return !1; + for (let t = 0; t < e.length; t++) { + const o = e[t], r = i[t]; + if (o.checked !== r.checked || o.required !== r.required) return !1; } + return !0; + } + copy(e) { + return e.map(({ checked: i, required: t }) => ({ + checked: i, + required: t + })); + } +} +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class O { + /** + * All single selection elements in the host element's root with the same + * `name` attribute, including the host element. + */ + get controls() { + const e = this.host.getAttribute("name"); + return !e || !this.root || !this.host.isConnected ? [this.host] : Array.from(this.root.querySelectorAll(`[name="${e}"]`)); + } + constructor(e) { + this.host = e, this.focused = !1, this.root = null, this.handleFocusIn = () => { + this.focused = !0, this.updateTabIndices(); + }, this.handleFocusOut = () => { + this.focused = !1, this.updateTabIndices(); + }, this.handleKeyDown = (i) => { + const t = i.key === "ArrowDown", o = i.key === "ArrowUp", r = i.key === "ArrowLeft", u = i.key === "ArrowRight"; + if (!r && !u && !t && !o) + return; + const a = this.controls; + if (!a.length) + return; + i.preventDefault(); + const p = getComputedStyle(this.host).direction === "rtl" ? r || t : u || t, l = a.indexOf(this.host); + let s = p ? l + 1 : l - 1; + for (; s !== l; ) { + s >= a.length ? s = 0 : s < 0 && (s = a.length - 1); + const c = a[s]; + if (c.hasAttribute("disabled")) { + p ? s++ : s--; + continue; + } + for (const n of a) + n !== c && (n.checked = !1, n.tabIndex = -1, n.blur()); + c.checked = !0, c.tabIndex = 0, c.focus(), c.dispatchEvent(new Event("change", { bubbles: !0 })); + break; + } + }; + } + hostConnected() { + this.root = this.host.getRootNode(), this.host.addEventListener("keydown", this.handleKeyDown), this.host.addEventListener("focusin", this.handleFocusIn), this.host.addEventListener("focusout", this.handleFocusOut), this.host.checked && this.uncheckSiblings(), this.updateTabIndices(); + } + hostDisconnected() { + this.host.removeEventListener("keydown", this.handleKeyDown), this.host.removeEventListener("focusin", this.handleFocusIn), this.host.removeEventListener("focusout", this.handleFocusOut), this.updateTabIndices(), this.root = null; } /** - * Determines whether the given KeyboardEvent code is one that should close - * the submenu. This is RTL-aware. By default right, left, or escape. - * - * @param code The native KeyboardEvent code. - * @return Whether or not the key code should close the submenu. + * Should be called whenever the host's `checked` property changes + * synchronously. */ - isSubmenuCloseKey(e) { - const t = getComputedStyle(this).direction === "rtl" ? l.RIGHT : l.LEFT; - switch (e) { - case t: - case x.ESCAPE: - return { close: !0, keyCode: e }; - default: - return { close: !1 }; + handleCheckedChange() { + this.host.checked && (this.uncheckSiblings(), this.updateTabIndices()); + } + uncheckSiblings() { + for (const e of this.controls) + e !== this.host && (e.checked = !1); + } + /** + * Updates the `tabindex` of the host and its siblings. + */ + updateTabIndices() { + const e = this.controls, i = e.find((t) => t.checked); + if (i || this.focused) { + const t = i || this.host; + t.tabIndex = 0; + for (const o of e) + o !== t && (o.tabIndex = -1); + return; } + for (const t of e) + t.tabIndex = 0; + } +} +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +var g; +const v = Symbol("checked"); +let N = 0; +const U = F(K(T(V(E)))); +let m = class extends U { + /** + * Whether or not the radio is selected. + */ + get checked() { + return this[v]; + } + set checked(e) { + const i = this.checked; + i !== e && (this[v] = e, this.requestUpdate("checked", i), this.selectionController.handleCheckedChange()); + } + constructor() { + super(), this.maskId = `cutout${++N}`, this[g] = !1, this.required = !1, this.value = "on", this.selectionController = new O(this), this.addController(this.selectionController), this[k].role = "radio", this.addEventListener("click", this.handleClick.bind(this)), this.addEventListener("keydown", this.handleKeydown.bind(this)); + } + render() { + const e = { checked: this.checked }; + return I` + + `; + } + updated() { + this[k].ariaChecked = String(this.checked); + } + async handleClick(e) { + this.disabled || (await 0, !e.defaultPrevented && (L(e) && this.focus(), this.checked = !0, this.dispatchEvent(new Event("change", { bubbles: !0 })), this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })))); + } + async handleKeydown(e) { + await 0, !(e.key !== " " || e.defaultPrevented) && this.click(); + } + [(g = v, M)]() { + return this.checked ? this.value : null; + } + [_]() { + return String(this.checked); + } + formResetCallback() { + this.checked = this.hasAttribute("checked"); + } + formStateRestoreCallback(e) { + this.checked = e === "true"; + } + [z]() { + return new B(() => this.selectionController ? this.selectionController.controls : [this]); + } + [D]() { + return this.container; } }; -s([ - r({ attribute: "anchor-corner" }) -], u.prototype, "anchorCorner", void 0); -s([ - r({ attribute: "menu-corner" }) -], u.prototype, "menuCorner", void 0); -s([ - r({ type: Number, attribute: "hover-open-delay" }) -], u.prototype, "hoverOpenDelay", void 0); -s([ - r({ type: Number, attribute: "hover-close-delay" }) -], u.prototype, "hoverCloseDelay", void 0); -s([ - r({ type: Boolean, reflect: !0, attribute: "md-sub-menu" }) -], u.prototype, "isSubMenu", void 0); -s([ - f({ slot: "item", flatten: !0 }) -], u.prototype, "items", void 0); -s([ - f({ slot: "menu", flatten: !0 }) -], u.prototype, "menus", void 0); +h([ + y({ type: Boolean }) +], m.prototype, "checked", null); +h([ + y({ type: Boolean }) +], m.prototype, "required", void 0); +h([ + y() +], m.prototype, "value", void 0); +h([ + q(".container") +], m.prototype, "container", void 0); /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const q = D`:host{position:relative;display:flex;flex-direction:column} +const P = S`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}} `; /** * @license - * Copyright 2023 Google LLC + * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let y = class extends u { +let f = class extends m { +}; +f.styles = [P]; +f = h([ + A("md-radio") +], f); +const j = C({ + react: w, + tagName: "md-radio", + elementClass: f +}), re = (d) => { + const { + checked: e, + value: i, + required: t, + disabled: o, + name: r, + ariaLabel: u, + className: a, + style: b, + id: p, + iconColor: l, + selectedIconColor: s, + iconSize: c, + ...n + } = d; + return /* @__PURE__ */ x( + j, + { + checked: e, + value: i, + required: t, + disabled: o || !1, + name: r, + className: a, + style: { + ...b, + "--md-radio-icon-color": l || "var(--md-sys-on-surface-variant)", + "--md-radio-selected-icon-color": s || "var(--md-sys-color-primary)", + "--md-radio-icon-size": c || "20px" + }, + id: p, + "aria-label": u, + ...n + } + ); }; -y.styles = [q]; -y = s([ - w("md-sub-menu") -], y); -const W = S({ - react: T, - tagName: "md-menu", - elementClass: A -}), j = S({ - react: T, - tagName: "md-menu-item", - elementClass: c, - events: { - "close-menu": "onCloseMenu" - } -}), U = S({ - react: T, - tagName: "md-sub-menu", - elementClass: y -}), le = (a) => /* @__PURE__ */ E( - W, - { - ...a - } -), ue = (a) => /* @__PURE__ */ E( - U, - { - ...a - } -), me = (a) => /* @__PURE__ */ E(j, { ...a }); export { - le as Menu, - me as MenuItem, - ue as SubMenu + re as Radio }; diff --git a/dist/react-you-ui16.js b/dist/react-you-ui16.js index 18725b0..bbcd0fb 100644 --- a/dist/react-you-ui16.js +++ b/dist/react-you-ui16.js @@ -1,79 +1,74 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),E=require("react"),z=require("./create-component-D9KTUrcf.js"),a=require("./class-map-DV5418hw.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const o=require("./animation-A38fZ1oY.js"),A=require("./style-map-Bzw6qQ8K.js"),C=require("./delegate-4958lG3m.js"),u=require("./form-label-activation-CYEOF_US.js"),p=require("./redispatch-event-C93E51ce.js"),$=require("./element-internals-OOm6rgx-.js"),b=require("./form-associated-CxXMoMPu.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),b=require("react"),f=require("./create-component-D9KTUrcf.js"),o=require("./menuItemController-XIsQ9HIe.js"),t=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const l=require("./item-DvSwYnPq.js"),g=require("./animation-A38fZ1oY.js"),p=require("./query-assigned-elements-BYttmtWz.js"),E=require("./query-assigned-nodes-Dl8k4w_-.js"),c=require("./static-B9XIUGOk.js"),C=require("./delegate-4958lG3m.js");/** * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */function _(s){return(e,t)=>o.e(e,t,{async get(){var r;return await this.updateComplete,((r=this.renderRoot)==null?void 0:r.querySelector(s))??null}})}/** - * @license - * Copyright 2024 Google LLC + * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const N=a.i$1`@media(forced-colors: active){:host{--md-slider-active-track-color: CanvasText;--md-slider-disabled-active-track-color: GrayText;--md-slider-disabled-active-track-opacity: 1;--md-slider-disabled-handle-color: GrayText;--md-slider-disabled-inactive-track-color: GrayText;--md-slider-disabled-inactive-track-opacity: 1;--md-slider-focus-handle-color: CanvasText;--md-slider-handle-color: CanvasText;--md-slider-handle-shadow-color: Canvas;--md-slider-hover-handle-color: CanvasText;--md-slider-hover-state-layer-color: Canvas;--md-slider-hover-state-layer-opacity: 1;--md-slider-inactive-track-color: Canvas;--md-slider-label-container-color: Canvas;--md-slider-label-text-color: CanvasText;--md-slider-pressed-handle-color: CanvasText;--md-slider-pressed-state-layer-color: Canvas;--md-slider-pressed-state-layer-opacity: 1;--md-slider-with-overlap-handle-outline-color: CanvasText}.label,.label::before{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}:host(:not([disabled])) .track::before{border:1px solid var(--_active-track-color)}.tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='CanvasText'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}.tickmarks::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}:host([disabled]) .tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}} -`;/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */function v(s,e,t){return s?e(s):t==null?void 0:t(s)}/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const T=C.mixinDelegatesAria(b.mixinFormAssociated($.mixinElementInternals(a.r)));let i=class extends T{get nameStart(){return this.getAttribute("name-start")??this.name}set nameStart(e){this.setAttribute("name-start",e)}get nameEnd(){return this.getAttribute("name-end")??this.nameStart}set nameEnd(e){this.setAttribute("name-end",e)}get renderAriaLabelStart(){const{ariaLabel:e}=this;return this.ariaLabelStart||e&&`${e} start`||this.valueLabelStart||String(this.valueStart)}get renderAriaValueTextStart(){return this.ariaValueTextStart||this.valueLabelStart||String(this.valueStart)}get renderAriaLabelEnd(){const{ariaLabel:e}=this;return this.range?this.ariaLabelEnd||e&&`${e} end`||this.valueLabelEnd||String(this.valueEnd):e||this.valueLabel||String(this.value)}get renderAriaValueTextEnd(){if(this.range)return this.ariaValueTextEnd||this.valueLabelEnd||String(this.valueEnd);const{ariaValueText:e}=this;return e||this.valueLabel||String(this.value)}constructor(){super(),this.min=0,this.max=100,this.valueLabel="",this.valueLabelStart="",this.valueLabelEnd="",this.ariaLabelStart="",this.ariaValueTextStart="",this.ariaLabelEnd="",this.ariaValueTextEnd="",this.step=1,this.ticks=!1,this.labeled=!1,this.range=!1,this.handleStartHover=!1,this.handleEndHover=!1,this.startOnTop=!1,this.handlesOverlapping=!1,this.ripplePointerId=1,this.isRedispatchingEvent=!1,this.addEventListener("click",e=>{!u.isActivationClick(e)||!this.inputEnd||(this.focus(),u.dispatchActivationClick(this.inputEnd))})}focus(){var e;(e=this.inputEnd)==null||e.focus()}willUpdate(e){var r,n;this.renderValueStart=e.has("valueStart")?this.valueStart:(r=this.inputStart)==null?void 0:r.valueAsNumber;const t=e.has("valueEnd")&&this.range||e.has("value");this.renderValueEnd=t?this.range?this.valueEnd:this.value:(n=this.inputEnd)==null?void 0:n.valueAsNumber,e.get("handleStartHover")!==void 0?this.toggleRippleHover(this.rippleStart,this.handleStartHover):e.get("handleEndHover")!==void 0&&this.toggleRippleHover(this.rippleEnd,this.handleEndHover)}updated(e){var t,r;if(this.range&&(this.renderValueStart=this.inputStart.valueAsNumber),this.renderValueEnd=this.inputEnd.valueAsNumber,this.range){const n=(this.max-this.min)/3;if(this.valueStart===void 0){this.inputStart.valueAsNumber=this.min+n;const l=this.inputStart.valueAsNumber;this.valueStart=this.renderValueStart=l}if(this.valueEnd===void 0){this.inputEnd.valueAsNumber=this.min+2*n;const l=this.inputEnd.valueAsNumber;this.valueEnd=this.renderValueEnd=l}}else this.value??(this.value=this.renderValueEnd);if(e.has("range")||e.has("renderValueStart")||e.has("renderValueEnd")||this.isUpdatePending){const n=(t=this.handleStart)==null?void 0:t.querySelector(".handleNub"),l=(r=this.handleEnd)==null?void 0:r.querySelector(".handleNub");this.handlesOverlapping=L(n,l)}this.performUpdate()}render(){const e=this.step===0?1:this.step,t=Math.max(this.max-this.min,e),r=this.range?((this.renderValueStart??this.min)-this.min)/t:0,n=((this.renderValueEnd??this.min)-this.min)/t,l={"--_start-fraction":String(r),"--_end-fraction":String(n),"--_tick-count":String(t/e)},d={ranged:this.range},h=this.valueLabelStart||String(this.renderValueStart),g=(this.range?this.valueLabelEnd:this.valueLabel)||String(this.renderValueEnd),f={start:!0,value:this.renderValueStart,ariaLabel:this.renderAriaLabelStart,ariaValueText:this.renderAriaValueTextStart,ariaMin:this.min,ariaMax:this.valueEnd??this.max},k={start:!1,value:this.renderValueEnd,ariaLabel:this.renderAriaLabelEnd,ariaValueText:this.renderAriaValueTextEnd,ariaMin:this.range?this.valueStart??this.min:this.min,ariaMax:this.max},y={start:!0,hover:this.handleStartHover,label:h},x={start:!1,hover:this.handleEndHover,label:g},w={hover:this.handleStartHover||this.handleEndHover};return a.x`
- ${v(this.range,()=>this.renderInput(f))} - ${this.renderInput(k)} ${this.renderTrack()} -
-
-
- ${v(this.range,()=>this.renderHandle(y))} - ${this.renderHandle(x)} -
+ */const T=C.mixinDelegatesAria(t.r);class n extends T{constructor(){super(...arguments),this.disabled=!1,this.type="menuitem",this.href="",this.target="",this.keepOpen=!1,this.selected=!1,this.menuItemController=new o.MenuItemController(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.menuItemController.typeaheadText}set typeaheadText(e){this.menuItemController.setTypeaheadText(e)}render(){return this.renderListItem(t.x` + +
+ ${this.renderRipple()} ${this.renderFocusRing()}
-
-
`}renderTrack(){return a.x` -
- ${this.ticks?a.x`
`:a.E} - `}renderLabel(e){return a.x``}renderHandle({start:e,hover:t,label:r}){const n=!this.disabled&&e===this.startOnTop,l=!this.disabled&&this.handlesOverlapping,d=e?"start":"end";return a.x`
- - -
- -
- ${v(this.labeled,()=>this.renderLabel(r))} -
`}renderInput({start:e,value:t,ariaLabel:r,ariaValueText:n,ariaMin:l,ariaMax:d}){const h=e?"start":"end";return a.x``}async toggleRippleHover(e,t){const r=await e;r&&(t?r.handlePointerenter(new PointerEvent("pointerenter",{isPrimary:!0,pointerId:this.ripplePointerId})):r.handlePointerleave(new PointerEvent("pointerleave",{isPrimary:!0,pointerId:this.ripplePointerId})))}handleFocus(e){this.updateOnTop(e.target)}startAction(e){const t=e.target,r=t===this.inputStart?this.inputEnd:this.inputStart;this.action={canFlip:e.type==="pointerdown",flipped:!1,target:t,fixed:r,values:new Map([[t,t.valueAsNumber],[r,r==null?void 0:r.valueAsNumber]])}}finishAction(e){this.action=void 0}handleKeydown(e){this.startAction(e)}handleKeyup(e){this.finishAction(e)}handleDown(e){this.startAction(e),this.ripplePointerId=e.pointerId;const t=e.target===this.inputStart;this.handleStartHover=!this.disabled&&t&&!!this.handleStart,this.handleEndHover=!this.disabled&&!t&&!!this.handleEnd}async handleUp(e){if(!this.action)return;const{target:t,values:r,flipped:n}=this.action;await new Promise(requestAnimationFrame),t!==void 0&&(t.focus(),n&&t.valueAsNumber!==r.get(t)&&t.dispatchEvent(new Event("change",{bubbles:!0}))),this.finishAction(e)}handleMove(e){this.handleStartHover=!this.disabled&&m(e,this.handleStart),this.handleEndHover=!this.disabled&&m(e,this.handleEnd)}handleEnter(e){this.handleMove(e)}handleLeave(){this.handleStartHover=!1,this.handleEndHover=!1}updateOnTop(e){this.startOnTop=e.classList.contains("start")}needsClamping(){if(!this.action)return!1;const{target:e,fixed:t}=this.action;return e===this.inputStart?e.valueAsNumber>t.valueAsNumber:e.valueAsNumber=n&&s<=d&&e>=r&&e<=l}function L(s,e){if(!(s&&e))return!1;const t=s.getBoundingClientRect(),r=e.getBoundingClientRect();return!(t.top>r.bottom||t.rightr.right)}/** + + + ${this.renderBody()} + + `)}renderListItem(e){const i=this.type==="link";let s;switch(this.menuItemController.tagName){case"a":s=c.i`a`;break;case"button":s=c.i`button`;break;default:case"li":s=c.i`li`;break}const r=i&&this.target?this.target:t.E;return c.u` + <${s} + id="item" + tabindex=${this.disabled&&!i?-1:0} + role=${this.menuItemController.role} + aria-label=${this.ariaLabel||t.E} + aria-selected=${this.ariaSelected||t.E} + aria-checked=${this.ariaChecked||t.E} + aria-expanded=${this.ariaExpanded||t.E} + aria-haspopup=${this.ariaHasPopup||t.E} + class="list-item ${t.e$1(this.getRenderClasses())}" + href=${this.href||t.E} + target=${r} + @click=${this.menuItemController.onClick} + @keydown=${this.menuItemController.onKeydown} + >${e} + `}renderRipple(){return t.x` `}renderFocusRing(){return t.x` `}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return t.x` + + + + + + `}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}n.shadowRootOptions={...t.r.shadowRootOptions,delegatesFocus:!0};t.__decorate([t.n({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0);t.__decorate([t.n()],n.prototype,"type",void 0);t.__decorate([t.n()],n.prototype,"href",void 0);t.__decorate([t.n()],n.prototype,"target",void 0);t.__decorate([t.n({type:Boolean,attribute:"keep-open"})],n.prototype,"keepOpen",void 0);t.__decorate([t.n({type:Boolean})],n.prototype,"selected",void 0);t.__decorate([g.e$1(".list-item")],n.prototype,"listItemRoot",void 0);t.__decorate([p.o({slot:"headline"})],n.prototype,"headlineElements",void 0);t.__decorate([p.o({slot:"supporting-text"})],n.prototype,"supportingTextElements",void 0);t.__decorate([E.n({slot:""})],n.prototype,"defaultElements",void 0);t.__decorate([t.n({attribute:"typeahead-text"})],n.prototype,"typeaheadText",null);/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let h=class extends n{};h.styles=[o.styles];h=t.__decorate([t.t$1("md-menu-item")],h);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let u=class extends t.r{get item(){return this.items[0]??null}get menu(){return this.menus[0]??null}constructor(){super(),this.anchorCorner=o.Corner.START_END,this.menuCorner=o.Corner.START_START,this.hoverOpenDelay=400,this.hoverCloseDelay=400,this.isSubMenu=!0,this.previousOpenTimeout=0,this.previousCloseTimeout=0,this.onMouseenter=()=>{var e;clearTimeout(this.previousOpenTimeout),clearTimeout(this.previousCloseTimeout),!((e=this.menu)!=null&&e.open)&&(this.hoverOpenDelay?this.previousOpenTimeout=setTimeout(()=>{this.show()},this.hoverOpenDelay):this.show())},this.onMouseleave=()=>{clearTimeout(this.previousCloseTimeout),clearTimeout(this.previousOpenTimeout),this.hoverCloseDelay?this.previousCloseTimeout=setTimeout(()=>{this.close()},this.hoverCloseDelay):this.close()},this.addEventListener("mouseenter",this.onMouseenter),this.addEventListener("mouseleave",this.onMouseleave)}render(){return t.x` + + + + + `}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(o.createActivateTypeaheadEvent()),this.dispatchEvent(l.createDeactivateItemsEvent()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const i=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(l.createDeactivateItemsEvent()),this.dispatchEvent(o.createDeactivateTypeaheadEvent()),this.item.selected=!0,!i){let s=d=>{};const r=new Promise(d=>{s=d});e.addEventListener("opened",s,{once:!0}),await r}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(o.createActivateTypeaheadEvent()),e.quick=!0,e.close(),this.dispatchEvent(l.createDeactivateItemsEvent());let i=r=>{};const s=new Promise(r=>{i=r});e.addEventListener("closed",i,{once:!0}),await s}onSlotchange(){var i;if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",(i=this.menu)!=null&&i.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const i=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const s=i&&(o.NavigableKey.LEFT===e.code||o.NavigableKey.RIGHT===e.code);if((e.code===o.SelectionKey.SPACE||s)&&(e.preventDefault(),s&&e.stopPropagation()),!i)return;const r=this.menu;if(!r)return;const d=r.items,y=l.getFirstActivatableItem(d);if(y){await this.show(),y.tabIndex=0,y.focus();return}}onCloseSubmenu(e){const{itemPath:i,reason:s}=e.detail;if(i.push(this.item),this.dispatchEvent(o.createActivateTypeaheadEvent()),s.kind===o.CloseReason.KEYDOWN&&s.key===o.KeydownCloseKey.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(l.createRequestActivationEvent());return}this.dispatchEvent(l.createDeactivateItemsEvent())}async onSubMenuKeydown(e){var r;if(e.defaultPrevented)return;const{close:i,keyCode:s}=this.isSubmenuCloseKey(e.code);i&&(e.preventDefault(),(s===o.NavigableKey.LEFT||s===o.NavigableKey.RIGHT)&&e.stopPropagation(),await this.close(),l.deactivateActiveItem(this.menu.items),(r=this.item)==null||r.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){const s=getComputedStyle(this).direction==="rtl"?o.NavigableKey.LEFT:o.NavigableKey.RIGHT;switch(e){case s:case o.SelectionKey.SPACE:case o.SelectionKey.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){const s=getComputedStyle(this).direction==="rtl"?o.NavigableKey.RIGHT:o.NavigableKey.LEFT;switch(e){case s:case o.KeydownCloseKey.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}};t.__decorate([t.n({attribute:"anchor-corner"})],u.prototype,"anchorCorner",void 0);t.__decorate([t.n({attribute:"menu-corner"})],u.prototype,"menuCorner",void 0);t.__decorate([t.n({type:Number,attribute:"hover-open-delay"})],u.prototype,"hoverOpenDelay",void 0);t.__decorate([t.n({type:Number,attribute:"hover-close-delay"})],u.prototype,"hoverCloseDelay",void 0);t.__decorate([t.n({type:Boolean,reflect:!0,attribute:"md-sub-menu"})],u.prototype,"isSubMenu",void 0);t.__decorate([p.o({slot:"item",flatten:!0})],u.prototype,"items",void 0);t.__decorate([p.o({slot:"menu",flatten:!0})],u.prototype,"menus",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const V=a.i$1`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)} + */const _=t.i$1`:host{position:relative;display:flex;flex-direction:column} `;/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let c=class extends i{};c.styles=[V,N];c=a.__decorate([a.t$1("md-slider")],c);const P=z.o({react:E,elementClass:c,tagName:"md-slider"}),H=({className:s,id:e,style:t,...r})=>S.jsx(P,{className:s,id:e,style:t,...r});exports.Slider=H; + */let m=class extends u{};m.styles=[_];m=t.__decorate([t.t$1("md-sub-menu")],m);const S=f.o({react:b,tagName:"md-menu",elementClass:o.MdMenu}),x=f.o({react:b,tagName:"md-menu-item",elementClass:h,events:{"close-menu":"onCloseMenu"}}),M=f.o({react:b,tagName:"md-sub-menu",elementClass:m}),I=a=>v.jsx(S,{...a}),$=a=>v.jsx(M,{...a}),w=a=>v.jsx(x,{...a});exports.Menu=I;exports.MenuItem=w;exports.SubMenu=$; diff --git a/dist/react-you-ui16.mjs b/dist/react-you-ui16.mjs index f732d86..1c0f00c 100644 --- a/dist/react-you-ui16.mjs +++ b/dist/react-you-ui16.mjs @@ -1,515 +1,411 @@ -import { jsx as N } from "react/jsx-runtime"; -import $ from "react"; -import { o as T } from "./create-component-CVXl33PD.mjs"; -import { a as _, r as y, _ as i, n as s, x as c, c as v, E as f, b as L } from "./class-map-CwiboTfb.mjs"; -import "./elevation-Dg8ssDJC.mjs"; +import { jsx as E } from "react/jsx-runtime"; +import T from "react"; +import { o as S } from "./create-component-CVXl33PD.mjs"; +import { M as I, s as R, C as M, c as b, a as k, N as l, S as g, b as O, K as x, d as A } from "./menuItemController-CeB921ip.mjs"; +import { r as $, _ as s, n as r, x as d, E as m, c as K, b as w, a as D } from "./class-map-CwiboTfb.mjs"; import "./ripple-pQcEjR05.mjs"; -import { e as V, a as u, r as h } from "./animation-DjClVFum.mjs"; -import { o as P } from "./style-map-CdUj7GnE.mjs"; -import { m as H } from "./delegate-BXi1gVeU.mjs"; -import { i as O, d as R } from "./form-label-activation-ed0HgVsy.mjs"; -import { r as g } from "./redispatch-event-taWUbWUt.mjs"; -import { m as F } from "./element-internals-3IY9gE4L.mjs"; -import { m as I, g as M } from "./form-associated-CyYeHPMb.mjs"; +import { c as p, g as P, a as L, d as N } from "./item-CpL4zUlE.mjs"; +import { a as F } from "./animation-DjClVFum.mjs"; +import { o as f } from "./query-assigned-elements-DUhez03i.mjs"; +import { n as H } from "./query-assigned-nodes-MKI2zKDb.mjs"; +import { i as C, u as B } from "./static-DdXEOlS4.mjs"; +import { m as _ } from "./delegate-BXi1gVeU.mjs"; /** * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -function w(l) { - return (e, a) => V(e, a, { async get() { - var t; - return await this.updateComplete, ((t = this.renderRoot) == null ? void 0 : t.querySelector(l)) ?? null; - } }); -} -/** - * @license - * Copyright 2024 Google LLC + * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const B = _`@media(forced-colors: active){:host{--md-slider-active-track-color: CanvasText;--md-slider-disabled-active-track-color: GrayText;--md-slider-disabled-active-track-opacity: 1;--md-slider-disabled-handle-color: GrayText;--md-slider-disabled-inactive-track-color: GrayText;--md-slider-disabled-inactive-track-opacity: 1;--md-slider-focus-handle-color: CanvasText;--md-slider-handle-color: CanvasText;--md-slider-handle-shadow-color: Canvas;--md-slider-hover-handle-color: CanvasText;--md-slider-hover-state-layer-color: Canvas;--md-slider-hover-state-layer-opacity: 1;--md-slider-inactive-track-color: Canvas;--md-slider-label-container-color: Canvas;--md-slider-label-text-color: CanvasText;--md-slider-pressed-handle-color: CanvasText;--md-slider-pressed-state-layer-color: Canvas;--md-slider-pressed-state-layer-opacity: 1;--md-slider-with-overlap-handle-outline-color: CanvasText}.label,.label::before{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}:host(:not([disabled])) .track::before{border:1px solid var(--_active-track-color)}.tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='CanvasText'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}.tickmarks::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}:host([disabled]) .tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}} -`; -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -function b(l, e, a) { - return l ? e(l) : a == null ? void 0 : a(l); -} -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const q = H(I(F(y))); -let r = class extends q { - /** - * The HTML name to use in form submission for a range slider's starting - * value. Use `name` instead if both the start and end values should use the - * same name. - */ - get nameStart() { - return this.getAttribute("name-start") ?? this.name; - } - set nameStart(e) { - this.setAttribute("name-start", e); - } - /** - * The HTML name to use in form submission for a range slider's ending value. - * Use `name` instead if both the start and end values should use the same - * name. - */ - get nameEnd() { - return this.getAttribute("name-end") ?? this.nameStart; - } - set nameEnd(e) { - this.setAttribute("name-end", e); - } - // Note: start aria-* properties are only applied when range=true, which is - // why they do not need to handle both cases. - get renderAriaLabelStart() { - const { ariaLabel: e } = this; - return this.ariaLabelStart || e && `${e} start` || this.valueLabelStart || String(this.valueStart); - } - get renderAriaValueTextStart() { - return this.ariaValueTextStart || this.valueLabelStart || String(this.valueStart); - } - // Note: end aria-* properties are applied for single and range sliders, which - // is why it needs to handle `this.range` (while start aria-* properties do - // not). - get renderAriaLabelEnd() { - const { ariaLabel: e } = this; - return this.range ? this.ariaLabelEnd || e && `${e} end` || this.valueLabelEnd || String(this.valueEnd) : e || this.valueLabel || String(this.value); - } - get renderAriaValueTextEnd() { - if (this.range) - return this.ariaValueTextEnd || this.valueLabelEnd || String(this.valueEnd); - const { ariaValueText: e } = this; - return e || this.valueLabel || String(this.value); - } +const G = _($); +class i extends G { constructor() { - super(), this.min = 0, this.max = 100, this.valueLabel = "", this.valueLabelStart = "", this.valueLabelEnd = "", this.ariaLabelStart = "", this.ariaValueTextStart = "", this.ariaLabelEnd = "", this.ariaValueTextEnd = "", this.step = 1, this.ticks = !1, this.labeled = !1, this.range = !1, this.handleStartHover = !1, this.handleEndHover = !1, this.startOnTop = !1, this.handlesOverlapping = !1, this.ripplePointerId = 1, this.isRedispatchingEvent = !1, this.addEventListener("click", (e) => { - !O(e) || !this.inputEnd || (this.focus(), R(this.inputEnd)); + super(...arguments), this.disabled = !1, this.type = "menuitem", this.href = "", this.target = "", this.keepOpen = !1, this.selected = !1, this.menuItemController = new I(this, { + getHeadlineElements: () => this.headlineElements, + getSupportingTextElements: () => this.supportingTextElements, + getDefaultElements: () => this.defaultElements, + getInteractiveElement: () => this.listItemRoot }); } + /** + * The text that is selectable via typeahead. If not set, defaults to the + * innerText of the item slotted into the `"headline"` slot. + */ + get typeaheadText() { + return this.menuItemController.typeaheadText; + } + set typeaheadText(e) { + this.menuItemController.setTypeaheadText(e); + } + render() { + return this.renderListItem(d` + +
+ ${this.renderRipple()} ${this.renderFocusRing()} +
+ + + ${this.renderBody()} +
+ `); + } + /** + * Renders the root list item. + * + * @param content the child content of the list item. + */ + renderListItem(e) { + const o = this.type === "link"; + let t; + switch (this.menuItemController.tagName) { + case "a": + t = C`a`; + break; + case "button": + t = C`button`; + break; + default: + case "li": + t = C`li`; + break; + } + const n = o && this.target ? this.target : m; + return B` + <${t} + id="item" + tabindex=${this.disabled && !o ? -1 : 0} + role=${this.menuItemController.role} + aria-label=${this.ariaLabel || m} + aria-selected=${this.ariaSelected || m} + aria-checked=${this.ariaChecked || m} + aria-expanded=${this.ariaExpanded || m} + aria-haspopup=${this.ariaHasPopup || m} + class="list-item ${K(this.getRenderClasses())}" + href=${this.href || m} + target=${n} + @click=${this.menuItemController.onClick} + @keydown=${this.menuItemController.onKeydown} + >${e} + `; + } + /** + * Handles rendering of the ripple element. + */ + renderRipple() { + return d` `; + } + /** + * Handles rendering of the focus ring. + */ + renderFocusRing() { + return d` `; + } + /** + * Classes applied to the list item root. + */ + getRenderClasses() { + return { + disabled: this.disabled, + selected: this.selected + }; + } + /** + * Handles rendering the headline and supporting text. + */ + renderBody() { + return d` + + + + + + `; + } focus() { var e; - (e = this.inputEnd) == null || e.focus(); + (e = this.listItemRoot) == null || e.focus(); } - willUpdate(e) { - var t, n; - this.renderValueStart = e.has("valueStart") ? this.valueStart : (t = this.inputStart) == null ? void 0 : t.valueAsNumber; - const a = e.has("valueEnd") && this.range || e.has("value"); - this.renderValueEnd = a ? this.range ? this.valueEnd : this.value : (n = this.inputEnd) == null ? void 0 : n.valueAsNumber, e.get("handleStartHover") !== void 0 ? this.toggleRippleHover(this.rippleStart, this.handleStartHover) : e.get("handleEndHover") !== void 0 && this.toggleRippleHover(this.rippleEnd, this.handleEndHover); - } - updated(e) { - var a, t; - if (this.range && (this.renderValueStart = this.inputStart.valueAsNumber), this.renderValueEnd = this.inputEnd.valueAsNumber, this.range) { - const n = (this.max - this.min) / 3; - if (this.valueStart === void 0) { - this.inputStart.valueAsNumber = this.min + n; - const o = this.inputStart.valueAsNumber; - this.valueStart = this.renderValueStart = o; - } - if (this.valueEnd === void 0) { - this.inputEnd.valueAsNumber = this.min + 2 * n; - const o = this.inputEnd.valueAsNumber; - this.valueEnd = this.renderValueEnd = o; - } - } else - this.value ?? (this.value = this.renderValueEnd); - if (e.has("range") || e.has("renderValueStart") || e.has("renderValueEnd") || this.isUpdatePending) { - const n = (a = this.handleStart) == null ? void 0 : a.querySelector(".handleNub"), o = (t = this.handleEnd) == null ? void 0 : t.querySelector(".handleNub"); - this.handlesOverlapping = U(n, o); - } - this.performUpdate(); - } - render() { - const e = this.step === 0 ? 1 : this.step, a = Math.max(this.max - this.min, e), t = this.range ? ((this.renderValueStart ?? this.min) - this.min) / a : 0, n = ((this.renderValueEnd ?? this.min) - this.min) / a, o = { - // for clipping inputs and active track. - "--_start-fraction": String(t), - "--_end-fraction": String(n), - // for generating tick marks - "--_tick-count": String(a / e) - }, d = { ranged: this.range }, m = this.valueLabelStart || String(this.renderValueStart), x = (this.range ? this.valueLabelEnd : this.valueLabel) || String(this.renderValueEnd), S = { - start: !0, - value: this.renderValueStart, - ariaLabel: this.renderAriaLabelStart, - ariaValueText: this.renderAriaValueTextStart, - ariaMin: this.min, - ariaMax: this.valueEnd ?? this.max - }, E = { - start: !1, - value: this.renderValueEnd, - ariaLabel: this.renderAriaLabelEnd, - ariaValueText: this.renderAriaValueTextEnd, - ariaMin: this.range ? this.valueStart ?? this.min : this.min, - ariaMax: this.max - }, z = { - start: !0, - hover: this.handleStartHover, - label: m - }, A = { - start: !1, - hover: this.handleEndHover, - label: x - }, C = { - hover: this.handleStartHover || this.handleEndHover - }; - return c`
- ${b(this.range, () => this.renderInput(S))} - ${this.renderInput(E)} ${this.renderTrack()} -
-
-
- ${b(this.range, () => this.renderHandle(z))} - ${this.renderHandle(A)} -
-
-
-
`; - } - renderTrack() { - return c` -
- ${this.ticks ? c`
` : f} - `; - } - renderLabel(e) { - return c``; - } - renderHandle({ start: e, hover: a, label: t }) { - const n = !this.disabled && e === this.startOnTop, o = !this.disabled && this.handlesOverlapping, d = e ? "start" : "end"; - return c`
- - -
- -
- ${b(this.labeled, () => this.renderLabel(t))} -
`; - } - renderInput({ start: e, value: a, ariaLabel: t, ariaValueText: n, ariaMin: o, ariaMax: d }) { - const m = e ? "start" : "end"; - return c``; - } - async toggleRippleHover(e, a) { - const t = await e; - t && (a ? t.handlePointerenter(new PointerEvent("pointerenter", { - isPrimary: !0, - pointerId: this.ripplePointerId - })) : t.handlePointerleave(new PointerEvent("pointerleave", { - isPrimary: !0, - pointerId: this.ripplePointerId - }))); - } - handleFocus(e) { - this.updateOnTop(e.target); - } - startAction(e) { - const a = e.target, t = a === this.inputStart ? this.inputEnd : this.inputStart; - this.action = { - canFlip: e.type === "pointerdown", - flipped: !1, - target: a, - fixed: t, - values: /* @__PURE__ */ new Map([ - [a, a.valueAsNumber], - [t, t == null ? void 0 : t.valueAsNumber] - ]) - }; - } - finishAction(e) { - this.action = void 0; - } - handleKeydown(e) { - this.startAction(e); - } - handleKeyup(e) { - this.finishAction(e); - } - handleDown(e) { - this.startAction(e), this.ripplePointerId = e.pointerId; - const a = e.target === this.inputStart; - this.handleStartHover = !this.disabled && a && !!this.handleStart, this.handleEndHover = !this.disabled && !a && !!this.handleEnd; - } - async handleUp(e) { - if (!this.action) - return; - const { target: a, values: t, flipped: n } = this.action; - await new Promise(requestAnimationFrame), a !== void 0 && (a.focus(), n && a.valueAsNumber !== t.get(a) && a.dispatchEvent(new Event("change", { bubbles: !0 }))), this.finishAction(e); - } - /** - * The move handler tracks handle hovering to facilitate proper ripple - * behavior on the slider handle. This is needed because user interaction with - * the native input is leveraged to position the handle. Because the separate - * displayed handle element has pointer events disabled (to allow interaction - * with the input) and the input's handle is a pseudo-element, neither can be - * the ripple's interactive element. Therefore the input is the ripple's - * interactive element and has a `ripple` directive; however the ripple - * is gated on the handle being hovered. In addition, because the ripple - * hover state is being specially handled, it must be triggered independent - * of the directive. This is done based on the hover state when the - * slider is updated. - */ - handleMove(e) { - this.handleStartHover = !this.disabled && k(e, this.handleStart), this.handleEndHover = !this.disabled && k(e, this.handleEnd); - } - handleEnter(e) { - this.handleMove(e); - } - handleLeave() { - this.handleStartHover = !1, this.handleEndHover = !1; - } - updateOnTop(e) { - this.startOnTop = e.classList.contains("start"); - } - needsClamping() { - if (!this.action) - return !1; - const { target: e, fixed: a } = this.action; - return e === this.inputStart ? e.valueAsNumber > a.valueAsNumber : e.valueAsNumber < a.valueAsNumber; - } - // if start/end start coincident and the first drag input would e.g. move - // start > end, avoid clamping and "flip" to use the other input - // as the action target. - isActionFlipped() { - const { action: e } = this; - if (!e) - return !1; - const { target: a, fixed: t, values: n } = e; - return e.canFlip && n.get(a) === n.get(t) && this.needsClamping() && (e.canFlip = !1, e.flipped = !0, e.target = t, e.fixed = a), e.flipped; - } - // when flipped, apply the drag input to the flipped target and reset - // the actual target. - flipAction() { - if (!this.action) - return !1; - const { target: e, fixed: a, values: t } = this.action, n = e.valueAsNumber !== a.valueAsNumber; - return e.valueAsNumber = a.valueAsNumber, a.valueAsNumber = t.get(a), n; - } - // clamp such that start does not move beyond end and visa versa. - clampAction() { - if (!this.needsClamping() || !this.action) - return !1; - const { target: e, fixed: a } = this.action; - return e.valueAsNumber = a.valueAsNumber, !0; - } - handleInput(e) { - if (this.isRedispatchingEvent) - return; - let a = !1, t = !1; - this.range && (this.isActionFlipped() && (a = !0, t = this.flipAction()), this.clampAction() && (a = !0, t = !1)); - const n = e.target; - this.updateOnTop(n), this.range ? (this.valueStart = this.inputStart.valueAsNumber, this.valueEnd = this.inputEnd.valueAsNumber) : this.value = this.inputEnd.valueAsNumber, a && e.stopPropagation(), t && (this.isRedispatchingEvent = !0, g(n, e), this.isRedispatchingEvent = !1); - } - handleChange(e) { - const a = e.target, { target: t, values: n } = this.action ?? {}; - t && t.valueAsNumber === n.get(a) || g(this, e), this.finishAction(e); - } - [M]() { - if (this.range) { - const e = new FormData(); - return e.append(this.nameStart, String(this.valueStart)), e.append(this.nameEnd, String(this.valueEnd)), e; - } - return String(this.value); - } - formResetCallback() { - if (this.range) { - const a = this.getAttribute("value-start"); - this.valueStart = a !== null ? Number(a) : void 0; - const t = this.getAttribute("value-end"); - this.valueEnd = t !== null ? Number(t) : void 0; - return; - } - const e = this.getAttribute("value"); - this.value = e !== null ? Number(e) : void 0; - } - formStateRestoreCallback(e) { - if (Array.isArray(e)) { - const [[, a], [, t]] = e; - this.valueStart = Number(a), this.valueEnd = Number(t), this.range = !0; - return; - } - this.value = Number(e), this.range = !1; - } -}; -r.shadowRootOptions = { - ...y.shadowRootOptions, +} +i.shadowRootOptions = { + ...$.shadowRootOptions, delegatesFocus: !0 }; -i([ - s({ type: Number }) -], r.prototype, "min", void 0); -i([ - s({ type: Number }) -], r.prototype, "max", void 0); -i([ - s({ type: Number }) -], r.prototype, "value", void 0); -i([ - s({ type: Number, attribute: "value-start" }) -], r.prototype, "valueStart", void 0); -i([ - s({ type: Number, attribute: "value-end" }) -], r.prototype, "valueEnd", void 0); -i([ - s({ attribute: "value-label" }) -], r.prototype, "valueLabel", void 0); -i([ - s({ attribute: "value-label-start" }) -], r.prototype, "valueLabelStart", void 0); -i([ - s({ attribute: "value-label-end" }) -], r.prototype, "valueLabelEnd", void 0); -i([ - s({ attribute: "aria-label-start" }) -], r.prototype, "ariaLabelStart", void 0); -i([ - s({ attribute: "aria-valuetext-start" }) -], r.prototype, "ariaValueTextStart", void 0); -i([ - s({ attribute: "aria-label-end" }) -], r.prototype, "ariaLabelEnd", void 0); -i([ - s({ attribute: "aria-valuetext-end" }) -], r.prototype, "ariaValueTextEnd", void 0); -i([ - s({ type: Number }) -], r.prototype, "step", void 0); -i([ - s({ type: Boolean }) -], r.prototype, "ticks", void 0); -i([ - s({ type: Boolean }) -], r.prototype, "labeled", void 0); -i([ - s({ type: Boolean }) -], r.prototype, "range", void 0); -i([ - u("input.start") -], r.prototype, "inputStart", void 0); -i([ - u(".handle.start") -], r.prototype, "handleStart", void 0); -i([ - w("md-ripple.start") -], r.prototype, "rippleStart", void 0); -i([ - u("input.end") -], r.prototype, "inputEnd", void 0); -i([ - u(".handle.end") -], r.prototype, "handleEnd", void 0); -i([ - w("md-ripple.end") -], r.prototype, "rippleEnd", void 0); -i([ - h() -], r.prototype, "handleStartHover", void 0); -i([ - h() -], r.prototype, "handleEndHover", void 0); -i([ - h() -], r.prototype, "startOnTop", void 0); -i([ - h() -], r.prototype, "handlesOverlapping", void 0); -i([ - h() -], r.prototype, "renderValueStart", void 0); -i([ - h() -], r.prototype, "renderValueEnd", void 0); -function k({ x: l, y: e }, a) { - if (!a) - return !1; - const { top: t, left: n, bottom: o, right: d } = a.getBoundingClientRect(); - return l >= n && l <= d && e >= t && e <= o; -} -function U(l, e) { - if (!(l && e)) - return !1; - const a = l.getBoundingClientRect(), t = e.getBoundingClientRect(); - return !(a.top > t.bottom || a.right < t.left || a.bottom < t.top || a.left > t.right); -} +s([ + r({ type: Boolean, reflect: !0 }) +], i.prototype, "disabled", void 0); +s([ + r() +], i.prototype, "type", void 0); +s([ + r() +], i.prototype, "href", void 0); +s([ + r() +], i.prototype, "target", void 0); +s([ + r({ type: Boolean, attribute: "keep-open" }) +], i.prototype, "keepOpen", void 0); +s([ + r({ type: Boolean }) +], i.prototype, "selected", void 0); +s([ + F(".list-item") +], i.prototype, "listItemRoot", void 0); +s([ + f({ slot: "headline" }) +], i.prototype, "headlineElements", void 0); +s([ + f({ slot: "supporting-text" }) +], i.prototype, "supportingTextElements", void 0); +s([ + H({ slot: "" }) +], i.prototype, "defaultElements", void 0); +s([ + r({ attribute: "typeahead-text" }) +], i.prototype, "typeaheadText", null); +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let c = class extends i { +}; +c.styles = [R]; +c = s([ + w("md-menu-item") +], c); +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let u = class extends $ { + get item() { + return this.items[0] ?? null; + } + get menu() { + return this.menus[0] ?? null; + } + constructor() { + super(), this.anchorCorner = M.START_END, this.menuCorner = M.START_START, this.hoverOpenDelay = 400, this.hoverCloseDelay = 400, this.isSubMenu = !0, this.previousOpenTimeout = 0, this.previousCloseTimeout = 0, this.onMouseenter = () => { + var e; + clearTimeout(this.previousOpenTimeout), clearTimeout(this.previousCloseTimeout), !((e = this.menu) != null && e.open) && (this.hoverOpenDelay ? this.previousOpenTimeout = setTimeout(() => { + this.show(); + }, this.hoverOpenDelay) : this.show()); + }, this.onMouseleave = () => { + clearTimeout(this.previousCloseTimeout), clearTimeout(this.previousOpenTimeout), this.hoverCloseDelay ? this.previousCloseTimeout = setTimeout(() => { + this.close(); + }, this.hoverCloseDelay) : this.close(); + }, this.addEventListener("mouseenter", this.onMouseenter), this.addEventListener("mouseleave", this.onMouseleave); + } + render() { + return d` + + + + + `; + } + firstUpdated() { + this.onSlotchange(); + } + /** + * Shows the submenu. + */ + async show() { + const e = this.menu; + if (!e || e.open) + return; + e.addEventListener("closed", () => { + this.item.ariaExpanded = "false", this.dispatchEvent(b()), this.dispatchEvent(p()), e.ariaHidden = "true"; + }, { once: !0 }), e.positioning === "document" && (e.positioning = "absolute"), e.quick = !0, e.hasOverflow = !0, e.anchorCorner = this.anchorCorner, e.menuCorner = this.menuCorner, e.anchorElement = this.item, e.defaultFocus = "first-item", e.removeAttribute("aria-hidden"), e.skipRestoreFocus = !1; + const o = e.open; + if (e.show(), this.item.ariaExpanded = "true", this.item.ariaHasPopup = "menu", e.id && this.item.setAttribute("aria-controls", e.id), this.dispatchEvent(p()), this.dispatchEvent(k()), this.item.selected = !0, !o) { + let t = (h) => { + }; + const n = new Promise((h) => { + t = h; + }); + e.addEventListener("opened", t, { once: !0 }), await n; + } + } + /** + * Closes the submenu. + */ + async close() { + const e = this.menu; + if (!e || !e.open) + return; + this.dispatchEvent(b()), e.quick = !0, e.close(), this.dispatchEvent(p()); + let o = (n) => { + }; + const t = new Promise((n) => { + o = n; + }); + e.addEventListener("closed", o, { once: !0 }), await t; + } + onSlotchange() { + var o; + if (!this.item) + return; + this.item.ariaExpanded = "false", this.item.ariaHasPopup = "menu", (o = this.menu) != null && o.id && this.item.setAttribute("aria-controls", this.menu.id), this.item.keepOpen = !0; + const e = this.menu; + e && (e.isSubmenu = !0, e.ariaHidden = "true"); + } + onClick() { + this.show(); + } + /** + * On item keydown handles opening the submenu. + */ + async onKeydown(e) { + const o = this.isSubmenuOpenKey(e.code); + if (e.defaultPrevented) + return; + const t = o && (l.LEFT === e.code || l.RIGHT === e.code); + if ((e.code === g.SPACE || t) && (e.preventDefault(), t && e.stopPropagation()), !o) + return; + const n = this.menu; + if (!n) + return; + const h = n.items, v = P(h); + if (v) { + await this.show(), v.tabIndex = 0, v.focus(); + return; + } + } + onCloseSubmenu(e) { + const { itemPath: o, reason: t } = e.detail; + if (o.push(this.item), this.dispatchEvent(b()), t.kind === O.KEYDOWN && t.key === x.ESCAPE) { + e.stopPropagation(), this.item.dispatchEvent(L()); + return; + } + this.dispatchEvent(p()); + } + async onSubMenuKeydown(e) { + var n; + if (e.defaultPrevented) + return; + const { close: o, keyCode: t } = this.isSubmenuCloseKey(e.code); + o && (e.preventDefault(), (t === l.LEFT || t === l.RIGHT) && e.stopPropagation(), await this.close(), N(this.menu.items), (n = this.item) == null || n.focus(), this.item.tabIndex = 0, this.item.focus()); + } + /** + * Determines whether the given KeyboardEvent code is one that should open + * the submenu. This is RTL-aware. By default, left, right, space, or enter. + * + * @param code The native KeyboardEvent code. + * @return Whether or not the key code should open the submenu. + */ + isSubmenuOpenKey(e) { + const t = getComputedStyle(this).direction === "rtl" ? l.LEFT : l.RIGHT; + switch (e) { + case t: + case g.SPACE: + case g.ENTER: + return !0; + default: + return !1; + } + } + /** + * Determines whether the given KeyboardEvent code is one that should close + * the submenu. This is RTL-aware. By default right, left, or escape. + * + * @param code The native KeyboardEvent code. + * @return Whether or not the key code should close the submenu. + */ + isSubmenuCloseKey(e) { + const t = getComputedStyle(this).direction === "rtl" ? l.RIGHT : l.LEFT; + switch (e) { + case t: + case x.ESCAPE: + return { close: !0, keyCode: e }; + default: + return { close: !1 }; + } + } +}; +s([ + r({ attribute: "anchor-corner" }) +], u.prototype, "anchorCorner", void 0); +s([ + r({ attribute: "menu-corner" }) +], u.prototype, "menuCorner", void 0); +s([ + r({ type: Number, attribute: "hover-open-delay" }) +], u.prototype, "hoverOpenDelay", void 0); +s([ + r({ type: Number, attribute: "hover-close-delay" }) +], u.prototype, "hoverCloseDelay", void 0); +s([ + r({ type: Boolean, reflect: !0, attribute: "md-sub-menu" }) +], u.prototype, "isSubMenu", void 0); +s([ + f({ slot: "item", flatten: !0 }) +], u.prototype, "items", void 0); +s([ + f({ slot: "menu", flatten: !0 }) +], u.prototype, "menus", void 0); /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const X = _`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)} +const q = D`:host{position:relative;display:flex;flex-direction:column} `; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let p = class extends r { +let y = class extends u { }; -p.styles = [X, B]; -p = i([ - L("md-slider") -], p); -const D = T({ - react: $, - elementClass: p, - tagName: "md-slider" -}), le = ({ - className: l, - id: e, - style: a, - ...t -}) => /* @__PURE__ */ N( - D, - { - className: l, - id: e, - style: a, - ...t +y.styles = [q]; +y = s([ + w("md-sub-menu") +], y); +const W = S({ + react: T, + tagName: "md-menu", + elementClass: A +}), j = S({ + react: T, + tagName: "md-menu-item", + elementClass: c, + events: { + "close-menu": "onCloseMenu" } -); +}), U = S({ + react: T, + tagName: "md-sub-menu", + elementClass: y +}), le = (a) => /* @__PURE__ */ E( + W, + { + ...a + } +), ue = (a) => /* @__PURE__ */ E( + U, + { + ...a + } +), me = (a) => /* @__PURE__ */ E(j, { ...a }); export { - le as Slider + le as Menu, + me as MenuItem, + ue as SubMenu }; diff --git a/dist/react-you-ui17.js b/dist/react-you-ui17.js index e5bfeaf..18725b0 100644 --- a/dist/react-you-ui17.js +++ b/dist/react-you-ui17.js @@ -1,72 +1,79 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),c=require("react"),p=require("./create-component-D9KTUrcf.js"),t=require("./class-map-DV5418hw.js"),y=require("./query-assigned-elements-BYttmtWz.js"),d=require("./item-DvSwYnPq.js");require("./ripple-DoKzzEey.js");const v=require("./animation-A38fZ1oY.js"),a=require("./static-B9XIUGOk.js"),f=require("./delegate-4958lG3m.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),E=require("react"),z=require("./create-component-D9KTUrcf.js"),a=require("./class-map-DV5418hw.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const o=require("./animation-A38fZ1oY.js"),A=require("./style-map-Bzw6qQ8K.js"),C=require("./delegate-4958lG3m.js"),u=require("./form-label-activation-CYEOF_US.js"),p=require("./redispatch-event-C93E51ce.js"),$=require("./element-internals-OOm6rgx-.js"),b=require("./form-associated-CxXMoMPu.js");/** * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const b=new Set(Object.values(d.NavigableKeys));let h=class extends t.r{get items(){return this.listController.items}constructor(){super(),this.listController=new d.ListController({isItem:e=>e.hasAttribute("md-list-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.tabIndex=-1},activateItem:e=>{e.tabIndex=0},isNavigableKey:e=>b.has(e),isActivatable:e=>!e.disabled&&e.type!=="text"}),this.internals=this.attachInternals(),this.internals.role="list",this.addEventListener("keydown",this.listController.handleKeydown)}render(){return t.x` - - - `}activateNextItem(){return this.listController.activateNextItem()}activatePreviousItem(){return this.listController.activatePreviousItem()}};t.__decorate([y.o({flatten:!0})],h.prototype,"slotItems",void 0);/** + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function _(s){return(e,t)=>o.e(e,t,{async get(){var r;return await this.updateComplete,((r=this.renderRoot)==null?void 0:r.querySelector(s))??null}})}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const x=t.i$1`:host{background:var(--md-list-container-color, var(--md-sys-color-surface, #fef7ff));color:unset;display:flex;flex-direction:column;outline:none;padding:8px 0;position:relative} + */const N=a.i$1`@media(forced-colors: active){:host{--md-slider-active-track-color: CanvasText;--md-slider-disabled-active-track-color: GrayText;--md-slider-disabled-active-track-opacity: 1;--md-slider-disabled-handle-color: GrayText;--md-slider-disabled-inactive-track-color: GrayText;--md-slider-disabled-inactive-track-opacity: 1;--md-slider-focus-handle-color: CanvasText;--md-slider-handle-color: CanvasText;--md-slider-handle-shadow-color: Canvas;--md-slider-hover-handle-color: CanvasText;--md-slider-hover-state-layer-color: Canvas;--md-slider-hover-state-layer-opacity: 1;--md-slider-inactive-track-color: Canvas;--md-slider-label-container-color: Canvas;--md-slider-label-text-color: CanvasText;--md-slider-pressed-handle-color: CanvasText;--md-slider-pressed-state-layer-color: Canvas;--md-slider-pressed-state-layer-opacity: 1;--md-slider-with-overlap-handle-outline-color: CanvasText}.label,.label::before{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}:host(:not([disabled])) .track::before{border:1px solid var(--_active-track-color)}.tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='CanvasText'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}.tickmarks::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}:host([disabled]) .tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}} `;/** * @license * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let l=class extends h{};l.styles=[x];l=t.__decorate([t.t$1("md-list")],l);/** + * SPDX-License-Identifier: BSD-3-Clause + */function v(s,e,t){return s?e(s):t==null?void 0:t(s)}/** * @license - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const $=f.mixinDelegatesAria(t.r);class s extends ${constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}get isDisabled(){return this.disabled&&this.type!=="link"}willUpdate(e){this.href&&(this.type="link"),super.willUpdate(e)}render(){return this.renderListItem(t.x` - -
- ${this.renderRipple()} ${this.renderFocusRing()} + */const T=C.mixinDelegatesAria(b.mixinFormAssociated($.mixinElementInternals(a.r)));let i=class extends T{get nameStart(){return this.getAttribute("name-start")??this.name}set nameStart(e){this.setAttribute("name-start",e)}get nameEnd(){return this.getAttribute("name-end")??this.nameStart}set nameEnd(e){this.setAttribute("name-end",e)}get renderAriaLabelStart(){const{ariaLabel:e}=this;return this.ariaLabelStart||e&&`${e} start`||this.valueLabelStart||String(this.valueStart)}get renderAriaValueTextStart(){return this.ariaValueTextStart||this.valueLabelStart||String(this.valueStart)}get renderAriaLabelEnd(){const{ariaLabel:e}=this;return this.range?this.ariaLabelEnd||e&&`${e} end`||this.valueLabelEnd||String(this.valueEnd):e||this.valueLabel||String(this.value)}get renderAriaValueTextEnd(){if(this.range)return this.ariaValueTextEnd||this.valueLabelEnd||String(this.valueEnd);const{ariaValueText:e}=this;return e||this.valueLabel||String(this.value)}constructor(){super(),this.min=0,this.max=100,this.valueLabel="",this.valueLabelStart="",this.valueLabelEnd="",this.ariaLabelStart="",this.ariaValueTextStart="",this.ariaLabelEnd="",this.ariaValueTextEnd="",this.step=1,this.ticks=!1,this.labeled=!1,this.range=!1,this.handleStartHover=!1,this.handleEndHover=!1,this.startOnTop=!1,this.handlesOverlapping=!1,this.ripplePointerId=1,this.isRedispatchingEvent=!1,this.addEventListener("click",e=>{!u.isActivationClick(e)||!this.inputEnd||(this.focus(),u.dispatchActivationClick(this.inputEnd))})}focus(){var e;(e=this.inputEnd)==null||e.focus()}willUpdate(e){var r,n;this.renderValueStart=e.has("valueStart")?this.valueStart:(r=this.inputStart)==null?void 0:r.valueAsNumber;const t=e.has("valueEnd")&&this.range||e.has("value");this.renderValueEnd=t?this.range?this.valueEnd:this.value:(n=this.inputEnd)==null?void 0:n.valueAsNumber,e.get("handleStartHover")!==void 0?this.toggleRippleHover(this.rippleStart,this.handleStartHover):e.get("handleEndHover")!==void 0&&this.toggleRippleHover(this.rippleEnd,this.handleEndHover)}updated(e){var t,r;if(this.range&&(this.renderValueStart=this.inputStart.valueAsNumber),this.renderValueEnd=this.inputEnd.valueAsNumber,this.range){const n=(this.max-this.min)/3;if(this.valueStart===void 0){this.inputStart.valueAsNumber=this.min+n;const l=this.inputStart.valueAsNumber;this.valueStart=this.renderValueStart=l}if(this.valueEnd===void 0){this.inputEnd.valueAsNumber=this.min+2*n;const l=this.inputEnd.valueAsNumber;this.valueEnd=this.renderValueEnd=l}}else this.value??(this.value=this.renderValueEnd);if(e.has("range")||e.has("renderValueStart")||e.has("renderValueEnd")||this.isUpdatePending){const n=(t=this.handleStart)==null?void 0:t.querySelector(".handleNub"),l=(r=this.handleEnd)==null?void 0:r.querySelector(".handleNub");this.handlesOverlapping=L(n,l)}this.performUpdate()}render(){const e=this.step===0?1:this.step,t=Math.max(this.max-this.min,e),r=this.range?((this.renderValueStart??this.min)-this.min)/t:0,n=((this.renderValueEnd??this.min)-this.min)/t,l={"--_start-fraction":String(r),"--_end-fraction":String(n),"--_tick-count":String(t/e)},d={ranged:this.range},h=this.valueLabelStart||String(this.renderValueStart),g=(this.range?this.valueLabelEnd:this.valueLabel)||String(this.renderValueEnd),f={start:!0,value:this.renderValueStart,ariaLabel:this.renderAriaLabelStart,ariaValueText:this.renderAriaValueTextStart,ariaMin:this.min,ariaMax:this.valueEnd??this.max},k={start:!1,value:this.renderValueEnd,ariaLabel:this.renderAriaLabelEnd,ariaValueText:this.renderAriaValueTextEnd,ariaMin:this.range?this.valueStart??this.min:this.min,ariaMax:this.max},y={start:!0,hover:this.handleStartHover,label:h},x={start:!1,hover:this.handleEndHover,label:g},w={hover:this.handleStartHover||this.handleEndHover};return a.x`
+ ${v(this.range,()=>this.renderInput(f))} + ${this.renderInput(k)} ${this.renderTrack()} +
+
+
+ ${v(this.range,()=>this.renderHandle(y))} + ${this.renderHandle(x)} +
- - - ${this.renderBody()} - - `)}renderListItem(e){const o=this.type==="link";let r;switch(this.type){case"link":r=a.i`a`;break;case"button":r=a.i`button`;break;default:case"text":r=a.i`li`;break}const u=this.type!=="text",g=o&&this.target?this.target:t.E;return a.u` - <${r} - id="item" - tabindex="${this.isDisabled||!u?-1:0}" - ?disabled=${this.isDisabled} - role="listitem" - aria-selected=${this.ariaSelected||t.E} - aria-checked=${this.ariaChecked||t.E} - aria-expanded=${this.ariaExpanded||t.E} - aria-haspopup=${this.ariaHasPopup||t.E} - class="list-item ${t.e$1(this.getRenderClasses())}" - href=${this.href||t.E} - target=${g} - @focus=${this.onFocus} - >${e} - `}renderRipple(){return this.type==="text"?t.E:t.x` `}renderFocusRing(){return this.type==="text"?t.E:t.x` `}onFocusRingVisibilityChanged(e){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return t.x` - - - - - - `}onFocus(){this.tabIndex===-1&&this.dispatchEvent(d.createRequestActivationEvent())}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}s.shadowRootOptions={...t.r.shadowRootOptions,delegatesFocus:!0};t.__decorate([t.n({type:Boolean,reflect:!0})],s.prototype,"disabled",void 0);t.__decorate([t.n({reflect:!0})],s.prototype,"type",void 0);t.__decorate([t.n({type:Boolean,attribute:"md-list-item",reflect:!0})],s.prototype,"isListItem",void 0);t.__decorate([t.n()],s.prototype,"href",void 0);t.__decorate([t.n()],s.prototype,"target",void 0);t.__decorate([v.e$1(".list-item")],s.prototype,"listItemRoot",void 0);/** +
+
`}renderTrack(){return a.x` +
+ ${this.ticks?a.x`
`:a.E} + `}renderLabel(e){return a.x``}renderHandle({start:e,hover:t,label:r}){const n=!this.disabled&&e===this.startOnTop,l=!this.disabled&&this.handlesOverlapping,d=e?"start":"end";return a.x`
+ + +
+ +
+ ${v(this.labeled,()=>this.renderLabel(r))} +
`}renderInput({start:e,value:t,ariaLabel:r,ariaValueText:n,ariaMin:l,ariaMax:d}){const h=e?"start":"end";return a.x``}async toggleRippleHover(e,t){const r=await e;r&&(t?r.handlePointerenter(new PointerEvent("pointerenter",{isPrimary:!0,pointerId:this.ripplePointerId})):r.handlePointerleave(new PointerEvent("pointerleave",{isPrimary:!0,pointerId:this.ripplePointerId})))}handleFocus(e){this.updateOnTop(e.target)}startAction(e){const t=e.target,r=t===this.inputStart?this.inputEnd:this.inputStart;this.action={canFlip:e.type==="pointerdown",flipped:!1,target:t,fixed:r,values:new Map([[t,t.valueAsNumber],[r,r==null?void 0:r.valueAsNumber]])}}finishAction(e){this.action=void 0}handleKeydown(e){this.startAction(e)}handleKeyup(e){this.finishAction(e)}handleDown(e){this.startAction(e),this.ripplePointerId=e.pointerId;const t=e.target===this.inputStart;this.handleStartHover=!this.disabled&&t&&!!this.handleStart,this.handleEndHover=!this.disabled&&!t&&!!this.handleEnd}async handleUp(e){if(!this.action)return;const{target:t,values:r,flipped:n}=this.action;await new Promise(requestAnimationFrame),t!==void 0&&(t.focus(),n&&t.valueAsNumber!==r.get(t)&&t.dispatchEvent(new Event("change",{bubbles:!0}))),this.finishAction(e)}handleMove(e){this.handleStartHover=!this.disabled&&m(e,this.handleStart),this.handleEndHover=!this.disabled&&m(e,this.handleEnd)}handleEnter(e){this.handleMove(e)}handleLeave(){this.handleStartHover=!1,this.handleEndHover=!1}updateOnTop(e){this.startOnTop=e.classList.contains("start")}needsClamping(){if(!this.action)return!1;const{target:e,fixed:t}=this.action;return e===this.inputStart?e.valueAsNumber>t.valueAsNumber:e.valueAsNumber=n&&s<=d&&e>=r&&e<=l}function L(s,e){if(!(s&&e))return!1;const t=s.getBoundingClientRect(),r=e.getBoundingClientRect();return!(t.top>r.bottom||t.rightr.right)}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const I=t.i$1`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}} + */const V=a.i$1`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)} `;/** * @license - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let n=class extends s{};n.styles=[I];n=t.__decorate([t.t$1("md-list-item")],n);const w=p.o({react:c,tagName:"md-list",elementClass:l}),_=i=>{const{children:e,...o}=i;return m.jsx(w,{...o,children:e})},C=p.o({react:c,tagName:"md-list-item",elementClass:n}),L=i=>{const{children:e,...o}=i,r=i.type||"text";return m.jsx(C,{...o,type:r,children:e})};exports.List=_;exports.ListItem=L; + */let c=class extends i{};c.styles=[V,N];c=a.__decorate([a.t$1("md-slider")],c);const P=z.o({react:E,elementClass:c,tagName:"md-slider"}),H=({className:s,id:e,style:t,...r})=>S.jsx(P,{className:s,id:e,style:t,...r});exports.Slider=H; diff --git a/dist/react-you-ui17.mjs b/dist/react-you-ui17.mjs index ef303ac..f732d86 100644 --- a/dist/react-you-ui17.mjs +++ b/dist/react-you-ui17.mjs @@ -1,260 +1,515 @@ -import { jsx as h } from "react/jsx-runtime"; -import g from "react"; -import { o as u } from "./create-component-CVXl33PD.mjs"; -import { _ as e, r as c, x as l, a as y, b as v, n, E as s, c as I } from "./class-map-CwiboTfb.mjs"; -import { o as w } from "./query-assigned-elements-DUhez03i.mjs"; -import { N as $, L as C, a as L } from "./item-CpL4zUlE.mjs"; +import { jsx as N } from "react/jsx-runtime"; +import $ from "react"; +import { o as T } from "./create-component-CVXl33PD.mjs"; +import { a as _, r as y, _ as i, n as s, x as c, c as v, E as f, b as L } from "./class-map-CwiboTfb.mjs"; +import "./elevation-Dg8ssDJC.mjs"; import "./ripple-pQcEjR05.mjs"; -import { a as R } from "./animation-DjClVFum.mjs"; -import { i as p, u as k } from "./static-DdXEOlS4.mjs"; -import { m as z } from "./delegate-BXi1gVeU.mjs"; +import { e as V, a as u, r as h } from "./animation-DjClVFum.mjs"; +import { o as P } from "./style-map-CdUj7GnE.mjs"; +import { m as H } from "./delegate-BXi1gVeU.mjs"; +import { i as O, d as R } from "./form-label-activation-ed0HgVsy.mjs"; +import { r as g } from "./redispatch-event-taWUbWUt.mjs"; +import { m as F } from "./element-internals-3IY9gE4L.mjs"; +import { m as I, g as M } from "./form-associated-CyYeHPMb.mjs"; /** * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause */ -const E = new Set(Object.values($)); -let f = class extends c { - /** @export */ - get items() { - return this.listController.items; - } - constructor() { - super(), this.listController = new C({ - isItem: (t) => t.hasAttribute("md-list-item"), - getPossibleItems: () => this.slotItems, - isRtl: () => getComputedStyle(this).direction === "rtl", - deactivateItem: (t) => { - t.tabIndex = -1; - }, - activateItem: (t) => { - t.tabIndex = 0; - }, - isNavigableKey: (t) => E.has(t), - isActivatable: (t) => !t.disabled && t.type !== "text" - }), this.internals = // Cast needed for closure - this.attachInternals(), this.internals.role = "list", this.addEventListener("keydown", this.listController.handleKeydown); - } - render() { - return l` - - - `; - } - /** - * Activates the next item in the list. If at the end of the list, the first - * item will be activated. - * - * @return The activated list item or `null` if there are no items. - */ - activateNextItem() { - return this.listController.activateNextItem(); - } - /** - * Activates the previous item in the list. If at the start of the list, the - * last item will be activated. - * - * @return The activated list item or `null` if there are no items. - */ - activatePreviousItem() { - return this.listController.activatePreviousItem(); - } -}; -e([ - w({ flatten: !0 }) -], f.prototype, "slotItems", void 0); +function w(l) { + return (e, a) => V(e, a, { async get() { + var t; + return await this.updateComplete, ((t = this.renderRoot) == null ? void 0 : t.querySelector(l)) ?? null; + } }); +} /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const A = y`:host{background:var(--md-list-container-color, var(--md-sys-color-surface, #fef7ff));color:unset;display:flex;flex-direction:column;outline:none;padding:8px 0;position:relative} +const B = _`@media(forced-colors: active){:host{--md-slider-active-track-color: CanvasText;--md-slider-disabled-active-track-color: GrayText;--md-slider-disabled-active-track-opacity: 1;--md-slider-disabled-handle-color: GrayText;--md-slider-disabled-inactive-track-color: GrayText;--md-slider-disabled-inactive-track-opacity: 1;--md-slider-focus-handle-color: CanvasText;--md-slider-handle-color: CanvasText;--md-slider-handle-shadow-color: Canvas;--md-slider-hover-handle-color: CanvasText;--md-slider-hover-state-layer-color: Canvas;--md-slider-hover-state-layer-opacity: 1;--md-slider-inactive-track-color: Canvas;--md-slider-label-container-color: Canvas;--md-slider-label-text-color: CanvasText;--md-slider-pressed-handle-color: CanvasText;--md-slider-pressed-state-layer-color: Canvas;--md-slider-pressed-state-layer-opacity: 1;--md-slider-with-overlap-handle-outline-color: CanvasText}.label,.label::before{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}:host(:not([disabled])) .track::before{border:1px solid var(--_active-track-color)}.tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='CanvasText'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}.tickmarks::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}:host([disabled]) .tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}} `; /** * @license * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 + * SPDX-License-Identifier: BSD-3-Clause */ -let d = class extends f { -}; -d.styles = [A]; -d = e([ - v("md-list") -], d); +function b(l, e, a) { + return l ? e(l) : a == null ? void 0 : a(l); +} /** * @license - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const N = z(c); -class r extends N { +const q = H(I(F(y))); +let r = class extends q { + /** + * The HTML name to use in form submission for a range slider's starting + * value. Use `name` instead if both the start and end values should use the + * same name. + */ + get nameStart() { + return this.getAttribute("name-start") ?? this.name; + } + set nameStart(e) { + this.setAttribute("name-start", e); + } + /** + * The HTML name to use in form submission for a range slider's ending value. + * Use `name` instead if both the start and end values should use the same + * name. + */ + get nameEnd() { + return this.getAttribute("name-end") ?? this.nameStart; + } + set nameEnd(e) { + this.setAttribute("name-end", e); + } + // Note: start aria-* properties are only applied when range=true, which is + // why they do not need to handle both cases. + get renderAriaLabelStart() { + const { ariaLabel: e } = this; + return this.ariaLabelStart || e && `${e} start` || this.valueLabelStart || String(this.valueStart); + } + get renderAriaValueTextStart() { + return this.ariaValueTextStart || this.valueLabelStart || String(this.valueStart); + } + // Note: end aria-* properties are applied for single and range sliders, which + // is why it needs to handle `this.range` (while start aria-* properties do + // not). + get renderAriaLabelEnd() { + const { ariaLabel: e } = this; + return this.range ? this.ariaLabelEnd || e && `${e} end` || this.valueLabelEnd || String(this.valueEnd) : e || this.valueLabel || String(this.value); + } + get renderAriaValueTextEnd() { + if (this.range) + return this.ariaValueTextEnd || this.valueLabelEnd || String(this.valueEnd); + const { ariaValueText: e } = this; + return e || this.valueLabel || String(this.value); + } constructor() { - super(...arguments), this.disabled = !1, this.type = "text", this.isListItem = !0, this.href = "", this.target = ""; - } - get isDisabled() { - return this.disabled && this.type !== "link"; - } - willUpdate(t) { - this.href && (this.type = "link"), super.willUpdate(t); - } - render() { - return this.renderListItem(l` - -
- ${this.renderRipple()} ${this.renderFocusRing()} -
- - - ${this.renderBody()} -
- `); - } - /** - * Renders the root list item. - * - * @param content the child content of the list item. - */ - renderListItem(t) { - const a = this.type === "link"; - let o; - switch (this.type) { - case "link": - o = p`a`; - break; - case "button": - o = p`button`; - break; - default: - case "text": - o = p`li`; - break; - } - const b = this.type !== "text", x = a && this.target ? this.target : s; - return k` - <${o} - id="item" - tabindex="${this.isDisabled || !b ? -1 : 0}" - ?disabled=${this.isDisabled} - role="listitem" - aria-selected=${this.ariaSelected || s} - aria-checked=${this.ariaChecked || s} - aria-expanded=${this.ariaExpanded || s} - aria-haspopup=${this.ariaHasPopup || s} - class="list-item ${I(this.getRenderClasses())}" - href=${this.href || s} - target=${x} - @focus=${this.onFocus} - >${t} - `; - } - /** - * Handles rendering of the ripple element. - */ - renderRipple() { - return this.type === "text" ? s : l` `; - } - /** - * Handles rendering of the focus ring. - */ - renderFocusRing() { - return this.type === "text" ? s : l` `; - } - onFocusRingVisibilityChanged(t) { - } - /** - * Classes applied to the list item root. - */ - getRenderClasses() { - return { disabled: this.isDisabled }; - } - /** - * Handles rendering the headline and supporting text. - */ - renderBody() { - return l` - - - - - - `; - } - onFocus() { - this.tabIndex === -1 && this.dispatchEvent(L()); + super(), this.min = 0, this.max = 100, this.valueLabel = "", this.valueLabelStart = "", this.valueLabelEnd = "", this.ariaLabelStart = "", this.ariaValueTextStart = "", this.ariaLabelEnd = "", this.ariaValueTextEnd = "", this.step = 1, this.ticks = !1, this.labeled = !1, this.range = !1, this.handleStartHover = !1, this.handleEndHover = !1, this.startOnTop = !1, this.handlesOverlapping = !1, this.ripplePointerId = 1, this.isRedispatchingEvent = !1, this.addEventListener("click", (e) => { + !O(e) || !this.inputEnd || (this.focus(), R(this.inputEnd)); + }); } focus() { - var t; - (t = this.listItemRoot) == null || t.focus(); + var e; + (e = this.inputEnd) == null || e.focus(); } -} + willUpdate(e) { + var t, n; + this.renderValueStart = e.has("valueStart") ? this.valueStart : (t = this.inputStart) == null ? void 0 : t.valueAsNumber; + const a = e.has("valueEnd") && this.range || e.has("value"); + this.renderValueEnd = a ? this.range ? this.valueEnd : this.value : (n = this.inputEnd) == null ? void 0 : n.valueAsNumber, e.get("handleStartHover") !== void 0 ? this.toggleRippleHover(this.rippleStart, this.handleStartHover) : e.get("handleEndHover") !== void 0 && this.toggleRippleHover(this.rippleEnd, this.handleEndHover); + } + updated(e) { + var a, t; + if (this.range && (this.renderValueStart = this.inputStart.valueAsNumber), this.renderValueEnd = this.inputEnd.valueAsNumber, this.range) { + const n = (this.max - this.min) / 3; + if (this.valueStart === void 0) { + this.inputStart.valueAsNumber = this.min + n; + const o = this.inputStart.valueAsNumber; + this.valueStart = this.renderValueStart = o; + } + if (this.valueEnd === void 0) { + this.inputEnd.valueAsNumber = this.min + 2 * n; + const o = this.inputEnd.valueAsNumber; + this.valueEnd = this.renderValueEnd = o; + } + } else + this.value ?? (this.value = this.renderValueEnd); + if (e.has("range") || e.has("renderValueStart") || e.has("renderValueEnd") || this.isUpdatePending) { + const n = (a = this.handleStart) == null ? void 0 : a.querySelector(".handleNub"), o = (t = this.handleEnd) == null ? void 0 : t.querySelector(".handleNub"); + this.handlesOverlapping = U(n, o); + } + this.performUpdate(); + } + render() { + const e = this.step === 0 ? 1 : this.step, a = Math.max(this.max - this.min, e), t = this.range ? ((this.renderValueStart ?? this.min) - this.min) / a : 0, n = ((this.renderValueEnd ?? this.min) - this.min) / a, o = { + // for clipping inputs and active track. + "--_start-fraction": String(t), + "--_end-fraction": String(n), + // for generating tick marks + "--_tick-count": String(a / e) + }, d = { ranged: this.range }, m = this.valueLabelStart || String(this.renderValueStart), x = (this.range ? this.valueLabelEnd : this.valueLabel) || String(this.renderValueEnd), S = { + start: !0, + value: this.renderValueStart, + ariaLabel: this.renderAriaLabelStart, + ariaValueText: this.renderAriaValueTextStart, + ariaMin: this.min, + ariaMax: this.valueEnd ?? this.max + }, E = { + start: !1, + value: this.renderValueEnd, + ariaLabel: this.renderAriaLabelEnd, + ariaValueText: this.renderAriaValueTextEnd, + ariaMin: this.range ? this.valueStart ?? this.min : this.min, + ariaMax: this.max + }, z = { + start: !0, + hover: this.handleStartHover, + label: m + }, A = { + start: !1, + hover: this.handleEndHover, + label: x + }, C = { + hover: this.handleStartHover || this.handleEndHover + }; + return c`
+ ${b(this.range, () => this.renderInput(S))} + ${this.renderInput(E)} ${this.renderTrack()} +
+
+
+ ${b(this.range, () => this.renderHandle(z))} + ${this.renderHandle(A)} +
+
+
+
`; + } + renderTrack() { + return c` +
+ ${this.ticks ? c`
` : f} + `; + } + renderLabel(e) { + return c``; + } + renderHandle({ start: e, hover: a, label: t }) { + const n = !this.disabled && e === this.startOnTop, o = !this.disabled && this.handlesOverlapping, d = e ? "start" : "end"; + return c`
+ + +
+ +
+ ${b(this.labeled, () => this.renderLabel(t))} +
`; + } + renderInput({ start: e, value: a, ariaLabel: t, ariaValueText: n, ariaMin: o, ariaMax: d }) { + const m = e ? "start" : "end"; + return c``; + } + async toggleRippleHover(e, a) { + const t = await e; + t && (a ? t.handlePointerenter(new PointerEvent("pointerenter", { + isPrimary: !0, + pointerId: this.ripplePointerId + })) : t.handlePointerleave(new PointerEvent("pointerleave", { + isPrimary: !0, + pointerId: this.ripplePointerId + }))); + } + handleFocus(e) { + this.updateOnTop(e.target); + } + startAction(e) { + const a = e.target, t = a === this.inputStart ? this.inputEnd : this.inputStart; + this.action = { + canFlip: e.type === "pointerdown", + flipped: !1, + target: a, + fixed: t, + values: /* @__PURE__ */ new Map([ + [a, a.valueAsNumber], + [t, t == null ? void 0 : t.valueAsNumber] + ]) + }; + } + finishAction(e) { + this.action = void 0; + } + handleKeydown(e) { + this.startAction(e); + } + handleKeyup(e) { + this.finishAction(e); + } + handleDown(e) { + this.startAction(e), this.ripplePointerId = e.pointerId; + const a = e.target === this.inputStart; + this.handleStartHover = !this.disabled && a && !!this.handleStart, this.handleEndHover = !this.disabled && !a && !!this.handleEnd; + } + async handleUp(e) { + if (!this.action) + return; + const { target: a, values: t, flipped: n } = this.action; + await new Promise(requestAnimationFrame), a !== void 0 && (a.focus(), n && a.valueAsNumber !== t.get(a) && a.dispatchEvent(new Event("change", { bubbles: !0 }))), this.finishAction(e); + } + /** + * The move handler tracks handle hovering to facilitate proper ripple + * behavior on the slider handle. This is needed because user interaction with + * the native input is leveraged to position the handle. Because the separate + * displayed handle element has pointer events disabled (to allow interaction + * with the input) and the input's handle is a pseudo-element, neither can be + * the ripple's interactive element. Therefore the input is the ripple's + * interactive element and has a `ripple` directive; however the ripple + * is gated on the handle being hovered. In addition, because the ripple + * hover state is being specially handled, it must be triggered independent + * of the directive. This is done based on the hover state when the + * slider is updated. + */ + handleMove(e) { + this.handleStartHover = !this.disabled && k(e, this.handleStart), this.handleEndHover = !this.disabled && k(e, this.handleEnd); + } + handleEnter(e) { + this.handleMove(e); + } + handleLeave() { + this.handleStartHover = !1, this.handleEndHover = !1; + } + updateOnTop(e) { + this.startOnTop = e.classList.contains("start"); + } + needsClamping() { + if (!this.action) + return !1; + const { target: e, fixed: a } = this.action; + return e === this.inputStart ? e.valueAsNumber > a.valueAsNumber : e.valueAsNumber < a.valueAsNumber; + } + // if start/end start coincident and the first drag input would e.g. move + // start > end, avoid clamping and "flip" to use the other input + // as the action target. + isActionFlipped() { + const { action: e } = this; + if (!e) + return !1; + const { target: a, fixed: t, values: n } = e; + return e.canFlip && n.get(a) === n.get(t) && this.needsClamping() && (e.canFlip = !1, e.flipped = !0, e.target = t, e.fixed = a), e.flipped; + } + // when flipped, apply the drag input to the flipped target and reset + // the actual target. + flipAction() { + if (!this.action) + return !1; + const { target: e, fixed: a, values: t } = this.action, n = e.valueAsNumber !== a.valueAsNumber; + return e.valueAsNumber = a.valueAsNumber, a.valueAsNumber = t.get(a), n; + } + // clamp such that start does not move beyond end and visa versa. + clampAction() { + if (!this.needsClamping() || !this.action) + return !1; + const { target: e, fixed: a } = this.action; + return e.valueAsNumber = a.valueAsNumber, !0; + } + handleInput(e) { + if (this.isRedispatchingEvent) + return; + let a = !1, t = !1; + this.range && (this.isActionFlipped() && (a = !0, t = this.flipAction()), this.clampAction() && (a = !0, t = !1)); + const n = e.target; + this.updateOnTop(n), this.range ? (this.valueStart = this.inputStart.valueAsNumber, this.valueEnd = this.inputEnd.valueAsNumber) : this.value = this.inputEnd.valueAsNumber, a && e.stopPropagation(), t && (this.isRedispatchingEvent = !0, g(n, e), this.isRedispatchingEvent = !1); + } + handleChange(e) { + const a = e.target, { target: t, values: n } = this.action ?? {}; + t && t.valueAsNumber === n.get(a) || g(this, e), this.finishAction(e); + } + [M]() { + if (this.range) { + const e = new FormData(); + return e.append(this.nameStart, String(this.valueStart)), e.append(this.nameEnd, String(this.valueEnd)), e; + } + return String(this.value); + } + formResetCallback() { + if (this.range) { + const a = this.getAttribute("value-start"); + this.valueStart = a !== null ? Number(a) : void 0; + const t = this.getAttribute("value-end"); + this.valueEnd = t !== null ? Number(t) : void 0; + return; + } + const e = this.getAttribute("value"); + this.value = e !== null ? Number(e) : void 0; + } + formStateRestoreCallback(e) { + if (Array.isArray(e)) { + const [[, a], [, t]] = e; + this.valueStart = Number(a), this.valueEnd = Number(t), this.range = !0; + return; + } + this.value = Number(e), this.range = !1; + } +}; r.shadowRootOptions = { - ...c.shadowRootOptions, + ...y.shadowRootOptions, delegatesFocus: !0 }; -e([ - n({ type: Boolean, reflect: !0 }) -], r.prototype, "disabled", void 0); -e([ - n({ reflect: !0 }) -], r.prototype, "type", void 0); -e([ - n({ type: Boolean, attribute: "md-list-item", reflect: !0 }) -], r.prototype, "isListItem", void 0); -e([ - n() -], r.prototype, "href", void 0); -e([ - n() -], r.prototype, "target", void 0); -e([ - R(".list-item") -], r.prototype, "listItemRoot", void 0); +i([ + s({ type: Number }) +], r.prototype, "min", void 0); +i([ + s({ type: Number }) +], r.prototype, "max", void 0); +i([ + s({ type: Number }) +], r.prototype, "value", void 0); +i([ + s({ type: Number, attribute: "value-start" }) +], r.prototype, "valueStart", void 0); +i([ + s({ type: Number, attribute: "value-end" }) +], r.prototype, "valueEnd", void 0); +i([ + s({ attribute: "value-label" }) +], r.prototype, "valueLabel", void 0); +i([ + s({ attribute: "value-label-start" }) +], r.prototype, "valueLabelStart", void 0); +i([ + s({ attribute: "value-label-end" }) +], r.prototype, "valueLabelEnd", void 0); +i([ + s({ attribute: "aria-label-start" }) +], r.prototype, "ariaLabelStart", void 0); +i([ + s({ attribute: "aria-valuetext-start" }) +], r.prototype, "ariaValueTextStart", void 0); +i([ + s({ attribute: "aria-label-end" }) +], r.prototype, "ariaLabelEnd", void 0); +i([ + s({ attribute: "aria-valuetext-end" }) +], r.prototype, "ariaValueTextEnd", void 0); +i([ + s({ type: Number }) +], r.prototype, "step", void 0); +i([ + s({ type: Boolean }) +], r.prototype, "ticks", void 0); +i([ + s({ type: Boolean }) +], r.prototype, "labeled", void 0); +i([ + s({ type: Boolean }) +], r.prototype, "range", void 0); +i([ + u("input.start") +], r.prototype, "inputStart", void 0); +i([ + u(".handle.start") +], r.prototype, "handleStart", void 0); +i([ + w("md-ripple.start") +], r.prototype, "rippleStart", void 0); +i([ + u("input.end") +], r.prototype, "inputEnd", void 0); +i([ + u(".handle.end") +], r.prototype, "handleEnd", void 0); +i([ + w("md-ripple.end") +], r.prototype, "rippleEnd", void 0); +i([ + h() +], r.prototype, "handleStartHover", void 0); +i([ + h() +], r.prototype, "handleEndHover", void 0); +i([ + h() +], r.prototype, "startOnTop", void 0); +i([ + h() +], r.prototype, "handlesOverlapping", void 0); +i([ + h() +], r.prototype, "renderValueStart", void 0); +i([ + h() +], r.prototype, "renderValueEnd", void 0); +function k({ x: l, y: e }, a) { + if (!a) + return !1; + const { top: t, left: n, bottom: o, right: d } = a.getBoundingClientRect(); + return l >= n && l <= d && e >= t && e <= o; +} +function U(l, e) { + if (!(l && e)) + return !1; + const a = l.getBoundingClientRect(), t = e.getBoundingClientRect(); + return !(a.top > t.bottom || a.right < t.left || a.bottom < t.top || a.left > t.right); +} /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const D = y`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}} +const X = _`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)} `; /** * @license - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let m = class extends r { -}; -m.styles = [D]; -m = e([ - v("md-list-item") -], m); -const F = u({ - react: g, - tagName: "md-list", - elementClass: d -}), Y = (i) => { - const { children: t, ...a } = i; - return /* @__PURE__ */ h(F, { ...a, children: t }); -}, _ = u({ - react: g, - tagName: "md-list-item", - elementClass: m -}), J = (i) => { - const { children: t, ...a } = i, o = i.type || "text"; - return /* @__PURE__ */ h(_, { ...a, type: o, children: t }); +let p = class extends r { }; +p.styles = [X, B]; +p = i([ + L("md-slider") +], p); +const D = T({ + react: $, + elementClass: p, + tagName: "md-slider" +}), le = ({ + className: l, + id: e, + style: a, + ...t +}) => /* @__PURE__ */ N( + D, + { + className: l, + id: e, + style: a, + ...t + } +); export { - Y as List, - J as ListItem + le as Slider }; diff --git a/dist/react-you-ui18.js b/dist/react-you-ui18.js index 02c9863..e5bfeaf 100644 --- a/dist/react-you-ui18.js +++ b/dist/react-you-ui18.js @@ -1,65 +1,72 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),b=require("react"),p=require("./create-component-D9KTUrcf.js"),r=require("./class-map-DV5418hw.js"),_=require("./delegate-4958lG3m.js"),f=require("./style-map-Bzw6qQ8K.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),c=require("react"),p=require("./create-component-D9KTUrcf.js"),t=require("./class-map-DV5418hw.js"),y=require("./query-assigned-elements-BYttmtWz.js"),d=require("./item-DvSwYnPq.js");require("./ripple-DoKzzEey.js");const v=require("./animation-A38fZ1oY.js"),a=require("./static-B9XIUGOk.js"),f=require("./delegate-4958lG3m.js");/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const x=_.mixinDelegatesAria(r.r);class t extends x{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:o}=this;return r.x` -
${this.renderIndicator()}
- `}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}r.__decorate([r.n({type:Number})],t.prototype,"value",void 0);r.__decorate([r.n({type:Number})],t.prototype,"max",void 0);r.__decorate([r.n({type:Boolean})],t.prototype,"indeterminate",void 0);r.__decorate([r.n({type:Boolean,attribute:"four-color"})],t.prototype,"fourColor",void 0);/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let k=class extends t{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){const o=(1-this.value/this.max)*100;return r.x` - - - - - `}renderIndeterminateContainer(){return r.x`
-
-
-
-
-
-
-
`}};/** + */const b=new Set(Object.values(d.NavigableKeys));let h=class extends t.r{get items(){return this.listController.items}constructor(){super(),this.listController=new d.ListController({isItem:e=>e.hasAttribute("md-list-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.tabIndex=-1},activateItem:e=>{e.tabIndex=0},isNavigableKey:e=>b.has(e),isActivatable:e=>!e.disabled&&e.type!=="text"}),this.internals=this.attachInternals(),this.internals.role="list",this.addEventListener("keydown",this.listController.handleKeydown)}render(){return t.x` + + + `}activateNextItem(){return this.listController.activateNextItem()}activatePreviousItem(){return this.listController.activatePreviousItem()}};t.__decorate([y.o({flatten:!0})],h.prototype,"slotItems",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const w=r.i$1`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}} + */const x=t.i$1`:host{background:var(--md-list-container-color, var(--md-sys-color-surface, #fef7ff));color:unset;display:flex;flex-direction:column;outline:none;padding:8px 0;position:relative} `;/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let l=class extends k{};l.styles=[w];l=r.__decorate([r.t$1("md-circular-progress")],l);/** + */let l=class extends h{};l.styles=[x];l=t.__decorate([t.t$1("md-list")],l);/** * @license - * Copyright 2023 Google LLC + * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let h=class extends t{constructor(){super(...arguments),this.buffer=0}renderIndicator(){const o={transform:`scaleX(${(this.indeterminate?1:this.value/this.max)*100}%)`},a=this.buffer??0,i=a>0,n={transform:`scaleX(${(this.indeterminate||!i?1:a/this.max)*100}%)`},c=this.indeterminate||!i||a>=this.max||this.value>=this.max;return r.x` -
-
-
-
-
-
-
-
- `}};r.__decorate([r.n({type:Number})],h.prototype,"buffer",void 0);/** + */const $=f.mixinDelegatesAria(t.r);class s extends ${constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}get isDisabled(){return this.disabled&&this.type!=="link"}willUpdate(e){this.href&&(this.type="link"),super.willUpdate(e)}render(){return this.renderListItem(t.x` + +
+ ${this.renderRipple()} ${this.renderFocusRing()} +
+ + + ${this.renderBody()} +
+ `)}renderListItem(e){const o=this.type==="link";let r;switch(this.type){case"link":r=a.i`a`;break;case"button":r=a.i`button`;break;default:case"text":r=a.i`li`;break}const u=this.type!=="text",g=o&&this.target?this.target:t.E;return a.u` + <${r} + id="item" + tabindex="${this.isDisabled||!u?-1:0}" + ?disabled=${this.isDisabled} + role="listitem" + aria-selected=${this.ariaSelected||t.E} + aria-checked=${this.ariaChecked||t.E} + aria-expanded=${this.ariaExpanded||t.E} + aria-haspopup=${this.ariaHasPopup||t.E} + class="list-item ${t.e$1(this.getRenderClasses())}" + href=${this.href||t.E} + target=${g} + @focus=${this.onFocus} + >${e} + `}renderRipple(){return this.type==="text"?t.E:t.x` `}renderFocusRing(){return this.type==="text"?t.E:t.x` `}onFocusRingVisibilityChanged(e){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return t.x` + + + + + + `}onFocus(){this.tabIndex===-1&&this.dispatchEvent(d.createRequestActivationEvent())}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}s.shadowRootOptions={...t.r.shadowRootOptions,delegatesFocus:!0};t.__decorate([t.n({type:Boolean,reflect:!0})],s.prototype,"disabled",void 0);t.__decorate([t.n({reflect:!0})],s.prototype,"type",void 0);t.__decorate([t.n({type:Boolean,attribute:"md-list-item",reflect:!0})],s.prototype,"isListItem",void 0);t.__decorate([t.n()],s.prototype,"href",void 0);t.__decorate([t.n()],s.prototype,"target",void 0);t.__decorate([v.e$1(".list-item")],s.prototype,"listItemRoot",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const C=r.i$1`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, var(--md-sys-shape-corner-none, 0px));border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}} + */const I=t.i$1`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}} `;/** * @license - * Copyright 2023 Google LLC + * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let d=class extends h{};d.styles=[C];d=r.__decorate([r.t$1("md-linear-progress")],d);const z=p.o({react:b,tagName:"md-circular-progress",elementClass:l}),$=p.o({react:b,tagName:"md-linear-progress",elementClass:d}),X=e=>{const{value:o,max:a,fourColor:i,className:s,style:n,id:c,color:m,size:v,...u}=e;return g.jsx(z,{indeterminate:o===void 0,value:o,max:a,fourColor:i,className:s,style:{...n,"--md-circular-progress-color":m||"var(--md-sys-color-primary)","--md-circular-progress-size":v||"48px"},id:c,...u})},P=e=>{const{buffer:o,value:a,max:i,fourColor:s,className:n,style:c,id:m,color:v,size:u,...y}=e;return g.jsx($,{buffer:o,value:a,max:i,fourColor:s,className:n,style:{...c,"--md-linear-progress-color":v||"var(--md-sys-color-primary)","--md-linear-progress-size":u||"48px"},id:m,...y})};exports.CircularProgress=X;exports.LinearProgress=P; + */let n=class extends s{};n.styles=[I];n=t.__decorate([t.t$1("md-list-item")],n);const w=p.o({react:c,tagName:"md-list",elementClass:l}),_=i=>{const{children:e,...o}=i;return m.jsx(w,{...o,children:e})},C=p.o({react:c,tagName:"md-list-item",elementClass:n}),L=i=>{const{children:e,...o}=i,r=i.type||"text";return m.jsx(C,{...o,type:r,children:e})};exports.List=_;exports.ListItem=L; diff --git a/dist/react-you-ui18.mjs b/dist/react-you-ui18.mjs index c6f68a1..ef303ac 100644 --- a/dist/react-you-ui18.mjs +++ b/dist/react-you-ui18.mjs @@ -1,229 +1,260 @@ import { jsx as h } from "react/jsx-runtime"; -import y from "react"; -import { o as _ } from "./create-component-CVXl33PD.mjs"; -import { _ as e, n as s, r as z, x as d, c as X, E as p, a as x, b as k } from "./class-map-CwiboTfb.mjs"; -import { m as $ } from "./delegate-BXi1gVeU.mjs"; -import { o as b } from "./style-map-CdUj7GnE.mjs"; +import g from "react"; +import { o as u } from "./create-component-CVXl33PD.mjs"; +import { _ as e, r as c, x as l, a as y, b as v, n, E as s, c as I } from "./class-map-CwiboTfb.mjs"; +import { o as w } from "./query-assigned-elements-DUhez03i.mjs"; +import { N as $, L as C, a as L } from "./item-CpL4zUlE.mjs"; +import "./ripple-pQcEjR05.mjs"; +import { a as R } from "./animation-DjClVFum.mjs"; +import { i as p, u as k } from "./static-DdXEOlS4.mjs"; +import { m as z } from "./delegate-BXi1gVeU.mjs"; /** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const P = $(z); -class t extends P { +const E = new Set(Object.values($)); +let f = class extends c { + /** @export */ + get items() { + return this.listController.items; + } constructor() { - super(...arguments), this.value = 0, this.max = 1, this.indeterminate = !1, this.fourColor = !1; + super(), this.listController = new C({ + isItem: (t) => t.hasAttribute("md-list-item"), + getPossibleItems: () => this.slotItems, + isRtl: () => getComputedStyle(this).direction === "rtl", + deactivateItem: (t) => { + t.tabIndex = -1; + }, + activateItem: (t) => { + t.tabIndex = 0; + }, + isNavigableKey: (t) => E.has(t), + isActivatable: (t) => !t.disabled && t.type !== "text" + }), this.internals = // Cast needed for closure + this.attachInternals(), this.internals.role = "list", this.addEventListener("keydown", this.listController.handleKeydown); } render() { - const { ariaLabel: r } = this; - return d` -
${this.renderIndicator()}
+ return l` + + `; } + /** + * Activates the next item in the list. If at the end of the list, the first + * item will be activated. + * + * @return The activated list item or `null` if there are no items. + */ + activateNextItem() { + return this.listController.activateNextItem(); + } + /** + * Activates the previous item in the list. If at the start of the list, the + * last item will be activated. + * + * @return The activated list item or `null` if there are no items. + */ + activatePreviousItem() { + return this.listController.activatePreviousItem(); + } +}; +e([ + w({ flatten: !0 }) +], f.prototype, "slotItems", void 0); +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const A = y`:host{background:var(--md-list-container-color, var(--md-sys-color-surface, #fef7ff));color:unset;display:flex;flex-direction:column;outline:none;padding:8px 0;position:relative} +`; +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let d = class extends f { +}; +d.styles = [A]; +d = e([ + v("md-list") +], d); +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const N = z(c); +class r extends N { + constructor() { + super(...arguments), this.disabled = !1, this.type = "text", this.isListItem = !0, this.href = "", this.target = ""; + } + get isDisabled() { + return this.disabled && this.type !== "link"; + } + willUpdate(t) { + this.href && (this.type = "link"), super.willUpdate(t); + } + render() { + return this.renderListItem(l` + +
+ ${this.renderRipple()} ${this.renderFocusRing()} +
+ + + ${this.renderBody()} +
+ `); + } + /** + * Renders the root list item. + * + * @param content the child content of the list item. + */ + renderListItem(t) { + const a = this.type === "link"; + let o; + switch (this.type) { + case "link": + o = p`a`; + break; + case "button": + o = p`button`; + break; + default: + case "text": + o = p`li`; + break; + } + const b = this.type !== "text", x = a && this.target ? this.target : s; + return k` + <${o} + id="item" + tabindex="${this.isDisabled || !b ? -1 : 0}" + ?disabled=${this.isDisabled} + role="listitem" + aria-selected=${this.ariaSelected || s} + aria-checked=${this.ariaChecked || s} + aria-expanded=${this.ariaExpanded || s} + aria-haspopup=${this.ariaHasPopup || s} + class="list-item ${I(this.getRenderClasses())}" + href=${this.href || s} + target=${x} + @focus=${this.onFocus} + >${t} + `; + } + /** + * Handles rendering of the ripple element. + */ + renderRipple() { + return this.type === "text" ? s : l` `; + } + /** + * Handles rendering of the focus ring. + */ + renderFocusRing() { + return this.type === "text" ? s : l` `; + } + onFocusRingVisibilityChanged(t) { + } + /** + * Classes applied to the list item root. + */ getRenderClasses() { - return { - indeterminate: this.indeterminate, - "four-color": this.fourColor - }; + return { disabled: this.isDisabled }; + } + /** + * Handles rendering the headline and supporting text. + */ + renderBody() { + return l` + + + + + + `; + } + onFocus() { + this.tabIndex === -1 && this.dispatchEvent(L()); + } + focus() { + var t; + (t = this.listItemRoot) == null || t.focus(); } } -e([ - s({ type: Number }) -], t.prototype, "value", void 0); -e([ - s({ type: Number }) -], t.prototype, "max", void 0); -e([ - s({ type: Boolean }) -], t.prototype, "indeterminate", void 0); -e([ - s({ type: Boolean, attribute: "four-color" }) -], t.prototype, "fourColor", void 0); -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let M = class extends t { - renderIndicator() { - return this.indeterminate ? this.renderIndeterminateContainer() : this.renderDeterminateContainer(); - } - // Determinate mode is rendered with an svg so the progress arc can be - // easily animated via stroke-dashoffset. - renderDeterminateContainer() { - const r = (1 - this.value / this.max) * 100; - return d` - - - - - `; - } - // Indeterminate mode rendered with 2 bordered-divs. The borders are - // clipped into half circles by their containers. The divs are then carefully - // animated to produce changes to the spinner arc size. - // This approach has 4.5x the FPS of rendering via svg on Chrome 111. - // See https://lit.dev/playground/#gist=febb773565272f75408ab06a0eb49746. - renderIndeterminateContainer() { - return d`
-
-
-
-
-
-
-
`; - } +r.shadowRootOptions = { + ...c.shadowRootOptions, + delegatesFocus: !0 }; +e([ + n({ type: Boolean, reflect: !0 }) +], r.prototype, "disabled", void 0); +e([ + n({ reflect: !0 }) +], r.prototype, "type", void 0); +e([ + n({ type: Boolean, attribute: "md-list-item", reflect: !0 }) +], r.prototype, "isListItem", void 0); +e([ + n() +], r.prototype, "href", void 0); +e([ + n() +], r.prototype, "target", void 0); +e([ + R(".list-item") +], r.prototype, "listItemRoot", void 0); /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const L = x`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}} +const D = y`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}} `; /** * @license - * Copyright 2023 Google LLC + * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let m = class extends M { +let m = class extends r { }; -m.styles = [L]; +m.styles = [D]; m = e([ - k("md-circular-progress") + v("md-list-item") ], m); -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let w = class extends t { - constructor() { - super(...arguments), this.buffer = 0; - } - // Note, the indeterminate animation is rendered with transform %'s - // Previously, this was optimized to use px calculated with the resizeObserver - // due to a now fixed Chrome bug: crbug.com/389359. - renderIndicator() { - const r = { - transform: `scaleX(${(this.indeterminate ? 1 : this.value / this.max) * 100}%)` - }, a = this.buffer ?? 0, i = a > 0, n = { - transform: `scaleX(${(this.indeterminate || !i ? 1 : a / this.max) * 100}%)` - }, c = this.indeterminate || !i || a >= this.max || this.value >= this.max; - return d` -
-
-
-
-
-
-
-
- `; - } -}; -e([ - s({ type: Number }) -], w.prototype, "buffer", void 0); -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const B = x`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, var(--md-sys-shape-corner-none, 0px));border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}} -`; -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let v = class extends w { -}; -v.styles = [B]; -v = e([ - k("md-linear-progress") -], v); -const E = _({ - react: y, - tagName: "md-circular-progress", +const F = u({ + react: g, + tagName: "md-list", + elementClass: d +}), Y = (i) => { + const { children: t, ...a } = i; + return /* @__PURE__ */ h(F, { ...a, children: t }); +}, _ = u({ + react: g, + tagName: "md-list-item", elementClass: m -}), N = _({ - react: y, - tagName: "md-linear-progress", - elementClass: v -}), q = (o) => { - const { - value: r, - max: a, - fourColor: i, - className: l, - style: n, - id: c, - color: f, - size: u, - ...g - } = o; - return /* @__PURE__ */ h( - E, - { - indeterminate: r === void 0, - value: r, - max: a, - fourColor: i, - className: l, - style: { - ...n, - "--md-circular-progress-color": f || "var(--md-sys-color-primary)", - "--md-circular-progress-size": u || "48px" - }, - id: c, - ...g - } - ); -}, F = (o) => { - const { - buffer: r, - value: a, - max: i, - fourColor: l, - className: n, - style: c, - id: f, - color: u, - size: g, - ...C - } = o; - return /* @__PURE__ */ h( - N, - { - buffer: r, - value: a, - max: i, - fourColor: l, - className: n, - style: { - ...c, - "--md-linear-progress-color": u || "var(--md-sys-color-primary)", - "--md-linear-progress-size": g || "48px" - }, - id: f, - ...C - } - ); +}), J = (i) => { + const { children: t, ...a } = i, o = i.type || "text"; + return /* @__PURE__ */ h(_, { ...a, type: o, children: t }); }; export { - q as CircularProgress, - F as LinearProgress + Y as List, + J as ListItem }; diff --git a/dist/react-you-ui19.js b/dist/react-you-ui19.js index 9c6a24c..02c9863 100644 --- a/dist/react-you-ui19.js +++ b/dist/react-you-ui19.js @@ -1,52 +1,65 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),p=require("react"),f=require("./create-component-D9KTUrcf.js"),r=require("./class-map-DV5418hw.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const _=require("./delegate-4958lG3m.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),b=require("react"),p=require("./create-component-D9KTUrcf.js"),r=require("./class-map-DV5418hw.js"),_=require("./delegate-4958lG3m.js"),f=require("./style-map-Bzw6qQ8K.js");/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const g=_.mixinDelegatesAria(r.r);class o extends g{constructor(){super(...arguments),this.size="medium",this.label="",this.lowered=!1}render(){const{ariaLabel:e}=this;return r.x` - - `}getRenderClasses(){const e=!!this.label;return{lowered:this.lowered,small:this.size==="small"&&!e,large:this.size==="large"&&!e,extended:e}}renderTouchTarget(){return r.x`
`}renderLabel(){return this.label?r.x`${this.label}`:""}renderIcon(){const{ariaLabel:e}=this;return r.x` - - - - `}}o.shadowRootOptions={mode:"open",delegatesFocus:!0};r.__decorate([r.n({reflect:!0})],o.prototype,"size",void 0);r.__decorate([r.n()],o.prototype,"label",void 0);r.__decorate([r.n({type:Boolean})],o.prototype,"lowered",void 0);/** + */const x=_.mixinDelegatesAria(r.r);class t extends x{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:o}=this;return r.x` +
${this.renderIndicator()}
+ `}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}r.__decorate([r.n({type:Number})],t.prototype,"value",void 0);r.__decorate([r.n({type:Number})],t.prototype,"max",void 0);r.__decorate([r.n({type:Boolean})],t.prototype,"indeterminate",void 0);r.__decorate([r.n({type:Boolean,attribute:"four-color"})],t.prototype,"fourColor",void 0);/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */class m extends o{constructor(){super(...arguments),this.variant="surface"}getRenderClasses(){return{...super.getRenderClasses(),primary:this.variant==="primary",secondary:this.variant==="secondary",tertiary:this.variant==="tertiary"}}}r.__decorate([r.n()],m.prototype,"variant",void 0);/** + */let k=class extends t{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){const o=(1-this.value/this.max)*100;return r.x` + + + + + `}renderIndeterminateContainer(){return r.x`
+
+
+
+
+
+
+
`}};/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const x=r.i$1`:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab{cursor:inherit}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)} -`;/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const y=r.i$1`@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}} -`;/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const h=r.i$1`:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)} -`;/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let t=class extends m{};t.styles=[h,x,y];t=r.__decorate([r.t$1("md-fab")],t);/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const u=r.i$1`:host{--_container-color: var(--md-fab-branded-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-branded-container-elevation, 3);--_container-height: var(--md-fab-branded-container-height, 56px);--_container-shadow-color: var(--md-fab-branded-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-branded-container-width, 56px);--_focus-container-elevation: var(--md-fab-branded-focus-container-elevation, 3);--_hover-container-elevation: var(--md-fab-branded-hover-container-elevation, 4);--_hover-state-layer-color: var(--md-fab-branded-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-branded-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-fab-branded-icon-size, 36px);--_lowered-container-color: var(--md-fab-branded-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-branded-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-branded-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-branded-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-branded-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-branded-pressed-container-elevation, 3);--_pressed-state-layer-color: var(--md-fab-branded-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-branded-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-branded-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-branded-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-branded-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-fab-branded-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-size: var(--md-fab-branded-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-line-height: var(--md-fab-branded-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-weight: var(--md-fab-branded-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-branded-large-container-height, 96px);--_large-container-width: var(--md-fab-branded-large-container-width, 96px);--_large-icon-size: var(--md-fab-branded-large-icon-size, 48px);--_pressed-label-text-color: var(--md-fab-branded-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-fab-branded-container-shape-start-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-branded-container-shape-start-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-branded-container-shape-end-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-branded-container-shape-end-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-branded-large-container-shape-start-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-branded-large-container-shape-start-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-branded-large-container-shape-end-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-branded-large-container-shape-end-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)))} + */const w=r.i$1`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}} `;/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let n=class extends m{getRenderClasses(){return{...super.getRenderClasses(),primary:!1,secondary:!1,tertiary:!1,small:!1}}};n.styles=[h,u,y];n=r.__decorate([r.t$1("md-branded-fab")],n);const w=f.o({react:p,tagName:"md-fab",elementClass:t}),z=a=>{const{children:e,className:s,...l}=a,c=a.variant||"surface",d=a.size||"medium",i=a.label||"",v=a.lowered||!1;return b.jsx(w,{...l,className:s,variant:c,size:d,label:i,lowered:v,children:e})},$=f.o({react:p,tagName:"md-branded-fab",elementClass:n}),F=a=>{const{children:e,className:s,...l}=a,c=a.variant||"surface",d=a.size||"medium",i=a.label||"",v=a.lowered||!1;return b.jsx($,{...l,className:s,variant:c,size:d,label:i,lowered:v,children:e})};exports.BrandedFAB=F;exports.FAB=z; + */let l=class extends k{};l.styles=[w];l=r.__decorate([r.t$1("md-circular-progress")],l);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let h=class extends t{constructor(){super(...arguments),this.buffer=0}renderIndicator(){const o={transform:`scaleX(${(this.indeterminate?1:this.value/this.max)*100}%)`},a=this.buffer??0,i=a>0,n={transform:`scaleX(${(this.indeterminate||!i?1:a/this.max)*100}%)`},c=this.indeterminate||!i||a>=this.max||this.value>=this.max;return r.x` +
+
+
+
+
+
+
+
+ `}};r.__decorate([r.n({type:Number})],h.prototype,"buffer",void 0);/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const C=r.i$1`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, var(--md-sys-shape-corner-none, 0px));border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}} +`;/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let d=class extends h{};d.styles=[C];d=r.__decorate([r.t$1("md-linear-progress")],d);const z=p.o({react:b,tagName:"md-circular-progress",elementClass:l}),$=p.o({react:b,tagName:"md-linear-progress",elementClass:d}),X=e=>{const{value:o,max:a,fourColor:i,className:s,style:n,id:c,color:m,size:v,...u}=e;return g.jsx(z,{indeterminate:o===void 0,value:o,max:a,fourColor:i,className:s,style:{...n,"--md-circular-progress-color":m||"var(--md-sys-color-primary)","--md-circular-progress-size":v||"48px"},id:c,...u})},P=e=>{const{buffer:o,value:a,max:i,fourColor:s,className:n,style:c,id:m,color:v,size:u,...y}=e;return g.jsx($,{buffer:o,value:a,max:i,fourColor:s,className:n,style:{...c,"--md-linear-progress-color":v||"var(--md-sys-color-primary)","--md-linear-progress-size":u||"48px"},id:m,...y})};exports.CircularProgress=X;exports.LinearProgress=P; diff --git a/dist/react-you-ui19.mjs b/dist/react-you-ui19.mjs index 6be3efa..c6f68a1 100644 --- a/dist/react-you-ui19.mjs +++ b/dist/react-you-ui19.mjs @@ -1,172 +1,229 @@ import { jsx as h } from "react/jsx-runtime"; -import _ from "react"; -import { o as g } from "./create-component-CVXl33PD.mjs"; -import { _ as e, n as l, x as t, c as z, E as y, r as $, a as d, b as x } from "./class-map-CwiboTfb.mjs"; -import "./elevation-Dg8ssDJC.mjs"; -import "./ripple-pQcEjR05.mjs"; -import { m as F } from "./delegate-BXi1gVeU.mjs"; +import y from "react"; +import { o as _ } from "./create-component-CVXl33PD.mjs"; +import { _ as e, n as s, r as z, x as d, c as X, E as p, a as x, b as k } from "./class-map-CwiboTfb.mjs"; +import { m as $ } from "./delegate-BXi1gVeU.mjs"; +import { o as b } from "./style-map-CdUj7GnE.mjs"; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const R = F($); -class o extends R { +const P = $(z); +class t extends P { constructor() { - super(...arguments), this.size = "medium", this.label = "", this.lowered = !1; + super(...arguments), this.value = 0, this.max = 1, this.indeterminate = !1, this.fourColor = !1; } render() { - const { ariaLabel: a } = this; - return t` - + const { ariaLabel: r } = this; + return d` +
${this.renderIndicator()}
`; } getRenderClasses() { - const a = !!this.label; return { - lowered: this.lowered, - small: this.size === "small" && !a, - large: this.size === "large" && !a, - extended: a + indeterminate: this.indeterminate, + "four-color": this.fourColor }; } - renderTouchTarget() { - return t`
`; - } - renderLabel() { - return this.label ? t`${this.label}` : ""; - } - renderIcon() { - const { ariaLabel: a } = this; - return t` - - - - `; - } } -o.shadowRootOptions = { - mode: "open", - delegatesFocus: !0 -}; e([ - l({ reflect: !0 }) -], o.prototype, "size", void 0); + s({ type: Number }) +], t.prototype, "value", void 0); e([ - l() -], o.prototype, "label", void 0); + s({ type: Number }) +], t.prototype, "max", void 0); e([ - l({ type: Boolean }) -], o.prototype, "lowered", void 0); + s({ type: Boolean }) +], t.prototype, "indeterminate", void 0); +e([ + s({ type: Boolean, attribute: "four-color" }) +], t.prototype, "fourColor", void 0); /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class f extends o { +let M = class extends t { + renderIndicator() { + return this.indeterminate ? this.renderIndeterminateContainer() : this.renderDeterminateContainer(); + } + // Determinate mode is rendered with an svg so the progress arc can be + // easily animated via stroke-dashoffset. + renderDeterminateContainer() { + const r = (1 - this.value / this.max) * 100; + return d` + + + + + `; + } + // Indeterminate mode rendered with 2 bordered-divs. The borders are + // clipped into half circles by their containers. The divs are then carefully + // animated to produce changes to the spinner arc size. + // This approach has 4.5x the FPS of rendering via svg on Chrome 111. + // See https://lit.dev/playground/#gist=febb773565272f75408ab06a0eb49746. + renderIndeterminateContainer() { + return d`
+
+
+
+
+
+
+
`; + } +}; +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const L = x`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}} +`; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let m = class extends M { +}; +m.styles = [L]; +m = e([ + k("md-circular-progress") +], m); +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let w = class extends t { constructor() { - super(...arguments), this.variant = "surface"; + super(...arguments), this.buffer = 0; } - getRenderClasses() { - return { - ...super.getRenderClasses(), - primary: this.variant === "primary", - secondary: this.variant === "secondary", - tertiary: this.variant === "tertiary" - }; + // Note, the indeterminate animation is rendered with transform %'s + // Previously, this was optimized to use px calculated with the resizeObserver + // due to a now fixed Chrome bug: crbug.com/389359. + renderIndicator() { + const r = { + transform: `scaleX(${(this.indeterminate ? 1 : this.value / this.max) * 100}%)` + }, a = this.buffer ?? 0, i = a > 0, n = { + transform: `scaleX(${(this.indeterminate || !i ? 1 : a / this.max) * 100}%)` + }, c = this.indeterminate || !i || a >= this.max || this.value >= this.max; + return d` +
+
+
+
+
+
+
+
+ `; } -} -e([ - l() -], f.prototype, "variant", void 0); -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const B = d`:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab{cursor:inherit}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)} -`; -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const u = d`@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}} -`; -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const w = d`:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)} -`; -/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let n = class extends f { }; -n.styles = [w, B, u]; -n = e([ - x("md-fab") -], n); +e([ + s({ type: Number }) +], w.prototype, "buffer", void 0); /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const C = d`:host{--_container-color: var(--md-fab-branded-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-branded-container-elevation, 3);--_container-height: var(--md-fab-branded-container-height, 56px);--_container-shadow-color: var(--md-fab-branded-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-branded-container-width, 56px);--_focus-container-elevation: var(--md-fab-branded-focus-container-elevation, 3);--_hover-container-elevation: var(--md-fab-branded-hover-container-elevation, 4);--_hover-state-layer-color: var(--md-fab-branded-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-branded-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-fab-branded-icon-size, 36px);--_lowered-container-color: var(--md-fab-branded-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-branded-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-branded-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-branded-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-branded-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-branded-pressed-container-elevation, 3);--_pressed-state-layer-color: var(--md-fab-branded-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-branded-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-branded-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-branded-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-branded-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-fab-branded-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-size: var(--md-fab-branded-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-line-height: var(--md-fab-branded-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-weight: var(--md-fab-branded-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-branded-large-container-height, 96px);--_large-container-width: var(--md-fab-branded-large-container-width, 96px);--_large-icon-size: var(--md-fab-branded-large-icon-size, 48px);--_pressed-label-text-color: var(--md-fab-branded-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-fab-branded-container-shape-start-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-branded-container-shape-start-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-branded-container-shape-end-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-branded-container-shape-end-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-branded-large-container-shape-start-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-branded-large-container-shape-start-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-branded-large-container-shape-end-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-branded-large-container-shape-end-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)))} +const B = x`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, var(--md-sys-shape-corner-none, 0px));border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}} `; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let s = class extends f { - getRenderClasses() { - return { - ...super.getRenderClasses(), - primary: !1, - secondary: !1, - tertiary: !1, - small: !1 - }; - } +let v = class extends w { }; -s.styles = [ - w, - C, - u -]; -s = e([ - x("md-branded-fab") -], s); -const k = g({ - react: _, - tagName: "md-fab", - elementClass: n -}), S = (r) => { - const { children: a, className: c, ...i } = r, v = r.variant || "surface", m = r.size || "medium", b = r.label || "", p = r.lowered || !1; - return /* @__PURE__ */ h(k, { ...i, className: c, variant: v, size: m, label: b, lowered: p, children: a }); -}, M = g({ - react: _, - tagName: "md-branded-fab", - elementClass: s -}), q = (r) => { - const { children: a, className: c, ...i } = r, v = r.variant || "surface", m = r.size || "medium", b = r.label || "", p = r.lowered || !1; - return /* @__PURE__ */ h(M, { ...i, className: c, variant: v, size: m, label: b, lowered: p, children: a }); +v.styles = [B]; +v = e([ + k("md-linear-progress") +], v); +const E = _({ + react: y, + tagName: "md-circular-progress", + elementClass: m +}), N = _({ + react: y, + tagName: "md-linear-progress", + elementClass: v +}), q = (o) => { + const { + value: r, + max: a, + fourColor: i, + className: l, + style: n, + id: c, + color: f, + size: u, + ...g + } = o; + return /* @__PURE__ */ h( + E, + { + indeterminate: r === void 0, + value: r, + max: a, + fourColor: i, + className: l, + style: { + ...n, + "--md-circular-progress-color": f || "var(--md-sys-color-primary)", + "--md-circular-progress-size": u || "48px" + }, + id: c, + ...g + } + ); +}, F = (o) => { + const { + buffer: r, + value: a, + max: i, + fourColor: l, + className: n, + style: c, + id: f, + color: u, + size: g, + ...C + } = o; + return /* @__PURE__ */ h( + N, + { + buffer: r, + value: a, + max: i, + fourColor: l, + className: n, + style: { + ...c, + "--md-linear-progress-color": u || "var(--md-sys-color-primary)", + "--md-linear-progress-size": g || "48px" + }, + id: f, + ...C + } + ); }; export { - q as BrandedFAB, - S as FAB + q as CircularProgress, + F as LinearProgress }; diff --git a/dist/react-you-ui20.js b/dist/react-you-ui20.js index a3c1508..9c6a24c 100644 --- a/dist/react-you-ui20.js +++ b/dist/react-you-ui20.js @@ -1,71 +1,52 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),g=require("react"),T=require("./create-component-D9KTUrcf.js"),t=require("./class-map-DV5418hw.js");require("./divider-B6Y1F7cS.js");const b=require("./animation-A38fZ1oY.js"),C=require("./query-assigned-elements-BYttmtWz.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const z=require("./query-assigned-nodes-Dl8k4w_-.js"),M=require("./focusable-D3uHX6nn.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),p=require("react"),f=require("./create-component-D9KTUrcf.js"),r=require("./class-map-DV5418hw.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const _=require("./delegate-4958lG3m.js");/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */var I;const y=Symbol("indicator"),E=Symbol("animateIndicator"),N=M.mixinFocusable(t.r);let l=class extends N{get selected(){return this.active}set selected(e){this.active=e}constructor(){super(),this.isTab=!0,this.active=!1,this.hasIcon=!1,this.iconOnly=!1,this.fullWidthIndicator=!1,this.internals=this.attachInternals(),this.internals.role="tab",this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e=t.x`
`;return t.x``}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(I=y,E)](e){if(!this[y])return;this[y].getAnimations().forEach(o=>{o.cancel()});const a=this.getKeyframes(e);a!==null&&this[y].animate(a,{duration:250,easing:b.EASING.EMPHASIZED})}getKeyframes(e){var h;const a=S();if(!this.active)return a?[{opacity:1},{transform:"none"}]:null;const o={},s=((h=e[y])==null?void 0:h.getBoundingClientRect())??{},i=s.left,c=s.width,r=this[y].getBoundingClientRect(),d=r.left,p=r.width,v=c/p;return!a&&i!==void 0&&d!==void 0&&!isNaN(v)?o.transform=`translateX(${(i-d).toFixed(4)}px) scaleX(${v.toFixed(4)})`:o.opacity=0,[o,{transform:"none"}]}handleSlotChange(){this.iconOnly=!1;for(const e of this.assignedDefaultNodes){const a=e.nodeType===Node.TEXT_NODE&&!!e.wholeText.match(/\S/);if(e.nodeType===Node.ELEMENT_NODE||a)return}this.iconOnly=!0}handleIconSlotChange(){this.hasIcon=this.assignedIcons.length>0}};t.__decorate([t.n({type:Boolean,reflect:!0,attribute:"md-tab"})],l.prototype,"isTab",void 0);t.__decorate([t.n({type:Boolean,reflect:!0})],l.prototype,"active",void 0);t.__decorate([t.n({type:Boolean})],l.prototype,"selected",null);t.__decorate([t.n({type:Boolean,attribute:"has-icon"})],l.prototype,"hasIcon",void 0);t.__decorate([t.n({type:Boolean,attribute:"icon-only"})],l.prototype,"iconOnly",void 0);t.__decorate([b.e$1(".indicator")],l.prototype,I,void 0);t.__decorate([b.r()],l.prototype,"fullWidthIndicator",void 0);t.__decorate([z.n({flatten:!0})],l.prototype,"assignedDefaultNodes",void 0);t.__decorate([C.o({slot:"icon",flatten:!0})],l.prototype,"assignedIcons",void 0);function S(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}/** + */const g=_.mixinDelegatesAria(r.r);class o extends g{constructor(){super(...arguments),this.size="medium",this.label="",this.lowered=!1}render(){const{ariaLabel:e}=this;return r.x` + + `}getRenderClasses(){const e=!!this.label;return{lowered:this.lowered,small:this.size==="small"&&!e,large:this.size==="large"&&!e,extended:e}}renderTouchTarget(){return r.x`
`}renderLabel(){return this.label?r.x`${this.label}`:""}renderIcon(){const{ariaLabel:e}=this;return r.x` + + + + `}}o.shadowRootOptions={mode:"open",delegatesFocus:!0};r.__decorate([r.n({reflect:!0})],o.prototype,"size",void 0);r.__decorate([r.n()],o.prototype,"label",void 0);r.__decorate([r.n({type:Boolean})],o.prototype,"lowered",void 0);/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let m=class extends t.r{get activeTab(){return this.tabs.find(e=>e.active)??null}set activeTab(e){e&&this.activateTab(e)}get activeTabIndex(){return this.tabs.findIndex(e=>e.active)}set activeTabIndex(e){const a=()=>{const o=this.tabs[e];o&&this.activateTab(o)};if(!this.slotElement){this.updateComplete.then(a);return}a()}get focusedTab(){return this.tabs.find(e=>e.matches(":focus-within"))}constructor(){super(),this.autoActivate=!1,this.internals=this.attachInternals(),this.internals.role="tablist",this.addEventListener("keydown",this.handleKeydown.bind(this)),this.addEventListener("keyup",this.handleKeyup.bind(this)),this.addEventListener("focusout",this.handleFocusout.bind(this))}async scrollToTab(e){await this.updateComplete;const{tabs:a}=this;if(e??(e=this.activeTab),!e||!a.includes(e)||!this.tabsScrollerElement)return;for(const u of this.tabs)await u.updateComplete;const o=e.offsetLeft,s=e.offsetWidth,i=this.scrollLeft,c=this.offsetWidth,r=48,d=o-r,p=o+s-c+r,v=Math.min(d,Math.max(p,i)),h=this.focusedTab?"auto":"instant";this.tabsScrollerElement.scrollTo({behavior:h,top:0,left:v})}render(){return t.x` -
- -
- - `}async handleTabClick(e){const a=e.target;await 0,!(e.defaultPrevented||!A(a)||a.active)&&this.activateTab(a)}activateTab(e){const{tabs:a}=this,o=this.activeTab;if(!(!a.includes(e)||o===e)){for(const s of a)s.active=s===e;if(o){if(!this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))){for(const i of a)i.active=i===o;return}e[E](o)}this.updateFocusableTab(e),this.scrollToTab(e)}}updateFocusableTab(e){for(const a of this.tabs)a.tabIndex=a===e?0:-1}async handleKeydown(e){await 0;const a=e.key==="ArrowLeft",o=e.key==="ArrowRight",s=e.key==="Home",i=e.key==="End";if(e.defaultPrevented||!a&&!o&&!s&&!i)return;const{tabs:c}=this;if(c.length<2)return;e.preventDefault();let r;if(s||i)r=s?0:c.length-1;else{const v=getComputedStyle(this).direction==="rtl"?a:o,{focusedTab:h}=this;if(!h)r=v?0:c.length-1;else{const u=this.tabs.indexOf(h);r=v?u+1:u-1,r>=c.length?r=0:r<0&&(r=c.length-1)}}const d=c[r];d.focus(),this.autoActivate?this.activateTab(d):this.updateFocusableTab(d)}handleKeyup(){this.scrollToTab(this.focusedTab??this.activeTab)}handleFocusout(){if(this.matches(":focus-within"))return;const{activeTab:e}=this;e&&this.updateFocusableTab(e)}handleSlotChange(){const e=this.tabs[0];!this.activeTab&&e&&this.activateTab(e),this.scrollToTab(this.activeTab)}};t.__decorate([C.o({flatten:!0,selector:"[md-tab]"})],m.prototype,"tabs",void 0);t.__decorate([t.n({type:Number,attribute:"active-tab-index"})],m.prototype,"activeTabIndex",null);t.__decorate([t.n({type:Boolean,attribute:"auto-activate"})],m.prototype,"autoActivate",void 0);t.__decorate([b.e$1(".tabs")],m.prototype,"tabsScrollerElement",void 0);t.__decorate([b.e$1("slot")],m.prototype,"slotElement",void 0);function A(n){return n instanceof HTMLElement&&n.hasAttribute("md-tab")}/** + */class m extends o{constructor(){super(...arguments),this.variant="surface"}getRenderClasses(){return{...super.getRenderClasses(),primary:this.variant==="primary",secondary:this.variant==="secondary",tertiary:this.variant==="tertiary"}}}r.__decorate([r.n()],m.prototype,"variant",void 0);/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const P=t.i$1`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1} -`;/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let f=class extends m{};f.styles=[P];f=t.__decorate([t.t$1("md-tabs")],f);/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */class $ extends l{constructor(){super(...arguments),this.inlineIcon=!1}getContentClasses(){return{...super.getContentClasses(),stacked:!this.inlineIcon}}}t.__decorate([t.n({type:Boolean,attribute:"inline-icon"})],$.prototype,"inlineIcon",void 0);/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const R=t.i$1`:host{--_active-indicator-color: var(--md-primary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--md-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--md-primary-tab-active-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--md-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--md-primary-tab-active-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--md-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--md-primary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-primary-tab-container-elevation, 0);--_container-height: var(--md-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--md-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--md-primary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--md-primary-tab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-primary-tab-active-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--md-primary-tab-active-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_active-icon-color: var(--md-primary-tab-active-icon-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--md-primary-tab-active-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-primary-tab-icon-size, 24px);--_focus-icon-color: var(--md-primary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-primary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-color: var(--md-primary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-primary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-primary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-primary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-primary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-primary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--md-primary-tab-active-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--md-primary-tab-active-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-label-text-color: var(--md-primary-tab-active-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--md-primary-tab-active-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-label-text-color: var(--md-primary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-primary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-color: var(--md-primary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-primary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-primary-tab-container-shape-start-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-primary-tab-container-shape-start-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-primary-tab-container-shape-end-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-primary-tab-container-shape-end-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)} + */const x=r.i$1`:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab{cursor:inherit}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)} `;/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const k=t.i$1`:host{display:inline-flex;align-items:center;justify-content:center;outline:none;padding:0 16px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:middle;user-select:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);color:var(--_label-text-color);z-index:0;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);--md-elevation-level: var(--_container-elevation)}md-focus-ring{--md-focus-ring-shape: 8px}:host([active]) md-focus-ring{margin-bottom:calc(var(--_active-indicator-height) + 1px)}.button::before{background:var(--_container-color);content:"";inset:0;position:absolute;z-index:-1}.button::before,md-ripple,md-elevation{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start)}.content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;height:var(--_container-height);gap:8px}.indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_active-indicator-color);border-radius:var(--_active-indicator-shape);height:var(--_active-indicator-height);inset:auto 0 0 0;opacity:0}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size)}:host(:hover){color:var(--_hover-label-text-color);cursor:pointer}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus){color:var(--_focus-label-text-color)}:host(:focus) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active){color:var(--_pressed-label-text-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([active]) .indicator{opacity:1}:host([active]){color:var(--_active-label-text-color);--md-ripple-hover-color: var(--_active-hover-state-layer-color);--md-ripple-hover-opacity: var(--_active-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_active-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_active-pressed-state-layer-opacity)}:host([active]) ::slotted([slot=icon]){color:var(--_active-icon-color)}:host([active]:hover){color:var(--_active-hover-label-text-color)}:host([active]:hover) ::slotted([slot=icon]){color:var(--_active-hover-icon-color)}:host([active]:focus){color:var(--_active-focus-label-text-color)}:host([active]:focus) ::slotted([slot=icon]){color:var(--_active-focus-icon-color)}:host([active]:active){color:var(--_active-pressed-label-text-color)}:host([active]:active) ::slotted([slot=icon]){color:var(--_active-pressed-icon-color)}:host,::slotted(*){white-space:nowrap}@media(forced-colors: active){.indicator{background:CanvasText}} + */const y=r.i$1`@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}} `;/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let _=class extends ${};_.styles=[k,R];_=t.__decorate([t.t$1("md-primary-tab")],_);/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */class q extends l{constructor(){super(...arguments),this.fullWidthIndicator=!0}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const F=t.i$1`:host{--_active-indicator-color: var(--md-secondary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--md-secondary-tab-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-secondary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-secondary-tab-container-elevation, 0);--_container-height: var(--md-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--md-secondary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-secondary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-secondary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--md-secondary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-secondary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-secondary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-secondary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-secondary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-secondary-tab-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--md-secondary-tab-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--md-secondary-tab-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-secondary-tab-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--md-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--md-secondary-tab-active-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--md-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--md-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--md-secondary-tab-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-secondary-tab-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--md-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--md-secondary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-secondary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-secondary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-size: var(--md-secondary-tab-icon-size, 24px);--_icon-color: var(--md-secondary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-secondary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-secondary-tab-container-shape-start-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-secondary-tab-container-shape-start-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-secondary-tab-container-shape-end-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-secondary-tab-container-shape-end-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))} + */const h=r.i$1`:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)} +`;/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let t=class extends m{};t.styles=[h,x,y];t=r.__decorate([r.t$1("md-fab")],t);/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const u=r.i$1`:host{--_container-color: var(--md-fab-branded-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-branded-container-elevation, 3);--_container-height: var(--md-fab-branded-container-height, 56px);--_container-shadow-color: var(--md-fab-branded-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-branded-container-width, 56px);--_focus-container-elevation: var(--md-fab-branded-focus-container-elevation, 3);--_hover-container-elevation: var(--md-fab-branded-hover-container-elevation, 4);--_hover-state-layer-color: var(--md-fab-branded-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-branded-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-fab-branded-icon-size, 36px);--_lowered-container-color: var(--md-fab-branded-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-branded-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-branded-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-branded-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-branded-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-branded-pressed-container-elevation, 3);--_pressed-state-layer-color: var(--md-fab-branded-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-branded-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-branded-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-branded-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-branded-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-fab-branded-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-size: var(--md-fab-branded-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-line-height: var(--md-fab-branded-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-weight: var(--md-fab-branded-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-branded-large-container-height, 96px);--_large-container-width: var(--md-fab-branded-large-container-width, 96px);--_large-icon-size: var(--md-fab-branded-large-icon-size, 48px);--_pressed-label-text-color: var(--md-fab-branded-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-fab-branded-container-shape-start-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-branded-container-shape-start-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-branded-container-shape-end-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-branded-container-shape-end-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-branded-large-container-shape-start-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-branded-large-container-shape-start-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-branded-large-container-shape-end-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-branded-large-container-shape-end-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)))} `;/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let x=class extends q{};x.styles=[k,F];x=t.__decorate([t.t$1("md-secondary-tab")],x);const O=T.o({react:g,tagName:"md-tabs",elementClass:f}),B=T.o({react:g,tagName:"md-primary-tab",elementClass:_}),L=T.o({react:g,tagName:"md-secondary-tab",elementClass:x}),D=n=>{const{children:e,className:a,style:o,id:s,activeTabIndex:i,onChange:c,...r}=n;return w.jsx(O,{className:a,style:o,id:s,activeTabIndex:i,onChange:c,...r,children:e})},K=n=>{const{children:e,className:a,style:o,id:s,selected:i,variant:c="primary",onClick:r,...d}=n,p=c==="primary"?B:L;return w.jsx(p,{className:a,style:o,id:s,selected:i,onClick:r,...d,children:e})};exports.Tab=K;exports.Tabs=D; + */let n=class extends m{getRenderClasses(){return{...super.getRenderClasses(),primary:!1,secondary:!1,tertiary:!1,small:!1}}};n.styles=[h,u,y];n=r.__decorate([r.t$1("md-branded-fab")],n);const w=f.o({react:p,tagName:"md-fab",elementClass:t}),z=a=>{const{children:e,className:s,...l}=a,c=a.variant||"surface",d=a.size||"medium",i=a.label||"",v=a.lowered||!1;return b.jsx(w,{...l,className:s,variant:c,size:d,label:i,lowered:v,children:e})},$=f.o({react:p,tagName:"md-branded-fab",elementClass:n}),F=a=>{const{children:e,className:s,...l}=a,c=a.variant||"surface",d=a.size||"medium",i=a.label||"",v=a.lowered||!1;return b.jsx($,{...l,className:s,variant:c,size:d,label:i,lowered:v,children:e})};exports.BrandedFAB=F;exports.FAB=z; diff --git a/dist/react-you-ui20.mjs b/dist/react-you-ui20.mjs index 037d3d0..6be3efa 100644 --- a/dist/react-you-ui20.mjs +++ b/dist/react-you-ui20.mjs @@ -1,395 +1,172 @@ -import { jsx as z } from "react/jsx-runtime"; -import w from "react"; -import { o as C } from "./create-component-CVXl33PD.mjs"; -import { _ as r, n as v, r as $, x as T, c as R, E as k, a as g, b as I } from "./class-map-CwiboTfb.mjs"; -import "./divider-Diu_1O5h.mjs"; -import { r as F, a as E, E as B } from "./animation-DjClVFum.mjs"; -import { o as M } from "./query-assigned-elements-DUhez03i.mjs"; +import { jsx as h } from "react/jsx-runtime"; +import _ from "react"; +import { o as g } from "./create-component-CVXl33PD.mjs"; +import { _ as e, n as l, x as t, c as z, E as y, r as $, a as d, b as x } from "./class-map-CwiboTfb.mjs"; import "./elevation-Dg8ssDJC.mjs"; import "./ripple-pQcEjR05.mjs"; -import { n as L } from "./query-assigned-nodes-MKI2zKDb.mjs"; -import { m as O } from "./focusable-CDJoU7XD.mjs"; +import { m as F } from "./delegate-BXi1gVeU.mjs"; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -var N; -const m = Symbol("indicator"), S = Symbol("animateIndicator"), D = O($); -let l = class extends D { - /** - * @deprecated use `active` - */ - get selected() { - return this.active; - } - set selected(t) { - this.active = t; - } +const R = F($); +class o extends R { constructor() { - super(), this.isTab = !0, this.active = !1, this.hasIcon = !1, this.iconOnly = !1, this.fullWidthIndicator = !1, this.internals = // Cast needed for closure - this.attachInternals(), this.internals.role = "tab", this.addEventListener("keydown", this.handleKeydown.bind(this)); + super(...arguments), this.size = "medium", this.label = "", this.lowered = !1; } render() { - const t = T`
`; - return T``; - } - getContentClasses() { - return { - "has-icon": this.hasIcon, - "has-label": !this.iconOnly - }; - } - updated() { - this.internals.ariaSelected = String(this.active); - } - async handleKeydown(t) { - await 0, !t.defaultPrevented && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.click()); - } - handleContentClick(t) { - t.stopPropagation(), this.click(); - } - [(N = m, S)](t) { - if (!this[m]) - return; - this[m].getAnimations().forEach((a) => { - a.cancel(); - }); - const e = this.getKeyframes(t); - e !== null && this[m].animate(e, { - duration: 250, - easing: B.EMPHASIZED - }); - } - getKeyframes(t) { - var p; - const e = K(); - if (!this.active) - return e ? [{ opacity: 1 }, { transform: "none" }] : null; - const a = {}, s = ((p = t[m]) == null ? void 0 : p.getBoundingClientRect()) ?? {}, i = s.left, c = s.width, o = this[m].getBoundingClientRect(), d = o.left, b = o.width, h = c / b; - return !e && i !== void 0 && d !== void 0 && !isNaN(h) ? a.transform = `translateX(${(i - d).toFixed(4)}px) scaleX(${h.toFixed(4)})` : a.opacity = 0, [a, { transform: "none" }]; - } - handleSlotChange() { - this.iconOnly = !1; - for (const t of this.assignedDefaultNodes) { - const e = t.nodeType === Node.TEXT_NODE && !!t.wholeText.match(/\S/); - if (t.nodeType === Node.ELEMENT_NODE || e) - return; - } - this.iconOnly = !0; - } - handleIconSlotChange() { - this.hasIcon = this.assignedIcons.length > 0; - } -}; -r([ - v({ type: Boolean, reflect: !0, attribute: "md-tab" }) -], l.prototype, "isTab", void 0); -r([ - v({ type: Boolean, reflect: !0 }) -], l.prototype, "active", void 0); -r([ - v({ type: Boolean }) -], l.prototype, "selected", null); -r([ - v({ type: Boolean, attribute: "has-icon" }) -], l.prototype, "hasIcon", void 0); -r([ - v({ type: Boolean, attribute: "icon-only" }) -], l.prototype, "iconOnly", void 0); -r([ - E(".indicator") -], l.prototype, N, void 0); -r([ - F() -], l.prototype, "fullWidthIndicator", void 0); -r([ - L({ flatten: !0 }) -], l.prototype, "assignedDefaultNodes", void 0); -r([ - M({ slot: "icon", flatten: !0 }) -], l.prototype, "assignedIcons", void 0); -function K() { - return window.matchMedia("(prefers-reduced-motion: reduce)").matches; -} -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let y = class extends $ { - /** - * The currently selected tab, `null` only when there are no tab children. - * - * @export - */ - get activeTab() { - return this.tabs.find((t) => t.active) ?? null; - } - set activeTab(t) { - t && this.activateTab(t); - } - /** - * The index of the currently selected tab. - * - * @export - */ - get activeTabIndex() { - return this.tabs.findIndex((t) => t.active); - } - set activeTabIndex(t) { - const e = () => { - const a = this.tabs[t]; - a && this.activateTab(a); - }; - if (!this.slotElement) { - this.updateComplete.then(e); - return; - } - e(); - } - get focusedTab() { - return this.tabs.find((t) => t.matches(":focus-within")); - } - constructor() { - super(), this.autoActivate = !1, this.internals = // Cast needed for closure - this.attachInternals(), this.internals.role = "tablist", this.addEventListener("keydown", this.handleKeydown.bind(this)), this.addEventListener("keyup", this.handleKeyup.bind(this)), this.addEventListener("focusout", this.handleFocusout.bind(this)); - } - /** - * Scrolls the toolbar, if overflowing, to the active tab, or the provided - * tab. - * - * @param tabToScrollTo The tab that should be scrolled to. Defaults to the - * active tab. - * @return A Promise that resolves after the tab has been scrolled to. - */ - async scrollToTab(t) { - await this.updateComplete; - const { tabs: e } = this; - if (t ?? (t = this.activeTab), !t || !e.includes(t) || !this.tabsScrollerElement) - return; - for (const f of this.tabs) - await f.updateComplete; - const a = t.offsetLeft, s = t.offsetWidth, i = this.scrollLeft, c = this.offsetWidth, o = 48, d = a - o, b = a + s - c + o, h = Math.min(d, Math.max(b, i)), p = this.focusedTab ? "auto" : "instant"; - this.tabsScrollerElement.scrollTo({ behavior: p, top: 0, left: h }); - } - render() { - return T` -
- -
- + const { ariaLabel: a } = this; + return t` + `; } - async handleTabClick(t) { - const e = t.target; - await 0, !(t.defaultPrevented || !W(e) || e.active) && this.activateTab(e); - } - activateTab(t) { - const { tabs: e } = this, a = this.activeTab; - if (!(!e.includes(t) || a === t)) { - for (const s of e) - s.active = s === t; - if (a) { - if (!this.dispatchEvent(new Event("change", { bubbles: !0, cancelable: !0 }))) { - for (const i of e) - i.active = i === a; - return; - } - t[S](a); - } - this.updateFocusableTab(t), this.scrollToTab(t); - } - } - updateFocusableTab(t) { - for (const e of this.tabs) - e.tabIndex = e === t ? 0 : -1; - } - // focus item on keydown and optionally select it - async handleKeydown(t) { - await 0; - const e = t.key === "ArrowLeft", a = t.key === "ArrowRight", s = t.key === "Home", i = t.key === "End"; - if (t.defaultPrevented || !e && !a && !s && !i) - return; - const { tabs: c } = this; - if (c.length < 2) - return; - t.preventDefault(); - let o; - if (s || i) - o = s ? 0 : c.length - 1; - else { - const h = getComputedStyle(this).direction === "rtl" ? e : a, { focusedTab: p } = this; - if (!p) - o = h ? 0 : c.length - 1; - else { - const f = this.tabs.indexOf(p); - o = h ? f + 1 : f - 1, o >= c.length ? o = 0 : o < 0 && (o = c.length - 1); - } - } - const d = c[o]; - d.focus(), this.autoActivate ? this.activateTab(d) : this.updateFocusableTab(d); - } - // scroll to item on keyup. - handleKeyup() { - this.scrollToTab(this.focusedTab ?? this.activeTab); - } - handleFocusout() { - if (this.matches(":focus-within")) - return; - const { activeTab: t } = this; - t && this.updateFocusableTab(t); - } - handleSlotChange() { - const t = this.tabs[0]; - !this.activeTab && t && this.activateTab(t), this.scrollToTab(this.activeTab); - } -}; -r([ - M({ flatten: !0, selector: "[md-tab]" }) -], y.prototype, "tabs", void 0); -r([ - v({ type: Number, attribute: "active-tab-index" }) -], y.prototype, "activeTabIndex", null); -r([ - v({ type: Boolean, attribute: "auto-activate" }) -], y.prototype, "autoActivate", void 0); -r([ - E(".tabs") -], y.prototype, "tabsScrollerElement", void 0); -r([ - E("slot") -], y.prototype, "slotElement", void 0); -function W(n) { - return n instanceof HTMLElement && n.hasAttribute("md-tab"); -} -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const j = g`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1} -`; -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let u = class extends y { -}; -u.styles = [j]; -u = r([ - I("md-tabs") -], u); -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -class P extends l { - constructor() { - super(...arguments), this.inlineIcon = !1; - } - getContentClasses() { + getRenderClasses() { + const a = !!this.label; return { - ...super.getContentClasses(), - stacked: !this.inlineIcon + lowered: this.lowered, + small: this.size === "small" && !a, + large: this.size === "large" && !a, + extended: a + }; + } + renderTouchTarget() { + return t`
`; + } + renderLabel() { + return this.label ? t`${this.label}` : ""; + } + renderIcon() { + const { ariaLabel: a } = this; + return t` + + + + `; + } +} +o.shadowRootOptions = { + mode: "open", + delegatesFocus: !0 +}; +e([ + l({ reflect: !0 }) +], o.prototype, "size", void 0); +e([ + l() +], o.prototype, "label", void 0); +e([ + l({ type: Boolean }) +], o.prototype, "lowered", void 0); +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class f extends o { + constructor() { + super(...arguments), this.variant = "surface"; + } + getRenderClasses() { + return { + ...super.getRenderClasses(), + primary: this.variant === "primary", + secondary: this.variant === "secondary", + tertiary: this.variant === "tertiary" }; } } -r([ - v({ type: Boolean, attribute: "inline-icon" }) -], P.prototype, "inlineIcon", void 0); +e([ + l() +], f.prototype, "variant", void 0); /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const H = g`:host{--_active-indicator-color: var(--md-primary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--md-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--md-primary-tab-active-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--md-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--md-primary-tab-active-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--md-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--md-primary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-primary-tab-container-elevation, 0);--_container-height: var(--md-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--md-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--md-primary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--md-primary-tab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-primary-tab-active-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--md-primary-tab-active-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_active-icon-color: var(--md-primary-tab-active-icon-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--md-primary-tab-active-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-primary-tab-icon-size, 24px);--_focus-icon-color: var(--md-primary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-primary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-color: var(--md-primary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-primary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-primary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-primary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-primary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-primary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--md-primary-tab-active-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--md-primary-tab-active-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-label-text-color: var(--md-primary-tab-active-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--md-primary-tab-active-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-label-text-color: var(--md-primary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-primary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-color: var(--md-primary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-primary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-primary-tab-container-shape-start-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-primary-tab-container-shape-start-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-primary-tab-container-shape-end-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-primary-tab-container-shape-end-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)} +const B = d`:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab{cursor:inherit}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)} `; /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const A = g`:host{display:inline-flex;align-items:center;justify-content:center;outline:none;padding:0 16px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:middle;user-select:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);color:var(--_label-text-color);z-index:0;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);--md-elevation-level: var(--_container-elevation)}md-focus-ring{--md-focus-ring-shape: 8px}:host([active]) md-focus-ring{margin-bottom:calc(var(--_active-indicator-height) + 1px)}.button::before{background:var(--_container-color);content:"";inset:0;position:absolute;z-index:-1}.button::before,md-ripple,md-elevation{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start)}.content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;height:var(--_container-height);gap:8px}.indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_active-indicator-color);border-radius:var(--_active-indicator-shape);height:var(--_active-indicator-height);inset:auto 0 0 0;opacity:0}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size)}:host(:hover){color:var(--_hover-label-text-color);cursor:pointer}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus){color:var(--_focus-label-text-color)}:host(:focus) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active){color:var(--_pressed-label-text-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([active]) .indicator{opacity:1}:host([active]){color:var(--_active-label-text-color);--md-ripple-hover-color: var(--_active-hover-state-layer-color);--md-ripple-hover-opacity: var(--_active-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_active-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_active-pressed-state-layer-opacity)}:host([active]) ::slotted([slot=icon]){color:var(--_active-icon-color)}:host([active]:hover){color:var(--_active-hover-label-text-color)}:host([active]:hover) ::slotted([slot=icon]){color:var(--_active-hover-icon-color)}:host([active]:focus){color:var(--_active-focus-label-text-color)}:host([active]:focus) ::slotted([slot=icon]){color:var(--_active-focus-icon-color)}:host([active]:active){color:var(--_active-pressed-label-text-color)}:host([active]:active) ::slotted([slot=icon]){color:var(--_active-pressed-icon-color)}:host,::slotted(*){white-space:nowrap}@media(forced-colors: active){.indicator{background:CanvasText}} +const u = d`@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}} `; /** * @license - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let x = class extends P { +const w = d`:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)} +`; +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let n = class extends f { }; -x.styles = [A, H]; -x = r([ - I("md-primary-tab") -], x); +n.styles = [w, B, u]; +n = e([ + x("md-fab") +], n); +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const C = d`:host{--_container-color: var(--md-fab-branded-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-branded-container-elevation, 3);--_container-height: var(--md-fab-branded-container-height, 56px);--_container-shadow-color: var(--md-fab-branded-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-branded-container-width, 56px);--_focus-container-elevation: var(--md-fab-branded-focus-container-elevation, 3);--_hover-container-elevation: var(--md-fab-branded-hover-container-elevation, 4);--_hover-state-layer-color: var(--md-fab-branded-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-branded-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-fab-branded-icon-size, 36px);--_lowered-container-color: var(--md-fab-branded-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-branded-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-branded-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-branded-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-branded-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-branded-pressed-container-elevation, 3);--_pressed-state-layer-color: var(--md-fab-branded-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-branded-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-branded-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-branded-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-branded-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-fab-branded-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-size: var(--md-fab-branded-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-line-height: var(--md-fab-branded-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-weight: var(--md-fab-branded-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-branded-large-container-height, 96px);--_large-container-width: var(--md-fab-branded-large-container-width, 96px);--_large-icon-size: var(--md-fab-branded-large-icon-size, 48px);--_pressed-label-text-color: var(--md-fab-branded-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-fab-branded-container-shape-start-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-branded-container-shape-start-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-branded-container-shape-end-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-branded-container-shape-end-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-branded-large-container-shape-start-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-branded-large-container-shape-start-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-branded-large-container-shape-end-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-branded-large-container-shape-end-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)))} +`; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class X extends l { - constructor() { - super(...arguments), this.fullWidthIndicator = !0; +let s = class extends f { + getRenderClasses() { + return { + ...super.getRenderClasses(), + primary: !1, + secondary: !1, + tertiary: !1, + small: !1 + }; } -} -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const G = g`:host{--_active-indicator-color: var(--md-secondary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--md-secondary-tab-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-secondary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-secondary-tab-container-elevation, 0);--_container-height: var(--md-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--md-secondary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-secondary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-secondary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--md-secondary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-secondary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-secondary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-secondary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-secondary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-secondary-tab-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--md-secondary-tab-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--md-secondary-tab-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-secondary-tab-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--md-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--md-secondary-tab-active-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--md-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--md-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--md-secondary-tab-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-secondary-tab-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--md-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--md-secondary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-secondary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-secondary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-size: var(--md-secondary-tab-icon-size, 24px);--_icon-color: var(--md-secondary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-secondary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-secondary-tab-container-shape-start-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-secondary-tab-container-shape-start-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-secondary-tab-container-shape-end-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-secondary-tab-container-shape-end-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))} -`; -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let _ = class extends X { }; -_.styles = [A, G]; -_ = r([ - I("md-secondary-tab") -], _); -const Z = C({ - react: w, - tagName: "md-tabs", - elementClass: u -}), q = C({ - react: w, - tagName: "md-primary-tab", - elementClass: x -}), J = C({ - react: w, - tagName: "md-secondary-tab", - elementClass: _ -}), ht = (n) => { - const { children: t, className: e, style: a, id: s, activeTabIndex: i, onChange: c, ...o } = n; - return /* @__PURE__ */ z(Z, { className: e, style: a, id: s, activeTabIndex: i, onChange: c, ...o, children: t }); -}, pt = (n) => { - const { children: t, className: e, style: a, id: s, selected: i, variant: c = "primary", onClick: o, ...d } = n; - return /* @__PURE__ */ z(c === "primary" ? q : J, { className: e, style: a, id: s, selected: i, onClick: o, ...d, children: t }); +s.styles = [ + w, + C, + u +]; +s = e([ + x("md-branded-fab") +], s); +const k = g({ + react: _, + tagName: "md-fab", + elementClass: n +}), S = (r) => { + const { children: a, className: c, ...i } = r, v = r.variant || "surface", m = r.size || "medium", b = r.label || "", p = r.lowered || !1; + return /* @__PURE__ */ h(k, { ...i, className: c, variant: v, size: m, label: b, lowered: p, children: a }); +}, M = g({ + react: _, + tagName: "md-branded-fab", + elementClass: s +}), q = (r) => { + const { children: a, className: c, ...i } = r, v = r.variant || "surface", m = r.size || "medium", b = r.label || "", p = r.lowered || !1; + return /* @__PURE__ */ h(M, { ...i, className: c, variant: v, size: m, label: b, lowered: p, children: a }); }; export { - pt as Tab, - ht as Tabs + q as BrandedFAB, + S as FAB }; diff --git a/dist/react-you-ui21.js b/dist/react-you-ui21.js index aa8905a..a3c1508 100644 --- a/dist/react-you-ui21.js +++ b/dist/react-you-ui21.js @@ -1,79 +1,71 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),d=require("./create-component-D9KTUrcf.js"),e=require("./class-map-DV5418hw.js");require("./ripple-DoKzzEey.js");const x=require("./animation-A38fZ1oY.js"),v=require("./static-B9XIUGOk.js"),$=require("./delegate-4958lG3m.js"),I=require("./form-submitter-of9aDP_O.js"),p=require("./element-internals-OOm6rgx-.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),g=require("react"),T=require("./create-component-D9KTUrcf.js"),t=require("./class-map-DV5418hw.js");require("./divider-B6Y1F7cS.js");const b=require("./animation-A38fZ1oY.js"),C=require("./query-assigned-elements-BYttmtWz.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const z=require("./query-assigned-nodes-Dl8k4w_-.js"),M=require("./focusable-D3uHX6nn.js");/** * @license - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */function f(t,r=!0){return r&&getComputedStyle(t).getPropertyValue("direction").trim()==="rtl"}/** + */var I;const y=Symbol("indicator"),E=Symbol("animateIndicator"),N=M.mixinFocusable(t.r);let l=class extends N{get selected(){return this.active}set selected(e){this.active=e}constructor(){super(),this.isTab=!0,this.active=!1,this.hasIcon=!1,this.iconOnly=!1,this.fullWidthIndicator=!1,this.internals=this.attachInternals(),this.internals.role="tab",this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e=t.x`
`;return t.x``}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(I=y,E)](e){if(!this[y])return;this[y].getAnimations().forEach(o=>{o.cancel()});const a=this.getKeyframes(e);a!==null&&this[y].animate(a,{duration:250,easing:b.EASING.EMPHASIZED})}getKeyframes(e){var h;const a=S();if(!this.active)return a?[{opacity:1},{transform:"none"}]:null;const o={},s=((h=e[y])==null?void 0:h.getBoundingClientRect())??{},i=s.left,c=s.width,r=this[y].getBoundingClientRect(),d=r.left,p=r.width,v=c/p;return!a&&i!==void 0&&d!==void 0&&!isNaN(v)?o.transform=`translateX(${(i-d).toFixed(4)}px) scaleX(${v.toFixed(4)})`:o.opacity=0,[o,{transform:"none"}]}handleSlotChange(){this.iconOnly=!1;for(const e of this.assignedDefaultNodes){const a=e.nodeType===Node.TEXT_NODE&&!!e.wholeText.match(/\S/);if(e.nodeType===Node.ELEMENT_NODE||a)return}this.iconOnly=!0}handleIconSlotChange(){this.hasIcon=this.assignedIcons.length>0}};t.__decorate([t.n({type:Boolean,reflect:!0,attribute:"md-tab"})],l.prototype,"isTab",void 0);t.__decorate([t.n({type:Boolean,reflect:!0})],l.prototype,"active",void 0);t.__decorate([t.n({type:Boolean})],l.prototype,"selected",null);t.__decorate([t.n({type:Boolean,attribute:"has-icon"})],l.prototype,"hasIcon",void 0);t.__decorate([t.n({type:Boolean,attribute:"icon-only"})],l.prototype,"iconOnly",void 0);t.__decorate([b.e$1(".indicator")],l.prototype,I,void 0);t.__decorate([b.r()],l.prototype,"fullWidthIndicator",void 0);t.__decorate([z.n({flatten:!0})],l.prototype,"assignedDefaultNodes",void 0);t.__decorate([C.o({slot:"icon",flatten:!0})],l.prototype,"assignedIcons",void 0);function S(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}/** * @license - * Copyright 2018 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const k=$.mixinDelegatesAria(p.mixinElementInternals(e.r));let o=class extends k{get name(){return this.getAttribute("name")??""}set name(r){this.setAttribute("name",r)}get form(){return this[p.internals].form}get labels(){return this[p.internals].labels}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.flipIconInRtl=!1,this.href="",this.target="",this.ariaLabelSelected="",this.toggle=!1,this.selected=!1,this.type="submit",this.value="",this.flipIcon=f(this,this.flipIconInRtl),this.addEventListener("click",this.handleClick.bind(this))}willUpdate(){this.href&&(this.disabled=!1,this.softDisabled=!1)}render(){const r=this.href?v.i`div`:v.i`button`,{ariaLabel:b,ariaHasPopup:y,ariaExpanded:m}=this,g=b&&this.ariaLabelSelected,_=this.toggle?this.selected:e.E;let h=e.E;return this.href||(h=g&&this.selected?this.ariaLabelSelected:b),v.u`<${r} - class="icon-button ${e.e$1(this.getRenderClasses())}" - id="button" - aria-label="${h||e.E}" - aria-haspopup="${!this.href&&y||e.E}" - aria-expanded="${!this.href&&m||e.E}" - aria-pressed="${_}" - aria-disabled=${!this.href&&this.softDisabled||e.E} - ?disabled="${!this.href&&this.disabled}" - @click="${this.handleClickOnChild}"> - ${this.renderFocusRing()} - ${this.renderRipple()} - ${this.selected?e.E:this.renderIcon()} - ${this.selected?this.renderSelectedIcon():e.E} - ${this.renderTouchTarget()} - ${this.href&&this.renderLink()} - `}renderLink(){const{ariaLabel:r}=this;return e.x` - - `}getRenderClasses(){return{"flip-icon":this.flipIcon,selected:this.toggle&&this.selected}}renderIcon(){return e.x``}renderSelectedIcon(){return e.x``}renderTouchTarget(){return e.x``}renderFocusRing(){return e.x``}renderRipple(){const r=!this.href&&(this.disabled||this.softDisabled);return e.x``}connectedCallback(){this.flipIcon=f(this,this.flipIconInRtl),super.connectedCallback()}handleClick(r){if(!this.href&&this.softDisabled){r.stopImmediatePropagation(),r.preventDefault();return}}async handleClickOnChild(r){await 0,!(!this.toggle||this.disabled||this.softDisabled||r.defaultPrevented)&&(this.selected=!this.selected,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}};I.setupFormSubmitter(o);o.formAssociated=!0;o.shadowRootOptions={mode:"open",delegatesFocus:!0};e.__decorate([e.n({type:Boolean,reflect:!0})],o.prototype,"disabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"soft-disabled",reflect:!0})],o.prototype,"softDisabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"flip-icon-in-rtl"})],o.prototype,"flipIconInRtl",void 0);e.__decorate([e.n()],o.prototype,"href",void 0);e.__decorate([e.n()],o.prototype,"target",void 0);e.__decorate([e.n({attribute:"aria-label-selected"})],o.prototype,"ariaLabelSelected",void 0);e.__decorate([e.n({type:Boolean})],o.prototype,"toggle",void 0);e.__decorate([e.n({type:Boolean,reflect:!0})],o.prototype,"selected",void 0);e.__decorate([e.n()],o.prototype,"type",void 0);e.__decorate([e.n({reflect:!0})],o.prototype,"value",void 0);e.__decorate([x.r()],o.prototype,"flipIcon",void 0);/** + */let m=class extends t.r{get activeTab(){return this.tabs.find(e=>e.active)??null}set activeTab(e){e&&this.activateTab(e)}get activeTabIndex(){return this.tabs.findIndex(e=>e.active)}set activeTabIndex(e){const a=()=>{const o=this.tabs[e];o&&this.activateTab(o)};if(!this.slotElement){this.updateComplete.then(a);return}a()}get focusedTab(){return this.tabs.find(e=>e.matches(":focus-within"))}constructor(){super(),this.autoActivate=!1,this.internals=this.attachInternals(),this.internals.role="tablist",this.addEventListener("keydown",this.handleKeydown.bind(this)),this.addEventListener("keyup",this.handleKeyup.bind(this)),this.addEventListener("focusout",this.handleFocusout.bind(this))}async scrollToTab(e){await this.updateComplete;const{tabs:a}=this;if(e??(e=this.activeTab),!e||!a.includes(e)||!this.tabsScrollerElement)return;for(const u of this.tabs)await u.updateComplete;const o=e.offsetLeft,s=e.offsetWidth,i=this.scrollLeft,c=this.offsetWidth,r=48,d=o-r,p=o+s-c+r,v=Math.min(d,Math.max(p,i)),h=this.focusedTab?"auto":"instant";this.tabsScrollerElement.scrollTo({behavior:h,top:0,left:v})}render(){return t.x` +
+ +
+ + `}async handleTabClick(e){const a=e.target;await 0,!(e.defaultPrevented||!A(a)||a.active)&&this.activateTab(a)}activateTab(e){const{tabs:a}=this,o=this.activeTab;if(!(!a.includes(e)||o===e)){for(const s of a)s.active=s===e;if(o){if(!this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))){for(const i of a)i.active=i===o;return}e[E](o)}this.updateFocusableTab(e),this.scrollToTab(e)}}updateFocusableTab(e){for(const a of this.tabs)a.tabIndex=a===e?0:-1}async handleKeydown(e){await 0;const a=e.key==="ArrowLeft",o=e.key==="ArrowRight",s=e.key==="Home",i=e.key==="End";if(e.defaultPrevented||!a&&!o&&!s&&!i)return;const{tabs:c}=this;if(c.length<2)return;e.preventDefault();let r;if(s||i)r=s?0:c.length-1;else{const v=getComputedStyle(this).direction==="rtl"?a:o,{focusedTab:h}=this;if(!h)r=v?0:c.length-1;else{const u=this.tabs.indexOf(h);r=v?u+1:u-1,r>=c.length?r=0:r<0&&(r=c.length-1)}}const d=c[r];d.focus(),this.autoActivate?this.activateTab(d):this.updateFocusableTab(d)}handleKeyup(){this.scrollToTab(this.focusedTab??this.activeTab)}handleFocusout(){if(this.matches(":focus-within"))return;const{activeTab:e}=this;e&&this.updateFocusableTab(e)}handleSlotChange(){const e=this.tabs[0];!this.activeTab&&e&&this.activateTab(e),this.scrollToTab(this.activeTab)}};t.__decorate([C.o({flatten:!0,selector:"[md-tab]"})],m.prototype,"tabs",void 0);t.__decorate([t.n({type:Number,attribute:"active-tab-index"})],m.prototype,"activeTabIndex",null);t.__decorate([t.n({type:Boolean,attribute:"auto-activate"})],m.prototype,"autoActivate",void 0);t.__decorate([b.e$1(".tabs")],m.prototype,"tabsScrollerElement",void 0);t.__decorate([b.e$1("slot")],m.prototype,"slotElement",void 0);function A(n){return n instanceof HTMLElement&&n.hasAttribute("md-tab")}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const u=e.i$1`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{height:100%;outline:none;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1}} + */const P=t.i$1`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1} +`;/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let f=class extends m{};f.styles=[P];f=t.__decorate([t.t$1("md-tabs")],f);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class $ extends l{constructor(){super(...arguments),this.inlineIcon=!1}getContentClasses(){return{...super.getContentClasses(),stacked:!this.inlineIcon}}}t.__decorate([t.n({type:Boolean,attribute:"inline-icon"})],$.prototype,"inlineIcon",void 0);/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const R=t.i$1`:host{--_active-indicator-color: var(--md-primary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--md-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--md-primary-tab-active-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--md-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--md-primary-tab-active-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--md-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--md-primary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-primary-tab-container-elevation, 0);--_container-height: var(--md-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--md-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--md-primary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--md-primary-tab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-primary-tab-active-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--md-primary-tab-active-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_active-icon-color: var(--md-primary-tab-active-icon-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--md-primary-tab-active-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-primary-tab-icon-size, 24px);--_focus-icon-color: var(--md-primary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-primary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-color: var(--md-primary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-primary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-primary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-primary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-primary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-primary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--md-primary-tab-active-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--md-primary-tab-active-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-label-text-color: var(--md-primary-tab-active-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--md-primary-tab-active-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-label-text-color: var(--md-primary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-primary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-color: var(--md-primary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-primary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-primary-tab-container-shape-start-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-primary-tab-container-shape-start-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-primary-tab-container-shape-end-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-primary-tab-container-shape-end-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)} `;/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const w=e.i$1`:host{--_disabled-icon-color: var(--md-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-icon-button-disabled-icon-opacity, 0.38);--_icon-size: var(--md-icon-button-icon-size, 24px);--_selected-focus-icon-color: var(--md-icon-button-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-icon-button-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-color: var(--md-icon-button-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-icon-button-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-icon-button-selected-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-icon-button-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-color: var(--md-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-icon-button-selected-pressed-state-layer-opacity, 0.12);--_state-layer-height: var(--md-icon-button-state-layer-height, 40px);--_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));--_state-layer-width: var(--md-icon-button-state-layer-width, 40px);--_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: 0;--_container-shape-start-end: 0;--_container-shape-end-end: 0;--_container-shape-end-start: 0;--_container-height: 0;--_container-width: 0;height:var(--_state-layer-height);width:var(--_state-layer-width)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_state-layer-height))/2) max(0px,(48px - var(--_state-layer-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_state-layer-shape);--md-focus-ring-shape-start-end: var(--_state-layer-shape);--md-focus-ring-shape-end-end: var(--_state-layer-shape);--md-focus-ring-shape-end-start: var(--_state-layer-shape)}.standard{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.standard:hover{color:var(--_hover-icon-color)}.standard:focus{color:var(--_focus-icon-color)}.standard:active{color:var(--_pressed-icon-color)}.standard:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}md-ripple{border-radius:var(--_state-layer-shape)}.standard:is(:disabled,[aria-disabled=true]){opacity:var(--_disabled-icon-opacity)}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)} + */const k=t.i$1`:host{display:inline-flex;align-items:center;justify-content:center;outline:none;padding:0 16px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:middle;user-select:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);color:var(--_label-text-color);z-index:0;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);--md-elevation-level: var(--_container-elevation)}md-focus-ring{--md-focus-ring-shape: 8px}:host([active]) md-focus-ring{margin-bottom:calc(var(--_active-indicator-height) + 1px)}.button::before{background:var(--_container-color);content:"";inset:0;position:absolute;z-index:-1}.button::before,md-ripple,md-elevation{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start)}.content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;height:var(--_container-height);gap:8px}.indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_active-indicator-color);border-radius:var(--_active-indicator-shape);height:var(--_active-indicator-height);inset:auto 0 0 0;opacity:0}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size)}:host(:hover){color:var(--_hover-label-text-color);cursor:pointer}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus){color:var(--_focus-label-text-color)}:host(:focus) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active){color:var(--_pressed-label-text-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([active]) .indicator{opacity:1}:host([active]){color:var(--_active-label-text-color);--md-ripple-hover-color: var(--_active-hover-state-layer-color);--md-ripple-hover-opacity: var(--_active-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_active-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_active-pressed-state-layer-opacity)}:host([active]) ::slotted([slot=icon]){color:var(--_active-icon-color)}:host([active]:hover){color:var(--_active-hover-label-text-color)}:host([active]:hover) ::slotted([slot=icon]){color:var(--_active-hover-icon-color)}:host([active]:focus){color:var(--_active-focus-label-text-color)}:host([active]:focus) ::slotted([slot=icon]){color:var(--_active-focus-icon-color)}:host([active]:active){color:var(--_active-pressed-label-text-color)}:host([active]:active) ::slotted([slot=icon]){color:var(--_active-pressed-icon-color)}:host,::slotted(*){white-space:nowrap}@media(forced-colors: active){.indicator{background:CanvasText}} `;/** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let l=class extends o{getRenderClasses(){return{...super.getRenderClasses(),standard:!0}}};l.styles=[u,w];l=e.__decorate([e.t$1("md-icon-button")],l);/** + */let _=class extends ${};_.styles=[k,R];_=t.__decorate([t.t$1("md-primary-tab")],_);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class q extends l{constructor(){super(...arguments),this.fullWidthIndicator=!0}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const C=e.i$1`:host{--_container-color: var(--md-filled-icon-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-height: var(--md-filled-icon-button-container-height, 40px);--_container-width: var(--md-filled-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-icon-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-icon-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-icon-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-icon-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-icon-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-icon-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-icon-button-selected-container-color, var(--md-sys-color-primary, #6750a4));--_toggle-selected-focus-icon-color: var(--md-filled-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-icon-color: var(--md-filled-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-state-layer-color: var(--md-filled-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-icon-color: var(--md-filled-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-icon-color: var(--md-filled-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-state-layer-color: var(--md-filled-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_unselected-container-color: var(--md-filled-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-icon-button-toggle-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-icon-color: var(--md-filled-icon-button-toggle-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-state-layer-color: var(--md-filled-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_toggle-icon-color: var(--md-filled-icon-button-toggle-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-icon-color: var(--md-filled-icon-button-toggle-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-state-layer-color: var(--md-filled-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-filled-icon-button-container-shape-start-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-icon-button-container-shape-start-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-icon-button-container-shape-end-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-icon-button-container-shape-end-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled:not(:disabled,[aria-disabled=true]){color:var(--_toggle-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true])::before{background-color:var(--_unselected-container-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-selected-pressed-icon-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)} + */const F=t.i$1`:host{--_active-indicator-color: var(--md-secondary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--md-secondary-tab-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-secondary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-secondary-tab-container-elevation, 0);--_container-height: var(--md-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--md-secondary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-secondary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-secondary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--md-secondary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-secondary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-secondary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-secondary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-secondary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-secondary-tab-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--md-secondary-tab-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--md-secondary-tab-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-secondary-tab-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--md-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--md-secondary-tab-active-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--md-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--md-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--md-secondary-tab-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-secondary-tab-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--md-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--md-secondary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-secondary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-secondary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-size: var(--md-secondary-tab-icon-size, 24px);--_icon-color: var(--md-secondary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-secondary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-secondary-tab-container-shape-start-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-secondary-tab-container-shape-start-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-secondary-tab-container-shape-end-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-secondary-tab-container-shape-end-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))} `;/** * @license - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let n=class extends o{getRenderClasses(){return{...super.getRenderClasses(),filled:!0,"toggle-filled":this.toggle}}};n.styles=[u,C];n=e.__decorate([e.t$1("md-filled-icon-button")],n);/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const B=e.i$1`:host{--_container-height: var(--md-outlined-icon-button-container-height, 40px);--_container-width: var(--md-outlined-icon-button-container-width, 40px);--_disabled-icon-color: var(--md-outlined-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-icon-button-disabled-icon-opacity, 0.38);--_disabled-selected-container-color: var(--md-outlined-icon-button-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-outlined-icon-button-disabled-selected-container-opacity, 0.12);--_hover-state-layer-opacity: var(--md-outlined-icon-button-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-outlined-icon-button-icon-size, 24px);--_pressed-state-layer-opacity: var(--md-outlined-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-outlined-icon-button-selected-container-color, var(--md-sys-color-inverse-surface, #322f35));--_selected-focus-icon-color: var(--md-outlined-icon-button-selected-focus-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-hover-icon-color: var(--md-outlined-icon-button-selected-hover-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-hover-state-layer-color: var(--md-outlined-icon-button-selected-hover-state-layer-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-icon-color: var(--md-outlined-icon-button-selected-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-pressed-icon-color: var(--md-outlined-icon-button-selected-pressed-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-pressed-state-layer-color: var(--md-outlined-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_disabled-outline-color: var(--md-outlined-icon-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-icon-button-disabled-outline-opacity, 0.12);--_focus-icon-color: var(--md-outlined-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-outlined-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-outlined-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_icon-color: var(--md-outlined-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-outlined-icon-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-icon-button-outline-width, 1px);--_pressed-icon-color: var(--md-outlined-icon-button-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-outlined-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-outlined-icon-button-container-shape-start-start, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-icon-button-container-shape-start-end, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-icon-button-container-shape-end-end, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-icon-button-container-shape-end-start, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.outlined{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.outlined::before{border-color:var(--_outline-color);border-width:var(--_outline-width)}.outlined:hover{color:var(--_hover-icon-color)}.outlined:focus{color:var(--_focus-icon-color)}.outlined:active{color:var(--_pressed-icon-color)}.outlined:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.outlined:is(:disabled,[aria-disabled=true])::before{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}.outlined:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.outlined::before{block-size:100%;border-style:solid;border-radius:inherit;box-sizing:border-box;content:"";inline-size:100%;inset:0;pointer-events:none;position:absolute;z-index:-1}.outlined.selected::before{border-width:0}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)}.selected:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-outline-opacity: 1}.selected::before{border-color:CanvasText;border-width:var(--_outline-width)}.selected:is(:disabled,[aria-disabled=true])::before{border-color:GrayText;opacity:1}} -`;/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let s=class extends o{getRenderClasses(){return{...super.getRenderClasses(),outlined:!0}}};s.styles=[u,B];s=e.__decorate([e.t$1("md-outlined-icon-button")],s);/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const R=e.i$1`:host{--_container-color: var(--md-filled-tonal-icon-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-height: var(--md-filled-tonal-icon-button-container-height, 40px);--_container-width: var(--md-filled-tonal-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-tonal-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-tonal-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-icon-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-icon-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-icon-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-tonal-icon-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-tonal-icon-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-icon-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-tonal-icon-button-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_toggle-selected-focus-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-hover-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-hover-state-layer-color: var(--md-filled-tonal-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-pressed-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-pressed-state-layer-color: var(--md-filled-tonal-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_unselected-container-color: var(--md-filled-tonal-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-tonal-icon-button-toggle-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-hover-icon-color: var(--md-filled-tonal-icon-button-toggle-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-hover-state-layer-color: var(--md-filled-tonal-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-icon-color: var(--md-filled-tonal-icon-button-toggle-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-pressed-icon-color: var(--md-filled-tonal-icon-button-toggle-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-pressed-state-layer-color: var(--md-filled-tonal-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filled-tonal-icon-button-container-shape-start-start, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-icon-button-container-shape-start-end, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-icon-button-container-shape-end-end, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-icon-button-container-shape-end-start, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled-tonal{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]){color:var(--_toggle-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true])::before{background-color:var(--_unselected-container-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-selected-pressed-icon-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)} -`;/** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let i=class extends o{getRenderClasses(){return{...super.getRenderClasses(),"filled-tonal":!0,"toggle-filled-tonal":this.toggle}}};i.styles=[u,R];i=e.__decorate([e.t$1("md-filled-tonal-icon-button")],i);const z=d.o({react:c,tagName:"md-icon-button",elementClass:l,events:{onChange:"change",onInput:"input",onClick:"click"}}),E=d.o({react:c,tagName:"md-filled-icon-button",elementClass:n,events:{onChange:"change",onInput:"input",onClick:"click"}}),M=d.o({react:c,tagName:"md-outlined-icon-button",elementClass:s,events:{onChange:"change",onInput:"input",onClick:"click"}}),T=d.o({react:c,tagName:"md-filled-tonal-icon-button",elementClass:i,events:{onChange:"change",onInput:"input",onClick:"click"}}),L=t=>{switch(t.variant||"standard"){case"filled":return a.jsx(E,{...t});case"outlined":return a.jsx(M,{...t});case"filled-tonal":return a.jsx(T,{...t});default:return a.jsx(z,{...t})}};exports.IconButton=L; + */let x=class extends q{};x.styles=[k,F];x=t.__decorate([t.t$1("md-secondary-tab")],x);const O=T.o({react:g,tagName:"md-tabs",elementClass:f}),B=T.o({react:g,tagName:"md-primary-tab",elementClass:_}),L=T.o({react:g,tagName:"md-secondary-tab",elementClass:x}),D=n=>{const{children:e,className:a,style:o,id:s,activeTabIndex:i,onChange:c,...r}=n;return w.jsx(O,{className:a,style:o,id:s,activeTabIndex:i,onChange:c,...r,children:e})},K=n=>{const{children:e,className:a,style:o,id:s,selected:i,variant:c="primary",onClick:r,...d}=n,p=c==="primary"?B:L;return w.jsx(p,{className:a,style:o,id:s,selected:i,onClick:r,...d,children:e})};exports.Tab=K;exports.Tabs=D; diff --git a/dist/react-you-ui21.mjs b/dist/react-you-ui21.mjs index e9a62bd..037d3d0 100644 --- a/dist/react-you-ui21.mjs +++ b/dist/react-you-ui21.mjs @@ -1,322 +1,395 @@ -import { jsx as i } from "react/jsx-runtime"; -import p from "react"; -import { o as b } from "./create-component-CVXl33PD.mjs"; -import { _ as r, n as l, E as a, c as $, x as n, r as B, a as s, b as h } from "./class-map-CwiboTfb.mjs"; +import { jsx as z } from "react/jsx-runtime"; +import w from "react"; +import { o as C } from "./create-component-CVXl33PD.mjs"; +import { _ as r, n as v, r as $, x as T, c as R, E as k, a as g, b as I } from "./class-map-CwiboTfb.mjs"; +import "./divider-Diu_1O5h.mjs"; +import { r as F, a as E, E as B } from "./animation-DjClVFum.mjs"; +import { o as M } from "./query-assigned-elements-DUhez03i.mjs"; +import "./elevation-Dg8ssDJC.mjs"; import "./ripple-pQcEjR05.mjs"; -import { r as R } from "./animation-DjClVFum.mjs"; -import { i as g, u as z } from "./static-DdXEOlS4.mjs"; -import { m as M } from "./delegate-BXi1gVeU.mjs"; -import { s as L } from "./form-submitter-ChT3Wi0f.mjs"; -import { m as T, i as _ } from "./element-internals-3IY9gE4L.mjs"; +import { n as L } from "./query-assigned-nodes-MKI2zKDb.mjs"; +import { m as O } from "./focusable-CDJoU7XD.mjs"; /** * @license - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -function x(t, o = !0) { - return o && getComputedStyle(t).getPropertyValue("direction").trim() === "rtl"; +var N; +const m = Symbol("indicator"), S = Symbol("animateIndicator"), D = O($); +let l = class extends D { + /** + * @deprecated use `active` + */ + get selected() { + return this.active; + } + set selected(t) { + this.active = t; + } + constructor() { + super(), this.isTab = !0, this.active = !1, this.hasIcon = !1, this.iconOnly = !1, this.fullWidthIndicator = !1, this.internals = // Cast needed for closure + this.attachInternals(), this.internals.role = "tab", this.addEventListener("keydown", this.handleKeydown.bind(this)); + } + render() { + const t = T`
`; + return T``; + } + getContentClasses() { + return { + "has-icon": this.hasIcon, + "has-label": !this.iconOnly + }; + } + updated() { + this.internals.ariaSelected = String(this.active); + } + async handleKeydown(t) { + await 0, !t.defaultPrevented && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.click()); + } + handleContentClick(t) { + t.stopPropagation(), this.click(); + } + [(N = m, S)](t) { + if (!this[m]) + return; + this[m].getAnimations().forEach((a) => { + a.cancel(); + }); + const e = this.getKeyframes(t); + e !== null && this[m].animate(e, { + duration: 250, + easing: B.EMPHASIZED + }); + } + getKeyframes(t) { + var p; + const e = K(); + if (!this.active) + return e ? [{ opacity: 1 }, { transform: "none" }] : null; + const a = {}, s = ((p = t[m]) == null ? void 0 : p.getBoundingClientRect()) ?? {}, i = s.left, c = s.width, o = this[m].getBoundingClientRect(), d = o.left, b = o.width, h = c / b; + return !e && i !== void 0 && d !== void 0 && !isNaN(h) ? a.transform = `translateX(${(i - d).toFixed(4)}px) scaleX(${h.toFixed(4)})` : a.opacity = 0, [a, { transform: "none" }]; + } + handleSlotChange() { + this.iconOnly = !1; + for (const t of this.assignedDefaultNodes) { + const e = t.nodeType === Node.TEXT_NODE && !!t.wholeText.match(/\S/); + if (t.nodeType === Node.ELEMENT_NODE || e) + return; + } + this.iconOnly = !0; + } + handleIconSlotChange() { + this.hasIcon = this.assignedIcons.length > 0; + } +}; +r([ + v({ type: Boolean, reflect: !0, attribute: "md-tab" }) +], l.prototype, "isTab", void 0); +r([ + v({ type: Boolean, reflect: !0 }) +], l.prototype, "active", void 0); +r([ + v({ type: Boolean }) +], l.prototype, "selected", null); +r([ + v({ type: Boolean, attribute: "has-icon" }) +], l.prototype, "hasIcon", void 0); +r([ + v({ type: Boolean, attribute: "icon-only" }) +], l.prototype, "iconOnly", void 0); +r([ + E(".indicator") +], l.prototype, N, void 0); +r([ + F() +], l.prototype, "fullWidthIndicator", void 0); +r([ + L({ flatten: !0 }) +], l.prototype, "assignedDefaultNodes", void 0); +r([ + M({ slot: "icon", flatten: !0 }) +], l.prototype, "assignedIcons", void 0); +function K() { + return window.matchMedia("(prefers-reduced-motion: reduce)").matches; } /** * @license - * Copyright 2018 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const D = M(T(B)); -let e = class extends D { - get name() { - return this.getAttribute("name") ?? ""; +let y = class extends $ { + /** + * The currently selected tab, `null` only when there are no tab children. + * + * @export + */ + get activeTab() { + return this.tabs.find((t) => t.active) ?? null; } - set name(o) { - this.setAttribute("name", o); + set activeTab(t) { + t && this.activateTab(t); } /** - * The associated form element with which this element's value will submit. + * The index of the currently selected tab. + * + * @export */ - get form() { - return this[_].form; + get activeTabIndex() { + return this.tabs.findIndex((t) => t.active); } - /** - * The labels this element is associated with. - */ - get labels() { - return this[_].labels; - } - constructor() { - super(), this.disabled = !1, this.softDisabled = !1, this.flipIconInRtl = !1, this.href = "", this.target = "", this.ariaLabelSelected = "", this.toggle = !1, this.selected = !1, this.type = "submit", this.value = "", this.flipIcon = x(this, this.flipIconInRtl), this.addEventListener("click", this.handleClick.bind(this)); - } - willUpdate() { - this.href && (this.disabled = !1, this.softDisabled = !1); - } - render() { - const o = this.href ? g`div` : g`button`, { ariaLabel: m, ariaHasPopup: k, ariaExpanded: I } = this, w = m && this.ariaLabelSelected, C = this.toggle ? this.selected : a; - let y = a; - return this.href || (y = w && this.selected ? this.ariaLabelSelected : m), z`<${o} - class="icon-button ${$(this.getRenderClasses())}" - id="button" - aria-label="${y || a}" - aria-haspopup="${!this.href && k || a}" - aria-expanded="${!this.href && I || a}" - aria-pressed="${C}" - aria-disabled=${!this.href && this.softDisabled || a} - ?disabled="${!this.href && this.disabled}" - @click="${this.handleClickOnChild}"> - ${this.renderFocusRing()} - ${this.renderRipple()} - ${this.selected ? a : this.renderIcon()} - ${this.selected ? this.renderSelectedIcon() : a} - ${this.renderTouchTarget()} - ${this.href && this.renderLink()} - `; - } - renderLink() { - const { ariaLabel: o } = this; - return n` - - `; - } - getRenderClasses() { - return { - "flip-icon": this.flipIcon, - selected: this.toggle && this.selected + set activeTabIndex(t) { + const e = () => { + const a = this.tabs[t]; + a && this.activateTab(a); }; - } - renderIcon() { - return n``; - } - renderSelectedIcon() { - return n``; - } - renderTouchTarget() { - return n``; - } - renderFocusRing() { - return n``; - } - renderRipple() { - const o = !this.href && (this.disabled || this.softDisabled); - return n``; - } - connectedCallback() { - this.flipIcon = x(this, this.flipIconInRtl), super.connectedCallback(); - } - /** Handles a click on this element. */ - handleClick(o) { - if (!this.href && this.softDisabled) { - o.stopImmediatePropagation(), o.preventDefault(); + if (!this.slotElement) { + this.updateComplete.then(e); return; } + e(); + } + get focusedTab() { + return this.tabs.find((t) => t.matches(":focus-within")); + } + constructor() { + super(), this.autoActivate = !1, this.internals = // Cast needed for closure + this.attachInternals(), this.internals.role = "tablist", this.addEventListener("keydown", this.handleKeydown.bind(this)), this.addEventListener("keyup", this.handleKeyup.bind(this)), this.addEventListener("focusout", this.handleFocusout.bind(this)); } /** - * Handles a click on the child
or `}renderLink(){const{ariaLabel:t,ariaHasPopup:l,ariaExpanded:o}=this;return e.x`${this.renderContent()} - `}renderContent(){const t=e.x``;return e.x` - - ${this.trailingIcon?e.E:t} - - ${this.trailingIcon?t:e.E} - `}handleClick(t){if(!this.href&&this.softDisabled){t.stopImmediatePropagation(),t.preventDefault();return}!g.isActivationClick(t)||!this.buttonElement||(this.focus(),g.dispatchActivationClick(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}};k.setupFormSubmitter(a);a.formAssociated=!0;a.shadowRootOptions={mode:"open",delegatesFocus:!0};e.__decorate([e.n({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"soft-disabled",reflect:!0})],a.prototype,"softDisabled",void 0);e.__decorate([e.n()],a.prototype,"href",void 0);e.__decorate([e.n()],a.prototype,"target",void 0);e.__decorate([e.n({type:Boolean,attribute:"trailing-icon",reflect:!0})],a.prototype,"trailingIcon",void 0);e.__decorate([e.n({type:Boolean,attribute:"has-icon",reflect:!0})],a.prototype,"hasIcon",void 0);e.__decorate([e.n()],a.prototype,"type",void 0);e.__decorate([e.n({reflect:!0})],a.prototype,"value",void 0);e.__decorate([z.e$1(".button")],a.prototype,"buttonElement",void 0);e.__decorate([B.o({slot:"icon",flatten:!0})],a.prototype,"assignedIcons",void 0);/** + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const A=!1;/** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */class M extends a{renderElevationOrOutline(){return e.x``}}/** + */class F extends p.Validator{computeValidity(e){return this.selectControl||(this.selectControl=document.createElement("select")),t.B(t.x``,this.selectControl),this.selectControl.value=e.value,this.selectControl.required=e.required,{validity:this.selectControl.validity,validationMessage:this.selectControl.validationMessage}}equals(e,l){return e.value===l.value&&e.required===l.required}copy({value:e,required:l}){return{value:e,required:l}}}/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function k(r){const e=[];for(let l=0;le)}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.supportingText="",this.error=!1,this.menuPositioning="popover",this.clampMenuWidth=!1,this.typeaheadDelay=s.DEFAULT_TYPEAHEAD_BUFFER_TIME,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[w]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=s.FocusState.NONE,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener("focus",this.handleFocus.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this))}select(e){const l=this.options.find(i=>i.value===e);l&&this.selectItem(l)}selectIndex(e){const l=this.options[e];l&&this.selectItem(l)}reset(){for(const e of this.options)e.selected=e.hasAttribute("selected");this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=""}[(w=x,S.onReportValidity)](e){var i;e==null||e.preventDefault();const l=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,l===this.getErrorText()&&((i=this.field)==null||i.reannounceError())}update(e){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){const l=this.getBoundingClientRect();this.selectWidth=l.width}this.prevOpen=this.open,super.update(e)}render(){return t.x` + + ${this.renderField()} ${this.renderMenu()} + + `}async firstUpdated(e){var l;await((l=this.menu)==null?void 0:l.updateComplete),this.lastSelectedOptionRecords.length||this.initUserSelection(),!this.lastSelectedOptionRecords.length&&!A&&!this.options.length&&setTimeout(()=>{this.updateValueAndDisplayText()}),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){return b.u` + <${this.fieldTag} + aria-haspopup="listbox" + role="combobox" + part="field" + id="field" + tabindex=${this.disabled?"-1":"0"} + aria-label=${this.ariaLabel||t.E} + aria-describedby="description" + aria-expanded=${this.open?"true":"false"} + aria-controls="listbox" + class="field" + label=${this.label} + ?no-asterisk=${this.noAsterisk} + .focused=${this.focused||this.open} + .populated=${!!this.displayText} + .disabled=${this.disabled} + .required=${this.required} + .error=${this.hasError} + ?has-start=${this.hasLeadingIcon} + has-end + supporting-text=${this.supportingText} + error-text=${this.getErrorText()} + @keydown=${this.handleKeydown} + @click=${this.handleClick}> + ${this.renderFieldContent()} +
+ `}renderFieldContent(){return[this.renderLeadingIcon(),this.renderLabel(),this.renderTrailingIcon()]}renderLeadingIcon(){return t.x` + + + + `}renderTrailingIcon(){return t.x` + + + + + + + + + `}renderLabel(){return t.x`
${this.displayText||t.x` `}
`}renderMenu(){const e=this.label||this.ariaLabel;return t.x``}renderMenuContent(){return t.x``}handleKeydown(e){var n,f;if(this.open||this.disabled||!this.menu)return;const l=this.menu.typeaheadController,i=e.code==="Space"||e.code==="ArrowDown"||e.code==="ArrowUp"||e.code==="End"||e.code==="Home"||e.code==="Enter";if(!l.isTypingAhead&&i){switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=s.FocusState.NONE;break;case"End":this.defaultFocus=s.FocusState.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=s.FocusState.FIRST_ITEM;break}return}if(e.key.length===1){l.onKeydown(e),e.preventDefault();const{lastActiveRecord:u}=l;if(!u)return;(f=(n=this.labelEl)==null?void 0:n.setAttribute)==null||f.call(n,"aria-live","polite"),this.selectItem(u[s.TYPEAHEAD_RECORD.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&s.isElementInSubtree(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=k(e),this.lastSelectedOptionRecords}async getUpdateComplete(){var e;return await((e=this.menu)==null?void 0:e.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let l=!1;if(e.length){const[i]=e[0];l=this.lastSelectedOption!==i,this.lastSelectedOption=i,this[x]=i.value,this.displayText=i.displayText}else l=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[x]="",this.displayText="";return l}async handleOpening(e){var n,f,u;if((f=(n=this.labelEl)==null?void 0:n.removeAttribute)==null||f.call(n,"aria-live"),this.redispatchEvent(e),this.defaultFocus!==s.FocusState.NONE)return;const l=this.menu.items,i=(u=R.getActiveItem(l))==null?void 0:u.item;let[a]=this.lastSelectedOptionRecords[0]??[null];i&&i!==a&&(i.tabIndex=-1),a=a??l[0],a&&(a.tabIndex=0,a.focus())}redispatchEvent(e){z.redispatchEvent(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const l=e.detail.reason,i=e.detail.itemPath[0];this.open=!1;let a=!1;l.kind==="click-selection"?a=this.selectItem(i):l.kind==="keydown"&&s.isSelectableKey(l.key)?a=this.selectItem(i):(i.tabIndex=-1,i.blur()),a&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([i])=>{e!==i&&(i.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const l=e.target;this.lastSelectedOptionRecords.some(([i])=>i===l)||this.selectItem(l)}handleRequestDeselection(e){const l=e.target;this.lastSelectedOptionRecords.some(([i])=>i===l)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[T.getFormValue](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){var e;(e=this.field)==null||e.click()}[p.createValidator](){return new F(()=>this)}[p.getValidityAnchor](){return this.field}};o.shadowRootOptions={...t.r.shadowRootOptions,delegatesFocus:!0};t.__decorate([t.n({type:Boolean})],o.prototype,"quick",void 0);t.__decorate([t.n({type:Boolean})],o.prototype,"required",void 0);t.__decorate([t.n({type:String,attribute:"error-text"})],o.prototype,"errorText",void 0);t.__decorate([t.n()],o.prototype,"label",void 0);t.__decorate([t.n({type:Boolean,attribute:"no-asterisk"})],o.prototype,"noAsterisk",void 0);t.__decorate([t.n({type:String,attribute:"supporting-text"})],o.prototype,"supportingText",void 0);t.__decorate([t.n({type:Boolean,reflect:!0})],o.prototype,"error",void 0);t.__decorate([t.n({attribute:"menu-positioning"})],o.prototype,"menuPositioning",void 0);t.__decorate([t.n({type:Boolean,attribute:"clamp-menu-width"})],o.prototype,"clampMenuWidth",void 0);t.__decorate([t.n({type:Number,attribute:"typeahead-delay"})],o.prototype,"typeaheadDelay",void 0);t.__decorate([t.n({type:Boolean,attribute:"has-leading-icon"})],o.prototype,"hasLeadingIcon",void 0);t.__decorate([t.n({attribute:"display-text"})],o.prototype,"displayText",void 0);t.__decorate([t.n({attribute:"menu-align"})],o.prototype,"menuAlign",void 0);t.__decorate([t.n()],o.prototype,"value",null);t.__decorate([t.n({type:Number,attribute:"selected-index"})],o.prototype,"selectedIndex",null);t.__decorate([c.r()],o.prototype,"nativeError",void 0);t.__decorate([c.r()],o.prototype,"nativeErrorText",void 0);t.__decorate([c.r()],o.prototype,"focused",void 0);t.__decorate([c.r()],o.prototype,"open",void 0);t.__decorate([c.r()],o.prototype,"defaultFocus",void 0);t.__decorate([c.e$1(".field")],o.prototype,"field",void 0);t.__decorate([c.e$1("md-menu")],o.prototype,"menu",void 0);t.__decorate([c.e$1("#label")],o.prototype,"labelEl",void 0);t.__decorate([_.o({slot:"leading-icon",flatten:!0})],o.prototype,"leadingIcons",void 0);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class M extends o{constructor(){super(...arguments),this.fieldTag=b.i`md-filled-field`}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const O=e.i$1`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} + */const U=t.i$1`:host{--_text-field-active-indicator-color: var(--md-filled-select-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-active-indicator-height: var(--md-filled-select-text-field-active-indicator-height, 1px);--_text-field-container-color: var(--md-filled-select-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_text-field-disabled-active-indicator-color: var(--md-filled-select-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-active-indicator-height: var(--md-filled-select-text-field-disabled-active-indicator-height, 1px);--_text-field-disabled-active-indicator-opacity: var(--md-filled-select-text-field-disabled-active-indicator-opacity, 0.38);--_text-field-disabled-container-color: var(--md-filled-select-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-container-opacity: var(--md-filled-select-text-field-disabled-container-opacity, 0.04);--_text-field-disabled-input-text-color: var(--md-filled-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-filled-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-filled-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-filled-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-filled-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-filled-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-supporting-text-color: var(--md-filled-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-filled-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-filled-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-filled-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-active-indicator-color: var(--md-filled-select-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-active-indicator-color: var(--md-filled-select-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-input-text-color: var(--md-filled-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-filled-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-filled-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-supporting-text-color: var(--md-filled-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-filled-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-active-indicator-color: var(--md-filled-select-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-input-text-color: var(--md-filled-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-filled-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-filled-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-state-layer-color: var(--md-filled-select-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-state-layer-opacity: var(--md-filled-select-text-field-error-hover-state-layer-opacity, 0.08);--_text-field-error-hover-supporting-text-color: var(--md-filled-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-filled-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-filled-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-filled-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-filled-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-supporting-text-color: var(--md-filled-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-filled-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-active-indicator-color: var(--md-filled-select-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-active-indicator-height: var(--md-filled-select-text-field-focus-active-indicator-height, 3px);--_text-field-focus-input-text-color: var(--md-filled-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-filled-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-filled-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-supporting-text-color: var(--md-filled-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-filled-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-active-indicator-color: var(--md-filled-select-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-active-indicator-height: var(--md-filled-select-text-field-hover-active-indicator-height, 1px);--_text-field-hover-input-text-color: var(--md-filled-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-filled-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-filled-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-state-layer-color: var(--md-filled-select-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-state-layer-opacity: var(--md-filled-select-text-field-hover-state-layer-opacity, 0.08);--_text-field-hover-supporting-text-color: var(--md-filled-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-filled-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-filled-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-filled-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-filled-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-filled-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-filled-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-filled-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-filled-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-filled-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-filled-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-filled-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-filled-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-filled-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-filled-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-filled-select-text-field-leading-icon-size, 24px);--_text-field-supporting-text-color: var(--md-filled-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-filled-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-filled-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-filled-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-filled-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-filled-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-filled-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-filled-select-text-field-container-shape-start-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-filled-select-text-field-container-shape-start-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-filled-select-text-field-container-shape-end-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_text-field-container-shape-end-start: var(--md-filled-select-text-field-container-shape-end-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--md-filled-field-active-indicator-color: var(--_text-field-active-indicator-color);--md-filled-field-active-indicator-height: var(--_text-field-active-indicator-height);--md-filled-field-container-color: var(--_text-field-container-color);--md-filled-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-filled-field-content-color: var(--_text-field-input-text-color);--md-filled-field-content-font: var(--_text-field-input-text-font);--md-filled-field-content-line-height: var(--_text-field-input-text-line-height);--md-filled-field-content-size: var(--_text-field-input-text-size);--md-filled-field-content-weight: var(--_text-field-input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_text-field-disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_text-field-disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_text-field-disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_text-field-disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_text-field-disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_text-field-error-active-indicator-color);--md-filled-field-error-content-color: var(--_text-field-error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_text-field-error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_text-field-error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_text-field-error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_text-field-error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-filled-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_text-field-focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_text-field-focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_text-field-hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_text-field-hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_text-field-hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_text-field-hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_text-field-label-text-color);--md-filled-field-label-text-font: var(--_text-field-label-text-font);--md-filled-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-filled-field-label-text-size: var(--_text-field-label-text-size);--md-filled-field-label-text-weight: var(--_text-field-label-text-weight);--md-filled-field-leading-content-color: var(--_text-field-leading-icon-color);--md-filled-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-filled-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-filled-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-filled-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)} `;/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const x=e.i$1`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} + */const $=t.i$1`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none} `;/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let h=class extends M{};h.styles=[$,U];h=t.__decorate([t.t$1("md-filled-select")],h);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class V extends o{constructor(){super(...arguments),this.fieldTag=b.i`md-outlined-field`}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const u=e.i$1`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} + */const B=t.i$1`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)} `;/** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let m=class extends M{};m.styles=[u,x,O];m=e.__decorate([e.t$1("md-filled-button")],m);/** + */let v=class extends V{};v.styles=[$,B];v=t.__decorate([t.t$1("md-outlined-select")],v);/** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */class q extends a{renderElevationOrOutline(){return e.x``}}/** + */function L(){return new Event("request-selection",{bubbles:!0,composed:!0})}function N(){return new Event("request-deselection",{bubbles:!0,composed:!0})}class K{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return this.internalDisplayText!==null?this.internalDisplayText:this.menuItemController.typeaheadText}setDisplayText(e){this.internalDisplayText=e}constructor(e,l){this.host=e,this.internalDisplayText=null,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=i=>{this.menuItemController.onKeydown(i)},this.lastSelected=this.host.selected,this.menuItemController=new s.MenuItemController(e,l),e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?"true":"false")}hostUpdated(){this.lastSelected!==this.host.selected&&!this.firstUpdate&&(this.host.selected?this.host.dispatchEvent(L()):this.host.dispatchEvent(N())),this.lastSelected=this.host.selected,this.firstUpdate=!1}}/** * @license - * Copyright 2024 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const I=e.i$1`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)} -`;/** + */const P=E.mixinDelegatesAria(t.r);class d extends P{constructor(){super(...arguments),this.disabled=!1,this.isMenuItem=!0,this.selected=!1,this.value="",this.type="option",this.selectOptionController=new K(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.selectOptionController.typeaheadText}set typeaheadText(e){this.selectOptionController.setTypeaheadText(e)}get displayText(){return this.selectOptionController.displayText}set displayText(e){this.selectOptionController.setDisplayText(e)}render(){return this.renderListItem(t.x` + +
+ ${this.renderRipple()} ${this.renderFocusRing()} +
+ + + ${this.renderBody()} +
+ `)}renderListItem(e){return t.x` +
  • ${e}
  • + `}renderRipple(){return t.x` `}renderFocusRing(){return t.x` `}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return t.x` + + + + + + `}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}d.shadowRootOptions={...t.r.shadowRootOptions,delegatesFocus:!0};t.__decorate([t.n({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0);t.__decorate([t.n({type:Boolean,attribute:"md-menu-item",reflect:!0})],d.prototype,"isMenuItem",void 0);t.__decorate([t.n({type:Boolean})],d.prototype,"selected",void 0);t.__decorate([t.n()],d.prototype,"value",void 0);t.__decorate([c.e$1(".list-item")],d.prototype,"listItemRoot",void 0);t.__decorate([_.o({slot:"headline"})],d.prototype,"headlineElements",void 0);t.__decorate([_.o({slot:"supporting-text"})],d.prototype,"supportingTextElements",void 0);t.__decorate([q.n({slot:""})],d.prototype,"defaultElements",void 0);t.__decorate([t.n({attribute:"typeahead-text"})],d.prototype,"typeaheadText",null);t.__decorate([t.n({attribute:"display-text"})],d.prototype,"displayText",null);/** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let h=class extends q{};h.styles=[u,x,I];h=e.__decorate([e.t$1("md-filled-tonal-button")],h);/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */class T extends a{renderElevationOrOutline(){return e.x``}}/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const F=e.i$1`:host{--_container-color: var(--md-elevated-button-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-button-container-elevation, 1);--_container-height: var(--md-elevated-button-container-height, 40px);--_container-shadow-color: var(--md-elevated-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-elevated-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-elevated-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-elevated-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-elevated-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-elevated-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-elevated-button-focus-container-elevation, 1);--_focus-label-text-color: var(--md-elevated-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-elevated-button-hover-container-elevation, 2);--_hover-label-text-color: var(--md-elevated-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-elevated-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-elevated-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-elevated-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-elevated-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-elevated-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-elevated-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-elevated-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-elevated-button-pressed-container-elevation, 1);--_pressed-label-text-color: var(--md-elevated-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-elevated-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-elevated-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-elevated-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-elevated-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-elevated-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-elevated-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-elevated-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-elevated-button-icon-size, 18px);--_pressed-icon-color: var(--md-elevated-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-elevated-button-container-shape-start-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-elevated-button-container-shape-start-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-elevated-button-container-shape-end-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-elevated-button-container-shape-end-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-elevated-button-leading-space, 24px);--_trailing-space: var(--md-elevated-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-elevated-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-elevated-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-elevated-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-elevated-button-with-trailing-icon-trailing-space, 16px)} -`;/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let y=class extends T{};y.styles=[u,x,F];y=e.__decorate([e.t$1("md-elevated-button")],y);/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */class j extends a{renderElevationOrOutline(){return e.x`
    `}}/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const R=e.i$1`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)} -`;/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let f=class extends j{};f.styles=[u,R];f=e.__decorate([e.t$1("md-outlined-button")],f);/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */class A extends a{}/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const L=e.i$1`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0} -`;/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let _=class extends A{};_.styles=[u,L];_=e.__decorate([e.t$1("md-text-button")],_);const w=b.o({tagName:"md-filled-button",elementClass:m,react:p}),S=b.o({tagName:"md-filled-tonal-button",elementClass:h,react:p}),N=b.o({tagName:"md-elevated-button",elementClass:y,react:p}),P=b.o({tagName:"md-outlined-button",elementClass:f,react:p}),D=b.o({tagName:"md-text-button",elementClass:_,react:p}),G=({variant:r,children:t,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,...c})=>{switch(r){case"filled":return v.jsx(w,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"filled-tonal":return v.jsx(S,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"elevated":return v.jsx(N,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"outlined":return v.jsx(P,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"text":return v.jsx(D,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});default:return v.jsx(w,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t})}};exports.Button=G; + */let m=class extends d{};m.styles=[s.styles];m=t.__decorate([t.t$1("md-select-option")],m);const W=y.o({tagName:"md-select",react:g,elementClass:h}),H=y.o({tagName:"md-select",react:g,elementClass:v});y.o({tagName:"md-select-option",react:g,elementClass:m});const j=r=>{const{variant:e="filled",...l}=r,i=e==="filled"?W:H;return C.jsx(i,{...l})};exports.Select=j; diff --git a/dist/react-you-ui24.mjs b/dist/react-you-ui24.mjs index 078c6e5..5bd23aa 100644 --- a/dist/react-you-ui24.mjs +++ b/dist/react-you-ui24.mjs @@ -1,151 +1,531 @@ -import { jsx as u } from "react/jsx-runtime"; -import { o as h } from "./create-component-CVXl33PD.mjs"; -import { _ as a, n as s, x as d, E as n, r as E, a as c, b as y } from "./class-map-CwiboTfb.mjs"; -import "./elevation-Dg8ssDJC.mjs"; +import { jsx as k } from "react/jsx-runtime"; +import w from "react"; +import { o as S } from "./create-component-CVXl33PD.mjs"; +import { B as A, x as a, r as b, _ as l, n as r, c as z, E as f, a as T, b as E } from "./class-map-CwiboTfb.mjs"; +import { m as F, o as D } from "./outlined-field-CsypDRr3.mjs"; +import { u as M, i as I } from "./static-DdXEOlS4.mjs"; +import { D as U, F as p, T as q, i as V, e as B, M as L, s as N } from "./menuItemController-CeB921ip.mjs"; +import { r as h, a as _ } from "./animation-DjClVFum.mjs"; +import { o as $ } from "./query-assigned-elements-DUhez03i.mjs"; +import { o as K } from "./style-map-CdUj7GnE.mjs"; +import { m as O } from "./delegate-BXi1gVeU.mjs"; +import { r as P } from "./redispatch-event-taWUbWUt.mjs"; +import { V as W, m as H, c as j, g as Y } from "./validator-DZt1_yHv.mjs"; +import { m as G } from "./element-internals-3IY9gE4L.mjs"; +import { m as J, g as Q } from "./form-associated-CyYeHPMb.mjs"; +import { b as X } from "./item-CpL4zUlE.mjs"; import "./ripple-pQcEjR05.mjs"; -import { a as C } from "./animation-DjClVFum.mjs"; -import { o as O } from "./query-assigned-elements-DUhez03i.mjs"; -import { m as M } from "./delegate-BXi1gVeU.mjs"; -import { s as I } from "./form-submitter-ChT3Wi0f.mjs"; -import { i as T, d as F } from "./form-label-activation-ed0HgVsy.mjs"; -import { m as R, i as A } from "./element-internals-3IY9gE4L.mjs"; -import f from "react"; +import { n as Z } from "./query-assigned-nodes-MKI2zKDb.mjs"; /** * @license - * Copyright 2019 Google LLC + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const ee = !1; +/** + * @license + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const L = M(R(E)); -let t = class extends L { - get name() { - return this.getAttribute("name") ?? ""; +class te extends W { + computeValidity(e) { + return this.selectControl || (this.selectControl = document.createElement("select")), A(a``, this.selectControl), this.selectControl.value = e.value, this.selectControl.required = e.required, { + validity: this.selectControl.validity, + validationMessage: this.selectControl.validationMessage + }; } - set name(e) { - this.setAttribute("name", e); + equals(e, t) { + return e.value === t.value && e.required === t.required; + } + copy({ value: e, required: t }) { + return { value: e, required: t }; + } +} +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +function le(d) { + const e = []; + for (let t = 0; t < d.length; t++) { + const i = d[t]; + i.selected && e.push([i, t]); + } + return e; +} +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +var C; +const v = Symbol("value"), ie = O(F(H(J(G(b))))); +let o = class extends ie { + /** + * The value of the currently selected option. + * + * Note: For SSR, set `[selected]` on the requested option and `displayText` + * rather than setting `value` setting `value` will incur a DOM query. + */ + get value() { + return this[v]; + } + set value(e) { + this.lastUserSetValue = e, this.select(e); + } + get options() { + var e; + return ((e = this.menu) == null ? void 0 : e.items) ?? []; } /** - * The associated form element with which this element's value will submit. + * The index of the currently selected option. + * + * Note: For SSR, set `[selected]` on the requested option and `displayText` + * rather than setting `selectedIndex` setting `selectedIndex` will incur a + * DOM query. */ - get form() { - return this[A].form; + get selectedIndex() { + const [e, t] = (this.getSelectedOptions() ?? [])[0] ?? []; + return t ?? -1; + } + set selectedIndex(e) { + this.lastUserSetSelectedIndex = e, this.selectIndex(e); + } + /** + * Returns an array of selected options. + * + * NOTE: md-select only supports single selection. + */ + get selectedOptions() { + return (this.getSelectedOptions() ?? []).map(([e]) => e); + } + get hasError() { + return this.error || this.nativeError; } constructor() { - super(), this.disabled = !1, this.softDisabled = !1, this.href = "", this.target = "", this.trailingIcon = !1, this.hasIcon = !1, this.type = "submit", this.value = "", this.addEventListener("click", this.handleClick.bind(this)); + super(), this.quick = !1, this.required = !1, this.errorText = "", this.label = "", this.noAsterisk = !1, this.supportingText = "", this.error = !1, this.menuPositioning = "popover", this.clampMenuWidth = !1, this.typeaheadDelay = U, this.hasLeadingIcon = !1, this.displayText = "", this.menuAlign = "start", this[C] = "", this.lastUserSetValue = null, this.lastUserSetSelectedIndex = null, this.lastSelectedOption = null, this.lastSelectedOptionRecords = [], this.nativeError = !1, this.nativeErrorText = "", this.focused = !1, this.open = !1, this.defaultFocus = p.NONE, this.prevOpen = this.open, this.selectWidth = 0, this.addEventListener("focus", this.handleFocus.bind(this)), this.addEventListener("blur", this.handleBlur.bind(this)); } - focus() { - var e; - (e = this.buttonElement) == null || e.focus(); + /** + * Selects an option given the value of the option, and updates MdSelect's + * value. + */ + select(e) { + const t = this.options.find((i) => i.value === e); + t && this.selectItem(t); } - blur() { - var e; - (e = this.buttonElement) == null || e.blur(); + /** + * Selects an option given the index of the option, and updates MdSelect's + * value. + */ + selectIndex(e) { + const t = this.options[e]; + t && this.selectItem(t); + } + /** + * Reset the select to its default value. + */ + reset() { + for (const e of this.options) + e.selected = e.hasAttribute("selected"); + this.updateValueAndDisplayText(), this.nativeError = !1, this.nativeErrorText = ""; + } + [(C = v, D)](e) { + var i; + e == null || e.preventDefault(); + const t = this.getErrorText(); + this.nativeError = !!e, this.nativeErrorText = this.validationMessage, t === this.getErrorText() && ((i = this.field) == null || i.reannounceError()); + } + update(e) { + if (this.hasUpdated || this.initUserSelection(), this.prevOpen !== this.open && this.open) { + const t = this.getBoundingClientRect(); + this.selectWidth = t.width; + } + this.prevOpen = this.open, super.update(e); } render() { - var i; - const e = !this.href && (this.disabled || this.softDisabled), l = this.href ? this.renderLink() : this.renderButton(), o = this.href ? "link" : "button"; - return d` - ${(i = this.renderElevationOrOutline) == null ? void 0 : i.call(this)} -
    - - - ${l} + return a` + + ${this.renderField()} ${this.renderMenu()} + `; } - renderButton() { - const { ariaLabel: e, ariaHasPopup: l, ariaExpanded: o } = this; - return d``; + async firstUpdated(e) { + var t; + await ((t = this.menu) == null ? void 0 : t.updateComplete), this.lastSelectedOptionRecords.length || this.initUserSelection(), !this.lastSelectedOptionRecords.length && !ee && !this.options.length && setTimeout(() => { + this.updateValueAndDisplayText(); + }), super.firstUpdated(e); } - renderLink() { - const { ariaLabel: e, ariaHasPopup: l, ariaExpanded: o } = this; - return d`${this.renderContent()} - `; + getRenderClasses() { + return { + disabled: this.disabled, + error: this.error, + open: this.open + }; } - renderContent() { - const e = d``; - return d` - - ${this.trailingIcon ? n : e} - - ${this.trailingIcon ? e : n} + renderField() { + return M` + <${this.fieldTag} + aria-haspopup="listbox" + role="combobox" + part="field" + id="field" + tabindex=${this.disabled ? "-1" : "0"} + aria-label=${this.ariaLabel || f} + aria-describedby="description" + aria-expanded=${this.open ? "true" : "false"} + aria-controls="listbox" + class="field" + label=${this.label} + ?no-asterisk=${this.noAsterisk} + .focused=${this.focused || this.open} + .populated=${!!this.displayText} + .disabled=${this.disabled} + .required=${this.required} + .error=${this.hasError} + ?has-start=${this.hasLeadingIcon} + has-end + supporting-text=${this.supportingText} + error-text=${this.getErrorText()} + @keydown=${this.handleKeydown} + @click=${this.handleClick}> + ${this.renderFieldContent()} +
    + `; + } + renderFieldContent() { + return [ + this.renderLeadingIcon(), + this.renderLabel(), + this.renderTrailingIcon() + ]; + } + renderLeadingIcon() { + return a` + + + `; } - handleClick(e) { - if (!this.href && this.softDisabled) { - e.stopImmediatePropagation(), e.preventDefault(); + renderTrailingIcon() { + return a` + + + + + + + + + `; + } + renderLabel() { + return a`
    ${this.displayText || a` `}
    `; + } + renderMenu() { + const e = this.label || this.ariaLabel; + return a``; + } + renderMenuContent() { + return a``; + } + /** + * Handles opening the select on keydown and typahead selection when the menu + * is closed. + */ + handleKeydown(e) { + var c, x; + if (this.open || this.disabled || !this.menu) + return; + const t = this.menu.typeaheadController, i = e.code === "Space" || e.code === "ArrowDown" || e.code === "ArrowUp" || e.code === "End" || e.code === "Home" || e.code === "Enter"; + if (!t.isTypingAhead && i) { + switch (e.preventDefault(), this.open = !0, e.code) { + case "Space": + case "ArrowDown": + case "Enter": + this.defaultFocus = p.NONE; + break; + case "End": + this.defaultFocus = p.LAST_ITEM; + break; + case "ArrowUp": + case "Home": + this.defaultFocus = p.FIRST_ITEM; + break; + } return; } - !T(e) || !this.buttonElement || (this.focus(), F(this.buttonElement)); + if (e.key.length === 1) { + t.onKeydown(e), e.preventDefault(); + const { lastActiveRecord: u } = t; + if (!u) + return; + (x = (c = this.labelEl) == null ? void 0 : c.setAttribute) == null || x.call(c, "aria-live", "polite"), this.selectItem(u[q.ITEM]) && this.dispatchInteractionEvents(); + } } - handleSlotChange() { - this.hasIcon = this.assignedIcons.length > 0; + handleClick() { + this.open = !this.open; + } + handleFocus() { + this.focused = !0; + } + handleBlur() { + this.focused = !1; + } + /** + * Handles closing the menu when the focus leaves the select's subtree. + */ + handleFocusout(e) { + e.relatedTarget && V(e.relatedTarget, this) || (this.open = !1); + } + /** + * Gets a list of all selected select options as a list item record array. + * + * @return An array of selected list option records. + */ + getSelectedOptions() { + if (!this.menu) + return this.lastSelectedOptionRecords = [], null; + const e = this.menu.items; + return this.lastSelectedOptionRecords = le(e), this.lastSelectedOptionRecords; + } + async getUpdateComplete() { + var e; + return await ((e = this.menu) == null ? void 0 : e.updateComplete), super.getUpdateComplete(); + } + /** + * Gets the selected options from the DOM, and updates the value and display + * text to the first selected option's value and headline respectively. + * + * @return Whether or not the selected option has changed since last update. + */ + updateValueAndDisplayText() { + const e = this.getSelectedOptions() ?? []; + let t = !1; + if (e.length) { + const [i] = e[0]; + t = this.lastSelectedOption !== i, this.lastSelectedOption = i, this[v] = i.value, this.displayText = i.displayText; + } else + t = this.lastSelectedOption !== null, this.lastSelectedOption = null, this[v] = "", this.displayText = ""; + return t; + } + /** + * Focuses and activates the last selected item upon opening, and resets other + * active items. + */ + async handleOpening(e) { + var c, x, u; + if ((x = (c = this.labelEl) == null ? void 0 : c.removeAttribute) == null || x.call(c, "aria-live"), this.redispatchEvent(e), this.defaultFocus !== p.NONE) + return; + const t = this.menu.items, i = (u = X(t)) == null ? void 0 : u.item; + let [n] = this.lastSelectedOptionRecords[0] ?? [null]; + i && i !== n && (i.tabIndex = -1), n = n ?? t[0], n && (n.tabIndex = 0, n.focus()); + } + redispatchEvent(e) { + P(this, e); + } + handleClosed(e) { + this.open = !1, this.redispatchEvent(e); + } + /** + * Determines the reason for closing, and updates the UI accordingly. + */ + handleCloseMenu(e) { + const t = e.detail.reason, i = e.detail.itemPath[0]; + this.open = !1; + let n = !1; + t.kind === "click-selection" ? n = this.selectItem(i) : t.kind === "keydown" && B(t.key) ? n = this.selectItem(i) : (i.tabIndex = -1, i.blur()), n && this.dispatchInteractionEvents(); + } + /** + * Selects a given option, deselects other options, and updates the UI. + * + * @return Whether the last selected option has changed. + */ + selectItem(e) { + return (this.getSelectedOptions() ?? []).forEach(([i]) => { + e !== i && (i.selected = !1); + }), e.selected = !0, this.updateValueAndDisplayText(); + } + /** + * Handles updating selection when an option element requests selection via + * property / attribute change. + */ + handleRequestSelection(e) { + const t = e.target; + this.lastSelectedOptionRecords.some(([i]) => i === t) || this.selectItem(t); + } + /** + * Handles updating selection when an option element requests deselection via + * property / attribute change. + */ + handleRequestDeselection(e) { + const t = e.target; + this.lastSelectedOptionRecords.some(([i]) => i === t) && this.updateValueAndDisplayText(); + } + /** + * Attempts to initialize the selected option from user-settable values like + * SSR, setting `value`, or `selectedIndex` at startup. + */ + initUserSelection() { + this.lastUserSetValue && !this.lastSelectedOptionRecords.length ? this.select(this.lastUserSetValue) : this.lastUserSetSelectedIndex !== null && !this.lastSelectedOptionRecords.length ? this.selectIndex(this.lastUserSetSelectedIndex) : this.updateValueAndDisplayText(); + } + handleIconChange() { + this.hasLeadingIcon = this.leadingIcons.length > 0; + } + /** + * Dispatches the `input` and `change` events. + */ + dispatchInteractionEvents() { + this.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })); + } + getErrorText() { + return this.error ? this.errorText : this.nativeErrorText; + } + [Q]() { + return this.value; + } + formResetCallback() { + this.reset(); + } + formStateRestoreCallback(e) { + this.value = e; + } + click() { + var e; + (e = this.field) == null || e.click(); + } + [j]() { + return new te(() => this); + } + [Y]() { + return this.field; } }; -I(t); -t.formAssociated = !0; -t.shadowRootOptions = { - mode: "open", +o.shadowRootOptions = { + ...b.shadowRootOptions, delegatesFocus: !0 }; -a([ - s({ type: Boolean, reflect: !0 }) -], t.prototype, "disabled", void 0); -a([ - s({ type: Boolean, attribute: "soft-disabled", reflect: !0 }) -], t.prototype, "softDisabled", void 0); -a([ - s() -], t.prototype, "href", void 0); -a([ - s() -], t.prototype, "target", void 0); -a([ - s({ type: Boolean, attribute: "trailing-icon", reflect: !0 }) -], t.prototype, "trailingIcon", void 0); -a([ - s({ type: Boolean, attribute: "has-icon", reflect: !0 }) -], t.prototype, "hasIcon", void 0); -a([ - s() -], t.prototype, "type", void 0); -a([ - s({ reflect: !0 }) -], t.prototype, "value", void 0); -a([ - C(".button") -], t.prototype, "buttonElement", void 0); -a([ - O({ slot: "icon", flatten: !0 }) -], t.prototype, "assignedIcons", void 0); +l([ + r({ type: Boolean }) +], o.prototype, "quick", void 0); +l([ + r({ type: Boolean }) +], o.prototype, "required", void 0); +l([ + r({ type: String, attribute: "error-text" }) +], o.prototype, "errorText", void 0); +l([ + r() +], o.prototype, "label", void 0); +l([ + r({ type: Boolean, attribute: "no-asterisk" }) +], o.prototype, "noAsterisk", void 0); +l([ + r({ type: String, attribute: "supporting-text" }) +], o.prototype, "supportingText", void 0); +l([ + r({ type: Boolean, reflect: !0 }) +], o.prototype, "error", void 0); +l([ + r({ attribute: "menu-positioning" }) +], o.prototype, "menuPositioning", void 0); +l([ + r({ type: Boolean, attribute: "clamp-menu-width" }) +], o.prototype, "clampMenuWidth", void 0); +l([ + r({ type: Number, attribute: "typeahead-delay" }) +], o.prototype, "typeaheadDelay", void 0); +l([ + r({ type: Boolean, attribute: "has-leading-icon" }) +], o.prototype, "hasLeadingIcon", void 0); +l([ + r({ attribute: "display-text" }) +], o.prototype, "displayText", void 0); +l([ + r({ attribute: "menu-align" }) +], o.prototype, "menuAlign", void 0); +l([ + r() +], o.prototype, "value", null); +l([ + r({ type: Number, attribute: "selected-index" }) +], o.prototype, "selectedIndex", null); +l([ + h() +], o.prototype, "nativeError", void 0); +l([ + h() +], o.prototype, "nativeErrorText", void 0); +l([ + h() +], o.prototype, "focused", void 0); +l([ + h() +], o.prototype, "open", void 0); +l([ + h() +], o.prototype, "defaultFocus", void 0); +l([ + _(".field") +], o.prototype, "field", void 0); +l([ + _("md-menu") +], o.prototype, "menu", void 0); +l([ + _("#label") +], o.prototype, "labelEl", void 0); +l([ + $({ slot: "leading-icon", flatten: !0 }) +], o.prototype, "leadingIcons", void 0); /** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class N extends t { - renderElevationOrOutline() { - return d``; +class oe extends o { + constructor() { + super(...arguments), this.fieldTag = I`md-filled-field`; } } /** @@ -153,45 +533,34 @@ class N extends t { * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const D = c`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} +const re = T`:host{--_text-field-active-indicator-color: var(--md-filled-select-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-active-indicator-height: var(--md-filled-select-text-field-active-indicator-height, 1px);--_text-field-container-color: var(--md-filled-select-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_text-field-disabled-active-indicator-color: var(--md-filled-select-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-active-indicator-height: var(--md-filled-select-text-field-disabled-active-indicator-height, 1px);--_text-field-disabled-active-indicator-opacity: var(--md-filled-select-text-field-disabled-active-indicator-opacity, 0.38);--_text-field-disabled-container-color: var(--md-filled-select-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-container-opacity: var(--md-filled-select-text-field-disabled-container-opacity, 0.04);--_text-field-disabled-input-text-color: var(--md-filled-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-filled-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-filled-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-filled-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-filled-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-filled-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-supporting-text-color: var(--md-filled-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-filled-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-filled-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-filled-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-active-indicator-color: var(--md-filled-select-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-active-indicator-color: var(--md-filled-select-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-input-text-color: var(--md-filled-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-filled-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-filled-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-supporting-text-color: var(--md-filled-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-filled-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-active-indicator-color: var(--md-filled-select-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-input-text-color: var(--md-filled-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-filled-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-filled-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-state-layer-color: var(--md-filled-select-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-state-layer-opacity: var(--md-filled-select-text-field-error-hover-state-layer-opacity, 0.08);--_text-field-error-hover-supporting-text-color: var(--md-filled-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-filled-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-filled-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-filled-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-filled-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-supporting-text-color: var(--md-filled-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-filled-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-active-indicator-color: var(--md-filled-select-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-active-indicator-height: var(--md-filled-select-text-field-focus-active-indicator-height, 3px);--_text-field-focus-input-text-color: var(--md-filled-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-filled-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-filled-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-supporting-text-color: var(--md-filled-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-filled-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-active-indicator-color: var(--md-filled-select-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-active-indicator-height: var(--md-filled-select-text-field-hover-active-indicator-height, 1px);--_text-field-hover-input-text-color: var(--md-filled-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-filled-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-filled-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-state-layer-color: var(--md-filled-select-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-state-layer-opacity: var(--md-filled-select-text-field-hover-state-layer-opacity, 0.08);--_text-field-hover-supporting-text-color: var(--md-filled-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-filled-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-filled-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-filled-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-filled-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-filled-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-filled-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-filled-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-filled-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-filled-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-filled-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-filled-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-filled-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-filled-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-filled-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-filled-select-text-field-leading-icon-size, 24px);--_text-field-supporting-text-color: var(--md-filled-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-filled-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-filled-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-filled-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-filled-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-filled-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-filled-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-filled-select-text-field-container-shape-start-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-filled-select-text-field-container-shape-start-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-filled-select-text-field-container-shape-end-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_text-field-container-shape-end-start: var(--md-filled-select-text-field-container-shape-end-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--md-filled-field-active-indicator-color: var(--_text-field-active-indicator-color);--md-filled-field-active-indicator-height: var(--_text-field-active-indicator-height);--md-filled-field-container-color: var(--_text-field-container-color);--md-filled-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-filled-field-content-color: var(--_text-field-input-text-color);--md-filled-field-content-font: var(--_text-field-input-text-font);--md-filled-field-content-line-height: var(--_text-field-input-text-line-height);--md-filled-field-content-size: var(--_text-field-input-text-size);--md-filled-field-content-weight: var(--_text-field-input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_text-field-disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_text-field-disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_text-field-disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_text-field-disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_text-field-disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_text-field-error-active-indicator-color);--md-filled-field-error-content-color: var(--_text-field-error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_text-field-error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_text-field-error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_text-field-error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_text-field-error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-filled-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_text-field-focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_text-field-focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_text-field-hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_text-field-hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_text-field-hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_text-field-hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_text-field-label-text-color);--md-filled-field-label-text-font: var(--_text-field-label-text-font);--md-filled-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-filled-field-label-text-size: var(--_text-field-label-text-size);--md-filled-field-label-text-weight: var(--_text-field-label-text-weight);--md-filled-field-leading-content-color: var(--_text-field-leading-icon-color);--md-filled-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-filled-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-filled-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-filled-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)} `; /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const B = c`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} +const R = T`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none} `; /** * @license - * Copyright 2024 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const _ = c`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} -`; -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let x = class extends N { +let m = class extends oe { }; -x.styles = [ - _, - B, - D -]; -x = a([ - y("md-filled-button") -], x); +m.styles = [R, re]; +m = l([ + E("md-filled-select") +], m); /** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class G extends t { - renderElevationOrOutline() { - return d``; +class de extends o { + constructor() { + super(...arguments), this.fieldTag = I`md-outlined-field`; } } /** @@ -199,144 +568,265 @@ class G extends t { * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const P = c`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)} +const ae = T`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)} `; /** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let g = class extends G { +let g = class extends de { }; -g.styles = [ - _, - B, - P -]; -g = a([ - y("md-filled-tonal-button") +g.styles = [R, ae]; +g = l([ + E("md-outlined-select") ], g); /** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class S extends t { - renderElevationOrOutline() { - return d``; +function se() { + return new Event("request-selection", { + bubbles: !0, + composed: !0 + }); +} +function ne() { + return new Event("request-deselection", { + bubbles: !0, + composed: !0 + }); +} +class ce { + /** + * The recommended role of the select option. + */ + get role() { + return this.menuItemController.role; + } + /** + * The text that is selectable via typeahead. If not set, defaults to the + * innerText of the item slotted into the `"headline"` slot, and if there are + * no slotted elements into headline, then it checks the _default_ slot, and + * then the `"supporting-text"` slot if nothing is in _default_. + */ + get typeaheadText() { + return this.menuItemController.typeaheadText; + } + setTypeaheadText(e) { + this.menuItemController.setTypeaheadText(e); + } + /** + * The text that is displayed in the select field when selected. If not set, + * defaults to the textContent of the item slotted into the `"headline"` slot, + * and if there are no slotted elements into headline, then it checks the + * _default_ slot, and then the `"supporting-text"` slot if nothing is in + * _default_. + */ + get displayText() { + return this.internalDisplayText !== null ? this.internalDisplayText : this.menuItemController.typeaheadText; + } + setDisplayText(e) { + this.internalDisplayText = e; + } + /** + * @param host The SelectOption in which to attach this controller to. + * @param config The object that configures this controller's behavior. + */ + constructor(e, t) { + this.host = e, this.internalDisplayText = null, this.firstUpdate = !0, this.onClick = () => { + this.menuItemController.onClick(); + }, this.onKeydown = (i) => { + this.menuItemController.onKeydown(i); + }, this.lastSelected = this.host.selected, this.menuItemController = new L(e, t), e.addController(this); + } + hostUpdate() { + this.lastSelected !== this.host.selected && (this.host.ariaSelected = this.host.selected ? "true" : "false"); + } + hostUpdated() { + this.lastSelected !== this.host.selected && !this.firstUpdate && (this.host.selected ? this.host.dispatchEvent(se()) : this.host.dispatchEvent(ne())), this.lastSelected = this.host.selected, this.firstUpdate = !1; } } /** * @license - * Copyright 2024 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const j = c`:host{--_container-color: var(--md-elevated-button-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-button-container-elevation, 1);--_container-height: var(--md-elevated-button-container-height, 40px);--_container-shadow-color: var(--md-elevated-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-elevated-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-elevated-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-elevated-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-elevated-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-elevated-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-elevated-button-focus-container-elevation, 1);--_focus-label-text-color: var(--md-elevated-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-elevated-button-hover-container-elevation, 2);--_hover-label-text-color: var(--md-elevated-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-elevated-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-elevated-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-elevated-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-elevated-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-elevated-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-elevated-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-elevated-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-elevated-button-pressed-container-elevation, 1);--_pressed-label-text-color: var(--md-elevated-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-elevated-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-elevated-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-elevated-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-elevated-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-elevated-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-elevated-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-elevated-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-elevated-button-icon-size, 18px);--_pressed-icon-color: var(--md-elevated-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-elevated-button-container-shape-start-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-elevated-button-container-shape-start-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-elevated-button-container-shape-end-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-elevated-button-container-shape-end-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-elevated-button-leading-space, 24px);--_trailing-space: var(--md-elevated-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-elevated-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-elevated-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-elevated-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-elevated-button-with-trailing-icon-trailing-space, 16px)} -`; -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let w = class extends S { -}; -w.styles = [ - _, - B, - j -]; -w = a([ - y("md-elevated-button") -], w); -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -class H extends t { - renderElevationOrOutline() { - return d`
    `; +const fe = O(b); +class s extends fe { + constructor() { + super(...arguments), this.disabled = !1, this.isMenuItem = !0, this.selected = !1, this.value = "", this.type = "option", this.selectOptionController = new ce(this, { + getHeadlineElements: () => this.headlineElements, + getSupportingTextElements: () => this.supportingTextElements, + getDefaultElements: () => this.defaultElements, + getInteractiveElement: () => this.listItemRoot + }); + } + /** + * The text that is selectable via typeahead. If not set, defaults to the + * innerText of the item slotted into the `"headline"` slot. + */ + get typeaheadText() { + return this.selectOptionController.typeaheadText; + } + set typeaheadText(e) { + this.selectOptionController.setTypeaheadText(e); + } + /** + * The text that is displayed in the select field when selected. If not set, + * defaults to the textContent of the item slotted into the `"headline"` slot. + */ + get displayText() { + return this.selectOptionController.displayText; + } + set displayText(e) { + this.selectOptionController.setDisplayText(e); + } + render() { + return this.renderListItem(a` + +
    + ${this.renderRipple()} ${this.renderFocusRing()} +
    + + + ${this.renderBody()} +
    + `); + } + /** + * Renders the root list item. + * + * @param content the child content of the list item. + */ + renderListItem(e) { + return a` +
  • ${e}
  • + `; + } + /** + * Handles rendering of the ripple element. + */ + renderRipple() { + return a` `; + } + /** + * Handles rendering of the focus ring. + */ + renderFocusRing() { + return a` `; + } + /** + * Classes applied to the list item root. + */ + getRenderClasses() { + return { + disabled: this.disabled, + selected: this.selected + }; + } + /** + * Handles rendering the headline and supporting text. + */ + renderBody() { + return a` + + + + + + `; + } + focus() { + var e; + (e = this.listItemRoot) == null || e.focus(); } } -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const Y = c`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)} -`; -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let z = class extends H { +s.shadowRootOptions = { + ...b.shadowRootOptions, + delegatesFocus: !0 }; -z.styles = [_, Y]; -z = a([ - y("md-outlined-button") -], z); +l([ + r({ type: Boolean, reflect: !0 }) +], s.prototype, "disabled", void 0); +l([ + r({ type: Boolean, attribute: "md-menu-item", reflect: !0 }) +], s.prototype, "isMenuItem", void 0); +l([ + r({ type: Boolean }) +], s.prototype, "selected", void 0); +l([ + r() +], s.prototype, "value", void 0); +l([ + _(".list-item") +], s.prototype, "listItemRoot", void 0); +l([ + $({ slot: "headline" }) +], s.prototype, "headlineElements", void 0); +l([ + $({ slot: "supporting-text" }) +], s.prototype, "supportingTextElements", void 0); +l([ + Z({ slot: "" }) +], s.prototype, "defaultElements", void 0); +l([ + r({ attribute: "typeahead-text" }) +], s.prototype, "typeaheadText", null); +l([ + r({ attribute: "display-text" }) +], s.prototype, "displayText", null); /** * @license - * Copyright 2021 Google LLC + * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -class q extends t { -} -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const J = c`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0} -`; -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let $ = class extends q { +let y = class extends s { }; -$.styles = [_, J]; -$ = a([ - y("md-text-button") -], $); -const k = h({ - tagName: "md-filled-button", - elementClass: x, - react: f -}), K = h({ - tagName: "md-filled-tonal-button", - elementClass: g, - react: f -}), Q = h({ - tagName: "md-elevated-button", - elementClass: w, - react: f -}), U = h({ - tagName: "md-outlined-button", - elementClass: z, - react: f -}), V = h({ - tagName: "md-text-button", - elementClass: $, - react: f -}), ue = ({ variant: r, children: e, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, ...m }) => { - switch (r) { - case "filled": - return /* @__PURE__ */ u(k, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); - case "filled-tonal": - return /* @__PURE__ */ u(K, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); - case "elevated": - return /* @__PURE__ */ u(Q, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); - case "outlined": - return /* @__PURE__ */ u(U, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); - case "text": - return /* @__PURE__ */ u(V, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); - default: - return /* @__PURE__ */ u(k, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); - } +y.styles = [N]; +y = l([ + E("md-select-option") +], y); +const xe = S({ + tagName: "md-select", + react: w, + elementClass: m +}), ue = S({ + tagName: "md-select", + react: w, + elementClass: g +}); +S({ + tagName: "md-select-option", + react: w, + elementClass: y +}); +const Ue = (d) => { + const { variant: e = "filled", ...t } = d; + return /* @__PURE__ */ k(e === "filled" ? xe : ue, { ...t }); }; export { - ue as Button + Ue as Select }; diff --git a/dist/react-you-ui25.js b/dist/react-you-ui25.js index 773e10b..07116a6 100644 --- a/dist/react-you-ui25.js +++ b/dist/react-you-ui25.js @@ -1,190 +1,114 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),C=require("react"),e=require("./class-map-DV5418hw.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const T=require("./delegate-4958lG3m.js"),O=require("./query-assigned-elements-BYttmtWz.js"),I=require("./animation-A38fZ1oY.js"),B=require("./redispatch-event-C93E51ce.js"),$=require("./create-component-D9KTUrcf.js");/** +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),b=require("./create-component-D9KTUrcf.js"),e=require("./class-map-DV5418hw.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const z=require("./animation-A38fZ1oY.js"),B=require("./query-assigned-elements-BYttmtWz.js"),E=require("./delegate-4958lG3m.js"),k=require("./form-submitter-of9aDP_O.js"),g=require("./form-label-activation-CYEOF_US.js"),$=require("./element-internals-OOm6rgx-.js"),p=require("react");/** * @license - * Copyright 2023 Google LLC + * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const M=T.mixinDelegatesAria(e.r);class n extends M{get rippleDisabled(){return this.disabled||this.softDisabled}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.alwaysFocusable=!1,this.label="",this.hasIcon=!1,this.addEventListener("click",this.handleClick.bind(this))}focus(a){this.disabled&&!this.alwaysFocusable||super.focus(a)}render(){return e.x` -
    - ${this.renderContainerContent()} -
    - `}updated(a){a.has("disabled")&&a.get("disabled")!==void 0&&this.dispatchEvent(new Event("update-focus",{bubbles:!0}))}getContainerClasses(){return{disabled:this.disabled||this.softDisabled,"has-icon":this.hasIcon}}renderContainerContent(){return e.x` - ${this.renderOutline()} - + */const C=E.mixinDelegatesAria($.mixinElementInternals(e.r));let a=class extends C{get name(){return this.getAttribute("name")??""}set name(t){this.setAttribute("name",t)}get form(){return this[$.internals].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){var t;(t=this.buttonElement)==null||t.focus()}blur(){var t;(t=this.buttonElement)==null||t.blur()}render(){var n;const t=!this.href&&(this.disabled||this.softDisabled),l=this.href?this.renderLink():this.renderButton(),o=this.href?"link":"button";return e.x` + ${(n=this.renderElevationOrOutline)==null?void 0:n.call(this)} +
    + - ${this.renderPrimaryAction(this.renderPrimaryContent())} - `}renderOutline(){return e.x``}renderLeadingIcon(){return e.x``}renderPrimaryContent(){return e.x` - - - - ${this.label?this.label:e.x``} - - + part="ripple" + for=${o} + ?disabled="${t}"> + ${l} + `}renderButton(){const{ariaLabel:t,ariaHasPopup:l,ariaExpanded:o}=this;return e.x``}renderLink(){const{ariaLabel:t,ariaHasPopup:l,ariaExpanded:o}=this;return e.x`${this.renderContent()} + `}renderContent(){const t=e.x``;return e.x` - `}handleIconChange(a){const t=a.target;this.hasIcon=t.assignedElements({flatten:!0}).length>0}handleClick(a){if(this.softDisabled||this.disabled&&this.alwaysFocusable){a.stopImmediatePropagation(),a.preventDefault();return}}}n.shadowRootOptions={...e.r.shadowRootOptions,delegatesFocus:!0};e.__decorate([e.n({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"soft-disabled",reflect:!0})],n.prototype,"softDisabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"always-focusable"})],n.prototype,"alwaysFocusable",void 0);e.__decorate([e.n()],n.prototype,"label",void 0);e.__decorate([e.n({type:Boolean,reflect:!0,attribute:"has-icon"})],n.prototype,"hasIcon",void 0);/** + ${this.trailingIcon?e.E:t} + + ${this.trailingIcon?t:e.E} + `}handleClick(t){if(!this.href&&this.softDisabled){t.stopImmediatePropagation(),t.preventDefault();return}!g.isActivationClick(t)||!this.buttonElement||(this.focus(),g.dispatchActivationClick(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}};k.setupFormSubmitter(a);a.formAssociated=!0;a.shadowRootOptions={mode:"open",delegatesFocus:!0};e.__decorate([e.n({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"soft-disabled",reflect:!0})],a.prototype,"softDisabled",void 0);e.__decorate([e.n()],a.prototype,"href",void 0);e.__decorate([e.n()],a.prototype,"target",void 0);e.__decorate([e.n({type:Boolean,attribute:"trailing-icon",reflect:!0})],a.prototype,"trailingIcon",void 0);e.__decorate([e.n({type:Boolean,attribute:"has-icon",reflect:!0})],a.prototype,"hasIcon",void 0);e.__decorate([e.n()],a.prototype,"type",void 0);e.__decorate([e.n({reflect:!0})],a.prototype,"value",void 0);e.__decorate([z.e$1(".button")],a.prototype,"buttonElement",void 0);e.__decorate([B.o({slot:"icon",flatten:!0})],a.prototype,"assignedIcons",void 0);/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let A=class extends n{constructor(){super(...arguments),this.elevated=!1,this.href="",this.target=""}get primaryId(){return this.href?"link":"button"}get rippleDisabled(){return!this.href&&(this.disabled||this.softDisabled)}getContainerClasses(){return{...super.getContainerClasses(),disabled:!this.href&&(this.disabled||this.softDisabled),elevated:this.elevated,link:!!this.href}}renderPrimaryAction(a){const{ariaLabel:t}=this;return this.href?e.x` - ${a} - `:e.x` - - `}renderOutline(){return this.elevated?e.x``:super.renderOutline()}};e.__decorate([e.n({type:Boolean})],A.prototype,"elevated",void 0);e.__decorate([e.n()],A.prototype,"href",void 0);e.__decorate([e.n()],A.prototype,"target",void 0);/** + */class M extends a{renderElevationOrOutline(){return e.x``}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const S=e.i$1`:host{--_container-height: var(--md-assist-chip-container-height, 32px);--_disabled-label-text-color: var(--md-assist-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-assist-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color: var(--md-assist-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation: var(--md-assist-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-assist-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-assist-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-assist-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-assist-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-assist-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-assist-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-assist-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color: var(--md-assist-chip-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-assist-chip-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-assist-chip-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-assist-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-assist-chip-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-assist-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-assist-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-assist-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-assist-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-assist-chip-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-assist-chip-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-assist-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-assist-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-assist-chip-disabled-outline-opacity, 0.12);--_focus-outline-color: var(--md-assist-chip-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-color: var(--md-assist-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-assist-chip-outline-width, 1px);--_disabled-leading-icon-color: var(--md-assist-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-assist-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color: var(--md-assist-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-assist-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-assist-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-assist-chip-icon-size, 18px);--_pressed-leading-icon-color: var(--md-assist-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-assist-chip-container-shape-start-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-assist-chip-container-shape-start-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-assist-chip-container-shape-end-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-assist-chip-container-shape-end-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-assist-chip-leading-space, 16px);--_trailing-space: var(--md-assist-chip-trailing-space, 16px);--_icon-label-space: var(--md-assist-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-assist-chip-with-leading-icon-leading-space, 8px)}@media(forced-colors: active){.link .outline{border-color:ActiveText}} + */const O=e.i$1`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} `;/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const F=e.i$1`.elevated{--md-elevation-level: var(--_elevated-container-elevation);--md-elevation-shadow-color: var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level: var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level: var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level: var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level: var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid CanvasText}.elevated.disabled md-elevation{border-color:GrayText}} + */const x=e.i$1`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} `;/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const k=e.i$1`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host(:is([disabled],[soft-disabled])){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{min-width:0;padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;font-family:var(--_label-text-font);font-size:var(--_label-text-size);font-weight:var(--_label-text-weight);height:100%;line-height:var(--_label-text-line-height);overflow:hidden;user-select:none}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled,[aria-disabled=true]){cursor:inherit} + */const u=e.i$1`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} `;/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let f=class extends A{};f.styles=[k,F,S];f=e.__decorate([e.t$1("md-assist-chip")],f);/** + */let m=class extends M{};m.styles=[u,x,O];m=e.__decorate([e.t$1("md-filled-button")],m);/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let E=class extends e.r{get chips(){return this.childElements.filter(a=>a instanceof n)}constructor(){super(),this.internals=this.attachInternals(),this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar"}render(){return e.x``}handleKeyDown(a){const t=a.key==="ArrowLeft",i=a.key==="ArrowRight",l=a.key==="Home",s=a.key==="End";if(!t&&!i&&!l&&!s)return;const{chips:o}=this;if(o.length<2)return;if(a.preventDefault(),l||s){const p=l?0:o.length-1;o[p].focus({trailing:s}),this.updateTabIndices();return}const c=getComputedStyle(this).direction==="rtl"?t:i,b=o.find(p=>p.matches(":focus-within"));if(!b){(c?o[0]:o[o.length-1]).focus({trailing:!c}),this.updateTabIndices();return}const m=o.indexOf(b);let d=c?m+1:m-1;for(;d!==m;){d>=o.length?d=0:d<0&&(d=o.length-1);const p=o[d];if(p.disabled&&!p.alwaysFocusable){c?d++:d--;continue}p.focus({trailing:!c}),this.updateTabIndices();break}}updateTabIndices(){const{chips:a}=this;let t;for(const i of a){const l=i.alwaysFocusable||!i.disabled;if(i.matches(":focus-within")&&l){t=i;continue}l&&!t&&(t=i),i.tabIndex=-1}t&&(t.tabIndex=0)}};e.__decorate([O.o()],E.prototype,"childElements",void 0);/** + */class q extends a{renderElevationOrOutline(){return e.x``}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const q=e.i$1`:host{display:flex;flex-wrap:wrap;gap:8px} + */const I=e.i$1`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)} `;/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let g=class extends E{};g.styles=[q];g=e.__decorate([e.t$1("md-chip-set")],g);/** + */let h=class extends q{};h.styles=[u,x,I];h=e.__decorate([e.t$1("md-filled-tonal-button")],h);/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const y="aria-label-remove";class z extends n{get ariaLabelRemove(){if(this.hasAttribute(y))return this.getAttribute(y);const{ariaLabel:a}=this;return a||this.label?`Remove ${a||this.label}`:null}set ariaLabelRemove(a){const t=this.ariaLabelRemove;a!==t&&(a===null?this.removeAttribute(y):this.setAttribute(y,a),this.requestUpdate())}constructor(){super(),this.handleTrailingActionFocus=this.handleTrailingActionFocus.bind(this),this.addEventListener("keydown",this.handleKeyDown.bind(this))}focus(a){if((this.alwaysFocusable||!this.disabled)&&(a!=null&&a.trailing)&&this.trailingAction){this.trailingAction.focus(a);return}super.focus(a)}renderContainerContent(){return e.x` - ${super.renderContainerContent()} - ${this.renderTrailingAction(this.handleTrailingActionFocus)} - `}handleKeyDown(a){var b,m;const t=a.key==="ArrowLeft",i=a.key==="ArrowRight";if(!t&&!i||!this.primaryAction||!this.trailingAction)return;const s=getComputedStyle(this).direction==="rtl"?t:i,o=(b=this.primaryAction)==null?void 0:b.matches(":focus-within"),u=(m=this.trailingAction)==null?void 0:m.matches(":focus-within");if(s&&u||!s&&o)return;a.preventDefault(),a.stopPropagation(),(s?this.trailingAction:this.primaryAction).focus()}handleTrailingActionFocus(){const{primaryAction:a,trailingAction:t}=this;!a||!t||(a.tabIndex=-1,t.addEventListener("focusout",()=>{a.tabIndex=0},{once:!0}))}}/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */function D({ariaLabel:r,disabled:a,focusListener:t,tabbable:i=!1}){return e.x` - - - `}function P(r){this.disabled||this.softDisabled||(r.stopPropagation(),!this.dispatchEvent(new Event("remove",{cancelable:!0})))||this.remove()}/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let h=class extends z{constructor(){super(...arguments),this.elevated=!1,this.removable=!1,this.selected=!1,this.hasSelectedIcon=!1}get primaryId(){return"button"}getContainerClasses(){return{...super.getContainerClasses(),elevated:this.elevated,selected:this.selected,"has-trailing":this.removable,"has-icon":this.hasIcon||this.selected}}renderPrimaryAction(a){const{ariaLabel:t}=this;return e.x` - - `}renderLeadingIcon(){return this.selected?e.x` - - - - `:super.renderLeadingIcon()}renderTrailingAction(a){return this.removable?D({focusListener:a,ariaLabel:this.ariaLabelRemove,disabled:this.disabled||this.softDisabled}):e.E}renderOutline(){return this.elevated?e.x``:super.renderOutline()}handleClickOnChild(a){if(this.disabled||this.softDisabled)return;const t=this.selected;if(this.selected=!this.selected,!B.redispatchEvent(this,a)){this.selected=t;return}}};e.__decorate([e.n({type:Boolean})],h.prototype,"elevated",void 0);e.__decorate([e.n({type:Boolean})],h.prototype,"removable",void 0);e.__decorate([e.n({type:Boolean,reflect:!0})],h.prototype,"selected",void 0);e.__decorate([e.n({type:Boolean,reflect:!0,attribute:"has-selected-icon"})],h.prototype,"hasSelectedIcon",void 0);e.__decorate([I.e$1(".primary.action")],h.prototype,"primaryAction",void 0);e.__decorate([I.e$1(".trailing.action")],h.prototype,"trailingAction",void 0);/** + */class T extends a{renderElevationOrOutline(){return e.x``}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const j=e.i$1`:host{--_container-height: var(--md-filter-chip-container-height, 32px);--_disabled-label-text-color: var(--md-filter-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filter-chip-disabled-label-text-opacity, 0.38);--_elevated-container-elevation: var(--md-filter-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-filter-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-filter-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-filter-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-filter-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-filter-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-filter-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-filter-chip-elevated-pressed-container-elevation, 1);--_elevated-selected-container-color: var(--md-filter-chip-elevated-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_label-text-font: var(--md-filter-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filter-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filter-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filter-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-focus-label-text-color: var(--md-filter-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-filter-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-filter-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-filter-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-filter-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-label-text-color: var(--md-filter-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-filter-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_selected-pressed-state-layer-opacity: var(--md-filter-chip-selected-pressed-state-layer-opacity, 0.12);--_elevated-container-color: var(--md-filter-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_disabled-outline-color: var(--md-filter-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-filter-chip-disabled-outline-opacity, 0.12);--_disabled-selected-container-color: var(--md-filter-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-filter-chip-disabled-selected-container-opacity, 0.12);--_focus-outline-color: var(--md-filter-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-filter-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-filter-chip-outline-width, 1px);--_selected-container-color: var(--md-filter-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-outline-width: var(--md-filter-chip-selected-outline-width, 0px);--_focus-label-text-color: var(--md-filter-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-filter-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filter-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-filter-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filter-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-filter-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-filter-chip-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filter-chip-pressed-state-layer-opacity, 0.12);--_icon-size: var(--md-filter-chip-icon-size, 18px);--_disabled-leading-icon-color: var(--md-filter-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filter-chip-disabled-leading-icon-opacity, 0.38);--_selected-focus-leading-icon-color: var(--md-filter-chip-selected-focus-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-leading-icon-color: var(--md-filter-chip-selected-hover-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-leading-icon-color: var(--md-filter-chip-selected-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-leading-icon-color: var(--md-filter-chip-selected-pressed-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-leading-icon-color: var(--md-filter-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-filter-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-filter-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-filter-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-filter-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filter-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-filter-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-filter-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-filter-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-filter-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-filter-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filter-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-filter-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-filter-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filter-chip-container-shape-start-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-filter-chip-container-shape-start-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-filter-chip-container-shape-end-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-filter-chip-container-shape-end-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-filter-chip-leading-space, 16px);--_trailing-space: var(--md-filter-chip-trailing-space, 16px);--_icon-label-space: var(--md-filter-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-filter-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-filter-chip-with-trailing-icon-trailing-space, 8px)}.selected.elevated::before{background:var(--_elevated-selected-container-color)}.checkmark{height:var(--_icon-size);width:var(--_icon-size)}.disabled .checkmark{opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){.disabled .checkmark{opacity:1}} + */const F=e.i$1`:host{--_container-color: var(--md-elevated-button-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-button-container-elevation, 1);--_container-height: var(--md-elevated-button-container-height, 40px);--_container-shadow-color: var(--md-elevated-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-elevated-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-elevated-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-elevated-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-elevated-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-elevated-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-elevated-button-focus-container-elevation, 1);--_focus-label-text-color: var(--md-elevated-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-elevated-button-hover-container-elevation, 2);--_hover-label-text-color: var(--md-elevated-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-elevated-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-elevated-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-elevated-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-elevated-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-elevated-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-elevated-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-elevated-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-elevated-button-pressed-container-elevation, 1);--_pressed-label-text-color: var(--md-elevated-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-elevated-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-elevated-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-elevated-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-elevated-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-elevated-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-elevated-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-elevated-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-elevated-button-icon-size, 18px);--_pressed-icon-color: var(--md-elevated-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-elevated-button-container-shape-start-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-elevated-button-container-shape-start-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-elevated-button-container-shape-end-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-elevated-button-container-shape-end-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-elevated-button-leading-space, 24px);--_trailing-space: var(--md-elevated-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-elevated-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-elevated-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-elevated-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-elevated-button-with-trailing-icon-trailing-space, 16px)} `;/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let y=class extends T{};y.styles=[u,x,F];y=e.__decorate([e.t$1("md-elevated-button")],y);/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class j extends a{renderElevationOrOutline(){return e.x`
    `}}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const L=e.i$1`.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}} + */const R=e.i$1`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)} `;/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let f=class extends j{};f.styles=[u,R];f=e.__decorate([e.t$1("md-outlined-button")],f);/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class A extends a{}/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 - */const R=e.i$1`.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}} + */const L=e.i$1`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0} `;/** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 - */let _=class extends h{};_.styles=[k,F,R,L,j];_=e.__decorate([e.t$1("md-filter-chip")],_);/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let v=class extends z{constructor(){super(...arguments),this.avatar=!1,this.href="",this.target="",this.removeOnly=!1,this.selected=!1}get primaryId(){return this.href?"link":this.removeOnly?"":"button"}get rippleDisabled(){return!this.href&&(this.disabled||this.softDisabled)}get primaryAction(){return this.removeOnly?null:this.renderRoot.querySelector(".primary.action")}getContainerClasses(){return{...super.getContainerClasses(),avatar:this.avatar,disabled:!this.href&&(this.disabled||this.softDisabled),link:!!this.href,selected:this.selected,"has-trailing":!0}}renderPrimaryAction(a){const{ariaLabel:t}=this;return this.href?e.x` - ${a} - `:this.removeOnly?e.x` - - ${a} - - `:e.x` - - `}renderTrailingAction(a){return D({focusListener:a,ariaLabel:this.ariaLabelRemove,disabled:!this.href&&(this.disabled||this.softDisabled),tabbable:this.removeOnly})}};e.__decorate([e.n({type:Boolean})],v.prototype,"avatar",void 0);e.__decorate([e.n()],v.prototype,"href",void 0);e.__decorate([e.n()],v.prototype,"target",void 0);e.__decorate([e.n({type:Boolean,attribute:"remove-only"})],v.prototype,"removeOnly",void 0);e.__decorate([e.n({type:Boolean,reflect:!0})],v.prototype,"selected",void 0);e.__decorate([I.e$1(".trailing.action")],v.prototype,"trailingAction",void 0);/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */const K=e.i$1`:host{--_container-height: var(--md-input-chip-container-height, 32px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-font: var(--md-input-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-input-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-input-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-input-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, var(--md-sys-shape-corner-full, 9999px));--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-input-chip-leading-space, 16px);--_trailing-space: var(--md-input-chip-trailing-space, 16px);--_icon-label-space: var(--md-input-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-input-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-input-chip-with-trailing-icon-trailing-space, 8px)}:host([avatar]){--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}@media(forced-colors: active){.link .outline{border-color:ActiveText}.disabled.avatar .leading.icon{opacity:1}} -`;/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */let x=class extends v{};x.styles=[k,R,L,K];x=e.__decorate([e.t$1("md-input-chip")],x);const N=$.o({react:C,tagName:"md-chip-set",elementClass:g}),G=r=>w.jsx(N,{children:r.children}),U=$.o({react:C,tagName:"md-assist-chip",elementClass:f,events:{onClick:"click",onKeyDown:"keydown",onFocus:"focus",onBlur:"blur"}}),H=r=>{const{label:a,elevated:t,href:i,target:l,disabled:s,alwaysFocusable:o}=r;return w.jsx(U,{label:a,elevated:t,href:i,target:l,disabled:s,alwaysFocusable:o})},V=$.o({react:C,tagName:"md-filter-chip",elementClass:_,events:{onRemove:"remove",onUpdateFocus:"update-focus"}}),Z=r=>{const{label:a,elevated:t,removable:i,selected:l,hasSelectedIcon:s,disabled:o,alwaysFocusable:u}=r;return w.jsx(V,{label:a,elevated:t,removable:i,selected:l,hasSelectedIcon:s,disabled:o,alwaysFocusable:u})},Y=$.o({react:C,tagName:"md-input-chip",elementClass:x,events:{onRemove:"remove",onUpdateFocus:"update-focus"}}),J=r=>{const{label:a,avatar:t,href:i,target:l,removeOnly:s,selected:o,disabled:u,alwaysFocusable:c}=r;return w.jsx(Y,{label:a,avatar:t,href:i,target:l,removeOnly:s,selected:o,disabled:u,alwaysFocusable:c})};exports.AssistChip=H;exports.ChipSet=G;exports.FilterChip=Z;exports.InputChip=J; + */let _=class extends A{};_.styles=[u,L];_=e.__decorate([e.t$1("md-text-button")],_);const w=b.o({tagName:"md-filled-button",elementClass:m,react:p}),S=b.o({tagName:"md-filled-tonal-button",elementClass:h,react:p}),N=b.o({tagName:"md-elevated-button",elementClass:y,react:p}),P=b.o({tagName:"md-outlined-button",elementClass:f,react:p}),D=b.o({tagName:"md-text-button",elementClass:_,react:p}),G=({variant:r,children:t,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,...c})=>{switch(r){case"filled":return v.jsx(w,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"filled-tonal":return v.jsx(S,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"elevated":return v.jsx(N,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"outlined":return v.jsx(P,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});case"text":return v.jsx(D,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t});default:return v.jsx(w,{...c,disabled:l,softDisabled:o,href:n,target:i,type:d,value:s,children:t})}};exports.Button=G; diff --git a/dist/react-you-ui25.mjs b/dist/react-you-ui25.mjs index 2396b4d..078c6e5 100644 --- a/dist/react-you-ui25.mjs +++ b/dist/react-you-ui25.mjs @@ -1,634 +1,342 @@ -import { jsx as k } from "react/jsx-runtime"; -import I from "react"; -import { r as L, _ as t, n as l, x as s, c as K, E as n, a as u, b as F } from "./class-map-CwiboTfb.mjs"; +import { jsx as u } from "react/jsx-runtime"; +import { o as h } from "./create-component-CVXl33PD.mjs"; +import { _ as a, n as s, x as d, E as n, r as E, a as c, b as y } from "./class-map-CwiboTfb.mjs"; import "./elevation-Dg8ssDJC.mjs"; import "./ripple-pQcEjR05.mjs"; -import { m as N } from "./delegate-BXi1gVeU.mjs"; -import { o as G } from "./query-assigned-elements-DUhez03i.mjs"; -import { a as R } from "./animation-DjClVFum.mjs"; -import { r as U } from "./redispatch-event-taWUbWUt.mjs"; -import { o as z } from "./create-component-CVXl33PD.mjs"; +import { a as C } from "./animation-DjClVFum.mjs"; +import { o as O } from "./query-assigned-elements-DUhez03i.mjs"; +import { m as M } from "./delegate-BXi1gVeU.mjs"; +import { s as I } from "./form-submitter-ChT3Wi0f.mjs"; +import { i as T, d as F } from "./form-label-activation-ed0HgVsy.mjs"; +import { m as R, i as A } from "./element-internals-3IY9gE4L.mjs"; +import f from "react"; /** * @license - * Copyright 2023 Google LLC + * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const j = N(L); -class p extends j { +const L = M(R(E)); +let t = class extends L { + get name() { + return this.getAttribute("name") ?? ""; + } + set name(e) { + this.setAttribute("name", e); + } /** - * Whether or not the primary ripple is disabled (defaults to `disabled`). - * Some chip actions such as links cannot be disabled. + * The associated form element with which this element's value will submit. */ - get rippleDisabled() { - return this.disabled || this.softDisabled; + get form() { + return this[A].form; } constructor() { - super(), this.disabled = !1, this.softDisabled = !1, this.alwaysFocusable = !1, this.label = "", this.hasIcon = !1, this.addEventListener("click", this.handleClick.bind(this)); + super(), this.disabled = !1, this.softDisabled = !1, this.href = "", this.target = "", this.trailingIcon = !1, this.hasIcon = !1, this.type = "submit", this.value = "", this.addEventListener("click", this.handleClick.bind(this)); } - focus(e) { - this.disabled && !this.alwaysFocusable || super.focus(e); + focus() { + var e; + (e = this.buttonElement) == null || e.focus(); + } + blur() { + var e; + (e = this.buttonElement) == null || e.blur(); } render() { - return s` -
    - ${this.renderContainerContent()} -
    - `; - } - updated(e) { - e.has("disabled") && e.get("disabled") !== void 0 && this.dispatchEvent(new Event("update-focus", { bubbles: !0 })); - } - getContainerClasses() { - return { - disabled: this.disabled || this.softDisabled, - "has-icon": this.hasIcon - }; - } - renderContainerContent() { - return s` - ${this.renderOutline()} - + var i; + const e = !this.href && (this.disabled || this.softDisabled), l = this.href ? this.renderLink() : this.renderButton(), o = this.href ? "link" : "button"; + return d` + ${(i = this.renderElevationOrOutline) == null ? void 0 : i.call(this)} +
    + - ${this.renderPrimaryAction(this.renderPrimaryContent())} + part="ripple" + for=${o} + ?disabled="${e}"> + ${l} `; } - renderOutline() { - return s``; + renderButton() { + const { ariaLabel: e, ariaHasPopup: l, ariaExpanded: o } = this; + return d``; } - renderLeadingIcon() { - return s``; + renderLink() { + const { ariaLabel: e, ariaHasPopup: l, ariaExpanded: o } = this; + return d`${this.renderContent()} + `; } - renderPrimaryContent() { - return s` - - - - ${this.label ? this.label : s``} - - + renderContent() { + const e = d``; + return d` + ${this.trailingIcon ? n : e} + + ${this.trailingIcon ? e : n} `; } - handleIconChange(e) { - const a = e.target; - this.hasIcon = a.assignedElements({ flatten: !0 }).length > 0; - } handleClick(e) { - if (this.softDisabled || this.disabled && this.alwaysFocusable) { + if (!this.href && this.softDisabled) { e.stopImmediatePropagation(), e.preventDefault(); return; } + !T(e) || !this.buttonElement || (this.focus(), F(this.buttonElement)); } -} -p.shadowRootOptions = { - ...L.shadowRootOptions, + handleSlotChange() { + this.hasIcon = this.assignedIcons.length > 0; + } +}; +I(t); +t.formAssociated = !0; +t.shadowRootOptions = { + mode: "open", delegatesFocus: !0 }; -t([ - l({ type: Boolean, reflect: !0 }) -], p.prototype, "disabled", void 0); -t([ - l({ type: Boolean, attribute: "soft-disabled", reflect: !0 }) -], p.prototype, "softDisabled", void 0); -t([ - l({ type: Boolean, attribute: "always-focusable" }) -], p.prototype, "alwaysFocusable", void 0); -t([ - l() -], p.prototype, "label", void 0); -t([ - l({ type: Boolean, reflect: !0, attribute: "has-icon" }) -], p.prototype, "hasIcon", void 0); +a([ + s({ type: Boolean, reflect: !0 }) +], t.prototype, "disabled", void 0); +a([ + s({ type: Boolean, attribute: "soft-disabled", reflect: !0 }) +], t.prototype, "softDisabled", void 0); +a([ + s() +], t.prototype, "href", void 0); +a([ + s() +], t.prototype, "target", void 0); +a([ + s({ type: Boolean, attribute: "trailing-icon", reflect: !0 }) +], t.prototype, "trailingIcon", void 0); +a([ + s({ type: Boolean, attribute: "has-icon", reflect: !0 }) +], t.prototype, "hasIcon", void 0); +a([ + s() +], t.prototype, "type", void 0); +a([ + s({ reflect: !0 }) +], t.prototype, "value", void 0); +a([ + C(".button") +], t.prototype, "buttonElement", void 0); +a([ + O({ slot: "icon", flatten: !0 }) +], t.prototype, "assignedIcons", void 0); /** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let D = class extends p { - constructor() { - super(...arguments), this.elevated = !1, this.href = "", this.target = ""; - } - get primaryId() { - return this.href ? "link" : "button"; - } - get rippleDisabled() { - return !this.href && (this.disabled || this.softDisabled); - } - getContainerClasses() { - return { - ...super.getContainerClasses(), - // Link chips cannot be disabled - disabled: !this.href && (this.disabled || this.softDisabled), - elevated: this.elevated, - link: !!this.href - }; - } - renderPrimaryAction(e) { - const { ariaLabel: a } = this; - return this.href ? s` - ${e} - ` : s` - - `; - } - renderOutline() { - return this.elevated ? s`` : super.renderOutline(); +class N extends t { + renderElevationOrOutline() { + return d``; } +} +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const D = c`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)} +`; +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const B = c`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)} +`; +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const _ = c`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none} +`; +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let x = class extends N { }; -t([ - l({ type: Boolean }) -], D.prototype, "elevated", void 0); -t([ - l() -], D.prototype, "href", void 0); -t([ - l() -], D.prototype, "target", void 0); +x.styles = [ + _, + B, + D +]; +x = a([ + y("md-filled-button") +], x); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class G extends t { + renderElevationOrOutline() { + return d``; + } +} /** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const q = u`:host{--_container-height: var(--md-assist-chip-container-height, 32px);--_disabled-label-text-color: var(--md-assist-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-assist-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color: var(--md-assist-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation: var(--md-assist-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-assist-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-assist-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-assist-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-assist-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-assist-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-assist-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-assist-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color: var(--md-assist-chip-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-assist-chip-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-assist-chip-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-assist-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-assist-chip-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-assist-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-assist-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-assist-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-assist-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-assist-chip-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-assist-chip-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-assist-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-assist-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-assist-chip-disabled-outline-opacity, 0.12);--_focus-outline-color: var(--md-assist-chip-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-color: var(--md-assist-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-assist-chip-outline-width, 1px);--_disabled-leading-icon-color: var(--md-assist-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-assist-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color: var(--md-assist-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-assist-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-assist-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-assist-chip-icon-size, 18px);--_pressed-leading-icon-color: var(--md-assist-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-assist-chip-container-shape-start-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-assist-chip-container-shape-start-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-assist-chip-container-shape-end-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-assist-chip-container-shape-end-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-assist-chip-leading-space, 16px);--_trailing-space: var(--md-assist-chip-trailing-space, 16px);--_icon-label-space: var(--md-assist-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-assist-chip-with-leading-icon-leading-space, 8px)}@media(forced-colors: active){.link .outline{border-color:ActiveText}} +const P = c`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)} `; /** * @license - * Copyright 2024 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -const E = u`.elevated{--md-elevation-level: var(--_elevated-container-elevation);--md-elevation-shadow-color: var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level: var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level: var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level: var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level: var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid CanvasText}.elevated.disabled md-elevation{border-color:GrayText}} -`; -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const T = u`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host(:is([disabled],[soft-disabled])){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{min-width:0;padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;font-family:var(--_label-text-font);font-size:var(--_label-text-size);font-weight:var(--_label-text-weight);height:100%;line-height:var(--_label-text-line-height);overflow:hidden;user-select:none}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled,[aria-disabled=true]){cursor:inherit} -`; -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let w = class extends D { +let g = class extends G { }; -w.styles = [T, E, q]; -w = t([ - F("md-assist-chip") +g.styles = [ + _, + B, + P +]; +g = a([ + y("md-filled-tonal-button") +], g); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class S extends t { + renderElevationOrOutline() { + return d``; + } +} +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const j = c`:host{--_container-color: var(--md-elevated-button-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-button-container-elevation, 1);--_container-height: var(--md-elevated-button-container-height, 40px);--_container-shadow-color: var(--md-elevated-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-elevated-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-elevated-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-elevated-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-elevated-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-elevated-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-elevated-button-focus-container-elevation, 1);--_focus-label-text-color: var(--md-elevated-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-elevated-button-hover-container-elevation, 2);--_hover-label-text-color: var(--md-elevated-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-elevated-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-elevated-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-elevated-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-elevated-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-elevated-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-elevated-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-elevated-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-elevated-button-pressed-container-elevation, 1);--_pressed-label-text-color: var(--md-elevated-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-elevated-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-elevated-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-elevated-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-elevated-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-elevated-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-elevated-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-elevated-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-elevated-button-icon-size, 18px);--_pressed-icon-color: var(--md-elevated-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-elevated-button-container-shape-start-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-elevated-button-container-shape-start-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-elevated-button-container-shape-end-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-elevated-button-container-shape-end-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-elevated-button-leading-space, 24px);--_trailing-space: var(--md-elevated-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-elevated-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-elevated-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-elevated-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-elevated-button-with-trailing-icon-trailing-space, 16px)} +`; +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let w = class extends S { +}; +w.styles = [ + _, + B, + j +]; +w = a([ + y("md-elevated-button") ], w); /** * @license - * Copyright 2023 Google LLC + * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let B = class extends L { - get chips() { - return this.childElements.filter((e) => e instanceof p); - } - constructor() { - super(), this.internals = // Cast needed for closure - this.attachInternals(), this.addEventListener("focusin", this.updateTabIndices.bind(this)), this.addEventListener("update-focus", this.updateTabIndices.bind(this)), this.addEventListener("keydown", this.handleKeyDown.bind(this)), this.internals.role = "toolbar"; - } - render() { - return s``; - } - handleKeyDown(e) { - const a = e.key === "ArrowLeft", r = e.key === "ArrowRight", d = e.key === "Home", c = e.key === "End"; - if (!a && !r && !d && !c) - return; - const { chips: o } = this; - if (o.length < 2) - return; - if (e.preventDefault(), d || c) { - const m = d ? 0 : o.length - 1; - o[m].focus({ trailing: c }), this.updateTabIndices(); - return; - } - const h = getComputedStyle(this).direction === "rtl" ? a : r, _ = o.find((m) => m.matches(":focus-within")); - if (!_) { - (h ? o[0] : o[o.length - 1]).focus({ trailing: !h }), this.updateTabIndices(); - return; - } - const g = o.indexOf(_); - let v = h ? g + 1 : g - 1; - for (; v !== g; ) { - v >= o.length ? v = 0 : v < 0 && (v = o.length - 1); - const m = o[v]; - if (m.disabled && !m.alwaysFocusable) { - h ? v++ : v--; - continue; - } - m.focus({ trailing: !h }), this.updateTabIndices(); - break; - } - } - updateTabIndices() { - const { chips: e } = this; - let a; - for (const r of e) { - const d = r.alwaysFocusable || !r.disabled; - if (r.matches(":focus-within") && d) { - a = r; - continue; - } - d && !a && (a = r), r.tabIndex = -1; - } - a && (a.tabIndex = 0); - } -}; -t([ - G() -], B.prototype, "childElements", void 0); -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const H = u`:host{display:flex;flex-wrap:wrap;gap:8px} -`; -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let C = class extends B { -}; -C.styles = [H]; -C = t([ - F("md-chip-set") -], C); -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const x = "aria-label-remove"; -class O extends p { - get ariaLabelRemove() { - if (this.hasAttribute(x)) - return this.getAttribute(x); - const { ariaLabel: e } = this; - return e || this.label ? `Remove ${e || this.label}` : null; - } - set ariaLabelRemove(e) { - const a = this.ariaLabelRemove; - e !== a && (e === null ? this.removeAttribute(x) : this.setAttribute(x, e), this.requestUpdate()); - } - constructor() { - super(), this.handleTrailingActionFocus = this.handleTrailingActionFocus.bind(this), this.addEventListener("keydown", this.handleKeyDown.bind(this)); - } - focus(e) { - if ((this.alwaysFocusable || !this.disabled) && (e != null && e.trailing) && this.trailingAction) { - this.trailingAction.focus(e); - return; - } - super.focus(e); - } - renderContainerContent() { - return s` - ${super.renderContainerContent()} - ${this.renderTrailingAction(this.handleTrailingActionFocus)} - `; - } - handleKeyDown(e) { - var _, g; - const a = e.key === "ArrowLeft", r = e.key === "ArrowRight"; - if (!a && !r || !this.primaryAction || !this.trailingAction) - return; - const c = getComputedStyle(this).direction === "rtl" ? a : r, o = (_ = this.primaryAction) == null ? void 0 : _.matches(":focus-within"), f = (g = this.trailingAction) == null ? void 0 : g.matches(":focus-within"); - if (c && f || !c && o) - return; - e.preventDefault(), e.stopPropagation(), (c ? this.trailingAction : this.primaryAction).focus(); - } - handleTrailingActionFocus() { - const { primaryAction: e, trailingAction: a } = this; - !e || !a || (e.tabIndex = -1, a.addEventListener("focusout", () => { - e.tabIndex = 0; - }, { once: !0 })); +class H extends t { + renderElevationOrOutline() { + return d`
    `; } } /** * @license - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -function M({ ariaLabel: i, disabled: e, focusListener: a, tabbable: r = !1 }) { - return s` - - - `; -} -function V(i) { - this.disabled || this.softDisabled || (i.stopPropagation(), !this.dispatchEvent(new Event("remove", { cancelable: !0 }))) || this.remove(); +const Y = c`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)} +`; +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let z = class extends H { +}; +z.styles = [_, Y]; +z = a([ + y("md-outlined-button") +], z); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class q extends t { } /** * @license - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -let b = class extends O { - constructor() { - super(...arguments), this.elevated = !1, this.removable = !1, this.selected = !1, this.hasSelectedIcon = !1; - } - get primaryId() { - return "button"; - } - getContainerClasses() { - return { - ...super.getContainerClasses(), - elevated: this.elevated, - selected: this.selected, - "has-trailing": this.removable, - "has-icon": this.hasIcon || this.selected - }; - } - renderPrimaryAction(e) { - const { ariaLabel: a } = this; - return s` - - `; - } - renderLeadingIcon() { - return this.selected ? s` - - - - ` : super.renderLeadingIcon(); - } - renderTrailingAction(e) { - return this.removable ? M({ - focusListener: e, - ariaLabel: this.ariaLabelRemove, - disabled: this.disabled || this.softDisabled - }) : n; - } - renderOutline() { - return this.elevated ? s`` : super.renderOutline(); - } - handleClickOnChild(e) { - if (this.disabled || this.softDisabled) - return; - const a = this.selected; - if (this.selected = !this.selected, !U(this, e)) { - this.selected = a; - return; - } - } +const J = c`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0} +`; +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let $ = class extends q { }; -t([ - l({ type: Boolean }) -], b.prototype, "elevated", void 0); -t([ - l({ type: Boolean }) -], b.prototype, "removable", void 0); -t([ - l({ type: Boolean, reflect: !0 }) -], b.prototype, "selected", void 0); -t([ - l({ type: Boolean, reflect: !0, attribute: "has-selected-icon" }) -], b.prototype, "hasSelectedIcon", void 0); -t([ - R(".primary.action") -], b.prototype, "primaryAction", void 0); -t([ - R(".trailing.action") -], b.prototype, "trailingAction", void 0); -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const Z = u`:host{--_container-height: var(--md-filter-chip-container-height, 32px);--_disabled-label-text-color: var(--md-filter-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filter-chip-disabled-label-text-opacity, 0.38);--_elevated-container-elevation: var(--md-filter-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-filter-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-filter-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-filter-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-filter-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-filter-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-filter-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-filter-chip-elevated-pressed-container-elevation, 1);--_elevated-selected-container-color: var(--md-filter-chip-elevated-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_label-text-font: var(--md-filter-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filter-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filter-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filter-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-focus-label-text-color: var(--md-filter-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-filter-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-filter-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-filter-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-filter-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-label-text-color: var(--md-filter-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-filter-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_selected-pressed-state-layer-opacity: var(--md-filter-chip-selected-pressed-state-layer-opacity, 0.12);--_elevated-container-color: var(--md-filter-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_disabled-outline-color: var(--md-filter-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-filter-chip-disabled-outline-opacity, 0.12);--_disabled-selected-container-color: var(--md-filter-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-filter-chip-disabled-selected-container-opacity, 0.12);--_focus-outline-color: var(--md-filter-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-filter-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-filter-chip-outline-width, 1px);--_selected-container-color: var(--md-filter-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-outline-width: var(--md-filter-chip-selected-outline-width, 0px);--_focus-label-text-color: var(--md-filter-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-filter-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filter-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-filter-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filter-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-filter-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-filter-chip-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filter-chip-pressed-state-layer-opacity, 0.12);--_icon-size: var(--md-filter-chip-icon-size, 18px);--_disabled-leading-icon-color: var(--md-filter-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filter-chip-disabled-leading-icon-opacity, 0.38);--_selected-focus-leading-icon-color: var(--md-filter-chip-selected-focus-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-leading-icon-color: var(--md-filter-chip-selected-hover-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-leading-icon-color: var(--md-filter-chip-selected-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-leading-icon-color: var(--md-filter-chip-selected-pressed-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-leading-icon-color: var(--md-filter-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-filter-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-filter-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-filter-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-filter-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filter-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-filter-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-filter-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-filter-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-filter-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-filter-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filter-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-filter-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-filter-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filter-chip-container-shape-start-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-filter-chip-container-shape-start-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-filter-chip-container-shape-end-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-filter-chip-container-shape-end-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-filter-chip-leading-space, 16px);--_trailing-space: var(--md-filter-chip-trailing-space, 16px);--_icon-label-space: var(--md-filter-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-filter-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-filter-chip-with-trailing-icon-trailing-space, 8px)}.selected.elevated::before{background:var(--_elevated-selected-container-color)}.checkmark{height:var(--_icon-size);width:var(--_icon-size)}.disabled .checkmark{opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){.disabled .checkmark{opacity:1}} -`; -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const S = u`.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}} -`; -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const P = u`.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}} -`; -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let $ = class extends b { -}; -$.styles = [ - T, - E, - P, - S, - Z -]; -$ = t([ - F("md-filter-chip") +$.styles = [_, J]; +$ = a([ + y("md-text-button") ], $); -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let y = class extends O { - constructor() { - super(...arguments), this.avatar = !1, this.href = "", this.target = "", this.removeOnly = !1, this.selected = !1; - } - get primaryId() { - return this.href ? "link" : this.removeOnly ? "" : "button"; - } - get rippleDisabled() { - return !this.href && (this.disabled || this.softDisabled); - } - get primaryAction() { - return this.removeOnly ? null : this.renderRoot.querySelector(".primary.action"); - } - getContainerClasses() { - return { - ...super.getContainerClasses(), - avatar: this.avatar, - // Link chips cannot be disabled - disabled: !this.href && (this.disabled || this.softDisabled), - link: !!this.href, - selected: this.selected, - "has-trailing": !0 - }; - } - renderPrimaryAction(e) { - const { ariaLabel: a } = this; - return this.href ? s` - ${e} - ` : this.removeOnly ? s` - - ${e} - - ` : s` - - `; - } - renderTrailingAction(e) { - return M({ - focusListener: e, - ariaLabel: this.ariaLabelRemove, - disabled: !this.href && (this.disabled || this.softDisabled), - tabbable: this.removeOnly - }); - } -}; -t([ - l({ type: Boolean }) -], y.prototype, "avatar", void 0); -t([ - l() -], y.prototype, "href", void 0); -t([ - l() -], y.prototype, "target", void 0); -t([ - l({ type: Boolean, attribute: "remove-only" }) -], y.prototype, "removeOnly", void 0); -t([ - l({ type: Boolean, reflect: !0 }) -], y.prototype, "selected", void 0); -t([ - R(".trailing.action") -], y.prototype, "trailingAction", void 0); -/** - * @license - * Copyright 2024 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const Y = u`:host{--_container-height: var(--md-input-chip-container-height, 32px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-font: var(--md-input-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-input-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-input-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-input-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, var(--md-sys-shape-corner-full, 9999px));--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-input-chip-leading-space, 16px);--_trailing-space: var(--md-input-chip-trailing-space, 16px);--_icon-label-space: var(--md-input-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-input-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-input-chip-with-trailing-icon-trailing-space, 8px)}:host([avatar]){--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}@media(forced-colors: active){.link .outline{border-color:ActiveText}.disabled.avatar .leading.icon{opacity:1}} -`; -/** - * @license - * Copyright 2023 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -let A = class extends y { -}; -A.styles = [ - T, - P, - S, - Y -]; -A = t([ - F("md-input-chip") -], A); -const J = z({ - react: I, - tagName: "md-chip-set", - elementClass: C -}), fe = (i) => /* @__PURE__ */ k(J, { children: i.children }), Q = z({ - react: I, - tagName: "md-assist-chip", +const k = h({ + tagName: "md-filled-button", + elementClass: x, + react: f +}), K = h({ + tagName: "md-filled-tonal-button", + elementClass: g, + react: f +}), Q = h({ + tagName: "md-elevated-button", elementClass: w, - events: { - onClick: "click", - onKeyDown: "keydown", - onFocus: "focus", - onBlur: "blur" - } -}), ge = (i) => { - const { label: e, elevated: a, href: r, target: d, disabled: c, alwaysFocusable: o } = i; - return /* @__PURE__ */ k(Q, { label: e, elevated: a, href: r, target: d, disabled: c, alwaysFocusable: o }); -}, W = z({ - react: I, - tagName: "md-filter-chip", + react: f +}), U = h({ + tagName: "md-outlined-button", + elementClass: z, + react: f +}), V = h({ + tagName: "md-text-button", elementClass: $, - events: { - onRemove: "remove", - onUpdateFocus: "update-focus" + react: f +}), ue = ({ variant: r, children: e, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, ...m }) => { + switch (r) { + case "filled": + return /* @__PURE__ */ u(k, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); + case "filled-tonal": + return /* @__PURE__ */ u(K, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); + case "elevated": + return /* @__PURE__ */ u(Q, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); + case "outlined": + return /* @__PURE__ */ u(U, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); + case "text": + return /* @__PURE__ */ u(V, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); + default: + return /* @__PURE__ */ u(k, { ...m, disabled: l, softDisabled: o, href: i, target: v, type: b, value: p, children: e }); } -}), _e = (i) => { - const { label: e, elevated: a, removable: r, selected: d, hasSelectedIcon: c, disabled: o, alwaysFocusable: f } = i; - return /* @__PURE__ */ k(W, { label: e, elevated: a, removable: r, selected: d, hasSelectedIcon: c, disabled: o, alwaysFocusable: f }); -}, X = z({ - react: I, - tagName: "md-input-chip", - elementClass: A, - events: { - onRemove: "remove", - onUpdateFocus: "update-focus" - } -}), xe = (i) => { - const { label: e, avatar: a, href: r, target: d, removeOnly: c, selected: o, disabled: f, alwaysFocusable: h } = i; - return /* @__PURE__ */ k(X, { label: e, avatar: a, href: r, target: d, removeOnly: c, selected: o, disabled: f, alwaysFocusable: h }); }; export { - ge as AssistChip, - fe as ChipSet, - _e as FilterChip, - xe as InputChip + ue as Button }; diff --git a/dist/react-you-ui26.js b/dist/react-you-ui26.js index 5bb15c6..773e10b 100644 --- a/dist/react-you-ui26.js +++ b/dist/react-you-ui26.js @@ -1,18 +1,190 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $e=require("react/jsx-runtime"),ee=require("react");function Ee(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const M=Ee(ee);function re(){return re=Object.assign?Object.assign.bind():function(e){for(var r=1;r0?w(L,--C):0,F--,x===10&&(F=1,Z--),x}function O(){return x=C2||z(x)>3?"":" "}function Ue(e,r){for(;--r&&O()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return H(e,U()+(r<6&&_()==32&&O()==32))}function ne(e){for(;O();)switch(x){case e:return C;case 34:case 39:e!==34&&e!==39&&ne(x);break;case 40:e===41&&ne(e);break;case 92:O();break}return C}function Ve(e,r){for(;O()&&e+x!==57;)if(e+x===84&&_()===47)break;return"/*"+H(r,C-1)+"*"+K(e===47?e:O())}function Xe(e){for(;!z(_());)O();return H(e,C)}function Ye(e){return ke(X("",null,null,null,[""],e=we(e),0,[0],e))}function X(e,r,t,n,a,i,s,c,p){for(var g=0,f=0,d=s,E=0,P=0,m=0,o=1,b=1,y=1,v=0,k="",I=a,$=i,A=n,h=k;b;)switch(m=v,v=O()){case 40:if(m!=108&&w(h,d-1)==58){te(h+=u(V(v),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:h+=V(v);break;case 9:case 10:case 13:case 32:h+=Ge(m);break;case 92:h+=Ue(U()-1,7);continue;case 47:switch(_()){case 42:case 47:G(Ke(Ve(O(),U()),r,t),p);break;default:h+="/"}break;case 123*o:c[g++]=T(h)*y;case 125*o:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+f:y==-1&&(h=u(h,/\f/g,"")),P>0&&T(h)-d&&G(P>32?fe(h+";",n,t,d-1):fe(u(h," ","")+";",n,t,d-2),p);break;case 59:h+=";";default:if(G(A=ce(h,r,t,g,f,a,c,k,I=[],$=[],d),i),v===123)if(f===0)X(h,r,A,A,I,i,d,c,$);else switch(E===99&&w(h,3)===110?100:E){case 100:case 108:case 109:case 115:X(e,A,A,n&&G(ce(e,A,A,0,0,a,c,k,a,I=[],d),$),a,$,d,c,n?I:$);break;default:X(h,A,A,A,[""],$,0,c,$)}}g=f=P=0,o=y=1,k=h="",d=s;break;case 58:d=1+T(h),P=m;default:if(o<1){if(v==123)--o;else if(v==125&&o++==0&&Be()==125)continue}switch(h+=K(v),v*o){case 38:y=f>0?1:(h+="\f",-1);break;case 44:c[g++]=(T(h)-1)*y,y=1;break;case 64:_()===45&&(h+=V(O())),E=_(),f=d=T(k=h+=Xe(U())),v++;break;case 45:m===45&&T(h)==2&&(o=0)}}return i}function ce(e,r,t,n,a,i,s,c,p,g,f){for(var d=a-1,E=a===0?i:[""],P=oe(E),m=0,o=0,b=0;m0?E[y]+" "+v:u(v,/&\f/g,E[y])))&&(p[b++]=k);return J(e,r,t,a===0?ie:c,p,g,f)}function Ke(e,r,t){return J(e,r,t,ye,K(qe()),j(e,2,-2),0)}function fe(e,r,t,n){return J(e,r,t,se,j(e,0,n),j(e,n+1,-1),n)}function N(e,r){for(var t="",n=oe(e),a=0;a6)switch(w(e,r+1)){case 109:if(w(e,r+4)!==45)break;case 102:return u(e,/(.+:)(.+)-([^]+)/,"$1"+l+"$2-$3$1"+Y+(w(e,r+3)==108?"$3":"$2-$3"))+e;case 115:return~te(e,"stretch")?Se(u(e,"stretch","fill-available"),r)+e:e}break;case 4949:if(w(e,r+1)!==115)break;case 6444:switch(w(e,T(e)-3-(~te(e,"!important")&&10))){case 107:return u(e,":",":"+l)+e;case 101:return u(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+l+(w(e,14)===45?"inline-":"")+"box$3$1"+l+"$2$3$1"+S+"$2box$3")+e}break;case 5936:switch(w(e,r+11)){case 114:return l+e+S+u(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return l+e+S+u(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return l+e+S+u(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return l+e+S+e+e}return e}var ir=function(r,t,n,a){if(r.length>-1&&!r.return)switch(r.type){case se:r.return=Se(r.value,r.length);break;case be:return N([D(r,{value:u(r.value,"@","@"+l)})],a);case ie:if(r.length)return He(r.props,function(i){switch(We(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return N([D(r,{props:[u(i,/:(read-\w+)/,":"+Y+"$1")]})],a);case"::placeholder":return N([D(r,{props:[u(i,/:(plac\w+)/,":"+l+"input-$1")]}),D(r,{props:[u(i,/:(plac\w+)/,":"+Y+"$1")]}),D(r,{props:[u(i,/:(plac\w+)/,S+"input-$1")]})],a)}return""})}},sr=[ir],or=function(r){var t=r.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(o){var b=o.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(o),o.setAttribute("data-s",""))})}var a=r.stylisPlugins||sr,i={},s,c=[];s=r.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(o){for(var b=o.getAttribute("data-emotion").split(" "),y=1;y=4;++n,a-=4)t=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(a){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var dr={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hr=!1,pr=/[A-Z]|^ms/g,mr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pe=function(r){return r.charCodeAt(1)===45},ue=function(r){return r!=null&&typeof r!="boolean"},Q=ge(function(e){return Pe(e)?e:e.replace(pr,"-$&").toLowerCase()}),de=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(mr,function(n,a,i){return R={name:a,styles:i,next:R},a})}return dr[r]!==1&&!Pe(r)&&typeof t=="number"&&t!==0?t+"px":t},gr="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function W(e,r,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var a=t;if(a.anim===1)return R={name:a.name,styles:a.styles,next:R},a.name;var i=t;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)R={name:s.name,styles:s.styles,next:R},s=s.next;var c=i.styles+";";return c}return yr(e,r,t)}case"function":{if(e!==void 0){var p=R,g=t(e);return R=p,W(e,r,g)}break}}var f=t;if(r==null)return f;var d=r[f];return d!==void 0?d:f}function yr(e,r,t){var n="";if(Array.isArray(t))for(var a=0;a96?Cr:Pr},me=function(r,t,n){var a;if(t){var i=t.shouldForwardProp;a=r.__emotion_forwardProp&&i?function(s){return r.__emotion_forwardProp(s)&&i(s)}:i}return typeof a!="function"&&n&&(a=r.__emotion_forwardProp),a},Ar=!1,Or=function(r){var t=r.cache,n=r.serialized,a=r.isStringTag;return Ce(t,n,a),wr(function(){return lr(t,n,a)}),null},$r=function e(r,t){var n=r.__emotion_real===r,a=n&&r.__emotion_base||r,i,s;t!==void 0&&(i=t.label,s=t.target);var c=me(r,t,n),p=c||pe(a),g=!p("as");return function(){var f=arguments,d=n&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),f[0]==null||f[0].raw===void 0)d.push.apply(d,f);else{d.push(f[0][0]);for(var E=f.length,P=1;Pe.display}; - flex-direction: ${e=>e.flexDirection}; - flex-wrap: ${e=>e.flexWrap}; - justify-content: ${e=>e.justifyContent}; - align-items: ${e=>e.alignItems}; - align-content: ${e=>e.alignContent}; - gap: ${e=>e.gap}; - row-gap: ${e=>e.rowGap}; - column-gap: ${e=>e.columnGap}; - flex: ${e=>e.flex}; - flex-grow: ${e=>e.flexGrow}; - flex-shrink: ${e=>e.flexShrink}; - flex-basis: ${e=>e.flexBasis}; - flex-flow: ${e=>e.flexFlow}; - align-self: ${e=>e.alignSelf}; - order: ${e=>e.order}; -`,Rr=e=>{const{style:r,children:t,...n}=e;return $e.jsx(Tr,{style:r,...n,children:t})};exports.Box=Rr; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),C=require("react"),e=require("./class-map-DV5418hw.js");require("./elevation-CqmyG_RP.js");require("./ripple-DoKzzEey.js");const T=require("./delegate-4958lG3m.js"),O=require("./query-assigned-elements-BYttmtWz.js"),I=require("./animation-A38fZ1oY.js"),B=require("./redispatch-event-C93E51ce.js"),$=require("./create-component-D9KTUrcf.js");/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const M=T.mixinDelegatesAria(e.r);class n extends M{get rippleDisabled(){return this.disabled||this.softDisabled}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.alwaysFocusable=!1,this.label="",this.hasIcon=!1,this.addEventListener("click",this.handleClick.bind(this))}focus(a){this.disabled&&!this.alwaysFocusable||super.focus(a)}render(){return e.x` +
    + ${this.renderContainerContent()} +
    + `}updated(a){a.has("disabled")&&a.get("disabled")!==void 0&&this.dispatchEvent(new Event("update-focus",{bubbles:!0}))}getContainerClasses(){return{disabled:this.disabled||this.softDisabled,"has-icon":this.hasIcon}}renderContainerContent(){return e.x` + ${this.renderOutline()} + + + ${this.renderPrimaryAction(this.renderPrimaryContent())} + `}renderOutline(){return e.x``}renderLeadingIcon(){return e.x``}renderPrimaryContent(){return e.x` + + + + ${this.label?this.label:e.x``} + + + + `}handleIconChange(a){const t=a.target;this.hasIcon=t.assignedElements({flatten:!0}).length>0}handleClick(a){if(this.softDisabled||this.disabled&&this.alwaysFocusable){a.stopImmediatePropagation(),a.preventDefault();return}}}n.shadowRootOptions={...e.r.shadowRootOptions,delegatesFocus:!0};e.__decorate([e.n({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"soft-disabled",reflect:!0})],n.prototype,"softDisabled",void 0);e.__decorate([e.n({type:Boolean,attribute:"always-focusable"})],n.prototype,"alwaysFocusable",void 0);e.__decorate([e.n()],n.prototype,"label",void 0);e.__decorate([e.n({type:Boolean,reflect:!0,attribute:"has-icon"})],n.prototype,"hasIcon",void 0);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let A=class extends n{constructor(){super(...arguments),this.elevated=!1,this.href="",this.target=""}get primaryId(){return this.href?"link":"button"}get rippleDisabled(){return!this.href&&(this.disabled||this.softDisabled)}getContainerClasses(){return{...super.getContainerClasses(),disabled:!this.href&&(this.disabled||this.softDisabled),elevated:this.elevated,link:!!this.href}}renderPrimaryAction(a){const{ariaLabel:t}=this;return this.href?e.x` + ${a} + `:e.x` + + `}renderOutline(){return this.elevated?e.x``:super.renderOutline()}};e.__decorate([e.n({type:Boolean})],A.prototype,"elevated",void 0);e.__decorate([e.n()],A.prototype,"href",void 0);e.__decorate([e.n()],A.prototype,"target",void 0);/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const S=e.i$1`:host{--_container-height: var(--md-assist-chip-container-height, 32px);--_disabled-label-text-color: var(--md-assist-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-assist-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color: var(--md-assist-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation: var(--md-assist-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-assist-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-assist-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-assist-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-assist-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-assist-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-assist-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-assist-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color: var(--md-assist-chip-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-assist-chip-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-assist-chip-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-assist-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-assist-chip-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-assist-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-assist-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-assist-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-assist-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-assist-chip-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-assist-chip-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-assist-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-assist-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-assist-chip-disabled-outline-opacity, 0.12);--_focus-outline-color: var(--md-assist-chip-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-color: var(--md-assist-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-assist-chip-outline-width, 1px);--_disabled-leading-icon-color: var(--md-assist-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-assist-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color: var(--md-assist-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-assist-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-assist-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-assist-chip-icon-size, 18px);--_pressed-leading-icon-color: var(--md-assist-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-assist-chip-container-shape-start-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-assist-chip-container-shape-start-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-assist-chip-container-shape-end-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-assist-chip-container-shape-end-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-assist-chip-leading-space, 16px);--_trailing-space: var(--md-assist-chip-trailing-space, 16px);--_icon-label-space: var(--md-assist-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-assist-chip-with-leading-icon-leading-space, 8px)}@media(forced-colors: active){.link .outline{border-color:ActiveText}} +`;/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const F=e.i$1`.elevated{--md-elevation-level: var(--_elevated-container-elevation);--md-elevation-shadow-color: var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level: var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level: var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level: var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level: var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid CanvasText}.elevated.disabled md-elevation{border-color:GrayText}} +`;/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const k=e.i$1`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host(:is([disabled],[soft-disabled])){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{min-width:0;padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;font-family:var(--_label-text-font);font-size:var(--_label-text-size);font-weight:var(--_label-text-weight);height:100%;line-height:var(--_label-text-line-height);overflow:hidden;user-select:none}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled,[aria-disabled=true]){cursor:inherit} +`;/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let f=class extends A{};f.styles=[k,F,S];f=e.__decorate([e.t$1("md-assist-chip")],f);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let E=class extends e.r{get chips(){return this.childElements.filter(a=>a instanceof n)}constructor(){super(),this.internals=this.attachInternals(),this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar"}render(){return e.x``}handleKeyDown(a){const t=a.key==="ArrowLeft",i=a.key==="ArrowRight",l=a.key==="Home",s=a.key==="End";if(!t&&!i&&!l&&!s)return;const{chips:o}=this;if(o.length<2)return;if(a.preventDefault(),l||s){const p=l?0:o.length-1;o[p].focus({trailing:s}),this.updateTabIndices();return}const c=getComputedStyle(this).direction==="rtl"?t:i,b=o.find(p=>p.matches(":focus-within"));if(!b){(c?o[0]:o[o.length-1]).focus({trailing:!c}),this.updateTabIndices();return}const m=o.indexOf(b);let d=c?m+1:m-1;for(;d!==m;){d>=o.length?d=0:d<0&&(d=o.length-1);const p=o[d];if(p.disabled&&!p.alwaysFocusable){c?d++:d--;continue}p.focus({trailing:!c}),this.updateTabIndices();break}}updateTabIndices(){const{chips:a}=this;let t;for(const i of a){const l=i.alwaysFocusable||!i.disabled;if(i.matches(":focus-within")&&l){t=i;continue}l&&!t&&(t=i),i.tabIndex=-1}t&&(t.tabIndex=0)}};e.__decorate([O.o()],E.prototype,"childElements",void 0);/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const q=e.i$1`:host{display:flex;flex-wrap:wrap;gap:8px} +`;/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let g=class extends E{};g.styles=[q];g=e.__decorate([e.t$1("md-chip-set")],g);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const y="aria-label-remove";class z extends n{get ariaLabelRemove(){if(this.hasAttribute(y))return this.getAttribute(y);const{ariaLabel:a}=this;return a||this.label?`Remove ${a||this.label}`:null}set ariaLabelRemove(a){const t=this.ariaLabelRemove;a!==t&&(a===null?this.removeAttribute(y):this.setAttribute(y,a),this.requestUpdate())}constructor(){super(),this.handleTrailingActionFocus=this.handleTrailingActionFocus.bind(this),this.addEventListener("keydown",this.handleKeyDown.bind(this))}focus(a){if((this.alwaysFocusable||!this.disabled)&&(a!=null&&a.trailing)&&this.trailingAction){this.trailingAction.focus(a);return}super.focus(a)}renderContainerContent(){return e.x` + ${super.renderContainerContent()} + ${this.renderTrailingAction(this.handleTrailingActionFocus)} + `}handleKeyDown(a){var b,m;const t=a.key==="ArrowLeft",i=a.key==="ArrowRight";if(!t&&!i||!this.primaryAction||!this.trailingAction)return;const s=getComputedStyle(this).direction==="rtl"?t:i,o=(b=this.primaryAction)==null?void 0:b.matches(":focus-within"),u=(m=this.trailingAction)==null?void 0:m.matches(":focus-within");if(s&&u||!s&&o)return;a.preventDefault(),a.stopPropagation(),(s?this.trailingAction:this.primaryAction).focus()}handleTrailingActionFocus(){const{primaryAction:a,trailingAction:t}=this;!a||!t||(a.tabIndex=-1,t.addEventListener("focusout",()=>{a.tabIndex=0},{once:!0}))}}/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function D({ariaLabel:r,disabled:a,focusListener:t,tabbable:i=!1}){return e.x` + + + `}function P(r){this.disabled||this.softDisabled||(r.stopPropagation(),!this.dispatchEvent(new Event("remove",{cancelable:!0})))||this.remove()}/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let h=class extends z{constructor(){super(...arguments),this.elevated=!1,this.removable=!1,this.selected=!1,this.hasSelectedIcon=!1}get primaryId(){return"button"}getContainerClasses(){return{...super.getContainerClasses(),elevated:this.elevated,selected:this.selected,"has-trailing":this.removable,"has-icon":this.hasIcon||this.selected}}renderPrimaryAction(a){const{ariaLabel:t}=this;return e.x` + + `}renderLeadingIcon(){return this.selected?e.x` + + + + `:super.renderLeadingIcon()}renderTrailingAction(a){return this.removable?D({focusListener:a,ariaLabel:this.ariaLabelRemove,disabled:this.disabled||this.softDisabled}):e.E}renderOutline(){return this.elevated?e.x``:super.renderOutline()}handleClickOnChild(a){if(this.disabled||this.softDisabled)return;const t=this.selected;if(this.selected=!this.selected,!B.redispatchEvent(this,a)){this.selected=t;return}}};e.__decorate([e.n({type:Boolean})],h.prototype,"elevated",void 0);e.__decorate([e.n({type:Boolean})],h.prototype,"removable",void 0);e.__decorate([e.n({type:Boolean,reflect:!0})],h.prototype,"selected",void 0);e.__decorate([e.n({type:Boolean,reflect:!0,attribute:"has-selected-icon"})],h.prototype,"hasSelectedIcon",void 0);e.__decorate([I.e$1(".primary.action")],h.prototype,"primaryAction",void 0);e.__decorate([I.e$1(".trailing.action")],h.prototype,"trailingAction",void 0);/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const j=e.i$1`:host{--_container-height: var(--md-filter-chip-container-height, 32px);--_disabled-label-text-color: var(--md-filter-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filter-chip-disabled-label-text-opacity, 0.38);--_elevated-container-elevation: var(--md-filter-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-filter-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-filter-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-filter-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-filter-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-filter-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-filter-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-filter-chip-elevated-pressed-container-elevation, 1);--_elevated-selected-container-color: var(--md-filter-chip-elevated-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_label-text-font: var(--md-filter-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filter-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filter-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filter-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-focus-label-text-color: var(--md-filter-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-filter-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-filter-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-filter-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-filter-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-label-text-color: var(--md-filter-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-filter-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_selected-pressed-state-layer-opacity: var(--md-filter-chip-selected-pressed-state-layer-opacity, 0.12);--_elevated-container-color: var(--md-filter-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_disabled-outline-color: var(--md-filter-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-filter-chip-disabled-outline-opacity, 0.12);--_disabled-selected-container-color: var(--md-filter-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-filter-chip-disabled-selected-container-opacity, 0.12);--_focus-outline-color: var(--md-filter-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-filter-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-filter-chip-outline-width, 1px);--_selected-container-color: var(--md-filter-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-outline-width: var(--md-filter-chip-selected-outline-width, 0px);--_focus-label-text-color: var(--md-filter-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-filter-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filter-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-filter-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filter-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-filter-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-filter-chip-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filter-chip-pressed-state-layer-opacity, 0.12);--_icon-size: var(--md-filter-chip-icon-size, 18px);--_disabled-leading-icon-color: var(--md-filter-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filter-chip-disabled-leading-icon-opacity, 0.38);--_selected-focus-leading-icon-color: var(--md-filter-chip-selected-focus-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-leading-icon-color: var(--md-filter-chip-selected-hover-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-leading-icon-color: var(--md-filter-chip-selected-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-leading-icon-color: var(--md-filter-chip-selected-pressed-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-leading-icon-color: var(--md-filter-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-filter-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-filter-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-filter-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-filter-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filter-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-filter-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-filter-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-filter-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-filter-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-filter-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filter-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-filter-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-filter-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filter-chip-container-shape-start-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-filter-chip-container-shape-start-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-filter-chip-container-shape-end-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-filter-chip-container-shape-end-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-filter-chip-leading-space, 16px);--_trailing-space: var(--md-filter-chip-trailing-space, 16px);--_icon-label-space: var(--md-filter-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-filter-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-filter-chip-with-trailing-icon-trailing-space, 8px)}.selected.elevated::before{background:var(--_elevated-selected-container-color)}.checkmark{height:var(--_icon-size);width:var(--_icon-size)}.disabled .checkmark{opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){.disabled .checkmark{opacity:1}} +`;/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const L=e.i$1`.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}} +`;/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const R=e.i$1`.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}} +`;/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let _=class extends h{};_.styles=[k,F,R,L,j];_=e.__decorate([e.t$1("md-filter-chip")],_);/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let v=class extends z{constructor(){super(...arguments),this.avatar=!1,this.href="",this.target="",this.removeOnly=!1,this.selected=!1}get primaryId(){return this.href?"link":this.removeOnly?"":"button"}get rippleDisabled(){return!this.href&&(this.disabled||this.softDisabled)}get primaryAction(){return this.removeOnly?null:this.renderRoot.querySelector(".primary.action")}getContainerClasses(){return{...super.getContainerClasses(),avatar:this.avatar,disabled:!this.href&&(this.disabled||this.softDisabled),link:!!this.href,selected:this.selected,"has-trailing":!0}}renderPrimaryAction(a){const{ariaLabel:t}=this;return this.href?e.x` + ${a} + `:this.removeOnly?e.x` + + ${a} + + `:e.x` + + `}renderTrailingAction(a){return D({focusListener:a,ariaLabel:this.ariaLabelRemove,disabled:!this.href&&(this.disabled||this.softDisabled),tabbable:this.removeOnly})}};e.__decorate([e.n({type:Boolean})],v.prototype,"avatar",void 0);e.__decorate([e.n()],v.prototype,"href",void 0);e.__decorate([e.n()],v.prototype,"target",void 0);e.__decorate([e.n({type:Boolean,attribute:"remove-only"})],v.prototype,"removeOnly",void 0);e.__decorate([e.n({type:Boolean,reflect:!0})],v.prototype,"selected",void 0);e.__decorate([I.e$1(".trailing.action")],v.prototype,"trailingAction",void 0);/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const K=e.i$1`:host{--_container-height: var(--md-input-chip-container-height, 32px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-font: var(--md-input-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-input-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-input-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-input-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, var(--md-sys-shape-corner-full, 9999px));--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-input-chip-leading-space, 16px);--_trailing-space: var(--md-input-chip-trailing-space, 16px);--_icon-label-space: var(--md-input-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-input-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-input-chip-with-trailing-icon-trailing-space, 8px)}:host([avatar]){--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}@media(forced-colors: active){.link .outline{border-color:ActiveText}.disabled.avatar .leading.icon{opacity:1}} +`;/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let x=class extends v{};x.styles=[k,R,L,K];x=e.__decorate([e.t$1("md-input-chip")],x);const N=$.o({react:C,tagName:"md-chip-set",elementClass:g}),G=r=>w.jsx(N,{children:r.children}),U=$.o({react:C,tagName:"md-assist-chip",elementClass:f,events:{onClick:"click",onKeyDown:"keydown",onFocus:"focus",onBlur:"blur"}}),H=r=>{const{label:a,elevated:t,href:i,target:l,disabled:s,alwaysFocusable:o}=r;return w.jsx(U,{label:a,elevated:t,href:i,target:l,disabled:s,alwaysFocusable:o})},V=$.o({react:C,tagName:"md-filter-chip",elementClass:_,events:{onRemove:"remove",onUpdateFocus:"update-focus"}}),Z=r=>{const{label:a,elevated:t,removable:i,selected:l,hasSelectedIcon:s,disabled:o,alwaysFocusable:u}=r;return w.jsx(V,{label:a,elevated:t,removable:i,selected:l,hasSelectedIcon:s,disabled:o,alwaysFocusable:u})},Y=$.o({react:C,tagName:"md-input-chip",elementClass:x,events:{onRemove:"remove",onUpdateFocus:"update-focus"}}),J=r=>{const{label:a,avatar:t,href:i,target:l,removeOnly:s,selected:o,disabled:u,alwaysFocusable:c}=r;return w.jsx(Y,{label:a,avatar:t,href:i,target:l,removeOnly:s,selected:o,disabled:u,alwaysFocusable:c})};exports.AssistChip=H;exports.ChipSet=G;exports.FilterChip=Z;exports.InputChip=J; diff --git a/dist/react-you-ui26.mjs b/dist/react-you-ui26.mjs index efe661a..2396b4d 100644 --- a/dist/react-you-ui26.mjs +++ b/dist/react-you-ui26.mjs @@ -1,1047 +1,634 @@ -import { jsx as $e } from "react/jsx-runtime"; -import * as M from "react"; -import { forwardRef as Ee, useContext as Oe } from "react"; -function ee() { - return ee = Object.assign ? Object.assign.bind() : function(e) { - for (var r = 1; r < arguments.length; r++) { - var t = arguments[r]; - for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]); +import { jsx as k } from "react/jsx-runtime"; +import I from "react"; +import { r as L, _ as t, n as l, x as s, c as K, E as n, a as u, b as F } from "./class-map-CwiboTfb.mjs"; +import "./elevation-Dg8ssDJC.mjs"; +import "./ripple-pQcEjR05.mjs"; +import { m as N } from "./delegate-BXi1gVeU.mjs"; +import { o as G } from "./query-assigned-elements-DUhez03i.mjs"; +import { a as R } from "./animation-DjClVFum.mjs"; +import { r as U } from "./redispatch-event-taWUbWUt.mjs"; +import { o as z } from "./create-component-CVXl33PD.mjs"; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const j = N(L); +class p extends j { + /** + * Whether or not the primary ripple is disabled (defaults to `disabled`). + * Some chip actions such as links cannot be disabled. + */ + get rippleDisabled() { + return this.disabled || this.softDisabled; + } + constructor() { + super(), this.disabled = !1, this.softDisabled = !1, this.alwaysFocusable = !1, this.label = "", this.hasIcon = !1, this.addEventListener("click", this.handleClick.bind(this)); + } + focus(e) { + this.disabled && !this.alwaysFocusable || super.focus(e); + } + render() { + return s` +
    + ${this.renderContainerContent()} +
    + `; + } + updated(e) { + e.has("disabled") && e.get("disabled") !== void 0 && this.dispatchEvent(new Event("update-focus", { bubbles: !0 })); + } + getContainerClasses() { + return { + disabled: this.disabled || this.softDisabled, + "has-icon": this.hasIcon + }; + } + renderContainerContent() { + return s` + ${this.renderOutline()} + + + ${this.renderPrimaryAction(this.renderPrimaryContent())} + `; + } + renderOutline() { + return s``; + } + renderLeadingIcon() { + return s``; + } + renderPrimaryContent() { + return s` + + + + ${this.label ? this.label : s``} + + + + `; + } + handleIconChange(e) { + const a = e.target; + this.hasIcon = a.assignedElements({ flatten: !0 }).length > 0; + } + handleClick(e) { + if (this.softDisabled || this.disabled && this.alwaysFocusable) { + e.stopImmediatePropagation(), e.preventDefault(); + return; } - return e; - }, ee.apply(null, arguments); -} -function me(e) { - var r = /* @__PURE__ */ Object.create(null); - return function(t) { - return r[t] === void 0 && (r[t] = e(t)), r[t]; - }; -} -var Te = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Re = /* @__PURE__ */ me( - function(e) { - return Te.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91; } - /* Z+1 */ -), _e = !1; -function Me(e) { - if (e.sheet) - return e.sheet; - for (var r = 0; r < document.styleSheets.length; r++) - if (document.styleSheets[r].ownerNode === e) - return document.styleSheets[r]; } -function Ie(e) { - var r = document.createElement("style"); - return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r; -} -var Ne = /* @__PURE__ */ function() { - function e(t) { - var n = this; - this._insertTag = function(a) { - var i; - n.tags.length === 0 ? n.insertionPoint ? i = n.insertionPoint.nextSibling : n.prepend ? i = n.container.firstChild : i = n.before : i = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(a, i), n.tags.push(a); - }, this.isSpeedy = t.speedy === void 0 ? !_e : t.speedy, this.tags = [], this.ctr = 0, this.nonce = t.nonce, this.key = t.key, this.container = t.container, this.prepend = t.prepend, this.insertionPoint = t.insertionPoint, this.before = null; +p.shadowRootOptions = { + ...L.shadowRootOptions, + delegatesFocus: !0 +}; +t([ + l({ type: Boolean, reflect: !0 }) +], p.prototype, "disabled", void 0); +t([ + l({ type: Boolean, attribute: "soft-disabled", reflect: !0 }) +], p.prototype, "softDisabled", void 0); +t([ + l({ type: Boolean, attribute: "always-focusable" }) +], p.prototype, "alwaysFocusable", void 0); +t([ + l() +], p.prototype, "label", void 0); +t([ + l({ type: Boolean, reflect: !0, attribute: "has-icon" }) +], p.prototype, "hasIcon", void 0); +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let D = class extends p { + constructor() { + super(...arguments), this.elevated = !1, this.href = "", this.target = ""; } - var r = e.prototype; - return r.hydrate = function(n) { - n.forEach(this._insertTag); - }, r.insert = function(n) { - this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Ie(this)); - var a = this.tags[this.tags.length - 1]; - if (this.isSpeedy) { - var i = Me(a); - try { - i.insertRule(n, i.cssRules.length); - } catch { - } - } else - a.appendChild(document.createTextNode(n)); - this.ctr++; - }, r.flush = function() { - this.tags.forEach(function(n) { - var a; - return (a = n.parentNode) == null ? void 0 : a.removeChild(n); - }), this.tags = [], this.ctr = 0; - }, e; -}(), S = "-ms-", Y = "-moz-", l = "-webkit-", ge = "comm", ae = "rule", ie = "decl", Fe = "@import", ye = "@keyframes", Le = "@layer", De = Math.abs, K = String.fromCharCode, ze = Object.assign; -function We(e, r) { - return w(e, 0) ^ 45 ? (((r << 2 ^ w(e, 0)) << 2 ^ w(e, 1)) << 2 ^ w(e, 2)) << 2 ^ w(e, 3) : 0; -} -function be(e) { - return e.trim(); -} -function He(e, r) { - return (e = r.exec(e)) ? e[0] : e; -} -function u(e, r, t) { - return e.replace(r, t); -} -function re(e, r) { - return e.indexOf(r); -} -function w(e, r) { - return e.charCodeAt(r) | 0; -} -function z(e, r, t) { - return e.slice(r, t); -} -function T(e) { - return e.length; -} -function se(e) { - return e.length; -} -function U(e, r) { - return r.push(e), e; -} -function Ge(e, r) { - return e.map(r).join(""); -} -var Z = 1, F = 1, ve = 0, C = 0, x = 0, L = ""; -function J(e, r, t, n, a, i, s) { - return { value: e, root: r, parent: t, type: n, props: a, children: i, line: Z, column: F, length: s, return: "" }; -} -function D(e, r) { - return ze(J("", null, null, "", null, null, 0), e, { length: -e.length }, r); -} -function je() { - return x; -} -function Be() { - return x = C > 0 ? w(L, --C) : 0, F--, x === 10 && (F = 1, Z--), x; -} -function $() { - return x = C < ve ? w(L, C++) : 0, F++, x === 10 && (F = 1, Z++), x; -} -function _() { - return w(L, C); -} -function q() { - return C; -} -function G(e, r) { - return z(L, e, r); -} -function W(e) { - switch (e) { - case 0: - case 9: - case 10: - case 13: - case 32: - return 5; - case 33: - case 43: - case 44: - case 47: - case 62: - case 64: - case 126: - case 59: - case 123: - case 125: - return 4; - case 58: - return 3; - case 34: - case 39: - case 40: - case 91: - return 2; - case 41: - case 93: - return 1; + get primaryId() { + return this.href ? "link" : "button"; } - return 0; -} -function xe(e) { - return Z = F = 1, ve = T(L = e), C = 0, []; -} -function we(e) { - return L = "", e; -} -function V(e) { - return be(G(C - 1, te(e === 91 ? e + 2 : e === 40 ? e + 1 : e))); -} -function Ue(e) { - for (; (x = _()) && x < 33; ) - $(); - return W(e) > 2 || W(x) > 3 ? "" : " "; -} -function qe(e, r) { - for (; --r && $() && !(x < 48 || x > 102 || x > 57 && x < 65 || x > 70 && x < 97); ) - ; - return G(e, q() + (r < 6 && _() == 32 && $() == 32)); -} -function te(e) { - for (; $(); ) - switch (x) { - case e: - return C; - case 34: - case 39: - e !== 34 && e !== 39 && te(x); - break; - case 40: - e === 41 && te(e); - break; - case 92: - $(); - break; + get rippleDisabled() { + return !this.href && (this.disabled || this.softDisabled); + } + getContainerClasses() { + return { + ...super.getContainerClasses(), + // Link chips cannot be disabled + disabled: !this.href && (this.disabled || this.softDisabled), + elevated: this.elevated, + link: !!this.href + }; + } + renderPrimaryAction(e) { + const { ariaLabel: a } = this; + return this.href ? s` + ${e} + ` : s` + + `; + } + renderOutline() { + return this.elevated ? s`` : super.renderOutline(); + } +}; +t([ + l({ type: Boolean }) +], D.prototype, "elevated", void 0); +t([ + l() +], D.prototype, "href", void 0); +t([ + l() +], D.prototype, "target", void 0); +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const q = u`:host{--_container-height: var(--md-assist-chip-container-height, 32px);--_disabled-label-text-color: var(--md-assist-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-assist-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color: var(--md-assist-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation: var(--md-assist-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-assist-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-assist-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-assist-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-assist-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-assist-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-assist-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-assist-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color: var(--md-assist-chip-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-assist-chip-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-assist-chip-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-assist-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-assist-chip-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-assist-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-assist-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-assist-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-assist-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-assist-chip-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-assist-chip-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-assist-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-assist-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-assist-chip-disabled-outline-opacity, 0.12);--_focus-outline-color: var(--md-assist-chip-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-color: var(--md-assist-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-assist-chip-outline-width, 1px);--_disabled-leading-icon-color: var(--md-assist-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-assist-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color: var(--md-assist-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-assist-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-assist-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-assist-chip-icon-size, 18px);--_pressed-leading-icon-color: var(--md-assist-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-assist-chip-container-shape-start-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-assist-chip-container-shape-start-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-assist-chip-container-shape-end-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-assist-chip-container-shape-end-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-assist-chip-leading-space, 16px);--_trailing-space: var(--md-assist-chip-trailing-space, 16px);--_icon-label-space: var(--md-assist-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-assist-chip-with-leading-icon-leading-space, 8px)}@media(forced-colors: active){.link .outline{border-color:ActiveText}} +`; +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const E = u`.elevated{--md-elevation-level: var(--_elevated-container-elevation);--md-elevation-shadow-color: var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level: var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level: var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level: var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level: var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid CanvasText}.elevated.disabled md-elevation{border-color:GrayText}} +`; +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const T = u`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host(:is([disabled],[soft-disabled])){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{min-width:0;padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;font-family:var(--_label-text-font);font-size:var(--_label-text-size);font-weight:var(--_label-text-weight);height:100%;line-height:var(--_label-text-line-height);overflow:hidden;user-select:none}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled,[aria-disabled=true]){cursor:inherit} +`; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let w = class extends D { +}; +w.styles = [T, E, q]; +w = t([ + F("md-assist-chip") +], w); +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let B = class extends L { + get chips() { + return this.childElements.filter((e) => e instanceof p); + } + constructor() { + super(), this.internals = // Cast needed for closure + this.attachInternals(), this.addEventListener("focusin", this.updateTabIndices.bind(this)), this.addEventListener("update-focus", this.updateTabIndices.bind(this)), this.addEventListener("keydown", this.handleKeyDown.bind(this)), this.internals.role = "toolbar"; + } + render() { + return s``; + } + handleKeyDown(e) { + const a = e.key === "ArrowLeft", r = e.key === "ArrowRight", d = e.key === "Home", c = e.key === "End"; + if (!a && !r && !d && !c) + return; + const { chips: o } = this; + if (o.length < 2) + return; + if (e.preventDefault(), d || c) { + const m = d ? 0 : o.length - 1; + o[m].focus({ trailing: c }), this.updateTabIndices(); + return; } - return C; -} -function Ve(e, r) { - for (; $() && e + x !== 57; ) - if (e + x === 84 && _() === 47) - break; - return "/*" + G(r, C - 1) + "*" + K(e === 47 ? e : $()); -} -function Xe(e) { - for (; !W(_()); ) - $(); - return G(e, C); -} -function Ye(e) { - return we(X("", null, null, null, [""], e = xe(e), 0, [0], e)); -} -function X(e, r, t, n, a, i, s, c, p) { - for (var g = 0, f = 0, d = s, O = 0, P = 0, m = 0, o = 1, b = 1, y = 1, v = 0, k = "", I = a, E = i, A = n, h = k; b; ) - switch (m = v, v = $()) { - case 40: - if (m != 108 && w(h, d - 1) == 58) { - re(h += u(V(v), "&", "&\f"), "&\f") != -1 && (y = -1); - break; - } - case 34: - case 39: - case 91: - h += V(v); - break; - case 9: - case 10: - case 13: - case 32: - h += Ue(m); - break; - case 92: - h += qe(q() - 1, 7); + const h = getComputedStyle(this).direction === "rtl" ? a : r, _ = o.find((m) => m.matches(":focus-within")); + if (!_) { + (h ? o[0] : o[o.length - 1]).focus({ trailing: !h }), this.updateTabIndices(); + return; + } + const g = o.indexOf(_); + let v = h ? g + 1 : g - 1; + for (; v !== g; ) { + v >= o.length ? v = 0 : v < 0 && (v = o.length - 1); + const m = o[v]; + if (m.disabled && !m.alwaysFocusable) { + h ? v++ : v--; continue; - case 47: - switch (_()) { - case 42: - case 47: - U(Ke(Ve($(), q()), r, t), p); - break; - default: - h += "/"; - } - break; - case 123 * o: - c[g++] = T(h) * y; - case 125 * o: - case 59: - case 0: - switch (v) { - case 0: - case 125: - b = 0; - case 59 + f: - y == -1 && (h = u(h, /\f/g, "")), P > 0 && T(h) - d && U(P > 32 ? ce(h + ";", n, t, d - 1) : ce(u(h, " ", "") + ";", n, t, d - 2), p); - break; - case 59: - h += ";"; - default: - if (U(A = oe(h, r, t, g, f, a, c, k, I = [], E = [], d), i), v === 123) - if (f === 0) - X(h, r, A, A, I, i, d, c, E); - else - switch (O === 99 && w(h, 3) === 110 ? 100 : O) { - case 100: - case 108: - case 109: - case 115: - X(e, A, A, n && U(oe(e, A, A, 0, 0, a, c, k, a, I = [], d), E), a, E, d, c, n ? I : E); - break; - default: - X(h, A, A, A, [""], E, 0, c, E); - } - } - g = f = P = 0, o = y = 1, k = h = "", d = s; - break; - case 58: - d = 1 + T(h), P = m; - default: - if (o < 1) { - if (v == 123) - --o; - else if (v == 125 && o++ == 0 && Be() == 125) - continue; - } - switch (h += K(v), v * o) { - case 38: - y = f > 0 ? 1 : (h += "\f", -1); - break; - case 44: - c[g++] = (T(h) - 1) * y, y = 1; - break; - case 64: - _() === 45 && (h += V($())), O = _(), f = d = T(k = h += Xe(q())), v++; - break; - case 45: - m === 45 && T(h) == 2 && (o = 0); - } - } - return i; -} -function oe(e, r, t, n, a, i, s, c, p, g, f) { - for (var d = a - 1, O = a === 0 ? i : [""], P = se(O), m = 0, o = 0, b = 0; m < n; ++m) - for (var y = 0, v = z(e, d + 1, d = De(o = s[m])), k = e; y < P; ++y) - (k = be(o > 0 ? O[y] + " " + v : u(v, /&\f/g, O[y]))) && (p[b++] = k); - return J(e, r, t, a === 0 ? ae : c, p, g, f); -} -function Ke(e, r, t) { - return J(e, r, t, ge, K(je()), z(e, 2, -2), 0); -} -function ce(e, r, t, n) { - return J(e, r, t, ie, z(e, 0, n), z(e, n + 1, -1), n); -} -function N(e, r) { - for (var t = "", n = se(e), a = 0; a < n; a++) - t += r(e[a], a, e, r) || ""; - return t; -} -function Ze(e, r, t, n) { - switch (e.type) { - case Le: - if (e.children.length) break; - case Fe: - case ie: - return e.return = e.return || e.value; - case ge: - return ""; - case ye: - return e.return = e.value + "{" + N(e.children, n) + "}"; - case ae: - e.value = e.props.join(","); - } - return T(t = N(e.children, n)) ? e.return = e.value + "{" + t + "}" : ""; -} -function Je(e) { - var r = se(e); - return function(t, n, a, i) { - for (var s = "", c = 0; c < r; c++) - s += e[c](t, n, a, i) || ""; - return s; - }; -} -function Qe(e) { - return function(r) { - r.root || (r = r.return) && e(r); - }; -} -var er = function(r, t, n) { - for (var a = 0, i = 0; a = i, i = _(), a === 38 && i === 12 && (t[n] = 1), !W(i); ) - $(); - return G(r, C); -}, rr = function(r, t) { - var n = -1, a = 44; - do - switch (W(a)) { - case 0: - a === 38 && _() === 12 && (t[n] = 1), r[n] += er(C - 1, t, n); - break; - case 2: - r[n] += V(a); - break; - case 4: - if (a === 44) { - r[++n] = _() === 58 ? "&\f" : "", t[n] = r[n].length; - break; - } - default: - r[n] += K(a); - } - while (a = $()); - return r; -}, tr = function(r, t) { - return we(rr(xe(r), t)); -}, fe = /* @__PURE__ */ new WeakMap(), nr = function(r) { - if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo - // negative .length indicates that this rule has been already prefixed - r.length < 1)) { - for (var t = r.value, n = r.parent, a = r.column === n.column && r.line === n.line; n.type !== "rule"; ) - if (n = n.parent, !n) return; - if (!(r.props.length === 1 && t.charCodeAt(0) !== 58 && !fe.get(n)) && !a) { - fe.set(r, !0); - for (var i = [], s = tr(t, i), c = n.props, p = 0, g = 0; p < s.length; p++) - for (var f = 0; f < c.length; f++, g++) - r.props[g] = i[p] ? s[p].replace(/&\f/g, c[f]) : c[f] + " " + s[p]; + } + m.focus({ trailing: !h }), this.updateTabIndices(); + break; } } -}, ar = function(r) { - if (r.type === "decl") { - var t = r.value; - // charcode for l - t.charCodeAt(0) === 108 && // charcode for b - t.charCodeAt(2) === 98 && (r.return = "", r.value = ""); + updateTabIndices() { + const { chips: e } = this; + let a; + for (const r of e) { + const d = r.alwaysFocusable || !r.disabled; + if (r.matches(":focus-within") && d) { + a = r; + continue; + } + d && !a && (a = r), r.tabIndex = -1; + } + a && (a.tabIndex = 0); } }; -function ke(e, r) { - switch (We(e, r)) { - case 5103: - return l + "print-" + e + e; - case 5737: - case 4201: - case 3177: - case 3433: - case 1641: - case 4457: - case 2921: - case 5572: - case 6356: - case 5844: - case 3191: - case 6645: - case 3005: - case 6391: - case 5879: - case 5623: - case 6135: - case 4599: - case 4855: - case 4215: - case 6389: - case 5109: - case 5365: - case 5621: - case 3829: - return l + e + e; - case 5349: - case 4246: - case 4810: - case 6968: - case 2756: - return l + e + Y + e + S + e + e; - case 6828: - case 4268: - return l + e + S + e + e; - case 6165: - return l + e + S + "flex-" + e + e; - case 5187: - return l + e + u(e, /(\w+).+(:[^]+)/, l + "box-$1$2" + S + "flex-$1$2") + e; - case 5443: - return l + e + S + "flex-item-" + u(e, /flex-|-self/, "") + e; - case 4675: - return l + e + S + "flex-line-pack" + u(e, /align-content|flex-|-self/, "") + e; - case 5548: - return l + e + S + u(e, "shrink", "negative") + e; - case 5292: - return l + e + S + u(e, "basis", "preferred-size") + e; - case 6060: - return l + "box-" + u(e, "-grow", "") + l + e + S + u(e, "grow", "positive") + e; - case 4554: - return l + u(e, /([^-])(transform)/g, "$1" + l + "$2") + e; - case 6187: - return u(u(u(e, /(zoom-|grab)/, l + "$1"), /(image-set)/, l + "$1"), e, "") + e; - case 5495: - case 3959: - return u(e, /(image-set\([^]*)/, l + "$1$`$1"); - case 4968: - return u(u(e, /(.+:)(flex-)?(.*)/, l + "box-pack:$3" + S + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + l + e + e; - case 4095: - case 3583: - case 4068: - case 2532: - return u(e, /(.+)-inline(.+)/, l + "$1$2") + e; - case 8116: - case 7059: - case 5753: - case 5535: - case 5445: - case 5701: - case 4933: - case 4677: - case 5533: - case 5789: - case 5021: - case 4765: - if (T(e) - 1 - r > 6) switch (w(e, r + 1)) { - case 109: - if (w(e, r + 4) !== 45) break; - case 102: - return u(e, /(.+:)(.+)-([^]+)/, "$1" + l + "$2-$3$1" + Y + (w(e, r + 3) == 108 ? "$3" : "$2-$3")) + e; - case 115: - return ~re(e, "stretch") ? ke(u(e, "stretch", "fill-available"), r) + e : e; - } - break; - case 4949: - if (w(e, r + 1) !== 115) break; - case 6444: - switch (w(e, T(e) - 3 - (~re(e, "!important") && 10))) { - case 107: - return u(e, ":", ":" + l) + e; - case 101: - return u(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + l + (w(e, 14) === 45 ? "inline-" : "") + "box$3$1" + l + "$2$3$1" + S + "$2box$3") + e; - } - break; - case 5936: - switch (w(e, r + 11)) { - case 114: - return l + e + S + u(e, /[svh]\w+-[tblr]{2}/, "tb") + e; - case 108: - return l + e + S + u(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e; - case 45: - return l + e + S + u(e, /[svh]\w+-[tblr]{2}/, "lr") + e; - } - return l + e + S + e + e; +t([ + G() +], B.prototype, "childElements", void 0); +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const H = u`:host{display:flex;flex-wrap:wrap;gap:8px} +`; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let C = class extends B { +}; +C.styles = [H]; +C = t([ + F("md-chip-set") +], C); +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const x = "aria-label-remove"; +class O extends p { + get ariaLabelRemove() { + if (this.hasAttribute(x)) + return this.getAttribute(x); + const { ariaLabel: e } = this; + return e || this.label ? `Remove ${e || this.label}` : null; } - return e; -} -var ir = function(r, t, n, a) { - if (r.length > -1 && !r.return) switch (r.type) { - case ie: - r.return = ke(r.value, r.length); - break; - case ye: - return N([D(r, { - value: u(r.value, "@", "@" + l) - })], a); - case ae: - if (r.length) return Ge(r.props, function(i) { - switch (He(i, /(::plac\w+|:read-\w+)/)) { - case ":read-only": - case ":read-write": - return N([D(r, { - props: [u(i, /:(read-\w+)/, ":" + Y + "$1")] - })], a); - case "::placeholder": - return N([D(r, { - props: [u(i, /:(plac\w+)/, ":" + l + "input-$1")] - }), D(r, { - props: [u(i, /:(plac\w+)/, ":" + Y + "$1")] - }), D(r, { - props: [u(i, /:(plac\w+)/, S + "input-$1")] - })], a); - } - return ""; - }); + set ariaLabelRemove(e) { + const a = this.ariaLabelRemove; + e !== a && (e === null ? this.removeAttribute(x) : this.setAttribute(x, e), this.requestUpdate()); } -}, sr = [ir], or = function(r) { - var t = r.key; - if (t === "css") { - var n = document.querySelectorAll("style[data-emotion]:not([data-s])"); - Array.prototype.forEach.call(n, function(o) { - var b = o.getAttribute("data-emotion"); - b.indexOf(" ") !== -1 && (document.head.appendChild(o), o.setAttribute("data-s", "")); - }); + constructor() { + super(), this.handleTrailingActionFocus = this.handleTrailingActionFocus.bind(this), this.addEventListener("keydown", this.handleKeyDown.bind(this)); } - var a = r.stylisPlugins || sr, i = {}, s, c = []; - s = r.container || document.head, Array.prototype.forEach.call( - // this means we will ignore elements which don't have a space in them which - // means that the style elements we're looking at are only Emotion 11 server-rendered style elements - document.querySelectorAll('style[data-emotion^="' + t + ' "]'), - function(o) { - for (var b = o.getAttribute("data-emotion").split(" "), y = 1; y < b.length; y++) - i[b[y]] = !0; - c.push(o); + focus(e) { + if ((this.alwaysFocusable || !this.disabled) && (e != null && e.trailing) && this.trailingAction) { + this.trailingAction.focus(e); + return; } - ); - var p, g = [nr, ar]; - { - var f, d = [Ze, Qe(function(o) { - f.insert(o); - })], O = Je(g.concat(a, d)), P = function(b) { - return N(Ye(b), O); - }; - p = function(b, y, v, k) { - f = v, P(b ? b + "{" + y.styles + "}" : y.styles), k && (m.inserted[y.name] = !0); + super.focus(e); + } + renderContainerContent() { + return s` + ${super.renderContainerContent()} + ${this.renderTrailingAction(this.handleTrailingActionFocus)} + `; + } + handleKeyDown(e) { + var _, g; + const a = e.key === "ArrowLeft", r = e.key === "ArrowRight"; + if (!a && !r || !this.primaryAction || !this.trailingAction) + return; + const c = getComputedStyle(this).direction === "rtl" ? a : r, o = (_ = this.primaryAction) == null ? void 0 : _.matches(":focus-within"), f = (g = this.trailingAction) == null ? void 0 : g.matches(":focus-within"); + if (c && f || !c && o) + return; + e.preventDefault(), e.stopPropagation(), (c ? this.trailingAction : this.primaryAction).focus(); + } + handleTrailingActionFocus() { + const { primaryAction: e, trailingAction: a } = this; + !e || !a || (e.tabIndex = -1, a.addEventListener("focusout", () => { + e.tabIndex = 0; + }, { once: !0 })); + } +} +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +function M({ ariaLabel: i, disabled: e, focusListener: a, tabbable: r = !1 }) { + return s` + + + `; +} +function V(i) { + this.disabled || this.softDisabled || (i.stopPropagation(), !this.dispatchEvent(new Event("remove", { cancelable: !0 }))) || this.remove(); +} +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let b = class extends O { + constructor() { + super(...arguments), this.elevated = !1, this.removable = !1, this.selected = !1, this.hasSelectedIcon = !1; + } + get primaryId() { + return "button"; + } + getContainerClasses() { + return { + ...super.getContainerClasses(), + elevated: this.elevated, + selected: this.selected, + "has-trailing": this.removable, + "has-icon": this.hasIcon || this.selected }; } - var m = { - key: t, - sheet: new Ne({ - key: t, - container: s, - nonce: r.nonce, - speedy: r.speedy, - prepend: r.prepend, - insertionPoint: r.insertionPoint - }), - nonce: r.nonce, - inserted: i, - registered: {}, - insert: p - }; - return m.sheet.hydrate(c), m; -}, cr = !0; -function fr(e, r, t) { - var n = ""; - return t.split(" ").forEach(function(a) { - e[a] !== void 0 ? r.push(e[a] + ";") : a && (n += a + " "); - }), n; -} -var Se = function(r, t, n) { - var a = r.key + "-" + t.name; - // we only need to add the styles to the registered cache if the - // class name could be used further down - // the tree but if it's a string tag, we know it won't - // so we don't have to add it to registered cache. - // this improves memory usage since we can avoid storing the whole style string - (n === !1 || // we need to always store it if we're in compat mode and - // in node since emotion-server relies on whether a style is in - // the registered cache to know whether a style is global or not - // also, note that this check will be dead code eliminated in the browser - cr === !1) && r.registered[a] === void 0 && (r.registered[a] = t.styles); -}, lr = function(r, t, n) { - Se(r, t, n); - var a = r.key + "-" + t.name; - if (r.inserted[t.name] === void 0) { - var i = t; - do - r.insert(t === i ? "." + a : "", i, r.sheet, !0), i = i.next; - while (i !== void 0); + renderPrimaryAction(e) { + const { ariaLabel: a } = this; + return s` + + `; + } + renderLeadingIcon() { + return this.selected ? s` + + + + ` : super.renderLeadingIcon(); + } + renderTrailingAction(e) { + return this.removable ? M({ + focusListener: e, + ariaLabel: this.ariaLabelRemove, + disabled: this.disabled || this.softDisabled + }) : n; + } + renderOutline() { + return this.elevated ? s`` : super.renderOutline(); + } + handleClickOnChild(e) { + if (this.disabled || this.softDisabled) + return; + const a = this.selected; + if (this.selected = !this.selected, !U(this, e)) { + this.selected = a; + return; + } } }; -function ur(e) { - for (var r = 0, t, n = 0, a = e.length; a >= 4; ++n, a -= 4) - t = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, t = /* Math.imul(k, m): */ - (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */ - t >>> 24, r = /* Math.imul(k, m): */ - (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ - (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16); - switch (a) { - case 3: - r ^= (e.charCodeAt(n + 2) & 255) << 16; - case 2: - r ^= (e.charCodeAt(n + 1) & 255) << 8; - case 1: - r ^= e.charCodeAt(n) & 255, r = /* Math.imul(h, m): */ - (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16); +t([ + l({ type: Boolean }) +], b.prototype, "elevated", void 0); +t([ + l({ type: Boolean }) +], b.prototype, "removable", void 0); +t([ + l({ type: Boolean, reflect: !0 }) +], b.prototype, "selected", void 0); +t([ + l({ type: Boolean, reflect: !0, attribute: "has-selected-icon" }) +], b.prototype, "hasSelectedIcon", void 0); +t([ + R(".primary.action") +], b.prototype, "primaryAction", void 0); +t([ + R(".trailing.action") +], b.prototype, "trailingAction", void 0); +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const Z = u`:host{--_container-height: var(--md-filter-chip-container-height, 32px);--_disabled-label-text-color: var(--md-filter-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filter-chip-disabled-label-text-opacity, 0.38);--_elevated-container-elevation: var(--md-filter-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-filter-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-filter-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-filter-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-filter-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-filter-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-filter-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-filter-chip-elevated-pressed-container-elevation, 1);--_elevated-selected-container-color: var(--md-filter-chip-elevated-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_label-text-font: var(--md-filter-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filter-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filter-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filter-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-focus-label-text-color: var(--md-filter-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-filter-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-filter-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-filter-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-filter-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-label-text-color: var(--md-filter-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-filter-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_selected-pressed-state-layer-opacity: var(--md-filter-chip-selected-pressed-state-layer-opacity, 0.12);--_elevated-container-color: var(--md-filter-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_disabled-outline-color: var(--md-filter-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-filter-chip-disabled-outline-opacity, 0.12);--_disabled-selected-container-color: var(--md-filter-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-filter-chip-disabled-selected-container-opacity, 0.12);--_focus-outline-color: var(--md-filter-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-filter-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-filter-chip-outline-width, 1px);--_selected-container-color: var(--md-filter-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-outline-width: var(--md-filter-chip-selected-outline-width, 0px);--_focus-label-text-color: var(--md-filter-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-filter-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filter-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-filter-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filter-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-filter-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-filter-chip-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filter-chip-pressed-state-layer-opacity, 0.12);--_icon-size: var(--md-filter-chip-icon-size, 18px);--_disabled-leading-icon-color: var(--md-filter-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filter-chip-disabled-leading-icon-opacity, 0.38);--_selected-focus-leading-icon-color: var(--md-filter-chip-selected-focus-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-leading-icon-color: var(--md-filter-chip-selected-hover-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-leading-icon-color: var(--md-filter-chip-selected-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-leading-icon-color: var(--md-filter-chip-selected-pressed-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-leading-icon-color: var(--md-filter-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-filter-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-filter-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-filter-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-filter-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filter-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-filter-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-filter-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-filter-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-filter-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-filter-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filter-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-filter-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-filter-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filter-chip-container-shape-start-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-filter-chip-container-shape-start-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-filter-chip-container-shape-end-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-filter-chip-container-shape-end-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-filter-chip-leading-space, 16px);--_trailing-space: var(--md-filter-chip-trailing-space, 16px);--_icon-label-space: var(--md-filter-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-filter-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-filter-chip-with-trailing-icon-trailing-space, 8px)}.selected.elevated::before{background:var(--_elevated-selected-container-color)}.checkmark{height:var(--_icon-size);width:var(--_icon-size)}.disabled .checkmark{opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){.disabled .checkmark{opacity:1}} +`; +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const S = u`.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}} +`; +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const P = u`.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}} +`; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let $ = class extends b { +}; +$.styles = [ + T, + E, + P, + S, + Z +]; +$ = t([ + F("md-filter-chip") +], $); +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let y = class extends O { + constructor() { + super(...arguments), this.avatar = !1, this.href = "", this.target = "", this.removeOnly = !1, this.selected = !1; } - return r ^= r >>> 13, r = /* Math.imul(h, m): */ - (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36); -} -var dr = { - animationIterationCount: 1, - aspectRatio: 1, - borderImageOutset: 1, - borderImageSlice: 1, - borderImageWidth: 1, - boxFlex: 1, - boxFlexGroup: 1, - boxOrdinalGroup: 1, - columnCount: 1, - columns: 1, - flex: 1, - flexGrow: 1, - flexPositive: 1, - flexShrink: 1, - flexNegative: 1, - flexOrder: 1, - gridRow: 1, - gridRowEnd: 1, - gridRowSpan: 1, - gridRowStart: 1, - gridColumn: 1, - gridColumnEnd: 1, - gridColumnSpan: 1, - gridColumnStart: 1, - msGridRow: 1, - msGridRowSpan: 1, - msGridColumn: 1, - msGridColumnSpan: 1, - fontWeight: 1, - lineHeight: 1, - opacity: 1, - order: 1, - orphans: 1, - scale: 1, - tabSize: 1, - widows: 1, - zIndex: 1, - zoom: 1, - WebkitLineClamp: 1, - // SVG-related properties - fillOpacity: 1, - floodOpacity: 1, - stopOpacity: 1, - strokeDasharray: 1, - strokeDashoffset: 1, - strokeMiterlimit: 1, - strokeOpacity: 1, - strokeWidth: 1 -}, hr = !1, pr = /[A-Z]|^ms/g, mr = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Ce = function(r) { - return r.charCodeAt(1) === 45; -}, le = function(r) { - return r != null && typeof r != "boolean"; -}, Q = /* @__PURE__ */ me(function(e) { - return Ce(e) ? e : e.replace(pr, "-$&").toLowerCase(); -}), ue = function(r, t) { - switch (r) { - case "animation": - case "animationName": - if (typeof t == "string") - return t.replace(mr, function(n, a, i) { - return R = { - name: a, - styles: i, - next: R - }, a; - }); + get primaryId() { + return this.href ? "link" : this.removeOnly ? "" : "button"; } - return dr[r] !== 1 && !Ce(r) && typeof t == "number" && t !== 0 ? t + "px" : t; -}, gr = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform."; -function H(e, r, t) { - if (t == null) - return ""; - var n = t; - if (n.__emotion_styles !== void 0) - return n; - switch (typeof t) { - case "boolean": - return ""; - case "object": { - var a = t; - if (a.anim === 1) - return R = { - name: a.name, - styles: a.styles, - next: R - }, a.name; - var i = t; - if (i.styles !== void 0) { - var s = i.next; - if (s !== void 0) - for (; s !== void 0; ) - R = { - name: s.name, - styles: s.styles, - next: R - }, s = s.next; - var c = i.styles + ";"; - return c; - } - return yr(e, r, t); - } - case "function": { - if (e !== void 0) { - var p = R, g = t(e); - return R = p, H(e, r, g); - } - break; - } + get rippleDisabled() { + return !this.href && (this.disabled || this.softDisabled); } - var f = t; - if (r == null) - return f; - var d = r[f]; - return d !== void 0 ? d : f; -} -function yr(e, r, t) { - var n = ""; - if (Array.isArray(t)) - for (var a = 0; a < t.length; a++) - n += H(e, r, t[a]) + ";"; - else - for (var i in t) { - var s = t[i]; - if (typeof s != "object") { - var c = s; - r != null && r[c] !== void 0 ? n += i + "{" + r[c] + "}" : le(c) && (n += Q(i) + ":" + ue(i, c) + ";"); - } else { - if (i === "NO_COMPONENT_SELECTOR" && hr) - throw new Error(gr); - if (Array.isArray(s) && typeof s[0] == "string" && (r == null || r[s[0]] === void 0)) - for (var p = 0; p < s.length; p++) - le(s[p]) && (n += Q(i) + ":" + ue(i, s[p]) + ";"); - else { - var g = H(e, r, s); - switch (i) { - case "animation": - case "animationName": { - n += Q(i) + ":" + g + ";"; - break; - } - default: - n += i + "{" + g + "}"; - } - } - } - } - return n; -} -var de = /label:\s*([^\s;{]+)\s*(;|$)/g, R; -function br(e, r, t) { - if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0) - return e[0]; - var n = !0, a = ""; - R = void 0; - var i = e[0]; - if (i == null || i.raw === void 0) - n = !1, a += H(t, r, i); - else { - var s = i; - a += s[0]; + get primaryAction() { + return this.removeOnly ? null : this.renderRoot.querySelector(".primary.action"); } - for (var c = 1; c < e.length; c++) - if (a += H(t, r, e[c]), n) { - var p = i; - a += p[c]; - } - de.lastIndex = 0; - for (var g = "", f; (f = de.exec(a)) !== null; ) - g += "-" + f[1]; - var d = ur(a) + g; - return { - name: d, - styles: a, - next: R - }; -} -var vr = function(r) { - return r(); -}, xr = M.useInsertionEffect ? M.useInsertionEffect : !1, wr = xr || vr, Pe = /* @__PURE__ */ M.createContext( - // we're doing this to avoid preconstruct's dead code elimination in this one case - // because this module is primarily intended for the browser and node - // but it's also required in react native and similar environments sometimes - // and we could have a special build just for that - // but this is much easier and the native packages - // might use a different theme context in the future anyway - typeof HTMLElement < "u" ? /* @__PURE__ */ or({ - key: "css" - }) : null -); -Pe.Provider; -var kr = function(r) { - return /* @__PURE__ */ Ee(function(t, n) { - var a = Oe(Pe); - return r(t, a, n); - }); -}, Sr = /* @__PURE__ */ M.createContext({}), Cr = Re, Pr = function(r) { - return r !== "theme"; -}, he = function(r) { - return typeof r == "string" && // 96 is one less than the char code - // for "a" so this is checking that - // it's a lowercase character - r.charCodeAt(0) > 96 ? Cr : Pr; -}, pe = function(r, t, n) { - var a; - if (t) { - var i = t.shouldForwardProp; - a = r.__emotion_forwardProp && i ? function(s) { - return r.__emotion_forwardProp(s) && i(s); - } : i; + getContainerClasses() { + return { + ...super.getContainerClasses(), + avatar: this.avatar, + // Link chips cannot be disabled + disabled: !this.href && (this.disabled || this.softDisabled), + link: !!this.href, + selected: this.selected, + "has-trailing": !0 + }; } - return typeof a != "function" && n && (a = r.__emotion_forwardProp), a; -}, Ar = !1, $r = function(r) { - var t = r.cache, n = r.serialized, a = r.isStringTag; - return Se(t, n, a), wr(function() { - return lr(t, n, a); - }), null; -}, Er = function e(r, t) { - var n = r.__emotion_real === r, a = n && r.__emotion_base || r, i, s; - t !== void 0 && (i = t.label, s = t.target); - var c = pe(r, t, n), p = c || he(a), g = !p("as"); - return function() { - var f = arguments, d = n && r.__emotion_styles !== void 0 ? r.__emotion_styles.slice(0) : []; - if (i !== void 0 && d.push("label:" + i + ";"), f[0] == null || f[0].raw === void 0) - d.push.apply(d, f); - else { - d.push(f[0][0]); - for (var O = f.length, P = 1; P < O; P++) - d.push(f[P], f[0][P]); - } - var m = kr(function(o, b, y) { - var v = g && o.as || a, k = "", I = [], E = o; - if (o.theme == null) { - E = {}; - for (var A in o) - E[A] = o[A]; - E.theme = M.useContext(Sr); - } - typeof o.className == "string" ? k = fr(b.registered, I, o.className) : o.className != null && (k = o.className + " "); - var h = br(d.concat(I), b.registered, E); - k += b.key + "-" + h.name, s !== void 0 && (k += " " + s); - var Ae = g && c === void 0 ? he(v) : p, j = {}; - for (var B in o) - g && B === "as" || Ae(B) && (j[B] = o[B]); - return j.className = k, y && (j.ref = y), /* @__PURE__ */ M.createElement(M.Fragment, null, /* @__PURE__ */ M.createElement($r, { - cache: b, - serialized: h, - isStringTag: typeof v == "string" - }), /* @__PURE__ */ M.createElement(v, j)); + renderPrimaryAction(e) { + const { ariaLabel: a } = this; + return this.href ? s` + ${e} + ` : this.removeOnly ? s` + + ${e} + + ` : s` + + `; + } + renderTrailingAction(e) { + return M({ + focusListener: e, + ariaLabel: this.ariaLabelRemove, + disabled: !this.href && (this.disabled || this.softDisabled), + tabbable: this.removeOnly }); - return m.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", m.defaultProps = r.defaultProps, m.__emotion_real = m, m.__emotion_base = a, m.__emotion_styles = d, m.__emotion_forwardProp = c, Object.defineProperty(m, "toString", { - value: function() { - return s === void 0 && Ar ? "NO_COMPONENT_SELECTOR" : "." + s; - } - }), m.withComponent = function(o, b) { - return e(o, ee({}, t, b, { - shouldForwardProp: pe(m, b, !0) - })).apply(void 0, d); - }, m; - }; -}, Or = [ - "a", - "abbr", - "address", - "area", - "article", - "aside", - "audio", - "b", - "base", - "bdi", - "bdo", - "big", - "blockquote", - "body", - "br", - "button", - "canvas", - "caption", - "cite", - "code", - "col", - "colgroup", - "data", - "datalist", - "dd", - "del", - "details", - "dfn", - "dialog", - "div", - "dl", - "dt", - "em", - "embed", - "fieldset", - "figcaption", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "hgroup", - "hr", - "html", - "i", - "iframe", - "img", - "input", - "ins", - "kbd", - "keygen", - "label", - "legend", - "li", - "link", - "main", - "map", - "mark", - "marquee", - "menu", - "menuitem", - "meta", - "meter", - "nav", - "noscript", - "object", - "ol", - "optgroup", - "option", - "output", - "p", - "param", - "picture", - "pre", - "progress", - "q", - "rp", - "rt", - "ruby", - "s", - "samp", - "script", - "section", - "select", - "small", - "source", - "span", - "strong", - "style", - "sub", - "summary", - "sup", - "table", - "tbody", - "td", - "textarea", - "tfoot", - "th", - "thead", - "time", - "title", - "tr", - "track", - "u", - "ul", - "var", - "video", - "wbr", - // SVG - "circle", - "clipPath", - "defs", - "ellipse", - "foreignObject", - "g", - "image", - "line", - "linearGradient", - "mask", - "path", - "pattern", - "polygon", - "polyline", - "radialGradient", - "rect", - "stop", - "svg", - "text", - "tspan" -], ne = Er.bind(); -Or.forEach(function(e) { - ne[e] = ne(e); -}); -const Tr = ne.div` - display: ${(e) => e.display}; - flex-direction: ${(e) => e.flexDirection}; - flex-wrap: ${(e) => e.flexWrap}; - justify-content: ${(e) => e.justifyContent}; - align-items: ${(e) => e.alignItems}; - align-content: ${(e) => e.alignContent}; - gap: ${(e) => e.gap}; - row-gap: ${(e) => e.rowGap}; - column-gap: ${(e) => e.columnGap}; - flex: ${(e) => e.flex}; - flex-grow: ${(e) => e.flexGrow}; - flex-shrink: ${(e) => e.flexShrink}; - flex-basis: ${(e) => e.flexBasis}; - flex-flow: ${(e) => e.flexFlow}; - align-self: ${(e) => e.alignSelf}; - order: ${(e) => e.order}; -`, Mr = (e) => { - const { style: r, children: t, ...n } = e; - return /* @__PURE__ */ $e(Tr, { style: r, ...n, children: t }); + } +}; +t([ + l({ type: Boolean }) +], y.prototype, "avatar", void 0); +t([ + l() +], y.prototype, "href", void 0); +t([ + l() +], y.prototype, "target", void 0); +t([ + l({ type: Boolean, attribute: "remove-only" }) +], y.prototype, "removeOnly", void 0); +t([ + l({ type: Boolean, reflect: !0 }) +], y.prototype, "selected", void 0); +t([ + R(".trailing.action") +], y.prototype, "trailingAction", void 0); +/** + * @license + * Copyright 2024 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const Y = u`:host{--_container-height: var(--md-input-chip-container-height, 32px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-font: var(--md-input-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-input-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-input-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-input-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, var(--md-sys-shape-corner-full, 9999px));--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-input-chip-leading-space, 16px);--_trailing-space: var(--md-input-chip-trailing-space, 16px);--_icon-label-space: var(--md-input-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-input-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-input-chip-with-trailing-icon-trailing-space, 8px)}:host([avatar]){--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}@media(forced-colors: active){.link .outline{border-color:ActiveText}.disabled.avatar .leading.icon{opacity:1}} +`; +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +let A = class extends y { +}; +A.styles = [ + T, + P, + S, + Y +]; +A = t([ + F("md-input-chip") +], A); +const J = z({ + react: I, + tagName: "md-chip-set", + elementClass: C +}), fe = (i) => /* @__PURE__ */ k(J, { children: i.children }), Q = z({ + react: I, + tagName: "md-assist-chip", + elementClass: w, + events: { + onClick: "click", + onKeyDown: "keydown", + onFocus: "focus", + onBlur: "blur" + } +}), ge = (i) => { + const { label: e, elevated: a, href: r, target: d, disabled: c, alwaysFocusable: o } = i; + return /* @__PURE__ */ k(Q, { label: e, elevated: a, href: r, target: d, disabled: c, alwaysFocusable: o }); +}, W = z({ + react: I, + tagName: "md-filter-chip", + elementClass: $, + events: { + onRemove: "remove", + onUpdateFocus: "update-focus" + } +}), _e = (i) => { + const { label: e, elevated: a, removable: r, selected: d, hasSelectedIcon: c, disabled: o, alwaysFocusable: f } = i; + return /* @__PURE__ */ k(W, { label: e, elevated: a, removable: r, selected: d, hasSelectedIcon: c, disabled: o, alwaysFocusable: f }); +}, X = z({ + react: I, + tagName: "md-input-chip", + elementClass: A, + events: { + onRemove: "remove", + onUpdateFocus: "update-focus" + } +}), xe = (i) => { + const { label: e, avatar: a, href: r, target: d, removeOnly: c, selected: o, disabled: f, alwaysFocusable: h } = i; + return /* @__PURE__ */ k(X, { label: e, avatar: a, href: r, target: d, removeOnly: c, selected: o, disabled: f, alwaysFocusable: h }); }; export { - Mr as Box + ge as AssistChip, + fe as ChipSet, + _e as FilterChip, + xe as InputChip }; diff --git a/dist/react-you-ui27.js b/dist/react-you-ui27.js new file mode 100644 index 0000000..5bb15c6 --- /dev/null +++ b/dist/react-you-ui27.js @@ -0,0 +1,18 @@ +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $e=require("react/jsx-runtime"),ee=require("react");function Ee(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const M=Ee(ee);function re(){return re=Object.assign?Object.assign.bind():function(e){for(var r=1;r0?w(L,--C):0,F--,x===10&&(F=1,Z--),x}function O(){return x=C2||z(x)>3?"":" "}function Ue(e,r){for(;--r&&O()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return H(e,U()+(r<6&&_()==32&&O()==32))}function ne(e){for(;O();)switch(x){case e:return C;case 34:case 39:e!==34&&e!==39&&ne(x);break;case 40:e===41&&ne(e);break;case 92:O();break}return C}function Ve(e,r){for(;O()&&e+x!==57;)if(e+x===84&&_()===47)break;return"/*"+H(r,C-1)+"*"+K(e===47?e:O())}function Xe(e){for(;!z(_());)O();return H(e,C)}function Ye(e){return ke(X("",null,null,null,[""],e=we(e),0,[0],e))}function X(e,r,t,n,a,i,s,c,p){for(var g=0,f=0,d=s,E=0,P=0,m=0,o=1,b=1,y=1,v=0,k="",I=a,$=i,A=n,h=k;b;)switch(m=v,v=O()){case 40:if(m!=108&&w(h,d-1)==58){te(h+=u(V(v),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:h+=V(v);break;case 9:case 10:case 13:case 32:h+=Ge(m);break;case 92:h+=Ue(U()-1,7);continue;case 47:switch(_()){case 42:case 47:G(Ke(Ve(O(),U()),r,t),p);break;default:h+="/"}break;case 123*o:c[g++]=T(h)*y;case 125*o:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+f:y==-1&&(h=u(h,/\f/g,"")),P>0&&T(h)-d&&G(P>32?fe(h+";",n,t,d-1):fe(u(h," ","")+";",n,t,d-2),p);break;case 59:h+=";";default:if(G(A=ce(h,r,t,g,f,a,c,k,I=[],$=[],d),i),v===123)if(f===0)X(h,r,A,A,I,i,d,c,$);else switch(E===99&&w(h,3)===110?100:E){case 100:case 108:case 109:case 115:X(e,A,A,n&&G(ce(e,A,A,0,0,a,c,k,a,I=[],d),$),a,$,d,c,n?I:$);break;default:X(h,A,A,A,[""],$,0,c,$)}}g=f=P=0,o=y=1,k=h="",d=s;break;case 58:d=1+T(h),P=m;default:if(o<1){if(v==123)--o;else if(v==125&&o++==0&&Be()==125)continue}switch(h+=K(v),v*o){case 38:y=f>0?1:(h+="\f",-1);break;case 44:c[g++]=(T(h)-1)*y,y=1;break;case 64:_()===45&&(h+=V(O())),E=_(),f=d=T(k=h+=Xe(U())),v++;break;case 45:m===45&&T(h)==2&&(o=0)}}return i}function ce(e,r,t,n,a,i,s,c,p,g,f){for(var d=a-1,E=a===0?i:[""],P=oe(E),m=0,o=0,b=0;m0?E[y]+" "+v:u(v,/&\f/g,E[y])))&&(p[b++]=k);return J(e,r,t,a===0?ie:c,p,g,f)}function Ke(e,r,t){return J(e,r,t,ye,K(qe()),j(e,2,-2),0)}function fe(e,r,t,n){return J(e,r,t,se,j(e,0,n),j(e,n+1,-1),n)}function N(e,r){for(var t="",n=oe(e),a=0;a6)switch(w(e,r+1)){case 109:if(w(e,r+4)!==45)break;case 102:return u(e,/(.+:)(.+)-([^]+)/,"$1"+l+"$2-$3$1"+Y+(w(e,r+3)==108?"$3":"$2-$3"))+e;case 115:return~te(e,"stretch")?Se(u(e,"stretch","fill-available"),r)+e:e}break;case 4949:if(w(e,r+1)!==115)break;case 6444:switch(w(e,T(e)-3-(~te(e,"!important")&&10))){case 107:return u(e,":",":"+l)+e;case 101:return u(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+l+(w(e,14)===45?"inline-":"")+"box$3$1"+l+"$2$3$1"+S+"$2box$3")+e}break;case 5936:switch(w(e,r+11)){case 114:return l+e+S+u(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return l+e+S+u(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return l+e+S+u(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return l+e+S+e+e}return e}var ir=function(r,t,n,a){if(r.length>-1&&!r.return)switch(r.type){case se:r.return=Se(r.value,r.length);break;case be:return N([D(r,{value:u(r.value,"@","@"+l)})],a);case ie:if(r.length)return He(r.props,function(i){switch(We(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return N([D(r,{props:[u(i,/:(read-\w+)/,":"+Y+"$1")]})],a);case"::placeholder":return N([D(r,{props:[u(i,/:(plac\w+)/,":"+l+"input-$1")]}),D(r,{props:[u(i,/:(plac\w+)/,":"+Y+"$1")]}),D(r,{props:[u(i,/:(plac\w+)/,S+"input-$1")]})],a)}return""})}},sr=[ir],or=function(r){var t=r.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(o){var b=o.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(o),o.setAttribute("data-s",""))})}var a=r.stylisPlugins||sr,i={},s,c=[];s=r.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(o){for(var b=o.getAttribute("data-emotion").split(" "),y=1;y=4;++n,a-=4)t=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(a){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var dr={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hr=!1,pr=/[A-Z]|^ms/g,mr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pe=function(r){return r.charCodeAt(1)===45},ue=function(r){return r!=null&&typeof r!="boolean"},Q=ge(function(e){return Pe(e)?e:e.replace(pr,"-$&").toLowerCase()}),de=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(mr,function(n,a,i){return R={name:a,styles:i,next:R},a})}return dr[r]!==1&&!Pe(r)&&typeof t=="number"&&t!==0?t+"px":t},gr="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function W(e,r,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var a=t;if(a.anim===1)return R={name:a.name,styles:a.styles,next:R},a.name;var i=t;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)R={name:s.name,styles:s.styles,next:R},s=s.next;var c=i.styles+";";return c}return yr(e,r,t)}case"function":{if(e!==void 0){var p=R,g=t(e);return R=p,W(e,r,g)}break}}var f=t;if(r==null)return f;var d=r[f];return d!==void 0?d:f}function yr(e,r,t){var n="";if(Array.isArray(t))for(var a=0;a96?Cr:Pr},me=function(r,t,n){var a;if(t){var i=t.shouldForwardProp;a=r.__emotion_forwardProp&&i?function(s){return r.__emotion_forwardProp(s)&&i(s)}:i}return typeof a!="function"&&n&&(a=r.__emotion_forwardProp),a},Ar=!1,Or=function(r){var t=r.cache,n=r.serialized,a=r.isStringTag;return Ce(t,n,a),wr(function(){return lr(t,n,a)}),null},$r=function e(r,t){var n=r.__emotion_real===r,a=n&&r.__emotion_base||r,i,s;t!==void 0&&(i=t.label,s=t.target);var c=me(r,t,n),p=c||pe(a),g=!p("as");return function(){var f=arguments,d=n&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),f[0]==null||f[0].raw===void 0)d.push.apply(d,f);else{d.push(f[0][0]);for(var E=f.length,P=1;Pe.display}; + flex-direction: ${e=>e.flexDirection}; + flex-wrap: ${e=>e.flexWrap}; + justify-content: ${e=>e.justifyContent}; + align-items: ${e=>e.alignItems}; + align-content: ${e=>e.alignContent}; + gap: ${e=>e.gap}; + row-gap: ${e=>e.rowGap}; + column-gap: ${e=>e.columnGap}; + flex: ${e=>e.flex}; + flex-grow: ${e=>e.flexGrow}; + flex-shrink: ${e=>e.flexShrink}; + flex-basis: ${e=>e.flexBasis}; + flex-flow: ${e=>e.flexFlow}; + align-self: ${e=>e.alignSelf}; + order: ${e=>e.order}; +`,Rr=e=>{const{style:r,children:t,...n}=e;return $e.jsx(Tr,{style:r,...n,children:t})};exports.Box=Rr; diff --git a/dist/react-you-ui27.mjs b/dist/react-you-ui27.mjs new file mode 100644 index 0000000..efe661a --- /dev/null +++ b/dist/react-you-ui27.mjs @@ -0,0 +1,1047 @@ +import { jsx as $e } from "react/jsx-runtime"; +import * as M from "react"; +import { forwardRef as Ee, useContext as Oe } from "react"; +function ee() { + return ee = Object.assign ? Object.assign.bind() : function(e) { + for (var r = 1; r < arguments.length; r++) { + var t = arguments[r]; + for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]); + } + return e; + }, ee.apply(null, arguments); +} +function me(e) { + var r = /* @__PURE__ */ Object.create(null); + return function(t) { + return r[t] === void 0 && (r[t] = e(t)), r[t]; + }; +} +var Te = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Re = /* @__PURE__ */ me( + function(e) { + return Te.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91; + } + /* Z+1 */ +), _e = !1; +function Me(e) { + if (e.sheet) + return e.sheet; + for (var r = 0; r < document.styleSheets.length; r++) + if (document.styleSheets[r].ownerNode === e) + return document.styleSheets[r]; +} +function Ie(e) { + var r = document.createElement("style"); + return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r; +} +var Ne = /* @__PURE__ */ function() { + function e(t) { + var n = this; + this._insertTag = function(a) { + var i; + n.tags.length === 0 ? n.insertionPoint ? i = n.insertionPoint.nextSibling : n.prepend ? i = n.container.firstChild : i = n.before : i = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(a, i), n.tags.push(a); + }, this.isSpeedy = t.speedy === void 0 ? !_e : t.speedy, this.tags = [], this.ctr = 0, this.nonce = t.nonce, this.key = t.key, this.container = t.container, this.prepend = t.prepend, this.insertionPoint = t.insertionPoint, this.before = null; + } + var r = e.prototype; + return r.hydrate = function(n) { + n.forEach(this._insertTag); + }, r.insert = function(n) { + this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Ie(this)); + var a = this.tags[this.tags.length - 1]; + if (this.isSpeedy) { + var i = Me(a); + try { + i.insertRule(n, i.cssRules.length); + } catch { + } + } else + a.appendChild(document.createTextNode(n)); + this.ctr++; + }, r.flush = function() { + this.tags.forEach(function(n) { + var a; + return (a = n.parentNode) == null ? void 0 : a.removeChild(n); + }), this.tags = [], this.ctr = 0; + }, e; +}(), S = "-ms-", Y = "-moz-", l = "-webkit-", ge = "comm", ae = "rule", ie = "decl", Fe = "@import", ye = "@keyframes", Le = "@layer", De = Math.abs, K = String.fromCharCode, ze = Object.assign; +function We(e, r) { + return w(e, 0) ^ 45 ? (((r << 2 ^ w(e, 0)) << 2 ^ w(e, 1)) << 2 ^ w(e, 2)) << 2 ^ w(e, 3) : 0; +} +function be(e) { + return e.trim(); +} +function He(e, r) { + return (e = r.exec(e)) ? e[0] : e; +} +function u(e, r, t) { + return e.replace(r, t); +} +function re(e, r) { + return e.indexOf(r); +} +function w(e, r) { + return e.charCodeAt(r) | 0; +} +function z(e, r, t) { + return e.slice(r, t); +} +function T(e) { + return e.length; +} +function se(e) { + return e.length; +} +function U(e, r) { + return r.push(e), e; +} +function Ge(e, r) { + return e.map(r).join(""); +} +var Z = 1, F = 1, ve = 0, C = 0, x = 0, L = ""; +function J(e, r, t, n, a, i, s) { + return { value: e, root: r, parent: t, type: n, props: a, children: i, line: Z, column: F, length: s, return: "" }; +} +function D(e, r) { + return ze(J("", null, null, "", null, null, 0), e, { length: -e.length }, r); +} +function je() { + return x; +} +function Be() { + return x = C > 0 ? w(L, --C) : 0, F--, x === 10 && (F = 1, Z--), x; +} +function $() { + return x = C < ve ? w(L, C++) : 0, F++, x === 10 && (F = 1, Z++), x; +} +function _() { + return w(L, C); +} +function q() { + return C; +} +function G(e, r) { + return z(L, e, r); +} +function W(e) { + switch (e) { + case 0: + case 9: + case 10: + case 13: + case 32: + return 5; + case 33: + case 43: + case 44: + case 47: + case 62: + case 64: + case 126: + case 59: + case 123: + case 125: + return 4; + case 58: + return 3; + case 34: + case 39: + case 40: + case 91: + return 2; + case 41: + case 93: + return 1; + } + return 0; +} +function xe(e) { + return Z = F = 1, ve = T(L = e), C = 0, []; +} +function we(e) { + return L = "", e; +} +function V(e) { + return be(G(C - 1, te(e === 91 ? e + 2 : e === 40 ? e + 1 : e))); +} +function Ue(e) { + for (; (x = _()) && x < 33; ) + $(); + return W(e) > 2 || W(x) > 3 ? "" : " "; +} +function qe(e, r) { + for (; --r && $() && !(x < 48 || x > 102 || x > 57 && x < 65 || x > 70 && x < 97); ) + ; + return G(e, q() + (r < 6 && _() == 32 && $() == 32)); +} +function te(e) { + for (; $(); ) + switch (x) { + case e: + return C; + case 34: + case 39: + e !== 34 && e !== 39 && te(x); + break; + case 40: + e === 41 && te(e); + break; + case 92: + $(); + break; + } + return C; +} +function Ve(e, r) { + for (; $() && e + x !== 57; ) + if (e + x === 84 && _() === 47) + break; + return "/*" + G(r, C - 1) + "*" + K(e === 47 ? e : $()); +} +function Xe(e) { + for (; !W(_()); ) + $(); + return G(e, C); +} +function Ye(e) { + return we(X("", null, null, null, [""], e = xe(e), 0, [0], e)); +} +function X(e, r, t, n, a, i, s, c, p) { + for (var g = 0, f = 0, d = s, O = 0, P = 0, m = 0, o = 1, b = 1, y = 1, v = 0, k = "", I = a, E = i, A = n, h = k; b; ) + switch (m = v, v = $()) { + case 40: + if (m != 108 && w(h, d - 1) == 58) { + re(h += u(V(v), "&", "&\f"), "&\f") != -1 && (y = -1); + break; + } + case 34: + case 39: + case 91: + h += V(v); + break; + case 9: + case 10: + case 13: + case 32: + h += Ue(m); + break; + case 92: + h += qe(q() - 1, 7); + continue; + case 47: + switch (_()) { + case 42: + case 47: + U(Ke(Ve($(), q()), r, t), p); + break; + default: + h += "/"; + } + break; + case 123 * o: + c[g++] = T(h) * y; + case 125 * o: + case 59: + case 0: + switch (v) { + case 0: + case 125: + b = 0; + case 59 + f: + y == -1 && (h = u(h, /\f/g, "")), P > 0 && T(h) - d && U(P > 32 ? ce(h + ";", n, t, d - 1) : ce(u(h, " ", "") + ";", n, t, d - 2), p); + break; + case 59: + h += ";"; + default: + if (U(A = oe(h, r, t, g, f, a, c, k, I = [], E = [], d), i), v === 123) + if (f === 0) + X(h, r, A, A, I, i, d, c, E); + else + switch (O === 99 && w(h, 3) === 110 ? 100 : O) { + case 100: + case 108: + case 109: + case 115: + X(e, A, A, n && U(oe(e, A, A, 0, 0, a, c, k, a, I = [], d), E), a, E, d, c, n ? I : E); + break; + default: + X(h, A, A, A, [""], E, 0, c, E); + } + } + g = f = P = 0, o = y = 1, k = h = "", d = s; + break; + case 58: + d = 1 + T(h), P = m; + default: + if (o < 1) { + if (v == 123) + --o; + else if (v == 125 && o++ == 0 && Be() == 125) + continue; + } + switch (h += K(v), v * o) { + case 38: + y = f > 0 ? 1 : (h += "\f", -1); + break; + case 44: + c[g++] = (T(h) - 1) * y, y = 1; + break; + case 64: + _() === 45 && (h += V($())), O = _(), f = d = T(k = h += Xe(q())), v++; + break; + case 45: + m === 45 && T(h) == 2 && (o = 0); + } + } + return i; +} +function oe(e, r, t, n, a, i, s, c, p, g, f) { + for (var d = a - 1, O = a === 0 ? i : [""], P = se(O), m = 0, o = 0, b = 0; m < n; ++m) + for (var y = 0, v = z(e, d + 1, d = De(o = s[m])), k = e; y < P; ++y) + (k = be(o > 0 ? O[y] + " " + v : u(v, /&\f/g, O[y]))) && (p[b++] = k); + return J(e, r, t, a === 0 ? ae : c, p, g, f); +} +function Ke(e, r, t) { + return J(e, r, t, ge, K(je()), z(e, 2, -2), 0); +} +function ce(e, r, t, n) { + return J(e, r, t, ie, z(e, 0, n), z(e, n + 1, -1), n); +} +function N(e, r) { + for (var t = "", n = se(e), a = 0; a < n; a++) + t += r(e[a], a, e, r) || ""; + return t; +} +function Ze(e, r, t, n) { + switch (e.type) { + case Le: + if (e.children.length) break; + case Fe: + case ie: + return e.return = e.return || e.value; + case ge: + return ""; + case ye: + return e.return = e.value + "{" + N(e.children, n) + "}"; + case ae: + e.value = e.props.join(","); + } + return T(t = N(e.children, n)) ? e.return = e.value + "{" + t + "}" : ""; +} +function Je(e) { + var r = se(e); + return function(t, n, a, i) { + for (var s = "", c = 0; c < r; c++) + s += e[c](t, n, a, i) || ""; + return s; + }; +} +function Qe(e) { + return function(r) { + r.root || (r = r.return) && e(r); + }; +} +var er = function(r, t, n) { + for (var a = 0, i = 0; a = i, i = _(), a === 38 && i === 12 && (t[n] = 1), !W(i); ) + $(); + return G(r, C); +}, rr = function(r, t) { + var n = -1, a = 44; + do + switch (W(a)) { + case 0: + a === 38 && _() === 12 && (t[n] = 1), r[n] += er(C - 1, t, n); + break; + case 2: + r[n] += V(a); + break; + case 4: + if (a === 44) { + r[++n] = _() === 58 ? "&\f" : "", t[n] = r[n].length; + break; + } + default: + r[n] += K(a); + } + while (a = $()); + return r; +}, tr = function(r, t) { + return we(rr(xe(r), t)); +}, fe = /* @__PURE__ */ new WeakMap(), nr = function(r) { + if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo + // negative .length indicates that this rule has been already prefixed + r.length < 1)) { + for (var t = r.value, n = r.parent, a = r.column === n.column && r.line === n.line; n.type !== "rule"; ) + if (n = n.parent, !n) return; + if (!(r.props.length === 1 && t.charCodeAt(0) !== 58 && !fe.get(n)) && !a) { + fe.set(r, !0); + for (var i = [], s = tr(t, i), c = n.props, p = 0, g = 0; p < s.length; p++) + for (var f = 0; f < c.length; f++, g++) + r.props[g] = i[p] ? s[p].replace(/&\f/g, c[f]) : c[f] + " " + s[p]; + } + } +}, ar = function(r) { + if (r.type === "decl") { + var t = r.value; + // charcode for l + t.charCodeAt(0) === 108 && // charcode for b + t.charCodeAt(2) === 98 && (r.return = "", r.value = ""); + } +}; +function ke(e, r) { + switch (We(e, r)) { + case 5103: + return l + "print-" + e + e; + case 5737: + case 4201: + case 3177: + case 3433: + case 1641: + case 4457: + case 2921: + case 5572: + case 6356: + case 5844: + case 3191: + case 6645: + case 3005: + case 6391: + case 5879: + case 5623: + case 6135: + case 4599: + case 4855: + case 4215: + case 6389: + case 5109: + case 5365: + case 5621: + case 3829: + return l + e + e; + case 5349: + case 4246: + case 4810: + case 6968: + case 2756: + return l + e + Y + e + S + e + e; + case 6828: + case 4268: + return l + e + S + e + e; + case 6165: + return l + e + S + "flex-" + e + e; + case 5187: + return l + e + u(e, /(\w+).+(:[^]+)/, l + "box-$1$2" + S + "flex-$1$2") + e; + case 5443: + return l + e + S + "flex-item-" + u(e, /flex-|-self/, "") + e; + case 4675: + return l + e + S + "flex-line-pack" + u(e, /align-content|flex-|-self/, "") + e; + case 5548: + return l + e + S + u(e, "shrink", "negative") + e; + case 5292: + return l + e + S + u(e, "basis", "preferred-size") + e; + case 6060: + return l + "box-" + u(e, "-grow", "") + l + e + S + u(e, "grow", "positive") + e; + case 4554: + return l + u(e, /([^-])(transform)/g, "$1" + l + "$2") + e; + case 6187: + return u(u(u(e, /(zoom-|grab)/, l + "$1"), /(image-set)/, l + "$1"), e, "") + e; + case 5495: + case 3959: + return u(e, /(image-set\([^]*)/, l + "$1$`$1"); + case 4968: + return u(u(e, /(.+:)(flex-)?(.*)/, l + "box-pack:$3" + S + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + l + e + e; + case 4095: + case 3583: + case 4068: + case 2532: + return u(e, /(.+)-inline(.+)/, l + "$1$2") + e; + case 8116: + case 7059: + case 5753: + case 5535: + case 5445: + case 5701: + case 4933: + case 4677: + case 5533: + case 5789: + case 5021: + case 4765: + if (T(e) - 1 - r > 6) switch (w(e, r + 1)) { + case 109: + if (w(e, r + 4) !== 45) break; + case 102: + return u(e, /(.+:)(.+)-([^]+)/, "$1" + l + "$2-$3$1" + Y + (w(e, r + 3) == 108 ? "$3" : "$2-$3")) + e; + case 115: + return ~re(e, "stretch") ? ke(u(e, "stretch", "fill-available"), r) + e : e; + } + break; + case 4949: + if (w(e, r + 1) !== 115) break; + case 6444: + switch (w(e, T(e) - 3 - (~re(e, "!important") && 10))) { + case 107: + return u(e, ":", ":" + l) + e; + case 101: + return u(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + l + (w(e, 14) === 45 ? "inline-" : "") + "box$3$1" + l + "$2$3$1" + S + "$2box$3") + e; + } + break; + case 5936: + switch (w(e, r + 11)) { + case 114: + return l + e + S + u(e, /[svh]\w+-[tblr]{2}/, "tb") + e; + case 108: + return l + e + S + u(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e; + case 45: + return l + e + S + u(e, /[svh]\w+-[tblr]{2}/, "lr") + e; + } + return l + e + S + e + e; + } + return e; +} +var ir = function(r, t, n, a) { + if (r.length > -1 && !r.return) switch (r.type) { + case ie: + r.return = ke(r.value, r.length); + break; + case ye: + return N([D(r, { + value: u(r.value, "@", "@" + l) + })], a); + case ae: + if (r.length) return Ge(r.props, function(i) { + switch (He(i, /(::plac\w+|:read-\w+)/)) { + case ":read-only": + case ":read-write": + return N([D(r, { + props: [u(i, /:(read-\w+)/, ":" + Y + "$1")] + })], a); + case "::placeholder": + return N([D(r, { + props: [u(i, /:(plac\w+)/, ":" + l + "input-$1")] + }), D(r, { + props: [u(i, /:(plac\w+)/, ":" + Y + "$1")] + }), D(r, { + props: [u(i, /:(plac\w+)/, S + "input-$1")] + })], a); + } + return ""; + }); + } +}, sr = [ir], or = function(r) { + var t = r.key; + if (t === "css") { + var n = document.querySelectorAll("style[data-emotion]:not([data-s])"); + Array.prototype.forEach.call(n, function(o) { + var b = o.getAttribute("data-emotion"); + b.indexOf(" ") !== -1 && (document.head.appendChild(o), o.setAttribute("data-s", "")); + }); + } + var a = r.stylisPlugins || sr, i = {}, s, c = []; + s = r.container || document.head, Array.prototype.forEach.call( + // this means we will ignore elements which don't have a space in them which + // means that the style elements we're looking at are only Emotion 11 server-rendered style elements + document.querySelectorAll('style[data-emotion^="' + t + ' "]'), + function(o) { + for (var b = o.getAttribute("data-emotion").split(" "), y = 1; y < b.length; y++) + i[b[y]] = !0; + c.push(o); + } + ); + var p, g = [nr, ar]; + { + var f, d = [Ze, Qe(function(o) { + f.insert(o); + })], O = Je(g.concat(a, d)), P = function(b) { + return N(Ye(b), O); + }; + p = function(b, y, v, k) { + f = v, P(b ? b + "{" + y.styles + "}" : y.styles), k && (m.inserted[y.name] = !0); + }; + } + var m = { + key: t, + sheet: new Ne({ + key: t, + container: s, + nonce: r.nonce, + speedy: r.speedy, + prepend: r.prepend, + insertionPoint: r.insertionPoint + }), + nonce: r.nonce, + inserted: i, + registered: {}, + insert: p + }; + return m.sheet.hydrate(c), m; +}, cr = !0; +function fr(e, r, t) { + var n = ""; + return t.split(" ").forEach(function(a) { + e[a] !== void 0 ? r.push(e[a] + ";") : a && (n += a + " "); + }), n; +} +var Se = function(r, t, n) { + var a = r.key + "-" + t.name; + // we only need to add the styles to the registered cache if the + // class name could be used further down + // the tree but if it's a string tag, we know it won't + // so we don't have to add it to registered cache. + // this improves memory usage since we can avoid storing the whole style string + (n === !1 || // we need to always store it if we're in compat mode and + // in node since emotion-server relies on whether a style is in + // the registered cache to know whether a style is global or not + // also, note that this check will be dead code eliminated in the browser + cr === !1) && r.registered[a] === void 0 && (r.registered[a] = t.styles); +}, lr = function(r, t, n) { + Se(r, t, n); + var a = r.key + "-" + t.name; + if (r.inserted[t.name] === void 0) { + var i = t; + do + r.insert(t === i ? "." + a : "", i, r.sheet, !0), i = i.next; + while (i !== void 0); + } +}; +function ur(e) { + for (var r = 0, t, n = 0, a = e.length; a >= 4; ++n, a -= 4) + t = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, t = /* Math.imul(k, m): */ + (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */ + t >>> 24, r = /* Math.imul(k, m): */ + (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ + (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16); + switch (a) { + case 3: + r ^= (e.charCodeAt(n + 2) & 255) << 16; + case 2: + r ^= (e.charCodeAt(n + 1) & 255) << 8; + case 1: + r ^= e.charCodeAt(n) & 255, r = /* Math.imul(h, m): */ + (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16); + } + return r ^= r >>> 13, r = /* Math.imul(h, m): */ + (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36); +} +var dr = { + animationIterationCount: 1, + aspectRatio: 1, + borderImageOutset: 1, + borderImageSlice: 1, + borderImageWidth: 1, + boxFlex: 1, + boxFlexGroup: 1, + boxOrdinalGroup: 1, + columnCount: 1, + columns: 1, + flex: 1, + flexGrow: 1, + flexPositive: 1, + flexShrink: 1, + flexNegative: 1, + flexOrder: 1, + gridRow: 1, + gridRowEnd: 1, + gridRowSpan: 1, + gridRowStart: 1, + gridColumn: 1, + gridColumnEnd: 1, + gridColumnSpan: 1, + gridColumnStart: 1, + msGridRow: 1, + msGridRowSpan: 1, + msGridColumn: 1, + msGridColumnSpan: 1, + fontWeight: 1, + lineHeight: 1, + opacity: 1, + order: 1, + orphans: 1, + scale: 1, + tabSize: 1, + widows: 1, + zIndex: 1, + zoom: 1, + WebkitLineClamp: 1, + // SVG-related properties + fillOpacity: 1, + floodOpacity: 1, + stopOpacity: 1, + strokeDasharray: 1, + strokeDashoffset: 1, + strokeMiterlimit: 1, + strokeOpacity: 1, + strokeWidth: 1 +}, hr = !1, pr = /[A-Z]|^ms/g, mr = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Ce = function(r) { + return r.charCodeAt(1) === 45; +}, le = function(r) { + return r != null && typeof r != "boolean"; +}, Q = /* @__PURE__ */ me(function(e) { + return Ce(e) ? e : e.replace(pr, "-$&").toLowerCase(); +}), ue = function(r, t) { + switch (r) { + case "animation": + case "animationName": + if (typeof t == "string") + return t.replace(mr, function(n, a, i) { + return R = { + name: a, + styles: i, + next: R + }, a; + }); + } + return dr[r] !== 1 && !Ce(r) && typeof t == "number" && t !== 0 ? t + "px" : t; +}, gr = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform."; +function H(e, r, t) { + if (t == null) + return ""; + var n = t; + if (n.__emotion_styles !== void 0) + return n; + switch (typeof t) { + case "boolean": + return ""; + case "object": { + var a = t; + if (a.anim === 1) + return R = { + name: a.name, + styles: a.styles, + next: R + }, a.name; + var i = t; + if (i.styles !== void 0) { + var s = i.next; + if (s !== void 0) + for (; s !== void 0; ) + R = { + name: s.name, + styles: s.styles, + next: R + }, s = s.next; + var c = i.styles + ";"; + return c; + } + return yr(e, r, t); + } + case "function": { + if (e !== void 0) { + var p = R, g = t(e); + return R = p, H(e, r, g); + } + break; + } + } + var f = t; + if (r == null) + return f; + var d = r[f]; + return d !== void 0 ? d : f; +} +function yr(e, r, t) { + var n = ""; + if (Array.isArray(t)) + for (var a = 0; a < t.length; a++) + n += H(e, r, t[a]) + ";"; + else + for (var i in t) { + var s = t[i]; + if (typeof s != "object") { + var c = s; + r != null && r[c] !== void 0 ? n += i + "{" + r[c] + "}" : le(c) && (n += Q(i) + ":" + ue(i, c) + ";"); + } else { + if (i === "NO_COMPONENT_SELECTOR" && hr) + throw new Error(gr); + if (Array.isArray(s) && typeof s[0] == "string" && (r == null || r[s[0]] === void 0)) + for (var p = 0; p < s.length; p++) + le(s[p]) && (n += Q(i) + ":" + ue(i, s[p]) + ";"); + else { + var g = H(e, r, s); + switch (i) { + case "animation": + case "animationName": { + n += Q(i) + ":" + g + ";"; + break; + } + default: + n += i + "{" + g + "}"; + } + } + } + } + return n; +} +var de = /label:\s*([^\s;{]+)\s*(;|$)/g, R; +function br(e, r, t) { + if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0) + return e[0]; + var n = !0, a = ""; + R = void 0; + var i = e[0]; + if (i == null || i.raw === void 0) + n = !1, a += H(t, r, i); + else { + var s = i; + a += s[0]; + } + for (var c = 1; c < e.length; c++) + if (a += H(t, r, e[c]), n) { + var p = i; + a += p[c]; + } + de.lastIndex = 0; + for (var g = "", f; (f = de.exec(a)) !== null; ) + g += "-" + f[1]; + var d = ur(a) + g; + return { + name: d, + styles: a, + next: R + }; +} +var vr = function(r) { + return r(); +}, xr = M.useInsertionEffect ? M.useInsertionEffect : !1, wr = xr || vr, Pe = /* @__PURE__ */ M.createContext( + // we're doing this to avoid preconstruct's dead code elimination in this one case + // because this module is primarily intended for the browser and node + // but it's also required in react native and similar environments sometimes + // and we could have a special build just for that + // but this is much easier and the native packages + // might use a different theme context in the future anyway + typeof HTMLElement < "u" ? /* @__PURE__ */ or({ + key: "css" + }) : null +); +Pe.Provider; +var kr = function(r) { + return /* @__PURE__ */ Ee(function(t, n) { + var a = Oe(Pe); + return r(t, a, n); + }); +}, Sr = /* @__PURE__ */ M.createContext({}), Cr = Re, Pr = function(r) { + return r !== "theme"; +}, he = function(r) { + return typeof r == "string" && // 96 is one less than the char code + // for "a" so this is checking that + // it's a lowercase character + r.charCodeAt(0) > 96 ? Cr : Pr; +}, pe = function(r, t, n) { + var a; + if (t) { + var i = t.shouldForwardProp; + a = r.__emotion_forwardProp && i ? function(s) { + return r.__emotion_forwardProp(s) && i(s); + } : i; + } + return typeof a != "function" && n && (a = r.__emotion_forwardProp), a; +}, Ar = !1, $r = function(r) { + var t = r.cache, n = r.serialized, a = r.isStringTag; + return Se(t, n, a), wr(function() { + return lr(t, n, a); + }), null; +}, Er = function e(r, t) { + var n = r.__emotion_real === r, a = n && r.__emotion_base || r, i, s; + t !== void 0 && (i = t.label, s = t.target); + var c = pe(r, t, n), p = c || he(a), g = !p("as"); + return function() { + var f = arguments, d = n && r.__emotion_styles !== void 0 ? r.__emotion_styles.slice(0) : []; + if (i !== void 0 && d.push("label:" + i + ";"), f[0] == null || f[0].raw === void 0) + d.push.apply(d, f); + else { + d.push(f[0][0]); + for (var O = f.length, P = 1; P < O; P++) + d.push(f[P], f[0][P]); + } + var m = kr(function(o, b, y) { + var v = g && o.as || a, k = "", I = [], E = o; + if (o.theme == null) { + E = {}; + for (var A in o) + E[A] = o[A]; + E.theme = M.useContext(Sr); + } + typeof o.className == "string" ? k = fr(b.registered, I, o.className) : o.className != null && (k = o.className + " "); + var h = br(d.concat(I), b.registered, E); + k += b.key + "-" + h.name, s !== void 0 && (k += " " + s); + var Ae = g && c === void 0 ? he(v) : p, j = {}; + for (var B in o) + g && B === "as" || Ae(B) && (j[B] = o[B]); + return j.className = k, y && (j.ref = y), /* @__PURE__ */ M.createElement(M.Fragment, null, /* @__PURE__ */ M.createElement($r, { + cache: b, + serialized: h, + isStringTag: typeof v == "string" + }), /* @__PURE__ */ M.createElement(v, j)); + }); + return m.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", m.defaultProps = r.defaultProps, m.__emotion_real = m, m.__emotion_base = a, m.__emotion_styles = d, m.__emotion_forwardProp = c, Object.defineProperty(m, "toString", { + value: function() { + return s === void 0 && Ar ? "NO_COMPONENT_SELECTOR" : "." + s; + } + }), m.withComponent = function(o, b) { + return e(o, ee({}, t, b, { + shouldForwardProp: pe(m, b, !0) + })).apply(void 0, d); + }, m; + }; +}, Or = [ + "a", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "b", + "base", + "bdi", + "bdo", + "big", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "marquee", + "menu", + "menuitem", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "table", + "tbody", + "td", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "u", + "ul", + "var", + "video", + "wbr", + // SVG + "circle", + "clipPath", + "defs", + "ellipse", + "foreignObject", + "g", + "image", + "line", + "linearGradient", + "mask", + "path", + "pattern", + "polygon", + "polyline", + "radialGradient", + "rect", + "stop", + "svg", + "text", + "tspan" +], ne = Er.bind(); +Or.forEach(function(e) { + ne[e] = ne(e); +}); +const Tr = ne.div` + display: ${(e) => e.display}; + flex-direction: ${(e) => e.flexDirection}; + flex-wrap: ${(e) => e.flexWrap}; + justify-content: ${(e) => e.justifyContent}; + align-items: ${(e) => e.alignItems}; + align-content: ${(e) => e.alignContent}; + gap: ${(e) => e.gap}; + row-gap: ${(e) => e.rowGap}; + column-gap: ${(e) => e.columnGap}; + flex: ${(e) => e.flex}; + flex-grow: ${(e) => e.flexGrow}; + flex-shrink: ${(e) => e.flexShrink}; + flex-basis: ${(e) => e.flexBasis}; + flex-flow: ${(e) => e.flexFlow}; + align-self: ${(e) => e.alignSelf}; + order: ${(e) => e.order}; +`, Mr = (e) => { + const { style: r, children: t, ...n } = e; + return /* @__PURE__ */ $e(Tr, { style: r, ...n, children: t }); +}; +export { + Mr as Box +}; diff --git a/dist/react-you-ui4.js b/dist/react-you-ui4.js index d43dfc3..aef7b12 100644 --- a/dist/react-you-ui4.js +++ b/dist/react-you-ui4.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("./react-you-ui26.js"),n=({children:e,style:o,...r})=>(console.log(r,o),s.jsx(c.Box,{...r,style:{borderRadius:"28px",backgroundColor:"var(--md-sys-color-surface)",color:"var(--md-sys-color-on-surface)",padding:"18px",display:"flex",...o},children:e}));exports.Paper=n; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("./react-you-ui27.js"),n=({children:e,style:o,...r})=>(console.log(r,o),s.jsx(c.Box,{...r,style:{borderRadius:"28px",backgroundColor:"var(--md-sys-color-surface)",color:"var(--md-sys-color-on-surface)",padding:"18px",display:"flex",...o},children:e}));exports.Paper=n; diff --git a/dist/react-you-ui4.mjs b/dist/react-you-ui4.mjs index fb35d58..cfc790e 100644 --- a/dist/react-you-ui4.mjs +++ b/dist/react-you-ui4.mjs @@ -1,5 +1,5 @@ import { jsx as a } from "react/jsx-runtime"; -import { Box as c } from "./react-you-ui26.mjs"; +import { Box as c } from "./react-you-ui27.mjs"; const l = ({ children: s, style: o, ...r }) => (console.log(r, o), /* @__PURE__ */ a( c, { diff --git a/dist/react-you-ui9.js b/dist/react-you-ui9.js index fab4ee8..11947a4 100644 --- a/dist/react-you-ui9.js +++ b/dist/react-you-ui9.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("./react-you-ui26.js"),i=e=>{const{className:t,id:n,children:r,style:s,...o}=e;return a.jsx(c.Box,{className:t,id:n,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 16px",backgroundColor:"transparent",...s},...o,children:r})};exports.AppBar=i; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=({orientation:r="horizontal",className:e="",style:i,color:t="var(--md-sys-color-outline-variant)",...o})=>{const a={backgroundColor:t,...r==="horizontal"?{width:"100%",height:"1px",margin:"8px 0"}:{width:"1px",height:"100%",margin:"0 8px"},...i};return s.jsx("div",{role:"separator","aria-orientation":r,className:`md-divider ${e}`,style:a,...o})};exports.Divider=n; diff --git a/dist/react-you-ui9.mjs b/dist/react-you-ui9.mjs index 6aeb585..53d92bf 100644 --- a/dist/react-you-ui9.mjs +++ b/dist/react-you-ui9.mjs @@ -1,25 +1,29 @@ -import { jsx as p } from "react/jsx-runtime"; -import { Box as a } from "./react-you-ui26.mjs"; -const c = (e) => { - const { className: t, id: r, children: n, style: s, ...o } = e; - return /* @__PURE__ */ p( - a, +import { jsx as s } from "react/jsx-runtime"; +const d = ({ orientation: r = "horizontal", className: i = "", style: o, color: t = "var(--md-sys-color-outline-variant)", ...a }) => { + const e = { + backgroundColor: t, + ...r === "horizontal" ? { + width: "100%", + height: "1px", + margin: "8px 0" + } : { + width: "1px", + height: "100%", + margin: "0 8px" + }, + ...o + }; + return /* @__PURE__ */ s( + "div", { - className: t, - id: r, - style: { - display: "flex", - alignItems: "center", - justifyContent: "space-between", - padding: "16px 16px", - backgroundColor: "transparent", - ...s - }, - ...o, - children: n + role: "separator", + "aria-orientation": r, + className: `md-divider ${i}`, + style: e, + ...a } ); }; export { - c as AppBar + d as Divider }; diff --git a/dist/src/components/Divider.d.ts b/dist/src/components/Divider.d.ts new file mode 100644 index 0000000..cbd984e --- /dev/null +++ b/dist/src/components/Divider.d.ts @@ -0,0 +1,12 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type DividerProps = AriaProps & { + orientation?: 'horizontal' | 'vertical'; + className?: string; + style?: React.CSSProperties; + id?: string; + color?: string; +}; +export declare const Divider: ({ orientation, className, style, color, ...props }: DividerProps) => React.JSX.Element; +export {}; diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx new file mode 100644 index 0000000..27af7d4 --- /dev/null +++ b/src/components/Divider.tsx @@ -0,0 +1,38 @@ +import React from 'react'; +import { AriaProps } from '../types/aria'; + +type DividerProps = AriaProps & { + orientation?: 'horizontal' | 'vertical'; + className?: string; + style?: React.CSSProperties; + id?: string; + color?: string; +}; + +export const Divider = ({ orientation = 'horizontal', className = '', style, color = 'var(--md-sys-color-outline-variant)', ...props }: DividerProps) => { + const baseStyles: React.CSSProperties = { + backgroundColor: color, + ...(orientation === 'horizontal' + ? { + width: '100%', + height: '1px', + margin: '8px 0', + } + : { + width: '1px', + height: '100%', + margin: '0 8px', + }), + ...style, + }; + + return ( +
    + ); +}; \ No newline at end of file