@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
|
-
function Qe(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 et(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,p,u)=>(u<0&&(u+=1),u>1&&(u-=1),u<.16666666666666666?d+(p-d)*6*u:u<.5?p:u<.6666666666666666?d+(p-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 O(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 F(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 Oe(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 Fe(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 Ue(n,i){let e=Qe(n);return e.s=Math.max(0,Math.min(1,e.s+i)),et(e)}function qe(n,i){let e=Qe(n);return e.s=Math.max(0,Math.min(1,e.s-i)),et(e)}var I=.04;function Ae(n){return{web:{value:n,unit:"unitless"},ios:{value:n,unit:"unitless"},android:{value:n,unit:"unitless"}}}var rr={blend100:{name:"blend100",category:"blend",baseValue:I,familyBaseValue:I,description:"Subtle modification - gentle feedback, container hover",mathematicalRelationship:"base \xD7 1 = 0.04 \xD7 1 = 0.04",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I)},blend200:{name:"blend200",category:"blend",baseValue:I*2,familyBaseValue:I,description:"Standard modification - noticeable feedback, button hover",mathematicalRelationship:"base \xD7 2 = 0.04 \xD7 2 = 0.08",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*2)},blend300:{name:"blend300",category:"blend",baseValue:I*3,familyBaseValue:I,description:"Strong modification - clear feedback, pressed state",mathematicalRelationship:"base \xD7 3 = 0.04 \xD7 3 = 0.12",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*3)},blend400:{name:"blend400",category:"blend",baseValue:I*4,familyBaseValue:I,description:"Very strong modification - emphasized feedback",mathematicalRelationship:"base \xD7 4 = 0.04 \xD7 4 = 0.16",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*4)},blend500:{name:"blend500",category:"blend",baseValue:I*5,familyBaseValue:I,description:"Maximum modification - dramatic feedback",mathematicalRelationship:"base \xD7 5 = 0.04 \xD7 5 = 0.20",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*5)}},on=Object.keys(rr);var Y={hoverDarker:.08,pressedDarker:.12,focusSaturate:.08,disabledDesaturate:.12,iconLighter:.08};function tt(n,i){try{let e=O(n),t=Oe(e,i);return F(t)}catch{return n}}function wt(n,i){try{let e=O(n),t=Fe(e,i);return F(t)}catch{return n}}function At(n,i){try{let e=O(n),t=Ue(e,i);return F(t)}catch{return n}}function Tt(n,i){try{let e=O(n),t=qe(e,i);return F(t)}catch{return n}}function It(){return{hoverColor:n=>tt(n,Y.hoverDarker),pressedColor:n=>tt(n,Y.pressedDarker),focusColor:n=>At(n,Y.focusSaturate),disabledColor:n=>Tt(n,Y.disabledDesaturate),iconColor:n=>wt(n,Y.iconLighter),darkerBlend:tt,lighterBlend:wt,saturate:At,desaturate:Tt}}function k(){return It()}function it(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 rt(n){let i=n.isLabelFloated;return{showErrorIcon:n.hasError&&i,showSuccessIcon:n.isSuccess&&i,showInfoIcon:!!n.showInfoIcon&&(n.isFocused||n.isFilled)}}function zt(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 Rt(n){return{...n,isFocused:!0,isLabelFloated:!0}}function Bt(n){return{...n,isFocused:!1,isLabelFloated:n.isFilled}}function nt(n,i){let e=i.length>0;return{...n,isFilled:e,isLabelFloated:n.isFocused||e}}function st(n,i,e){return{...n,hasError:!!i,isSuccess:!!e}}var Lt=k();function Vt(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 $(n){let{name:i,size:e,className:t="",style:r={},testID:s,color:o="inherit",opticalBalance:a=!1}=n,l=Vt(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=Lt.iconColor(o):o.startsWith("#")?g=o:g=`var(--${o})`;let f="var(--icon-stroke-width)",b=Object.entries(r).map(([y,E])=>`${y.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${E}`).join("; "),C=s?` data-testid="${s}"`:"",x=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}${x}>${l}</svg>`}var U=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=Vt(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=Lt.iconColor(t):t.startsWith("#")?c=t:c=`var(--${t})`;let d="var(--icon-stroke-width)",p=r?` data-testid="${r}"`:"",u=`
|
|
1
|
+
function Qe(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 et(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,p,u)=>(u<0&&(u+=1),u>1&&(u-=1),u<.16666666666666666?d+(p-d)*6*u:u<.5?p:u<.6666666666666666?d+(p-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 H(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 O(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 Oe(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 Fe(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 Ue(n,i){let e=Qe(n);return e.s=Math.max(0,Math.min(1,e.s+i)),et(e)}function qe(n,i){let e=Qe(n);return e.s=Math.max(0,Math.min(1,e.s-i)),et(e)}var I=.04;function Ae(n){return{web:{value:n,unit:"unitless"},ios:{value:n,unit:"unitless"},android:{value:n,unit:"unitless"}}}var rr={blend100:{name:"blend100",category:"blend",baseValue:I,familyBaseValue:I,description:"Subtle modification - gentle feedback, container hover",mathematicalRelationship:"base \xD7 1 = 0.04 \xD7 1 = 0.04",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I)},blend200:{name:"blend200",category:"blend",baseValue:I*2,familyBaseValue:I,description:"Standard modification - noticeable feedback, button hover",mathematicalRelationship:"base \xD7 2 = 0.04 \xD7 2 = 0.08",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*2)},blend300:{name:"blend300",category:"blend",baseValue:I*3,familyBaseValue:I,description:"Strong modification - clear feedback, pressed state",mathematicalRelationship:"base \xD7 3 = 0.04 \xD7 3 = 0.12",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*3)},blend400:{name:"blend400",category:"blend",baseValue:I*4,familyBaseValue:I,description:"Very strong modification - emphasized feedback",mathematicalRelationship:"base \xD7 4 = 0.04 \xD7 4 = 0.16",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*4)},blend500:{name:"blend500",category:"blend",baseValue:I*5,familyBaseValue:I,description:"Maximum modification - dramatic feedback",mathematicalRelationship:"base \xD7 5 = 0.04 \xD7 5 = 0.20",baselineGridAlignment:!1,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:Ae(I*5)}},on=Object.keys(rr);var Y={hoverDarker:.08,pressedDarker:.12,focusSaturate:.08,disabledDesaturate:.12,iconLighter:.08};function tt(n,i){try{let e=H(n),t=Oe(e,i);return O(t)}catch{return n}}function wt(n,i){try{let e=H(n),t=Fe(e,i);return O(t)}catch{return n}}function At(n,i){try{let e=H(n),t=Ue(e,i);return O(t)}catch{return n}}function Tt(n,i){try{let e=H(n),t=qe(e,i);return O(t)}catch{return n}}function It(){return{hoverColor:n=>tt(n,Y.hoverDarker),pressedColor:n=>tt(n,Y.pressedDarker),focusColor:n=>At(n,Y.focusSaturate),disabledColor:n=>Tt(n,Y.disabledDesaturate),iconColor:n=>wt(n,Y.iconLighter),darkerBlend:tt,lighterBlend:wt,saturate:At,desaturate:Tt}}function k(){return It()}function it(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 rt(n){let i=n.isLabelFloated;return{showErrorIcon:n.hasError&&i,showSuccessIcon:n.isSuccess&&i,showInfoIcon:!!n.showInfoIcon&&(n.isFocused||n.isFilled)}}function zt(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 Rt(n){return{...n,isFocused:!0,isLabelFloated:!0}}function Bt(n){return{...n,isFocused:!1,isLabelFloated:n.isFilled}}function nt(n,i){let e=i.length>0;return{...n,isFilled:e,isLabelFloated:n.isFocused||e}}function st(n,i,e){return{...n,hasError:!!i,isSuccess:!!e}}var Lt=k();function Vt(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 $(n){let{name:i,size:e,className:t="",style:r={},testID:s,color:o="inherit",opticalBalance:a=!1}=n,l=Vt(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=Lt.iconColor(o):o.startsWith("#")?g=o:g=`var(--${o})`;let f="var(--icon-stroke-width)",b=Object.entries(r).map(([y,E])=>`${y.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${E}`).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 F=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=Vt(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=Lt.iconColor(t):t.startsWith("#")?c=t:c=`var(--${t})`;let d="var(--icon-stroke-width)",p=r?` data-testid="${r}"`:"",u=`
|
|
2
2
|
<style>
|
|
3
3
|
.icon-base {
|
|
4
4
|
display: inline-block;
|
|
@@ -41,7 +41,7 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
41
41
|
>
|
|
42
42
|
${o}
|
|
43
43
|
</svg>
|
|
44
|
-
`}};customElements.get("icon-base")||customElements.define("icon-base",
|
|
44
|
+
`}};customElements.get("icon-base")||customElements.define("icon-base",F);var w={size050:13,size075:20,size100:24,size125:32,size150:28,size200:32,size300:32,size400:36,size500:40,size600:44,size700:48},$t=w;var Pt=":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 X=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=Rt(this.state),this.updateLabelPosition(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))};this.onBlur=()=>{this.state=Bt(this.state),this.updateLabelPosition(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))};this.onInput=e=>{let r=e.target.value;this.state=nt(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=k(),this.state=zt(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{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=nt(this.state,r||""),this.updateLabelPosition(),this.inputElement&&this.inputElement.value!==(r||"")&&(this.inputElement.value=r||"");return}else e==="error-message"?(this.state=st(this.state,r||void 0,this.state.isSuccess),this.updateLabelPosition()):e==="is-success"&&(this.state=st(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=it(this.state),r=rt(this.state);this.container||(this.container=document.createElement("div"),this.container.className="input-text-base");let s=$t.size100,o="";r.showErrorIcon?o=$({name:"x",size:s,color:"color-error",className:"trailing-icon error-icon"}):r.showSuccessIcon?o=$({name:"check",size:s,color:"color-feedback-success-text",className:"trailing-icon success-icon"}):r.showInfoIcon&&(o=$({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}">
|
|
@@ -97,7 +97,7 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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=ot(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",Te);var Ie="Password does not meet requirements",je={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,specialChar:/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/};function Mt(){return{meetsMinLength:!0,meetsMaxLength:!0,hasUppercase:!0,hasLowercase:!0,hasNumber:!0,hasSpecialChar:!0}}function or(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||je.uppercase.test(n),hasLowercase:!s||je.lowercase.test(n),hasNumber:!o||je.number.test(n),hasSpecialChar:!a||je.specialChar.test(n)}}function ar(n){return n.meetsMinLength&&n.meetsMaxLength&&n.hasUppercase&&n.hasLowercase&&n.hasNumber&&n.hasSpecialChar}function at(n,i={},e,t){if(!n||n.length===0)return{isValid:!0,details:Mt()};if(e){let o=e(n);return{isValid:o,errorMessage:o?void 0:t||Ie,details:Mt()}}let r=or(n,i),s=ar(r);return{isValid:s,errorMessage:s?void 0:t||Ie,details:r}}var ze=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")||Ie,o=at(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=>{let r=e.detail?.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=>{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=this._baseInput?.shadowRoot?.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"),p=this.getAttribute("max-length"),u=this.getAttribute("show-toggle")!=="false",m=this.hasAttribute("is-new-password"),g=this.getAttribute("invalid-password-message")||Ie,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 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
106
106
|
>
|
|
107
107
|
${this._isPasswordVisible?this.getHideIcon():this.getShowIcon()}
|
|
108
108
|
</button>
|
|
109
|
-
`:"",
|
|
109
|
+
`:"",y=`
|
|
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
|
-
${p
|
|
124
|
-
${u?`max-length="${u}"`:""}
|
|
122
|
+
${d?"required":""}
|
|
123
|
+
${p?`max-length="${p}"`:""}
|
|
125
124
|
></input-text-base>
|
|
126
|
-
${
|
|
125
|
+
${C}
|
|
127
126
|
</div>
|
|
128
|
-
`,
|
|
127
|
+
`,E=document.createElement("style");E.textContent=`
|
|
129
128
|
:host {
|
|
130
129
|
display: block;
|
|
131
130
|
width: 100%;
|
|
@@ -176,7 +175,7 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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(E);let S=document.createElement("div");S.innerHTML=y,this._shadowRoot.appendChild(S),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 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
198
197
|
${d?"required":""}
|
|
199
198
|
${p?`max-length="${p}"`:""}
|
|
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=ct(this._rawDigits,this._currentCountryCode);return this._hasBeenValidated=!0,this._isPhoneValid=e.isValid,this.render(),this.attachEventListeners(),{...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",Re);var Ht=".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 Ot(n){let i;switch(n){case"small":case"medium":if(i=w.size100,!i)throw new Error("ButtonCTA: iconBaseSizes.size100 token is missing");break;case"large":if(i=w.size125,!i)throw new Error("ButtonCTA: iconBaseSizes.size125 token is missing");break;default:throw new Error(`ButtonCTA: Invalid button size "${n}"`)}return i}var Be=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=k()}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{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(){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=Ot(t),d=o?"button-cta__label--no-wrap":"button-cta__label",p=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>${Ht}</style>
|
|
214
|
-
<button
|
|
215
|
-
class="${
|
|
212
|
+
<button
|
|
213
|
+
class="${l}"
|
|
216
214
|
type="button"
|
|
217
215
|
role="button"
|
|
218
|
-
${
|
|
219
|
-
${u}
|
|
216
|
+
${p}
|
|
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=this._iconContainer?.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.
|
|
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=this._iconContainer?.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=Ot(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",Be);var dt={size:"medium",variant:"primary"};var Ft=":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 Ut(n){let i;switch(n){case"small":if(i=w.size050,!i)throw new Error("ButtonIcon: iconBaseSizes.size050 token is missing");break;case"medium":if(i=w.size075,!i)throw new Error("ButtonIcon: iconBaseSizes.size075 token is missing");break;case"large":if(i=w.size100,!i)throw new Error("ButtonIcon: iconBaseSizes.size100 token is missing");break;default:throw new Error(`ButtonIcon: Invalid button size "${n}"`)}return i}var Le=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=k()}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{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:dt.size}set size(e){this.setAttribute("size",e)}get buttonVariant(){let e=this.getAttribute("variant");return e==="primary"||e==="secondary"||e==="tertiary"?e:dt.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(){let e=this.icon,t=this.ariaLabel,r=this.size,s=this.buttonVariant,o=this.testID,a=Ut(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=`
|
|
@@ -294,7 +291,7 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
294
291
|
print-color-adjust: exact;
|
|
295
292
|
}
|
|
296
293
|
}
|
|
297
|
-
`,
|
|
294
|
+
`,U=class extends HTMLElement{constructor(){super();this._hoverColor="";this._shadowRoot=this.attachShadow({mode:"open"}),this._blendUtils=k()}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"),p=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",y=this.buildStyles({padding:e,paddingVertical:t,paddingHorizontal:r,paddingBlockStart:s,paddingBlockEnd:o,paddingInlineStart:a,paddingInlineEnd:l,background:c,shadow:d,border:p,borderColor:u,borderRadius:m,opacity:g,layering:f}),E=x?`aria-label="${x.replace(/"/g,""")}"`:"",S=["container-base"];C&&S.push("container-base--hoverable");let L=C?`--_container-base-hover-bg: ${this._hoverColor};`:"";this._shadowRoot.innerHTML=`
|
|
298
295
|
<style>
|
|
299
296
|
${kr}
|
|
300
297
|
|
|
@@ -305,7 +302,7 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
305
302
|
<${b} class="${S.join(" ")}" ${E} style="${L}">
|
|
306
303
|
<slot></slot>
|
|
307
304
|
</${b}>
|
|
308
|
-
`}buildStyles(e){return Kt(e)}};customElements.get("container-base")||customElements.define("container-base",q);var Zt={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 Cr(n){let i=Zt[n];if(!i)throw new Error(`Button-VerticalList-Item: Invalid visual state "${n}". Valid states are: ${Object.keys(Zt).join(", ")}`);return i}function Sr(n){return n==="rest"||n==="selected"||n==="notSelected"}function Er(n){return n==="checked"||n==="unchecked"}function Yt(n){return n==="selected"}function wr(n,i){return Sr(i)?{...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`}:Er(i)?{...n,labelColor:"var(--color-feedback-error-text)",iconColor:"var(--color-feedback-error-text)",cssClass:`${n.cssClass} vertical-list-item--error`}:n}function Xt(n,i=!1){let e=Cr(n);return i?wr(e,n):e}var ut="@3fn/dp:tokenContract";function Ar(n){return"reference"in n}function N(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(Ar(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,ut)||Object.defineProperty(r,ut,{value:s,enumerable:!1,configurable:!0,writable:!1}),r}var Ve=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={}){let r=t.precision??this.defaultPrecision;return{value:this.roundToPrecision(i,r),unit:"pt",token:e}}convertToAndroid(i,e,t={}){let r=t.precision??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={}){let r=t.precision??this.defaultPrecision,s=t.webBaseFontSize??this.defaultWebBaseFontSize;if(this.isTypographyToken(e,t.category)){let a=i/s;return{value:this.roundToPrecision(a,r),unit:"rem",token:e}}return{value:this.roundToPrecision(i,r),unit:"px",token:e}}validateMathematicalConsistency(i,e,t,r,s){let o=s.webBaseFontSize??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 u=i/o;c=Math.abs(r.value-u)<.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 p=[];if(a||p.push(`iOS: expected ${i}pt, got ${e.value}pt`),l||p.push(`Android: expected ${i}${t.unit}, got ${t.value}${t.unit}`),!c)if(r.unit==="rem"){let u=i/o;p.push(`Web: expected ${u}rem, got ${r.value}rem`)}else p.push(`Web: expected ${i}px, got ${r.value}px`);return{consistent:!1,reasoning:`Mathematical inconsistency detected: ${p.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}`)}}},Tr=new Ve;var P={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 R(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var ht={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:R(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:R(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:R(v*.5)},space075:{name:"space075",category:"spacing",baseValue:P.space075.value,familyBaseValue:v,description:"Strategic flexibility spacing - 0.75x base value",mathematicalRelationship:P.space075.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:R(P.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:R(v)},space125:{name:"space125",category:"spacing",baseValue:P.space125.value,familyBaseValue:v,description:"Strategic flexibility spacing - 1.25x base value",mathematicalRelationship:P.space125.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:R(P.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:R(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:R(v*2)},space250:{name:"space250",category:"spacing",baseValue:P.space250.value,familyBaseValue:v,description:"Strategic flexibility spacing - 2.5x base value",mathematicalRelationship:P.space250.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:R(P.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:R(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:R(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:R(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:R(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:R(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:R(v*8)}},Ys=Object.keys(ht);var Rr=N({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:ht.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 Jt(n){return Rr[`paddingBlock.${n}`]}var Qt=":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 Br=["--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 Lr(){let n=getComputedStyle(document.documentElement),i=[];for(let e of Br)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 Vr(n,i=!1){let e=n==="rest"||n==="selected"||n==="notSelected",r=Yt(n)||i&&e?"selected":"rest";return`${Jt(r)}px`}function ei(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=k()}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||(Lr(),this._tokensValidated=!0),this._calculateBlendColorsWithRetry(),this._render()}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch{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(){let e=w.size100;this._shadowRoot.innerHTML=`
|
|
305
|
+
`}buildStyles(e){return Kt(e)}};customElements.get("container-base")||customElements.define("container-base",U);var Zt={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 Cr(n){let i=Zt[n];if(!i)throw new Error(`Button-VerticalList-Item: Invalid visual state "${n}". Valid states are: ${Object.keys(Zt).join(", ")}`);return i}function Sr(n){return n==="rest"||n==="selected"||n==="notSelected"}function Er(n){return n==="checked"||n==="unchecked"}function Yt(n){return n==="selected"}function wr(n,i){return Sr(i)?{...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`}:Er(i)?{...n,labelColor:"var(--color-feedback-error-text)",iconColor:"var(--color-feedback-error-text)",cssClass:`${n.cssClass} vertical-list-item--error`}:n}function Xt(n,i=!1){let e=Cr(n);return i?wr(e,n):e}var ut="@3fn/dp:tokenContract";function Ar(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(Ar(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,ut)||Object.defineProperty(r,ut,{value:s,enumerable:!1,configurable:!0,writable:!1}),r}var Ve=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={}){let r=t.precision??this.defaultPrecision;return{value:this.roundToPrecision(i,r),unit:"pt",token:e}}convertToAndroid(i,e,t={}){let r=t.precision??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={}){let r=t.precision??this.defaultPrecision,s=t.webBaseFontSize??this.defaultWebBaseFontSize;if(this.isTypographyToken(e,t.category)){let a=i/s;return{value:this.roundToPrecision(a,r),unit:"rem",token:e}}return{value:this.roundToPrecision(i,r),unit:"px",token:e}}validateMathematicalConsistency(i,e,t,r,s){let o=s.webBaseFontSize??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 u=i/o;c=Math.abs(r.value-u)<.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 p=[];if(a||p.push(`iOS: expected ${i}pt, got ${e.value}pt`),l||p.push(`Android: expected ${i}${t.unit}, got ${t.value}${t.unit}`),!c)if(r.unit==="rem"){let u=i/o;p.push(`Web: expected ${u}rem, got ${r.value}rem`)}else p.push(`Web: expected ${i}px, got ${r.value}px`);return{consistent:!1,reasoning:`Mathematical inconsistency detected: ${p.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}`)}}},Tr=new Ve;var P={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 R(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var ht={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:R(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:R(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:R(v*.5)},space075:{name:"space075",category:"spacing",baseValue:P.space075.value,familyBaseValue:v,description:"Strategic flexibility spacing - 0.75x base value",mathematicalRelationship:P.space075.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:R(P.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:R(v)},space125:{name:"space125",category:"spacing",baseValue:P.space125.value,familyBaseValue:v,description:"Strategic flexibility spacing - 1.25x base value",mathematicalRelationship:P.space125.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:R(P.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:R(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:R(v*2)},space250:{name:"space250",category:"spacing",baseValue:P.space250.value,familyBaseValue:v,description:"Strategic flexibility spacing - 2.5x base value",mathematicalRelationship:P.space250.derivation,baselineGridAlignment:!1,isStrategicFlexibility:!0,isPrecisionTargeted:!1,platforms:R(P.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:R(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:R(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:R(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:R(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:R(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:R(v*8)}},Ys=Object.keys(ht);var Rr=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:ht.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 Jt(n){return Rr[`paddingBlock.${n}`]}var Qt=":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 Br=["--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 Lr(){let n=getComputedStyle(document.documentElement),i=[];for(let e of Br)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 Vr(n,i=!1){let e=n==="rest"||n==="selected"||n==="notSelected",r=Yt(n)||i&&e?"selected":"rest";return`${Jt(r)}px`}function ei(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=k()}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||(Lr(),this._tokensValidated=!0),this._calculateBlendColorsWithRetry(),this._render()}_calculateBlendColorsWithRetry(){try{this._calculateBlendColors()}catch{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(){let e=w.size100;this._shadowRoot.innerHTML=`
|
|
309
306
|
<style>${Qt}</style>
|
|
310
307
|
<button
|
|
311
308
|
class="vertical-list-item"
|
|
@@ -338,7 +335,7 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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=li(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=oi(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 p=s[d];c.setAttribute("visual-state",p);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,p);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 si(0,e);if(this._mode==="select"){let r=this._internalState.previousSelectedIndex,s=this._selectedIndex;return this._internalState.isFirstSelection&&s!==null?ri(e):s===null&&r!==null?ni(e):r!==null&&s!==null&&r!==s?ii(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]=Ye(!0,this._mode),o[s]=Ye(!1,this._mode)),s===null&&r!==null&&(o[r]=Ye(!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&&Ze(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(!ti(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&&Ze(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<"u"&&!customElements.get("button-vertical-list-set")&&customElements.define("button-vertical-list-set",te);var pt={type:"human",size:"md",interactive:!1,decorative:!1};var h=8;function B(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var H={size050:{name:"size050",category:"sizing",baseValue:h*.5,familyBaseValue:h,description:"Size 050 - smallest component dimension",mathematicalRelationship:`base \xD7 0.5 = ${h} \xD7 0.5 = ${h*.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*.5)},size100:{name:"size100",category:"sizing",baseValue:h,familyBaseValue:h,description:"Size 100 - base component dimension",mathematicalRelationship:`base \xD7 1 = ${h} \xD7 1 = ${h}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h)},size150:{name:"size150",category:"sizing",baseValue:h*1.5,familyBaseValue:h,description:"Size 150 - small component dimension",mathematicalRelationship:`base \xD7 1.5 = ${h} \xD7 1.5 = ${h*1.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*1.5)},size200:{name:"size200",category:"sizing",baseValue:h*2,familyBaseValue:h,description:"Size 200 - medium-small component dimension",mathematicalRelationship:`base \xD7 2 = ${h} \xD7 2 = ${h*2}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*2)},size250:{name:"size250",category:"sizing",baseValue:h*2.5,familyBaseValue:h,description:"Size 250 - medium component dimension",mathematicalRelationship:`base \xD7 2.5 = ${h} \xD7 2.5 = ${h*2.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*2.5)},size300:{name:"size300",category:"sizing",baseValue:h*3,familyBaseValue:h,description:"Size 300 - standard component dimension",mathematicalRelationship:`base \xD7 3 = ${h} \xD7 3 = ${h*3}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*3)},size400:{name:"size400",category:"sizing",baseValue:h*4,familyBaseValue:h,description:"Size 400 - large component dimension",mathematicalRelationship:`base \xD7 4 = ${h} \xD7 4 = ${h*4}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*4)},size500:{name:"size500",category:"sizing",baseValue:h*5,familyBaseValue:h,description:"Size 500 - extra-large component dimension",mathematicalRelationship:`base \xD7 5 = ${h} \xD7 5 = ${h*5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*5)},size600:{name:"size600",category:"sizing",baseValue:h*6,familyBaseValue:h,description:"Size 600 - prominent component dimension",mathematicalRelationship:`base \xD7 6 = ${h} \xD7 6 = ${h*6}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*6)},size700:{name:"size700",category:"sizing",baseValue:h*7,familyBaseValue:h,description:"Size 700 - large prominent component dimension",mathematicalRelationship:`base \xD7 7 = ${h} \xD7 7 = ${h*7}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*7)},size800:{name:"size800",category:"sizing",baseValue:h*8,familyBaseValue:h,description:"Size 800 - extra-large prominent component dimension",mathematicalRelationship:`base \xD7 8 = ${h} \xD7 8 = ${h*8}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*8)},size900:{name:"size900",category:"sizing",baseValue:h*9,familyBaseValue:h,description:"Size 900 - large prominent component dimension",mathematicalRelationship:`base \xD7 9 = ${h} \xD7 9 = ${h*9}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*9)},size1000:{name:"size1000",category:"sizing",baseValue:h*10,familyBaseValue:h,description:"Size 1000 - hero component dimension",mathematicalRelationship:`base \xD7 10 = ${h} \xD7 10 = ${h*10}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*10)},size1600:{name:"size1600",category:"sizing",baseValue:h*16,familyBaseValue:h,description:"Size 1600 - maximum component dimension",mathematicalRelationship:`base \xD7 16 = ${h} \xD7 16 = ${h*16}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*16)}},Co=Object.keys(H);var G=N({component:"Avatar",family:"sizing",tokens:{"size.xs":{reference:H.size300,reasoning:"Extra small avatar (24px). Compact contexts \u2014 inline mentions, dense lists."},"size.sm":{reference:H.size400,reasoning:"Small avatar (32px). Comment threads, contact lists."},"size.md":{reference:H.size500,reasoning:"Medium avatar (40px). Default size \u2014 profile cards, list items."},"size.lg":{reference:H.size600,reasoning:"Large avatar (48px). Profile headers, prominent identity display."},"size.xl":{reference:H.size1000,reasoning:"Extra large avatar (80px). Profile pages, hero sections."},"size.xxl":{reference:H.size1600,reasoning:"Extra extra large avatar (128px). Full profile view, onboarding."}}}),Ao=N({component:"Avatar",family:"spacing",tokens:{"icon.size.xs":{value:h*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:h*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 gt=".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 $r(n,i){let e=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=[],p=c.length;for(let A=0;A<p;A++){let T=c[A],Ne=c[(A+1)%p],we=c[(A-1+p)%p],V={x:we.x-T.x,y:we.y-T.y},Z={x:Ne.x-T.x,y:Ne.y-T.y},xt=Math.sqrt(V.x*V.x+V.y*V.y),kt=Math.sqrt(Z.x*Z.x+Z.y*Z.y),Ct={x:V.x/xt,y:V.y/xt},St={x:Z.x/kt,y:Z.y/kt},Et={x:T.x+Ct.x*e,y:T.y+Ct.y*e},He={x:T.x+St.x*e,y:T.y+St.y*e};A===0?d.push(`M ${He.x.toFixed(2)} ${He.y.toFixed(2)}`):(d.push(`L ${Et.x.toFixed(2)} ${Et.y.toFixed(2)}`),d.push(`Q ${T.x.toFixed(2)} ${T.y.toFixed(2)} ${He.x.toFixed(2)} ${He.y.toFixed(2)}`))}let u=c[0],m=c[1],g=c[p-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),x=Math.sqrt(b.x*b.x+b.y*b.y),y={x:f.x/C,y:f.y/C},E={x:b.x/x,y:b.y/x},S={x:u.x+y.x*e,y:u.y+y.y*e},L={x:u.x+E.x*e,y:u.y+E.y*e};return d.push(`L ${S.x.toFixed(2)} ${S.y.toFixed(2)}`),d.push(`Q ${u.x.toFixed(2)} ${u.y.toFixed(2)} ${L.x.toFixed(2)} ${L.y.toFixed(2)}`),d.push("Z"),d.join(" ")}var Pr={xs:"xs",sm:13,md:20,lg:24,xl:40,xxl:"xxl"},Mr={xs:G["size.xs"],sm:G["size.sm"],md:G["size.md"],lg:G["size.lg"],xl:G["size.xl"],xxl:G["size.xxl"]},Dr={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:pt.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:pt.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=Dr[i],r=Pr[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=li(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=oi(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 p=s[d];c.setAttribute("visual-state",p);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,p);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 si(0,e);if(this._mode==="select"){let r=this._internalState.previousSelectedIndex,s=this._selectedIndex;return this._internalState.isFirstSelection&&s!==null?ri(e):s===null&&r!==null?ni(e):r!==null&&s!==null&&r!==s?ii(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]=Ye(!0,this._mode),o[s]=Ye(!1,this._mode)),s===null&&r!==null&&(o[r]=Ye(!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&&Ze(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(!ti(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&&Ze(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<"u"&&!customElements.get("button-vertical-list-set")&&customElements.define("button-vertical-list-set",te);var pt={type:"human",size:"md",interactive:!1,decorative:!1};var h=8;function B(n){return{web:{value:n,unit:"px"},ios:{value:n,unit:"pt"},android:{value:n,unit:"dp"}}}var N={size050:{name:"size050",category:"sizing",baseValue:h*.5,familyBaseValue:h,description:"Size 050 - smallest component dimension",mathematicalRelationship:`base \xD7 0.5 = ${h} \xD7 0.5 = ${h*.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*.5)},size100:{name:"size100",category:"sizing",baseValue:h,familyBaseValue:h,description:"Size 100 - base component dimension",mathematicalRelationship:`base \xD7 1 = ${h} \xD7 1 = ${h}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h)},size150:{name:"size150",category:"sizing",baseValue:h*1.5,familyBaseValue:h,description:"Size 150 - small component dimension",mathematicalRelationship:`base \xD7 1.5 = ${h} \xD7 1.5 = ${h*1.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*1.5)},size200:{name:"size200",category:"sizing",baseValue:h*2,familyBaseValue:h,description:"Size 200 - medium-small component dimension",mathematicalRelationship:`base \xD7 2 = ${h} \xD7 2 = ${h*2}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*2)},size250:{name:"size250",category:"sizing",baseValue:h*2.5,familyBaseValue:h,description:"Size 250 - medium component dimension",mathematicalRelationship:`base \xD7 2.5 = ${h} \xD7 2.5 = ${h*2.5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*2.5)},size300:{name:"size300",category:"sizing",baseValue:h*3,familyBaseValue:h,description:"Size 300 - standard component dimension",mathematicalRelationship:`base \xD7 3 = ${h} \xD7 3 = ${h*3}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*3)},size400:{name:"size400",category:"sizing",baseValue:h*4,familyBaseValue:h,description:"Size 400 - large component dimension",mathematicalRelationship:`base \xD7 4 = ${h} \xD7 4 = ${h*4}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*4)},size500:{name:"size500",category:"sizing",baseValue:h*5,familyBaseValue:h,description:"Size 500 - extra-large component dimension",mathematicalRelationship:`base \xD7 5 = ${h} \xD7 5 = ${h*5}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*5)},size600:{name:"size600",category:"sizing",baseValue:h*6,familyBaseValue:h,description:"Size 600 - prominent component dimension",mathematicalRelationship:`base \xD7 6 = ${h} \xD7 6 = ${h*6}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*6)},size700:{name:"size700",category:"sizing",baseValue:h*7,familyBaseValue:h,description:"Size 700 - large prominent component dimension",mathematicalRelationship:`base \xD7 7 = ${h} \xD7 7 = ${h*7}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*7)},size800:{name:"size800",category:"sizing",baseValue:h*8,familyBaseValue:h,description:"Size 800 - extra-large prominent component dimension",mathematicalRelationship:`base \xD7 8 = ${h} \xD7 8 = ${h*8}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*8)},size900:{name:"size900",category:"sizing",baseValue:h*9,familyBaseValue:h,description:"Size 900 - large prominent component dimension",mathematicalRelationship:`base \xD7 9 = ${h} \xD7 9 = ${h*9}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*9)},size1000:{name:"size1000",category:"sizing",baseValue:h*10,familyBaseValue:h,description:"Size 1000 - hero component dimension",mathematicalRelationship:`base \xD7 10 = ${h} \xD7 10 = ${h*10}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*10)},size1600:{name:"size1600",category:"sizing",baseValue:h*16,familyBaseValue:h,description:"Size 1600 - maximum component dimension",mathematicalRelationship:`base \xD7 16 = ${h} \xD7 16 = ${h*16}`,baselineGridAlignment:!0,isStrategicFlexibility:!1,isPrecisionTargeted:!1,platforms:B(h*16)}},Co=Object.keys(N);var G=q({component:"Avatar",family:"sizing",tokens:{"size.xs":{reference:N.size300,reasoning:"Extra small avatar (24px). Compact contexts \u2014 inline mentions, dense lists."},"size.sm":{reference:N.size400,reasoning:"Small avatar (32px). Comment threads, contact lists."},"size.md":{reference:N.size500,reasoning:"Medium avatar (40px). Default size \u2014 profile cards, list items."},"size.lg":{reference:N.size600,reasoning:"Large avatar (48px). Profile headers, prominent identity display."},"size.xl":{reference:N.size1000,reasoning:"Extra large avatar (80px). Profile pages, hero sections."},"size.xxl":{reference:N.size1600,reasoning:"Extra extra large avatar (128px). Full profile view, onboarding."},"icon.size.xs":{value:h*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:h*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 gt=".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 $r(n,i){let e=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=[],p=c.length;for(let A=0;A<p;A++){let T=c[A],Ne=c[(A+1)%p],we=c[(A-1+p)%p],V={x:we.x-T.x,y:we.y-T.y},Z={x:Ne.x-T.x,y:Ne.y-T.y},xt=Math.sqrt(V.x*V.x+V.y*V.y),kt=Math.sqrt(Z.x*Z.x+Z.y*Z.y),Ct={x:V.x/xt,y:V.y/xt},St={x:Z.x/kt,y:Z.y/kt},Et={x:T.x+Ct.x*e,y:T.y+Ct.y*e},He={x:T.x+St.x*e,y:T.y+St.y*e};A===0?d.push(`M ${He.x.toFixed(2)} ${He.y.toFixed(2)}`):(d.push(`L ${Et.x.toFixed(2)} ${Et.y.toFixed(2)}`),d.push(`Q ${T.x.toFixed(2)} ${T.y.toFixed(2)} ${He.x.toFixed(2)} ${He.y.toFixed(2)}`))}let u=c[0],m=c[1],g=c[p-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),y={x:f.x/x,y:f.y/x},E={x:b.x/C,y:b.y/C},S={x:u.x+y.x*e,y:u.y+y.y*e},L={x:u.x+E.x*e,y:u.y+E.y*e};return d.push(`L ${S.x.toFixed(2)} ${S.y.toFixed(2)}`),d.push(`Q ${u.x.toFixed(2)} ${u.y.toFixed(2)} ${L.x.toFixed(2)} ${L.y.toFixed(2)}`),d.push("Z"),d.join(" ")}var Pr={xs:"xs",sm:13,md:20,lg:24,xl:40,xxl:"xxl"},Mr={xs:G["size.xs"],sm:G["size.sm"],md:G["size.md"],lg:G["size.lg"],xl:G["size.xl"],xxl:G["size.xxl"]},Dr={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:pt.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:pt.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=Dr[i],r=Pr[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 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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)}"`:"",p=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)}"`:"",p=o?' aria-hidden="true"':"";i==="human"&&t&&r==null&&!o&&typeof console<"u"&&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 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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",W);var ci={size:"md",truncate:!1},di={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 Nr=
|
|
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 ci={size:"md",truncate:!1},di={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 Nr=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 ui(){return Nr.maxWidth}var hi=".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 ie=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:ci.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=di[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)}"`:"",p=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,15 +467,15 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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 mi=["checked","indeterminate","label","size","label-align","label-typography","helper-text","error-message","test-id","name","value"],Je={checked:!1,indeterminate:!1,size:"md",labelAlign:"center",labelTypography:"inherit"};var bi=":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 Hr=0,vi={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=()=>{if(!this._input)return;let e=this._input.checked;e?this.setAttribute("checked",""):this.removeAttribute("checked"),this.indeterminate&&this.removeAttribute("indeterminate"),this.onChange?.(e),this.dispatchEvent(new CustomEvent("change",{detail:{checked:e},bubbles:!0,composed:!0}))};this._shadowRoot=this.attachShadow({mode:"open"}),this._generatedId=`checkbox-${++Hr}`,this._blendUtils=k()}static get observedAttributes(){return[...mi]}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:Je.size}set size(e){this.setAttribute("size",e)}get labelAlign(){let e=this.getAttribute("label-align");return e==="center"||e==="top"?e:Je.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:Je.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,p=this.indeterminate,u=this.helperText,m=this.errorMessage,g=!!m,f=this.testID,b=this.name,C=this.value,x=["checkbox",`checkbox--${a}`,l==="top"?"checkbox--align-top":"",c!=="inherit"?`checkbox--label-${c}`:"",d?"checkbox--checked":"",p?"checkbox--indeterminate":"",g?"checkbox--error":""].filter(Boolean).join(" "),y="";p?y=$({name:"minus",size:vi[a],color:"inherit"}):d&&(y=$({name:"check",size:vi[a],color:"inherit"}));let E=f?` data-testid="${f}"`:"",S=[];m&&S.push(s),u&&S.push(r);let L=S.length>0?` aria-describedby="${S.join(" ")}"`:"",A=u?`<span class="checkbox__helper" id="${r}">${u}</span>`:"",T=m?`<span class="checkbox__error" id="${s}" role="alert">${m}</span>`:"",Ne=b?` name="${b}"`:"",we=`${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 mi=["checked","indeterminate","label","size","label-align","label-typography","helper-text","error-message","test-id","name","value"],Je={checked:!1,indeterminate:!1,size:"md",labelAlign:"center",labelTypography:"inherit"};var bi=":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 Hr=0,vi={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=()=>{if(!this._input)return;let e=this._input.checked;e?this.setAttribute("checked",""):this.removeAttribute("checked"),this.indeterminate&&this.removeAttribute("indeterminate"),this.onChange?.(e),this.dispatchEvent(new CustomEvent("change",{detail:{checked:e},bubbles:!0,composed:!0}))};this._shadowRoot=this.attachShadow({mode:"open"}),this._generatedId=`checkbox-${++Hr}`,this._blendUtils=k()}static get observedAttributes(){return[...mi]}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:Je.size}set size(e){this.setAttribute("size",e)}get labelAlign(){let e=this.getAttribute("label-align");return e==="center"||e==="top"?e:Je.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:Je.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,p=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":"",p?"checkbox--indeterminate":"",g?"checkbox--error":""].filter(Boolean).join(" "),y="";p?y=$({name:"minus",size:vi[a],color:"inherit"}):d&&(y=$({name:"check",size:vi[a],color:"inherit"}));let E=f?` data-testid="${f}"`:"",S=[];m&&S.push(s),u&&S.push(r);let L=S.length>0?` aria-describedby="${S.join(" ")}"`:"",A=u?`<span class="checkbox__helper" id="${r}">${u}</span>`:"",T=m?`<span class="checkbox__error" id="${s}" role="alert">${m}</span>`:"",Ne=b?` name="${b}"`:"",we=`${e}-label`;this._shadowRoot.innerHTML=`
|
|
474
471
|
<style>${bi}</style>
|
|
475
472
|
<div class="checkbox-container">
|
|
476
|
-
<div class="${
|
|
473
|
+
<div class="${C}"${E}>
|
|
477
474
|
<input
|
|
478
475
|
type="checkbox"
|
|
479
476
|
class="checkbox__input"
|
|
480
477
|
id="${t}"${Ne}
|
|
481
|
-
value="${
|
|
478
|
+
value="${x}"
|
|
482
479
|
aria-labelledby="${we}"
|
|
483
480
|
${d?"checked":""}
|
|
484
481
|
${p?'aria-checked="mixed"':`aria-checked="${d}"`}
|
|
@@ -631,10 +628,10 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
631
628
|
<slot></slot>
|
|
632
629
|
</container-base>
|
|
633
630
|
</div>
|
|
634
|
-
`}};$e.DEFAULTS={padding:"150",background:"surface.primary",shadow:"container",border:"none",borderColor:"border.default",borderRadius:"normal",semantic:"div",role:"button"};var j=$e;customElements.get("container-card-base")||customElements.define("container-card-base",j);var Si=["selected","label","value","name","size","label-align","helper-text","error-message","test-id"],vt={selected:!1,size:"md",labelAlign:"center"};var Ei=":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 Gr=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=()=>{if(!this._input)return;let e=this._input.checked;e?this.setAttribute("selected",""):this.removeAttribute("selected"),this._updateFormValue(),e&&this.onSelect?.(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-${++Gr}`,this._internals=this.attachInternals(),this._blendUtils=k()}static get observedAttributes(){return[...Si]}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:vt.size}set size(e){this.setAttribute("size",e)}get labelAlign(){let e=this.getAttribute("label-align");return e==="center"||e==="top"?e:vt.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(){if(typeof this._internals?.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,p=this.errorMessage,u=!!p,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(" "),
|
|
631
|
+
`}};$e.DEFAULTS={padding:"150",background:"surface.primary",shadow:"container",border:"none",borderColor:"border.default",borderRadius:"normal",semantic:"div",role:"button"};var j=$e;customElements.get("container-card-base")||customElements.define("container-card-base",j);var Si=["selected","label","value","name","size","label-align","helper-text","error-message","test-id"],vt={selected:!1,size:"md",labelAlign:"center"};var Ei=":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 Gr=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=()=>{if(!this._input)return;let e=this._input.checked;e?this.setAttribute("selected",""):this.removeAttribute("selected"),this._updateFormValue(),e&&this.onSelect?.(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-${++Gr}`,this._internals=this.attachInternals(),this._blendUtils=k()}static get observedAttributes(){return[...Si]}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:vt.size}set size(e){this.setAttribute("size",e)}get labelAlign(){let e=this.getAttribute("label-align");return e==="center"||e==="top"?e:vt.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(){if(typeof this._internals?.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,p=this.errorMessage,u=!!p,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=[];p&&C.push(s),d&&C.push(r);let y=C.length>0?` aria-describedby="${C.join(" ")}"`:"",E=d?`<span class="radio__helper" id="${r}">${d}</span>`:"",S=p?`<span class="radio__error" id="${s}" role="alert">${p}</span>`:"",L=g?` name="${g}"`:"",A=`${e}-label`;this._shadowRoot.innerHTML=`
|
|
635
632
|
<style>${Ei}</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"
|
|
@@ -683,14 +680,14 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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",be);var Bi={size:"md"},Pe=50;function Li(n,i){return n===i?"current":"incomplete"}function Vi(n,i){return Math.max(1,Math.min(n,i))}var $i=":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 ve=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:Bi.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=$i,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>Pe&&(typeof process<"u",console.warn(`Progress-Pagination-Base: Received ${e} items but maximum is ${Pe}. Rendering first ${Pe} items only. Consider using a different navigation pattern.`),e=Pe);let s=Vi(this.currentItem,e);for(;this._nodes.length<e;){let y=document.createElement("progress-indicator-node-base");this._track.appendChild(y),this._nodes.push(y)}for(;this._nodes.length>e;){let y=this._nodes.pop();this._track.removeChild(y)}for(let y=0;y<e;y++){let E=y+1,S=this._nodes[y];S.setAttribute("state",Li(E,s)),S.setAttribute("size",t),S.setAttribute("content","none"),S.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),p=d*a+(d-1)*l;this._container.style.width=`${p+c*2}px`,this._container.style.boxSizing="border-box";let u=e*a+(e-1)*l,m=(s-1)*(a+l)+a/2,g=p/2-m,f=p-u;g=Math.min(0,Math.max(f,g));let b=!this._container.dataset.rendered,
|
|
683
|
+
`}escapeHtml(i){let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return i.replace(/[&<>"']/g,t=>e[t])}};customElements.get("progress-indicator-label-base")||customElements.define("progress-indicator-label-base",be);var Bi={size:"md"},Pe=50;function Li(n,i){return n===i?"current":"incomplete"}function Vi(n,i){return Math.max(1,Math.min(n,i))}var $i=":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 ve=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:Bi.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=$i,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>Pe&&(typeof process<"u",console.warn(`Progress-Pagination-Base: Received ${e} items but maximum is ${Pe}. Rendering first ${Pe} items only. Consider using a different navigation pattern.`),e=Pe);let s=Vi(this.currentItem,e);for(;this._nodes.length<e;){let y=document.createElement("progress-indicator-node-base");this._track.appendChild(y),this._nodes.push(y)}for(;this._nodes.length>e;){let y=this._nodes.pop();this._track.removeChild(y)}for(let y=0;y<e;y++){let E=y+1,S=this._nodes[y];S.setAttribute("state",Li(E,s)),S.setAttribute("size",t),S.setAttribute("content","none"),S.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),p=d*a+(d-1)*l;this._container.style.width=`${p+c*2}px`,this._container.style.boxSizing="border-box";let u=e*a+(e-1)*l,m=(s-1)*(a+l)+a/2,g=p/2-m,f=p-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",ve);var Pi={size:"md",errorSteps:[]},Me=8;function Mi(n,i,e){return e.includes(n)?"error":n<i?"completed":n===i?"current":"incomplete"}function Di(n){return n==="completed"?"checkmark":"none"}function Ni(n,i){return n==="completed"&&i==="completed"?"active":"inactive"}function Hi(n,i){return Math.max(1,Math.min(n,i))}function Oi(n,i){return n.filter(e=>e>=1&&e<=i)}var Fi=":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 fe=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:Pi.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>Me&&(typeof process<"u",console.warn(`Progress-Stepper-Base: Received ${e} steps but maximum is ${Me}. Rendering first ${Me} steps only. Consider breaking into multiple sub-flows.`),e=Me);let s=Hi(this.currentStep,e),o=Oi(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(Mi(u,s,o));let p="";for(let u=0;u<d.length;u++){let m=d[u],g=Di(m);if(p+=`<progress-indicator-node-base state="${m}" size="${t}" content="${g}"></progress-indicator-node-base>`,u<d.length-1){let f=Ni(d[u],d[u+1]);p+=`<progress-indicator-connector-base state="${f}"></progress-indicator-connector-base>`}}this._shadowRoot.innerHTML=`
|
|
687
684
|
<style>
|
|
688
685
|
${Fi}
|
|
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
|
${p}
|
|
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",fe);var Ui={size:"md",errorSteps:[]},De=8;function qi(n,i,e){return e.includes(n)?"error":n<i?"completed":n===i?"current":"incomplete"}function Gi(n,i){return n==="completed"?"checkmark":i.icon?"icon":"none"}function yt(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: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 _e=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{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:Ui.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>De&&(typeof process<"u",console.warn(`Progress-Stepper-Detailed: Received ${s} steps but maximum is ${De}. Rendering first ${De} steps only. Consider breaking into multiple sub-flows.`),e=e.slice(0,De));let o=e.length,a=Wi(this.currentStep,o),l=ji(this.errorSteps,o),c=this.accessibilityLabel||`Step ${a} of ${o}`,d=["stepper-detailed",`stepper-detailed--${t}`].join(" "),p=r?` data-testid="${this.escapeHtml(r)}"`:"",u=[];for(let g=1;g<=o;g++)u.push(qi(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",fe);var Ui={size:"md",errorSteps:[]},De=8;function qi(n,i,e){return e.includes(n)?"error":n<i?"completed":n===i?"current":"incomplete"}function Gi(n,i){return n==="completed"?"checkmark":i.icon?"icon":"none"}function yt(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: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 _e=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{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:Ui.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>De&&(typeof process<"u",console.warn(`Progress-Stepper-Detailed: Received ${s} steps but maximum is ${De}. Rendering first ${De} steps only. Consider breaking into multiple sub-flows.`),e=e.slice(0,De));let o=e.length,a=Wi(this.currentStep,o),l=ji(this.errorSteps,o),c=this.accessibilityLabel||`Step ${a} of ${o}`,d=["stepper-detailed",`stepper-detailed--${t}`].join(" "),p=r?` data-testid="${this.escapeHtml(r)}"`:"",u=[];for(let g=1;g<=o;g++)u.push(qi(g,a,l));let m="";for(let g=0;g<u.length;g++){let f=u[g],b=e[g],x=Gi(f,b),C=x==="icon"&&b.icon?` icon="${this.escapeHtml(b.icon)}"`:"",y=`Step ${g+1} of ${o}: ${b.label}`;l.includes(g+1)&&(y+=", error"),b.optional&&(y+=", optional");let E="";if(g>0){let A=yt(u[g-1],u[g]);E+=`<div class="stepper-detailed__connector"><progress-indicator-connector-base state="${A}"></progress-indicator-connector-base></div>`}else E+='<div class="stepper-detailed__spacer"></div>';if(E+=`<progress-indicator-node-base state="${f}" size="${t}" content="${x}"${C}></progress-indicator-node-base>`,g<u.length-1){let A=yt(u[g],u[g+1]);E+=`<div class="stepper-detailed__connector"><progress-indicator-connector-base state="${A}"></progress-indicator-connector-base></div>`}else E+='<div class="stepper-detailed__spacer"></div>';let S=b.helperText?` helper-text="${this.escapeHtml(b.helperText)}"`:"",L=b.optional?" optional":"";m+=`<div class="stepper-detailed__step" role="listitem" aria-label="${this.escapeHtml(y)}">`,m+=`<div class="stepper-detailed__node-row">${E}</div>`,m+=`<div class="stepper-detailed__label"><progress-indicator-label-base label="${this.escapeHtml(b.label)}"${S}${L}></progress-indicator-label-base></div>`,m+="</div>"}this._shadowRoot.innerHTML=`
|
|
694
691
|
<style>
|
|
695
692
|
${Ki}
|
|
696
693
|
</style>
|
|
@@ -701,5 +698,5 @@ function Qe(n){let i=n.r/255,e=n.g/255,t=n.b/255,r=Math.max(i,e,t),s=Math.min(i,
|
|
|
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",Ce);var Qi=".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 er=8,Se=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(){let e=document.createElement("style");e.textContent=Qi;let t=document.createElement("nav-header");t.setAttribute("appearance",this.getAttribute("appearance")||"opaque"),t.setAttribute("show-separator",this.getAttribute("show-separator")??"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>er&&!this._hidden?(this._hidden=!0,this.classList.add("nav-header-page--hidden")):t<-er&&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",Se);var tr=":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 Qr=[0,25,50,75,100],Ee=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=tr;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 Qr)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",Ee);function ir(){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 _(n,i){customElements.get(n)||customElements.define(n,i)}_("input-text-base",X);_("input-text-email",Te);_("input-text-password",ze);_("input-text-phone-number",Re);_("button-cta",Be);_("icon-base",U);_("button-icon",Le);_("container-base",q);_("button-vertical-list-item",ee);_("button-vertical-list-set",te);_("avatar-base",W);_("badge-label-base",ie);_("badge-count-base",ne);_("badge-count-notification",se);_("input-checkbox-base",oe);_("input-checkbox-legal",ae);_("chip-base",de);_("chip-filter",ue);_("chip-input",he);_("container-card-base",j);_("input-radio-base",K);_("input-radio-set",pe);_("progress-indicator-node-base",ge);_("progress-indicator-connector-base",me);_("progress-indicator-label-base",be);_("progress-pagination-base",ve);_("progress-stepper-base",fe);_("progress-stepper-detailed",_e);_("nav-segmented-choice",ye);_("nav-tab-bar",xe);_("nav-header",ke);_("nav-header-app",Ce);_("nav-header-page",Se);_("progress-bar",Ee);typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{requestAnimationFrame(()=>ir())}):requestAnimationFrame(()=>ir()));var Cd=U,Sd=U,Ed=q,wd=q,Ad=ee,Td=te,Id=W,zd=W,Rd=ie,Bd=ne,Ld=se,Vd=oe,$d=ae,Pd=X,Md=de,Dd=ue,Nd=he,Hd=j,Od=j,Fd=K,Ud=pe,qd=ge,Gd=me,Wd=be,jd=ve,Kd=fe,Zd=_e,Yd=ye,Xd=xe,Jd=ke,Qd=Ce,eu=Se,tu=Ee;export{Id as Avatar,zd as AvatarBase,W as AvatarBaseElement,Bd as BadgeCount,ne as BadgeCountBase,se as BadgeCountNotification,Rd as BadgeLabel,ie as BadgeLabelBase,Ld as BadgeNotification,Be as ButtonCTA,Le as ButtonIcon,ee as ButtonVerticalListItem,te as ButtonVerticalListSet,Vd as CheckboxBase,$d as CheckboxLegal,Md as ChipBase,de as ChipBaseElement,Dd as ChipFilter,ue as ChipFilterElement,Nd as ChipInput,he as ChipInputElement,Ed as Container,wd as ContainerBase,q as ContainerBaseWeb,Hd as ContainerCard,Od as ContainerCardBase,j as ContainerCardBaseWeb,Cd as Icon,Sd as IconBase,U as IconBaseElement,oe as InputCheckboxBaseElement,ae as InputCheckboxLegalElement,K as InputRadioBaseElement,pe as InputRadioSetElement,X as InputTextBase,Te as InputTextEmail,ze as InputTextPassword,Re as InputTextPhoneNumber,Jd as NavHeader,Ce as NavHeaderApp,Qd as NavHeaderAppElement,ke as NavHeaderBase,Se as NavHeaderPage,eu as NavHeaderPageElement,ye as NavSegmentedChoiceBase,xe as NavTabBarBase,jd as PaginationBase,tu as ProgressBar,Ee as ProgressBarBase,Gd as ProgressConnector,me as ProgressIndicatorConnectorBase,be as ProgressIndicatorLabelBase,ge as ProgressIndicatorNodeBase,Wd as ProgressLabel,qd as ProgressNode,ve as ProgressPaginationBase,fe as ProgressStepperBase,_e as ProgressStepperDetailed,Fd as RadioBase,Ud as RadioSet,Yd as SegmentedChoice,Kd as StepperBase,Zd as StepperDetailed,Xd as TabBar,Pd as TextInputField,Ad as VerticalListButtonItem,Td as VerticalListButtonSet};
|
|
701
|
+
`,this._shadowRoot.appendChild(i)}};customElements.get("nav-header-app")||customElements.define("nav-header-app",Ce);var Qi=".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 er=8,Se=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(){let e=document.createElement("style");e.textContent=Qi;let t=document.createElement("nav-header");t.setAttribute("appearance",this.getAttribute("appearance")||"opaque"),t.setAttribute("show-separator",this.getAttribute("show-separator")??"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>er&&!this._hidden?(this._hidden=!0,this.classList.add("nav-header-page--hidden")):t<-er&&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",Se);var tr=":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 Qr=[0,25,50,75,100],Ee=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=tr;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 Qr)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",Ee);function ir(){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 _(n,i){customElements.get(n)||customElements.define(n,i)}_("input-text-base",X);_("input-text-email",Te);_("input-text-password",ze);_("input-text-phone-number",Re);_("button-cta",Be);_("icon-base",F);_("button-icon",Le);_("container-base",U);_("button-vertical-list-item",ee);_("button-vertical-list-set",te);_("avatar-base",W);_("badge-label-base",ie);_("badge-count-base",ne);_("badge-count-notification",se);_("input-checkbox-base",oe);_("input-checkbox-legal",ae);_("chip-base",de);_("chip-filter",ue);_("chip-input",he);_("container-card-base",j);_("input-radio-base",K);_("input-radio-set",pe);_("progress-indicator-node-base",ge);_("progress-indicator-connector-base",me);_("progress-indicator-label-base",be);_("progress-pagination-base",ve);_("progress-stepper-base",fe);_("progress-stepper-detailed",_e);_("nav-segmented-choice",ye);_("nav-tab-bar",xe);_("nav-header",ke);_("nav-header-app",Ce);_("nav-header-page",Se);_("progress-bar",Ee);typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{requestAnimationFrame(()=>ir())}):requestAnimationFrame(()=>ir()));var kd=F,Cd=F,Sd=U,Ed=U,wd=ee,Ad=te,Td=W,Id=W,zd=ie,Rd=ne,Bd=se,Ld=oe,Vd=ae,$d=X,Pd=de,Md=ue,Dd=he,Nd=j,Hd=j,Od=K,Fd=pe,Ud=ge,qd=me,Gd=be,Wd=ve,jd=fe,Kd=_e,Zd=ye,Yd=xe,Xd=ke,Jd=Ce,Qd=Se,eu=Ee;export{Td as Avatar,Id as AvatarBase,W as AvatarBaseElement,Rd as BadgeCount,ne as BadgeCountBase,se as BadgeCountNotification,zd as BadgeLabel,ie as BadgeLabelBase,Bd as BadgeNotification,Be as ButtonCTA,Le as ButtonIcon,ee as ButtonVerticalListItem,te as ButtonVerticalListSet,Ld as CheckboxBase,Vd as CheckboxLegal,Pd as ChipBase,de as ChipBaseElement,Md as ChipFilter,ue as ChipFilterElement,Dd as ChipInput,he as ChipInputElement,Sd as Container,Ed as ContainerBase,U as ContainerBaseWeb,Nd as ContainerCard,Hd as ContainerCardBase,j as ContainerCardBaseWeb,kd as Icon,Cd as IconBase,F as IconBaseElement,oe as InputCheckboxBaseElement,ae as InputCheckboxLegalElement,K as InputRadioBaseElement,pe as InputRadioSetElement,X as InputTextBase,Te as InputTextEmail,ze as InputTextPassword,Re as InputTextPhoneNumber,Xd as NavHeader,Ce as NavHeaderApp,Jd as NavHeaderAppElement,ke as NavHeaderBase,Se as NavHeaderPage,Qd as NavHeaderPageElement,ye as NavSegmentedChoiceBase,xe as NavTabBarBase,Wd as PaginationBase,eu as ProgressBar,Ee as ProgressBarBase,qd as ProgressConnector,me as ProgressIndicatorConnectorBase,be as ProgressIndicatorLabelBase,ge as ProgressIndicatorNodeBase,Gd as ProgressLabel,Ud as ProgressNode,ve as ProgressPaginationBase,fe as ProgressStepperBase,_e as ProgressStepperDetailed,Od as RadioBase,Fd as RadioSet,Zd as SegmentedChoice,jd as StepperBase,Kd as StepperDetailed,Yd as TabBar,$d as TextInputField,wd as VerticalListButtonItem,Ad as VerticalListButtonSet};
|
|
705
702
|
//# sourceMappingURL=designerpunk.esm.min.js.map
|