@3fn/core 13.0.0 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.kiro/agents/ada-prompt.md +80 -132
- package/.kiro/agents/ada-prompt.md.attribution.json +45 -0
- package/.kiro/agents/ada.json +44 -59
- package/.kiro/agents/ada.json.attribution.json +13 -0
- package/.kiro/agents/data-prompt.md +83 -74
- package/.kiro/agents/data-prompt.md.attribution.json +53 -0
- package/.kiro/agents/data.json +31 -38
- package/.kiro/agents/data.json.attribution.json +13 -0
- package/.kiro/agents/kenya-prompt.md +83 -72
- package/.kiro/agents/kenya-prompt.md.attribution.json +53 -0
- package/.kiro/agents/kenya.json +27 -35
- package/.kiro/agents/kenya.json.attribution.json +13 -0
- package/.kiro/agents/leonardo-prompt.md +176 -234
- package/.kiro/agents/leonardo-prompt.md.attribution.json +45 -0
- package/.kiro/agents/leonardo.json +28 -36
- package/.kiro/agents/leonardo.json.attribution.json +13 -0
- package/.kiro/agents/lina-prompt.md +110 -151
- package/.kiro/agents/lina-prompt.md.attribution.json +53 -0
- package/.kiro/agents/lina.json +46 -59
- package/.kiro/agents/lina.json.attribution.json +13 -0
- package/.kiro/agents/sparky-prompt.md +89 -72
- package/.kiro/agents/sparky-prompt.md.attribution.json +53 -0
- package/.kiro/agents/sparky.json +37 -37
- package/.kiro/agents/sparky.json.attribution.json +13 -0
- package/.kiro/agents/stacy-prompt.md +74 -48
- package/.kiro/agents/stacy-prompt.md.attribution.json +45 -0
- package/.kiro/agents/stacy.json +28 -30
- package/.kiro/agents/stacy.json.attribution.json +13 -0
- package/.kiro/agents/thurgood-prompt.md +94 -138
- package/.kiro/agents/thurgood-prompt.md.attribution.json +45 -0
- package/.kiro/agents/thurgood.json +31 -35
- package/.kiro/agents/thurgood.json.attribution.json +13 -0
- package/.kiro/steering/AI-Collaboration-Principles.md +3 -3
- package/.kiro/steering/Civitas-System-Overview.md +7 -16
- package/.kiro/steering/DesignerPunk-Systems-Overview.md +6 -6
- package/.kiro/steering/Spec-Feedback-Protocol.md +2 -11
- package/.kiro/steering/Task-Completion-Protocol.md +98 -17
- package/.kiro/steering/core-goals.md +3 -3
- package/.kiro/steering/personal-note.md +1 -1
- package/.kiro/steering/start-up-tasks.md +17 -6
- package/application-mcp-server/src/index.ts +26 -0
- package/dist/ComponentTokens.android.kt +12 -12
- package/dist/ComponentTokens.ios.swift +12 -12
- package/dist/ComponentTokens.web.css +3 -3
- package/dist/DesignTokens.android.kt +1 -1
- package/dist/DesignTokens.dtcg.json +8 -5
- package/dist/DesignTokens.figma.json +2 -2
- package/dist/DesignTokens.ios.swift +1 -1
- package/dist/DesignTokens.web.css +1 -1
- package/dist/android/DesignTokens.android.kt +1 -1
- package/dist/blend/OklchBlendCalculator.js +1 -0
- package/dist/blend/ThemeAwareBlendUtilities.web.d.ts +13 -2
- package/dist/blend/ThemeAwareBlendUtilities.web.js +6 -1
- package/dist/browser/designerpunk.esm.js +36 -90
- package/dist/browser/designerpunk.esm.min.js +33 -36
- package/dist/browser/designerpunk.umd.js +36 -90
- package/dist/browser/designerpunk.umd.min.js +47 -50
- package/dist/browser/tokens.css +3 -3
- package/dist/build/tokens/defineComponentTokens.d.ts +10 -0
- package/dist/build/tokens/defineComponentTokens.js +26 -0
- package/dist/components/core/Avatar-Base/avatar.tokens.d.ts +21 -26
- package/dist/components/core/Avatar-Base/avatar.tokens.js +31 -34
- package/dist/components/core/Avatar-Base/index.d.ts +1 -1
- package/dist/components/core/Avatar-Base/index.js +2 -2
- package/dist/components/core/Avatar-Base/platforms/web/Avatar.web.js +24 -5
- package/dist/components/core/Button-CTA/examples/BasicUsage.d.ts +16 -28
- package/dist/components/core/Button-CTA/examples/BasicUsage.js +18 -43
- package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.d.ts +3 -15
- package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.js +9 -58
- package/dist/components/core/Button-CTA/types.d.ts +0 -24
- package/dist/components/core/Button-CTA/types.js +6 -0
- package/dist/components/core/Button-Icon/buttonIcon.tokens.d.ts +28 -14
- package/dist/components/core/Button-Icon/buttonIcon.tokens.js +35 -20
- package/dist/components/core/Input-Text-Base/types.d.ts +13 -1
- package/dist/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.js +11 -2
- package/dist/generators/DTCGFormatGenerator.js +8 -0
- package/dist/generators/TokenFileGenerator.js +7 -2
- package/dist/integration/BuildErrorHandler.js +2 -2
- package/dist/ios/DesignTokens.ios.swift +1 -1
- package/dist/mcp/application-mcp.js +24 -0
- package/dist/mcp/docs-mcp.js +130 -15
- package/dist/mcp/product-mcp.js +25 -0
- package/dist/tokens/OpacityTokens.js +1 -1
- package/dist/tokens/component/progress.d.ts +65 -5
- package/dist/tokens/component/progress.js +79 -18
- package/dist/tokens/semantic/BlendTokens.d.ts +10 -3
- package/dist/tokens/semantic/BlendTokens.js +17 -5
- package/dist/tokens/semantic/OpacityTokens.d.ts +4 -4
- package/dist/tokens/semantic/OpacityTokens.js +4 -4
- package/dist/types/ComponentTypes.d.ts +1 -1
- package/dist/types/generated/TokenTypes.d.ts +1 -1
- package/dist/types/generated/TokenTypes.js +1 -1
- package/dist/validators/StemmaTokenUsageValidator.js +3 -2
- package/dist/web/DesignTokens.web.css +1 -1
- package/governance/BUILD-SYSTEM-SETUP.md +1 -2
- package/governance/Component-Development-Guide.md +23 -13
- package/governance/Component-Development-Standards.md +21 -20
- package/governance/Component-Family-Avatar.md +6 -7
- package/governance/Component-Family-Badge.md +19 -20
- package/governance/Component-Family-Button.md +30 -43
- package/governance/Component-Family-Chip.md +14 -15
- package/governance/Component-Family-Container.md +12 -13
- package/governance/Component-Family-Data-Display.md +1 -2
- package/governance/Component-Family-Divider.md +1 -2
- package/governance/Component-Family-Form-Inputs.md +65 -65
- package/governance/Component-Family-Icon.md +9 -10
- package/governance/Component-Family-Loading.md +1 -2
- package/governance/Component-Family-Modal.md +1 -2
- package/governance/Component-Family-Navigation.md +1 -2
- package/governance/Component-Family-Progress.md +0 -1
- package/governance/Component-Inheritance-Structures.md +219 -99
- package/governance/Component-MCP-Document-Template.md +6 -5
- package/governance/Component-Primitive-vs-Semantic-Philosophy.md +1 -1
- package/governance/Component-Quick-Reference.md +33 -33
- package/governance/Component-Readiness-Status.md +59 -44
- package/governance/Component-Templates.md +57 -61
- package/governance/Contract-System-Reference.md +7 -7
- package/governance/MCP-Integration-Guide.md +1 -1
- package/governance/Process-Cross-Reference-Standards.md +31 -13
- package/governance/Process-Development-Workflow.md +49 -59
- package/governance/Process-File-Organization.md +25 -28
- package/governance/Process-Hook-Operations.md +22 -11
- package/governance/Process-Orchestration-Model-Selection.md +92 -0
- package/governance/Process-Spec-Planning.md +98 -52
- package/governance/Process-Task-Type-Definitions.md +80 -4
- package/governance/Product-Handoff-Protocol.md +2 -0
- package/governance/Rosetta-System-Architecture.md +13 -11
- package/governance/Test-Behavioral-Contract-Validation.md +38 -31
- package/governance/Test-Failure-Audit-Methodology.md +1 -1
- package/governance/Token-Family-Accessibility.md +1 -2
- package/governance/Token-Family-Blend.md +18 -16
- package/governance/Token-Family-Blur.md +0 -1
- package/governance/Token-Family-Border.md +1 -2
- package/governance/Token-Family-Color.md +0 -1
- package/governance/Token-Family-Glow.md +1 -2
- package/governance/Token-Family-Layering.md +0 -1
- package/governance/Token-Family-Motion.md +1 -2
- package/governance/Token-Family-Opacity.md +0 -1
- package/governance/Token-Family-Radius.md +1 -2
- package/governance/Token-Family-Responsive.md +1 -2
- package/governance/Token-Family-Shadow.md +1 -2
- package/governance/Token-Family-Sizing.md +0 -1
- package/governance/Token-Family-Spacing.md +1 -2
- package/governance/Token-Family-Typography.md +1 -2
- package/governance/Token-Governance.md +8 -8
- package/governance/Token-Quick-Reference.md +47 -34
- package/governance/Token-Resolution-Patterns.md +1 -1
- package/governance/Token-Semantic-Structure.md +1 -1
- package/governance/Web-Authoring-Standards.md +5 -5
- package/governance/browser-distribution-guide.md +1 -4
- package/governance/classification-map.md +474 -0
- package/governance/completion-documentation-guide.md +23 -37
- package/governance/component-meta-authoring-guide.md +1 -1
- package/governance/cross-platform-vs-platform-specific-decision-framework.md +1 -1
- package/governance/platform-implementation-guidelines.md +2 -3
- package/governance/release-management-system.md +28 -63
- package/governance/rosetta-system-principles.md +8 -6
- package/governance/stemma-system-principles.md +18 -17
- package/mcp-server/src/index.ts +24 -6
- package/mcp-server/src/indexer/DocumentIndexer.ts +119 -9
- package/mcp-server/src/indexer/__tests__/bare-id-crossrefs.test.ts +250 -0
- package/mcp-server/src/indexer/cross-ref-parser.ts +29 -1
- package/mcp-server/src/indexer/index-health.ts +27 -2
- package/mcp-server/src/query/__tests__/find-docs-calibration.test.ts +11 -26
- package/mcp-server/src/relocation-integrity-gate/__tests__/relocation-integrity-gate.test.ts +72 -5
- package/mcp-server/src/relocation-integrity-gate/relocation-integrity-gate.ts +81 -24
- package/mcp-server/src/tools/list-cross-references.ts +2 -2
- package/package.json +24 -26
- package/src/__tests__/browser-distribution/css-bundling.test.ts +6 -4
- package/src/__tests__/console-allowlist.json +14 -0
- package/src/__tests__/console-fail-setup.ts +169 -0
- package/src/__tests__/integration/Spec107-DesignLanguageContext.test.ts +16 -0
- package/src/__tests__/stemma-system/behavioral-contract-validation.test.ts +70 -17
- package/src/__tests__/stemma-system/contract-catalog-name-validation.test.ts +28 -0
- package/src/__tests__/stemma-system/form-inputs-contracts.test.ts +223 -16
- package/src/__tests__/stemma-system/input-text-native-base-call-alignment.test.ts +298 -0
- package/src/blend/OklchBlendCalculator.ts +3 -0
- package/src/blend/ThemeAwareBlendUtilities.android.kt +3 -0
- package/src/blend/ThemeAwareBlendUtilities.ios.swift +3 -0
- package/src/blend/ThemeAwareBlendUtilities.web.ts +9 -1
- package/src/blend/__tests__/InteractionStateAudit.test.ts +12 -9
- package/src/build/errors/__tests__/ErrorHandler.integration.test.ts +8 -0
- package/src/build/errors/__tests__/ErrorHandler.test.ts +5 -0
- package/src/build/tokens/__tests__/defineComponentTokens.test.ts +113 -0
- package/src/build/tokens/defineComponentTokens.ts +43 -1
- package/src/build/workflow/__tests__/CICDIntegration.test.ts +12 -1
- package/src/cli/__tests__/init.test.ts +45 -11
- package/src/components/core/Avatar-Base/Avatar-Base.schema.yaml +1 -1
- package/src/components/core/Avatar-Base/__tests__/Avatar.accessibility.test.ts +121 -7
- package/src/components/core/Avatar-Base/__tests__/Avatar.image.test.ts +3 -0
- package/src/components/core/Avatar-Base/__tests__/Avatar.test.ts +15 -6
- package/src/components/core/Avatar-Base/avatar.tokens.ts +31 -34
- package/src/components/core/Avatar-Base/contracts.yaml +11 -1
- package/src/components/core/Avatar-Base/index.ts +1 -1
- package/src/components/core/Avatar-Base/platforms/web/Avatar.web.ts +24 -5
- package/src/components/core/Badge-Count-Base/contracts.yaml +1 -1
- package/src/components/core/Badge-Label-Base/contracts.yaml +1 -1
- package/src/components/core/Button-CTA/Button-CTA.schema.yaml +2 -12
- package/src/components/core/Button-CTA/README.md +3 -6
- package/src/components/core/Button-CTA/__tests__/ButtonCTA.test.ts +35 -89
- package/src/components/core/Button-CTA/__tests__/setup.test.ts +0 -2
- package/src/components/core/Button-CTA/__tests__/test-utils.ts +0 -2
- package/src/components/core/Button-CTA/contracts.yaml +6 -29
- package/src/components/core/Button-CTA/examples/BasicUsage.html +2 -14
- package/src/components/core/Button-CTA/examples/BasicUsage.tsx +17 -44
- package/src/components/core/Button-CTA/platforms/android/ButtonCTA.android.kt +12 -20
- package/src/components/core/Button-CTA/platforms/ios/ButtonCTA.ios.swift +12 -51
- package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.css +2 -26
- package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.ts +18 -71
- package/src/components/core/Button-CTA/types.ts +10 -28
- package/src/components/core/Button-Icon/buttonIcon.tokens.ts +43 -27
- package/src/components/core/Chip-Base/__tests__/ChipBase.test.ts +13 -0
- package/src/components/core/Chip-Filter/__tests__/ChipFilter.test.ts +13 -0
- package/src/components/core/Chip-Input/__tests__/ChipInput.test.ts +13 -0
- package/src/components/core/Input-Text-Base/Input-Text-Base.schema.yaml +30 -2
- package/src/components/core/Input-Text-Base/README.md +25 -2
- package/src/components/core/Input-Text-Base/__tests__/focusIndicators.test.ts +16 -15
- package/src/components/core/Input-Text-Base/contracts.yaml +90 -0
- package/src/components/core/Input-Text-Base/platforms/android/InputTextBase.android.kt +26 -12
- package/src/components/core/Input-Text-Base/platforms/ios/InputTextBase.ios.swift +195 -59
- package/src/components/core/Input-Text-Base/types.ts +13 -1
- package/src/components/core/Input-Text-Email/Input-Text-Email.schema.yaml +5 -1
- package/src/components/core/Input-Text-Email/README.md +8 -7
- package/src/components/core/Input-Text-Email/platforms/android/InputTextEmail.android.kt +1 -4
- package/src/components/core/Input-Text-Email/platforms/ios/InputTextEmail.ios.swift +2 -16
- package/src/components/core/Input-Text-Password/Input-Text-Password.schema.yaml +10 -3
- package/src/components/core/Input-Text-Password/README.md +9 -8
- package/src/components/core/Input-Text-Password/contracts.yaml +5 -0
- package/src/components/core/Input-Text-Password/platforms/android/InputTextPassword.android.kt +17 -7
- package/src/components/core/Input-Text-Password/platforms/ios/InputTextPassword.ios.swift +22 -20
- package/src/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.ts +11 -2
- package/src/components/core/Input-Text-PhoneNumber/Input-Text-PhoneNumber.schema.yaml +5 -1
- package/src/components/core/Input-Text-PhoneNumber/README.md +9 -8
- package/src/components/core/Input-Text-PhoneNumber/platforms/android/InputTextPhoneNumber.android.kt +2 -5
- package/src/components/core/Input-Text-PhoneNumber/platforms/ios/InputTextPhoneNumber.ios.swift +3 -17
- package/src/components/core/Nav-Header-App/contracts.yaml +1 -1
- package/src/components/core/Nav-SegmentedChoice-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Indicator-Connector-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Indicator-Label-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Indicator-Node-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Stepper-Base/__tests__/StepperBase.test.ts +5 -2
- package/src/components/core/Progress-Stepper-Detailed/__tests__/StepperDetailed.test.ts +5 -2
- package/src/generators/DTCGFormatGenerator.ts +6 -0
- package/src/generators/TokenFileGenerator.ts +7 -2
- package/src/generators/__tests__/DTCGConfigOptions.test.ts +14 -5
- package/src/integration/BuildErrorHandler.ts +2 -2
- package/src/tokens/OpacityTokens.ts +1 -1
- package/src/tokens/__tests__/OpacityTokens.test.ts +3 -1
- package/src/tokens/__tests__/ProgressTokenCompliance.test.ts +5 -3
- package/src/tokens/__tests__/ProgressTokenFormulas.test.ts +11 -11
- package/src/tokens/__tests__/ProgressTokenTranslation.test.ts +22 -20
- package/src/tokens/component/progress.ts +83 -21
- package/src/tokens/semantic/BlendTokens.ts +26 -5
- package/src/tokens/semantic/OpacityTokens.ts +4 -4
- package/src/types/ComponentTypes.ts +1 -1
- package/src/types/generated/TokenTypes.ts +1 -1
- package/src/validators/StemmaTokenUsageValidator.ts +3 -2
- package/token-index/components.yaml +8 -8
- package/token-index/semantics.yaml +1 -2
- package/src/tools/release/__tests__/ChangeClassifier.test.ts +0 -133
- package/src/tools/release/__tests__/ChangeExtractor.test.ts +0 -222
- package/src/tools/release/__tests__/GitHubPublisher.test.ts +0 -240
- package/src/tools/release/__tests__/NotesRenderer.test.ts +0 -142
- package/src/tools/release/__tests__/NpmPublisher.test.ts +0 -289
- package/src/tools/release/__tests__/PipelineIntegration.test.ts +0 -188
- package/src/tools/release/__tests__/ReleasePipeline.test.ts +0 -192
- package/src/tools/release/__tests__/SemanticVersionValidator.test.ts +0 -49
- package/src/tools/release/__tests__/SummaryScanner.test.ts +0 -141
- package/src/tools/release/__tests__/TagResolver.test.ts +0 -91
- package/src/tools/release/__tests__/VersionCalculator.test.ts +0 -270
- package/src/tools/release/__tests__/helpers/NpmMockHelper.ts +0 -80
- package/src/tools/release/cli/ReleasePipeline.ts +0 -165
- package/src/tools/release/cli/release-tool.ts +0 -107
- package/src/tools/release/pipeline/ChangeClassifier.ts +0 -61
- package/src/tools/release/pipeline/ChangeExtractor.ts +0 -87
- package/src/tools/release/pipeline/NotesRenderer.ts +0 -66
- package/src/tools/release/pipeline/SummaryScanner.ts +0 -70
- package/src/tools/release/pipeline/TagResolver.ts +0 -40
- package/src/tools/release/pipeline/VersionCalculator.ts +0 -375
- package/src/tools/release/publishers/GitHubPublisher.ts +0 -228
- package/src/tools/release/publishers/NpmPublisher.ts +0 -196
- package/src/tools/release/release-config.json +0 -5
- package/src/tools/release/types/index.ts +0 -282
- package/src/tools/release/validators/SemanticVersionValidator.ts +0 -67
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var DesignerPunk=(()=>{var Ue=Object.defineProperty,cr=Object.defineProperties,dr=Object.getOwnPropertyDescriptor,ur=Object.getOwnPropertyDescriptors,hr=Object.getOwnPropertyNames,It=Object.getOwnPropertySymbols;var Rt=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable;var zt=(n,i,e)=>i in n?Ue(n,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[i]=e,V=(n,i)=>{for(var e in i||(i={}))Rt.call(i,e)&&zt(n,e,i[e]);if(It)for(var e of It(i))pr.call(i,e)&&zt(n,e,i[e]);return n},P=(n,i)=>cr(n,ur(i));var gr=(n,i)=>{for(var e in i)Ue(n,e,{get:i[e],enumerable:!0})},mr=(n,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of hr(i))!Rt.call(n,r)&&r!==e&&Ue(n,r,{get:()=>i[r],enumerable:!(t=dr(i,r))||t.enumerable});return n};var br=n=>mr(Ue({},"__esModule",{value:!0}),n);var Kn={};gr(Kn,{Avatar:()=>xn,AvatarBase:()=>kn,AvatarBaseElement:()=>j,BadgeCount:()=>Sn,BadgeCountBase:()=>ne,BadgeCountNotification:()=>se,BadgeLabel:()=>Cn,BadgeLabelBase:()=>re,BadgeNotification:()=>En,ButtonCTA:()=>ze,ButtonIcon:()=>Re,ButtonVerticalListItem:()=>ee,ButtonVerticalListSet:()=>te,CheckboxBase:()=>wn,CheckboxLegal:()=>An,ChipBase:()=>In,ChipBaseElement:()=>le,ChipFilter:()=>zn,ChipFilterElement:()=>ce,ChipInput:()=>Rn,ChipInputElement:()=>de,Container:()=>vn,ContainerBase:()=>fn,ContainerBaseWeb:()=>q,ContainerCard:()=>Bn,ContainerCardBase:()=>Ln,ContainerCardBaseWeb:()=>K,Icon:()=>mn,IconBase:()=>bn,IconBaseElement:()=>O,InputCheckboxBaseElement:()=>oe,InputCheckboxLegalElement:()=>ae,InputRadioBaseElement:()=>Z,InputRadioSetElement:()=>ue,InputTextBase:()=>Q,InputTextEmail:()=>Ee,InputTextPassword:()=>we,InputTextPhoneNumber:()=>Ie,NavHeader:()=>qn,NavHeaderApp:()=>xe,NavHeaderAppElement:()=>Gn,NavHeaderBase:()=>ye,NavHeaderPage:()=>ke,NavHeaderPageElement:()=>Wn,NavSegmentedChoiceBase:()=>fe,NavTabBarBase:()=>_e,PaginationBase:()=>Nn,ProgressBar:()=>jn,ProgressBarBase:()=>Ce,ProgressConnector:()=>Mn,ProgressIndicatorConnectorBase:()=>pe,ProgressIndicatorLabelBase:()=>ge,ProgressIndicatorNodeBase:()=>he,ProgressLabel:()=>Dn,ProgressNode:()=>Pn,ProgressPaginationBase:()=>me,ProgressStepperBase:()=>be,ProgressStepperDetailed:()=>ve,RadioBase:()=>Vn,RadioSet:()=>$n,SegmentedChoice:()=>Fn,StepperBase:()=>Hn,StepperDetailed:()=>On,TabBar:()=>Un,TextInputField:()=>Tn,VerticalListButtonItem:()=>_n,VerticalListButtonSet:()=>yn});function it(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,e,t),o=r-s,a=0,l=0,c=(r+s)/2;if(o!==0)switch(l=c>.5?o/(2-r-s):o/(r+s),r){case i:a=((e-t)/o+(e<t?6:0))/6;break;case e:a=((t-i)/o+2)/6;break;case t:a=((i-e)/o+4)/6;break}return{h:Math.round(a*360),s:Number(l.toFixed(4)),l:Number(c.toFixed(4))}}function rt(n){let i=n.h/360,e=n.s,t=n.l,r,s,o;if(e===0)r=s=o=t;else{let a=(d,h,u)=>(u<0&&(u+=1),u>1&&(u-=1),u<.16666666666666666?d+(h-d)*6*u:u<.5?h:u<.6666666666666666?d+(h-d)*(.6666666666666666-u)*6:d),l=t<.5?t*(1+e):t+e-t*e,c=2*t-l;r=a(c,l,i+1/3),s=a(c,l,i),o=a(c,l,i-1/3)}return{r:Math.round(r*255),g:Math.round(s*255),b:Math.round(o*255)}}function X(n){let i=n.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);if(i)return{r:parseInt(i[1]),g:parseInt(i[2]),b:parseInt(i[3])};let e=n.replace(/^#/,"");if(!/^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(e))throw new Error(`Invalid hex color: ${n}`);let t=e.length===3?e.split("").map(a=>a+a).join(""):e,r=parseInt(t.substring(0,2),16),s=parseInt(t.substring(2,4),16),o=parseInt(t.substring(4,6),16);return{r,g:s,b:o}}function J(n){let i=e=>{let t=Math.round(Math.max(0,Math.min(255,e))).toString(16);return t.length===1?"0"+t:t};return`#${i(n.r)}${i(n.g)}${i(n.b)}`.toUpperCase()}function qe(n,i){let e={r:0,g:0,b:0},t=n.r*(1-i)+e.r*i,r=n.g*(1-i)+e.g*i,s=n.b*(1-i)+e.b*i;return{r:Math.round(Math.max(0,Math.min(255,t))),g:Math.round(Math.max(0,Math.min(255,r))),b:Math.round(Math.max(0,Math.min(255,s)))}}function Ge(n,i){let e={r:255,g:255,b:255},t=n.r*(1-i)+e.r*i,r=n.g*(1-i)+e.g*i,s=n.b*(1-i)+e.b*i;return{r:Math.round(Math.max(0,Math.min(255,t))),g:Math.round(Math.max(0,Math.min(255,r))),b:Math.round(Math.max(0,Math.min(255,s)))}}function We(n,i){let e=it(n);return e.s=Math.max(0,Math.min(1,e.s+i)),rt(e)}function je(n,i){let e=it(n);return e.s=Math.max(0,Math.min(1,e.s-i)),rt(e)}var z=.04;function $e(n){return{web:{value:n,unit:"unitless"},ios:{value:n,unit:"unitless"},android:{value:n,unit:"unitless"}}}var vr={blend100:{name:"blend100",category:"blend",baseValue:z,familyBaseValue:z,description:"Subtle modification - gentle feedback, container hover",mathematicalRelationship:"base \xD7 1 = 0.04 \xD7 1 = 0.04",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z)},blend200:{name:"blend200",category:"blend",baseValue:z*2,familyBaseValue:z,description:"Standard modification - noticeable feedback, button hover",mathematicalRelationship:"base \xD7 2 = 0.04 \xD7 2 = 0.08",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*2)},blend300:{name:"blend300",category:"blend",baseValue:z*3,familyBaseValue:z,description:"Strong modification - clear feedback, pressed state",mathematicalRelationship:"base \xD7 3 = 0.04 \xD7 3 = 0.12",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*3)},blend400:{name:"blend400",category:"blend",baseValue:z*4,familyBaseValue:z,description:"Very strong modification - emphasized feedback",mathematicalRelationship:"base \xD7 4 = 0.04 \xD7 4 = 0.16",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*4)},blend500:{name:"blend500",category:"blend",baseValue:z*5,familyBaseValue:z,description:"Maximum modification - dramatic feedback",mathematicalRelationship:"base \xD7 5 = 0.04 \xD7 5 = 0.20",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*5)}},ts=Object.keys(vr);var Se={hoverDarker:.08,pressedDarker:.12,focusSaturate:.08,disabledDesaturate:.12,iconLighter:.08};function nt(n,i){try{let e=X(n),t=qe(e,i);return J(t)}catch(e){return n}}function Bt(n,i){try{let e=X(n),t=Ge(e,i);return J(t)}catch(e){return n}}function Lt(n,i){try{let e=X(n),t=We(e,i);return J(t)}catch(e){return n}}function Vt(n,i){try{let e=X(n),t=je(e,i);return J(t)}catch(e){return n}}function $t(){return{hoverColor:n=>nt(n,Se.hoverDarker),pressedColor:n=>nt(n,Se.pressedDarker),focusColor:n=>Lt(n,Se.focusSaturate),disabledColor:n=>Vt(n,Se.disabledDesaturate),iconColor:n=>Bt(n,Se.iconLighter),darkerBlend:nt,lighterBlend:Bt,saturate:Lt,desaturate:Vt}}function E(){return $t()}function st(n){let i=n.isFocused||n.isFilled,e;return n.hasError?e="color.error":n.isSuccess?e="color.success":n.isFocused?e="color.primary":e="color.text.muted",{isFloated:i,fontSize:i?"typography.labelMdFloat":"typography.labelMd",color:e,position:i?"above":"inside"}}function ot(n){let i=n.isLabelFloated;return{showErrorIcon:n.hasError&&i,showSuccessIcon:n.isSuccess&&i,showInfoIcon:!!n.showInfoIcon&&(n.isFocused||n.isFilled)}}function Pt(n){let i=n.value.length>0,e=!!n.errorMessage,t=!!n.isSuccess;return{isFocused:!1,isFilled:i,hasError:e,isSuccess:t,isLabelFloated:i,showInfoIcon:n.showInfoIcon}}function Mt(n){return P(V({},n),{isFocused:!0,isLabelFloated:!0})}function Dt(n){return P(V({},n),{isFocused:!1,isLabelFloated:n.isFilled})}function at(n,i){let e=i.length>0;return P(V({},n),{isFilled:e,isLabelFloated:n.isFocused||e})}function lt(n,i,e){return P(V({},n),{hasError:!!i,isSuccess:!!e})}var Nt=E();function Ht(n){let i={"arrow-right":'<line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline>',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline>',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline>',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>',"chevron-right":'<polyline points="9 18 15 12 9 6"></polyline>',"chevron-left":'<polyline points="15 18 9 12 15 6"></polyline>',"chevron-down":'<polyline points="6 9 12 15 18 9"></polyline>',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>',check:'<polyline points="20 6 9 17 4 12"></polyline>',"check-circle":'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',x:'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',"x-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',plus:'<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>',minus:'<line x1="5" y1="12" x2="19" y2="12"></line>',save:'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>',search:'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>',"refresh-cw":'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>',share:'<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line>',"share-2":'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',"more-horizontal":'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>',"more-vertical":'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>',info:'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>',"alert-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>',"eye-off":'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>',circle:'<circle cx="12" cy="12" r="10"></circle>',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>',smile:'<circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>',users:'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>',"user-check":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>',"user-x":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>',settings:'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>',clock:'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>',phone:'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',smartphone:'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',globe:'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>',"map-pin":'<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle>',briefcase:'<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>',"credit-card":'<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line>',"dollar-sign":'<line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>',"file-text":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>',award:'<circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline>',"trending-up":'<polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline>',wifi:'<path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>'};return i[n]||i.circle}function D(n){let{name:i,size:e,className:t="",style:r={},testID:s,color:o="inherit",opticalBalance:a=!1}=n,l=Ht(i),c={13:16,20:20,24:24,28:28,32:32,36:36,40:40,44:44,48:48},d=c[e];if(d===void 0)throw new Error(`Invalid icon size: ${e}. Valid sizes are: ${Object.keys(c).join(", ")}. Ensure you're using a valid IconBaseSize value (13, 20, 24, 28, 32, 36, 40, 44, 48).`);let m=`icon-base ${{13:"icon-base--size-050",20:"icon-base--size-075",24:"icon-base--size-100",28:"icon-base--size-125",32:"icon-base--size-200",36:"icon-base--size-400",40:"icon-base--size-500",44:"icon-base--size-600",48:"icon-base--size-700"}[e]} icon-base-${i} ${t}`.trim(),g;o==="inherit"?g="currentColor":a&&o.startsWith("#")?g=Nt.iconColor(o):o.startsWith("#")?g=o:g=`var(--${o})`;let f="var(--icon-stroke-width)",b=Object.entries(r).map(([_,S])=>`${_.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${S}`).join("; "),C=s?` data-testid="${s}"`:"",k=b?` style="${b}"`:"";return`<svg width="${d}" height="${d}" viewBox="0 0 24 24" fill="none" stroke="${g}" stroke-width="${f}" stroke-linecap="round" stroke-linejoin="round" class="${m}" aria-hidden="true"${C}${k}>${l}</svg>`}var O=class extends HTMLElement{static get observedAttributes(){return["name","size","color","test-id","optical-balance"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get name(){return this.getAttribute("name")||"circle"}set name(i){this.setAttribute("name",i)}get size(){let i=this.getAttribute("size");if(!i)throw new Error('Missing required "size" attribute on <icon-base>. Valid sizes are: 13, 18, 24, 28, 32, 36, 40, 44, 48.');let e=parseInt(i,10),t=[13,20,24,28,32,36,40,44,48];if(!t.includes(e))throw new Error(`Invalid icon size: ${e}. Valid sizes are: ${t.join(", ")}. Ensure you're using a valid IconBaseSize value.`);return e}set size(i){this.setAttribute("size",i.toString())}get color(){return this.getAttribute("color")||"inherit"}set color(i){this.setAttribute("color",i)}get testID(){return this.getAttribute("test-id")}set testID(i){i?this.setAttribute("test-id",i):this.removeAttribute("test-id")}get opticalBalance(){return this.getAttribute("optical-balance")==="true"}set opticalBalance(i){i?this.setAttribute("optical-balance","true"):this.removeAttribute("optical-balance")}render(){let i=this.name,e=this.size,t=this.color,r=this.testID,s=this.opticalBalance,o=Ht(i),l={13:"icon-base--size-050",20:"icon-base--size-075",24:"icon-base--size-100",28:"icon-base--size-125",32:"icon-base--size-200",36:"icon-base--size-400",40:"icon-base--size-500",44:"icon-base--size-600",48:"icon-base--size-700"}[e],c;t==="inherit"?c="currentColor":s&&t.startsWith("#")?c=Nt.iconColor(t):t.startsWith("#")?c=t:c=`var(--${t})`;let d="var(--icon-stroke-width)",h=r?` data-testid="${r}"`:"",u=`
|
|
1
|
+
"use strict";var DesignerPunk=(()=>{var Ue=Object.defineProperty,cr=Object.defineProperties,dr=Object.getOwnPropertyDescriptor,ur=Object.getOwnPropertyDescriptors,hr=Object.getOwnPropertyNames,It=Object.getOwnPropertySymbols;var Rt=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable;var zt=(n,i,e)=>i in n?Ue(n,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[i]=e,V=(n,i)=>{for(var e in i||(i={}))Rt.call(i,e)&&zt(n,e,i[e]);if(It)for(var e of It(i))pr.call(i,e)&&zt(n,e,i[e]);return n},P=(n,i)=>cr(n,ur(i));var gr=(n,i)=>{for(var e in i)Ue(n,e,{get:i[e],enumerable:!0})},mr=(n,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of hr(i))!Rt.call(n,r)&&r!==e&&Ue(n,r,{get:()=>i[r],enumerable:!(t=dr(i,r))||t.enumerable});return n};var br=n=>mr(Ue({},"__esModule",{value:!0}),n);var Kn={};gr(Kn,{Avatar:()=>xn,AvatarBase:()=>kn,AvatarBaseElement:()=>W,BadgeCount:()=>Sn,BadgeCountBase:()=>ne,BadgeCountNotification:()=>se,BadgeLabel:()=>Cn,BadgeLabelBase:()=>re,BadgeNotification:()=>En,ButtonCTA:()=>ze,ButtonIcon:()=>Re,ButtonVerticalListItem:()=>ee,ButtonVerticalListSet:()=>te,CheckboxBase:()=>wn,CheckboxLegal:()=>An,ChipBase:()=>In,ChipBaseElement:()=>le,ChipFilter:()=>zn,ChipFilterElement:()=>ce,ChipInput:()=>Rn,ChipInputElement:()=>de,Container:()=>vn,ContainerBase:()=>fn,ContainerBaseWeb:()=>q,ContainerCard:()=>Bn,ContainerCardBase:()=>Ln,ContainerCardBaseWeb:()=>j,Icon:()=>mn,IconBase:()=>bn,IconBaseElement:()=>O,InputCheckboxBaseElement:()=>oe,InputCheckboxLegalElement:()=>ae,InputRadioBaseElement:()=>K,InputRadioSetElement:()=>ue,InputTextBase:()=>J,InputTextEmail:()=>Ee,InputTextPassword:()=>we,InputTextPhoneNumber:()=>Ie,NavHeader:()=>qn,NavHeaderApp:()=>xe,NavHeaderAppElement:()=>Gn,NavHeaderBase:()=>ye,NavHeaderPage:()=>ke,NavHeaderPageElement:()=>Wn,NavSegmentedChoiceBase:()=>fe,NavTabBarBase:()=>_e,PaginationBase:()=>Nn,ProgressBar:()=>jn,ProgressBarBase:()=>Ce,ProgressConnector:()=>Mn,ProgressIndicatorConnectorBase:()=>pe,ProgressIndicatorLabelBase:()=>ge,ProgressIndicatorNodeBase:()=>he,ProgressLabel:()=>Dn,ProgressNode:()=>Pn,ProgressPaginationBase:()=>me,ProgressStepperBase:()=>be,ProgressStepperDetailed:()=>ve,RadioBase:()=>Vn,RadioSet:()=>$n,SegmentedChoice:()=>Fn,StepperBase:()=>Hn,StepperDetailed:()=>On,TabBar:()=>Un,TextInputField:()=>Tn,VerticalListButtonItem:()=>_n,VerticalListButtonSet:()=>yn});function it(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,e,t),o=r-s,a=0,l=0,c=(r+s)/2;if(o!==0)switch(l=c>.5?o/(2-r-s):o/(r+s),r){case i:a=((e-t)/o+(e<t?6:0))/6;break;case e:a=((t-i)/o+2)/6;break;case t:a=((i-e)/o+4)/6;break}return{h:Math.round(a*360),s:Number(l.toFixed(4)),l:Number(c.toFixed(4))}}function rt(n){let i=n.h/360,e=n.s,t=n.l,r,s,o;if(e===0)r=s=o=t;else{let a=(d,h,u)=>(u<0&&(u+=1),u>1&&(u-=1),u<.16666666666666666?d+(h-d)*6*u:u<.5?h:u<.6666666666666666?d+(h-d)*(.6666666666666666-u)*6:d),l=t<.5?t*(1+e):t+e-t*e,c=2*t-l;r=a(c,l,i+1/3),s=a(c,l,i),o=a(c,l,i-1/3)}return{r:Math.round(r*255),g:Math.round(s*255),b:Math.round(o*255)}}function Y(n){let i=n.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);if(i)return{r:parseInt(i[1]),g:parseInt(i[2]),b:parseInt(i[3])};let e=n.replace(/^#/,"");if(!/^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(e))throw new Error(`Invalid hex color: ${n}`);let t=e.length===3?e.split("").map(a=>a+a).join(""):e,r=parseInt(t.substring(0,2),16),s=parseInt(t.substring(2,4),16),o=parseInt(t.substring(4,6),16);return{r,g:s,b:o}}function X(n){let i=e=>{let t=Math.round(Math.max(0,Math.min(255,e))).toString(16);return t.length===1?"0"+t:t};return`#${i(n.r)}${i(n.g)}${i(n.b)}`.toUpperCase()}function qe(n,i){let e={r:0,g:0,b:0},t=n.r*(1-i)+e.r*i,r=n.g*(1-i)+e.g*i,s=n.b*(1-i)+e.b*i;return{r:Math.round(Math.max(0,Math.min(255,t))),g:Math.round(Math.max(0,Math.min(255,r))),b:Math.round(Math.max(0,Math.min(255,s)))}}function Ge(n,i){let e={r:255,g:255,b:255},t=n.r*(1-i)+e.r*i,r=n.g*(1-i)+e.g*i,s=n.b*(1-i)+e.b*i;return{r:Math.round(Math.max(0,Math.min(255,t))),g:Math.round(Math.max(0,Math.min(255,r))),b:Math.round(Math.max(0,Math.min(255,s)))}}function We(n,i){let e=it(n);return e.s=Math.max(0,Math.min(1,e.s+i)),rt(e)}function je(n,i){let e=it(n);return e.s=Math.max(0,Math.min(1,e.s-i)),rt(e)}var z=.04;function $e(n){return{web:{value:n,unit:"unitless"},ios:{value:n,unit:"unitless"},android:{value:n,unit:"unitless"}}}var vr={blend100:{name:"blend100",category:"blend",baseValue:z,familyBaseValue:z,description:"Subtle modification - gentle feedback, container hover",mathematicalRelationship:"base \xD7 1 = 0.04 \xD7 1 = 0.04",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z)},blend200:{name:"blend200",category:"blend",baseValue:z*2,familyBaseValue:z,description:"Standard modification - noticeable feedback, button hover",mathematicalRelationship:"base \xD7 2 = 0.04 \xD7 2 = 0.08",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*2)},blend300:{name:"blend300",category:"blend",baseValue:z*3,familyBaseValue:z,description:"Strong modification - clear feedback, pressed state",mathematicalRelationship:"base \xD7 3 = 0.04 \xD7 3 = 0.12",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*3)},blend400:{name:"blend400",category:"blend",baseValue:z*4,familyBaseValue:z,description:"Very strong modification - emphasized feedback",mathematicalRelationship:"base \xD7 4 = 0.04 \xD7 4 = 0.16",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*4)},blend500:{name:"blend500",category:"blend",baseValue:z*5,familyBaseValue:z,description:"Maximum modification - dramatic feedback",mathematicalRelationship:"base \xD7 5 = 0.04 \xD7 5 = 0.20",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:$e(z*5)}},ts=Object.keys(vr);var Se={hoverDarker:.08,pressedDarker:.12,focusSaturate:.08,disabledDesaturate:.12,iconLighter:.08};function nt(n,i){try{let e=Y(n),t=qe(e,i);return X(t)}catch(e){return n}}function Bt(n,i){try{let e=Y(n),t=Ge(e,i);return X(t)}catch(e){return n}}function Lt(n,i){try{let e=Y(n),t=We(e,i);return X(t)}catch(e){return n}}function Vt(n,i){try{let e=Y(n),t=je(e,i);return X(t)}catch(e){return n}}function $t(){return{hoverColor:n=>nt(n,Se.hoverDarker),pressedColor:n=>nt(n,Se.pressedDarker),focusColor:n=>Lt(n,Se.focusSaturate),disabledColor:n=>Vt(n,Se.disabledDesaturate),iconColor:n=>Bt(n,Se.iconLighter),darkerBlend:nt,lighterBlend:Bt,saturate:Lt,desaturate:Vt}}function E(){return $t()}function st(n){let i=n.isFocused||n.isFilled,e;return n.hasError?e="color.error":n.isSuccess?e="color.success":n.isFocused?e="color.primary":e="color.text.muted",{isFloated:i,fontSize:i?"typography.labelMdFloat":"typography.labelMd",color:e,position:i?"above":"inside"}}function ot(n){let i=n.isLabelFloated;return{showErrorIcon:n.hasError&&i,showSuccessIcon:n.isSuccess&&i,showInfoIcon:!!n.showInfoIcon&&(n.isFocused||n.isFilled)}}function Pt(n){let i=n.value.length>0,e=!!n.errorMessage,t=!!n.isSuccess;return{isFocused:!1,isFilled:i,hasError:e,isSuccess:t,isLabelFloated:i,showInfoIcon:n.showInfoIcon}}function Mt(n){return P(V({},n),{isFocused:!0,isLabelFloated:!0})}function Dt(n){return P(V({},n),{isFocused:!1,isLabelFloated:n.isFilled})}function at(n,i){let e=i.length>0;return P(V({},n),{isFilled:e,isLabelFloated:n.isFocused||e})}function lt(n,i,e){return P(V({},n),{hasError:!!i,isSuccess:!!e})}var Nt=E();function Ht(n){let i={"arrow-right":'<line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline>',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline>',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline>',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>',"chevron-right":'<polyline points="9 18 15 12 9 6"></polyline>',"chevron-left":'<polyline points="15 18 9 12 15 6"></polyline>',"chevron-down":'<polyline points="6 9 12 15 18 9"></polyline>',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>',check:'<polyline points="20 6 9 17 4 12"></polyline>',"check-circle":'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',x:'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',"x-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',plus:'<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>',minus:'<line x1="5" y1="12" x2="19" y2="12"></line>',save:'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>',search:'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>',"refresh-cw":'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>',share:'<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line>',"share-2":'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',"more-horizontal":'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>',"more-vertical":'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>',info:'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>',"alert-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>',"eye-off":'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>',circle:'<circle cx="12" cy="12" r="10"></circle>',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>',smile:'<circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>',users:'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>',"user-check":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>',"user-x":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>',settings:'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>',clock:'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>',phone:'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',smartphone:'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',globe:'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>',"map-pin":'<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle>',briefcase:'<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>',"credit-card":'<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line>',"dollar-sign":'<line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>',"file-text":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>',award:'<circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline>',"trending-up":'<polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline>',wifi:'<path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>'};return i[n]||i.circle}function D(n){let{name:i,size:e,className:t="",style:r={},testID:s,color:o="inherit",opticalBalance:a=!1}=n,l=Ht(i),c={13:16,20:20,24:24,28:28,32:32,36:36,40:40,44:44,48:48},d=c[e];if(d===void 0)throw new Error(`Invalid icon size: ${e}. Valid sizes are: ${Object.keys(c).join(", ")}. Ensure you're using a valid IconBaseSize value (13, 20, 24, 28, 32, 36, 40, 44, 48).`);let m=`icon-base ${{13:"icon-base--size-050",20:"icon-base--size-075",24:"icon-base--size-100",28:"icon-base--size-125",32:"icon-base--size-200",36:"icon-base--size-400",40:"icon-base--size-500",44:"icon-base--size-600",48:"icon-base--size-700"}[e]} icon-base-${i} ${t}`.trim(),g;o==="inherit"?g="currentColor":a&&o.startsWith("#")?g=Nt.iconColor(o):o.startsWith("#")?g=o:g=`var(--${o})`;let f="var(--icon-stroke-width)",b=Object.entries(r).map(([_,S])=>`${_.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${S}`).join("; "),x=s?` data-testid="${s}"`:"",C=b?` style="${b}"`:"";return`<svg width="${d}" height="${d}" viewBox="0 0 24 24" fill="none" stroke="${g}" stroke-width="${f}" stroke-linecap="round" stroke-linejoin="round" class="${m}" aria-hidden="true"${x}${C}>${l}</svg>`}var O=class extends HTMLElement{static get observedAttributes(){return["name","size","color","test-id","optical-balance"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get name(){return this.getAttribute("name")||"circle"}set name(i){this.setAttribute("name",i)}get size(){let i=this.getAttribute("size");if(!i)throw new Error('Missing required "size" attribute on <icon-base>. Valid sizes are: 13, 18, 24, 28, 32, 36, 40, 44, 48.');let e=parseInt(i,10),t=[13,20,24,28,32,36,40,44,48];if(!t.includes(e))throw new Error(`Invalid icon size: ${e}. Valid sizes are: ${t.join(", ")}. Ensure you're using a valid IconBaseSize value.`);return e}set size(i){this.setAttribute("size",i.toString())}get color(){return this.getAttribute("color")||"inherit"}set color(i){this.setAttribute("color",i)}get testID(){return this.getAttribute("test-id")}set testID(i){i?this.setAttribute("test-id",i):this.removeAttribute("test-id")}get opticalBalance(){return this.getAttribute("optical-balance")==="true"}set opticalBalance(i){i?this.setAttribute("optical-balance","true"):this.removeAttribute("optical-balance")}render(){let i=this.name,e=this.size,t=this.color,r=this.testID,s=this.opticalBalance,o=Ht(i),l={13:"icon-base--size-050",20:"icon-base--size-075",24:"icon-base--size-100",28:"icon-base--size-125",32:"icon-base--size-200",36:"icon-base--size-400",40:"icon-base--size-500",44:"icon-base--size-600",48:"icon-base--size-700"}[e],c;t==="inherit"?c="currentColor":s&&t.startsWith("#")?c=Nt.iconColor(t):t.startsWith("#")?c=t:c=`var(--${t})`;let d="var(--icon-stroke-width)",h=r?` data-testid="${r}"`:"",u=`
|
|
2
2
|
<style>
|
|
3
3
|
.icon-base {
|
|
4
4
|
display: inline-block;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
>
|
|
42
42
|
${o}
|
|
43
43
|
</svg>
|
|
44
|
-
`}};customElements.get("icon-base")||customElements.define("icon-base",O);var
|
|
44
|
+
`}};customElements.get("icon-base")||customElements.define("icon-base",O);var A={size050:13,size075:20,size100:24,size125:32,size150:28,size200:32,size300:32,size400:36,size500:40,size600:44,size700:48},Ot=A;var Ft=":host{display:block;width:100%}.input-text-base{width:100%}.input-wrapper{position:relative;width:100%;min-height:var(--tap-area-comfortable)}.input-element{width:100%;min-height:var(--tap-area-comfortable);padding-top:var(--space-inset-200);padding-bottom:var(--space-inset-none);padding-left:var(--space-inset-100);padding-right:calc(var(--space-inset-100)+var(--icon-size-100)+var(--space-inset-100));font-family:var(--typography-input-font-family);font-size:var(--typography-input-font-size);line-height:var(--typography-input-line-height);font-weight:var(--typography-input-font-weight);letter-spacing:var(--typography-input-letter-spacing);color:var(--color-text-default);background:var(--color-structure-canvas);border:var(--border-default) solid var(--color-structure-border);border-radius:var(--radius-150);outline:none;box-sizing:border-box;transition:border-color var(--motion-float-label-duration) var(--motion-float-label-easing)}.input-element:focus{border-color:var(--_itb-focus-color,var(--color-action-primary))}.input-element:focus-visible{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset);transition:outline-color var(--motion-focus-transition-duration) var(--motion-focus-transition-easing)}.input-wrapper.error .input-element:focus-visible{outline-color:var(--accessibility-focus-color)}.input-wrapper.success .input-element:focus-visible{outline-color:var(--accessibility-focus-color)}.input-wrapper.error .input-element{border-color:var(--color-feedback-error-text)}.input-wrapper.success .input-element{border-color:var(--color-feedback-success-text)}.input-label{position:absolute;left:var(--space-inset-100);top:50%;transform:translateY(-50%);font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);line-height:var(--typography-label-md-line-height);font-weight:var(--typography-label-md-font-weight);letter-spacing:var(--typography-label-md-letter-spacing);color:var(--color-text-muted);pointer-events:none;transition:transform var(--motion-float-label-duration) var(--motion-float-label-easing),font-size var(--motion-float-label-duration) var(--motion-float-label-easing),color var(--motion-float-label-duration) var(--motion-float-label-easing)}.input-label.floated{transform:translateY(calc(-100% - var(--space-grouped-tight)));font-size:var(--typography-label-md-float-font-size);line-height:var(--typography-label-md-float-line-height)}.input-wrapper.focused .input-label.floated{color:var(--_itb-focus-color,var(--color-action-primary))}.input-wrapper.error .input-label{color:var(--color-feedback-error-text)}.input-wrapper.success .input-label{color:var(--color-feedback-success-text)}.helper-text{margin:var(--space-grouped-minimal) 0 0 0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-text-muted)}.error-message{margin:var(--space-grouped-minimal) 0 0 0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-feedback-error-text)}.trailing-icon-container{position:absolute;right:var(--space-inset-100);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transition:opacity var(--motion-float-label-duration) var(--motion-float-label-easing);transition-delay:var(--motion-float-label-duration)}.input-wrapper.focused .trailing-icon-container{opacity:1;transition-delay:var(--motion-float-label-duration)}.input-wrapper.filled .trailing-icon-container{opacity:1;transition-delay:var(--motion-float-label-duration)}.input-wrapper:not(.focused):not(.filled) .trailing-icon-container{opacity:0;transition-delay:0ms}.trailing-icon{display:block}@media (prefers-reduced-motion:reduce){.input-element,.input-element:focus-visible,.input-label,.trailing-icon-container{transition:none}}";var J=class extends HTMLElement{constructor(){super();this.container=null;this.inputElement=null;this.labelElement=null;this.helperTextElement=null;this.errorMessageElement=null;this._focusColor="";this.onFocus=()=>{this.state=Mt(this.state),this.updateLabelPosition(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))};this.onBlur=()=>{this.state=Dt(this.state),this.updateLabelPosition(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))};this.onInput=e=>{let r=e.target.value;this.state=at(this.state,r),this.updateLabelPosition(),this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0}))};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E(),this.state=Pt(this.getPropsFromAttributes())}get shadowRoot(){return this._shadowRoot}static get observedAttributes(){return["id","label","value","type","placeholder","helper-text","error-message","is-success","show-info-icon","read-only","required","max-length","autocomplete"]}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._calculateBlendColorsWithRetry(),this.render(),this.attachEventListeners()},{once:!0}):(this._calculateBlendColorsWithRetry(),this.render(),this.attachEventListeners())}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this.render()}catch(t){console.warn("InputTextBase: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-action-primary").trim();if(!t)throw new Error("InputTextBase: Required token --color-action-primary is missing from CSS custom properties");this._focusColor=this._blendUtils.focusColor(t)}disconnectedCallback(){this.detachEventListeners()}attributeChangedCallback(e,t,r){if(t!==r){if(e==="value"){this.state=at(this.state,r||""),this.updateLabelPosition(),this.inputElement&&this.inputElement.value!==(r||"")&&(this.inputElement.value=r||"");return}else e==="error-message"?(this.state=lt(this.state,r||void 0,this.state.isSuccess),this.updateLabelPosition()):e==="is-success"&&(this.state=lt(this.state,this.state.hasError&&this.getAttribute("error-message")||void 0,r==="true"),this.updateLabelPosition());this.isConnected&&this.render()}}getPropsFromAttributes(){return{id:this.getAttribute("id")||"",label:this.getAttribute("label")||"",value:this.getAttribute("value")||"",onChange:()=>{},type:this.getAttribute("type")||"text",placeholder:this.getAttribute("placeholder")||void 0,helperText:this.getAttribute("helper-text")||void 0,errorMessage:this.getAttribute("error-message")||void 0,isSuccess:this.getAttribute("is-success")==="true",showInfoIcon:this.getAttribute("show-info-icon")==="true",readOnly:this.hasAttribute("read-only"),required:this.hasAttribute("required"),maxLength:this.hasAttribute("max-length")?parseInt(this.getAttribute("max-length"),10):void 0,autocomplete:this.getAttribute("autocomplete")||void 0}}render(){let e=this.getPropsFromAttributes(),t=st(this.state),r=ot(this.state);this.container||(this.container=document.createElement("div"),this.container.className="input-text-base");let s=Ot.size100,o="";r.showErrorIcon?o=D({name:"x",size:s,color:"color-error",className:"trailing-icon error-icon"}):r.showSuccessIcon?o=D({name:"check",size:s,color:"color-feedback-success-text",className:"trailing-icon success-icon"}):r.showInfoIcon&&(o=D({name:"info",size:s,color:"color-text-subtle",className:"trailing-icon info-icon"}));let a=`
|
|
45
45
|
--_itb-focus-color: ${this._focusColor};
|
|
46
46
|
`;this.container.innerHTML=`
|
|
47
47
|
<div class="input-wrapper ${this.state.hasError?"error":""} ${this.state.isSuccess?"success":""} ${this.state.isFocused?"focused":""} ${this.state.isFilled?"filled":""}" style="${a}">
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
${e.errorMessage}
|
|
77
77
|
</p>
|
|
78
78
|
`:""}
|
|
79
|
-
`;let l=document.createElement("style");l.textContent=Ft,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(l),this._shadowRoot.appendChild(this.container),this.inputElement=this._shadowRoot.querySelector(".input-element"),this.labelElement=this._shadowRoot.querySelector(".input-label"),this.helperTextElement=this._shadowRoot.querySelector(".helper-text"),this.errorMessageElement=this._shadowRoot.querySelector(".error-message")}attachEventListeners(){this.inputElement&&(this.inputElement.addEventListener("focus",this.onFocus),this.inputElement.addEventListener("blur",this.onBlur),this.inputElement.addEventListener("input",this.onInput))}detachEventListeners(){this.inputElement&&(this.inputElement.removeEventListener("focus",this.onFocus),this.inputElement.removeEventListener("blur",this.onBlur),this.inputElement.removeEventListener("input",this.onInput))}updateLabelPosition(){if(!this.labelElement||!this.container)return;st(this.state).isFloated?this.labelElement.classList.add("floated"):this.labelElement.classList.remove("floated");let t=this.container.querySelector(".input-wrapper");t&&(t.classList.toggle("focused",this.state.isFocused),t.classList.toggle("filled",this.state.isFilled),t.classList.toggle("error",this.state.hasError),t.classList.toggle("success",this.state.isSuccess)),this.updateIconVisibility()}updateIconVisibility(){if(!this.container)return;let e=ot(this.state),t=this.container.querySelector(".trailing-icon-container");if(!t)return;e.showErrorIcon||e.showSuccessIcon||e.showInfoIcon?t.style.opacity="1":t.style.opacity="0"}};customElements.get("input-text-base")||customElements.define("input-text-base",
|
|
79
|
+
`;let l=document.createElement("style");l.textContent=Ft,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(l),this._shadowRoot.appendChild(this.container),this.inputElement=this._shadowRoot.querySelector(".input-element"),this.labelElement=this._shadowRoot.querySelector(".input-label"),this.helperTextElement=this._shadowRoot.querySelector(".helper-text"),this.errorMessageElement=this._shadowRoot.querySelector(".error-message")}attachEventListeners(){this.inputElement&&(this.inputElement.addEventListener("focus",this.onFocus),this.inputElement.addEventListener("blur",this.onBlur),this.inputElement.addEventListener("input",this.onInput))}detachEventListeners(){this.inputElement&&(this.inputElement.removeEventListener("focus",this.onFocus),this.inputElement.removeEventListener("blur",this.onBlur),this.inputElement.removeEventListener("input",this.onInput))}updateLabelPosition(){if(!this.labelElement||!this.container)return;st(this.state).isFloated?this.labelElement.classList.add("floated"):this.labelElement.classList.remove("floated");let t=this.container.querySelector(".input-wrapper");t&&(t.classList.toggle("focused",this.state.isFocused),t.classList.toggle("filled",this.state.isFilled),t.classList.toggle("error",this.state.hasError),t.classList.toggle("success",this.state.isSuccess)),this.updateIconVisibility()}updateIconVisibility(){if(!this.container)return;let e=ot(this.state),t=this.container.querySelector(".trailing-icon-container");if(!t)return;e.showErrorIcon||e.showSuccessIcon||e.showInfoIcon?t.style.opacity="1":t.style.opacity="0"}};customElements.get("input-text-base")||customElements.define("input-text-base",J);var Ze="Please enter a valid email address",fr=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function _r(n){if(!n||n.trim()==="")return!0;let i=n.trim();if(!fr.test(i))return!1;let e=i.split("@")[0];return!(e.startsWith(".")||e.endsWith(".")||e.includes(".."))}function ct(n,i,e){return!n||n.trim()===""?{isValid:!0}:(i||_r)(n)?{isValid:!0}:{isValid:!1,errorMessage:e||Ze}}var Ee=class extends HTMLElement{constructor(){super();this._baseInput=null;this._hasBeenValidated=!1;this._isEmailValid=!0;this.onFocus=e=>{this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))};this.onBlur=e=>{let t=this.getAttribute("value")||"",r=this.getAttribute("invalid-email-message")||Ze,s=ct(t);if(this._hasBeenValidated=!0,this._isEmailValid=s.isValid,this._baseInput){let o=this.getAttribute("error-message")||"";!o&&!this._isEmailValid?this._baseInput.setAttribute("error-message",r):!o&&this._isEmailValid&&this._baseInput.removeAttribute("error-message")}this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("validate",{detail:{isValid:this._isEmailValid,errorMessage:s.errorMessage},bubbles:!0,composed:!0}))};this.onChange=e=>{var s;let r=((s=e.detail)==null?void 0:s.value)||"";this.setAttribute("value",r),this._hasBeenValidated=!1,this._isEmailValid=!0,this._baseInput&&this._baseInput.setAttribute("value",r),this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0}))};this._shadowRoot=this.attachShadow({mode:"open"})}get shadowRoot(){return this._shadowRoot}static get observedAttributes(){return["id","label","value","placeholder","helper-text","error-message","is-success","show-info-icon","read-only","required","max-length","invalid-email-message"]}connectedCallback(){this.render(),this.attachEventListeners()}disconnectedCallback(){this.detachEventListeners()}attributeChangedCallback(e,t,r){if(t!==r){if(e==="value"){this._hasBeenValidated=!1,this._isEmailValid=!0;return}this.isConnected&&this.render()}}render(){let e=this.getAttribute("id")||"",t=this.getAttribute("label")||"",r=this.getAttribute("value")||"",s=this.getAttribute("placeholder")||"",o=this.getAttribute("helper-text")||"",a=this.getAttribute("error-message")||"",l=this.getAttribute("is-success")==="true",c=this.getAttribute("show-info-icon")==="true",d=this.hasAttribute("read-only"),h=this.hasAttribute("required"),u=this.getAttribute("max-length"),m=this.getAttribute("invalid-email-message")||Ze,g=a;!g&&this._hasBeenValidated&&!this._isEmailValid&&(g=m);let f=`
|
|
80
80
|
<input-text-base
|
|
81
81
|
id="${e}"
|
|
82
82
|
label="${t}"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
display: block;
|
|
98
98
|
width: 100%;
|
|
99
99
|
}
|
|
100
|
-
`,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(b);let
|
|
100
|
+
`,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(b);let x=document.createElement("div");x.innerHTML=f,this._shadowRoot.appendChild(x),this._baseInput=this._shadowRoot.querySelector("input-text-base")}attachEventListeners(){this._shadowRoot.addEventListener("blur",this.onBlur,!0),this._shadowRoot.addEventListener("change",this.onChange,!0),this._shadowRoot.addEventListener("focus",this.onFocus,!0)}detachEventListeners(){this._shadowRoot.removeEventListener("blur",this.onBlur,!0),this._shadowRoot.removeEventListener("change",this.onChange,!0),this._shadowRoot.removeEventListener("focus",this.onFocus,!0)}validate(){let e=this.getAttribute("value")||"",t=ct(e);return this._hasBeenValidated=!0,this._isEmailValid=t.isValid,this.render(),this.attachEventListeners(),t}get isValid(){return this._isEmailValid}get value(){return this.getAttribute("value")||""}set value(e){this.setAttribute("value",e)}};customElements.get("input-text-email")||customElements.define("input-text-email",Ee);var Pe="Password does not meet requirements",Ye={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,specialChar:/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/};function Ut(){return{meetsMinLength:!0,meetsMaxLength:!0,hasUppercase:!0,hasLowercase:!0,hasNumber:!0,hasSpecialChar:!0}}function yr(n,i){let{minLength:e,maxLength:t,requireUppercase:r=!1,requireLowercase:s=!1,requireNumber:o=!1,requireSpecialChar:a=!1}=i;return{meetsMinLength:e===void 0||n.length>=e,meetsMaxLength:t===void 0||n.length<=t,hasUppercase:!r||Ye.uppercase.test(n),hasLowercase:!s||Ye.lowercase.test(n),hasNumber:!o||Ye.number.test(n),hasSpecialChar:!a||Ye.specialChar.test(n)}}function xr(n){return n.meetsMinLength&&n.meetsMaxLength&&n.hasUppercase&&n.hasLowercase&&n.hasNumber&&n.hasSpecialChar}function dt(n,i={},e,t){if(!n||n.length===0)return{isValid:!0,details:Ut()};if(e){let o=e(n);return{isValid:o,errorMessage:o?void 0:t||Pe,details:Ut()}}let r=yr(n,i),s=xr(r);return{isValid:s,errorMessage:s?void 0:t||Pe,details:r}}var we=class extends HTMLElement{constructor(){super();this._baseInput=null;this._isPasswordVisible=!1;this._hasBeenValidated=!1;this._isPasswordValid=!0;this.onFocus=e=>{this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))};this.onBlur=e=>{let t=this.getAttribute("value")||"",r=this.getRequirements(),s=this.getAttribute("invalid-password-message")||Pe,o=dt(t,r);if(this._hasBeenValidated=!0,this._isPasswordValid=o.isValid,this._baseInput){let a=this.getAttribute("error-message")||"";!a&&!this._isPasswordValid?this._baseInput.setAttribute("error-message",s):!a&&this._isPasswordValid&&this._baseInput.removeAttribute("error-message")}this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("validate",{detail:{isValid:this._isPasswordValid,errorMessage:o.errorMessage,details:o.details},bubbles:!0,composed:!0}))};this.onChange=e=>{var s;let r=((s=e.detail)==null?void 0:s.value)||"";this.setAttribute("value",r),this._hasBeenValidated=!1,this._isPasswordValid=!0,this._baseInput&&this._baseInput.setAttribute("value",r),this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0}))};this.onToggleClick=e=>{var r,s;e.preventDefault(),e.stopPropagation(),this._isPasswordVisible=!this._isPasswordVisible,this.render(),this.attachEventListeners(),this.dispatchEvent(new CustomEvent("toggle-visibility",{detail:{visible:this._isPasswordVisible},bubbles:!0,composed:!0}));let t=(s=(r=this._baseInput)==null?void 0:r.shadowRoot)==null?void 0:s.querySelector("input");t&&t.focus()};this._shadowRoot=this.attachShadow({mode:"open"})}get shadowRoot(){return this._shadowRoot}static get observedAttributes(){return["id","label","value","placeholder","helper-text","error-message","is-success","show-info-icon","read-only","required","max-length","show-password","show-toggle","is-new-password","min-length","require-uppercase","require-lowercase","require-number","require-special-char","invalid-password-message"]}connectedCallback(){this.render(),this.attachEventListeners()}disconnectedCallback(){this.detachEventListeners()}attributeChangedCallback(e,t,r){if(t!==r){if(e==="show-password"&&(this._isPasswordVisible=r==="true"),e==="value"){this._hasBeenValidated=!1,this._isPasswordValid=!0;return}this.isConnected&&this.render()}}getRequirements(){return{minLength:this.getAttribute("min-length")?parseInt(this.getAttribute("min-length"),10):void 0,maxLength:this.getAttribute("max-length")?parseInt(this.getAttribute("max-length"),10):void 0,requireUppercase:this.hasAttribute("require-uppercase"),requireLowercase:this.hasAttribute("require-lowercase"),requireNumber:this.hasAttribute("require-number"),requireSpecialChar:this.hasAttribute("require-special-char")}}render(){let e=this.getAttribute("id")||"",t=this.getAttribute("label")||"",r=this.getAttribute("value")||"",s=this.getAttribute("placeholder")||"",o=this.getAttribute("helper-text")||"",a=this.getAttribute("error-message")||"",l=this.getAttribute("is-success")==="true",c=this.getAttribute("show-info-icon")==="true",d=this.hasAttribute("required"),h=this.getAttribute("max-length"),u=this.getAttribute("show-toggle")!=="false",m=this.hasAttribute("is-new-password"),g=this.getAttribute("invalid-password-message")||Pe,f=this._isPasswordVisible?"text":"password",b=m?"new-password":"current-password",x=a;!x&&this._hasBeenValidated&&!this._isPasswordValid&&(x=g);let C=u?`
|
|
101
101
|
<button
|
|
102
102
|
type="button"
|
|
103
103
|
class="toggle-button"
|
|
@@ -106,26 +106,25 @@
|
|
|
106
106
|
>
|
|
107
107
|
${this._isPasswordVisible?this.getHideIcon():this.getShowIcon()}
|
|
108
108
|
</button>
|
|
109
|
-
`:"",
|
|
109
|
+
`:"",_=`
|
|
110
110
|
<div class="password-container">
|
|
111
111
|
<input-text-base
|
|
112
112
|
id="${e}"
|
|
113
113
|
label="${t}"
|
|
114
114
|
value="${r}"
|
|
115
|
-
type="${
|
|
116
|
-
autocomplete="${
|
|
115
|
+
type="${f}"
|
|
116
|
+
autocomplete="${b}"
|
|
117
117
|
${s?`placeholder="${s}"`:""}
|
|
118
118
|
${o?`helper-text="${o}"`:""}
|
|
119
|
-
${
|
|
119
|
+
${x?`error-message="${x}"`:""}
|
|
120
120
|
${l?'is-success="true"':""}
|
|
121
121
|
${c?'show-info-icon="true"':""}
|
|
122
|
-
${d?"
|
|
123
|
-
${h
|
|
124
|
-
${u?`max-length="${u}"`:""}
|
|
122
|
+
${d?"required":""}
|
|
123
|
+
${h?`max-length="${h}"`:""}
|
|
125
124
|
></input-text-base>
|
|
126
|
-
${
|
|
125
|
+
${C}
|
|
127
126
|
</div>
|
|
128
|
-
`,
|
|
127
|
+
`,S=document.createElement("style");S.textContent=`
|
|
129
128
|
:host {
|
|
130
129
|
display: block;
|
|
131
130
|
width: 100%;
|
|
@@ -176,7 +175,7 @@
|
|
|
176
175
|
width: var(--icon-size-100);
|
|
177
176
|
height: var(--icon-size-100);
|
|
178
177
|
}
|
|
179
|
-
`,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(
|
|
178
|
+
`,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(S);let k=document.createElement("div");k.innerHTML=_,this._shadowRoot.appendChild(k),this._baseInput=this._shadowRoot.querySelector("input-text-base")}getShowIcon(){return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
180
179
|
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
|
|
181
180
|
<circle cx="12" cy="12" r="3"></circle>
|
|
182
181
|
</svg>`}getHideIcon(){return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -198,34 +197,32 @@
|
|
|
198
197
|
${d?"required":""}
|
|
199
198
|
${h?`max-length="${h}"`:""}
|
|
200
199
|
></input-text-base>
|
|
201
|
-
`,
|
|
200
|
+
`,x=document.createElement("style");x.textContent=`
|
|
202
201
|
:host {
|
|
203
202
|
display: block;
|
|
204
203
|
width: 100%;
|
|
205
204
|
}
|
|
206
|
-
`,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(
|
|
205
|
+
`,this._shadowRoot.innerHTML="",this._shadowRoot.appendChild(x);let C=document.createElement("div");C.innerHTML=b,this._shadowRoot.appendChild(C),this._baseInput=this._shadowRoot.querySelector("input-text-base")}attachEventListeners(){this._shadowRoot.addEventListener("blur",this.onBlur,!0),this._shadowRoot.addEventListener("change",this.onChange,!0),this._shadowRoot.addEventListener("focus",this.onFocus,!0)}detachEventListeners(){this._shadowRoot.removeEventListener("blur",this.onBlur,!0),this._shadowRoot.removeEventListener("change",this.onChange,!0),this._shadowRoot.removeEventListener("focus",this.onFocus,!0)}validate(){let e=ht(this._rawDigits,this._currentCountryCode);return this._hasBeenValidated=!0,this._isPhoneValid=e.isValid,this.render(),this.attachEventListeners(),P(V({},e),{formattedNumber:this._formattedValue,rawDigits:this._rawDigits})}get isValid(){return this._isPhoneValid}get value(){return this._formattedValue}set value(e){this.setAttribute("value",e)}get rawDigits(){return this._rawDigits}get countryCode(){return this._currentCountryCode}set countryCode(e){this.setAttribute("country-code",e)}};customElements.get("input-text-phone-number")||customElements.define("input-text-phone-number",Ie);var Wt=".button-cta{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-grouped-normal);font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing);text-align:center;text-decoration:none;cursor:pointer;user-select:none;transition:background-color var(--motion-button-press-duration) var(--motion-button-press-easing),border-color var(--motion-button-press-duration) var(--motion-button-press-easing),color var(--motion-button-press-duration) var(--motion-button-press-easing),opacity var(--motion-button-press-duration) var(--motion-button-press-easing),box-shadow var(--motion-button-press-duration) var(--motion-button-press-easing);border:none;outline:none;background:none;flex-shrink:0}.button-cta--small{min-height:var(--tap-area-minimum);min-width:56px;padding:var(--space-inset-100) var(--space-inset-200);border-radius:var(--radius-100);gap:var(--space-grouped-tight);font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing)}.button-cta--medium{min-height:var(--tap-area-recommended);min-width:72px;padding:var(--space-inset-150) var(--space-inset-300);border-radius:var(--radius-150);gap:var(--space-grouped-normal);font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing)}.button-cta--large{min-height:var(--tap-area-comfortable);min-width:80px;padding:var(--space-inset-150) var(--space-inset-400);border-radius:var(--radius-200);gap:var(--space-grouped-normal);font-family:var(--typography-label-lg-font-family);font-size:var(--typography-label-lg-font-size);font-weight:var(--typography-label-lg-font-weight);line-height:var(--typography-label-lg-line-height);letter-spacing:var(--typography-label-lg-letter-spacing)}.button-cta--primary{background-color:var(--color-action-primary);color:var(--color-contrast-on-action);border:none}.button-cta--secondary{background-color:var(--color-structure-canvas);color:var(--color-action-primary);border:var(--border-default) solid var(--color-action-primary)}.button-cta--tertiary{background-color:transparent;color:var(--color-action-primary);border:none}.button-cta__icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:inherit}.button-cta--secondary .button-cta__icon,.button-cta--tertiary .button-cta__icon{color:var(--_cta-icon-optical)}.button-cta__label{display:inline-block;white-space:normal;word-wrap:break-word;overflow-wrap:break-word}.button-cta__label--no-wrap{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.button-cta--primary:hover{background-color:var(--_cta-hover-bg)}.button-cta--primary:active{background-color:var(--_cta-pressed-bg)}.button-cta:focus-visible{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset);box-shadow:var(--shadow-hover)}.button-cta:focus:not(:focus-visible){outline:none}.button-cta--full-width{width:100%}@media print{.button-cta{background-color:transparent !important;color:var(--color-print-default) !important;border:var(--border-default) solid var(--color-print-default) !important;box-shadow:none !important}.button-cta__icon{display:none}}@media (prefers-contrast:high){.button-cta{border:var(--border-emphasis) solid currentColor}.button-cta:focus-visible{outline-width:var(--border-heavy)}}@media (prefers-reduced-motion:reduce){.button-cta{transition:none}}";function jt(n){let i;switch(n){case"small":case"medium":if(i=A.size100,!i)throw new Error("ButtonCTA: iconBaseSizes.size100 token is missing");break;case"large":if(i=A.size125,!i)throw new Error("ButtonCTA: iconBaseSizes.size125 token is missing");break;default:throw new Error(`ButtonCTA: Invalid button size "${n}"`)}return i}var ze=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._button=null;this._labelEl=null;this._iconEl=null;this._iconContainer=null;this._hoverColor="";this._pressedColor="";this._iconColor="";this._iconOpticalBalanceColor="";this._handleClick=e=>{this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0,detail:{originalEvent:e}}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0,detail:{originalEvent:e}})))};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return["label","size","variant","icon","no-wrap","test-id"]}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._calculateBlendColorsWithRetry(),this.render()},{once:!0}):(this._calculateBlendColorsWithRetry(),this.render()),this._attachEventListeners()}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this.render()}catch(t){console.warn("ButtonCTA: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let e=getComputedStyle(document.documentElement),t=e.getPropertyValue("--color-action-primary").trim(),r=e.getPropertyValue("--color-contrast-on-action").trim();if(!t)throw new Error("ButtonCTA: Required token --color-action-primary is missing from CSS custom properties");if(!r)throw new Error("ButtonCTA: Required token --color-contrast-on-action is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t),this._iconColor=this._blendUtils.iconColor(r),this._iconOpticalBalanceColor=this._blendUtils.iconColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._domCreated&&this._updateDOM()}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get size(){let e=this.getAttribute("size");return e==="small"||e==="medium"||e==="large"?e:"medium"}set size(e){this.setAttribute("size",e)}get buttonVariant(){let e=this.getAttribute("variant");return e==="primary"||e==="secondary"||e==="tertiary"?e:"primary"}set buttonVariant(e){this.setAttribute("variant",e)}get icon(){return this.getAttribute("icon")}set icon(e){e?this.setAttribute("icon",e):this.removeAttribute("icon")}get noWrap(){return this.getAttribute("no-wrap")==="true"}set noWrap(e){this.setAttribute("no-wrap",e.toString())}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var m;let e=this.label,t=this.size,r=this.buttonVariant,s=this.icon,o=this.noWrap,a=this.testID,l=["button-cta",`button-cta--${t}`,`button-cta--${r}`].join(" "),c=jt(t),d=o?"button-cta__label--no-wrap":"button-cta__label",h=a?` data-testid="${a}"`:"",u=`
|
|
207
206
|
--_cta-hover-bg: ${this._hoverColor};
|
|
208
207
|
--_cta-pressed-bg: ${this._pressedColor};
|
|
209
|
-
--_cta-disabled-bg: ${this._disabledColor};
|
|
210
208
|
--_cta-icon-color: ${this._iconColor};
|
|
211
209
|
--_cta-icon-optical: ${this._iconOpticalBalanceColor};
|
|
212
210
|
`;this._shadowRoot.innerHTML=`
|
|
213
211
|
<style>${Wt}</style>
|
|
214
|
-
<button
|
|
215
|
-
class="${
|
|
212
|
+
<button
|
|
213
|
+
class="${l}"
|
|
216
214
|
type="button"
|
|
217
215
|
role="button"
|
|
218
|
-
${
|
|
219
|
-
${u}
|
|
216
|
+
${h}
|
|
220
217
|
aria-label="${e}"
|
|
221
|
-
style="${
|
|
218
|
+
style="${u}"
|
|
222
219
|
>
|
|
223
220
|
<span class="button-cta__icon" aria-hidden="true" style="${s?"":"display: none;"}">
|
|
224
|
-
<icon-base name="${s||""}" size="${
|
|
221
|
+
<icon-base name="${s||""}" size="${c}" color="inherit"></icon-base>
|
|
225
222
|
</span>
|
|
226
|
-
<span class="${
|
|
223
|
+
<span class="${d}">${e}</span>
|
|
227
224
|
</button>
|
|
228
|
-
`,this._button=this._shadowRoot.querySelector("button"),this._labelEl=this._shadowRoot.querySelector(".button-cta__label, .button-cta__label--no-wrap"),this._iconContainer=this._shadowRoot.querySelector(".button-cta__icon"),this._iconEl=((
|
|
225
|
+
`,this._button=this._shadowRoot.querySelector("button"),this._labelEl=this._shadowRoot.querySelector(".button-cta__label, .button-cta__label--no-wrap"),this._iconContainer=this._shadowRoot.querySelector(".button-cta__icon"),this._iconEl=((m=this._iconContainer)==null?void 0:m.querySelector("icon-base"))||null}_updateDOM(){if(!this._button||!this._labelEl)return;let e=this.label,t=this.size,r=this.buttonVariant,s=this.icon,o=this.noWrap,a=this.testID,l=jt(t),c=["button-cta",`button-cta--${t}`,`button-cta--${r}`].join(" ");this._button.className=c,this._button.setAttribute("aria-label",e),a?this._button.setAttribute("data-testid",a):this._button.removeAttribute("data-testid"),this._button.style.setProperty("--_cta-hover-bg",this._hoverColor),this._button.style.setProperty("--_cta-pressed-bg",this._pressedColor),this._button.style.setProperty("--_cta-icon-color",this._iconColor),this._button.style.setProperty("--_cta-icon-optical",this._iconOpticalBalanceColor),this._labelEl.textContent=e,this._labelEl.className=o?"button-cta__label--no-wrap":"button-cta__label",this._iconContainer&&this._iconEl&&(s?(this._iconContainer.style.display="",this._iconEl.setAttribute("name",s),this._iconEl.setAttribute("size",String(l))):this._iconContainer.style.display="none")}_attachEventListeners(){this._button&&(this._button.addEventListener("click",this._handleClick),this._button.addEventListener("keydown",this._handleKeyDown))}_detachEventListeners(){this._button&&(this._button.removeEventListener("click",this._handleClick),this._button.removeEventListener("keydown",this._handleKeyDown))}};customElements.get("button-cta")||customElements.define("button-cta",ze);var pt={size:"medium",variant:"primary"};var Kt=":host{--_bi-focus-offset:var(--accessibility-focus-offset);--_bi-focus-width:var(--accessibility-focus-width);--_bi-focus-color:var(--accessibility-focus-color);--_bi-focus-buffer:4px;--_bi-radius:50%;--_bi-transition-duration:var(--motion-button-press-duration);--_bi-transition-easing:var(--motion-button-press-easing);--_bi-border-default:var(--border-default);--_bi-border-emphasis:var(--border-emphasis);--_bi-color-primary:var(--color-action-primary);--_bi-color-contrast:var(--color-contrast-on-action);--_bi-color-bg-subtle:var(--color-background-primary-subtle);--_bi-inset-large:var(--buttonicon-inset-large);--_bi-inset-medium:var(--buttonicon-inset-medium);--_bi-inset-small:var(--buttonicon-inset-small);--_bi-size-large:var(--buttonicon-size-large);--_bi-size-medium:var(--buttonicon-size-medium);--_bi-size-small:var(--buttonicon-size-small);--_bi-touch-target:var(--tap-area-recommended)}.button-icon{appearance:none;border:none;background:transparent;padding:0;font:inherit;cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--_bi-radius);margin:var(--_bi-focus-buffer);transition:background-color var(--_bi-transition-duration) var(--_bi-transition-easing),border-color var(--_bi-transition-duration) var(--_bi-transition-easing),color var(--_bi-transition-duration) var(--_bi-transition-easing),box-shadow var(--_bi-transition-duration) var(--_bi-transition-easing),transform var(--_bi-transition-duration) var(--_bi-transition-easing);outline:none;flex-shrink:0;position:relative}.button-icon--small{padding:var(--_bi-inset-small);width:var(--_bi-size-small);height:var(--_bi-size-small);min-width:var(--_bi-size-small);min-height:var(--_bi-size-small)}.button-icon--medium{padding:var(--_bi-inset-medium);width:var(--_bi-size-medium);height:var(--_bi-size-medium);min-width:var(--_bi-size-medium);min-height:var(--_bi-size-medium)}.button-icon--large{padding:var(--_bi-inset-large);width:var(--_bi-size-large);height:var(--_bi-size-large);min-width:var(--_bi-size-large);min-height:var(--_bi-size-large)}.button-icon--primary{background-color:var(--_bi-color-primary);color:var(--_bi-color-contrast);border:none}.button-icon--secondary{background-color:transparent;color:var(--_bi-color-primary);border:var(--_bi-border-emphasis) solid transparent;box-shadow:inset 0 0 0 var(--_bi-border-default) var(--_bi-color-primary)}.button-icon--tertiary{background-color:transparent;color:var(--_bi-color-primary);border:none}.button-icon__icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:inherit;line-height:inherit}.button-icon--primary:hover{background-color:var(--_bi-hover-bg)}.button-icon--secondary:hover{background-color:var(--_bi-color-bg-subtle);border-color:var(--_bi-hover-bg);box-shadow:none;color:var(--_bi-hover-bg)}.button-icon--tertiary:hover{color:var(--_bi-hover-bg)}.button-icon--primary:active{background-color:var(--_bi-pressed-bg)}.button-icon--secondary:active{background-color:var(--_bi-color-bg-subtle);border-color:var(--_bi-pressed-bg);box-shadow:none;color:var(--_bi-pressed-bg)}.button-icon--tertiary:active{color:var(--_bi-pressed-bg)}.button-icon:focus-visible{outline:var(--_bi-focus-width) solid var(--_bi-focus-color);outline-offset:var(--_bi-focus-offset)}.button-icon:focus:not(:focus-visible){outline:none}.button-icon--small::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--_bi-touch-target);height:var(--_bi-touch-target);background:transparent;border-radius:50%}.button-icon:hover,.button-icon:active,.button-icon:focus,.button-icon:focus-visible{border-radius:var(--_bi-radius)}@media (prefers-contrast:high){.button-icon{border:var(--_bi-border-emphasis) solid currentColor}.button-icon:focus-visible{outline-width:4px}}@media (prefers-reduced-motion:reduce){.button-icon{transition:none}}@media print{.button-icon{background-color:transparent !important;color:var(--color-print-default) !important;border:var(--_bi-border-default) solid var(--color-print-default) !important;box-shadow:none !important}}";function Zt(n){let i;switch(n){case"small":if(i=A.size050,!i)throw new Error("ButtonIcon: iconBaseSizes.size050 token is missing");break;case"medium":if(i=A.size075,!i)throw new Error("ButtonIcon: iconBaseSizes.size075 token is missing");break;case"large":if(i=A.size100,!i)throw new Error("ButtonIcon: iconBaseSizes.size100 token is missing");break;default:throw new Error(`ButtonIcon: Invalid button size "${n}"`)}return i}var Re=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._button=null;this._iconEl=null;this._iconContainer=null;this._hoverColor="";this._pressedColor="";this._handleClick=e=>{this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0,detail:{originalEvent:e}}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0,detail:{originalEvent:e}})))};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return["icon","aria-label","size","variant","test-id"]}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._calculateBlendColorsWithRetry(),this.render()},{once:!0}):(this._calculateBlendColorsWithRetry(),this.render()),this.ariaLabel||console.warn('ButtonIcon: Missing required "aria-label" attribute. Icon-only buttons require aria-label for screen reader accessibility.')}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this.render()}catch(t){console.warn("ButtonIcon: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-action-primary").trim();if(!t)throw new Error("ButtonIcon: Required token --color-action-primary is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._domCreated&&this._updateDOM()}get icon(){return this.getAttribute("icon")||""}set icon(e){this.setAttribute("icon",e)}get ariaLabel(){return this.getAttribute("aria-label")||""}set ariaLabel(e){this.setAttribute("aria-label",e)}get size(){let e=this.getAttribute("size");return e==="small"||e==="medium"||e==="large"?e:pt.size}set size(e){this.setAttribute("size",e)}get buttonVariant(){let e=this.getAttribute("variant");return e==="primary"||e==="secondary"||e==="tertiary"?e:pt.variant}set buttonVariant(e){this.setAttribute("variant",e)}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var h;let e=this.icon,t=this.ariaLabel,r=this.size,s=this.buttonVariant,o=this.testID,a=Zt(r),l=["button-icon",`button-icon--${r}`,`button-icon--${s}`].filter(Boolean).join(" "),c=o?` data-testid="${o}"`:"",d=`
|
|
229
226
|
--_bi-hover-bg: ${this._hoverColor};
|
|
230
227
|
--_bi-pressed-bg: ${this._pressedColor};
|
|
231
228
|
`;this._shadowRoot.innerHTML=`
|
|
@@ -242,7 +239,7 @@
|
|
|
242
239
|
<icon-base name="${e}" size="${a}" color="inherit"></icon-base>
|
|
243
240
|
</span>
|
|
244
241
|
</button>
|
|
245
|
-
`,this._button=this._shadowRoot.querySelector("button"),this._iconContainer=this._shadowRoot.querySelector(".button-icon__icon"),this._iconEl=((h=this._iconContainer)==null?void 0:h.querySelector("icon-base"))||null}_updateDOM(){if(!this._button||!this._iconEl)return;let e=this.icon,t=this.ariaLabel,r=this.size,s=this.buttonVariant,o=this.testID,a=Zt(r),l=["button-icon",`button-icon--${r}`,`button-icon--${s}`].filter(Boolean).join(" ");this._button.className=l,this._button.setAttribute("aria-label",t),o?this._button.setAttribute("data-testid",o):this._button.removeAttribute("data-testid"),this._button.style.setProperty("--_bi-hover-bg",this._hoverColor),this._button.style.setProperty("--_bi-pressed-bg",this._pressedColor),this._iconEl.setAttribute("name",e),this._iconEl.setAttribute("size",String(a))}_attachEventListeners(){this._button&&(this._button.addEventListener("click",this._handleClick),this._button.addEventListener("keydown",this._handleKeyDown))}_detachEventListeners(){this._button&&(this._button.removeEventListener("click",this._handleClick),this._button.removeEventListener("keydown",this._handleKeyDown))}};customElements.get("button-icon")||customElements.define("button-icon",Re);var U={none:"","050":"space.inset.050",100:"space.inset.100",150:"space.inset.150",200:"space.inset.200",300:"space.inset.300",400:"space.inset.400"},Yt={none:"",default:"border.border.default",emphasis:"border.border.emphasis",heavy:"border.border.heavy"},Xt={none:"",tight:"radius-050",normal:"radius-100",loose:"radius-200"},Jt={web:{container:"zIndex.container",navigation:"zIndex.navigation",dropdown:"zIndex.dropdown",modal:"zIndex.modal",toast:"zIndex.toast",tooltip:"zIndex.tooltip"},ios:{container:"zIndex.container",navigation:"zIndex.navigation",dropdown:"zIndex.dropdown",modal:"zIndex.modal",toast:"zIndex.toast",tooltip:"zIndex.tooltip"},android:{container:"elevation.container",navigation:"elevation.navigation",dropdown:"elevation.dropdown",modal:"elevation.modal",toast:"elevation.toast",tooltip:"elevation.tooltip"}};var Qt="color.border";function R(n){return`var(--${n.replace(/\./g,"-")})`}function Cr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding: ${R(i)}`:""}function Sr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-block: ${R(i)}`:""}function Er(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-inline: ${R(i)}`:""}function wr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-block-start: ${R(i)}`:""}function Ar(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-block-end: ${R(i)}`:""}function Tr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-inline-start: ${R(i)}`:""}function Ir(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-inline-end: ${R(i)}`:""}function zr(n,i){if(!n||n==="none")return"";let e=Yt[n];if(!e)return"";let t=R(e),r=R(i||Qt);return`border: ${t} solid ${r}`}function Rr(n){if(!n||n==="none")return"";let i=Xt[n];return i?`border-radius: ${R(i)}`:""}function Br(n){return n?`background: ${R(n)}`:""}function Lr(n){return n?`box-shadow: ${R(n)}`:""}function Vr(n){return n?`opacity: ${R(n)}`:"opacity: var(--opacity-subtle)"}function $r(n){if(!n)return"";let i=Jt.web[n];return i?`z-index: ${R(i)}`:""}function ei(n){var f,b,C,
|
|
242
|
+
`,this._button=this._shadowRoot.querySelector("button"),this._iconContainer=this._shadowRoot.querySelector(".button-icon__icon"),this._iconEl=((h=this._iconContainer)==null?void 0:h.querySelector("icon-base"))||null}_updateDOM(){if(!this._button||!this._iconEl)return;let e=this.icon,t=this.ariaLabel,r=this.size,s=this.buttonVariant,o=this.testID,a=Zt(r),l=["button-icon",`button-icon--${r}`,`button-icon--${s}`].filter(Boolean).join(" ");this._button.className=l,this._button.setAttribute("aria-label",t),o?this._button.setAttribute("data-testid",o):this._button.removeAttribute("data-testid"),this._button.style.setProperty("--_bi-hover-bg",this._hoverColor),this._button.style.setProperty("--_bi-pressed-bg",this._pressedColor),this._iconEl.setAttribute("name",e),this._iconEl.setAttribute("size",String(a))}_attachEventListeners(){this._button&&(this._button.addEventListener("click",this._handleClick),this._button.addEventListener("keydown",this._handleKeyDown))}_detachEventListeners(){this._button&&(this._button.removeEventListener("click",this._handleClick),this._button.removeEventListener("keydown",this._handleKeyDown))}};customElements.get("button-icon")||customElements.define("button-icon",Re);var U={none:"","050":"space.inset.050",100:"space.inset.100",150:"space.inset.150",200:"space.inset.200",300:"space.inset.300",400:"space.inset.400"},Yt={none:"",default:"border.border.default",emphasis:"border.border.emphasis",heavy:"border.border.heavy"},Xt={none:"",tight:"radius-050",normal:"radius-100",loose:"radius-200"},Jt={web:{container:"zIndex.container",navigation:"zIndex.navigation",dropdown:"zIndex.dropdown",modal:"zIndex.modal",toast:"zIndex.toast",tooltip:"zIndex.tooltip"},ios:{container:"zIndex.container",navigation:"zIndex.navigation",dropdown:"zIndex.dropdown",modal:"zIndex.modal",toast:"zIndex.toast",tooltip:"zIndex.tooltip"},android:{container:"elevation.container",navigation:"elevation.navigation",dropdown:"elevation.dropdown",modal:"elevation.modal",toast:"elevation.toast",tooltip:"elevation.tooltip"}};var Qt="color.border";function R(n){return`var(--${n.replace(/\./g,"-")})`}function Cr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding: ${R(i)}`:""}function Sr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-block: ${R(i)}`:""}function Er(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-inline: ${R(i)}`:""}function wr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-block-start: ${R(i)}`:""}function Ar(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-block-end: ${R(i)}`:""}function Tr(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-inline-start: ${R(i)}`:""}function Ir(n){if(!n||n==="none")return"";let i=U[n];return i?`padding-inline-end: ${R(i)}`:""}function zr(n,i){if(!n||n==="none")return"";let e=Yt[n];if(!e)return"";let t=R(e),r=R(i||Qt);return`border: ${t} solid ${r}`}function Rr(n){if(!n||n==="none")return"";let i=Xt[n];return i?`border-radius: ${R(i)}`:""}function Br(n){return n?`background: ${R(n)}`:""}function Lr(n){return n?`box-shadow: ${R(n)}`:""}function Vr(n){return n?`opacity: ${R(n)}`:"opacity: var(--opacity-subtle)"}function $r(n){if(!n)return"";let i=Jt.web[n];return i?`z-index: ${R(i)}`:""}function ei(n){var f,b,x,C,_,S,k,T,w,I,Z,H,$,M;let i=[],e=Cr((f=n.padding)!=null?f:null);e&&i.push(e);let t=Sr((b=n.paddingVertical)!=null?b:null);t&&i.push(t);let r=Er((x=n.paddingHorizontal)!=null?x:null);r&&i.push(r);let s=wr((C=n.paddingBlockStart)!=null?C:null);s&&i.push(s);let o=Ar((_=n.paddingBlockEnd)!=null?_:null);o&&i.push(o);let a=Tr((S=n.paddingInlineStart)!=null?S:null);a&&i.push(a);let l=Ir((k=n.paddingInlineEnd)!=null?k:null);l&&i.push(l);let c=Br((T=n.background)!=null?T:null);c&&i.push(c);let d=Lr((w=n.shadow)!=null?w:null);d&&i.push(d);let h=zr((I=n.border)!=null?I:null,(Z=n.borderColor)!=null?Z:null);h&&i.push(h);let u=Rr((H=n.borderRadius)!=null?H:null);u&&i.push(u);let m=Vr(($=n.opacity)!=null?$:null);m&&i.push(m);let g=$r((M=n.layering)!=null?M:null);return g&&i.push(g),i.join(`;
|
|
246
243
|
`)}var Pr=`
|
|
247
244
|
:host {
|
|
248
245
|
display: block;
|
|
@@ -294,7 +291,7 @@
|
|
|
294
291
|
print-color-adjust: exact;
|
|
295
292
|
}
|
|
296
293
|
}
|
|
297
|
-
`,q=class extends HTMLElement{constructor(){super();this._hoverColor="";this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return["padding","padding-vertical","padding-horizontal","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","background","shadow","border","border-color","border-radius","opacity","layering","semantic","accessibility-label","hoverable"]}connectedCallback(){this._calculateBlendColors(),this.render()}_calculateBlendColors(){let e=getComputedStyle(document.documentElement),t=this.getAttribute("background"),r="";if(t){let s=`--${t.replace(/\./g,"-")}`;r=e.getPropertyValue(s).trim()}if(r||(r=e.getPropertyValue("--color-structure-surface").trim()),r||(r=e.getPropertyValue("--color-structure-canvas").trim()),!r){console.warn("ContainerBase: All background color fallbacks failed. Hover effects will not work."),this._hoverColor="";return}this._hoverColor=this._blendUtils.hoverColor(r)}attributeChangedCallback(e,t,r){t!==r&&(e==="background"&&this._calculateBlendColors(),this.render())}render(){let e=this.getAttribute("padding"),t=this.getAttribute("padding-vertical"),r=this.getAttribute("padding-horizontal"),s=this.getAttribute("padding-block-start"),o=this.getAttribute("padding-block-end"),a=this.getAttribute("padding-inline-start"),l=this.getAttribute("padding-inline-end"),c=this.getAttribute("background"),d=this.getAttribute("shadow"),h=this.getAttribute("border"),u=this.getAttribute("border-color"),m=this.getAttribute("border-radius"),g=this.getAttribute("opacity"),f=this.getAttribute("layering"),b=this.getAttribute("semantic")||"div",
|
|
294
|
+
`,q=class extends HTMLElement{constructor(){super();this._hoverColor="";this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return["padding","padding-vertical","padding-horizontal","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","background","shadow","border","border-color","border-radius","opacity","layering","semantic","accessibility-label","hoverable"]}connectedCallback(){this._calculateBlendColors(),this.render()}_calculateBlendColors(){let e=getComputedStyle(document.documentElement),t=this.getAttribute("background"),r="";if(t){let s=`--${t.replace(/\./g,"-")}`;r=e.getPropertyValue(s).trim()}if(r||(r=e.getPropertyValue("--color-structure-surface").trim()),r||(r=e.getPropertyValue("--color-structure-canvas").trim()),!r){console.warn("ContainerBase: All background color fallbacks failed. Hover effects will not work."),this._hoverColor="";return}this._hoverColor=this._blendUtils.hoverColor(r)}attributeChangedCallback(e,t,r){t!==r&&(e==="background"&&this._calculateBlendColors(),this.render())}render(){let e=this.getAttribute("padding"),t=this.getAttribute("padding-vertical"),r=this.getAttribute("padding-horizontal"),s=this.getAttribute("padding-block-start"),o=this.getAttribute("padding-block-end"),a=this.getAttribute("padding-inline-start"),l=this.getAttribute("padding-inline-end"),c=this.getAttribute("background"),d=this.getAttribute("shadow"),h=this.getAttribute("border"),u=this.getAttribute("border-color"),m=this.getAttribute("border-radius"),g=this.getAttribute("opacity"),f=this.getAttribute("layering"),b=this.getAttribute("semantic")||"div",x=this.getAttribute("accessibility-label"),C=this.getAttribute("hoverable")==="true",_=this.buildStyles({padding:e,paddingVertical:t,paddingHorizontal:r,paddingBlockStart:s,paddingBlockEnd:o,paddingInlineStart:a,paddingInlineEnd:l,background:c,shadow:d,border:h,borderColor:u,borderRadius:m,opacity:g,layering:f}),S=x?`aria-label="${x.replace(/"/g,""")}"`:"",k=["container-base"];C&&k.push("container-base--hoverable");let T=C?`--_container-base-hover-bg: ${this._hoverColor};`:"";this._shadowRoot.innerHTML=`
|
|
298
295
|
<style>
|
|
299
296
|
${Pr}
|
|
300
297
|
|
|
@@ -302,10 +299,10 @@
|
|
|
302
299
|
${_}
|
|
303
300
|
}
|
|
304
301
|
</style>
|
|
305
|
-
<${b} class="${
|
|
302
|
+
<${b} class="${k.join(" ")}" ${S} style="${T}">
|
|
306
303
|
<slot></slot>
|
|
307
304
|
</${b}>
|
|
308
|
-
`}buildStyles(e){return ei(e)}};customElements.get("container-base")||customElements.define("container-base",q);var ti={rest:{background:"var(--color-structure-canvas)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-text-default)",iconColor:"var(--color-text-default)",checkmarkVisible:!1,cssClass:"vertical-list-item--rest"},selected:{background:"var(--color-feedback-select-background-rest)",borderWidth:"var(--border-emphasis)",borderColor:"var(--color-feedback-select-text-rest)",labelColor:"var(--color-feedback-select-text-rest)",iconColor:"var(--color-feedback-select-text-rest)",checkmarkVisible:!0,cssClass:"vertical-list-item--selected"},notSelected:{background:"var(--color-feedback-select-background-default)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-feedback-select-text-default)",iconColor:"var(--color-feedback-select-text-default)",checkmarkVisible:!1,cssClass:"vertical-list-item--not-selected"},checked:{background:"var(--color-feedback-select-background-rest)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-feedback-select-text-rest)",iconColor:"var(--color-feedback-select-text-rest)",checkmarkVisible:!0,cssClass:"vertical-list-item--checked"},unchecked:{background:"var(--color-structure-canvas)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-text-default)",iconColor:"var(--color-text-default)",checkmarkVisible:!1,cssClass:"vertical-list-item--unchecked"}};function Mr(n){let i=ti[n];if(!i)throw new Error(`Button-VerticalList-Item: Invalid visual state "${n}". Valid states are: ${Object.keys(ti).join(", ")}`);return i}function Dr(n){return n==="rest"||n==="selected"||n==="notSelected"}function Nr(n){return n==="checked"||n==="unchecked"}function ii(n){return n==="selected"}function Hr(n,i){return Dr(i)?P(V({},n),{background:"var(--color-feedback-error-background)",borderWidth:"var(--border-emphasis)",borderColor:"var(--color-feedback-error-text)",labelColor:"var(--color-feedback-error-text)",iconColor:"var(--color-feedback-error-text)",cssClass:`${n.cssClass} vertical-list-item--error`}):Nr(i)?P(V({},n),{labelColor:"var(--color-feedback-error-text)",iconColor:"var(--color-feedback-error-text)",cssClass:`${n.cssClass} vertical-list-item--error`}):n}function ri(n,i=!1){let e=Mr(n);return i?Hr(e,n):e}var gt="@3fn/dp:tokenContract";function Or(n){return"reference"in n}function G(n){let{component:i,family:e,tokens:t}=n;if(!i||i.trim()==="")throw new Error("Component name is required for defineComponentTokens()");if(!e||e.trim()==="")throw new Error("Token family is required for defineComponentTokens()");if(!t||Object.keys(t).length===0)throw new Error("At least one token definition is required for defineComponentTokens()");let r={},s=[];for(let[o,a]of Object.entries(t)){let l=`${i.toLowerCase()}.${o}`;if(Or(a)){let c=a.reference,d=c.baseValue;r[o]=d,s.push({name:l,component:i,family:e,value:d,primitiveReference:c.name,reasoning:a.reasoning})}else r[o]=a.value,s.push({name:l,component:i,family:e,value:a.value,reasoning:a.reasoning})}return Object.prototype.hasOwnProperty.call(r,gt)||Object.defineProperty(r,gt,{value:s,enumerable:!1,configurable:!0,writable:!1}),r}var Me=class{constructor(){this.defaultWebBaseFontSize=16;this.defaultPrecision=2}convertToAllPlatforms(i,e,t={}){let r=this.convertToiOS(i,e,t),s=this.convertToAndroid(i,e,t),o=this.convertToWeb(i,e,t),a=this.validateMathematicalConsistency(i,r,s,o,t);return{ios:r,android:s,web:o,mathematicallyConsistent:a.consistent,reasoning:a.reasoning}}convertToiOS(i,e,t={}){var o;let r=(o=t.precision)!=null?o:this.defaultPrecision;return{value:this.roundToPrecision(i,r),unit:"pt",token:e}}convertToAndroid(i,e,t={}){var a;let r=(a=t.precision)!=null?a:this.defaultPrecision,s=this.roundToPrecision(i,r),o=this.isTypographyToken(e,t.category)?"sp":"dp";return{value:s,unit:o,token:e}}convertToWeb(i,e,t={}){var a,l;let r=(a=t.precision)!=null?a:this.defaultPrecision,s=(l=t.webBaseFontSize)!=null?l:this.defaultWebBaseFontSize;if(this.isTypographyToken(e,t.category)){let c=i/s;return{value:this.roundToPrecision(c,r),unit:"rem",token:e}}return{value:this.roundToPrecision(i,r),unit:"px",token:e}}validateMathematicalConsistency(i,e,t,r,s){var u;let o=(u=s.webBaseFontSize)!=null?u:this.defaultWebBaseFontSize,a=e.value===i,l=t.value===i,c=!1;if(r.unit==="px")c=r.value===i;else if(r.unit==="rem"){let m=i/o;c=Math.abs(r.value-m)<.001}if(a&&l&&c)return{consistent:!0,reasoning:`All platforms maintain mathematical consistency: baseValue ${i} \u2192 iOS ${e.value}${e.unit}, Android ${t.value}${t.unit}, Web ${r.value}${r.unit}`};let h=[];if(a||h.push(`iOS: expected ${i}pt, got ${e.value}pt`),l||h.push(`Android: expected ${i}${t.unit}, got ${t.value}${t.unit}`),!c)if(r.unit==="rem"){let m=i/o;h.push(`Web: expected ${m}rem, got ${r.value}rem`)}else h.push(`Web: expected ${i}px, got ${r.value}px`);return{consistent:!1,reasoning:`Mathematical inconsistency detected: ${h.join("; ")}`}}isTypographyToken(i,e){return e==="typography"?!0:[/font/i,/text/i,/typography/i,/lineHeight/i,/letterSpacing/i].some(r=>r.test(i))}roundToPrecision(i,e){let t=Math.pow(10,e);return Math.round(i*t)/t}applyScaleWithRounding(i,e){let t=i*e,r=Math.round(t),s=Math.abs(t-r);return s>.5&&console.warn(`Rounding precision loss: ${i}px \xD7 ${e} = ${t}px \u2192 ${r}px (loss: ${s.toFixed(2)}px)`),r}convertToPlatform(i,e,t,r={}){switch(t){case"ios":return this.convertToiOS(i,e,r);case"android":return this.convertToAndroid(i,e,r);case"web":return this.convertToWeb(i,e,r);default:throw new Error(`Unknown platform: ${t}`)}}},Fr=new Me;var N={space075:{value:6,derivation:"space100 \xD7 0.75"},space125:{value:10,derivation:"space100 \xD7 1.25"},space250:{value:20,derivation:"space100 \xD7 2.5"}},v=8;function B(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var mt={space000:{name:"space000",category:"spacing",baseValue:0,familyBaseValue:v,description:"Zero spacing - explicit no spacing value",mathematicalRelationship:"base \xD7 0 = 8 \xD7 0 = 0",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(0)},space025:{name:"space025",category:"spacing",baseValue:v*.25,familyBaseValue:v,description:"Extra tight spacing - 0.25x base value",mathematicalRelationship:"base \xD7 0.25 = 8 \xD7 0.25 = 2",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*.25)},space050:{name:"space050",category:"spacing",baseValue:v*.5,familyBaseValue:v,description:"Tight spacing - 0.5x base value",mathematicalRelationship:"base \xD7 0.5 = 8 \xD7 0.5 = 4",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*.5)},space075:{name:"space075",category:"spacing",baseValue:N.space075.value,familyBaseValue:v,description:"Strategic flexibility spacing - 0.75x base value",mathematicalRelationship:N.space075.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:B(N.space075.value)},space100:{name:"space100",category:"spacing",baseValue:v,familyBaseValue:v,description:"Base spacing - 1x base value",mathematicalRelationship:"base \xD7 1 = 8 \xD7 1 = 8",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v)},space125:{name:"space125",category:"spacing",baseValue:N.space125.value,familyBaseValue:v,description:"Strategic flexibility spacing - 1.25x base value",mathematicalRelationship:N.space125.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:B(N.space125.value)},space150:{name:"space150",category:"spacing",baseValue:v*1.5,familyBaseValue:v,description:"Loose spacing - 1.5x base value",mathematicalRelationship:"base \xD7 1.5 = 8 \xD7 1.5 = 12",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*1.5)},space200:{name:"space200",category:"spacing",baseValue:v*2,familyBaseValue:v,description:"Wide spacing - 2x base value",mathematicalRelationship:"base \xD7 2 = 8 \xD7 2 = 16",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*2)},space250:{name:"space250",category:"spacing",baseValue:N.space250.value,familyBaseValue:v,description:"Strategic flexibility spacing - 2.5x base value",mathematicalRelationship:N.space250.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:B(N.space250.value)},space300:{name:"space300",category:"spacing",baseValue:v*3,familyBaseValue:v,description:"Extra wide spacing - 3x base value",mathematicalRelationship:"base \xD7 3 = 8 \xD7 3 = 24",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*3)},space400:{name:"space400",category:"spacing",baseValue:v*4,familyBaseValue:v,description:"Large spacing - 4x base value",mathematicalRelationship:"base \xD7 4 = 8 \xD7 4 = 32",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*4)},space500:{name:"space500",category:"spacing",baseValue:v*5,familyBaseValue:v,description:"Extra large spacing - 5x base value",mathematicalRelationship:"base \xD7 5 = 8 \xD7 5 = 40",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*5)},space600:{name:"space600",category:"spacing",baseValue:v*6,familyBaseValue:v,description:"Huge spacing - 6x base value",mathematicalRelationship:"base \xD7 6 = 8 \xD7 6 = 48",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*6)},space700:{name:"space700",category:"spacing",baseValue:v*7,familyBaseValue:v,description:"Extra huge spacing - 7x base value",mathematicalRelationship:"base \xD7 7 = 8 \xD7 7 = 56",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*7)},space800:{name:"space800",category:"spacing",baseValue:v*8,familyBaseValue:v,description:"Maximum spacing - 8x base value",mathematicalRelationship:"base \xD7 8 = 8 \xD7 8 = 64",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*8)}},Yo=Object.keys(mt);var Gr=G({component:"VerticalListItem",family:"spacing",tokens:{"paddingBlock.rest":{value:v*1.375,reasoning:"Block padding at rest state (1px border). 11px padding + 1px border = 12px per side, achieving 48px total with 24px content. Uses TokenWithValue pattern as no primitive token exists for 11px."},"paddingBlock.selected":{reference:mt.space125,reasoning:"Block padding when selected (2px border). 10px padding + 2px border = 12px per side, maintaining 48px total with 24px content. References space125 strategic flexibility token."}}});function ni(n){return Gr[`paddingBlock.${n}`]}var si=":host{display:block;width:100%;--_vlbi-focus-offset:var(--accessibility-focus-offset);--_vlbi-focus-width:var(--accessibility-focus-width);--_vlbi-focus-color:var(--accessibility-focus-color);--_vlbi-min-height:var(--tap-area-recommended);--_vlbi-radius:var(--radius-normal);--_vlbi-padding-inline:var(--space-inset-200);--_vlbi-gap:var(--space-grouped-loose);--_vlbi-label-font-size:var(--typography-button-md-font-size);--_vlbi-label-font-weight:var(--typography-button-md-font-weight);--_vlbi-label-line-height:var(--typography-button-md-line-height);--_vlbi-description-font-size:var(--typography-body-sm-font-size);--_vlbi-description-font-weight:var(--typography-body-sm-font-weight);--_vlbi-description-line-height:var(--typography-body-sm-line-height);--_vlbi-description-color:var(--color-text-muted);--_vlbi-transition-duration:var(--motion-selection-transition-duration);--_vlbi-transition-easing:var(--motion-selection-transition-easing)}.vertical-list-item{appearance:none;margin:0;font:inherit;display:flex;align-items:center;gap:var(--_vlbi-gap);width:100%;min-height:var(--_vlbi-min-height);padding-block:var(--_vlbi-padding-block);padding-inline:var(--_vlbi-padding-inline);background:var(--_vlbi-background);border:var(--_vlbi-border-width) solid var(--_vlbi-border-color);border-radius:var(--_vlbi-radius);text-align:start;cursor:pointer;transition:background var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),background-color var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),border-color var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),border-width var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),padding var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),color var(--_vlbi-transition-duration) var(--_vlbi-transition-easing);outline:none}.vertical-list-item:hover{background-color:var(--_vlbi-hover-bg)}.vertical-list-item:active{background-color:var(--_vlbi-pressed-bg)}.vertical-list-item:focus-visible{outline:var(--_vlbi-focus-width) solid var(--_vlbi-focus-color);outline-offset:var(--_vlbi-focus-offset)}.vertical-list-item:focus:not(:focus-visible){outline:none}.vertical-list-item__content{display:flex;flex-direction:column;flex:1;min-width:0}.vertical-list-item__label{color:var(--_vlbi-label-color);font-size:var(--_vlbi-label-font-size);font-weight:var(--_vlbi-label-font-weight);line-height:var(--_vlbi-label-line-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vertical-list-item__description{color:var(--_vlbi-description-color);font-size:var(--_vlbi-description-font-size);font-weight:var(--_vlbi-description-font-weight);line-height:var(--_vlbi-description-line-height)}.vertical-list-item__leading-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}.vertical-list-item__checkmark{flex-shrink:0;color:var(--_vlbi-icon-color);display:inline-flex;align-items:center;justify-content:center;transition:opacity var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),visibility var(--_vlbi-transition-duration) var(--_vlbi-transition-easing)}.vertical-list-item__checkmark--fade{opacity:inherit}.vertical-list-item__checkmark--instant.vertical-list-item__checkmark--hidden{transition:none}.vertical-list-item__checkmark--hidden{opacity:0;visibility:hidden}.vertical-list-item__checkmark--visible{opacity:1;visibility:visible}@media (prefers-contrast:high){.vertical-list-item{border-width:2px !important}.vertical-list-item:focus-visible{outline-width:4px}}@media (prefers-reduced-motion:reduce){.vertical-list-item,.vertical-list-item__checkmark--fade{transition:none}}@media print{.vertical-list-item{background-color:transparent !important;border:1px solid currentColor !important;filter:none !important}}";var Wr=["--color-structure-canvas","--color-text-default","--color-text-muted","--color-feedback-select-text-rest","--color-feedback-select-background-rest","--color-feedback-select-text-default","--color-feedback-select-background-default","--color-feedback-error-text","--color-feedback-error-background","--border-default","--border-emphasis","--radius-normal","--space-inset-200","--space-grouped-loose","--tap-area-recommended","--accessibility-focus-width","--accessibility-focus-offset","--accessibility-focus-color","--motion-selection-transition-duration","--motion-selection-transition-easing"];function jr(){let n=getComputedStyle(document.documentElement),i=[];for(let e of Wr)n.getPropertyValue(e).trim()||i.push(e);if(i.length>0)throw new Error(`Button-VerticalList-Item: Missing required CSS variables: ${i.join(", ")}. Ensure Rosetta-generated tokens are loaded before using this component.`)}function Kr(n,i=!1){let e=n==="rest"||n==="selected"||n==="notSelected",r=ii(n)||i&&e?"selected":"rest";return`${ni(r)}px`}function oi(n){let i=n.match(/var\(([^)]+)\)/);if(!i)return n;let e=i[1].trim();return getComputedStyle(document.documentElement).getPropertyValue(e).trim()||n}var ee=class extends HTMLElement{constructor(){super();this._tokensValidated=!1;this._domCreated=!1;this._button=null;this._labelEl=null;this._descriptionEl=null;this._leadingIconContainer=null;this._leadingIconEl=null;this._checkmarkContainer=null;this._checkmarkIconEl=null;this._hoverColor="";this._pressedColor="";this._handleClick=()=>{this._onClick&&this._onClick()};this._handleFocus=()=>{this._onFocus&&this._onFocus(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))};this._handleBlur=()=>{this._onBlur&&this._onBlur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._handleClick())};this._shadowRoot=this.attachShadow({mode:"open",delegatesFocus:!0}),this._blendUtils=E()}static get observedAttributes(){return["label","description","leading-icon","visual-state","error","checkmark-transition","transition-delay","test-id","role","aria-checked","disabled"]}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._validateAndRender()},{once:!0}):this._validateAndRender()}_validateAndRender(){this._tokensValidated||(jr(),this._tokensValidated=!0),this._calculateBlendColorsWithRetry(),this._render()}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this._render()}catch(t){console.warn("ButtonVerticalListItem: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-structure-canvas").trim();if(!t)throw new Error("Button-VerticalList-Item: Required token --color-structure-canvas is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){if(e==="disabled")throw new Error('Button-VerticalList-Item: The "disabled" attribute is not supported. Per accessibility standards, unavailable options should be hidden rather than disabled. Remove the disabled attribute and hide the component instead.');t!==r&&this.isConnected&&this._tokensValidated&&this._domCreated&&this._updateDOM()}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get description(){return this.getAttribute("description")||void 0}set description(e){e?this.setAttribute("description",e):this.removeAttribute("description")}get leadingIcon(){return this.getAttribute("leading-icon")}set leadingIcon(e){e?this.setAttribute("leading-icon",e):this.removeAttribute("leading-icon")}get visualState(){let e=this.getAttribute("visual-state");return e&&["rest","selected","notSelected","checked","unchecked"].includes(e)?e:"rest"}set visualState(e){this.setAttribute("visual-state",e)}get error(){return this.getAttribute("error")==="true"}set error(e){this.setAttribute("error",e.toString())}get checkmarkTransition(){return this.getAttribute("checkmark-transition")==="instant"?"instant":"fade"}set checkmarkTransition(e){this.setAttribute("checkmark-transition",e)}get transitionDelay(){let e=this.getAttribute("transition-delay");return e?parseInt(e,10):0}set transitionDelay(e){this.setAttribute("transition-delay",e.toString())}get testID(){return this.getAttribute("test-id")||void 0}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get disabled(){return!1}set disabled(e){if(e)throw new Error('Button-VerticalList-Item: The "disabled" property is not supported. Per accessibility standards, unavailable options should be hidden rather than disabled. Set disabled to false or hide the component instead.')}get itemRole(){let e=this.getAttribute("role");return e==="radio"||e==="checkbox"?e:"button"}set itemRole(e){this.setAttribute("role",e)}get itemAriaChecked(){let e=this.getAttribute("aria-checked");if(e==="true")return!0;if(e==="false")return!1}set itemAriaChecked(e){e===void 0?this.removeAttribute("aria-checked"):this.setAttribute("aria-checked",e.toString())}set onClick(e){this._onClick=e}get onClick(){return this._onClick}set onFocus(e){this._onFocus=e}get onFocus(){return this._onFocus}set onBlur(e){this._onBlur=e}get onBlur(){return this._onBlur}_render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var t,r;let e=T.size100;this._shadowRoot.innerHTML=`
|
|
305
|
+
`}buildStyles(e){return ei(e)}};customElements.get("container-base")||customElements.define("container-base",q);var ti={rest:{background:"var(--color-structure-canvas)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-text-default)",iconColor:"var(--color-text-default)",checkmarkVisible:!1,cssClass:"vertical-list-item--rest"},selected:{background:"var(--color-feedback-select-background-rest)",borderWidth:"var(--border-emphasis)",borderColor:"var(--color-feedback-select-text-rest)",labelColor:"var(--color-feedback-select-text-rest)",iconColor:"var(--color-feedback-select-text-rest)",checkmarkVisible:!0,cssClass:"vertical-list-item--selected"},notSelected:{background:"var(--color-feedback-select-background-default)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-feedback-select-text-default)",iconColor:"var(--color-feedback-select-text-default)",checkmarkVisible:!1,cssClass:"vertical-list-item--not-selected"},checked:{background:"var(--color-feedback-select-background-rest)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-feedback-select-text-rest)",iconColor:"var(--color-feedback-select-text-rest)",checkmarkVisible:!0,cssClass:"vertical-list-item--checked"},unchecked:{background:"var(--color-structure-canvas)",borderWidth:"var(--border-default)",borderColor:"transparent",labelColor:"var(--color-text-default)",iconColor:"var(--color-text-default)",checkmarkVisible:!1,cssClass:"vertical-list-item--unchecked"}};function Mr(n){let i=ti[n];if(!i)throw new Error(`Button-VerticalList-Item: Invalid visual state "${n}". Valid states are: ${Object.keys(ti).join(", ")}`);return i}function Dr(n){return n==="rest"||n==="selected"||n==="notSelected"}function Nr(n){return n==="checked"||n==="unchecked"}function ii(n){return n==="selected"}function Hr(n,i){return Dr(i)?P(V({},n),{background:"var(--color-feedback-error-background)",borderWidth:"var(--border-emphasis)",borderColor:"var(--color-feedback-error-text)",labelColor:"var(--color-feedback-error-text)",iconColor:"var(--color-feedback-error-text)",cssClass:`${n.cssClass} vertical-list-item--error`}):Nr(i)?P(V({},n),{labelColor:"var(--color-feedback-error-text)",iconColor:"var(--color-feedback-error-text)",cssClass:`${n.cssClass} vertical-list-item--error`}):n}function ri(n,i=!1){let e=Mr(n);return i?Hr(e,n):e}var gt="@3fn/dp:tokenContract";function Or(n){return"reference"in n}function Q(n){let{component:i,family:e,tokens:t}=n;if(!i||i.trim()==="")throw new Error("Component name is required for defineComponentTokens()");if(!e||e.trim()==="")throw new Error("Token family is required for defineComponentTokens()");if(!t||Object.keys(t).length===0)throw new Error("At least one token definition is required for defineComponentTokens()");let r={},s=[];for(let[o,a]of Object.entries(t)){let l=`${i.toLowerCase()}.${o}`;if(Or(a)){let c=a.reference;if(typeof c.category=="string"&&c.category!==e)throw new Error(`Token family mismatch in defineComponentTokens() for component '${i}': token '${o}' is declared in a '${e}' family call but references primitive '${c.name}' from the '${c.category}' family. Every token in a call is stamped with that call's family, which drives platform output (e.g. the generated '${e.charAt(0).toUpperCase()+e.slice(1)}Tokens' class reference), so this would emit a non-existent platform member. Fix: move '${o}' into a separate defineComponentTokens() call with family: '${c.category}', or use the value path if no token-chain relationship is intended.`);let d=c.baseValue;r[o]=d,s.push({name:l,component:i,family:e,value:d,primitiveReference:c.name,reasoning:a.reasoning})}else r[o]=a.value,s.push({name:l,component:i,family:e,value:a.value,reasoning:a.reasoning})}return Object.prototype.hasOwnProperty.call(r,gt)||Object.defineProperty(r,gt,{value:s,enumerable:!1,configurable:!0,writable:!1}),r}var Me=class{constructor(){this.defaultWebBaseFontSize=16;this.defaultPrecision=2}convertToAllPlatforms(i,e,t={}){let r=this.convertToiOS(i,e,t),s=this.convertToAndroid(i,e,t),o=this.convertToWeb(i,e,t),a=this.validateMathematicalConsistency(i,r,s,o,t);return{ios:r,android:s,web:o,mathematicallyConsistent:a.consistent,reasoning:a.reasoning}}convertToiOS(i,e,t={}){var o;let r=(o=t.precision)!=null?o:this.defaultPrecision;return{value:this.roundToPrecision(i,r),unit:"pt",token:e}}convertToAndroid(i,e,t={}){var a;let r=(a=t.precision)!=null?a:this.defaultPrecision,s=this.roundToPrecision(i,r),o=this.isTypographyToken(e,t.category)?"sp":"dp";return{value:s,unit:o,token:e}}convertToWeb(i,e,t={}){var a,l;let r=(a=t.precision)!=null?a:this.defaultPrecision,s=(l=t.webBaseFontSize)!=null?l:this.defaultWebBaseFontSize;if(this.isTypographyToken(e,t.category)){let c=i/s;return{value:this.roundToPrecision(c,r),unit:"rem",token:e}}return{value:this.roundToPrecision(i,r),unit:"px",token:e}}validateMathematicalConsistency(i,e,t,r,s){var u;let o=(u=s.webBaseFontSize)!=null?u:this.defaultWebBaseFontSize,a=e.value===i,l=t.value===i,c=!1;if(r.unit==="px")c=r.value===i;else if(r.unit==="rem"){let m=i/o;c=Math.abs(r.value-m)<.001}if(a&&l&&c)return{consistent:!0,reasoning:`All platforms maintain mathematical consistency: baseValue ${i} \u2192 iOS ${e.value}${e.unit}, Android ${t.value}${t.unit}, Web ${r.value}${r.unit}`};let h=[];if(a||h.push(`iOS: expected ${i}pt, got ${e.value}pt`),l||h.push(`Android: expected ${i}${t.unit}, got ${t.value}${t.unit}`),!c)if(r.unit==="rem"){let m=i/o;h.push(`Web: expected ${m}rem, got ${r.value}rem`)}else h.push(`Web: expected ${i}px, got ${r.value}px`);return{consistent:!1,reasoning:`Mathematical inconsistency detected: ${h.join("; ")}`}}isTypographyToken(i,e){return e==="typography"?!0:[/font/i,/text/i,/typography/i,/lineHeight/i,/letterSpacing/i].some(r=>r.test(i))}roundToPrecision(i,e){let t=Math.pow(10,e);return Math.round(i*t)/t}applyScaleWithRounding(i,e){let t=i*e,r=Math.round(t),s=Math.abs(t-r);return s>.5&&console.warn(`Rounding precision loss: ${i}px \xD7 ${e} = ${t}px \u2192 ${r}px (loss: ${s.toFixed(2)}px)`),r}convertToPlatform(i,e,t,r={}){switch(t){case"ios":return this.convertToiOS(i,e,r);case"android":return this.convertToAndroid(i,e,r);case"web":return this.convertToWeb(i,e,r);default:throw new Error(`Unknown platform: ${t}`)}}},Fr=new Me;var N={space075:{value:6,derivation:"space100 \xD7 0.75"},space125:{value:10,derivation:"space100 \xD7 1.25"},space250:{value:20,derivation:"space100 \xD7 2.5"}},v=8;function B(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var mt={space000:{name:"space000",category:"spacing",baseValue:0,familyBaseValue:v,description:"Zero spacing - explicit no spacing value",mathematicalRelationship:"base \xD7 0 = 8 \xD7 0 = 0",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(0)},space025:{name:"space025",category:"spacing",baseValue:v*.25,familyBaseValue:v,description:"Extra tight spacing - 0.25x base value",mathematicalRelationship:"base \xD7 0.25 = 8 \xD7 0.25 = 2",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*.25)},space050:{name:"space050",category:"spacing",baseValue:v*.5,familyBaseValue:v,description:"Tight spacing - 0.5x base value",mathematicalRelationship:"base \xD7 0.5 = 8 \xD7 0.5 = 4",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*.5)},space075:{name:"space075",category:"spacing",baseValue:N.space075.value,familyBaseValue:v,description:"Strategic flexibility spacing - 0.75x base value",mathematicalRelationship:N.space075.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:B(N.space075.value)},space100:{name:"space100",category:"spacing",baseValue:v,familyBaseValue:v,description:"Base spacing - 1x base value",mathematicalRelationship:"base \xD7 1 = 8 \xD7 1 = 8",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v)},space125:{name:"space125",category:"spacing",baseValue:N.space125.value,familyBaseValue:v,description:"Strategic flexibility spacing - 1.25x base value",mathematicalRelationship:N.space125.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:B(N.space125.value)},space150:{name:"space150",category:"spacing",baseValue:v*1.5,familyBaseValue:v,description:"Loose spacing - 1.5x base value",mathematicalRelationship:"base \xD7 1.5 = 8 \xD7 1.5 = 12",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*1.5)},space200:{name:"space200",category:"spacing",baseValue:v*2,familyBaseValue:v,description:"Wide spacing - 2x base value",mathematicalRelationship:"base \xD7 2 = 8 \xD7 2 = 16",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*2)},space250:{name:"space250",category:"spacing",baseValue:N.space250.value,familyBaseValue:v,description:"Strategic flexibility spacing - 2.5x base value",mathematicalRelationship:N.space250.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:B(N.space250.value)},space300:{name:"space300",category:"spacing",baseValue:v*3,familyBaseValue:v,description:"Extra wide spacing - 3x base value",mathematicalRelationship:"base \xD7 3 = 8 \xD7 3 = 24",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*3)},space400:{name:"space400",category:"spacing",baseValue:v*4,familyBaseValue:v,description:"Large spacing - 4x base value",mathematicalRelationship:"base \xD7 4 = 8 \xD7 4 = 32",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*4)},space500:{name:"space500",category:"spacing",baseValue:v*5,familyBaseValue:v,description:"Extra large spacing - 5x base value",mathematicalRelationship:"base \xD7 5 = 8 \xD7 5 = 40",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*5)},space600:{name:"space600",category:"spacing",baseValue:v*6,familyBaseValue:v,description:"Huge spacing - 6x base value",mathematicalRelationship:"base \xD7 6 = 8 \xD7 6 = 48",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*6)},space700:{name:"space700",category:"spacing",baseValue:v*7,familyBaseValue:v,description:"Extra huge spacing - 7x base value",mathematicalRelationship:"base \xD7 7 = 8 \xD7 7 = 56",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*7)},space800:{name:"space800",category:"spacing",baseValue:v*8,familyBaseValue:v,description:"Maximum spacing - 8x base value",mathematicalRelationship:"base \xD7 8 = 8 \xD7 8 = 64",baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(v*8)}},Yo=Object.keys(mt);var Gr=Q({component:"VerticalListItem",family:"spacing",tokens:{"paddingBlock.rest":{value:v*1.375,reasoning:"Block padding at rest state (1px border). 11px padding + 1px border = 12px per side, achieving 48px total with 24px content. Uses TokenWithValue pattern as no primitive token exists for 11px."},"paddingBlock.selected":{reference:mt.space125,reasoning:"Block padding when selected (2px border). 10px padding + 2px border = 12px per side, maintaining 48px total with 24px content. References space125 strategic flexibility token."}}});function ni(n){return Gr[`paddingBlock.${n}`]}var si=":host{display:block;width:100%;--_vlbi-focus-offset:var(--accessibility-focus-offset);--_vlbi-focus-width:var(--accessibility-focus-width);--_vlbi-focus-color:var(--accessibility-focus-color);--_vlbi-min-height:var(--tap-area-recommended);--_vlbi-radius:var(--radius-normal);--_vlbi-padding-inline:var(--space-inset-200);--_vlbi-gap:var(--space-grouped-loose);--_vlbi-label-font-size:var(--typography-button-md-font-size);--_vlbi-label-font-weight:var(--typography-button-md-font-weight);--_vlbi-label-line-height:var(--typography-button-md-line-height);--_vlbi-description-font-size:var(--typography-body-sm-font-size);--_vlbi-description-font-weight:var(--typography-body-sm-font-weight);--_vlbi-description-line-height:var(--typography-body-sm-line-height);--_vlbi-description-color:var(--color-text-muted);--_vlbi-transition-duration:var(--motion-selection-transition-duration);--_vlbi-transition-easing:var(--motion-selection-transition-easing)}.vertical-list-item{appearance:none;margin:0;font:inherit;display:flex;align-items:center;gap:var(--_vlbi-gap);width:100%;min-height:var(--_vlbi-min-height);padding-block:var(--_vlbi-padding-block);padding-inline:var(--_vlbi-padding-inline);background:var(--_vlbi-background);border:var(--_vlbi-border-width) solid var(--_vlbi-border-color);border-radius:var(--_vlbi-radius);text-align:start;cursor:pointer;transition:background var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),background-color var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),border-color var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),border-width var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),padding var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),color var(--_vlbi-transition-duration) var(--_vlbi-transition-easing);outline:none}.vertical-list-item:hover{background-color:var(--_vlbi-hover-bg)}.vertical-list-item:active{background-color:var(--_vlbi-pressed-bg)}.vertical-list-item:focus-visible{outline:var(--_vlbi-focus-width) solid var(--_vlbi-focus-color);outline-offset:var(--_vlbi-focus-offset)}.vertical-list-item:focus:not(:focus-visible){outline:none}.vertical-list-item__content{display:flex;flex-direction:column;flex:1;min-width:0}.vertical-list-item__label{color:var(--_vlbi-label-color);font-size:var(--_vlbi-label-font-size);font-weight:var(--_vlbi-label-font-weight);line-height:var(--_vlbi-label-line-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vertical-list-item__description{color:var(--_vlbi-description-color);font-size:var(--_vlbi-description-font-size);font-weight:var(--_vlbi-description-font-weight);line-height:var(--_vlbi-description-line-height)}.vertical-list-item__leading-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}.vertical-list-item__checkmark{flex-shrink:0;color:var(--_vlbi-icon-color);display:inline-flex;align-items:center;justify-content:center;transition:opacity var(--_vlbi-transition-duration) var(--_vlbi-transition-easing),visibility var(--_vlbi-transition-duration) var(--_vlbi-transition-easing)}.vertical-list-item__checkmark--fade{opacity:inherit}.vertical-list-item__checkmark--instant.vertical-list-item__checkmark--hidden{transition:none}.vertical-list-item__checkmark--hidden{opacity:0;visibility:hidden}.vertical-list-item__checkmark--visible{opacity:1;visibility:visible}@media (prefers-contrast:high){.vertical-list-item{border-width:2px !important}.vertical-list-item:focus-visible{outline-width:4px}}@media (prefers-reduced-motion:reduce){.vertical-list-item,.vertical-list-item__checkmark--fade{transition:none}}@media print{.vertical-list-item{background-color:transparent !important;border:1px solid currentColor !important;filter:none !important}}";var Wr=["--color-structure-canvas","--color-text-default","--color-text-muted","--color-feedback-select-text-rest","--color-feedback-select-background-rest","--color-feedback-select-text-default","--color-feedback-select-background-default","--color-feedback-error-text","--color-feedback-error-background","--border-default","--border-emphasis","--radius-normal","--space-inset-200","--space-grouped-loose","--tap-area-recommended","--accessibility-focus-width","--accessibility-focus-offset","--accessibility-focus-color","--motion-selection-transition-duration","--motion-selection-transition-easing"];function jr(){let n=getComputedStyle(document.documentElement),i=[];for(let e of Wr)n.getPropertyValue(e).trim()||i.push(e);if(i.length>0)throw new Error(`Button-VerticalList-Item: Missing required CSS variables: ${i.join(", ")}. Ensure Rosetta-generated tokens are loaded before using this component.`)}function Kr(n,i=!1){let e=n==="rest"||n==="selected"||n==="notSelected",r=ii(n)||i&&e?"selected":"rest";return`${ni(r)}px`}function oi(n){let i=n.match(/var\(([^)]+)\)/);if(!i)return n;let e=i[1].trim();return getComputedStyle(document.documentElement).getPropertyValue(e).trim()||n}var ee=class extends HTMLElement{constructor(){super();this._tokensValidated=!1;this._domCreated=!1;this._button=null;this._labelEl=null;this._descriptionEl=null;this._leadingIconContainer=null;this._leadingIconEl=null;this._checkmarkContainer=null;this._checkmarkIconEl=null;this._hoverColor="";this._pressedColor="";this._handleClick=()=>{this._onClick&&this._onClick()};this._handleFocus=()=>{this._onFocus&&this._onFocus(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))};this._handleBlur=()=>{this._onBlur&&this._onBlur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._handleClick())};this._shadowRoot=this.attachShadow({mode:"open",delegatesFocus:!0}),this._blendUtils=E()}static get observedAttributes(){return["label","description","leading-icon","visual-state","error","checkmark-transition","transition-delay","test-id","role","aria-checked","disabled"]}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._validateAndRender()},{once:!0}):this._validateAndRender()}_validateAndRender(){this._tokensValidated||(jr(),this._tokensValidated=!0),this._calculateBlendColorsWithRetry(),this._render()}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this._render()}catch(t){console.warn("ButtonVerticalListItem: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-structure-canvas").trim();if(!t)throw new Error("Button-VerticalList-Item: Required token --color-structure-canvas is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){if(e==="disabled")throw new Error('Button-VerticalList-Item: The "disabled" attribute is not supported. Per accessibility standards, unavailable options should be hidden rather than disabled. Remove the disabled attribute and hide the component instead.');t!==r&&this.isConnected&&this._tokensValidated&&this._domCreated&&this._updateDOM()}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get description(){return this.getAttribute("description")||void 0}set description(e){e?this.setAttribute("description",e):this.removeAttribute("description")}get leadingIcon(){return this.getAttribute("leading-icon")}set leadingIcon(e){e?this.setAttribute("leading-icon",e):this.removeAttribute("leading-icon")}get visualState(){let e=this.getAttribute("visual-state");return e&&["rest","selected","notSelected","checked","unchecked"].includes(e)?e:"rest"}set visualState(e){this.setAttribute("visual-state",e)}get error(){return this.getAttribute("error")==="true"}set error(e){this.setAttribute("error",e.toString())}get checkmarkTransition(){return this.getAttribute("checkmark-transition")==="instant"?"instant":"fade"}set checkmarkTransition(e){this.setAttribute("checkmark-transition",e)}get transitionDelay(){let e=this.getAttribute("transition-delay");return e?parseInt(e,10):0}set transitionDelay(e){this.setAttribute("transition-delay",e.toString())}get testID(){return this.getAttribute("test-id")||void 0}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get disabled(){return!1}set disabled(e){if(e)throw new Error('Button-VerticalList-Item: The "disabled" property is not supported. Per accessibility standards, unavailable options should be hidden rather than disabled. Set disabled to false or hide the component instead.')}get itemRole(){let e=this.getAttribute("role");return e==="radio"||e==="checkbox"?e:"button"}set itemRole(e){this.setAttribute("role",e)}get itemAriaChecked(){let e=this.getAttribute("aria-checked");if(e==="true")return!0;if(e==="false")return!1}set itemAriaChecked(e){e===void 0?this.removeAttribute("aria-checked"):this.setAttribute("aria-checked",e.toString())}set onClick(e){this._onClick=e}get onClick(){return this._onClick}set onFocus(e){this._onFocus=e}get onFocus(){return this._onFocus}set onBlur(e){this._onBlur=e}get onBlur(){return this._onBlur}_render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var t,r;let e=A.size100;this._shadowRoot.innerHTML=`
|
|
309
306
|
<style>${si}</style>
|
|
310
307
|
<button
|
|
311
308
|
class="vertical-list-item"
|
|
@@ -338,7 +335,7 @@
|
|
|
338
335
|
></div>
|
|
339
336
|
<slot></slot>
|
|
340
337
|
</div>
|
|
341
|
-
`,this._container=this._shadowRoot.querySelector(".vls-container"),this._errorMessageEl=this._shadowRoot.querySelector(".vls-error-message"),this._updateDOM()}_updateDOM(){if(!this._container)return;let e=gi(this._mode);this._container.setAttribute("role",e),this._mode==="multiSelect"?this._container.setAttribute("aria-multiselectable","true"):this._container.removeAttribute("aria-multiselectable"),this._error&&this._errorMessage?(this._container.setAttribute("aria-invalid","true"),this._container.setAttribute("aria-describedby",this._errorMessageId)):(this._container.removeAttribute("aria-invalid"),this._container.removeAttribute("aria-describedby")),this._testID?this._container.setAttribute("data-testid",this._testID):this._container.removeAttribute("data-testid"),this._errorMessageEl&&(this._error&&this._errorMessage?(this._errorMessageEl.textContent=this._errorMessage,this._errorMessageEl.style.display=""):(this._errorMessageEl.textContent="",this._errorMessageEl.style.display="none")),this._updateChildItems()}_updateChildItems(){let e=this._shadowRoot.querySelector("slot");if(!e)return;let t=e.assignedElements(),r=t.length,s=hi(this._mode,this._selectedIndex,this._selectedIndices,r),o=this._calculateTransitionDelays(r,s),a=this._calculateCheckmarkTransitions(r,s),l=this._getItemRole();this._internalState.focusedIndex>=r&&(this._internalState.focusedIndex=Math.max(0,r-1)),t.forEach((c,d)=>{if(c.tagName.toLowerCase()==="button-vertical-list-item"){let h=s[d];c.setAttribute("visual-state",h);let u=o[d];c.setAttribute("transition-delay",String(u));let m=a[d];if(c.setAttribute("checkmark-transition",m==="instant"?"instant":"fade"),this._error?c.setAttribute("error","true"):c.setAttribute("error","false"),c.setAttribute("role",l),l==="radio"||l==="checkbox"){let g=this._getItemAriaChecked(d,h);c.setAttribute("aria-checked",g?"true":"false")}else c.removeAttribute("aria-checked");d===this._internalState.focusedIndex?c.setAttribute("tabindex","0"):c.setAttribute("tabindex","-1")}})}_getItemRole(){switch(this._mode){case"tap":return"button";case"select":return"radio";case"multiSelect":return"checkbox";default:return"button"}}_getItemAriaChecked(e,t){switch(this._mode){case"select":return t==="selected";case"multiSelect":return t==="checked";default:return!1}}_calculateTransitionDelays(e,t){if(this._mode==="tap")return Array(e).fill(0);if(this._mode==="multiSelect")return ui(0,e);if(this._mode==="select"){let r=this._internalState.previousSelectedIndex,s=this._selectedIndex;return this._internalState.isFirstSelection&&s!==null?ci(e):s===null&&r!==null?di(e):r!==null&&s!==null&&r!==s?li(r,s,e):Array(e).fill(0)}return Array(e).fill(0)}_calculateCheckmarkTransitions(e,t){if(this._mode==="tap"||this._mode==="multiSelect")return Array(e).fill("animated");if(this._mode==="select"){let r=this._internalState.previousSelectedIndex,s=this._selectedIndex,o=Array(e).fill("animated");return r!==null&&s!==null&&r!==s&&(o[r]=Qe(!0,this._mode),o[s]=Qe(!1,this._mode)),s===null&&r!==null&&(o[r]=Qe(!0,this._mode)),o}return Array(e).fill("animated")}_attachEventListeners(){let e=this._shadowRoot.querySelector("slot");e&&e.addEventListener("slotchange",this._handleSlotChange),this.addEventListener("click",this._handleChildClick),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focusin",this._handleFocusIn)}_detachEventListeners(){let e=this._shadowRoot.querySelector("slot");e&&e.removeEventListener("slotchange",this._handleSlotChange),this.removeEventListener("click",this._handleChildClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focusin",this._handleFocusIn)}_handleSelectModeClick(e){let t;this._selectedIndex===e?t=null:t=e,this._internalState.previousSelectedIndex=this._selectedIndex,t===null?this._internalState.isFirstSelection=!0:this._internalState.isFirstSelection&&(this._internalState.isFirstSelection=!1),this._error&&this._required&&t!==null&&Je(this._mode,t,this._selectedIndices,this._required,this._minSelections,this._maxSelections).isValid&&(this._error=!1,this._errorMessage=void 0,this.removeAttribute("error"),this.removeAttribute("error-message"),this._domCreated&&this._updateDOM()),this._onSelectionChange&&this._onSelectionChange(t)}_handleMultiSelectModeClick(e){if(!ai(e,this._selectedIndices,this._maxSelections))return;let t;this._selectedIndices.includes(e)?t=this._selectedIndices.filter(r=>r!==e):t=[...this._selectedIndices,e],this._error&&Je(this._mode,this._selectedIndex,t,this._required,this._minSelections,this._maxSelections).isValid&&(this._error=!1,this._errorMessage=void 0,this.removeAttribute("error"),this.removeAttribute("error-message"),this._domCreated&&this._updateDOM()),this._onMultiSelectionChange&&this._onMultiSelectionChange(t)}_processKeyboardNavigation(e,t){let r=this._internalState.focusedIndex;switch(e.key){case"ArrowDown":return{newFocusIndex:(r+1)%t,shouldActivate:!1,handled:!0};case"ArrowUp":return{newFocusIndex:(r-1+t)%t,shouldActivate:!1,handled:!0};case"Home":return{newFocusIndex:0,shouldActivate:!1,handled:!0};case"End":return{newFocusIndex:t-1,shouldActivate:!1,handled:!0};case"Enter":case" ":return{newFocusIndex:r,shouldActivate:!0,handled:!0};default:return{newFocusIndex:r,shouldActivate:!1,handled:!1}}}_moveFocusToIndex(e,t){let r=t||this._getChildItems();if(r.length===0||e<0||e>=r.length)return;this._internalState.focusedIndex=e,this._updateTabIndices(r,e);let s=r[e];s&&s.focus()}_updateTabIndices(e,t){e.forEach((r,s)=>{s===t?r.setAttribute("tabindex","0"):r.setAttribute("tabindex","-1")})}_activateItem(e){switch(this._mode){case"tap":this._onItemClick&&this._onItemClick(e);break;case"select":this._handleSelectModeClick(e);break;case"multiSelect":this._handleMultiSelectModeClick(e);break}}_getChildItems(){let e=this._shadowRoot.querySelector("slot");return e?e.assignedElements().filter(t=>t.tagName.toLowerCase()==="button-vertical-list-item"):[]}};typeof customElements!="undefined"&&!customElements.get("button-vertical-list-set")&&customElements.define("button-vertical-list-set",te);var bt={type:"human",size:"md",interactive:!1,decorative:!1};var p=8;function L(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var W={size050:{name:"size050",category:"sizing",baseValue:p*.5,familyBaseValue:p,description:"Size 050 - smallest component dimension",mathematicalRelationship:`base \xD7 0.5 = ${p} \xD7 0.5 = ${p*.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*.5)},size100:{name:"size100",category:"sizing",baseValue:p,familyBaseValue:p,description:"Size 100 - base component dimension",mathematicalRelationship:`base \xD7 1 = ${p} \xD7 1 = ${p}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p)},size150:{name:"size150",category:"sizing",baseValue:p*1.5,familyBaseValue:p,description:"Size 150 - small component dimension",mathematicalRelationship:`base \xD7 1.5 = ${p} \xD7 1.5 = ${p*1.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*1.5)},size200:{name:"size200",category:"sizing",baseValue:p*2,familyBaseValue:p,description:"Size 200 - medium-small component dimension",mathematicalRelationship:`base \xD7 2 = ${p} \xD7 2 = ${p*2}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*2)},size250:{name:"size250",category:"sizing",baseValue:p*2.5,familyBaseValue:p,description:"Size 250 - medium component dimension",mathematicalRelationship:`base \xD7 2.5 = ${p} \xD7 2.5 = ${p*2.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*2.5)},size300:{name:"size300",category:"sizing",baseValue:p*3,familyBaseValue:p,description:"Size 300 - standard component dimension",mathematicalRelationship:`base \xD7 3 = ${p} \xD7 3 = ${p*3}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*3)},size400:{name:"size400",category:"sizing",baseValue:p*4,familyBaseValue:p,description:"Size 400 - large component dimension",mathematicalRelationship:`base \xD7 4 = ${p} \xD7 4 = ${p*4}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*4)},size500:{name:"size500",category:"sizing",baseValue:p*5,familyBaseValue:p,description:"Size 500 - extra-large component dimension",mathematicalRelationship:`base \xD7 5 = ${p} \xD7 5 = ${p*5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*5)},size600:{name:"size600",category:"sizing",baseValue:p*6,familyBaseValue:p,description:"Size 600 - prominent component dimension",mathematicalRelationship:`base \xD7 6 = ${p} \xD7 6 = ${p*6}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*6)},size700:{name:"size700",category:"sizing",baseValue:p*7,familyBaseValue:p,description:"Size 700 - large prominent component dimension",mathematicalRelationship:`base \xD7 7 = ${p} \xD7 7 = ${p*7}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*7)},size800:{name:"size800",category:"sizing",baseValue:p*8,familyBaseValue:p,description:"Size 800 - extra-large prominent component dimension",mathematicalRelationship:`base \xD7 8 = ${p} \xD7 8 = ${p*8}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*8)},size900:{name:"size900",category:"sizing",baseValue:p*9,familyBaseValue:p,description:"Size 900 - large prominent component dimension",mathematicalRelationship:`base \xD7 9 = ${p} \xD7 9 = ${p*9}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*9)},size1000:{name:"size1000",category:"sizing",baseValue:p*10,familyBaseValue:p,description:"Size 1000 - hero component dimension",mathematicalRelationship:`base \xD7 10 = ${p} \xD7 10 = ${p*10}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*10)},size1600:{name:"size1600",category:"sizing",baseValue:p*16,familyBaseValue:p,description:"Size 1600 - maximum component dimension",mathematicalRelationship:`base \xD7 16 = ${p} \xD7 16 = ${p*16}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*16)}},ka=Object.keys(W);var ie=G({component:"Avatar",family:"sizing",tokens:{"size.xs":{reference:W.size300,reasoning:"Extra small avatar (24px). Compact contexts \u2014 inline mentions, dense lists."},"size.sm":{reference:W.size400,reasoning:"Small avatar (32px). Comment threads, contact lists."},"size.md":{reference:W.size500,reasoning:"Medium avatar (40px). Default size \u2014 profile cards, list items."},"size.lg":{reference:W.size600,reasoning:"Large avatar (48px). Profile headers, prominent identity display."},"size.xl":{reference:W.size1000,reasoning:"Extra large avatar (80px). Profile pages, hero sections."},"size.xxl":{reference:W.size1600,reasoning:"Extra extra large avatar (128px). Full profile view, onboarding."}}}),wa=G({component:"Avatar",family:"spacing",tokens:{"icon.size.xs":{value:p*1.5,reasoning:"Icon size for xs avatar (12px = 1.5\xD7 base) maintains 50% ratio (12/24). No existing icon token at this size, so component token fills the gap."},"icon.size.xxl":{value:p*8,reasoning:"Icon size for xxl avatar (64px = 8\xD7 base) maintains 50% ratio (64/128). No existing icon token at this size, so component token fills the gap."}}});var vt=".avatar{display:flex;align-items:center;justify-content:center;box-sizing:border-box;overflow:hidden;flex-shrink:0}.avatar--human{border-radius:var(--radius-half)}.avatar--agent{aspect-ratio:1;position:relative;border:none !important;background-color:transparent}.avatar--size-xs{height:calc(var(--icon-size-050) * 1.5)}.avatar--human.avatar--size-xs{width:calc(var(--icon-size-050) * 1.5)}.avatar--size-sm{height:calc(var(--icon-size-050) * 2)}.avatar--human.avatar--size-sm{width:calc(var(--icon-size-050) * 2)}.avatar--size-md{height:calc(var(--icon-size-075) * 2)}.avatar--human.avatar--size-md{width:calc(var(--icon-size-075) * 2)}.avatar--size-lg{height:calc(var(--icon-size-100) * 2)}.avatar--human.avatar--size-lg{width:calc(var(--icon-size-100) * 2)}.avatar--size-xl{height:calc(var(--icon-size-500) * 2)}.avatar--human.avatar--size-xl{width:calc(var(--icon-size-500) * 2)}.avatar--size-xxl{height:calc(var(--icon-size-050) * 8)}.avatar--human.avatar--size-xxl{width:calc(var(--icon-size-050) * 8)}.avatar--human{background-color:var(--color-identity-human)}.avatar{border-width:var(--border-default);border-style:solid;border-color:color-mix(in oklch,var(--color-structure-border) 48%,transparent)}.avatar--size-xxl{border-width:var(--border-emphasis);border-color:var(--color-contrast-on-dark)}.avatar--interactive{cursor:pointer;transition:border-width var(--motion-focus-transition-duration) var(--motion-focus-transition-easing)}.avatar--interactive:hover{border-width:var(--border-emphasis)}@media (prefers-reduced-motion:reduce){.avatar--interactive{transition:none}}@media (prefers-contrast:high){.avatar{border:var(--border-emphasis) solid currentColor}}.avatar__icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;line-height:0}.avatar__icon--human{color:var(--color-contrast-on-dark)}.avatar__icon--agent{color:var(--color-contrast-on-dark)}.avatar__icon-svg{width:100%;height:100%;display:block}.avatar__icon .icon-base{color:inherit}.avatar__image{width:100%;height:100%;object-fit:cover;display:block}.avatar--has-image{background-color:transparent}.avatar__hexagon-svg{position:absolute;top:0;left:0;pointer-events:none}.avatar__hexagon-bg{}.avatar__hexagon-border{transition:stroke-width var(--motion-focus-transition-duration) var(--motion-focus-transition-easing)}.avatar--agent.avatar--interactive:hover .avatar__hexagon-border{stroke-width:var(--border-emphasis)}.avatar__content{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:1}.avatar--agent.avatar--size-xs{width:calc(var(--icon-size-050) * 1.5)}.avatar--agent.avatar--size-sm{width:calc(var(--icon-size-050) * 2)}.avatar--agent.avatar--size-md{width:calc(var(--icon-size-075) * 2)}.avatar--agent.avatar--size-lg{width:calc(var(--icon-size-100) * 2)}.avatar--agent.avatar--size-xl{width:calc(var(--icon-size-500) * 2)}.avatar--agent.avatar--size-xxl{width:calc(var(--icon-size-050) * 8)}";function Zr(n,i){let e=i!=null?i:n*.08,t=n/2,r=n/2,s=n,a=n*Math.cos(Math.PI/6)/2,l=s/4,c=[{x:t,y:0},{x:t+a,y:l},{x:t+a,y:3*l},{x:t,y:s},{x:t-a,y:3*l},{x:t-a,y:l}],d=[],h=c.length;for(let w=0;w<h;w++){let I=c[w],Y=c[(w+1)%h],H=c[(w-1+h)%h],$={x:H.x-I.x,y:H.y-I.y},M={x:Y.x-I.x,y:Y.y-I.y},St=Math.sqrt($.x*$.x+$.y*$.y),Et=Math.sqrt(M.x*M.x+M.y*M.y),wt={x:$.x/St,y:$.y/St},At={x:M.x/Et,y:M.y/Et},Tt={x:I.x+wt.x*e,y:I.y+wt.y*e},Fe={x:I.x+At.x*e,y:I.y+At.y*e};w===0?d.push(`M ${Fe.x.toFixed(2)} ${Fe.y.toFixed(2)}`):(d.push(`L ${Tt.x.toFixed(2)} ${Tt.y.toFixed(2)}`),d.push(`Q ${I.x.toFixed(2)} ${I.y.toFixed(2)} ${Fe.x.toFixed(2)} ${Fe.y.toFixed(2)}`))}let u=c[0],m=c[1],g=c[h-1],f={x:g.x-u.x,y:g.y-u.y},b={x:m.x-u.x,y:m.y-u.y},C=Math.sqrt(f.x*f.x+f.y*f.y),k=Math.sqrt(b.x*b.x+b.y*b.y),_={x:f.x/C,y:f.y/C},S={x:b.x/k,y:b.y/k},x={x:u.x+_.x*e,y:u.y+_.y*e},A={x:u.x+S.x*e,y:u.y+S.y*e};return d.push(`L ${x.x.toFixed(2)} ${x.y.toFixed(2)}`),d.push(`Q ${u.x.toFixed(2)} ${u.y.toFixed(2)} ${A.x.toFixed(2)} ${A.y.toFixed(2)}`),d.push("Z"),d.join(" ")}var Yr={xs:"xs",sm:13,md:20,lg:24,xl:40,xxl:"xxl"},Xr={xs:ie["size.xs"],sm:ie["size.sm"],md:ie["size.md"],lg:ie["size.lg"],xl:ie["size.xl"],xxl:ie["size.xxl"]},Jr={human:"user",agent:"settings"},j=class extends HTMLElement{static get observedAttributes(){return["type","size","src","alt","interactive","decorative","testid"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get type(){let i=this.getAttribute("type");return i==="human"||i==="agent"?i:bt.type}set type(i){this.setAttribute("type",i)}get size(){let i=this.getAttribute("size");return["xs","sm","md","lg","xl","xxl"].includes(i)?i:bt.size}set size(i){this.setAttribute("size",i)}get src(){return this.getAttribute("src")}set src(i){i?this.setAttribute("src",i):this.removeAttribute("src")}get alt(){return this.getAttribute("alt")}set alt(i){i?this.setAttribute("alt",i):this.removeAttribute("alt")}get interactive(){return this.getAttribute("interactive")==="true"}set interactive(i){i?this.setAttribute("interactive","true"):this.removeAttribute("interactive")}get decorative(){return this.getAttribute("decorative")==="true"}set decorative(i){i?this.setAttribute("decorative","true"):this.removeAttribute("decorative")}get testID(){return this.getAttribute("testid")}set testID(i){i?this.setAttribute("testid",i):this.removeAttribute("testid")}renderIconContent(i,e){let t=Jr[i],r=Yr[e];if(r==="xs"||r==="xxl"){let o=r==="xs"?"calc(var(--icon-size-050) * 0.75)":"calc(var(--icon-size-050) * 4)",a=this.getIconSVGContent(t);return`
|
|
338
|
+
`,this._container=this._shadowRoot.querySelector(".vls-container"),this._errorMessageEl=this._shadowRoot.querySelector(".vls-error-message"),this._updateDOM()}_updateDOM(){if(!this._container)return;let e=gi(this._mode);this._container.setAttribute("role",e),this._mode==="multiSelect"?this._container.setAttribute("aria-multiselectable","true"):this._container.removeAttribute("aria-multiselectable"),this._error&&this._errorMessage?(this._container.setAttribute("aria-invalid","true"),this._container.setAttribute("aria-describedby",this._errorMessageId)):(this._container.removeAttribute("aria-invalid"),this._container.removeAttribute("aria-describedby")),this._testID?this._container.setAttribute("data-testid",this._testID):this._container.removeAttribute("data-testid"),this._errorMessageEl&&(this._error&&this._errorMessage?(this._errorMessageEl.textContent=this._errorMessage,this._errorMessageEl.style.display=""):(this._errorMessageEl.textContent="",this._errorMessageEl.style.display="none")),this._updateChildItems()}_updateChildItems(){let e=this._shadowRoot.querySelector("slot");if(!e)return;let t=e.assignedElements(),r=t.length,s=hi(this._mode,this._selectedIndex,this._selectedIndices,r),o=this._calculateTransitionDelays(r,s),a=this._calculateCheckmarkTransitions(r,s),l=this._getItemRole();this._internalState.focusedIndex>=r&&(this._internalState.focusedIndex=Math.max(0,r-1)),t.forEach((c,d)=>{if(c.tagName.toLowerCase()==="button-vertical-list-item"){let h=s[d];c.setAttribute("visual-state",h);let u=o[d];c.setAttribute("transition-delay",String(u));let m=a[d];if(c.setAttribute("checkmark-transition",m==="instant"?"instant":"fade"),this._error?c.setAttribute("error","true"):c.setAttribute("error","false"),c.setAttribute("role",l),l==="radio"||l==="checkbox"){let g=this._getItemAriaChecked(d,h);c.setAttribute("aria-checked",g?"true":"false")}else c.removeAttribute("aria-checked");d===this._internalState.focusedIndex?c.setAttribute("tabindex","0"):c.setAttribute("tabindex","-1")}})}_getItemRole(){switch(this._mode){case"tap":return"button";case"select":return"radio";case"multiSelect":return"checkbox";default:return"button"}}_getItemAriaChecked(e,t){switch(this._mode){case"select":return t==="selected";case"multiSelect":return t==="checked";default:return!1}}_calculateTransitionDelays(e,t){if(this._mode==="tap")return Array(e).fill(0);if(this._mode==="multiSelect")return ui(0,e);if(this._mode==="select"){let r=this._internalState.previousSelectedIndex,s=this._selectedIndex;return this._internalState.isFirstSelection&&s!==null?ci(e):s===null&&r!==null?di(e):r!==null&&s!==null&&r!==s?li(r,s,e):Array(e).fill(0)}return Array(e).fill(0)}_calculateCheckmarkTransitions(e,t){if(this._mode==="tap"||this._mode==="multiSelect")return Array(e).fill("animated");if(this._mode==="select"){let r=this._internalState.previousSelectedIndex,s=this._selectedIndex,o=Array(e).fill("animated");return r!==null&&s!==null&&r!==s&&(o[r]=Qe(!0,this._mode),o[s]=Qe(!1,this._mode)),s===null&&r!==null&&(o[r]=Qe(!0,this._mode)),o}return Array(e).fill("animated")}_attachEventListeners(){let e=this._shadowRoot.querySelector("slot");e&&e.addEventListener("slotchange",this._handleSlotChange),this.addEventListener("click",this._handleChildClick),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focusin",this._handleFocusIn)}_detachEventListeners(){let e=this._shadowRoot.querySelector("slot");e&&e.removeEventListener("slotchange",this._handleSlotChange),this.removeEventListener("click",this._handleChildClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focusin",this._handleFocusIn)}_handleSelectModeClick(e){let t;this._selectedIndex===e?t=null:t=e,this._internalState.previousSelectedIndex=this._selectedIndex,t===null?this._internalState.isFirstSelection=!0:this._internalState.isFirstSelection&&(this._internalState.isFirstSelection=!1),this._error&&this._required&&t!==null&&Je(this._mode,t,this._selectedIndices,this._required,this._minSelections,this._maxSelections).isValid&&(this._error=!1,this._errorMessage=void 0,this.removeAttribute("error"),this.removeAttribute("error-message"),this._domCreated&&this._updateDOM()),this._onSelectionChange&&this._onSelectionChange(t)}_handleMultiSelectModeClick(e){if(!ai(e,this._selectedIndices,this._maxSelections))return;let t;this._selectedIndices.includes(e)?t=this._selectedIndices.filter(r=>r!==e):t=[...this._selectedIndices,e],this._error&&Je(this._mode,this._selectedIndex,t,this._required,this._minSelections,this._maxSelections).isValid&&(this._error=!1,this._errorMessage=void 0,this.removeAttribute("error"),this.removeAttribute("error-message"),this._domCreated&&this._updateDOM()),this._onMultiSelectionChange&&this._onMultiSelectionChange(t)}_processKeyboardNavigation(e,t){let r=this._internalState.focusedIndex;switch(e.key){case"ArrowDown":return{newFocusIndex:(r+1)%t,shouldActivate:!1,handled:!0};case"ArrowUp":return{newFocusIndex:(r-1+t)%t,shouldActivate:!1,handled:!0};case"Home":return{newFocusIndex:0,shouldActivate:!1,handled:!0};case"End":return{newFocusIndex:t-1,shouldActivate:!1,handled:!0};case"Enter":case" ":return{newFocusIndex:r,shouldActivate:!0,handled:!0};default:return{newFocusIndex:r,shouldActivate:!1,handled:!1}}}_moveFocusToIndex(e,t){let r=t||this._getChildItems();if(r.length===0||e<0||e>=r.length)return;this._internalState.focusedIndex=e,this._updateTabIndices(r,e);let s=r[e];s&&s.focus()}_updateTabIndices(e,t){e.forEach((r,s)=>{s===t?r.setAttribute("tabindex","0"):r.setAttribute("tabindex","-1")})}_activateItem(e){switch(this._mode){case"tap":this._onItemClick&&this._onItemClick(e);break;case"select":this._handleSelectModeClick(e);break;case"multiSelect":this._handleMultiSelectModeClick(e);break}}_getChildItems(){let e=this._shadowRoot.querySelector("slot");return e?e.assignedElements().filter(t=>t.tagName.toLowerCase()==="button-vertical-list-item"):[]}};typeof customElements!="undefined"&&!customElements.get("button-vertical-list-set")&&customElements.define("button-vertical-list-set",te);var bt={type:"human",size:"md",interactive:!1,decorative:!1};var p=8;function L(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var G={size050:{name:"size050",category:"sizing",baseValue:p*.5,familyBaseValue:p,description:"Size 050 - smallest component dimension",mathematicalRelationship:`base \xD7 0.5 = ${p} \xD7 0.5 = ${p*.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*.5)},size100:{name:"size100",category:"sizing",baseValue:p,familyBaseValue:p,description:"Size 100 - base component dimension",mathematicalRelationship:`base \xD7 1 = ${p} \xD7 1 = ${p}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p)},size150:{name:"size150",category:"sizing",baseValue:p*1.5,familyBaseValue:p,description:"Size 150 - small component dimension",mathematicalRelationship:`base \xD7 1.5 = ${p} \xD7 1.5 = ${p*1.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*1.5)},size200:{name:"size200",category:"sizing",baseValue:p*2,familyBaseValue:p,description:"Size 200 - medium-small component dimension",mathematicalRelationship:`base \xD7 2 = ${p} \xD7 2 = ${p*2}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*2)},size250:{name:"size250",category:"sizing",baseValue:p*2.5,familyBaseValue:p,description:"Size 250 - medium component dimension",mathematicalRelationship:`base \xD7 2.5 = ${p} \xD7 2.5 = ${p*2.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*2.5)},size300:{name:"size300",category:"sizing",baseValue:p*3,familyBaseValue:p,description:"Size 300 - standard component dimension",mathematicalRelationship:`base \xD7 3 = ${p} \xD7 3 = ${p*3}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*3)},size400:{name:"size400",category:"sizing",baseValue:p*4,familyBaseValue:p,description:"Size 400 - large component dimension",mathematicalRelationship:`base \xD7 4 = ${p} \xD7 4 = ${p*4}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*4)},size500:{name:"size500",category:"sizing",baseValue:p*5,familyBaseValue:p,description:"Size 500 - extra-large component dimension",mathematicalRelationship:`base \xD7 5 = ${p} \xD7 5 = ${p*5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*5)},size600:{name:"size600",category:"sizing",baseValue:p*6,familyBaseValue:p,description:"Size 600 - prominent component dimension",mathematicalRelationship:`base \xD7 6 = ${p} \xD7 6 = ${p*6}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*6)},size700:{name:"size700",category:"sizing",baseValue:p*7,familyBaseValue:p,description:"Size 700 - large prominent component dimension",mathematicalRelationship:`base \xD7 7 = ${p} \xD7 7 = ${p*7}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*7)},size800:{name:"size800",category:"sizing",baseValue:p*8,familyBaseValue:p,description:"Size 800 - extra-large prominent component dimension",mathematicalRelationship:`base \xD7 8 = ${p} \xD7 8 = ${p*8}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*8)},size900:{name:"size900",category:"sizing",baseValue:p*9,familyBaseValue:p,description:"Size 900 - large prominent component dimension",mathematicalRelationship:`base \xD7 9 = ${p} \xD7 9 = ${p*9}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*9)},size1000:{name:"size1000",category:"sizing",baseValue:p*10,familyBaseValue:p,description:"Size 1000 - hero component dimension",mathematicalRelationship:`base \xD7 10 = ${p} \xD7 10 = ${p*10}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*10)},size1600:{name:"size1600",category:"sizing",baseValue:p*16,familyBaseValue:p,description:"Size 1600 - maximum component dimension",mathematicalRelationship:`base \xD7 16 = ${p} \xD7 16 = ${p*16}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:L(p*16)}},ka=Object.keys(G);var ie=Q({component:"Avatar",family:"sizing",tokens:{"size.xs":{reference:G.size300,reasoning:"Extra small avatar (24px). Compact contexts \u2014 inline mentions, dense lists."},"size.sm":{reference:G.size400,reasoning:"Small avatar (32px). Comment threads, contact lists."},"size.md":{reference:G.size500,reasoning:"Medium avatar (40px). Default size \u2014 profile cards, list items."},"size.lg":{reference:G.size600,reasoning:"Large avatar (48px). Profile headers, prominent identity display."},"size.xl":{reference:G.size1000,reasoning:"Extra large avatar (80px). Profile pages, hero sections."},"size.xxl":{reference:G.size1600,reasoning:"Extra extra large avatar (128px). Full profile view, onboarding."},"icon.size.xs":{value:p*1.5,reasoning:"Icon size for xs avatar (12px = 1.5\xD7 base) maintains 50% ratio (12/24). No existing icon token at this size, so component token fills the gap."},"icon.size.xxl":{value:p*8,reasoning:"Icon size for xxl avatar (64px = 8\xD7 base) maintains 50% ratio (64/128). No existing icon token at this size, so component token fills the gap."}}});var vt=".avatar{display:flex;align-items:center;justify-content:center;box-sizing:border-box;overflow:hidden;flex-shrink:0}.avatar--human{border-radius:var(--radius-half)}.avatar--agent{aspect-ratio:1;position:relative;border:none !important;background-color:transparent}.avatar--size-xs{height:calc(var(--icon-size-050) * 1.5)}.avatar--human.avatar--size-xs{width:calc(var(--icon-size-050) * 1.5)}.avatar--size-sm{height:calc(var(--icon-size-050) * 2)}.avatar--human.avatar--size-sm{width:calc(var(--icon-size-050) * 2)}.avatar--size-md{height:calc(var(--icon-size-075) * 2)}.avatar--human.avatar--size-md{width:calc(var(--icon-size-075) * 2)}.avatar--size-lg{height:calc(var(--icon-size-100) * 2)}.avatar--human.avatar--size-lg{width:calc(var(--icon-size-100) * 2)}.avatar--size-xl{height:calc(var(--icon-size-500) * 2)}.avatar--human.avatar--size-xl{width:calc(var(--icon-size-500) * 2)}.avatar--size-xxl{height:calc(var(--icon-size-050) * 8)}.avatar--human.avatar--size-xxl{width:calc(var(--icon-size-050) * 8)}.avatar--human{background-color:var(--color-identity-human)}.avatar{border-width:var(--border-default);border-style:solid;border-color:color-mix(in oklch,var(--color-structure-border) 48%,transparent)}.avatar--size-xxl{border-width:var(--border-emphasis);border-color:var(--color-contrast-on-dark)}.avatar--interactive{cursor:pointer;transition:border-width var(--motion-focus-transition-duration) var(--motion-focus-transition-easing)}.avatar--interactive:hover{border-width:var(--border-emphasis)}@media (prefers-reduced-motion:reduce){.avatar--interactive{transition:none}}@media (prefers-contrast:high){.avatar{border:var(--border-emphasis) solid currentColor}}.avatar__icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;line-height:0}.avatar__icon--human{color:var(--color-contrast-on-dark)}.avatar__icon--agent{color:var(--color-contrast-on-dark)}.avatar__icon-svg{width:100%;height:100%;display:block}.avatar__icon .icon-base{color:inherit}.avatar__image{width:100%;height:100%;object-fit:cover;display:block}.avatar--has-image{background-color:transparent}.avatar__hexagon-svg{position:absolute;top:0;left:0;pointer-events:none}.avatar__hexagon-bg{}.avatar__hexagon-border{transition:stroke-width var(--motion-focus-transition-duration) var(--motion-focus-transition-easing)}.avatar--agent.avatar--interactive:hover .avatar__hexagon-border{stroke-width:var(--border-emphasis)}.avatar__content{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:1}.avatar--agent.avatar--size-xs{width:calc(var(--icon-size-050) * 1.5)}.avatar--agent.avatar--size-sm{width:calc(var(--icon-size-050) * 2)}.avatar--agent.avatar--size-md{width:calc(var(--icon-size-075) * 2)}.avatar--agent.avatar--size-lg{width:calc(var(--icon-size-100) * 2)}.avatar--agent.avatar--size-xl{width:calc(var(--icon-size-500) * 2)}.avatar--agent.avatar--size-xxl{width:calc(var(--icon-size-050) * 8)}";function Zr(n,i){let e=i!=null?i:n*.08,t=n/2,r=n/2,s=n,a=n*Math.cos(Math.PI/6)/2,l=s/4,c=[{x:t,y:0},{x:t+a,y:l},{x:t+a,y:3*l},{x:t,y:s},{x:t-a,y:3*l},{x:t-a,y:l}],d=[],h=c.length;for(let w=0;w<h;w++){let I=c[w],Z=c[(w+1)%h],H=c[(w-1+h)%h],$={x:H.x-I.x,y:H.y-I.y},M={x:Z.x-I.x,y:Z.y-I.y},St=Math.sqrt($.x*$.x+$.y*$.y),Et=Math.sqrt(M.x*M.x+M.y*M.y),wt={x:$.x/St,y:$.y/St},At={x:M.x/Et,y:M.y/Et},Tt={x:I.x+wt.x*e,y:I.y+wt.y*e},Fe={x:I.x+At.x*e,y:I.y+At.y*e};w===0?d.push(`M ${Fe.x.toFixed(2)} ${Fe.y.toFixed(2)}`):(d.push(`L ${Tt.x.toFixed(2)} ${Tt.y.toFixed(2)}`),d.push(`Q ${I.x.toFixed(2)} ${I.y.toFixed(2)} ${Fe.x.toFixed(2)} ${Fe.y.toFixed(2)}`))}let u=c[0],m=c[1],g=c[h-1],f={x:g.x-u.x,y:g.y-u.y},b={x:m.x-u.x,y:m.y-u.y},x=Math.sqrt(f.x*f.x+f.y*f.y),C=Math.sqrt(b.x*b.x+b.y*b.y),_={x:f.x/x,y:f.y/x},S={x:b.x/C,y:b.y/C},k={x:u.x+_.x*e,y:u.y+_.y*e},T={x:u.x+S.x*e,y:u.y+S.y*e};return d.push(`L ${k.x.toFixed(2)} ${k.y.toFixed(2)}`),d.push(`Q ${u.x.toFixed(2)} ${u.y.toFixed(2)} ${T.x.toFixed(2)} ${T.y.toFixed(2)}`),d.push("Z"),d.join(" ")}var Yr={xs:"xs",sm:13,md:20,lg:24,xl:40,xxl:"xxl"},Xr={xs:ie["size.xs"],sm:ie["size.sm"],md:ie["size.md"],lg:ie["size.lg"],xl:ie["size.xl"],xxl:ie["size.xxl"]},Jr={human:"user",agent:"settings"},W=class extends HTMLElement{static get observedAttributes(){return["type","size","src","alt","interactive","decorative","testid"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get type(){let i=this.getAttribute("type");return i==="human"||i==="agent"?i:bt.type}set type(i){this.setAttribute("type",i)}get size(){let i=this.getAttribute("size");return["xs","sm","md","lg","xl","xxl"].includes(i)?i:bt.size}set size(i){this.setAttribute("size",i)}get src(){return this.getAttribute("src")}set src(i){i?this.setAttribute("src",i):this.removeAttribute("src")}get alt(){return this.getAttribute("alt")}set alt(i){i?this.setAttribute("alt",i):this.removeAttribute("alt")}get interactive(){return this.getAttribute("interactive")==="true"}set interactive(i){i?this.setAttribute("interactive","true"):this.removeAttribute("interactive")}get decorative(){return this.getAttribute("decorative")==="true"}set decorative(i){i?this.setAttribute("decorative","true"):this.removeAttribute("decorative")}get testID(){return this.getAttribute("testid")}set testID(i){i?this.setAttribute("testid",i):this.removeAttribute("testid")}renderIconContent(i,e){let t=Jr[i],r=Yr[e];if(r==="xs"||r==="xxl"){let o=r==="xs"?"calc(var(--icon-size-050) * 0.75)":"calc(var(--icon-size-050) * 4)",a=this.getIconSVGContent(t);return`
|
|
342
339
|
<span class="avatar__icon avatar__icon--${i}" style="width: ${o}; height: ${o};">
|
|
343
340
|
<svg
|
|
344
341
|
viewBox="0 0 24 24"
|
|
@@ -364,7 +361,7 @@
|
|
|
364
361
|
alt="${r}"
|
|
365
362
|
loading="lazy"
|
|
366
363
|
/>
|
|
367
|
-
`}handleImageError(){this.removeAttribute("src")}escapeHtml(i){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return i.replace(/[&<>"']/g,t=>e[t])}renderContent(i,e,t,r){return i==="agent"?this.renderIconContent(i,e):t?this.renderImageContent(t,r):this.renderIconContent(i,e)}render(){let i=this.type,e=this.size,t=this.src,r=this.alt,s=this.interactive,o=this.decorative,a=this.testID,l=i==="human"&&t,c=["avatar",`avatar--${i}`,`avatar--size-${e}`,s?"avatar--interactive":"",l?"avatar--has-image":""].filter(Boolean).join(" "),d=a?` data-testid="${this.escapeHtml(a)}"`:"",h=o?' aria-hidden="true"':"";t&&!
|
|
364
|
+
`}handleImageError(){this.removeAttribute("src")}escapeHtml(i){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return i.replace(/[&<>"']/g,t=>e[t])}renderContent(i,e,t,r){return i==="agent"?this.renderIconContent(i,e):t?this.renderImageContent(t,r):this.renderIconContent(i,e)}render(){let i=this.type,e=this.size,t=this.src,r=this.alt,s=this.interactive,o=this.decorative,a=this.testID,l=i==="human"&&t,c=["avatar",`avatar--${i}`,`avatar--size-${e}`,s?"avatar--interactive":"",l?"avatar--has-image":""].filter(Boolean).join(" "),d=a?` data-testid="${this.escapeHtml(a)}"`:"",h=o?' aria-hidden="true"':"";i==="human"&&t&&r==null&&!o&&typeof console!="undefined"&&console.warn('AvatarBaseElement: "alt" is required when "src" is provided. Add an alt description of the image; or, if this avatar is purely decorative (non-informative), set the "decorative" prop to hide it from screen readers.'),i==="agent"?this._shadowRoot.innerHTML=`
|
|
368
365
|
<style>
|
|
369
366
|
:host {
|
|
370
367
|
display: inline-block;
|
|
@@ -424,7 +421,7 @@
|
|
|
424
421
|
${m}
|
|
425
422
|
</div>
|
|
426
423
|
</div>
|
|
427
|
-
`}attachImageErrorHandler(){let i=this._shadowRoot.querySelector(".avatar__image");i&&i.addEventListener("error",()=>this.handleImageError(),{once:!0})}};customElements.get("avatar-base")||customElements.define("avatar-base",
|
|
424
|
+
`}attachImageErrorHandler(){let i=this._shadowRoot.querySelector(".avatar__image");i&&i.addEventListener("error",()=>this.handleImageError(),{once:!0})}};customElements.get("avatar-base")||customElements.define("avatar-base",W);var mi={size:"md",truncate:!1},bi={sm:{typography:"typography.labelXs",paddingVertical:"space.inset.none",paddingHorizontal:"space.inset.050",iconSize:13,iconGap:"space.grouped.minimal"},md:{typography:"typography.labelSm",paddingVertical:"space.inset.050",paddingHorizontal:"space.inset.100",iconSize:20,iconGap:"space.grouped.tight"},lg:{typography:"typography.labelMd",paddingVertical:"space.inset.100",paddingHorizontal:"space.inset.150",iconSize:24,iconGap:"space.grouped.tight"}};var Qr=Q({component:"BadgeLabelBase",family:"spacing",tokens:{maxWidth:{value:v*15,reasoning:"Maximum width for truncated badges; allows ~12-15 characters before ellipsis while maintaining compact badge appearance. Value follows spacing family pattern (8 \xD7 15 = 120px) but exceeds standard spacing scale, requiring component-level definition."}}});function vi(){return Qr.maxWidth}var fi=".badge-label{display:inline-flex;align-items:center;box-sizing:border-box;border-radius:var(--radius-subtle);background-color:var(--color-structure-surface);color:var(--color-text-default);pointer-events:none;user-select:none;outline:none}.badge-label--sm{font-family:var(--typography-label-xs-font-family);font-size:var(--typography-label-xs-font-size);line-height:var(--typography-label-xs-line-height);font-weight:var(--typography-label-xs-font-weight);letter-spacing:var(--typography-label-xs-letter-spacing);padding-top:0;padding-bottom:0;padding-left:var(--space-050);padding-right:var(--space-050);gap:var(--space-025)}.badge-label--md{font-family:var(--typography-label-sm-font-family);font-size:var(--typography-label-sm-font-size);line-height:var(--typography-label-sm-line-height);font-weight:var(--typography-label-sm-font-weight);letter-spacing:var(--typography-label-sm-letter-spacing);padding-top:var(--space-050);padding-bottom:var(--space-050);padding-left:var(--space-100);padding-right:var(--space-100);gap:var(--space-050)}.badge-label--lg{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);line-height:var(--typography-label-md-line-height);font-weight:var(--typography-label-md-font-weight);letter-spacing:var(--typography-label-md-letter-spacing);padding-top:var(--space-100);padding-bottom:var(--space-100);padding-left:var(--space-150);padding-right:var(--space-150);gap:var(--space-050)}.badge-label__text{font:inherit;color:inherit;user-select:none}.badge-label__text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--badgelabelbase-max-width,120px)}.badge-label__icon{flex-shrink:0;color:inherit;display:inline-flex;align-items:center;justify-content:center}@media (prefers-contrast:high){.badge-label{border:1px solid currentColor}}@media (prefers-reduced-motion:reduce){.badge-label{transition:none}}@media print{.badge-label{background-color:transparent;border:1px solid currentColor}}";var re=class extends HTMLElement{static get observedAttributes(){return["label","size","icon","truncate","test-id"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get label(){return this.getAttribute("label")||""}set label(i){this.setAttribute("label",i)}get size(){let i=this.getAttribute("size");return i==="sm"||i==="md"||i==="lg"?i:mi.size}set size(i){this.setAttribute("size",i)}get icon(){return this.getAttribute("icon")}set icon(i){i?this.setAttribute("icon",i):this.removeAttribute("icon")}get truncate(){return this.getAttribute("truncate")==="true"}set truncate(i){i?this.setAttribute("truncate","true"):this.removeAttribute("truncate")}get testID(){return this.getAttribute("test-id")}set testID(i){i?this.setAttribute("test-id",i):this.removeAttribute("test-id")}render(){let i=this.label,e=this.size,t=this.icon,r=this.truncate,s=this.testID,a=bi[e].iconSize,l=["badge-label",`badge-label--${e}`].join(" "),c=["badge-label__text",r?"badge-label__text--truncate":""].filter(Boolean).join(" "),d=s?` data-testid="${this.escapeHtml(s)}"`:"",h=r?` title="${this.escapeHtml(i)}"`:"",u=t?`
|
|
428
425
|
<span class="badge-label__icon" aria-hidden="true">
|
|
429
426
|
<icon-base name="${t}" size="${a}" color="inherit"></icon-base>
|
|
430
427
|
</span>
|
|
@@ -470,19 +467,19 @@
|
|
|
470
467
|
<span class="badge-count-notification__text">${this.escapeHtml(r)}</span>
|
|
471
468
|
${d}
|
|
472
469
|
</span>
|
|
473
|
-
`,this._previousCount=this.count}escapeHtml(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,r=>t[r])}};customElements.get("badge-count-notification")||customElements.define("badge-count-notification",se);var xi=["checked","indeterminate","label","size","label-align","label-typography","helper-text","error-message","test-id","name","value"],tt={checked:!1,indeterminate:!1,size:"md",labelAlign:"center",labelTypography:"inherit"};var ki=":host{display:inline-block}.checkbox{display:inline-flex;align-items:center;position:relative}.checkbox__touch-target{display:inline-flex;align-items:center;cursor:pointer;user-select:none;min-height:var(--tap-area-recommended);box-sizing:border-box}.checkbox--align-top{align-items:flex-start}.checkbox--align-top .checkbox__touch-target{align-items:flex-start}.checkbox--sm .checkbox__touch-target{gap:var(--space-grouped-normal)}.checkbox--sm .checkbox__box{width:calc(var(--icon-size-050)+var(--space-inset-050) * 2);height:calc(var(--icon-size-050)+var(--space-inset-050) * 2);border-radius:var(--radius-subtle)}.checkbox--sm .checkbox__label{font-family:var(--typography-label-sm-font-family);font-size:var(--typography-label-sm-font-size);font-weight:var(--typography-label-sm-font-weight);line-height:var(--typography-label-sm-line-height);letter-spacing:var(--typography-label-sm-letter-spacing)}.checkbox--md .checkbox__touch-target{gap:var(--space-grouped-normal)}.checkbox--md .checkbox__box{width:calc(var(--icon-size-075)+var(--space-inset-075) * 2);height:calc(var(--icon-size-075)+var(--space-inset-075) * 2);border-radius:var(--radius-small)}.checkbox--md .checkbox__label{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing)}.checkbox--lg .checkbox__touch-target{gap:var(--space-grouped-loose)}.checkbox--lg .checkbox__box{width:calc(var(--icon-size-100)+var(--space-inset-100) * 2);height:calc(var(--icon-size-100)+var(--space-inset-100) * 2);border-radius:var(--radius-small)}.checkbox--lg .checkbox__label{font-family:var(--typography-label-lg-font-family);font-size:var(--typography-label-lg-font-size);font-weight:var(--typography-label-lg-font-weight);line-height:var(--typography-label-lg-line-height);letter-spacing:var(--typography-label-lg-letter-spacing)}.checkbox--label-sm .checkbox__label{font-family:var(--typography-label-sm-font-family);font-size:var(--typography-label-sm-font-size);font-weight:var(--typography-label-sm-font-weight);line-height:var(--typography-label-sm-line-height);letter-spacing:var(--typography-label-sm-letter-spacing)}.checkbox--label-md .checkbox__label{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing)}.checkbox--label-lg .checkbox__label{font-family:var(--typography-label-lg-font-family);font-size:var(--typography-label-lg-font-size);font-weight:var(--typography-label-lg-font-weight);line-height:var(--typography-label-lg-line-height);letter-spacing:var(--typography-label-lg-letter-spacing)}.checkbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.checkbox__box{flex-shrink:0;display:flex;align-items:center;justify-content:center;border:var(--border-emphasis) solid var(--color-feedback-select-border-default);background-color:transparent;transition:background-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),border-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing);box-sizing:border-box}.checkbox__box icon-base{color:var(--color-contrast-on-light);display:flex}.checkbox--checked .checkbox__box{background-color:var(--color-feedback-select-background-rest);border-color:var(--color-feedback-select-border-rest)}.checkbox--indeterminate .checkbox__box{background-color:var(--color-feedback-select-background-rest);border-color:var(--color-feedback-select-border-rest)}.checkbox--error .checkbox__box{border-color:var(--color-feedback-error-border)}.checkbox__touch-target:hover .checkbox__box{border-color:var(--_checkbox-hover-border,var(--color-feedback-select-border-rest))}.checkbox--checked .checkbox__touch-target:hover .checkbox__box,.checkbox--indeterminate .checkbox__touch-target:hover .checkbox__box{border-color:var(--color-feedback-select-border-rest)}.checkbox-container{display:flex;flex-direction:column}.checkbox__content{display:flex;flex-direction:column;min-width:0}.checkbox__label{color:var(--color-text-default)}.checkbox__helper{display:block;margin-block-start:var(--space-grouped-minimal);margin-block-end:0;margin-inline:0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-text-muted)}.checkbox__error{display:block;margin-block-start:var(--space-grouped-minimal);margin-block-end:0;margin-inline:0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-feedback-error-text)}.checkbox__input:focus-visible~.checkbox__touch-target .checkbox__box{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset)}@media (prefers-contrast:high){.checkbox__box{border:var(--border-emphasis) solid currentColor}.checkbox__input:focus-visible~.checkbox__touch-target .checkbox__box{outline-width:var(--border-heavy)}}@media (prefers-reduced-motion:reduce){.checkbox__box{transition:none}}@media print{.checkbox__box{background-color:transparent !important;border-color:var(--color-print-default) !important}.checkbox__label{color:var(--color-print-default) !important}}";var en=0,Ci={sm:13,md:20,lg:24},oe=class extends HTMLElement{constructor(){super();this._input=null;this._form=null;this.onChange=null;this._hoverBorderColor="";this._onFormReset=()=>{this.checked=!1,this.indeterminate=!1,this._input&&(this._input.checked=!1,this._input.indeterminate=!1)};this._onInputChange=()=>{var t;if(!this._input)return;let e=this._input.checked;e?this.setAttribute("checked",""):this.removeAttribute("checked"),this.indeterminate&&this.removeAttribute("indeterminate"),(t=this.onChange)==null||t.call(this,e),this.dispatchEvent(new CustomEvent("change",{detail:{checked:e},bubbles:!0,composed:!0}))};this._shadowRoot=this.attachShadow({mode:"open"}),this._generatedId=`checkbox-${++en}`,this._blendUtils=E()}static get observedAttributes(){return[...xi]}connectedCallback(){this._calculateBlendColors(),this._attachToForm(),this.render(),this._attachListeners()}disconnectedCallback(){this._detachListeners(),this._detachFromForm()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&(this.render(),this._attachListeners())}get checked(){return this.hasAttribute("checked")}set checked(e){e?this.setAttribute("checked",""):this.removeAttribute("checked")}get indeterminate(){return this.hasAttribute("indeterminate")}set indeterminate(e){e?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="md"||e==="lg"?e:tt.size}set size(e){this.setAttribute("size",e)}get labelAlign(){let e=this.getAttribute("label-align");return e==="center"||e==="top"?e:tt.labelAlign}set labelAlign(e){this.setAttribute("label-align",e)}get labelTypography(){let e=this.getAttribute("label-typography");return e==="inherit"||e==="sm"||e==="md"||e==="lg"?e:tt.labelTypography}set labelTypography(e){this.setAttribute("label-typography",e)}get helperText(){return this.getAttribute("helper-text")}set helperText(e){e?this.setAttribute("helper-text",e):this.removeAttribute("helper-text")}get errorMessage(){return this.getAttribute("error-message")}set errorMessage(e){e?this.setAttribute("error-message",e):this.removeAttribute("error-message")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get name(){return this.getAttribute("name")}set name(e){e?this.setAttribute("name",e):this.removeAttribute("name")}get value(){return this.getAttribute("value")||"on"}set value(e){this.setAttribute("value",e)}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-feedback-select-border-default").trim();t&&(this._hoverBorderColor=this._blendUtils.hoverColor(t))}_attachToForm(){this._form=this.closest("form"),this._form&&this._form.addEventListener("reset",this._onFormReset)}_detachFromForm(){this._form&&(this._form.removeEventListener("reset",this._onFormReset),this._form=null)}render(){let e=this.getAttribute("id")||this._generatedId,t=`${e}-input`,r=`${e}-helper`,s=`${e}-error`,o=this.label,a=this.size,l=this.labelAlign,c=this.labelTypography,d=this.checked,h=this.indeterminate,u=this.helperText,m=this.errorMessage,g=!!m,f=this.testID,b=this.name,C=this.value,k=["checkbox",`checkbox--${a}`,l==="top"?"checkbox--align-top":"",c!=="inherit"?`checkbox--label-${c}`:"",d?"checkbox--checked":"",h?"checkbox--indeterminate":"",g?"checkbox--error":""].filter(Boolean).join(" "),_="";h?_=D({name:"minus",size:Ci[a],color:"inherit"}):d&&(_=D({name:"check",size:Ci[a],color:"inherit"}));let S=f?` data-testid="${f}"`:"",x=[];m&&x.push(s),u&&x.push(r);let A=x.length>0?` aria-describedby="${x.join(" ")}"`:"",w=u?`<span class="checkbox__helper" id="${r}">${u}</span>`:"",I=m?`<span class="checkbox__error" id="${s}" role="alert">${m}</span>`:"",Y=b?` name="${b}"`:"",H=`${e}-label`;this._shadowRoot.innerHTML=`
|
|
470
|
+
`,this._previousCount=this.count}escapeHtml(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,r=>t[r])}};customElements.get("badge-count-notification")||customElements.define("badge-count-notification",se);var xi=["checked","indeterminate","label","size","label-align","label-typography","helper-text","error-message","test-id","name","value"],tt={checked:!1,indeterminate:!1,size:"md",labelAlign:"center",labelTypography:"inherit"};var ki=":host{display:inline-block}.checkbox{display:inline-flex;align-items:center;position:relative}.checkbox__touch-target{display:inline-flex;align-items:center;cursor:pointer;user-select:none;min-height:var(--tap-area-recommended);box-sizing:border-box}.checkbox--align-top{align-items:flex-start}.checkbox--align-top .checkbox__touch-target{align-items:flex-start}.checkbox--sm .checkbox__touch-target{gap:var(--space-grouped-normal)}.checkbox--sm .checkbox__box{width:calc(var(--icon-size-050)+var(--space-inset-050) * 2);height:calc(var(--icon-size-050)+var(--space-inset-050) * 2);border-radius:var(--radius-subtle)}.checkbox--sm .checkbox__label{font-family:var(--typography-label-sm-font-family);font-size:var(--typography-label-sm-font-size);font-weight:var(--typography-label-sm-font-weight);line-height:var(--typography-label-sm-line-height);letter-spacing:var(--typography-label-sm-letter-spacing)}.checkbox--md .checkbox__touch-target{gap:var(--space-grouped-normal)}.checkbox--md .checkbox__box{width:calc(var(--icon-size-075)+var(--space-inset-075) * 2);height:calc(var(--icon-size-075)+var(--space-inset-075) * 2);border-radius:var(--radius-small)}.checkbox--md .checkbox__label{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing)}.checkbox--lg .checkbox__touch-target{gap:var(--space-grouped-loose)}.checkbox--lg .checkbox__box{width:calc(var(--icon-size-100)+var(--space-inset-100) * 2);height:calc(var(--icon-size-100)+var(--space-inset-100) * 2);border-radius:var(--radius-small)}.checkbox--lg .checkbox__label{font-family:var(--typography-label-lg-font-family);font-size:var(--typography-label-lg-font-size);font-weight:var(--typography-label-lg-font-weight);line-height:var(--typography-label-lg-line-height);letter-spacing:var(--typography-label-lg-letter-spacing)}.checkbox--label-sm .checkbox__label{font-family:var(--typography-label-sm-font-family);font-size:var(--typography-label-sm-font-size);font-weight:var(--typography-label-sm-font-weight);line-height:var(--typography-label-sm-line-height);letter-spacing:var(--typography-label-sm-letter-spacing)}.checkbox--label-md .checkbox__label{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing)}.checkbox--label-lg .checkbox__label{font-family:var(--typography-label-lg-font-family);font-size:var(--typography-label-lg-font-size);font-weight:var(--typography-label-lg-font-weight);line-height:var(--typography-label-lg-line-height);letter-spacing:var(--typography-label-lg-letter-spacing)}.checkbox__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.checkbox__box{flex-shrink:0;display:flex;align-items:center;justify-content:center;border:var(--border-emphasis) solid var(--color-feedback-select-border-default);background-color:transparent;transition:background-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),border-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing);box-sizing:border-box}.checkbox__box icon-base{color:var(--color-contrast-on-light);display:flex}.checkbox--checked .checkbox__box{background-color:var(--color-feedback-select-background-rest);border-color:var(--color-feedback-select-border-rest)}.checkbox--indeterminate .checkbox__box{background-color:var(--color-feedback-select-background-rest);border-color:var(--color-feedback-select-border-rest)}.checkbox--error .checkbox__box{border-color:var(--color-feedback-error-border)}.checkbox__touch-target:hover .checkbox__box{border-color:var(--_checkbox-hover-border,var(--color-feedback-select-border-rest))}.checkbox--checked .checkbox__touch-target:hover .checkbox__box,.checkbox--indeterminate .checkbox__touch-target:hover .checkbox__box{border-color:var(--color-feedback-select-border-rest)}.checkbox-container{display:flex;flex-direction:column}.checkbox__content{display:flex;flex-direction:column;min-width:0}.checkbox__label{color:var(--color-text-default)}.checkbox__helper{display:block;margin-block-start:var(--space-grouped-minimal);margin-block-end:0;margin-inline:0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-text-muted)}.checkbox__error{display:block;margin-block-start:var(--space-grouped-minimal);margin-block-end:0;margin-inline:0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-feedback-error-text)}.checkbox__input:focus-visible~.checkbox__touch-target .checkbox__box{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset)}@media (prefers-contrast:high){.checkbox__box{border:var(--border-emphasis) solid currentColor}.checkbox__input:focus-visible~.checkbox__touch-target .checkbox__box{outline-width:var(--border-heavy)}}@media (prefers-reduced-motion:reduce){.checkbox__box{transition:none}}@media print{.checkbox__box{background-color:transparent !important;border-color:var(--color-print-default) !important}.checkbox__label{color:var(--color-print-default) !important}}";var en=0,Ci={sm:13,md:20,lg:24},oe=class extends HTMLElement{constructor(){super();this._input=null;this._form=null;this.onChange=null;this._hoverBorderColor="";this._onFormReset=()=>{this.checked=!1,this.indeterminate=!1,this._input&&(this._input.checked=!1,this._input.indeterminate=!1)};this._onInputChange=()=>{var t;if(!this._input)return;let e=this._input.checked;e?this.setAttribute("checked",""):this.removeAttribute("checked"),this.indeterminate&&this.removeAttribute("indeterminate"),(t=this.onChange)==null||t.call(this,e),this.dispatchEvent(new CustomEvent("change",{detail:{checked:e},bubbles:!0,composed:!0}))};this._shadowRoot=this.attachShadow({mode:"open"}),this._generatedId=`checkbox-${++en}`,this._blendUtils=E()}static get observedAttributes(){return[...xi]}connectedCallback(){this._calculateBlendColors(),this._attachToForm(),this.render(),this._attachListeners()}disconnectedCallback(){this._detachListeners(),this._detachFromForm()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&(this.render(),this._attachListeners())}get checked(){return this.hasAttribute("checked")}set checked(e){e?this.setAttribute("checked",""):this.removeAttribute("checked")}get indeterminate(){return this.hasAttribute("indeterminate")}set indeterminate(e){e?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="md"||e==="lg"?e:tt.size}set size(e){this.setAttribute("size",e)}get labelAlign(){let e=this.getAttribute("label-align");return e==="center"||e==="top"?e:tt.labelAlign}set labelAlign(e){this.setAttribute("label-align",e)}get labelTypography(){let e=this.getAttribute("label-typography");return e==="inherit"||e==="sm"||e==="md"||e==="lg"?e:tt.labelTypography}set labelTypography(e){this.setAttribute("label-typography",e)}get helperText(){return this.getAttribute("helper-text")}set helperText(e){e?this.setAttribute("helper-text",e):this.removeAttribute("helper-text")}get errorMessage(){return this.getAttribute("error-message")}set errorMessage(e){e?this.setAttribute("error-message",e):this.removeAttribute("error-message")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get name(){return this.getAttribute("name")}set name(e){e?this.setAttribute("name",e):this.removeAttribute("name")}get value(){return this.getAttribute("value")||"on"}set value(e){this.setAttribute("value",e)}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-feedback-select-border-default").trim();t&&(this._hoverBorderColor=this._blendUtils.hoverColor(t))}_attachToForm(){this._form=this.closest("form"),this._form&&this._form.addEventListener("reset",this._onFormReset)}_detachFromForm(){this._form&&(this._form.removeEventListener("reset",this._onFormReset),this._form=null)}render(){let e=this.getAttribute("id")||this._generatedId,t=`${e}-input`,r=`${e}-helper`,s=`${e}-error`,o=this.label,a=this.size,l=this.labelAlign,c=this.labelTypography,d=this.checked,h=this.indeterminate,u=this.helperText,m=this.errorMessage,g=!!m,f=this.testID,b=this.name,x=this.value,C=["checkbox",`checkbox--${a}`,l==="top"?"checkbox--align-top":"",c!=="inherit"?`checkbox--label-${c}`:"",d?"checkbox--checked":"",h?"checkbox--indeterminate":"",g?"checkbox--error":""].filter(Boolean).join(" "),_="";h?_=D({name:"minus",size:Ci[a],color:"inherit"}):d&&(_=D({name:"check",size:Ci[a],color:"inherit"}));let S=f?` data-testid="${f}"`:"",k=[];m&&k.push(s),u&&k.push(r);let T=k.length>0?` aria-describedby="${k.join(" ")}"`:"",w=u?`<span class="checkbox__helper" id="${r}">${u}</span>`:"",I=m?`<span class="checkbox__error" id="${s}" role="alert">${m}</span>`:"",Z=b?` name="${b}"`:"",H=`${e}-label`;this._shadowRoot.innerHTML=`
|
|
474
471
|
<style>${ki}</style>
|
|
475
472
|
<div class="checkbox-container">
|
|
476
|
-
<div class="${
|
|
473
|
+
<div class="${C}"${S}>
|
|
477
474
|
<input
|
|
478
475
|
type="checkbox"
|
|
479
476
|
class="checkbox__input"
|
|
480
|
-
id="${t}"${
|
|
481
|
-
value="${
|
|
477
|
+
id="${t}"${Z}
|
|
478
|
+
value="${x}"
|
|
482
479
|
aria-labelledby="${H}"
|
|
483
480
|
${d?"checked":""}
|
|
484
481
|
${h?'aria-checked="mixed"':`aria-checked="${d}"`}
|
|
485
|
-
${g?'aria-invalid="true"':""}${
|
|
482
|
+
${g?'aria-invalid="true"':""}${T}
|
|
486
483
|
/>
|
|
487
484
|
<label for="${t}" class="checkbox__touch-target">
|
|
488
485
|
<span class="checkbox__box">
|
|
@@ -507,7 +504,7 @@
|
|
|
507
504
|
label-typography="sm"
|
|
508
505
|
></input-checkbox-base>
|
|
509
506
|
</div>
|
|
510
|
-
`,this._baseCheckbox=this._shadowRoot.querySelector("input-checkbox-base"),this._updateBaseCheckbox()}_updateBaseCheckbox(){this._baseCheckbox&&(this.label&&this._baseCheckbox.setAttribute("label",this.label),this.checked?this._baseCheckbox.setAttribute("checked",""):this._baseCheckbox.removeAttribute("checked"),this.helperText?this._baseCheckbox.setAttribute("helper-text",this.helperText):this._baseCheckbox.removeAttribute("helper-text"),this.errorMessage?this._baseCheckbox.setAttribute("error-message",this.errorMessage):this._baseCheckbox.removeAttribute("error-message"),this.testID?this._baseCheckbox.setAttribute("test-id",this.testID):this._baseCheckbox.removeAttribute("test-id"),this.name?this._baseCheckbox.setAttribute("name",this.name):this._baseCheckbox.removeAttribute("name"),this._baseCheckbox.setAttribute("value",this.value),this._baseCheckbox.removeAttribute("indeterminate"))}_attachListeners(){var e;(e=this._baseCheckbox)==null||e.addEventListener("change",this._onBaseChange)}_detachListeners(){var e;(e=this._baseCheckbox)==null||e.removeEventListener("change",this._onBaseChange)}};customElements.get("input-checkbox-legal")||customElements.define("input-checkbox-legal",ae);var Le=["label","icon","test-id"];var Ve=".chip-base{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-grouped-tight);padding-block:var(--space-inset-075);padding-inline:var(--space-inset-150);font-family:var(--typography-button-sm-font-family);font-size:var(--typography-button-sm-font-size);font-weight:var(--typography-button-sm-font-weight);line-height:var(--typography-button-sm-line-height);letter-spacing:var(--typography-button-sm-letter-spacing);background-color:var(--color-structure-surface);color:var(--color-text-default);border:var(--border-default) solid var(--color-structure-border);border-radius:var(--radius-full);cursor:pointer;user-select:none;transition:background-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),border-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),box-shadow var(--motion-selection-transition-duration) var(--motion-selection-transition-easing);outline:none;position:relative;flex-shrink:0}.chip-base::before{content:'';position:absolute;inset:calc((var(--tap-area-recommended) - 32px) / -2);pointer-events:auto}.chip-base__icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:inherit}.chip-base__label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.chip-base:hover{background-color:var(--_chip-hover-bg);border-color:var(--color-action-primary)}.chip-base:active{background-color:var(--_chip-pressed-bg);border-color:var(--color-action-primary)}.chip-base:focus-visible{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset)}.chip-base:focus:not(:focus-visible){outline:none}@media (prefers-contrast:high){.chip-base{border:var(--border-emphasis) solid currentColor}.chip-base:focus-visible{outline-width:var(--border-heavy)}}@media (prefers-reduced-motion:reduce){.chip-base{transition:none}}@media print{.chip-base{background-color:transparent !important;color:var(--color-print-default) !important;border:var(--border-default) solid var(--color-print-default) !important;box-shadow:none !important}.chip-base__icon{display:none}}";var le=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._chipEl=null;this._labelEl=null;this._iconContainer=null;this._iconEl=null;this._hoverColor="";this._pressedColor="";this._onPress=null;this._handleClick=e=>{this._onPress&&this._onPress(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._onPress&&this._onPress(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0})))};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return Le}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._calculateBlendColorsWithRetry(),this._render()},{once:!0}):(this._calculateBlendColorsWithRetry(),this._render())}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this._render()}catch(t){console.warn("ChipBase: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-structure-surface").trim();if(!t)throw new Error("ChipBase: Required token --color-structure-surface is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._domCreated&&this._updateDOM()}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get icon(){return this.getAttribute("icon")}set icon(e){e?this.setAttribute("icon",e):this.removeAttribute("icon")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get onPress(){return this._onPress}set onPress(e){this._onPress=e}_render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var l;let e=this.label,t=this.icon,r=this.testID,s=
|
|
507
|
+
`,this._baseCheckbox=this._shadowRoot.querySelector("input-checkbox-base"),this._updateBaseCheckbox()}_updateBaseCheckbox(){this._baseCheckbox&&(this.label&&this._baseCheckbox.setAttribute("label",this.label),this.checked?this._baseCheckbox.setAttribute("checked",""):this._baseCheckbox.removeAttribute("checked"),this.helperText?this._baseCheckbox.setAttribute("helper-text",this.helperText):this._baseCheckbox.removeAttribute("helper-text"),this.errorMessage?this._baseCheckbox.setAttribute("error-message",this.errorMessage):this._baseCheckbox.removeAttribute("error-message"),this.testID?this._baseCheckbox.setAttribute("test-id",this.testID):this._baseCheckbox.removeAttribute("test-id"),this.name?this._baseCheckbox.setAttribute("name",this.name):this._baseCheckbox.removeAttribute("name"),this._baseCheckbox.setAttribute("value",this.value),this._baseCheckbox.removeAttribute("indeterminate"))}_attachListeners(){var e;(e=this._baseCheckbox)==null||e.addEventListener("change",this._onBaseChange)}_detachListeners(){var e;(e=this._baseCheckbox)==null||e.removeEventListener("change",this._onBaseChange)}};customElements.get("input-checkbox-legal")||customElements.define("input-checkbox-legal",ae);var Le=["label","icon","test-id"];var Ve=".chip-base{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-grouped-tight);padding-block:var(--space-inset-075);padding-inline:var(--space-inset-150);font-family:var(--typography-button-sm-font-family);font-size:var(--typography-button-sm-font-size);font-weight:var(--typography-button-sm-font-weight);line-height:var(--typography-button-sm-line-height);letter-spacing:var(--typography-button-sm-letter-spacing);background-color:var(--color-structure-surface);color:var(--color-text-default);border:var(--border-default) solid var(--color-structure-border);border-radius:var(--radius-full);cursor:pointer;user-select:none;transition:background-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),border-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing),box-shadow var(--motion-selection-transition-duration) var(--motion-selection-transition-easing);outline:none;position:relative;flex-shrink:0}.chip-base::before{content:'';position:absolute;inset:calc((var(--tap-area-recommended) - 32px) / -2);pointer-events:auto}.chip-base__icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:inherit}.chip-base__label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.chip-base:hover{background-color:var(--_chip-hover-bg);border-color:var(--color-action-primary)}.chip-base:active{background-color:var(--_chip-pressed-bg);border-color:var(--color-action-primary)}.chip-base:focus-visible{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset)}.chip-base:focus:not(:focus-visible){outline:none}@media (prefers-contrast:high){.chip-base{border:var(--border-emphasis) solid currentColor}.chip-base:focus-visible{outline-width:var(--border-heavy)}}@media (prefers-reduced-motion:reduce){.chip-base{transition:none}}@media print{.chip-base{background-color:transparent !important;color:var(--color-print-default) !important;border:var(--border-default) solid var(--color-print-default) !important;box-shadow:none !important}.chip-base__icon{display:none}}";var le=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._chipEl=null;this._labelEl=null;this._iconContainer=null;this._iconEl=null;this._hoverColor="";this._pressedColor="";this._onPress=null;this._handleClick=e=>{this._onPress&&this._onPress(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._onPress&&this._onPress(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0})))};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return Le}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._calculateBlendColorsWithRetry(),this._render()},{once:!0}):(this._calculateBlendColorsWithRetry(),this._render())}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this._render()}catch(t){console.warn("ChipBase: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-structure-surface").trim();if(!t)throw new Error("ChipBase: Required token --color-structure-surface is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._domCreated&&this._updateDOM()}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get icon(){return this.getAttribute("icon")}set icon(e){e?this.setAttribute("icon",e):this.removeAttribute("icon")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get onPress(){return this._onPress}set onPress(e){this._onPress=e}_render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var l;let e=this.label,t=this.icon,r=this.testID,s=A.size075,o=r?` data-testid="${r}"`:"",a=`
|
|
511
508
|
--_chip-hover-bg: ${this._hoverColor};
|
|
512
509
|
--_chip-pressed-bg: ${this._pressedColor};
|
|
513
510
|
`;this._shadowRoot.innerHTML=`
|
|
@@ -525,7 +522,7 @@
|
|
|
525
522
|
</span>
|
|
526
523
|
<span class="chip-base__label">${e}</span>
|
|
527
524
|
</div>
|
|
528
|
-
`,this._chipEl=this._shadowRoot.querySelector(".chip-base"),this._labelEl=this._shadowRoot.querySelector(".chip-base__label"),this._iconContainer=this._shadowRoot.querySelector(".chip-base__icon"),this._iconEl=((l=this._iconContainer)==null?void 0:l.querySelector("icon-base"))||null}_updateDOM(){if(!this._chipEl||!this._labelEl)return;let e=this.label,t=this.icon,r=this.testID,s=
|
|
525
|
+
`,this._chipEl=this._shadowRoot.querySelector(".chip-base"),this._labelEl=this._shadowRoot.querySelector(".chip-base__label"),this._iconContainer=this._shadowRoot.querySelector(".chip-base__icon"),this._iconEl=((l=this._iconContainer)==null?void 0:l.querySelector("icon-base"))||null}_updateDOM(){if(!this._chipEl||!this._labelEl)return;let e=this.label,t=this.icon,r=this.testID,s=A.size075;this._chipEl.setAttribute("aria-label",e),r?this._chipEl.setAttribute("data-testid",r):this._chipEl.removeAttribute("data-testid"),this._chipEl.style.setProperty("--_chip-hover-bg",this._hoverColor),this._chipEl.style.setProperty("--_chip-pressed-bg",this._pressedColor),this._labelEl.textContent=e,this._iconContainer&&this._iconEl&&(t?(this._iconContainer.style.display="",this._iconEl.setAttribute("name",t),this._iconEl.setAttribute("size",String(s))):this._iconContainer.style.display="none")}_attachEventListeners(){this._chipEl&&(this._chipEl.addEventListener("click",this._handleClick),this._chipEl.addEventListener("keydown",this._handleKeyDown))}_detachEventListeners(){this._chipEl&&(this._chipEl.removeEventListener("click",this._handleClick),this._chipEl.removeEventListener("keydown",this._handleKeyDown))}};customElements.get("chip-base")||customElements.define("chip-base",le);var wi=".chip-filter--selected{background-color:var(--color-feedback-select-background-rest);border-color:var(--color-feedback-select-text-rest);color:var(--color-feedback-select-text-rest)}.chip-filter--selected:hover{background-color:var(--color-feedback-select-background-rest);border-color:var(--color-feedback-select-text-rest);filter:brightness(0.95)}.chip-filter--selected:active{background-color:var(--color-feedback-select-background-rest);border-color:var(--color-feedback-select-text-rest);filter:brightness(0.9)}.chip-filter--selected:focus-visible{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset)}@media (prefers-contrast:high){.chip-filter--selected{border:var(--border-emphasis) solid currentColor;background-color:Highlight;color:HighlightText}}@media (prefers-reduced-motion:reduce){.chip-filter--selected{transition:none;filter:none}.chip-filter--selected:hover,.chip-filter--selected:active{filter:none}}";var rn=[...Le,"selected"],ce=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._chipEl=null;this._labelEl=null;this._iconContainer=null;this._iconEl=null;this._hoverColor="";this._pressedColor="";this._onPress=null;this._onSelectionChange=null;this._handleClick=e=>{let t=!this.selected;this.selected=t,this._onSelectionChange&&this._onSelectionChange(t),this._onPress&&this._onPress(),this.dispatchEvent(new CustomEvent("selectionchange",{bubbles:!0,composed:!0,detail:{selected:t}})),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._handleClick(e))};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return rn}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._calculateBlendColorsWithRetry(),this._render()},{once:!0}):(this._calculateBlendColorsWithRetry(),this._render())}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this._render()}catch(t){console.warn("ChipFilter: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-structure-surface").trim();if(!t)throw new Error("ChipFilter: Required token --color-structure-surface is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._domCreated&&this._updateDOM()}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get icon(){return this.getAttribute("icon")}set icon(e){e?this.setAttribute("icon",e):this.removeAttribute("icon")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get selected(){return this.hasAttribute("selected")}set selected(e){e?this.setAttribute("selected",""):this.removeAttribute("selected")}get onPress(){return this._onPress}set onPress(e){this._onPress=e}get onSelectionChange(){return this._onSelectionChange}set onSelectionChange(e){this._onSelectionChange=e}_render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var u;let e=this.label,t=this.icon,r=this.testID,s=this.selected,o=A.size075,a=r?` data-testid="${r}"`:"",l=`
|
|
529
526
|
--_chip-hover-bg: ${this._hoverColor};
|
|
530
527
|
--_chip-pressed-bg: ${this._pressedColor};
|
|
531
528
|
`,c=s?"check":t,d=s||t,h=s?" chip-filter--selected":"";this._shadowRoot.innerHTML=`
|
|
@@ -544,7 +541,7 @@
|
|
|
544
541
|
</span>
|
|
545
542
|
<span class="chip-base__label">${e}</span>
|
|
546
543
|
</div>
|
|
547
|
-
`,this._chipEl=this._shadowRoot.querySelector(".chip-filter"),this._labelEl=this._shadowRoot.querySelector(".chip-base__label"),this._iconContainer=this._shadowRoot.querySelector(".chip-base__icon"),this._iconEl=((u=this._iconContainer)==null?void 0:u.querySelector("icon-base"))||null}_updateDOM(){if(!this._chipEl||!this._labelEl)return;let e=this.label,t=this.icon,r=this.testID,s=this.selected,o=
|
|
544
|
+
`,this._chipEl=this._shadowRoot.querySelector(".chip-filter"),this._labelEl=this._shadowRoot.querySelector(".chip-base__label"),this._iconContainer=this._shadowRoot.querySelector(".chip-base__icon"),this._iconEl=((u=this._iconContainer)==null?void 0:u.querySelector("icon-base"))||null}_updateDOM(){if(!this._chipEl||!this._labelEl)return;let e=this.label,t=this.icon,r=this.testID,s=this.selected,o=A.size075;this._chipEl.setAttribute("aria-label",e),this._chipEl.setAttribute("aria-pressed",String(s)),r?this._chipEl.setAttribute("data-testid",r):this._chipEl.removeAttribute("data-testid"),this._chipEl.style.setProperty("--_chip-hover-bg",this._hoverColor),this._chipEl.style.setProperty("--_chip-pressed-bg",this._pressedColor),s?this._chipEl.classList.add("chip-filter--selected"):this._chipEl.classList.remove("chip-filter--selected"),this._labelEl.textContent=e;let a=s?"check":t,l=s||t;this._iconContainer&&this._iconEl&&(l?(this._iconContainer.style.display="",this._iconEl.setAttribute("name",a||""),this._iconEl.setAttribute("size",String(o))):this._iconContainer.style.display="none")}_attachEventListeners(){this._chipEl&&(this._chipEl.addEventListener("click",this._handleClick),this._chipEl.addEventListener("keydown",this._handleKeyDown))}_detachEventListeners(){this._chipEl&&(this._chipEl.removeEventListener("click",this._handleClick),this._chipEl.removeEventListener("keydown",this._handleKeyDown))}};customElements.get("chip-filter")||customElements.define("chip-filter",ce);var Ai=".chip-input__trailing-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:inherit;pointer-events:none}.chip-input__dismiss-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-contrast:high){.chip-input__trailing-icon{color:currentColor}}@media print{.chip-input__trailing-icon{display:none}}";var nn=Le,de=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._chipEl=null;this._labelEl=null;this._leadingIconContainer=null;this._leadingIconEl=null;this._trailingIconContainer=null;this._dismissLabelEl=null;this._hoverColor="";this._pressedColor="";this._onDismiss=null;this._handleClick=e=>{this._onDismiss&&this._onDismiss(),this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))};this._handleKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._handleClick(e))};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return nn}connectedCallback(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this._calculateBlendColorsWithRetry(),this._render()},{once:!0}):(this._calculateBlendColorsWithRetry(),this._render())}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch(e){requestAnimationFrame(()=>{try{this._calculateBlendColors(),this._render()}catch(t){console.warn("ChipInput: Could not calculate blend colors, using CSS fallbacks",t)}})}}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-structure-surface").trim();if(!t)throw new Error("ChipInput: Required token --color-structure-surface is missing from CSS custom properties");this._hoverColor=this._blendUtils.hoverColor(t),this._pressedColor=this._blendUtils.pressedColor(t)}disconnectedCallback(){this._detachEventListeners()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._domCreated&&this._updateDOM()}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get icon(){return this.getAttribute("icon")}set icon(e){e?this.setAttribute("icon",e):this.removeAttribute("icon")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}get onDismiss(){return this._onDismiss}set onDismiss(e){this._onDismiss=e}_render(){this._domCreated?this._updateDOM():(this._createDOM(),this._domCreated=!0,this._attachEventListeners())}_createDOM(){var c;let e=this.label,t=this.icon,r=this.testID,s=A.size075,o=r?` data-testid="${r}"`:"",a=`
|
|
548
545
|
--_chip-hover-bg: ${this._hoverColor};
|
|
549
546
|
--_chip-pressed-bg: ${this._pressedColor};
|
|
550
547
|
`,l=`Remove ${e}`;this._shadowRoot.innerHTML=`
|
|
@@ -566,7 +563,7 @@
|
|
|
566
563
|
</span>
|
|
567
564
|
<span class="chip-input__dismiss-label">${l}</span>
|
|
568
565
|
</div>
|
|
569
|
-
`,this._chipEl=this._shadowRoot.querySelector(".chip-input"),this._labelEl=this._shadowRoot.querySelector(".chip-base__label"),this._leadingIconContainer=this._shadowRoot.querySelector(".chip-base__icon"),this._leadingIconEl=((c=this._leadingIconContainer)==null?void 0:c.querySelector("icon-base"))||null,this._trailingIconContainer=this._shadowRoot.querySelector(".chip-input__trailing-icon"),this._dismissLabelEl=this._shadowRoot.querySelector(".chip-input__dismiss-label")}_updateDOM(){if(!this._chipEl||!this._labelEl)return;let e=this.label,t=this.icon,r=this.testID,s=
|
|
566
|
+
`,this._chipEl=this._shadowRoot.querySelector(".chip-input"),this._labelEl=this._shadowRoot.querySelector(".chip-base__label"),this._leadingIconContainer=this._shadowRoot.querySelector(".chip-base__icon"),this._leadingIconEl=((c=this._leadingIconContainer)==null?void 0:c.querySelector("icon-base"))||null,this._trailingIconContainer=this._shadowRoot.querySelector(".chip-input__trailing-icon"),this._dismissLabelEl=this._shadowRoot.querySelector(".chip-input__dismiss-label")}_updateDOM(){if(!this._chipEl||!this._labelEl)return;let e=this.label,t=this.icon,r=this.testID,s=A.size075,o=`Remove ${e}`;this._chipEl.setAttribute("aria-label",o),r?this._chipEl.setAttribute("data-testid",r):this._chipEl.removeAttribute("data-testid"),this._chipEl.style.setProperty("--_chip-hover-bg",this._hoverColor),this._chipEl.style.setProperty("--_chip-pressed-bg",this._pressedColor),this._labelEl.textContent=e,this._leadingIconContainer&&this._leadingIconEl&&(t?(this._leadingIconContainer.style.display="",this._leadingIconEl.setAttribute("name",t),this._leadingIconEl.setAttribute("size",String(s))):this._leadingIconContainer.style.display="none"),this._dismissLabelEl&&(this._dismissLabelEl.textContent=o)}_attachEventListeners(){this._chipEl&&(this._chipEl.addEventListener("click",this._handleClick),this._chipEl.addEventListener("keydown",this._handleKeyDown))}_detachEventListeners(){this._chipEl&&(this._chipEl.removeEventListener("click",this._handleClick),this._chipEl.removeEventListener("keydown",this._handleKeyDown))}};customElements.get("chip-input")||customElements.define("chip-input",de);var _t={"surface.primary":"color.structure.surface.primary","surface.secondary":"color.structure.surface.secondary","surface.tertiary":"color.structure.surface.tertiary"},Ti={none:"",container:"shadow.container"};var Ii={"border.default":"color.structure.border","border.subtle":"color.structure.border.subtle"};var sn=`
|
|
570
567
|
:host {
|
|
571
568
|
display: block;
|
|
572
569
|
box-sizing: border-box;
|
|
@@ -624,21 +621,21 @@
|
|
|
624
621
|
--_card-print-shadow: none;
|
|
625
622
|
}
|
|
626
623
|
}
|
|
627
|
-
`,De=class De extends HTMLElement{constructor(){super();this._hoverColor="";this._pressedColor="";this._onPressCallback=null;this._handleKeyDown=e=>{if(this.getAttribute("interactive")!=="true")return;let t=this.getAttribute("role")||"button";e.key==="Enter"?(e.preventDefault(),this._triggerOnPress()):e.key===" "&&t==="button"&&(e.preventDefault(),this._triggerOnPress())};this._handleClick=()=>{this.getAttribute("interactive")==="true"&&this._triggerOnPress()};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return["padding","padding-vertical","padding-horizontal","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","background","shadow","border","border-color","border-radius","semantic","accessibility-label","interactive","role","data-testid"]}connectedCallback(){this._calculateBlendColors(),this._setupInteractivity(),this.render()}disconnectedCallback(){this._removeInteractivity()}_calculateBlendColors(){let e=getComputedStyle(document.documentElement),t=this.getAttribute("background"),r="";if(t){let s=_t[t];if(s){let o=`--${s.replace(/\./g,"-")}`;r=e.getPropertyValue(o).trim()}}if(r||(r=e.getPropertyValue("--color-structure-surface-primary").trim()),r||(r=e.getPropertyValue("--color-structure-surface").trim()),!r){this._hoverColor="",this._pressedColor="";return}this._hoverColor=this._blendUtils.hoverColor(r),this._pressedColor=this._blendUtils.pressedColor(r)}_setupInteractivity(){this.getAttribute("interactive")==="true"&&(this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("click",this._handleClick))}_removeInteractivity(){this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("click",this._handleClick)}_triggerOnPress(){this._onPressCallback&&this._onPressCallback(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0}))}set onPress(e){this._onPressCallback=e}get onPress(){return this._onPressCallback}attributeChangedCallback(e,t,r){t!==r&&(e==="background"&&this._calculateBlendColors(),e==="interactive"&&(this._removeInteractivity(),this._setupInteractivity()),this.render())}_buildBaseAttributes(){var g,f,b,C,
|
|
624
|
+
`,De=class De extends HTMLElement{constructor(){super();this._hoverColor="";this._pressedColor="";this._onPressCallback=null;this._handleKeyDown=e=>{if(this.getAttribute("interactive")!=="true")return;let t=this.getAttribute("role")||"button";e.key==="Enter"?(e.preventDefault(),this._triggerOnPress()):e.key===" "&&t==="button"&&(e.preventDefault(),this._triggerOnPress())};this._handleClick=()=>{this.getAttribute("interactive")==="true"&&this._triggerOnPress()};this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=E()}static get observedAttributes(){return["padding","padding-vertical","padding-horizontal","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","background","shadow","border","border-color","border-radius","semantic","accessibility-label","interactive","role","data-testid"]}connectedCallback(){this._calculateBlendColors(),this._setupInteractivity(),this.render()}disconnectedCallback(){this._removeInteractivity()}_calculateBlendColors(){let e=getComputedStyle(document.documentElement),t=this.getAttribute("background"),r="";if(t){let s=_t[t];if(s){let o=`--${s.replace(/\./g,"-")}`;r=e.getPropertyValue(o).trim()}}if(r||(r=e.getPropertyValue("--color-structure-surface-primary").trim()),r||(r=e.getPropertyValue("--color-structure-surface").trim()),!r){this._hoverColor="",this._pressedColor="";return}this._hoverColor=this._blendUtils.hoverColor(r),this._pressedColor=this._blendUtils.pressedColor(r)}_setupInteractivity(){this.getAttribute("interactive")==="true"&&(this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("click",this._handleClick))}_removeInteractivity(){this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("click",this._handleClick)}_triggerOnPress(){this._onPressCallback&&this._onPressCallback(),this.dispatchEvent(new CustomEvent("press",{bubbles:!0,composed:!0}))}set onPress(e){this._onPressCallback=e}get onPress(){return this._onPressCallback}attributeChangedCallback(e,t,r){t!==r&&(e==="background"&&this._calculateBlendColors(),e==="interactive"&&(this._removeInteractivity(),this._setupInteractivity()),this.render())}_buildBaseAttributes(){var g,f,b,x,C,_,S;let e=De.DEFAULTS,t=[],r=(g=this.getAttribute("padding"))!=null?g:e.padding;r!=="none"&&t.push(`padding="${r}"`);let s=[["padding-vertical","padding-vertical"],["padding-horizontal","padding-horizontal"],["padding-block-start","padding-block-start"],["padding-block-end","padding-block-end"],["padding-inline-start","padding-inline-start"],["padding-inline-end","padding-inline-end"]];for(let[k,T]of s){let w=this.getAttribute(k);w&&w!=="none"&&t.push(`${T}="${w}"`)}let o=(f=this.getAttribute("border"))!=null?f:e.border;o!=="none"&&t.push(`border="${o}"`);let a=(b=this.getAttribute("border-radius"))!=null?b:e.borderRadius;t.push(`border-radius="${a}"`);let c=this.getAttribute("interactive")==="true"?"div":(x=this.getAttribute("semantic"))!=null?x:e.semantic;t.push(`semantic="${c}"`);let d=this.getAttribute("accessibility-label");d&&t.push(`accessibility-label="${d.replace(/"/g,""")}"`);let h=(C=this.getAttribute("background"))!=null?C:e.background,u=_t[h];u&&t.push(`background="${u}"`);let m=(_=this.getAttribute("shadow"))!=null?_:e.shadow;if(m!=="none"){let k=Ti[m];k&&t.push(`shadow="${k}"`)}if(o!=="none"){let k=(S=this.getAttribute("border-color"))!=null?S:e.borderColor,T=Ii[k];T&&t.push(`border-color="${T}"`)}return t.join(" ")}render(){let e=this.getAttribute("interactive")==="true",t=this.getAttribute("role"),r=t!==null?t:De.DEFAULTS.role,s=this.getAttribute("data-testid"),o=["card-interaction-wrapper"];e&&o.push("card-interaction-wrapper--interactive");let a=[];e&&(a.push(`role="${r}"`),a.push('tabindex="0"')),s&&a.push(`data-testid="${s.replace(/"/g,""")}"`);let l=e?`--_card-hover-bg: ${this._hoverColor}; --_card-pressed-bg: ${this._pressedColor};`:"",c=this._buildBaseAttributes();this._shadowRoot.innerHTML=`
|
|
628
625
|
<style>${sn}</style>
|
|
629
626
|
<div class="${o.join(" ")}" ${a.join(" ")} style="${l}">
|
|
630
627
|
<container-base ${c}>
|
|
631
628
|
<slot></slot>
|
|
632
629
|
</container-base>
|
|
633
630
|
</div>
|
|
634
|
-
`}};De.DEFAULTS={padding:"150",background:"surface.primary",shadow:"container",border:"none",borderColor:"border.default",borderRadius:"normal",semantic:"div",role:"button"};var
|
|
631
|
+
`}};De.DEFAULTS={padding:"150",background:"surface.primary",shadow:"container",border:"none",borderColor:"border.default",borderRadius:"normal",semantic:"div",role:"button"};var j=De;customElements.get("container-card-base")||customElements.define("container-card-base",j);var zi=["selected","label","value","name","size","label-align","helper-text","error-message","test-id"],yt={selected:!1,size:"md",labelAlign:"center"};var Ri=":host{display:inline-block}.radio-container{display:flex;flex-direction:column;gap:var(--space-grouped-tight)}.radio{display:inline-flex;align-items:center;position:relative}.radio__touch-target{display:inline-flex;align-items:center;cursor:pointer;user-select:none;min-height:var(--tap-area-recommended);box-sizing:border-box}.radio--align-center{align-items:center}.radio--align-center .radio__touch-target{align-items:center}.radio--align-top{align-items:flex-start}.radio--align-top .radio__touch-target{align-items:flex-start}.radio--sm .radio__touch-target{gap:var(--space-grouped-normal)}.radio--sm .radio__circle{width:calc(var(--icon-size-050)+var(--space-inset-050) * 2);height:calc(var(--icon-size-050)+var(--space-inset-050) * 2)}.radio--sm .radio__dot{width:var(--icon-size-050);height:var(--icon-size-050)}.radio--sm .radio__label{font-family:var(--typography-label-sm-font-family);font-size:var(--typography-label-sm-font-size);font-weight:var(--typography-label-sm-font-weight);line-height:var(--typography-label-sm-line-height);letter-spacing:var(--typography-label-sm-letter-spacing)}.radio--md .radio__touch-target{gap:var(--space-grouped-normal)}.radio--md .radio__circle{width:calc(var(--icon-size-075)+var(--space-inset-075) * 2);height:calc(var(--icon-size-075)+var(--space-inset-075) * 2)}.radio--md .radio__dot{width:var(--icon-size-075);height:var(--icon-size-075)}.radio--md .radio__label{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing)}.radio--lg .radio__touch-target{gap:var(--space-grouped-loose)}.radio--lg .radio__circle{width:calc(var(--icon-size-100)+var(--space-inset-100) * 2);height:calc(var(--icon-size-100)+var(--space-inset-100) * 2)}.radio--lg .radio__dot{width:var(--icon-size-100);height:var(--icon-size-100)}.radio--lg .radio__label{font-family:var(--typography-label-lg-font-family);font-size:var(--typography-label-lg-font-size);font-weight:var(--typography-label-lg-font-weight);line-height:var(--typography-label-lg-line-height);letter-spacing:var(--typography-label-lg-letter-spacing)}.radio__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.radio__circle{flex-shrink:0;display:flex;align-items:center;justify-content:center;border:var(--border-emphasis) solid var(--color-feedback-select-border-default);border-radius:var(--radius-full);background-color:transparent;transition:border-color var(--motion-selection-transition-duration) var(--motion-selection-transition-easing);box-sizing:border-box}.radio__dot{border-radius:var(--radius-full);background-color:var(--color-feedback-select-background-rest);transform:scale(0);transition:transform var(--motion-selection-transition-duration) var(--motion-selection-transition-easing)}.radio--selected .radio__circle{border-color:var(--color-feedback-select-border-rest)}.radio--selected .radio__dot{transform:scale(1)}.radio--error .radio__circle{border-color:var(--color-feedback-error-border)}.radio__touch-target:hover .radio__circle{border-color:var(--_radio-hover-border,var(--color-feedback-select-border-rest))}.radio--selected .radio__touch-target:hover .radio__circle{border-color:var(--color-feedback-select-border-rest)}.radio__input:focus-visible~.radio__touch-target .radio__circle{outline:var(--accessibility-focus-width) solid var(--accessibility-focus-color);outline-offset:var(--accessibility-focus-offset)}.radio__content{display:flex;flex-direction:column;min-width:0}.radio__label{color:var(--color-text-default)}.radio__helper{display:block;margin-block-start:var(--space-grouped-minimal);margin-block-end:0;margin-inline:0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-text-muted)}.radio__error{display:block;margin-block-start:var(--space-grouped-minimal);margin-block-end:0;margin-inline:0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-feedback-error-text)}@media (prefers-contrast:high){.radio__circle{border:var(--border-emphasis) solid currentColor}.radio__input:focus-visible~.radio__touch-target .radio__circle{outline-width:var(--border-heavy)}}@media (prefers-reduced-motion:reduce){.radio__circle,.radio__dot{transition:none}}@media print{.radio__circle{background-color:transparent !important;border-color:var(--color-print-default) !important}.radio__dot{background-color:var(--color-print-default) !important}.radio__label{color:var(--color-print-default) !important}}";var on=0,K=class extends HTMLElement{constructor(){super();this._input=null;this._form=null;this.onSelect=null;this._hoverBorderColor="";this._onFormReset=()=>{this.selected=!1,this._input&&(this._input.checked=!1),this._updateFormValue()};this._onInputChange=()=>{var t;if(!this._input)return;let e=this._input.checked;e?this.setAttribute("selected",""):this.removeAttribute("selected"),this._updateFormValue(),e&&((t=this.onSelect)==null||t.call(this,this.value)),this.dispatchEvent(new CustomEvent("select",{detail:{value:this.value,selected:e},bubbles:!0,composed:!0}))};this._shadowRoot=this.attachShadow({mode:"open"}),this._generatedId=`radio-${++on}`,this._internals=this.attachInternals(),this._blendUtils=E()}static get observedAttributes(){return[...zi]}connectedCallback(){this._calculateBlendColors(),this._attachToForm(),this.render(),this._attachListeners(),this._updateFormValue()}disconnectedCallback(){this._detachListeners(),this._detachFromForm()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&(this.render(),this._attachListeners(),(e==="selected"||e==="value"||e==="name")&&this._updateFormValue())}get selected(){return this.hasAttribute("selected")}set selected(e){e?this.setAttribute("selected",""):this.removeAttribute("selected")}get label(){return this.getAttribute("label")||""}set label(e){this.setAttribute("label",e)}get value(){return this.getAttribute("value")||""}set value(e){this.setAttribute("value",e)}get name(){return this.getAttribute("name")}set name(e){e?this.setAttribute("name",e):this.removeAttribute("name")}get size(){let e=this.getAttribute("size");return e==="sm"||e==="md"||e==="lg"?e:yt.size}set size(e){this.setAttribute("size",e)}get labelAlign(){let e=this.getAttribute("label-align");return e==="center"||e==="top"?e:yt.labelAlign}set labelAlign(e){this.setAttribute("label-align",e)}get helperText(){return this.getAttribute("helper-text")}set helperText(e){e?this.setAttribute("helper-text",e):this.removeAttribute("helper-text")}get errorMessage(){return this.getAttribute("error-message")}set errorMessage(e){e?this.setAttribute("error-message",e):this.removeAttribute("error-message")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}_calculateBlendColors(){let t=getComputedStyle(document.documentElement).getPropertyValue("--color-feedback-select-border-default").trim();t&&(this._hoverBorderColor=this._blendUtils.hoverColor(t))}_updateFormValue(){var s;if(typeof((s=this._internals)==null?void 0:s.setFormValue)!="function")return;let e=this.name,t=this.value,r=this.selected;e&&r?this._internals.setFormValue(t):this._internals.setFormValue(null)}_attachToForm(){this._form=this.closest("form"),this._form&&this._form.addEventListener("reset",this._onFormReset)}_detachFromForm(){this._form&&(this._form.removeEventListener("reset",this._onFormReset),this._form=null)}render(){let e=this.getAttribute("id")||this._generatedId,t=`${e}-input`,r=`${e}-helper`,s=`${e}-error`,o=this.label,a=this.size,l=this.labelAlign,c=this.selected,d=this.helperText,h=this.errorMessage,u=!!h,m=this.testID,g=this.name,f=this.value,b=["radio",`radio--${a}`,l==="top"?"radio--align-top":"",c?"radio--selected":"",u?"radio--error":""].filter(Boolean).join(" "),x=m?` data-testid="${m}"`:"",C=[];h&&C.push(s),d&&C.push(r);let _=C.length>0?` aria-describedby="${C.join(" ")}"`:"",S=d?`<span class="radio__helper" id="${r}">${d}</span>`:"",k=h?`<span class="radio__error" id="${s}" role="alert">${h}</span>`:"",T=g?` name="${g}"`:"",w=`${e}-label`;this._shadowRoot.innerHTML=`
|
|
635
632
|
<style>${Ri}</style>
|
|
636
633
|
<div class="radio-container">
|
|
637
|
-
<div class="${b}"${
|
|
634
|
+
<div class="${b}"${x}>
|
|
638
635
|
<input
|
|
639
636
|
type="radio"
|
|
640
637
|
class="radio__input"
|
|
641
|
-
id="${t}"${
|
|
638
|
+
id="${t}"${T}
|
|
642
639
|
value="${f}"
|
|
643
640
|
aria-labelledby="${w}"
|
|
644
641
|
${c?"checked":""}
|
|
@@ -655,9 +652,9 @@
|
|
|
655
652
|
</label>
|
|
656
653
|
</div>
|
|
657
654
|
${S}
|
|
658
|
-
${
|
|
655
|
+
${k}
|
|
659
656
|
</div>
|
|
660
|
-
`,this._input=this._shadowRoot.querySelector(".radio__input"),this._input&&(this._input.checked=c);let I=this._shadowRoot.querySelector(".radio");I&&this._hoverBorderColor&&I.style.setProperty("--_radio-hover-border",this._hoverBorderColor)}_attachListeners(){var e;(e=this._input)==null||e.addEventListener("change",this._onInputChange)}_detachListeners(){var e;(e=this._input)==null||e.removeEventListener("change",this._onInputChange)}};
|
|
657
|
+
`,this._input=this._shadowRoot.querySelector(".radio__input"),this._input&&(this._input.checked=c);let I=this._shadowRoot.querySelector(".radio");I&&this._hoverBorderColor&&I.style.setProperty("--_radio-hover-border",this._hoverBorderColor)}_attachListeners(){var e;(e=this._input)==null||e.addEventListener("change",this._onInputChange)}_detachListeners(){var e;(e=this._input)==null||e.removeEventListener("change",this._onInputChange)}};K.formAssociated=!0;customElements.get("input-radio-base")||customElements.define("input-radio-base",K);var Bi=["selected-value","required","error","error-message","size","test-id"],xt={selectedValue:null,required:!1,error:!1,size:"md"};var Li=":host{display:block}.radio-set{display:flex;flex-direction:column;gap:var(--space-grouped-normal)}.radio-set__error{display:none;margin-block:0;margin-inline:0;padding:0;font-family:var(--typography-caption-font-family);font-size:var(--typography-caption-font-size);line-height:var(--typography-caption-line-height);font-weight:var(--typography-caption-font-weight);letter-spacing:var(--typography-caption-letter-spacing);color:var(--color-feedback-error-text)}.radio-set--error .radio-set__error{display:block}@media (prefers-reduced-motion:reduce){.radio-set{transition:none}}@media print{.radio-set__error{color:var(--color-print-default) !important}}";var an=0,ue=class extends HTMLElement{constructor(){super();this._container=null;this._errorMessageEl=null;this.onSelectionChange=null;this._focusedIndex=0;this._onChildSelect=this._handleChildSelect.bind(this);this._handleKeyDown=e=>{let t=this._getChildRadios(),r=t.length;if(r===0)return;let s=this._processKeyboardNavigation(e,r);s.handled&&(e.preventDefault(),s.newFocusIndex!==this._focusedIndex&&this._moveFocusToIndex(s.newFocusIndex,t),s.shouldSelect&&this._selectRadioAtIndex(this._focusedIndex,t))};this._handleFocusIn=e=>{let r=e.target.closest("input-radio-base");if(!r)return;let s=this._getChildRadios(),o=s.indexOf(r);o!==-1&&o!==this._focusedIndex&&(this._focusedIndex=o,this._updateTabIndices(s,o))};this._shadowRoot=this.attachShadow({mode:"open",delegatesFocus:!0}),this._errorMessageId=`radio-set-error-${++an}`}static get observedAttributes(){return[...Bi]}connectedCallback(){this._createDOM(),this.addEventListener("select",this._onChildSelect),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focusin",this._handleFocusIn),this._syncChildrenSelection(),this._initializeTabIndices()}disconnectedCallback(){this.removeEventListener("select",this._onChildSelect),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focusin",this._handleFocusIn)}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&(this._updateDOM(),(e==="selected-value"||e==="size")&&this._syncChildrenSelection(),e==="selected-value"&&this._initializeTabIndices())}get selectedValue(){var e;return(e=this.getAttribute("selected-value"))!=null?e:xt.selectedValue}set selectedValue(e){e!==null?this.setAttribute("selected-value",e):this.removeAttribute("selected-value")}get required(){return this.hasAttribute("required")}set required(e){e?this.setAttribute("required",""):this.removeAttribute("required")}get error(){return this.hasAttribute("error")}set error(e){e?this.setAttribute("error",""):this.removeAttribute("error")}get errorMessage(){return this.getAttribute("error-message")}set errorMessage(e){e?this.setAttribute("error-message",e):this.removeAttribute("error-message")}get size(){let e=this.getAttribute("size");return e==="sm"||e==="md"||e==="lg"?e:xt.size}set size(e){this.setAttribute("size",e)}get testID(){return this.getAttribute("test-id")}validate(){return this.required&&(this.selectedValue===null||this.selectedValue==="")?(this.error=!0,this.errorMessage||(this.errorMessage="Please select an option"),!1):(this.error=!1,!0)}checkValidity(){return!(this.required&&(this.selectedValue===null||this.selectedValue===""))}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}_createDOM(){let e=this.testID,t=e?` data-testid="${e}"`:"";this._shadowRoot.innerHTML=`
|
|
661
658
|
<style>${Li}</style>
|
|
662
659
|
<div
|
|
663
660
|
class="radio-set"
|
|
@@ -683,14 +680,14 @@
|
|
|
683
680
|
<span class="label__text">${this.escapeHtml(i)}</span>
|
|
684
681
|
${s}
|
|
685
682
|
</span>
|
|
686
|
-
`}escapeHtml(i){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return i.replace(/[&<>"']/g,t=>e[t])}};customElements.get("progress-indicator-label-base")||customElements.define("progress-indicator-label-base",ge);var Di={size:"md"},Ne=50;function Ni(n,i){return n===i?"current":"incomplete"}function Hi(n,i){return Math.max(1,Math.min(n,i))}var Oi=":host{display:inline-flex;align-items:center;justify-content:center}.pagination{display:inline-flex;align-items:center;overflow:hidden;background:var(--color-scrim-standard);border-radius:var(--radius-full);clip-path:inset(0 2px round var(--radius-full))}.pagination__track{display:inline-flex;align-items:center}.pagination--sm,.pagination--md{padding-block:var(--space-inset-075);padding-inline:var(--space-inset-100)}.pagination--lg{padding-block:var(--space-inset-100);padding-inline:var(--space-inset-150)}.pagination--sm>.pagination__track,.pagination--md>.pagination__track{gap:var(--space-grouped-tight)}.pagination--lg>.pagination__track{gap:var(--space-grouped-normal)}";var me=class extends HTMLElement{constructor(){super();this._container=null;this._track=null;this._nodes=[];this._initialized=!1;this._shadowRoot=this.attachShadow({mode:"open"})}static get observedAttributes(){return["total-items","current-item","size","accessibility-label","test-id"]}connectedCallback(){this._initialized||(this._setup(),this._initialized=!0),this._render()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._render()}get totalItems(){let e=this.getAttribute("total-items");if(e===null)return 0;let t=parseInt(e,10);return isNaN(t)?0:t}set totalItems(e){this.setAttribute("total-items",String(e))}get currentItem(){let e=this.getAttribute("current-item");if(e===null)return 1;let t=parseInt(e,10);return isNaN(t)?1:t}set currentItem(e){this.setAttribute("current-item",String(e))}get size(){let e=this.getAttribute("size");return e==="sm"||e==="md"||e==="lg"?e:Di.size}set size(e){this.setAttribute("size",e)}get accessibilityLabel(){return this.getAttribute("accessibility-label")}set accessibilityLabel(e){e?this.setAttribute("accessibility-label",e):this.removeAttribute("accessibility-label")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}_setup(){let e=document.createElement("style");e.textContent=Oi,this._shadowRoot.appendChild(e),this._container=document.createElement("div"),this._container.setAttribute("role","group"),this._shadowRoot.appendChild(this._container),this._track=document.createElement("div"),this._track.className="pagination__track",this._container.appendChild(this._track)}_render(){if(!this._container||!this._track)return;let e=this.totalItems,t=this.size,r=this.testID;e>Ne&&(console.warn(`Progress-Pagination-Base: Received ${e} items but maximum is ${Ne}. Rendering first ${Ne} items only. Consider using a different navigation pattern.`),e=Ne);let s=Hi(this.currentItem,e);for(;this._nodes.length<e;){let _=document.createElement("progress-indicator-node-base");this._track.appendChild(_),this._nodes.push(_)}for(;this._nodes.length>e;){let _=this._nodes.pop();this._track.removeChild(_)}for(let _=0;_<e;_++){let S=_+1,
|
|
683
|
+
`}escapeHtml(i){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return i.replace(/[&<>"']/g,t=>e[t])}};customElements.get("progress-indicator-label-base")||customElements.define("progress-indicator-label-base",ge);var Di={size:"md"},Ne=50;function Ni(n,i){return n===i?"current":"incomplete"}function Hi(n,i){return Math.max(1,Math.min(n,i))}var Oi=":host{display:inline-flex;align-items:center;justify-content:center}.pagination{display:inline-flex;align-items:center;overflow:hidden;background:var(--color-scrim-standard);border-radius:var(--radius-full);clip-path:inset(0 2px round var(--radius-full))}.pagination__track{display:inline-flex;align-items:center}.pagination--sm,.pagination--md{padding-block:var(--space-inset-075);padding-inline:var(--space-inset-100)}.pagination--lg{padding-block:var(--space-inset-100);padding-inline:var(--space-inset-150)}.pagination--sm>.pagination__track,.pagination--md>.pagination__track{gap:var(--space-grouped-tight)}.pagination--lg>.pagination__track{gap:var(--space-grouped-normal)}";var me=class extends HTMLElement{constructor(){super();this._container=null;this._track=null;this._nodes=[];this._initialized=!1;this._shadowRoot=this.attachShadow({mode:"open"})}static get observedAttributes(){return["total-items","current-item","size","accessibility-label","test-id"]}connectedCallback(){this._initialized||(this._setup(),this._initialized=!0),this._render()}attributeChangedCallback(e,t,r){t!==r&&this.isConnected&&this._render()}get totalItems(){let e=this.getAttribute("total-items");if(e===null)return 0;let t=parseInt(e,10);return isNaN(t)?0:t}set totalItems(e){this.setAttribute("total-items",String(e))}get currentItem(){let e=this.getAttribute("current-item");if(e===null)return 1;let t=parseInt(e,10);return isNaN(t)?1:t}set currentItem(e){this.setAttribute("current-item",String(e))}get size(){let e=this.getAttribute("size");return e==="sm"||e==="md"||e==="lg"?e:Di.size}set size(e){this.setAttribute("size",e)}get accessibilityLabel(){return this.getAttribute("accessibility-label")}set accessibilityLabel(e){e?this.setAttribute("accessibility-label",e):this.removeAttribute("accessibility-label")}get testID(){return this.getAttribute("test-id")}set testID(e){e?this.setAttribute("test-id",e):this.removeAttribute("test-id")}_setup(){let e=document.createElement("style");e.textContent=Oi,this._shadowRoot.appendChild(e),this._container=document.createElement("div"),this._container.setAttribute("role","group"),this._shadowRoot.appendChild(this._container),this._track=document.createElement("div"),this._track.className="pagination__track",this._container.appendChild(this._track)}_render(){if(!this._container||!this._track)return;let e=this.totalItems,t=this.size,r=this.testID;e>Ne&&(console.warn(`Progress-Pagination-Base: Received ${e} items but maximum is ${Ne}. Rendering first ${Ne} items only. Consider using a different navigation pattern.`),e=Ne);let s=Hi(this.currentItem,e);for(;this._nodes.length<e;){let _=document.createElement("progress-indicator-node-base");this._track.appendChild(_),this._nodes.push(_)}for(;this._nodes.length>e;){let _=this._nodes.pop();this._track.removeChild(_)}for(let _=0;_<e;_++){let S=_+1,k=this._nodes[_];k.setAttribute("state",Ni(S,s)),k.setAttribute("size",t),k.setAttribute("content","none"),k.setAttribute("sizing","scale")}let o=getComputedStyle(this),a=parseFloat(o.getPropertyValue(`--progress-node-size-${t}-current`)),l=parseFloat(o.getPropertyValue(t==="lg"?"--space-grouped-normal":"--space-grouped-tight")),c=parseFloat(o.getPropertyValue(t==="lg"?"--space-inset-150":"--space-inset-100")),d=Math.min(e,5),h=d*a+(d-1)*l;this._container.style.width=`${h+c*2}px`,this._container.style.boxSizing="border-box";let u=e*a+(e-1)*l,m=(s-1)*(a+l)+a/2,g=h/2-m,f=h-u;g=Math.min(0,Math.max(f,g));let b=!this._container.dataset.rendered,x=typeof globalThis.matchMedia=="function"&&globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches;b||x?this._track.style.transition="none":this._track.style.transition="transform var(--motion-settle-transition-duration) var(--motion-settle-transition-easing)",this._track.style.transform=`translateX(${g}px)`,this._container.dataset.rendered="1",this._container.className=`pagination pagination--${t}`;let C=this.accessibilityLabel||`Page ${s} of ${e}`;this._container.setAttribute("aria-label",this.escapeHtml(C)),r?this._container.setAttribute("data-testid",this.escapeHtml(r)):this._container.removeAttribute("data-testid")}escapeHtml(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,r=>t[r])}};customElements.get("progress-pagination-base")||customElements.define("progress-pagination-base",me);var Fi={size:"md",errorSteps:[]},He=8;function Ui(n,i,e){return e.includes(n)?"error":n<i?"completed":n===i?"current":"incomplete"}function qi(n){return n==="completed"?"checkmark":"none"}function Gi(n,i){return n==="completed"&&i==="completed"?"active":"inactive"}function Wi(n,i){return Math.max(1,Math.min(n,i))}function ji(n,i){return n.filter(e=>e>=1&&e<=i)}var Ki=":host{display:inline-flex;align-items:center;justify-content:center}.stepper{display:inline-flex;align-items:center;justify-content:center;inline-size:100%}.stepper--md{gap:var(--progress-node-gap-md)}.stepper--lg{gap:var(--progress-node-gap-lg)}";var be=class extends HTMLElement{static get observedAttributes(){return["total-steps","current-step","size","error-steps","accessibility-label","test-id"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){if(this.getAttribute("size")==="sm")throw new Error("Steppers require size 'md' or 'lg'. Size 'sm' is only supported for Pagination-Base.");this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get totalSteps(){let i=this.getAttribute("total-steps");if(i===null)return 0;let e=parseInt(i,10);return isNaN(e)?0:e}set totalSteps(i){this.setAttribute("total-steps",String(i))}get currentStep(){let i=this.getAttribute("current-step");if(i===null)return 1;let e=parseInt(i,10);return isNaN(e)?1:e}set currentStep(i){this.setAttribute("current-step",String(i))}get size(){let i=this.getAttribute("size");return i==="md"||i==="lg"?i:Fi.size}set size(i){this.setAttribute("size",i)}get errorSteps(){let i=this.getAttribute("error-steps");return i?i.split(",").map(e=>parseInt(e.trim(),10)).filter(e=>!isNaN(e)):[]}set errorSteps(i){this.setAttribute("error-steps",i.join(","))}get accessibilityLabel(){return this.getAttribute("accessibility-label")}set accessibilityLabel(i){i?this.setAttribute("accessibility-label",i):this.removeAttribute("accessibility-label")}get testID(){return this.getAttribute("test-id")}set testID(i){i?this.setAttribute("test-id",i):this.removeAttribute("test-id")}render(){let i=this.getAttribute("size"),e=this.totalSteps,t=this.size,r=this.testID;e>He&&(console.warn(`Progress-Stepper-Base: Received ${e} steps but maximum is ${He}. Rendering first ${He} steps only. Consider breaking into multiple sub-flows.`),e=He);let s=Wi(this.currentStep,e),o=ji(this.errorSteps,e),a=this.accessibilityLabel||`Step ${s} of ${e}`,l=["stepper",`stepper--${t}`].join(" "),c=r?` data-testid="${this.escapeHtml(r)}"`:"",d=[];for(let u=1;u<=e;u++)d.push(Ui(u,s,o));let h="";for(let u=0;u<d.length;u++){let m=d[u],g=qi(m);if(h+=`<progress-indicator-node-base state="${m}" size="${t}" content="${g}"></progress-indicator-node-base>`,u<d.length-1){let f=Gi(d[u],d[u+1]);h+=`<progress-indicator-connector-base state="${f}"></progress-indicator-connector-base>`}}this._shadowRoot.innerHTML=`
|
|
687
684
|
<style>
|
|
688
685
|
${Ki}
|
|
689
686
|
</style>
|
|
690
687
|
<div class="${l}"${c} role="progressbar" aria-valuenow="${s}" aria-valuemin="1" aria-valuemax="${e}" aria-label="${this.escapeHtml(a)}">
|
|
691
688
|
${h}
|
|
692
689
|
</div>
|
|
693
|
-
`}escapeHtml(i){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return i.replace(/[&<>"']/g,t=>e[t])}};customElements.get("progress-stepper-base")||customElements.define("progress-stepper-base",be);var Zi={size:"md",errorSteps:[]},Oe=8;function Yi(n,i,e){return e.includes(n)?"error":n<i?"completed":n===i?"current":"incomplete"}function Xi(n,i){return n==="completed"?"checkmark":i.icon?"icon":"none"}function Ct(n,i){return n==="completed"&&i==="completed"?"active":"inactive"}function Ji(n,i){return Math.max(1,Math.min(n,i))}function Qi(n,i){return n.filter(e=>e>=1&&e<=i)}var er=":host{display:inline-flex;align-items:flex-start;justify-content:center;inline-size:100%}.stepper-detailed{display:inline-flex;align-items:flex-start;justify-content:center;inline-size:100%}.stepper-detailed__step{display:flex;flex-direction:column;align-items:center;flex:1;min-inline-size:0}.stepper-detailed__node-row{display:flex;align-items:center;inline-size:100%;justify-content:center}.stepper-detailed__connector{flex:1;min-inline-size:0}.stepper-detailed__spacer{flex:1;min-inline-size:0}.stepper-detailed__label{margin-block-start:var(--progress-node-gap-md);inline-size:100%}.stepper-detailed--md .stepper-detailed__label{margin-block-start:var(--progress-node-gap-md)}.stepper-detailed--lg .stepper-detailed__label{margin-block-start:var(--progress-node-gap-lg)}";var ve=class extends HTMLElement{static get observedAttributes(){return["steps","current-step","size","error-steps","accessibility-label","test-id"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){if(this.getAttribute("size")==="sm")throw new Error("Steppers require size 'md' or 'lg'. Size 'sm' is only supported for Pagination-Base.");this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get steps(){let i=this.getAttribute("steps");if(!i)return[];try{let e=JSON.parse(i);return Array.isArray(e)?e:[]}catch(e){return[]}}set steps(i){this.setAttribute("steps",JSON.stringify(i))}get currentStep(){let i=this.getAttribute("current-step");if(i===null)return 1;let e=parseInt(i,10);return isNaN(e)?1:e}set currentStep(i){this.setAttribute("current-step",String(i))}get size(){let i=this.getAttribute("size");return i==="md"||i==="lg"?i:Zi.size}set size(i){this.setAttribute("size",i)}get errorSteps(){let i=this.getAttribute("error-steps");return i?i.split(",").map(e=>parseInt(e.trim(),10)).filter(e=>!isNaN(e)):[]}set errorSteps(i){this.setAttribute("error-steps",i.join(","))}get accessibilityLabel(){return this.getAttribute("accessibility-label")}set accessibilityLabel(i){i?this.setAttribute("accessibility-label",i):this.removeAttribute("accessibility-label")}get testID(){return this.getAttribute("test-id")}set testID(i){i?this.setAttribute("test-id",i):this.removeAttribute("test-id")}render(){let i=this.getAttribute("size"),e=this.steps,t=this.size,r=this.testID,s=e.length;s>Oe&&(console.warn(`Progress-Stepper-Detailed: Received ${s} steps but maximum is ${Oe}. Rendering first ${Oe} steps only. Consider breaking into multiple sub-flows.`),e=e.slice(0,Oe));let o=e.length,a=Ji(this.currentStep,o),l=Qi(this.errorSteps,o),c=this.accessibilityLabel||`Step ${a} of ${o}`,d=["stepper-detailed",`stepper-detailed--${t}`].join(" "),h=r?` data-testid="${this.escapeHtml(r)}"`:"",u=[];for(let g=1;g<=o;g++)u.push(Yi(g,a,l));let m="";for(let g=0;g<u.length;g++){let f=u[g],b=e[g],
|
|
690
|
+
`}escapeHtml(i){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return i.replace(/[&<>"']/g,t=>e[t])}};customElements.get("progress-stepper-base")||customElements.define("progress-stepper-base",be);var Zi={size:"md",errorSteps:[]},Oe=8;function Yi(n,i,e){return e.includes(n)?"error":n<i?"completed":n===i?"current":"incomplete"}function Xi(n,i){return n==="completed"?"checkmark":i.icon?"icon":"none"}function Ct(n,i){return n==="completed"&&i==="completed"?"active":"inactive"}function Ji(n,i){return Math.max(1,Math.min(n,i))}function Qi(n,i){return n.filter(e=>e>=1&&e<=i)}var er=":host{display:inline-flex;align-items:flex-start;justify-content:center;inline-size:100%}.stepper-detailed{display:inline-flex;align-items:flex-start;justify-content:center;inline-size:100%}.stepper-detailed__step{display:flex;flex-direction:column;align-items:center;flex:1;min-inline-size:0}.stepper-detailed__node-row{display:flex;align-items:center;inline-size:100%;justify-content:center}.stepper-detailed__connector{flex:1;min-inline-size:0}.stepper-detailed__spacer{flex:1;min-inline-size:0}.stepper-detailed__label{margin-block-start:var(--progress-node-gap-md);inline-size:100%}.stepper-detailed--md .stepper-detailed__label{margin-block-start:var(--progress-node-gap-md)}.stepper-detailed--lg .stepper-detailed__label{margin-block-start:var(--progress-node-gap-lg)}";var ve=class extends HTMLElement{static get observedAttributes(){return["steps","current-step","size","error-steps","accessibility-label","test-id"]}constructor(){super(),this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){if(this.getAttribute("size")==="sm")throw new Error("Steppers require size 'md' or 'lg'. Size 'sm' is only supported for Pagination-Base.");this.render()}attributeChangedCallback(i,e,t){e!==t&&this.isConnected&&this.render()}get steps(){let i=this.getAttribute("steps");if(!i)return[];try{let e=JSON.parse(i);return Array.isArray(e)?e:[]}catch(e){return[]}}set steps(i){this.setAttribute("steps",JSON.stringify(i))}get currentStep(){let i=this.getAttribute("current-step");if(i===null)return 1;let e=parseInt(i,10);return isNaN(e)?1:e}set currentStep(i){this.setAttribute("current-step",String(i))}get size(){let i=this.getAttribute("size");return i==="md"||i==="lg"?i:Zi.size}set size(i){this.setAttribute("size",i)}get errorSteps(){let i=this.getAttribute("error-steps");return i?i.split(",").map(e=>parseInt(e.trim(),10)).filter(e=>!isNaN(e)):[]}set errorSteps(i){this.setAttribute("error-steps",i.join(","))}get accessibilityLabel(){return this.getAttribute("accessibility-label")}set accessibilityLabel(i){i?this.setAttribute("accessibility-label",i):this.removeAttribute("accessibility-label")}get testID(){return this.getAttribute("test-id")}set testID(i){i?this.setAttribute("test-id",i):this.removeAttribute("test-id")}render(){let i=this.getAttribute("size"),e=this.steps,t=this.size,r=this.testID,s=e.length;s>Oe&&(console.warn(`Progress-Stepper-Detailed: Received ${s} steps but maximum is ${Oe}. Rendering first ${Oe} steps only. Consider breaking into multiple sub-flows.`),e=e.slice(0,Oe));let o=e.length,a=Ji(this.currentStep,o),l=Qi(this.errorSteps,o),c=this.accessibilityLabel||`Step ${a} of ${o}`,d=["stepper-detailed",`stepper-detailed--${t}`].join(" "),h=r?` data-testid="${this.escapeHtml(r)}"`:"",u=[];for(let g=1;g<=o;g++)u.push(Yi(g,a,l));let m="";for(let g=0;g<u.length;g++){let f=u[g],b=e[g],x=Xi(f,b),C=x==="icon"&&b.icon?` icon="${this.escapeHtml(b.icon)}"`:"",_=`Step ${g+1} of ${o}: ${b.label}`;l.includes(g+1)&&(_+=", error"),b.optional&&(_+=", optional");let S="";if(g>0){let w=Ct(u[g-1],u[g]);S+=`<div class="stepper-detailed__connector"><progress-indicator-connector-base state="${w}"></progress-indicator-connector-base></div>`}else S+='<div class="stepper-detailed__spacer"></div>';if(S+=`<progress-indicator-node-base state="${f}" size="${t}" content="${x}"${C}></progress-indicator-node-base>`,g<u.length-1){let w=Ct(u[g],u[g+1]);S+=`<div class="stepper-detailed__connector"><progress-indicator-connector-base state="${w}"></progress-indicator-connector-base></div>`}else S+='<div class="stepper-detailed__spacer"></div>';let k=b.helperText?` helper-text="${this.escapeHtml(b.helperText)}"`:"",T=b.optional?" optional":"";m+=`<div class="stepper-detailed__step" role="listitem" aria-label="${this.escapeHtml(_)}">`,m+=`<div class="stepper-detailed__node-row">${S}</div>`,m+=`<div class="stepper-detailed__label"><progress-indicator-label-base label="${this.escapeHtml(b.label)}"${k}${T}></progress-indicator-label-base></div>`,m+="</div>"}this._shadowRoot.innerHTML=`
|
|
694
691
|
<style>
|
|
695
692
|
${er}
|
|
696
693
|
</style>
|
|
@@ -701,5 +698,5 @@
|
|
|
701
698
|
<slot name="leading" slot="leading"></slot>
|
|
702
699
|
<slot name="center" slot="title"></slot>
|
|
703
700
|
<slot name="trailing" slot="trailing"></slot>
|
|
704
|
-
`,this._shadowRoot.appendChild(i)}};customElements.get("nav-header-app")||customElements.define("nav-header-app",xe);var sr=".nav-header-page__title{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing);color:var(--color-action-navigation);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-header-page__title-wrapper--center{position:absolute;inset-inline:0;display:flex;justify-content:center;pointer-events:none}.nav-header-page__title-wrapper--center .nav-header-page__title{max-inline-size:60%;text-align:center}.nav-header-page__title-wrapper--leading{flex:1;min-inline-size:0}.nav-header-page__trailing{display:flex;align-items:center;gap:var(--space-grouped-minimal);flex-shrink:0}.nav-header-page__close-gap{inline-size:var(--space-grouped-tight)}:host{transition:transform var(--duration-150) var(--easing-standard)}:host(.nav-header-page--hidden){transform:translateY(-100%)}@media (prefers-reduced-motion:reduce){:host{transition:none !important;transform:none !important}}:host(.nav-header-page--android-padding) .nav-header__content{padding-block:var(--space-inset-100)}";var or=8,ke=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._lastScrollY=0;this._hidden=!1;this._scrollHandler=null;this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this._domCreated||(this._createDOM(),this._domCreated=!0),this._setupScroll()}disconnectedCallback(){this._teardownScroll()}static get observedAttributes(){return["title","title-alignment","scroll-behavior","appearance","show-separator","test-id"]}attributeChangedCallback(){this._domCreated&&(this._updateTitle(),this._updateAlignment(),this._setupScroll())}_createDOM(){var h;let e=document.createElement("style");e.textContent=sr;let t=document.createElement("nav-header");t.setAttribute("appearance",this.getAttribute("appearance")||"opaque"),t.setAttribute("show-separator",(h=this.getAttribute("show-separator"))!=null?h:"true"),this.getAttribute("test-id")&&t.setAttribute("test-id",this.getAttribute("test-id"));let r=document.createElement("div");r.setAttribute("slot","leading"),r.innerHTML='<slot name="leading-action"></slot>';let s=document.createElement("div");s.setAttribute("slot","title");let o=this._getAlignment();s.className=`nav-header-page__title-wrapper--${o}`;let a=document.createElement("h1");a.className="nav-header-page__title",a.textContent=this.getAttribute("title")||"",s.appendChild(a);let l=document.createElement("div");l.setAttribute("slot","trailing"),l.className="nav-header-page__trailing",l.innerHTML='<slot name="trailing-actions"></slot>';let c=document.createElement("slot");c.name="close-action";let d=document.createElement("span");d.className="nav-header-page__close-gap",l.appendChild(d),l.appendChild(c),t.appendChild(r),t.appendChild(s),t.appendChild(l),this._shadowRoot.appendChild(e),this._shadowRoot.appendChild(t)}_getAlignment(){let e=this.getAttribute("title-alignment");return e||"leading"}_updateTitle(){let e=this._shadowRoot.querySelector(".nav-header-page__title");e&&(e.textContent=this.getAttribute("title")||"")}_updateAlignment(){let e=this._shadowRoot.querySelector('[slot="title"]');if(!e)return;let t=this._getAlignment();e.className=`nav-header-page__title-wrapper--${t}`}_setupScroll(){this._teardownScroll(),this.getAttribute("scroll-behavior")==="collapsible"&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this._lastScrollY=window.scrollY,this._scrollHandler=()=>this._onScroll(),window.addEventListener("scroll",this._scrollHandler,{passive:!0})))}_teardownScroll(){this._scrollHandler&&(window.removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null)}_onScroll(){let e=window.scrollY,t=e-this._lastScrollY;t>or&&!this._hidden?(this._hidden=!0,this.classList.add("nav-header-page--hidden")):t<-or&&this._hidden&&(this._hidden=!1,this.classList.remove("nav-header-page--hidden")),this._lastScrollY=e}};customElements.get("nav-header-page")||customElements.define("nav-header-page",ke);var ar=":host{display:block;inline-size:100%}.progress-bar{position:relative;inline-size:100%;border-radius:var(--radius-full);background-color:var(--color-progress-pending-background);overflow:hidden}.progress-bar--sm{block-size:var(--size-050)}.progress-bar--md{block-size:var(--size-100)}.progress-bar--lg{block-size:var(--size-150)}.progress-bar__fill{position:absolute;inset-block:0;inset-inline-start:0;border-radius:var(--radius-full);transition:inline-size var(--duration-150) var(--easing-standard)}.progress-bar__fill--determinate{background-color:var(--color-progress-completed-background)}.progress-bar__fill--indeterminate{background-color:var(--color-progress-current-background);inline-size:33%;animation:pulse var(--duration-350) var(--easing-standard) infinite alternate}@keyframes pulse{from{opacity:0.3}to{opacity:1}}@media (prefers-reduced-motion:reduce){.progress-bar__fill{transition:none !important;animation:none !important}}";var gn=[0,25,50,75,100],Ce=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._lastAnnouncedMilestone=-1;this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this._domCreated||(this._createDOM(),this._domCreated=!0),this._update()}static get observedAttributes(){return["value","mode","size","accessibility-label","test-id"]}attributeChangedCallback(){this._domCreated&&this._update()}_createDOM(){let e=document.createElement("style");e.textContent=ar;let t=document.createElement("div");t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax","1");let r=document.createElement("div");r.classList.add("progress-bar__fill"),t.appendChild(r),this._shadowRoot.appendChild(e),this._shadowRoot.appendChild(t)}_update(){let e=this._shadowRoot.querySelector(".progress-bar"),t=this._shadowRoot.querySelector(".progress-bar__fill");if(!e||!t)return;let r=this.getAttribute("mode")||"determinate",s=this.getAttribute("size")||"md",o=this.getAttribute("accessibility-label")||"",a=this.getAttribute("test-id");if(e.className=`progress-bar progress-bar--${s}`,e.setAttribute("aria-label",o),a&&e.setAttribute("data-testid",a),r==="indeterminate")t.className="progress-bar__fill progress-bar__fill--indeterminate",t.style.inlineSize="",e.removeAttribute("aria-valuenow"),window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(t.style.inlineSize=`${.33*100}%`,t.style.opacity="1");else{let l=this.getAttribute("value");if(l===null)throw new Error("Progress-Bar-Base: value attribute is required in determinate mode");let c=parseFloat(l);this._validateValue(c),t.className="progress-bar__fill progress-bar__fill--determinate",t.style.inlineSize=`${c*100}%`,t.style.opacity="",e.setAttribute("aria-valuenow",String(c)),this._announceMilestone(c)}}_validateValue(e){if(e<0||e>1)throw new Error(`Progress-Bar-Base: value must be between 0 and 1, received ${e}`)}_announceMilestone(e){let t=Math.round(e*100);for(let r of gn)if(t>=r&&this._lastAnnouncedMilestone<r){this._lastAnnouncedMilestone=r;let s=this._shadowRoot.querySelector(".progress-bar");s&&(s.setAttribute("aria-live","polite"),setTimeout(()=>s.removeAttribute("aria-live"),100))}}};customElements.get("progress-bar")||customElements.define("progress-bar",Ce);function lr(){let n=getComputedStyle(document.documentElement).getPropertyValue("--color-action-primary");(!n||n.trim()==="")&&console.warn('[DesignerPunk] Design tokens not detected. Include tokens.css before using components: <link rel="stylesheet" href="dist/browser/tokens.css">')}function y(n,i){customElements.get(n)||customElements.define(n,i)}y("input-text-base",
|
|
701
|
+
`,this._shadowRoot.appendChild(i)}};customElements.get("nav-header-app")||customElements.define("nav-header-app",xe);var sr=".nav-header-page__title{font-family:var(--typography-label-md-font-family);font-size:var(--typography-label-md-font-size);font-weight:var(--typography-label-md-font-weight);line-height:var(--typography-label-md-line-height);letter-spacing:var(--typography-label-md-letter-spacing);color:var(--color-action-navigation);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-header-page__title-wrapper--center{position:absolute;inset-inline:0;display:flex;justify-content:center;pointer-events:none}.nav-header-page__title-wrapper--center .nav-header-page__title{max-inline-size:60%;text-align:center}.nav-header-page__title-wrapper--leading{flex:1;min-inline-size:0}.nav-header-page__trailing{display:flex;align-items:center;gap:var(--space-grouped-minimal);flex-shrink:0}.nav-header-page__close-gap{inline-size:var(--space-grouped-tight)}:host{transition:transform var(--duration-150) var(--easing-standard)}:host(.nav-header-page--hidden){transform:translateY(-100%)}@media (prefers-reduced-motion:reduce){:host{transition:none !important;transform:none !important}}:host(.nav-header-page--android-padding) .nav-header__content{padding-block:var(--space-inset-100)}";var or=8,ke=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._lastScrollY=0;this._hidden=!1;this._scrollHandler=null;this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this._domCreated||(this._createDOM(),this._domCreated=!0),this._setupScroll()}disconnectedCallback(){this._teardownScroll()}static get observedAttributes(){return["title","title-alignment","scroll-behavior","appearance","show-separator","test-id"]}attributeChangedCallback(){this._domCreated&&(this._updateTitle(),this._updateAlignment(),this._setupScroll())}_createDOM(){var h;let e=document.createElement("style");e.textContent=sr;let t=document.createElement("nav-header");t.setAttribute("appearance",this.getAttribute("appearance")||"opaque"),t.setAttribute("show-separator",(h=this.getAttribute("show-separator"))!=null?h:"true"),this.getAttribute("test-id")&&t.setAttribute("test-id",this.getAttribute("test-id"));let r=document.createElement("div");r.setAttribute("slot","leading"),r.innerHTML='<slot name="leading-action"></slot>';let s=document.createElement("div");s.setAttribute("slot","title");let o=this._getAlignment();s.className=`nav-header-page__title-wrapper--${o}`;let a=document.createElement("h1");a.className="nav-header-page__title",a.textContent=this.getAttribute("title")||"",s.appendChild(a);let l=document.createElement("div");l.setAttribute("slot","trailing"),l.className="nav-header-page__trailing",l.innerHTML='<slot name="trailing-actions"></slot>';let c=document.createElement("slot");c.name="close-action";let d=document.createElement("span");d.className="nav-header-page__close-gap",l.appendChild(d),l.appendChild(c),t.appendChild(r),t.appendChild(s),t.appendChild(l),this._shadowRoot.appendChild(e),this._shadowRoot.appendChild(t)}_getAlignment(){let e=this.getAttribute("title-alignment");return e||"leading"}_updateTitle(){let e=this._shadowRoot.querySelector(".nav-header-page__title");e&&(e.textContent=this.getAttribute("title")||"")}_updateAlignment(){let e=this._shadowRoot.querySelector('[slot="title"]');if(!e)return;let t=this._getAlignment();e.className=`nav-header-page__title-wrapper--${t}`}_setupScroll(){this._teardownScroll(),this.getAttribute("scroll-behavior")==="collapsible"&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this._lastScrollY=window.scrollY,this._scrollHandler=()=>this._onScroll(),window.addEventListener("scroll",this._scrollHandler,{passive:!0})))}_teardownScroll(){this._scrollHandler&&(window.removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null)}_onScroll(){let e=window.scrollY,t=e-this._lastScrollY;t>or&&!this._hidden?(this._hidden=!0,this.classList.add("nav-header-page--hidden")):t<-or&&this._hidden&&(this._hidden=!1,this.classList.remove("nav-header-page--hidden")),this._lastScrollY=e}};customElements.get("nav-header-page")||customElements.define("nav-header-page",ke);var ar=":host{display:block;inline-size:100%}.progress-bar{position:relative;inline-size:100%;border-radius:var(--radius-full);background-color:var(--color-progress-pending-background);overflow:hidden}.progress-bar--sm{block-size:var(--size-050)}.progress-bar--md{block-size:var(--size-100)}.progress-bar--lg{block-size:var(--size-150)}.progress-bar__fill{position:absolute;inset-block:0;inset-inline-start:0;border-radius:var(--radius-full);transition:inline-size var(--duration-150) var(--easing-standard)}.progress-bar__fill--determinate{background-color:var(--color-progress-completed-background)}.progress-bar__fill--indeterminate{background-color:var(--color-progress-current-background);inline-size:33%;animation:pulse var(--duration-350) var(--easing-standard) infinite alternate}@keyframes pulse{from{opacity:0.3}to{opacity:1}}@media (prefers-reduced-motion:reduce){.progress-bar__fill{transition:none !important;animation:none !important}}";var gn=[0,25,50,75,100],Ce=class extends HTMLElement{constructor(){super();this._domCreated=!1;this._lastAnnouncedMilestone=-1;this._shadowRoot=this.attachShadow({mode:"open"})}connectedCallback(){this._domCreated||(this._createDOM(),this._domCreated=!0),this._update()}static get observedAttributes(){return["value","mode","size","accessibility-label","test-id"]}attributeChangedCallback(){this._domCreated&&this._update()}_createDOM(){let e=document.createElement("style");e.textContent=ar;let t=document.createElement("div");t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax","1");let r=document.createElement("div");r.classList.add("progress-bar__fill"),t.appendChild(r),this._shadowRoot.appendChild(e),this._shadowRoot.appendChild(t)}_update(){let e=this._shadowRoot.querySelector(".progress-bar"),t=this._shadowRoot.querySelector(".progress-bar__fill");if(!e||!t)return;let r=this.getAttribute("mode")||"determinate",s=this.getAttribute("size")||"md",o=this.getAttribute("accessibility-label")||"",a=this.getAttribute("test-id");if(e.className=`progress-bar progress-bar--${s}`,e.setAttribute("aria-label",o),a&&e.setAttribute("data-testid",a),r==="indeterminate")t.className="progress-bar__fill progress-bar__fill--indeterminate",t.style.inlineSize="",e.removeAttribute("aria-valuenow"),window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(t.style.inlineSize=`${.33*100}%`,t.style.opacity="1");else{let l=this.getAttribute("value");if(l===null)throw new Error("Progress-Bar-Base: value attribute is required in determinate mode");let c=parseFloat(l);this._validateValue(c),t.className="progress-bar__fill progress-bar__fill--determinate",t.style.inlineSize=`${c*100}%`,t.style.opacity="",e.setAttribute("aria-valuenow",String(c)),this._announceMilestone(c)}}_validateValue(e){if(e<0||e>1)throw new Error(`Progress-Bar-Base: value must be between 0 and 1, received ${e}`)}_announceMilestone(e){let t=Math.round(e*100);for(let r of gn)if(t>=r&&this._lastAnnouncedMilestone<r){this._lastAnnouncedMilestone=r;let s=this._shadowRoot.querySelector(".progress-bar");s&&(s.setAttribute("aria-live","polite"),setTimeout(()=>s.removeAttribute("aria-live"),100))}}};customElements.get("progress-bar")||customElements.define("progress-bar",Ce);function lr(){let n=getComputedStyle(document.documentElement).getPropertyValue("--color-action-primary");(!n||n.trim()==="")&&console.warn('[DesignerPunk] Design tokens not detected. Include tokens.css before using components: <link rel="stylesheet" href="dist/browser/tokens.css">')}function y(n,i){customElements.get(n)||customElements.define(n,i)}y("input-text-base",J);y("input-text-email",Ee);y("input-text-password",we);y("input-text-phone-number",Ie);y("button-cta",ze);y("icon-base",O);y("button-icon",Re);y("container-base",q);y("button-vertical-list-item",ee);y("button-vertical-list-set",te);y("avatar-base",W);y("badge-label-base",re);y("badge-count-base",ne);y("badge-count-notification",se);y("input-checkbox-base",oe);y("input-checkbox-legal",ae);y("chip-base",le);y("chip-filter",ce);y("chip-input",de);y("container-card-base",j);y("input-radio-base",K);y("input-radio-set",ue);y("progress-indicator-node-base",he);y("progress-indicator-connector-base",pe);y("progress-indicator-label-base",ge);y("progress-pagination-base",me);y("progress-stepper-base",be);y("progress-stepper-detailed",ve);y("nav-segmented-choice",fe);y("nav-tab-bar",_e);y("nav-header",ye);y("nav-header-app",xe);y("nav-header-page",ke);y("progress-bar",Ce);typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{requestAnimationFrame(()=>lr())}):requestAnimationFrame(()=>lr()));var mn=O,bn=O,vn=q,fn=q,_n=ee,yn=te,xn=W,kn=W,Cn=re,Sn=ne,En=se,wn=oe,An=ae,Tn=J,In=le,zn=ce,Rn=de,Bn=j,Ln=j,Vn=K,$n=ue,Pn=he,Mn=pe,Dn=ge,Nn=me,Hn=be,On=ve,Fn=fe,Un=_e,qn=ye,Gn=xe,Wn=ke,jn=Ce;return br(Kn);})();
|
|
705
702
|
//# sourceMappingURL=designerpunk.umd.min.js.map
|