@brandsync/wc 1.12.0 → 1.12.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @brandsync/wc
2
2
 
3
+ ## 1.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4976988: `bs-input` `type="chip"`: the chip remove button is now `size="xs"` (20px, 12px icon). It was `md` (44px), so its hover/pressed area stuck out below the chip.
8
+
9
+ Also, for the record (shipped in 1.12.0 without a note): `bs-chatbot-header` side padding is now 16px, and its expand button's tooltip and accessible name read "Fullscreen" (was "Expand"; the expanded state reads "Exit fullscreen", was "Collapse"). `bs-composer` buttons are 44px with an 8px gap, and the human variant has a stronger border (`--bs-composer-border-human`).
10
+
3
11
  ## 1.12.0
4
12
 
5
13
  ### Minor Changes
@@ -1 +1 @@
1
- import{p as e,g as a,b as l}from"./p-DqQRXQMx.js";export{s as setNonce}from"./p-DqQRXQMx.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await a(),l(JSON.parse('[["p-52cb2358",[[769,"bs-session-timeout",{"type":[513],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"hideIcon":[4,"hide-icon"],"primaryLabel":[1,"primary-label"],"secondaryLabel":[1,"secondary-label"],"secondsLeft":[1026,"seconds-left"],"totalSeconds":[2,"total-seconds"],"countdown":[4],"timeLeftLabel":[1,"time-left-label"],"secondsLeftLabel":[1,"seconds-left-label"],"savedMessage":[1,"saved-message"],"accountName":[1,"account-name"],"accountEmail":[1,"account-email"],"accountInitials":[1,"account-initials"],"passwordLabel":[1,"password-label"],"passwordError":[1,"password-error"],"dividerLabel":[1,"divider-label"],"alternatives":[16],"cancelLabel":[1,"cancel-label"],"password":[32],"announcement":[32],"initialTotal":[32]},null,{"countdown":[{"onTimerInputsChange":0}],"type":[{"onTimerInputsChange":0}]}]]],["p-b9a4042e",[[577,"bs-timepicker",{"name":[513],"value":[1537],"format":[1537],"minuteStep":[2,"minute-step"],"heading":[1],"formatLabel":[1,"format-label"],"confirmLabel":[1,"confirm-label"],"cancelLabel":[1,"cancel-label"],"hourLabel":[1,"hour-label"],"minuteLabel":[1,"minute-label"],"periodLabel":[1,"period-label"],"hour":[32],"minute":[32]},null,{"value":[{"onValueChange":0}],"name":[{"onNameChange":0}]}]]],["p-e2556b4e",[[769,"bs-cookie-consent",{"type":[513],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"policyUrl":[1,"policy-url"],"policyLabel":[1,"policy-label"],"customiseLabel":[1,"customise-label"],"rejectLabel":[1,"reject-label"],"acceptLabel":[1,"accept-label"],"saveLabel":[1,"save-label"],"changeLabel":[1,"change-label"],"alwaysOnLabel":[1,"always-on-label"],"seeCookiesLabel":[1,"see-cookies-label"],"closeLabel":[1,"close-label"],"categories":[16],"choices":[32],"open":[32]},null,{"categories":[{"onCategoriesChange":0}]}]]],["p-78a69a59",[[769,"bs-whats-new",{"type":[513],"heading":[1],"headingLevel":[2,"heading-level"],"closable":[4],"closeLabel":[1,"close-label"],"entries":[16],"filters":[16],"filter":[1537],"markAllReadLabel":[1,"mark-all-read-label"],"releaseNotesLabel":[1,"release-notes-label"],"releaseNotesUrl":[1,"release-notes-url"],"emptyLabel":[1,"empty-label"],"tag":[1],"tagColor":[1,"tag-color"],"image":[1],"points":[16],"step":[2],"total":[2],"stepLabel":[1,"step-label"],"secondaryLabel":[1,"secondary-label"],"primaryLabel":[1,"primary-label"],"date":[1],"description":[1],"actionLabel":[1,"action-label"],"hasHeroSlot":[32]}]]],["p-5ba90a13",[[577,"bs-datepicker",{"name":[513],"range":[516],"value":[1537],"start":[1537],"end":[1537],"min":[1],"max":[1],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"startLabel":[1,"start-label"],"endLabel":[1,"end-label"],"monthLabel":[1,"month-label"],"yearLabel":[1,"year-label"],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"],"viewDate":[32],"focusedIso":[32],"hoverIso":[32],"draft":[32],"openMenu":[32]},null,{"value":[{"onSelectionChange":0},{"onSelectionJump":0}],"start":[{"onSelectionChange":0},{"onSelectionJump":0}],"end":[{"onSelectionChange":0}],"range":[{"onSelectionChange":0}],"name":[{"onSelectionChange":0}]}]]],["p-7f954939",[[769,"bs-onboarding-checklist",{"type":[513],"launcherLayout":[513,"launcher-layout"],"steps":[16],"heading":[1],"description":[1],"headingLevel":[2,"heading-level"],"progressText":[1,"progress-text"],"closable":[4],"progressLabel":[1,"progress-label"],"skipLabel":[1,"skip-label"],"startLabel":[1,"start-label"],"seeAllLabel":[1,"see-all-label"],"afterLabel":[1,"after-label"],"doneLabel":[1,"done-label"],"hideLabel":[1,"hide-label"],"closeLabel":[1,"close-label"],"statusDoneLabel":[1,"status-done-label"],"statusTodoLabel":[1,"status-todo-label"]}]]],["p-2177042f",[[769,"bs-qr-code",{"type":[513],"size":[513],"state":[513],"heading":[1],"description":[1],"url":[1],"amount":[1],"amountLabel":[1,"amount-label"],"expiry":[1],"matrix":[16],"codeLabel":[1,"code-label"],"closable":[4],"hideActions":[4,"hide-actions"],"hideDownload":[4,"hide-download"],"hideCopy":[4,"hide-copy"],"downloadLabel":[1,"download-label"],"copyLabel":[1,"copy-label"],"retryLabel":[1,"retry-label"],"refreshLabel":[1,"refresh-label"],"loadingLabel":[1,"loading-label"],"errorLabel":[1,"error-label"],"expiredLabel":[1,"expired-label"],"scannedLabel":[1,"scanned-label"],"closeLabel":[1,"close-label"],"hasLogo":[32]}]]],["p-fcee0dc4",[[769,"bs-product-tour",{"type":[513],"direction":[513],"heading":[1],"description":[1],"step":[2],"total":[2],"progressLabel":[1,"progress-label"],"primaryLabel":[1,"primary-label"],"secondaryLabel":[1,"secondary-label"],"closable":[4],"closeLabel":[1,"close-label"]}]]],["p-09435f41",[[769,"bs-carousel",{"tracker":[1],"slidesPerView":[2,"slides-per-view"],"currentPage":[1538,"current-page"],"autoplay":[4],"interval":[2],"paused":[1540],"label":[1],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"],"pauseLabel":[1,"pause-label"],"playLabel":[1,"play-label"],"slideCount":[32],"interacting":[32]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[0,"focusin","onFocusIn"],[0,"focusout","onFocusOut"]],{"currentPage":[{"onCurrentPageChange":0}],"autoplay":[{"updateTimer":0}],"paused":[{"updateTimer":0}],"interval":[{"updateTimer":0}],"interacting":[{"updateTimer":0}],"slideCount":[{"updateTimer":0}],"slidesPerView":[{"updateTimer":0}]}]]],["p-68fcd4a4",[[769,"bs-error-page",{"type":[513],"code":[1],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"primaryLabel":[1,"primary-label"],"secondaryLabel":[1,"secondary-label"],"reference":[1]}]]],["p-fc069773",[[769,"bs-file-upload-item",{"state":[513],"fileName":[1,"file-name"],"fileSize":[1,"file-size"],"progress":[2],"message":[1],"thumbnailSrc":[1,"thumbnail-src"],"thumbnailAlt":[1,"thumbnail-alt"],"cancelLabel":[1,"cancel-label"],"removeLabel":[1,"remove-label"]}]]],["p-1261f0b0",[[513,"bs-attachment",{"type":[1],"fileName":[1,"file-name"],"imageSrc":[1,"image-src"],"imageAlt":[1,"image-alt"],"loading":[4],"removable":[4]}]]],["p-3f09296a",[[513,"bs-breadcrumb-overflow",{"items":[16],"overflowLabel":[1,"overflow-label"],"size":[513],"open":[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]]]]],["p-452f9c1c",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["p-09cbf05b",[[769,"bs-dialog",{"open":[1540],"heading":[1],"size":[1],"centered":[516],"hasFooter":[32],"hasImage":[32],"hasIcon":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]],["p-2368a92e",[[769,"bs-file-upload",{"direction":[513],"heading":[1],"description":[1],"buttonLabel":[1,"button-label"],"accept":[1],"multiple":[4],"disabled":[516],"dragging":[1540]}]]],["p-20030f4d",[[769,"bs-navigation-drawer",{"heading":[1],"collapsible":[4],"collapsed":[1540],"logoBackground":[1,"logo-background"],"showLogo":[4,"show-logo"],"open":[1540],"mobile":[32]},[[4,"keydown","onDocumentKeydown"],[4,"focusin","onDocumentFocusIn"]],{"collapsed":[{"onCollapsedChange":0}],"mobile":[{"onMobileChange":0}],"open":[{"onOpenChange":0}]}]]],["p-2f4e08e1",[[769,"bs-navigation-header",{"alignment":[1],"ariaLabel":[1,"aria-label"],"skipToContentHref":[1,"skip-to-content-href"],"skipToContentLabel":[1,"skip-to-content-label"],"logoBackground":[1,"logo-background"]}]]],["p-7796b93f",[[769,"bs-accordion",{"expanded":[516],"size":[1],"disabled":[4],"showIcon":[4,"show-icon"],"showPreview":[4,"show-preview"]}]]],["p-617bd13a",[[257,"bs-ai-disclaimer"]]],["p-39a26c64",[[513,"bs-ai-greeting",{"assistantName":[1,"assistant-name"],"productName":[1,"product-name"]}]]],["p-69c0a85d",[[513,"bs-ai-thinking",{"label":[1]}]]],["p-f15d9524",[[769,"bs-attachment-list",{"ariaLabel":[1,"aria-label"],"canScrollRight":[32]}]]],["p-491b51e6",[[769,"bs-badge",{"variant":[1]}]]],["p-83c90489",[[769,"bs-breadcrumb",{"href":[1],"current":[516],"size":[513]}]]],["p-2497d128",[[769,"bs-breadcrumbs",{"label":[1],"size":[1]},null,{"size":[{"onSizeChange":0}]}]]],["p-6e735e37",[[513,"bs-button-skeleton",{"size":[1]}]]],["p-823ab3b2",[[513,"bs-chatbot-feedback",{"rating":[1538],"submitted":[1540],"comment":[1025],"heading":[1],"subtitle":[1]}]]],["p-d8b29a53",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"],"menuOpen":[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]]],["p-d754ee13",[[769,"bs-chatbot-sources-drawer",{"heading":[1],"count":[2],"slottedCount":[32]}]]],["p-6c6cdf77",[[769,"bs-chatbot-suggestion-button",{"disabled":[4]}]]],["p-81605b82",[[849,"bs-checkbox",{"name":[513],"value":[1],"required":[4],"size":[1],"checked":[1540],"indeterminate":[1540],"disabled":[516],"error":[4],"ariaLabel":[1,"aria-label"]},null,{"checked":[{"syncFormValue":0}],"value":[{"syncFormValue":0}],"required":[{"syncFormValue":0}],"indeterminate":[{"onIndeterminateChange":0}]}]]],["p-6a696161",[[513,"bs-checkbox-skeleton",{"size":[1]}]]],["p-00a0d489",[[785,"bs-chip-filter",{"size":[1],"selected":[516],"dropdown":[4],"disabled":[4],"ariaLabel":[1,"aria-label"],"hasIcon":[32]}]]],["p-d75f3f87",[[785,"bs-chip-input",{"size":[1],"selected":[1540],"disabled":[516],"hasIcon":[32],"labelText":[32]}]]],["p-b8d2ce91",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1025],"state":[513],"ariaLabel":[1,"aria-label"],"hasAttachments":[32]}]]],["p-73f214ed",[[769,"bs-composer-status-banner",{"type":[1],"message":[1],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"actionLabel":[1,"action-label"],"allowClose":[4,"allow-close"]}]]],["p-34e5feaf",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32],"clearSelection":[64]}]]],["p-282ddbee",[[769,"bs-inline-tab",{"selected":[516],"disabled":[4],"ariaLabel":[1,"aria-label"],"value":[513],"tabbable":[4],"hasIcon":[32],"hasLabel":[32]}]]],["p-09bc1923",[[769,"bs-navigation-drawer-item",{"selected":[516],"expandable":[4],"expanded":[1540],"nested":[4],"ariaLabel":[1,"aria-label"],"collapsed":[516],"hasIcon":[32]}]]],["p-3a1af63a",[[849,"bs-radio",{"name":[513],"value":[1],"checked":[1540],"disabled":[516],"groupHasChecked":[32]},[[4,"bsChange","onAnyRadioChange"]],{"checked":[{"onCheckedChange":0}],"value":[{"onCheckedChange":0}]}]]],["p-0f8cd2e8",[[593,"bs-slider",{"type":[1],"name":[513],"showLabel":[4,"show-label"],"label":[1],"min":[2],"max":[2],"step":[2],"value":[1026],"valueStart":[1026,"value-start"],"valueEnd":[1026,"value-end"],"segments":[2],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"value":[{"syncFormValue":0}],"valueStart":[{"syncFormValue":0}],"valueEnd":[{"syncFormValue":0}],"type":[{"syncFormValue":0}]}]]],["p-0b2d3b7e",[[769,"bs-source-link",{"fileName":[1,"file-name"],"sourceName":[1,"source-name"],"version":[1],"href":[1],"target":[1]}]]],["p-56c37e0a",[[769,"bs-stepper",{"currentStep":[2,"current-step"],"direction":[513],"showDescription":[4,"show-description"]},null,{"currentStep":[{"onPropChange":0}],"direction":[{"onPropChange":0}],"showDescription":[{"onPropChange":0}]}]]],["p-a9169157",[[513,"bs-stepper-step",{"name":[1],"description":[1],"error":[4],"disabled":[4],"computedState":[1,"computed-state"],"direction":[1],"showDescription":[4,"show-description"]}]]],["p-b84366a7",[[769,"bs-toast",{"state":[1]}]]],["p-416322bd",[[769,"bs-snackbar",{"variant":[1],"loading":[4],"actionLabel":[1,"action-label"],"actionVariant":[1,"action-variant"],"hideClose":[4,"hide-close"]}]]],["p-89fabf27",[[513,"bs-avatar",{"type":[1],"size":[1],"initials":[1],"src":[1],"alt":[1],"ariaLabel":[1,"aria-label"],"disabled":[516]}]]],["p-f7d15fbe",[[513,"bs-pagination",{"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"],"siblingCount":[2,"sibling-count"],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"]}]]],["p-1978e63c",[[769,"bs-tooltip",{"placement":[1]}]]],["p-b9ccd9d1",[[513,"bs-logo",{"variant":[1],"background":[1],"src":[1],"alt":[1]}]]],["p-e5daa6ca",[[513,"bs-progress",{"type":[1],"size":[1],"strokeWidth":[2,"stroke-width"],"value":[2],"showLabel":[4,"show-label"],"ariaLabel":[1,"aria-label"]}]]],["p-247e36ad",[[849,"bs-switch",{"name":[513],"value":[1],"size":[1],"checked":[1540],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"checked":[{"syncFormValue":0}],"value":[{"syncFormValue":0}]}]]],["p-0b7c77c1",[[769,"bs-progress-linear",{"type":[1],"size":[1],"value":[2],"showLabel":[4,"show-label"],"ariaLabel":[1,"aria-label"],"hasLabelContent":[32]}]]],["p-0ee4126c",[[769,"bs-icon-tile",{"size":[513],"intent":[513],"label":[1],"hasCustomIcon":[32],"hasText":[32]}]]],["p-be3dd446",[[769,"bs-chip-informative",{"color":[1],"size":[1],"disabled":[516],"hasIcon":[32]}]]],["p-de110ad0",[[769,"bs-card",{"surface":[513],"hasImage":[32]}]]],["p-1aab6d07",[[849,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["p-f5180578",[[769,"bs-whats-new-entry",{"tag":[1],"tagColor":[1,"tag-color"],"date":[1],"unread":[516],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"actionLabel":[1,"action-label"],"divider":[4],"unreadLabel":[1,"unread-label"],"hasImage":[32]}],[769,"bs-tab",{"selected":[516],"disabled":[4],"iconPosition":[1,"icon-position"],"ariaLabel":[1,"aria-label"],"value":[513],"tabbable":[4],"hasIcon":[32],"hasLabel":[32],"hasBadge":[32]}],[769,"bs-tabs",{"type":[1],"orientation":[1],"value":[1537]},[[0,"bsSelect","onTabSelect"],[0,"keydown","onKeyDown"]],{"value":[{"onValueChange":0}],"orientation":[{"syncRovingTabindex":0}]}]]],["p-78f4fcf0",[[849,"bs-icon-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"]}]]],["p-89099a39",[[849,"bs-input",{"name":[513],"value":[1025],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[516],"required":[4],"step":[2],"min":[2],"max":[2],"options":[16],"rows":[2],"chips":[16],"titleOptions":[16],"initialsTitle":[1,"initials-title"],"countryOptions":[16],"country":[1],"length":[2],"open":[1540],"hasIcon":[32],"hasEndIcon":[32],"passwordVisible":[32],"chipDraft":[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]],{"value":[{"onFormStateChange":0}],"type":[{"onFormStateChange":0}],"chips":[{"onFormStateChange":0}],"required":[{"onFormStateChange":0}]}],[769,"bs-menu-item",{"disabled":[4],"hasIcon":[32]}],[257,"bs-menu",null,[[0,"keydown","onKeyDown"]]]]]]'),e))));
1
+ import{p as e,g as a,b as l}from"./p-DqQRXQMx.js";export{s as setNonce}from"./p-DqQRXQMx.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await a(),l(JSON.parse('[["p-52cb2358",[[769,"bs-session-timeout",{"type":[513],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"hideIcon":[4,"hide-icon"],"primaryLabel":[1,"primary-label"],"secondaryLabel":[1,"secondary-label"],"secondsLeft":[1026,"seconds-left"],"totalSeconds":[2,"total-seconds"],"countdown":[4],"timeLeftLabel":[1,"time-left-label"],"secondsLeftLabel":[1,"seconds-left-label"],"savedMessage":[1,"saved-message"],"accountName":[1,"account-name"],"accountEmail":[1,"account-email"],"accountInitials":[1,"account-initials"],"passwordLabel":[1,"password-label"],"passwordError":[1,"password-error"],"dividerLabel":[1,"divider-label"],"alternatives":[16],"cancelLabel":[1,"cancel-label"],"password":[32],"announcement":[32],"initialTotal":[32]},null,{"countdown":[{"onTimerInputsChange":0}],"type":[{"onTimerInputsChange":0}]}]]],["p-b9a4042e",[[577,"bs-timepicker",{"name":[513],"value":[1537],"format":[1537],"minuteStep":[2,"minute-step"],"heading":[1],"formatLabel":[1,"format-label"],"confirmLabel":[1,"confirm-label"],"cancelLabel":[1,"cancel-label"],"hourLabel":[1,"hour-label"],"minuteLabel":[1,"minute-label"],"periodLabel":[1,"period-label"],"hour":[32],"minute":[32]},null,{"value":[{"onValueChange":0}],"name":[{"onNameChange":0}]}]]],["p-e2556b4e",[[769,"bs-cookie-consent",{"type":[513],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"policyUrl":[1,"policy-url"],"policyLabel":[1,"policy-label"],"customiseLabel":[1,"customise-label"],"rejectLabel":[1,"reject-label"],"acceptLabel":[1,"accept-label"],"saveLabel":[1,"save-label"],"changeLabel":[1,"change-label"],"alwaysOnLabel":[1,"always-on-label"],"seeCookiesLabel":[1,"see-cookies-label"],"closeLabel":[1,"close-label"],"categories":[16],"choices":[32],"open":[32]},null,{"categories":[{"onCategoriesChange":0}]}]]],["p-78a69a59",[[769,"bs-whats-new",{"type":[513],"heading":[1],"headingLevel":[2,"heading-level"],"closable":[4],"closeLabel":[1,"close-label"],"entries":[16],"filters":[16],"filter":[1537],"markAllReadLabel":[1,"mark-all-read-label"],"releaseNotesLabel":[1,"release-notes-label"],"releaseNotesUrl":[1,"release-notes-url"],"emptyLabel":[1,"empty-label"],"tag":[1],"tagColor":[1,"tag-color"],"image":[1],"points":[16],"step":[2],"total":[2],"stepLabel":[1,"step-label"],"secondaryLabel":[1,"secondary-label"],"primaryLabel":[1,"primary-label"],"date":[1],"description":[1],"actionLabel":[1,"action-label"],"hasHeroSlot":[32]}]]],["p-5ba90a13",[[577,"bs-datepicker",{"name":[513],"range":[516],"value":[1537],"start":[1537],"end":[1537],"min":[1],"max":[1],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"startLabel":[1,"start-label"],"endLabel":[1,"end-label"],"monthLabel":[1,"month-label"],"yearLabel":[1,"year-label"],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"],"viewDate":[32],"focusedIso":[32],"hoverIso":[32],"draft":[32],"openMenu":[32]},null,{"value":[{"onSelectionChange":0},{"onSelectionJump":0}],"start":[{"onSelectionChange":0},{"onSelectionJump":0}],"end":[{"onSelectionChange":0}],"range":[{"onSelectionChange":0}],"name":[{"onSelectionChange":0}]}]]],["p-7f954939",[[769,"bs-onboarding-checklist",{"type":[513],"launcherLayout":[513,"launcher-layout"],"steps":[16],"heading":[1],"description":[1],"headingLevel":[2,"heading-level"],"progressText":[1,"progress-text"],"closable":[4],"progressLabel":[1,"progress-label"],"skipLabel":[1,"skip-label"],"startLabel":[1,"start-label"],"seeAllLabel":[1,"see-all-label"],"afterLabel":[1,"after-label"],"doneLabel":[1,"done-label"],"hideLabel":[1,"hide-label"],"closeLabel":[1,"close-label"],"statusDoneLabel":[1,"status-done-label"],"statusTodoLabel":[1,"status-todo-label"]}]]],["p-2177042f",[[769,"bs-qr-code",{"type":[513],"size":[513],"state":[513],"heading":[1],"description":[1],"url":[1],"amount":[1],"amountLabel":[1,"amount-label"],"expiry":[1],"matrix":[16],"codeLabel":[1,"code-label"],"closable":[4],"hideActions":[4,"hide-actions"],"hideDownload":[4,"hide-download"],"hideCopy":[4,"hide-copy"],"downloadLabel":[1,"download-label"],"copyLabel":[1,"copy-label"],"retryLabel":[1,"retry-label"],"refreshLabel":[1,"refresh-label"],"loadingLabel":[1,"loading-label"],"errorLabel":[1,"error-label"],"expiredLabel":[1,"expired-label"],"scannedLabel":[1,"scanned-label"],"closeLabel":[1,"close-label"],"hasLogo":[32]}]]],["p-fcee0dc4",[[769,"bs-product-tour",{"type":[513],"direction":[513],"heading":[1],"description":[1],"step":[2],"total":[2],"progressLabel":[1,"progress-label"],"primaryLabel":[1,"primary-label"],"secondaryLabel":[1,"secondary-label"],"closable":[4],"closeLabel":[1,"close-label"]}]]],["p-09435f41",[[769,"bs-carousel",{"tracker":[1],"slidesPerView":[2,"slides-per-view"],"currentPage":[1538,"current-page"],"autoplay":[4],"interval":[2],"paused":[1540],"label":[1],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"],"pauseLabel":[1,"pause-label"],"playLabel":[1,"play-label"],"slideCount":[32],"interacting":[32]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[0,"focusin","onFocusIn"],[0,"focusout","onFocusOut"]],{"currentPage":[{"onCurrentPageChange":0}],"autoplay":[{"updateTimer":0}],"paused":[{"updateTimer":0}],"interval":[{"updateTimer":0}],"interacting":[{"updateTimer":0}],"slideCount":[{"updateTimer":0}],"slidesPerView":[{"updateTimer":0}]}]]],["p-68fcd4a4",[[769,"bs-error-page",{"type":[513],"code":[1],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"primaryLabel":[1,"primary-label"],"secondaryLabel":[1,"secondary-label"],"reference":[1]}]]],["p-fc069773",[[769,"bs-file-upload-item",{"state":[513],"fileName":[1,"file-name"],"fileSize":[1,"file-size"],"progress":[2],"message":[1],"thumbnailSrc":[1,"thumbnail-src"],"thumbnailAlt":[1,"thumbnail-alt"],"cancelLabel":[1,"cancel-label"],"removeLabel":[1,"remove-label"]}]]],["p-1261f0b0",[[513,"bs-attachment",{"type":[1],"fileName":[1,"file-name"],"imageSrc":[1,"image-src"],"imageAlt":[1,"image-alt"],"loading":[4],"removable":[4]}]]],["p-3f09296a",[[513,"bs-breadcrumb-overflow",{"items":[16],"overflowLabel":[1,"overflow-label"],"size":[513],"open":[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]]]]],["p-452f9c1c",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["p-09cbf05b",[[769,"bs-dialog",{"open":[1540],"heading":[1],"size":[1],"centered":[516],"hasFooter":[32],"hasImage":[32],"hasIcon":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]],["p-2368a92e",[[769,"bs-file-upload",{"direction":[513],"heading":[1],"description":[1],"buttonLabel":[1,"button-label"],"accept":[1],"multiple":[4],"disabled":[516],"dragging":[1540]}]]],["p-20030f4d",[[769,"bs-navigation-drawer",{"heading":[1],"collapsible":[4],"collapsed":[1540],"logoBackground":[1,"logo-background"],"showLogo":[4,"show-logo"],"open":[1540],"mobile":[32]},[[4,"keydown","onDocumentKeydown"],[4,"focusin","onDocumentFocusIn"]],{"collapsed":[{"onCollapsedChange":0}],"mobile":[{"onMobileChange":0}],"open":[{"onOpenChange":0}]}]]],["p-2f4e08e1",[[769,"bs-navigation-header",{"alignment":[1],"ariaLabel":[1,"aria-label"],"skipToContentHref":[1,"skip-to-content-href"],"skipToContentLabel":[1,"skip-to-content-label"],"logoBackground":[1,"logo-background"]}]]],["p-7796b93f",[[769,"bs-accordion",{"expanded":[516],"size":[1],"disabled":[4],"showIcon":[4,"show-icon"],"showPreview":[4,"show-preview"]}]]],["p-617bd13a",[[257,"bs-ai-disclaimer"]]],["p-39a26c64",[[513,"bs-ai-greeting",{"assistantName":[1,"assistant-name"],"productName":[1,"product-name"]}]]],["p-69c0a85d",[[513,"bs-ai-thinking",{"label":[1]}]]],["p-f15d9524",[[769,"bs-attachment-list",{"ariaLabel":[1,"aria-label"],"canScrollRight":[32]}]]],["p-491b51e6",[[769,"bs-badge",{"variant":[1]}]]],["p-83c90489",[[769,"bs-breadcrumb",{"href":[1],"current":[516],"size":[513]}]]],["p-2497d128",[[769,"bs-breadcrumbs",{"label":[1],"size":[1]},null,{"size":[{"onSizeChange":0}]}]]],["p-6e735e37",[[513,"bs-button-skeleton",{"size":[1]}]]],["p-823ab3b2",[[513,"bs-chatbot-feedback",{"rating":[1538],"submitted":[1540],"comment":[1025],"heading":[1],"subtitle":[1]}]]],["p-d8b29a53",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"],"menuOpen":[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]]],["p-d754ee13",[[769,"bs-chatbot-sources-drawer",{"heading":[1],"count":[2],"slottedCount":[32]}]]],["p-6c6cdf77",[[769,"bs-chatbot-suggestion-button",{"disabled":[4]}]]],["p-81605b82",[[849,"bs-checkbox",{"name":[513],"value":[1],"required":[4],"size":[1],"checked":[1540],"indeterminate":[1540],"disabled":[516],"error":[4],"ariaLabel":[1,"aria-label"]},null,{"checked":[{"syncFormValue":0}],"value":[{"syncFormValue":0}],"required":[{"syncFormValue":0}],"indeterminate":[{"onIndeterminateChange":0}]}]]],["p-6a696161",[[513,"bs-checkbox-skeleton",{"size":[1]}]]],["p-00a0d489",[[785,"bs-chip-filter",{"size":[1],"selected":[516],"dropdown":[4],"disabled":[4],"ariaLabel":[1,"aria-label"],"hasIcon":[32]}]]],["p-d75f3f87",[[785,"bs-chip-input",{"size":[1],"selected":[1540],"disabled":[516],"hasIcon":[32],"labelText":[32]}]]],["p-b8d2ce91",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1025],"state":[513],"ariaLabel":[1,"aria-label"],"hasAttachments":[32]}]]],["p-73f214ed",[[769,"bs-composer-status-banner",{"type":[1],"message":[1],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"actionLabel":[1,"action-label"],"allowClose":[4,"allow-close"]}]]],["p-34e5feaf",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32],"clearSelection":[64]}]]],["p-282ddbee",[[769,"bs-inline-tab",{"selected":[516],"disabled":[4],"ariaLabel":[1,"aria-label"],"value":[513],"tabbable":[4],"hasIcon":[32],"hasLabel":[32]}]]],["p-09bc1923",[[769,"bs-navigation-drawer-item",{"selected":[516],"expandable":[4],"expanded":[1540],"nested":[4],"ariaLabel":[1,"aria-label"],"collapsed":[516],"hasIcon":[32]}]]],["p-3a1af63a",[[849,"bs-radio",{"name":[513],"value":[1],"checked":[1540],"disabled":[516],"groupHasChecked":[32]},[[4,"bsChange","onAnyRadioChange"]],{"checked":[{"onCheckedChange":0}],"value":[{"onCheckedChange":0}]}]]],["p-0f8cd2e8",[[593,"bs-slider",{"type":[1],"name":[513],"showLabel":[4,"show-label"],"label":[1],"min":[2],"max":[2],"step":[2],"value":[1026],"valueStart":[1026,"value-start"],"valueEnd":[1026,"value-end"],"segments":[2],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"value":[{"syncFormValue":0}],"valueStart":[{"syncFormValue":0}],"valueEnd":[{"syncFormValue":0}],"type":[{"syncFormValue":0}]}]]],["p-0b2d3b7e",[[769,"bs-source-link",{"fileName":[1,"file-name"],"sourceName":[1,"source-name"],"version":[1],"href":[1],"target":[1]}]]],["p-56c37e0a",[[769,"bs-stepper",{"currentStep":[2,"current-step"],"direction":[513],"showDescription":[4,"show-description"]},null,{"currentStep":[{"onPropChange":0}],"direction":[{"onPropChange":0}],"showDescription":[{"onPropChange":0}]}]]],["p-a9169157",[[513,"bs-stepper-step",{"name":[1],"description":[1],"error":[4],"disabled":[4],"computedState":[1,"computed-state"],"direction":[1],"showDescription":[4,"show-description"]}]]],["p-b84366a7",[[769,"bs-toast",{"state":[1]}]]],["p-416322bd",[[769,"bs-snackbar",{"variant":[1],"loading":[4],"actionLabel":[1,"action-label"],"actionVariant":[1,"action-variant"],"hideClose":[4,"hide-close"]}]]],["p-89fabf27",[[513,"bs-avatar",{"type":[1],"size":[1],"initials":[1],"src":[1],"alt":[1],"ariaLabel":[1,"aria-label"],"disabled":[516]}]]],["p-f7d15fbe",[[513,"bs-pagination",{"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"],"siblingCount":[2,"sibling-count"],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"]}]]],["p-1978e63c",[[769,"bs-tooltip",{"placement":[1]}]]],["p-b9ccd9d1",[[513,"bs-logo",{"variant":[1],"background":[1],"src":[1],"alt":[1]}]]],["p-e5daa6ca",[[513,"bs-progress",{"type":[1],"size":[1],"strokeWidth":[2,"stroke-width"],"value":[2],"showLabel":[4,"show-label"],"ariaLabel":[1,"aria-label"]}]]],["p-247e36ad",[[849,"bs-switch",{"name":[513],"value":[1],"size":[1],"checked":[1540],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"checked":[{"syncFormValue":0}],"value":[{"syncFormValue":0}]}]]],["p-0b7c77c1",[[769,"bs-progress-linear",{"type":[1],"size":[1],"value":[2],"showLabel":[4,"show-label"],"ariaLabel":[1,"aria-label"],"hasLabelContent":[32]}]]],["p-0ee4126c",[[769,"bs-icon-tile",{"size":[513],"intent":[513],"label":[1],"hasCustomIcon":[32],"hasText":[32]}]]],["p-be3dd446",[[769,"bs-chip-informative",{"color":[1],"size":[1],"disabled":[516],"hasIcon":[32]}]]],["p-de110ad0",[[769,"bs-card",{"surface":[513],"hasImage":[32]}]]],["p-1aab6d07",[[849,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["p-f5180578",[[769,"bs-whats-new-entry",{"tag":[1],"tagColor":[1,"tag-color"],"date":[1],"unread":[516],"heading":[1],"headingLevel":[2,"heading-level"],"description":[1],"actionLabel":[1,"action-label"],"divider":[4],"unreadLabel":[1,"unread-label"],"hasImage":[32]}],[769,"bs-tab",{"selected":[516],"disabled":[4],"iconPosition":[1,"icon-position"],"ariaLabel":[1,"aria-label"],"value":[513],"tabbable":[4],"hasIcon":[32],"hasLabel":[32],"hasBadge":[32]}],[769,"bs-tabs",{"type":[1],"orientation":[1],"value":[1537]},[[0,"bsSelect","onTabSelect"],[0,"keydown","onKeyDown"]],{"value":[{"onValueChange":0}],"orientation":[{"syncRovingTabindex":0}]}]]],["p-78f4fcf0",[[849,"bs-icon-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"]}]]],["p-22f8201a",[[849,"bs-input",{"name":[513],"value":[1025],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[516],"required":[4],"step":[2],"min":[2],"max":[2],"options":[16],"rows":[2],"chips":[16],"titleOptions":[16],"initialsTitle":[1,"initials-title"],"countryOptions":[16],"country":[1],"length":[2],"open":[1540],"hasIcon":[32],"hasEndIcon":[32],"passwordVisible":[32],"chipDraft":[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]],{"value":[{"onFormStateChange":0}],"type":[{"onFormStateChange":0}],"chips":[{"onFormStateChange":0}],"required":[{"onFormStateChange":0}]}],[769,"bs-menu-item",{"disabled":[4],"hasIcon":[32]}],[257,"bs-menu",null,[[0,"keydown","onKeyDown"]]]]]]'),e))));
@@ -1 +1 @@
1
- import{r as i,c as t,a as e,h as s}from"./p-DqQRXQMx.js";const n=class{constructor(e){i(this,e),this.bsInput=t(this,"bsInput"),this.bsChange=t(this,"bsChange"),this.bsOpen=t(this,"bsOpen"),this.bsChipAdd=t(this,"bsChipAdd"),this.bsChipRemove=t(this,"bsChipRemove"),this.bsTitleChange=t(this,"bsTitleChange"),this.bsCountryChange=t(this,"bsCountryChange"),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals)}get el(){return e(this)}internals;initialValue="";name;value="";type="text";label;placeholder;description;error;disabled=!1;required=!1;step=1;min;max;options=[];rows=3;chips=[];titleOptions=[];initialsTitle="";countryOptions=[];country="";length=4;open=!1;bsInput;bsChange;bsOpen;bsChipAdd;bsChipRemove;bsTitleChange;bsCountryChange;hasIcon=!1;hasEndIcon=!1;passwordVisible=!1;chipDraft="";pinInputs=[];componentWillLoad(){this.initialValue=this.value,this.syncFormValue(),this.hasIcon=this.hasSlottedContent("icon"),this.hasEndIcon=this.hasSlottedContent("end-icon")}onFormStateChange(){this.syncFormValue()}syncFormValue(){if(this.internals?.setFormValue){if("chip"===this.type&&this.name){const i=new FormData;this.chips.forEach((t=>i.append(this.name,t))),this.internals.setFormValue(i)}else this.internals.setFormValue(this.value??"");this.required&&("chip"===this.type?0===this.chips.length:!this.value)?this.internals.setValidity({valueMissing:!0},"Please fill out this field."):this.internals.setValidity({})}}formResetCallback(){this.value=this.initialValue}formStateRestoreCallback(i){"string"==typeof i&&(this.value=i)}hasSlottedContent(i){return Array.from(this.el.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("slot")===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onEndIconSlotchange=i=>{this.hasEndIcon=i.target.assignedNodes().length>0};onInput=i=>{const t=i.target.value;this.value=t,this.bsInput.emit(t)};onChange=i=>{const t=i.target.value;this.value=t,this.bsChange.emit(t)};clampNumber(i){return void 0!==this.min&&i<this.min&&(i=this.min),void 0!==this.max&&i>this.max&&(i=this.max),i}onStepperIncrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)+this.step);this.value=String(i),this.bsChange.emit(this.value)};onStepperDecrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)-this.step);this.value=String(i),this.bsChange.emit(this.value)};onTogglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};onDropdownToggle=()=>{this.disabled||(this.open=!this.open,this.bsOpen.emit(this.open))};onDropdownKeydown=i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.onDropdownToggle())};onDropdownOptionSelect=i=>()=>{this.value=i.label,this.open=!1,this.bsChange.emit(this.value)};onHostKeydown(i){"dropdown"===this.type&&this.open&&"Escape"===i.key&&(this.open=!1)}onHostFocusOut(i){if("dropdown"!==this.type||!this.open)return;const t=i.relatedTarget;t&&this.el.contains(t)||(this.open=!1)}onChipDraftInput=i=>{this.chipDraft=i.target.value};onChipDraftKeydown=i=>{if("Enter"===i.key){i.preventDefault();const t=this.chipDraft.trim();t&&(this.bsChipAdd.emit(t),this.chipDraft="")}};onChipRemove=i=>()=>{this.bsChipRemove.emit(i)};onTitleChange=i=>{this.bsTitleChange.emit(i.target.value)};onCountryChange=i=>{this.bsCountryChange.emit(i.target.value)};onPinInput=i=>t=>{const e=t.target;let s=e.value;s.length>1&&(s=s.slice(-1),e.value=s),s&&i<this.length-1&&this.pinInputs[i+1]?.focus(),this.value=this.pinInputs.map((i=>i?.value??"")).join(""),this.bsChange.emit(this.value)};onPinKeydown=i=>t=>{"Backspace"===t.key&&!t.target.value&&i>0&&this.pinInputs[i-1]?.focus()};get showsEndIconArea(){return"number"===this.type||"password"===this.type||"dropdown"===this.type||"date"===this.type||this.hasEndIcon}get showsIconArea(){return"search"===this.type&&!this.hasIcon||this.hasIcon}renderIconContent(){return"search"!==this.type||this.hasIcon?s("slot",{name:"icon",onSlotchange:this.onIconSlotchange}):s("svg",{class:"bs-input__search-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor","stroke-width":"1.3"}),s("path",{d:"M11 11L14.5 14.5",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}))}renderEndIconContent(){return"number"===this.type?s("span",{class:"bs-input__stepper"},s("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Increment",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperIncrement},s("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},s("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}))),s("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Decrement",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperDecrement},s("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},s("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})))):"password"===this.type?s("button",{type:"button",part:"control",class:"bs-input__password-toggle","aria-label":this.passwordVisible?"Hide password":"Show password",disabled:this.disabled,onClick:this.onTogglePasswordVisibility},this.passwordVisible?s("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),s("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M2 2L14 14",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"})):s("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),s("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}))):"dropdown"===this.type?s("svg",{class:"bs-input__chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})):"date"!==this.type||this.hasEndIcon?s("slot",{name:"end-icon",onSlotchange:this.onEndIconSlotchange}):s("svg",{class:"bs-input__calendar",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M2 6.5H14",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M5 1.5V4M11 1.5V4",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}))}renderStandardControl(){return s("input",{id:"control",part:"control",class:"bs-input__control",type:"password"===this.type?this.passwordVisible?"text":"password":"dropdown"===this.type?"text":this.type,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:"dropdown"===this.type,role:"dropdown"===this.type?"combobox":void 0,"aria-haspopup":"dropdown"===this.type?"listbox":void 0,"aria-expanded":"dropdown"===this.type?String(this.open):void 0,min:"number"===this.type?this.min:void 0,max:"number"===this.type?this.max:void 0,step:"number"===this.type?this.step:void 0,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderSelectControl(){return s("select",{id:"control",part:"control",class:"bs-input__control",disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange},this.options.map((i=>s("option",{value:i.value,selected:i.value===this.value},i.label))))}renderTextareaControl(){return s("textarea",{id:"control",part:"control",class:"bs-input__control bs-input__control--textarea",rows:this.rows,value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderChipControl(){return s("div",{class:"bs-input__chips"},this.chips.map((i=>s("bs-chip-informative",{part:"chip",class:"bs-input__chip",size:"sm",disabled:this.disabled},i,s("bs-icon-button",{part:"chip-remove",class:"bs-input__chip-remove",variant:"subtle",size:"md",ariaLabel:`Remove ${i}`,disabled:this.disabled,onClick:this.onChipRemove(i)},s(r,null))))),s("input",{id:"control",part:"control",class:"bs-input__control bs-input__chip-input",type:"text",value:this.chipDraft,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onChipDraftInput,onKeyDown:this.onChipDraftKeydown}))}renderInitialsField(){const i=this.disabled?"bs-input__field--disabled":"";return s("div",{class:"bs-input__initials-row"},s("div",{part:"field",class:`bs-input__field bs-input__field--initials-title ${this.error?"bs-input__field--error":""} ${i}`},s("select",{part:"control",class:"bs-input__control bs-input__title-select",disabled:this.disabled,onChange:this.onTitleChange},this.titleOptions.map((i=>s("option",{value:i,selected:i===this.initialsTitle},i)))),this.renderSelectChevron()),s("div",{part:"field",class:`bs-input__field bs-input__field--initials-value ${this.error?"bs-input__field--error":""} ${i}`},s("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})))}renderSelectChevron(){return s("svg",{class:"bs-input__select-chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"}))}renderCountryControl(){return[s("select",{part:"control",class:"bs-input__control bs-input__country-select",disabled:this.disabled,onChange:this.onCountryChange},this.countryOptions.map((i=>s("option",{value:i.code,selected:i.code===this.country},i.flagIcon?`${i.flagIcon} `:"",i.code," ",i.label)))),this.renderSelectChevron(),s("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})]}renderControl(){switch(this.type){case"select":return this.renderSelectControl();case"textarea":return this.renderTextareaControl();case"chip":return this.renderChipControl();case"country":return this.renderCountryControl();default:return this.renderStandardControl()}}renderField(){const i=["bs-input__field",this.error?"bs-input__field--error":"",this.disabled?"bs-input__field--disabled":"","textarea"===this.type?"bs-input__field--textarea":"","chip"===this.type?"bs-input__field--chip":""].filter(Boolean).join(" "),t="dropdown"===this.type;return s("div",{class:"bs-input__field-wrapper"},s("div",{part:"field",class:i,onClick:t?this.onDropdownToggle:void 0,onKeyDown:t?this.onDropdownKeydown:void 0},s("span",{part:"icon",class:"bs-input__icon "+(this.showsIconArea?"bs-input__icon--visible":"")},this.renderIconContent()),this.renderControl(),s("span",{part:"end-icon",class:"bs-input__end-icon "+(this.showsEndIconArea?"bs-input__end-icon--visible":"")},this.renderEndIconContent())),t&&this.open&&this.options.length>0&&s("bs-menu",{part:"menu",class:"bs-input__dropdown-menu",role:"listbox"},this.options.map((i=>s("bs-menu-item",{key:i.value,onBsSelect:this.onDropdownOptionSelect(i)},i.label)))))}renderPinField(){return this.pinInputs=[],s("div",{part:"field",class:`bs-input__field bs-input__field--pin ${this.error?"bs-input__field--error":""} ${this.disabled?"bs-input__field--disabled":""}`},Array.from({length:this.length}).map(((i,t)=>s("input",{id:0===t?"control":void 0,ref:i=>this.pinInputs[t]=i,part:"control",class:"bs-input__pin-cell",type:"text",inputMode:"numeric",maxLength:1,value:this.value[t]??"",disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onPinInput(t),onKeyDown:this.onPinKeydown(t)}))))}render(){return s("div",{key:"6921873fb72be6f26a2389697f6b2f816d8011a9",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&s("label",{key:"64ec1ba4a6c8c87db6b45dfd38731adbdfd5d6a8",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&s("span",{key:"5176edfc672132f1c6aaec978002851ff27179a0",part:"required",class:"bs-input__required","aria-hidden":"true"},"*")),"pin"===this.type?this.renderPinField():"initials"===this.type?this.renderInitialsField():this.renderField(),this.error?s("span",{id:"description-or-error",part:"error",class:"bs-input__error"},s("svg",{part:"error-icon",class:"bs-input__error-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M8 5V8.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}),s("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})),this.error):this.description?s("span",{id:"description-or-error",part:"description",class:"bs-input__description"},this.description):null)}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}}},r=()=>s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},s("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),s("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));n.style=":host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-550);--bs-input-padding-x:var(--bs-spacing-150);--bs-input-padding-y:var(--bs-spacing-100);--bs-input-gap:var(--bs-spacing-200);--bs-input-icon-size:var(--bs-spacing-300);--bs-input-stack-gap:var(--bs-spacing-50);--bs-input-error-icon-size:var(--bs-spacing-250);--bs-input-field-bg:var(--bs-input-bg-default);--bs-input-field-bg-disabled:var(--bs-input-bg-disabled);--bs-input-field-border:var(--bs-input-border-default);--bs-input-field-border-hover:var(--bs-input-border-hover);--bs-input-field-border-focus:var(--bs-input-border-focus);--bs-input-field-border-error:var(--bs-input-border-error);--bs-input-field-text:var(--bs-input-text);--bs-input-field-placeholder:var(--bs-input-placeholder);--bs-input-label-color:var(--bs-input-label);--bs-input-label-font-size:var(--bs-font-size-sm);--bs-input-label-font-weight:var(--bs-font-weight-medium);--bs-input-label-line-height:normal;--bs-input-description-color:var(--bs-input-description);--bs-input-error-color:var(--bs-input-error);--bs-input-icon-color:var(--bs-icon-muted);--bs-input-icon-color-error:var(--bs-input-icon-error);--bs-input-icon-color-disabled:var(--bs-input-icon-disabled);--bs-input-initials-title-width:80px;--bs-input-initials-gap:var(--bs-spacing-50)}.bs-input{display:flex;flex-direction:column;gap:var(--bs-input-stack-gap);font-family:inherit}.bs-input__label{font-size:var(--bs-input-label-font-size);font-weight:var(--bs-input-label-font-weight);line-height:var(--bs-input-label-line-height);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-inline-start:2px}.bs-input__field{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-input-gap);height:var(--bs-input-height);padding:var(--bs-input-padding-y) var(--bs-input-padding-x);border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg)}.bs-input__field:hover:not(.bs-input__field--disabled){border-color:var(--bs-input-field-border-hover)}.bs-input__field:focus-within{border-color:var(--bs-input-field-border-focus)}.bs-input__field--error{border-color:var(--bs-input-field-border-error)}.bs-input__field--disabled{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__control{flex:1;min-width:0;border:none;outline:none;padding:0;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-field-placeholder)}.bs-input__control:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input__control::-webkit-strong-password-auto-fill-button,.bs-input__control::-webkit-credentials-auto-fill-button{display:none !important;visibility:hidden;pointer-events:none;position:absolute;inset-inline-end:0}.bs-input__control::-webkit-textfield-decoration-container{visibility:hidden}.bs-input__control::-ms-reveal,.bs-input__control::-ms-clear{display:none}.bs-input--error .bs-input__label{color:var(--bs-input-label-color)}.bs-input__icon,.bs-input__end-icon{display:none;align-items:center;flex-shrink:0;color:var(--bs-input-icon-color)}.bs-input__icon--visible,.bs-input__end-icon--visible{display:flex}.bs-input__icon ::slotted(*),.bs-input__end-icon ::slotted(*){display:block;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--error .bs-input__icon,.bs-input__field--error .bs-input__end-icon{color:var(--bs-input-icon-color-error)}.bs-input__field--disabled .bs-input__icon,.bs-input__field--disabled .bs-input__end-icon{color:var(--bs-input-icon-color-disabled)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description-color)}.bs-input__error{display:flex;align-items:center;gap:var(--bs-input-stack-gap);font-size:var(--bs-font-size-xs);color:var(--bs-input-error-color)}.bs-input__error-icon{flex-shrink:0;width:var(--bs-input-error-icon-size);height:var(--bs-input-error-icon-size)}.bs-input__field--textarea{height:auto;align-items:flex-start}.bs-input__control--textarea{resize:vertical}.bs-input__stepper{display:flex;flex-direction:column}.bs-input__stepper-btn{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer}.bs-input__stepper-btn:disabled{cursor:not-allowed}.bs-input__password-toggle{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__password-toggle:disabled{cursor:not-allowed}.bs-input__password-toggle svg{width:100%;height:100%}.bs-input__chevron{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field-wrapper{position:relative;width:100%}.bs-input__dropdown-menu{position:absolute;top:calc(100% + var(--bs-input-stack-gap));inset-inline-start:0;inset-inline-end:0;z-index:1}.bs-input__calendar{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__search-icon{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--chip{flex-wrap:wrap;height:auto;min-height:var(--bs-input-height)}.bs-input__chips{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bs-spacing-100);flex:1;min-width:0}.bs-input__chip{--bs-chip-informative-padding-x-plain-side:var(--bs-spacing-150)}.bs-input__chip-remove{--bs-icon-button-size-xs:20px;--bs-icon-button-icon-size-xs:12px;margin-inline-end:calc(var(--bs-spacing-50) * -1)}.bs-input__chip-input{flex:1;min-width:60px}.bs-input__country-select{flex-shrink:0;width:auto;border:none;outline:none;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__title-select,.bs-input__country-select{appearance:none;-webkit-appearance:none;-moz-appearance:none}.bs-input__title-select::-ms-expand,.bs-input__country-select::-ms-expand{display:none}.bs-input__select-chevron{flex-shrink:0;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size);color:var(--bs-input-icon-color);pointer-events:none}.bs-input__field--disabled .bs-input__select-chevron{color:var(--bs-input-icon-color-disabled)}.bs-input__initials-row{display:flex;gap:var(--bs-input-initials-gap);width:100%}.bs-input__field--initials-title{flex:0 0 auto;width:var(--bs-input-initials-title-width);gap:var(--bs-spacing-50)}.bs-input__field--initials-title .bs-input__select-chevron{width:10px;height:10px}.bs-input__field--initials-value{flex:1;min-width:0}.bs-input__country-select{width:auto}.bs-input__field--pin{border:none;padding:0;background:transparent;gap:var(--bs-input-gap)}.bs-input__pin-cell{box-sizing:border-box;width:var(--bs-input-height);height:var(--bs-input-height);text-align:center;border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg);color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit;outline:none}.bs-input__pin-cell:focus{border-color:var(--bs-input-field-border-focus)}.bs-input__field--pin.bs-input__field--disabled .bs-input__pin-cell{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__field--pin.bs-input__field--error .bs-input__pin-cell{border-color:var(--bs-input-field-border-error)}@media (forced-colors: active){.bs-input__control{border:1px solid FieldText}.bs-input__control:focus-visible{outline:2px solid Highlight;outline-offset:2px}}";const o=class{constructor(t){i(this,t)}get el(){return e(this)}onKeyDown(i){if(!["ArrowDown","ArrowUp","Home","End"].includes(i.key))return;const t=Array.from(this.el.querySelectorAll("bs-menu-item")).filter((i=>!i.disabled));if(0===t.length)return;const e=t.findIndex((t=>t===i.target||t.contains(i.target)));let s;i.preventDefault(),s="Home"===i.key?0:"End"===i.key?t.length-1:"ArrowDown"===i.key?-1===e?0:(e+1)%t.length:-1===e?t.length-1:(e-1+t.length)%t.length,t[s].shadowRoot?.querySelector("button")?.focus()}render(){return s("div",{key:"ba99d3c35c0c7ab4427155ac13e89c434068ef49",part:"list",class:"bs-menu",role:"menu"},s("slot",{key:"817f29507503adcaad013a8035d35bc1f35ffdef"}))}};o.style=":host{display:block;--bs-menu-bg:var(--bs-surface-raised);--bs-menu-radius:var(--bs-border-radius-100);--bs-menu-padding-y:var(--bs-spacing-50);--bs-menu-gap:var(--bs-spacing-50);--bs-menu-shadow:var(--bs-shadow-sm)}.bs-menu{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-menu-gap);background:var(--bs-menu-bg);border-radius:var(--bs-menu-radius);padding:var(--bs-menu-padding-y) 0;box-shadow:var(--bs-menu-shadow);font-family:inherit}@media (forced-colors: active){.bs-menu{border:1px solid CanvasText}}";const a=class{constructor(e){i(this,e),this.bsSelect=t(this,"bsSelect")}disabled=!1;hasIcon=!1;bsSelect;onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onClick=()=>{this.disabled||this.bsSelect.emit()};render(){return s("button",{key:"419a5d4d35f47ea9cf72b02407a45a7d5645fc4b",type:"button",part:"item",role:"menuitem",class:"bs-menu-item "+(this.disabled?"bs-menu-item--disabled":""),disabled:this.disabled,"aria-disabled":this.disabled?"true":void 0,onClick:this.onClick},s("span",{key:"733f8e5f702496bbb2788cc4db84a9c7c128f1be",part:"icon",class:"bs-menu-item__icon "+(this.hasIcon?"bs-menu-item__icon--has-content":"")},s("slot",{key:"566ca7b7f011090efa131c6bf0fb74515db11fee",name:"icon",onSlotchange:this.onIconSlotchange})),s("span",{key:"c717ab8efef92c338581953c60f617057f9eaadc",part:"label",class:"bs-menu-item__label"},s("slot",{key:"c0006ae3c36798eabfb2e001faade51ec4cc10c9"})))}};a.style=":host{display:block;--bs-menu-item-radius:var(--bs-border-radius-100);--bs-menu-item-padding-y:var(--bs-spacing-100);--bs-menu-item-padding-x:var(--bs-spacing-150);--bs-menu-item-gap:var(--bs-spacing-100);--bs-menu-item-hover:var(--bs-color-neutral-container-hover);--bs-menu-item-pressed:var(--bs-color-neutral-container-pressed);--bs-menu-item-disabled-bg:var(--bs-surface-action-disabled);--bs-menu-item-icon-color:var(--bs-icon-default);--bs-menu-item-icon-color-disabled:var(--bs-icon-disabled);--bs-menu-item-color:var(--bs-text-muted);--bs-menu-item-color-disabled:var(--bs-text-on-disabled);--bs-menu-item-font-size:var(--bs-font-size-md);--bs-menu-item-line-height:var(--bs-line-height-body-md)}.bs-menu-item{box-sizing:border-box;display:flex;align-items:center;width:100%;height:48px;border:none;cursor:pointer;background:transparent;color:var(--bs-menu-item-color);font-family:inherit;border-radius:var(--bs-menu-item-radius);padding:var(--bs-menu-item-padding-y) var(--bs-menu-item-padding-x);gap:var(--bs-menu-item-gap);transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-menu-item:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-menu-item:hover{background:var(--bs-menu-item-hover)}.bs-menu-item:active{background:var(--bs-menu-item-pressed)}.bs-menu-item--disabled{background:var(--bs-menu-item-disabled-bg);color:var(--bs-menu-item-color-disabled);cursor:not-allowed}.bs-menu-item--disabled:hover,.bs-menu-item--disabled:active{background:var(--bs-menu-item-disabled-bg)}.bs-menu-item--disabled .bs-menu-item__icon{color:var(--bs-menu-item-icon-color-disabled)}.bs-menu-item__icon{display:none;width:24px;height:24px;flex-shrink:0;color:var(--bs-menu-item-icon-color)}.bs-menu-item__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-menu-item__icon ::slotted(svg){width:24px;height:24px}.bs-menu-item__label{font-size:var(--bs-menu-item-font-size);line-height:calc(var(--bs-menu-item-line-height) * 1px);white-space:nowrap}";export{n as bs_input,o as bs_menu,a as bs_menu_item}
1
+ import{r as i,c as t,a as e,h as s}from"./p-DqQRXQMx.js";const n=class{constructor(e){i(this,e),this.bsInput=t(this,"bsInput"),this.bsChange=t(this,"bsChange"),this.bsOpen=t(this,"bsOpen"),this.bsChipAdd=t(this,"bsChipAdd"),this.bsChipRemove=t(this,"bsChipRemove"),this.bsTitleChange=t(this,"bsTitleChange"),this.bsCountryChange=t(this,"bsCountryChange"),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals)}get el(){return e(this)}internals;initialValue="";name;value="";type="text";label;placeholder;description;error;disabled=!1;required=!1;step=1;min;max;options=[];rows=3;chips=[];titleOptions=[];initialsTitle="";countryOptions=[];country="";length=4;open=!1;bsInput;bsChange;bsOpen;bsChipAdd;bsChipRemove;bsTitleChange;bsCountryChange;hasIcon=!1;hasEndIcon=!1;passwordVisible=!1;chipDraft="";pinInputs=[];componentWillLoad(){this.initialValue=this.value,this.syncFormValue(),this.hasIcon=this.hasSlottedContent("icon"),this.hasEndIcon=this.hasSlottedContent("end-icon")}onFormStateChange(){this.syncFormValue()}syncFormValue(){if(this.internals?.setFormValue){if("chip"===this.type&&this.name){const i=new FormData;this.chips.forEach((t=>i.append(this.name,t))),this.internals.setFormValue(i)}else this.internals.setFormValue(this.value??"");this.required&&("chip"===this.type?0===this.chips.length:!this.value)?this.internals.setValidity({valueMissing:!0},"Please fill out this field."):this.internals.setValidity({})}}formResetCallback(){this.value=this.initialValue}formStateRestoreCallback(i){"string"==typeof i&&(this.value=i)}hasSlottedContent(i){return Array.from(this.el.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("slot")===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onEndIconSlotchange=i=>{this.hasEndIcon=i.target.assignedNodes().length>0};onInput=i=>{const t=i.target.value;this.value=t,this.bsInput.emit(t)};onChange=i=>{const t=i.target.value;this.value=t,this.bsChange.emit(t)};clampNumber(i){return void 0!==this.min&&i<this.min&&(i=this.min),void 0!==this.max&&i>this.max&&(i=this.max),i}onStepperIncrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)+this.step);this.value=String(i),this.bsChange.emit(this.value)};onStepperDecrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)-this.step);this.value=String(i),this.bsChange.emit(this.value)};onTogglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};onDropdownToggle=()=>{this.disabled||(this.open=!this.open,this.bsOpen.emit(this.open))};onDropdownKeydown=i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.onDropdownToggle())};onDropdownOptionSelect=i=>()=>{this.value=i.label,this.open=!1,this.bsChange.emit(this.value)};onHostKeydown(i){"dropdown"===this.type&&this.open&&"Escape"===i.key&&(this.open=!1)}onHostFocusOut(i){if("dropdown"!==this.type||!this.open)return;const t=i.relatedTarget;t&&this.el.contains(t)||(this.open=!1)}onChipDraftInput=i=>{this.chipDraft=i.target.value};onChipDraftKeydown=i=>{if("Enter"===i.key){i.preventDefault();const t=this.chipDraft.trim();t&&(this.bsChipAdd.emit(t),this.chipDraft="")}};onChipRemove=i=>()=>{this.bsChipRemove.emit(i)};onTitleChange=i=>{this.bsTitleChange.emit(i.target.value)};onCountryChange=i=>{this.bsCountryChange.emit(i.target.value)};onPinInput=i=>t=>{const e=t.target;let s=e.value;s.length>1&&(s=s.slice(-1),e.value=s),s&&i<this.length-1&&this.pinInputs[i+1]?.focus(),this.value=this.pinInputs.map((i=>i?.value??"")).join(""),this.bsChange.emit(this.value)};onPinKeydown=i=>t=>{"Backspace"===t.key&&!t.target.value&&i>0&&this.pinInputs[i-1]?.focus()};get showsEndIconArea(){return"number"===this.type||"password"===this.type||"dropdown"===this.type||"date"===this.type||this.hasEndIcon}get showsIconArea(){return"search"===this.type&&!this.hasIcon||this.hasIcon}renderIconContent(){return"search"!==this.type||this.hasIcon?s("slot",{name:"icon",onSlotchange:this.onIconSlotchange}):s("svg",{class:"bs-input__search-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor","stroke-width":"1.3"}),s("path",{d:"M11 11L14.5 14.5",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}))}renderEndIconContent(){return"number"===this.type?s("span",{class:"bs-input__stepper"},s("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Increment",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperIncrement},s("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},s("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}))),s("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Decrement",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperDecrement},s("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},s("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})))):"password"===this.type?s("button",{type:"button",part:"control",class:"bs-input__password-toggle","aria-label":this.passwordVisible?"Hide password":"Show password",disabled:this.disabled,onClick:this.onTogglePasswordVisibility},this.passwordVisible?s("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),s("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M2 2L14 14",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"})):s("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),s("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}))):"dropdown"===this.type?s("svg",{class:"bs-input__chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})):"date"!==this.type||this.hasEndIcon?s("slot",{name:"end-icon",onSlotchange:this.onEndIconSlotchange}):s("svg",{class:"bs-input__calendar",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M2 6.5H14",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M5 1.5V4M11 1.5V4",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}))}renderStandardControl(){return s("input",{id:"control",part:"control",class:"bs-input__control",type:"password"===this.type?this.passwordVisible?"text":"password":"dropdown"===this.type?"text":this.type,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:"dropdown"===this.type,role:"dropdown"===this.type?"combobox":void 0,"aria-haspopup":"dropdown"===this.type?"listbox":void 0,"aria-expanded":"dropdown"===this.type?String(this.open):void 0,min:"number"===this.type?this.min:void 0,max:"number"===this.type?this.max:void 0,step:"number"===this.type?this.step:void 0,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderSelectControl(){return s("select",{id:"control",part:"control",class:"bs-input__control",disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange},this.options.map((i=>s("option",{value:i.value,selected:i.value===this.value},i.label))))}renderTextareaControl(){return s("textarea",{id:"control",part:"control",class:"bs-input__control bs-input__control--textarea",rows:this.rows,value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderChipControl(){return s("div",{class:"bs-input__chips"},this.chips.map((i=>s("bs-chip-informative",{part:"chip",class:"bs-input__chip",size:"sm",disabled:this.disabled},i,s("bs-icon-button",{part:"chip-remove",class:"bs-input__chip-remove",variant:"subtle",size:"xs",ariaLabel:`Remove ${i}`,disabled:this.disabled,onClick:this.onChipRemove(i)},s(r,null))))),s("input",{id:"control",part:"control",class:"bs-input__control bs-input__chip-input",type:"text",value:this.chipDraft,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onChipDraftInput,onKeyDown:this.onChipDraftKeydown}))}renderInitialsField(){const i=this.disabled?"bs-input__field--disabled":"";return s("div",{class:"bs-input__initials-row"},s("div",{part:"field",class:`bs-input__field bs-input__field--initials-title ${this.error?"bs-input__field--error":""} ${i}`},s("select",{part:"control",class:"bs-input__control bs-input__title-select",disabled:this.disabled,onChange:this.onTitleChange},this.titleOptions.map((i=>s("option",{value:i,selected:i===this.initialsTitle},i)))),this.renderSelectChevron()),s("div",{part:"field",class:`bs-input__field bs-input__field--initials-value ${this.error?"bs-input__field--error":""} ${i}`},s("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})))}renderSelectChevron(){return s("svg",{class:"bs-input__select-chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"}))}renderCountryControl(){return[s("select",{part:"control",class:"bs-input__control bs-input__country-select",disabled:this.disabled,onChange:this.onCountryChange},this.countryOptions.map((i=>s("option",{value:i.code,selected:i.code===this.country},i.flagIcon?`${i.flagIcon} `:"",i.code," ",i.label)))),this.renderSelectChevron(),s("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})]}renderControl(){switch(this.type){case"select":return this.renderSelectControl();case"textarea":return this.renderTextareaControl();case"chip":return this.renderChipControl();case"country":return this.renderCountryControl();default:return this.renderStandardControl()}}renderField(){const i=["bs-input__field",this.error?"bs-input__field--error":"",this.disabled?"bs-input__field--disabled":"","textarea"===this.type?"bs-input__field--textarea":"","chip"===this.type?"bs-input__field--chip":""].filter(Boolean).join(" "),t="dropdown"===this.type;return s("div",{class:"bs-input__field-wrapper"},s("div",{part:"field",class:i,onClick:t?this.onDropdownToggle:void 0,onKeyDown:t?this.onDropdownKeydown:void 0},s("span",{part:"icon",class:"bs-input__icon "+(this.showsIconArea?"bs-input__icon--visible":"")},this.renderIconContent()),this.renderControl(),s("span",{part:"end-icon",class:"bs-input__end-icon "+(this.showsEndIconArea?"bs-input__end-icon--visible":"")},this.renderEndIconContent())),t&&this.open&&this.options.length>0&&s("bs-menu",{part:"menu",class:"bs-input__dropdown-menu",role:"listbox"},this.options.map((i=>s("bs-menu-item",{key:i.value,onBsSelect:this.onDropdownOptionSelect(i)},i.label)))))}renderPinField(){return this.pinInputs=[],s("div",{part:"field",class:`bs-input__field bs-input__field--pin ${this.error?"bs-input__field--error":""} ${this.disabled?"bs-input__field--disabled":""}`},Array.from({length:this.length}).map(((i,t)=>s("input",{id:0===t?"control":void 0,ref:i=>this.pinInputs[t]=i,part:"control",class:"bs-input__pin-cell",type:"text",inputMode:"numeric",maxLength:1,value:this.value[t]??"",disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onPinInput(t),onKeyDown:this.onPinKeydown(t)}))))}render(){return s("div",{key:"6921873fb72be6f26a2389697f6b2f816d8011a9",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&s("label",{key:"64ec1ba4a6c8c87db6b45dfd38731adbdfd5d6a8",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&s("span",{key:"5176edfc672132f1c6aaec978002851ff27179a0",part:"required",class:"bs-input__required","aria-hidden":"true"},"*")),"pin"===this.type?this.renderPinField():"initials"===this.type?this.renderInitialsField():this.renderField(),this.error?s("span",{id:"description-or-error",part:"error",class:"bs-input__error"},s("svg",{part:"error-icon",class:"bs-input__error-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},s("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor","stroke-width":"1.2"}),s("path",{d:"M8 5V8.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}),s("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})),this.error):this.description?s("span",{id:"description-or-error",part:"description",class:"bs-input__description"},this.description):null)}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}}},r=()=>s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},s("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),s("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));n.style=":host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-550);--bs-input-padding-x:var(--bs-spacing-150);--bs-input-padding-y:var(--bs-spacing-100);--bs-input-gap:var(--bs-spacing-200);--bs-input-icon-size:var(--bs-spacing-300);--bs-input-stack-gap:var(--bs-spacing-50);--bs-input-error-icon-size:var(--bs-spacing-250);--bs-input-field-bg:var(--bs-input-bg-default);--bs-input-field-bg-disabled:var(--bs-input-bg-disabled);--bs-input-field-border:var(--bs-input-border-default);--bs-input-field-border-hover:var(--bs-input-border-hover);--bs-input-field-border-focus:var(--bs-input-border-focus);--bs-input-field-border-error:var(--bs-input-border-error);--bs-input-field-text:var(--bs-input-text);--bs-input-field-placeholder:var(--bs-input-placeholder);--bs-input-label-color:var(--bs-input-label);--bs-input-label-font-size:var(--bs-font-size-sm);--bs-input-label-font-weight:var(--bs-font-weight-medium);--bs-input-label-line-height:normal;--bs-input-description-color:var(--bs-input-description);--bs-input-error-color:var(--bs-input-error);--bs-input-icon-color:var(--bs-icon-muted);--bs-input-icon-color-error:var(--bs-input-icon-error);--bs-input-icon-color-disabled:var(--bs-input-icon-disabled);--bs-input-initials-title-width:80px;--bs-input-initials-gap:var(--bs-spacing-50)}.bs-input{display:flex;flex-direction:column;gap:var(--bs-input-stack-gap);font-family:inherit}.bs-input__label{font-size:var(--bs-input-label-font-size);font-weight:var(--bs-input-label-font-weight);line-height:var(--bs-input-label-line-height);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-inline-start:2px}.bs-input__field{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-input-gap);height:var(--bs-input-height);padding:var(--bs-input-padding-y) var(--bs-input-padding-x);border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg)}.bs-input__field:hover:not(.bs-input__field--disabled){border-color:var(--bs-input-field-border-hover)}.bs-input__field:focus-within{border-color:var(--bs-input-field-border-focus)}.bs-input__field--error{border-color:var(--bs-input-field-border-error)}.bs-input__field--disabled{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__control{flex:1;min-width:0;border:none;outline:none;padding:0;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-field-placeholder)}.bs-input__control:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input__control::-webkit-strong-password-auto-fill-button,.bs-input__control::-webkit-credentials-auto-fill-button{display:none !important;visibility:hidden;pointer-events:none;position:absolute;inset-inline-end:0}.bs-input__control::-webkit-textfield-decoration-container{visibility:hidden}.bs-input__control::-ms-reveal,.bs-input__control::-ms-clear{display:none}.bs-input--error .bs-input__label{color:var(--bs-input-label-color)}.bs-input__icon,.bs-input__end-icon{display:none;align-items:center;flex-shrink:0;color:var(--bs-input-icon-color)}.bs-input__icon--visible,.bs-input__end-icon--visible{display:flex}.bs-input__icon ::slotted(*),.bs-input__end-icon ::slotted(*){display:block;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--error .bs-input__icon,.bs-input__field--error .bs-input__end-icon{color:var(--bs-input-icon-color-error)}.bs-input__field--disabled .bs-input__icon,.bs-input__field--disabled .bs-input__end-icon{color:var(--bs-input-icon-color-disabled)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description-color)}.bs-input__error{display:flex;align-items:center;gap:var(--bs-input-stack-gap);font-size:var(--bs-font-size-xs);color:var(--bs-input-error-color)}.bs-input__error-icon{flex-shrink:0;width:var(--bs-input-error-icon-size);height:var(--bs-input-error-icon-size)}.bs-input__field--textarea{height:auto;align-items:flex-start}.bs-input__control--textarea{resize:vertical}.bs-input__stepper{display:flex;flex-direction:column}.bs-input__stepper-btn{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer}.bs-input__stepper-btn:disabled{cursor:not-allowed}.bs-input__password-toggle{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__password-toggle:disabled{cursor:not-allowed}.bs-input__password-toggle svg{width:100%;height:100%}.bs-input__chevron{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field-wrapper{position:relative;width:100%}.bs-input__dropdown-menu{position:absolute;top:calc(100% + var(--bs-input-stack-gap));inset-inline-start:0;inset-inline-end:0;z-index:1}.bs-input__calendar{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__search-icon{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--chip{flex-wrap:wrap;height:auto;min-height:var(--bs-input-height)}.bs-input__chips{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bs-spacing-100);flex:1;min-width:0}.bs-input__chip{--bs-chip-informative-padding-x-plain-side:var(--bs-spacing-150)}.bs-input__chip-remove{--bs-icon-button-size-xs:20px;--bs-icon-button-icon-size-xs:12px;margin-inline-end:calc(var(--bs-spacing-50) * -1)}.bs-input__chip-input{flex:1;min-width:60px}.bs-input__country-select{flex-shrink:0;width:auto;border:none;outline:none;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__title-select,.bs-input__country-select{appearance:none;-webkit-appearance:none;-moz-appearance:none}.bs-input__title-select::-ms-expand,.bs-input__country-select::-ms-expand{display:none}.bs-input__select-chevron{flex-shrink:0;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size);color:var(--bs-input-icon-color);pointer-events:none}.bs-input__field--disabled .bs-input__select-chevron{color:var(--bs-input-icon-color-disabled)}.bs-input__initials-row{display:flex;gap:var(--bs-input-initials-gap);width:100%}.bs-input__field--initials-title{flex:0 0 auto;width:var(--bs-input-initials-title-width);gap:var(--bs-spacing-50)}.bs-input__field--initials-title .bs-input__select-chevron{width:10px;height:10px}.bs-input__field--initials-value{flex:1;min-width:0}.bs-input__country-select{width:auto}.bs-input__field--pin{border:none;padding:0;background:transparent;gap:var(--bs-input-gap)}.bs-input__pin-cell{box-sizing:border-box;width:var(--bs-input-height);height:var(--bs-input-height);text-align:center;border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg);color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit;outline:none}.bs-input__pin-cell:focus{border-color:var(--bs-input-field-border-focus)}.bs-input__field--pin.bs-input__field--disabled .bs-input__pin-cell{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__field--pin.bs-input__field--error .bs-input__pin-cell{border-color:var(--bs-input-field-border-error)}@media (forced-colors: active){.bs-input__control{border:1px solid FieldText}.bs-input__control:focus-visible{outline:2px solid Highlight;outline-offset:2px}}";const o=class{constructor(t){i(this,t)}get el(){return e(this)}onKeyDown(i){if(!["ArrowDown","ArrowUp","Home","End"].includes(i.key))return;const t=Array.from(this.el.querySelectorAll("bs-menu-item")).filter((i=>!i.disabled));if(0===t.length)return;const e=t.findIndex((t=>t===i.target||t.contains(i.target)));let s;i.preventDefault(),s="Home"===i.key?0:"End"===i.key?t.length-1:"ArrowDown"===i.key?-1===e?0:(e+1)%t.length:-1===e?t.length-1:(e-1+t.length)%t.length,t[s].shadowRoot?.querySelector("button")?.focus()}render(){return s("div",{key:"ba99d3c35c0c7ab4427155ac13e89c434068ef49",part:"list",class:"bs-menu",role:"menu"},s("slot",{key:"817f29507503adcaad013a8035d35bc1f35ffdef"}))}};o.style=":host{display:block;--bs-menu-bg:var(--bs-surface-raised);--bs-menu-radius:var(--bs-border-radius-100);--bs-menu-padding-y:var(--bs-spacing-50);--bs-menu-gap:var(--bs-spacing-50);--bs-menu-shadow:var(--bs-shadow-sm)}.bs-menu{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-menu-gap);background:var(--bs-menu-bg);border-radius:var(--bs-menu-radius);padding:var(--bs-menu-padding-y) 0;box-shadow:var(--bs-menu-shadow);font-family:inherit}@media (forced-colors: active){.bs-menu{border:1px solid CanvasText}}";const a=class{constructor(e){i(this,e),this.bsSelect=t(this,"bsSelect")}disabled=!1;hasIcon=!1;bsSelect;onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onClick=()=>{this.disabled||this.bsSelect.emit()};render(){return s("button",{key:"419a5d4d35f47ea9cf72b02407a45a7d5645fc4b",type:"button",part:"item",role:"menuitem",class:"bs-menu-item "+(this.disabled?"bs-menu-item--disabled":""),disabled:this.disabled,"aria-disabled":this.disabled?"true":void 0,onClick:this.onClick},s("span",{key:"733f8e5f702496bbb2788cc4db84a9c7c128f1be",part:"icon",class:"bs-menu-item__icon "+(this.hasIcon?"bs-menu-item__icon--has-content":"")},s("slot",{key:"566ca7b7f011090efa131c6bf0fb74515db11fee",name:"icon",onSlotchange:this.onIconSlotchange})),s("span",{key:"c717ab8efef92c338581953c60f617057f9eaadc",part:"label",class:"bs-menu-item__label"},s("slot",{key:"c0006ae3c36798eabfb2e001faade51ec4cc10c9"})))}};a.style=":host{display:block;--bs-menu-item-radius:var(--bs-border-radius-100);--bs-menu-item-padding-y:var(--bs-spacing-100);--bs-menu-item-padding-x:var(--bs-spacing-150);--bs-menu-item-gap:var(--bs-spacing-100);--bs-menu-item-hover:var(--bs-color-neutral-container-hover);--bs-menu-item-pressed:var(--bs-color-neutral-container-pressed);--bs-menu-item-disabled-bg:var(--bs-surface-action-disabled);--bs-menu-item-icon-color:var(--bs-icon-default);--bs-menu-item-icon-color-disabled:var(--bs-icon-disabled);--bs-menu-item-color:var(--bs-text-muted);--bs-menu-item-color-disabled:var(--bs-text-on-disabled);--bs-menu-item-font-size:var(--bs-font-size-md);--bs-menu-item-line-height:var(--bs-line-height-body-md)}.bs-menu-item{box-sizing:border-box;display:flex;align-items:center;width:100%;height:48px;border:none;cursor:pointer;background:transparent;color:var(--bs-menu-item-color);font-family:inherit;border-radius:var(--bs-menu-item-radius);padding:var(--bs-menu-item-padding-y) var(--bs-menu-item-padding-x);gap:var(--bs-menu-item-gap);transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-menu-item:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-menu-item:hover{background:var(--bs-menu-item-hover)}.bs-menu-item:active{background:var(--bs-menu-item-pressed)}.bs-menu-item--disabled{background:var(--bs-menu-item-disabled-bg);color:var(--bs-menu-item-color-disabled);cursor:not-allowed}.bs-menu-item--disabled:hover,.bs-menu-item--disabled:active{background:var(--bs-menu-item-disabled-bg)}.bs-menu-item--disabled .bs-menu-item__icon{color:var(--bs-menu-item-icon-color-disabled)}.bs-menu-item__icon{display:none;width:24px;height:24px;flex-shrink:0;color:var(--bs-menu-item-icon-color)}.bs-menu-item__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-menu-item__icon ::slotted(svg){width:24px;height:24px}.bs-menu-item__label{font-size:var(--bs-menu-item-font-size);line-height:calc(var(--bs-menu-item-line-height) * 1px);white-space:nowrap}";export{n as bs_input,o as bs_menu,a as bs_menu_item}
@@ -300,7 +300,7 @@ const BsInput = class {
300
300
  return (index.h("textarea", { id: "control", part: "control", class: "bs-input__control bs-input__control--textarea", rows: this.rows, value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
301
301
  }
302
302
  renderChipControl() {
303
- return (index.h("div", { class: "bs-input__chips" }, this.chips.map(chip => (index.h("bs-chip-informative", { part: "chip", class: "bs-input__chip", size: "sm", disabled: this.disabled }, chip, index.h("bs-icon-button", { part: "chip-remove", class: "bs-input__chip-remove", variant: "subtle", size: "md", ariaLabel: `Remove ${chip}`, disabled: this.disabled, onClick: this.onChipRemove(chip) }, index.h(ChipRemoveIcon, null))))), index.h("input", { id: "control", part: "control", class: "bs-input__control bs-input__chip-input", type: "text", value: this.chipDraft, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onChipDraftInput, onKeyDown: this.onChipDraftKeydown })));
303
+ return (index.h("div", { class: "bs-input__chips" }, this.chips.map(chip => (index.h("bs-chip-informative", { part: "chip", class: "bs-input__chip", size: "sm", disabled: this.disabled }, chip, index.h("bs-icon-button", { part: "chip-remove", class: "bs-input__chip-remove", variant: "subtle", size: "xs", ariaLabel: `Remove ${chip}`, disabled: this.disabled, onClick: this.onChipRemove(chip) }, index.h(ChipRemoveIcon, null))))), index.h("input", { id: "control", part: "control", class: "bs-input__control bs-input__chip-input", type: "text", value: this.chipDraft, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onChipDraftInput, onKeyDown: this.onChipDraftKeydown })));
304
304
  }
305
305
  // type="initials" renders two genuinely separate bordered boxes side by side (each with its own
306
306
  // border/radius/background, a small gap between them), not one shared field wrapper -- Figma
@@ -329,7 +329,7 @@ export class BsInput {
329
329
  return (h("textarea", { id: "control", part: "control", class: "bs-input__control bs-input__control--textarea", rows: this.rows, value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
330
330
  }
331
331
  renderChipControl() {
332
- return (h("div", { class: "bs-input__chips" }, this.chips.map(chip => (h("bs-chip-informative", { part: "chip", class: "bs-input__chip", size: "sm", disabled: this.disabled }, chip, h("bs-icon-button", { part: "chip-remove", class: "bs-input__chip-remove", variant: "subtle", size: "md", ariaLabel: `Remove ${chip}`, disabled: this.disabled, onClick: this.onChipRemove(chip) }, h(ChipRemoveIcon, null))))), h("input", { id: "control", part: "control", class: "bs-input__control bs-input__chip-input", type: "text", value: this.chipDraft, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onChipDraftInput, onKeyDown: this.onChipDraftKeydown })));
332
+ return (h("div", { class: "bs-input__chips" }, this.chips.map(chip => (h("bs-chip-informative", { part: "chip", class: "bs-input__chip", size: "sm", disabled: this.disabled }, chip, h("bs-icon-button", { part: "chip-remove", class: "bs-input__chip-remove", variant: "subtle", size: "xs", ariaLabel: `Remove ${chip}`, disabled: this.disabled, onClick: this.onChipRemove(chip) }, h(ChipRemoveIcon, null))))), h("input", { id: "control", part: "control", class: "bs-input__control bs-input__chip-input", type: "text", value: this.chipDraft, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onChipDraftInput, onKeyDown: this.onChipDraftKeydown })));
333
333
  }
334
334
  // type="initials" renders two genuinely separate bordered boxes side by side (each with its own
335
335
  // border/radius/background, a small gap between them), not one shared field wrapper -- Figma
@@ -1,29 +1,9 @@
1
1
  import { html } from "lit";
2
2
  import { componentDescription, propDescription } from "../../stories-utils";
3
- const inputTypes = [
4
- 'text',
5
- 'email',
6
- 'password',
7
- 'number',
8
- 'search',
9
- 'date',
10
- 'dropdown',
11
- 'select',
12
- 'textarea',
13
- 'chip',
14
- 'initials',
15
- 'country',
16
- 'pin',
17
- ];
3
+ const inputTypes = ['text', 'email', 'password', 'number', 'search', 'date', 'dropdown', 'select', 'textarea', 'chip', 'initials', 'country', 'pin'];
18
4
  const mailIcon = html `
19
5
  <svg slot="icon" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
20
- <path
21
- d="M2 4L8 9L14 4M2 4H14V12H2V4Z"
22
- stroke="currentColor"
23
- stroke-width="1.3"
24
- stroke-linecap="round"
25
- stroke-linejoin="round"
26
- />
6
+ <path d="M2 4L8 9L14 4M2 4H14V12H2V4Z" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" />
27
7
  </svg>
28
8
  `;
29
9
  const chevronIcon = html `
@@ -75,7 +55,11 @@ const meta = {
75
55
  },
76
56
  };
77
57
  export default meta;
78
- export const Default = {};
58
+ export const Default = {
59
+ args: {
60
+ type: 'email',
61
+ },
62
+ };
79
63
  export const WithDescription = {
80
64
  args: { description: "We'll never share your email." },
81
65
  };
@@ -1 +1 @@
1
- import{t as e,p as t,H as a,c as s,h as i}from"./p-CVrEuVFo.js";import{d as r}from"./p-CA31vqjL.js";import{d as n}from"./p-DuLL7Ouw.js";import{d}from"./p-zTHlbyH6.js";import{d as o}from"./p-BUskqBR6.js";import{d as c}from"./p-CeUK3n7D.js";import{d as b}from"./p-C_j_jDM6.js";const l=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";initialStart="";initialEnd="";name;range=!1;value="";start="";end="";min;max;locale="en-GB";firstDayOfWeek=0;startLabel="Start date";endLabel="End date";monthLabel="Month";yearLabel="Year";previousLabel="Previous month";nextLabel="Next month";bsChange;viewDate=k(new Date);focusedIso="";hoverIso="";draft={};openMenu=null;shouldFocusDay=!1;menuToScroll=!1;componentWillLoad(){this.initialValue=this.value,this.initialStart=this.start,this.initialEnd=this.end,this.showSelection(),this.syncFormValue()}componentDidRender(){if(this.menuToScroll){this.menuToScroll=!1;const e=()=>{const e=this.el.shadowRoot?.querySelector(".bs-datepicker__menu"),t=e?.querySelector("[data-current]");e&&t&&(e.scrollTop=t.offsetTop-e.clientHeight/2+t.offsetHeight/2)};requestAnimationFrame((()=>requestAnimationFrame(e)))}if(!this.shouldFocusDay)return;this.shouldFocusDay=!1;const e=this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);e?.focus()}onSelectionChange(){this.syncFormValue()}onSelectionJump(){this.showSelection()}formResetCallback(){this.value=this.initialValue,this.start=this.initialStart,this.end=this.initialEnd,this.draft={}}showSelection(){const e=u(this.range?this.start:this.value);e&&(this.viewDate=k(e))}syncFormValue(){if(this.internals?.setFormValue)if(this.range){if(!this.name)return void this.internals.setFormValue(null);const e=new FormData;e.append(this.name+"-start",this.start??""),e.append(this.name+"-end",this.end??""),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value??"")}isDisabled(e){const t=u(this.min),a=u(this.max);return!!t&&e<t||!!a&&e>a}selectDay(e){if(this.isDisabled(e))return;const t=h(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=k(e)),this.focusedIso=t,!this.range)return this.value=t,void this.bsChange.emit({value:t});!this.start||this.end||t<this.start?(this.start=t,this.end=""):this.end=t,this.hoverIso="",this.draft={},this.bsChange.emit({start:this.start,end:this.end})}commitDraft(e){const t=this.draft[e];if(void 0===t)return;const a=u(t),s={...this.draft};if(delete s[e],this.draft=s,!a||this.isDisabled(a))return;let i="start"===e?h(a):this.start,r="end"===e?h(a):this.end;i&&r&&r<i&&("start"===e?r="":i=""),this.start=i,this.end=r,this.showSelection(),this.bsChange.emit({start:i,end:r})}moveView(e){const t=this.viewDate;this.viewDate=new Date(t.getFullYear(),t.getMonth()+e,1)}onKeyDown=(e,t)=>{const a={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let s;if(e.key in a)s=v(t,a[e.key]);else if("Home"===e.key||"End"===e.key){const a=(t.getDay()-this.safeFirstDay+7)%7;s=v(t,"Home"===e.key?-a:6-a)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const a="PageUp"===e.key?-1:1;s=function(e,t){const a=new Date(e.getFullYear(),e.getMonth()+t,1),s=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return new Date(a.getFullYear(),a.getMonth(),Math.min(e.getDate(),s))}(t,e.shiftKey?12*a:a)}}e.preventDefault(),this.focusedIso=h(s),this.viewDate=k(s),this.shouldFocusDay=!0};get safeFirstDay(){const e=Math.trunc(Number(this.firstDayOfWeek));return Number.isFinite(e)?(e%7+7)%7:0}get fmt(){const e=this.locale||"en-GB";try{return e}catch{return"en-GB"}}formatField(e){const t=u(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:u(this.value);return e?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"long",year:"numeric"}).format(e):new Intl.DateTimeFormat(this.fmt,{month:"long",year:"numeric"}).format(this.viewDate)}monthOptions(){const e=new Intl.DateTimeFormat(this.fmt,{month:"long"});return Array.from({length:12},((t,a)=>({label:e.format(new Date(2e3,a,1)),value:a+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=u(this.min)?.getFullYear()??e-100,a=u(this.max)?.getFullYear()??e+100,s=[];for(let i=Math.min(t,e);i<=Math.max(a,e);i++)s.push({label:i+"",value:i+""});return s}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,a)=>e.format(new Date(2023,0,1+(this.safeFirstDay+a)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,a=v(e,-t);return Array.from({length:42},((e,t)=>v(a,t)))}renderHeader(){if(this.range){const e=(e,t)=>i("bs-input",{label:t,placeholder:"YYYY-MM-DD",value:this.draft[e]??this.formatField(this[e]),onBsInput:t=>this.draft={...this.draft,[e]:t.detail},onBsChange:()=>this.commitDraft(e),onFocusin:()=>{void 0===this.draft[e]&&(this.draft={...this.draft,[e]:this[e]})},onFocusout:()=>this.commitDraft(e)});return i("div",{part:"header",class:"bs-datepicker__header bs-datepicker__header--range"},e("start",this.startLabel),e("end",this.endLabel))}return i("div",{part:"header",class:"bs-datepicker__header"},this.renderDropdown("month",this.monthLabel,this.monthOptions(),this.viewDate.getMonth()+"",(e=>this.viewDate=new Date(this.viewDate.getFullYear(),Number(e),1))),this.renderDropdown("year",this.yearLabel,this.yearOptions(),this.viewDate.getFullYear()+"",(e=>this.viewDate=new Date(Number(e),this.viewDate.getMonth(),1))))}renderDropdown(e,t,a,s,r){const n=this.openMenu===e,d=()=>{this.openMenu=null};return i("div",{class:"bs-datepicker__dropdown",onKeyDown:e=>{"Escape"===e.key&&n&&(d(),e.currentTarget.querySelector("bs-input")?.focus())},onFocusout:e=>{const t=e.relatedTarget;!n||t&&e.currentTarget.contains(t)||d()}},i("bs-input",{type:"dropdown",class:"bs-datepicker__select",label:t,value:a.find((e=>e.value===s))?.label??"",open:n,onBsOpen:()=>{this.menuToScroll=!n,this.openMenu=n?null:e}}),n&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},a.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===s?"":void 0,"aria-current":e.value===s?"true":void 0,onBsSelect:()=>{r(e.value),d(),this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${t}"]`)?.focus()}},i("span",{class:"bs-datepicker__option"},i("span",null,e.label),e.value===s&&i("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{d:"M5 12.5L10 17.5L19 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))))))}render(){const e=this.gridDays(),t=h(new Date),a=this.range?this.start:this.value,s=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:s,n=e.some((e=>h(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),d=e=>!!a&&!!r&&e>a&&e<r,o=this.weekdays();return i("bs-card",{key:"cd66b2bc8f611383ea5df6d01e29b03a940bc06b",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"7020d13ee4ea5f05c2548966cb56c20b59eb067b",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"4ed03f1fb642d2a3a226a27e6e86001a478eab4c",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"e844a021afa02f834026ebb4237f5b2f5b9d1a4c",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"f68be6b62a9deb6334b63c6e7152b4968ebdbeab",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"a7ee70143ce7b839c44483c1d15daf2714306bf7",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"7eb7fd38ca59a4a6ba9692180bcd5096f54ac783",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"1e515d27746a10acfe9f04f08c4a09753cb5b98b",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"f5dde56a61d31b93aa9877b0fc473264d40305ba",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"765b53c7f7e8618618622a5121ecab294610bf8a",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"e56fa1a425055d77ae04039890758b823f14ee8d",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"2471a9291aa29111217aaaa1f02f2cfc8861e49e",class:"bs-datepicker__row",role:"row"},o.map((e=>i("div",{part:"weekday",class:"bs-datepicker__weekday",role:"columnheader"},e)))),Array.from({length:6},((r,o)=>{const c=e.slice(7*o,7*o+7);return i("div",{class:"bs-datepicker__row",role:"row"},c.map(((e,r)=>{const o=h(e),b=e.getMonth()!==this.viewDate.getMonth(),l=o===a||!!s&&o===s,p=d(o),u={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&d(h(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&d(h(c[r+1])))},k=["day",l&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:u,role:"gridcell","aria-selected":l||p?"true":"false"},i("button",{part:k,type:"button",class:{"bs-datepicker__day":!0,"bs-datepicker__day--selected":l,"bs-datepicker__day--in-range":p,"bs-datepicker__day--outside":b,"bs-datepicker__day--today":o===t},"data-date":o,tabindex:o===n?0:-1,disabled:this.isDisabled(e),"aria-current":o===t?"date":void 0,"aria-label":new Intl.DateTimeFormat(this.fmt,{weekday:"long",day:"2-digit",month:"long",year:"numeric"}).format(e),onClick:()=>this.selectDay(e),onKeyDown:t=>this.onKeyDown(t,e),onMouseEnter:()=>{this.range&&this.start&&!this.end&&(this.hoverIso=o)}},(e.getDate()+"").padStart(2,"0")))})))})))))}defaultTabbable(e){const t=t=>e.some((e=>h(e)===t&&e.getMonth()===this.viewDate.getMonth())),a=this.range?this.start:this.value;if(a&&t(a))return a;const s=h(new Date);return t(s)?s:h(this.viewDate)}static get formAssociated(){return!0}static get watchers(){return{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}}static get style(){return":host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-paper-bg-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{width:var(--bs-datepicker-width);max-width:100%;color:var(--bs-datepicker-color);font-size:var(--bs-datepicker-font-size);--bs-card-bg:var(--bs-datepicker-bg);--bs-card-radius:var(--bs-datepicker-radius);--bs-card-padding:var(--bs-datepicker-padding);--bs-card-shadow:var(--bs-datepicker-shadow);--bs-card-overflow:visible}.bs-datepicker__body{display:flex;flex-direction:column;gap:var(--bs-datepicker-gap)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header--range>bs-input{--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}"}},[577,"bs-datepicker",{name:[513],range:[516],value:[1537],start:[1537],end:[1537],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],startLabel:[1,"start-label"],endLabel:[1,"end-label"],monthLabel:[1,"month-label"],yearLabel:[1,"year-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],viewDate:[32],focusedIso:[32],hoverIso:[32],draft:[32],openMenu:[32]},void 0,{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}]);function p(e){return(e+"").padStart(2,"0")}function h(e){return`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`}function u(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const a=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return h(a)===`${t[1]}-${t[2]}-${t[3]}`?a:void 0}function k(e){return new Date(e.getFullYear(),e.getMonth(),1)}function v(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function g(){"undefined"!=typeof customElements&&["bs-datepicker","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),l);break;case"bs-card":customElements.get(e(t))||r();break;case"bs-chip-informative":customElements.get(e(t))||n();break;case"bs-icon-button":customElements.get(e(t))||d();break;case"bs-input":customElements.get(e(t))||o();break;case"bs-menu":customElements.get(e(t))||c();break;case"bs-menu-item":customElements.get(e(t))||b()}}))}g();const f=l,m=g;export{f as BsDatepicker,m as defineCustomElement}
1
+ import{t as e,p as t,H as a,c as s,h as i}from"./p-CVrEuVFo.js";import{d as r}from"./p-CA31vqjL.js";import{d as n}from"./p-DuLL7Ouw.js";import{d}from"./p-zTHlbyH6.js";import{d as o}from"./p-BGW5q5LZ.js";import{d as c}from"./p-CeUK3n7D.js";import{d as b}from"./p-C_j_jDM6.js";const l=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";initialStart="";initialEnd="";name;range=!1;value="";start="";end="";min;max;locale="en-GB";firstDayOfWeek=0;startLabel="Start date";endLabel="End date";monthLabel="Month";yearLabel="Year";previousLabel="Previous month";nextLabel="Next month";bsChange;viewDate=k(new Date);focusedIso="";hoverIso="";draft={};openMenu=null;shouldFocusDay=!1;menuToScroll=!1;componentWillLoad(){this.initialValue=this.value,this.initialStart=this.start,this.initialEnd=this.end,this.showSelection(),this.syncFormValue()}componentDidRender(){if(this.menuToScroll){this.menuToScroll=!1;const e=()=>{const e=this.el.shadowRoot?.querySelector(".bs-datepicker__menu"),t=e?.querySelector("[data-current]");e&&t&&(e.scrollTop=t.offsetTop-e.clientHeight/2+t.offsetHeight/2)};requestAnimationFrame((()=>requestAnimationFrame(e)))}if(!this.shouldFocusDay)return;this.shouldFocusDay=!1;const e=this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);e?.focus()}onSelectionChange(){this.syncFormValue()}onSelectionJump(){this.showSelection()}formResetCallback(){this.value=this.initialValue,this.start=this.initialStart,this.end=this.initialEnd,this.draft={}}showSelection(){const e=u(this.range?this.start:this.value);e&&(this.viewDate=k(e))}syncFormValue(){if(this.internals?.setFormValue)if(this.range){if(!this.name)return void this.internals.setFormValue(null);const e=new FormData;e.append(this.name+"-start",this.start??""),e.append(this.name+"-end",this.end??""),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value??"")}isDisabled(e){const t=u(this.min),a=u(this.max);return!!t&&e<t||!!a&&e>a}selectDay(e){if(this.isDisabled(e))return;const t=h(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=k(e)),this.focusedIso=t,!this.range)return this.value=t,void this.bsChange.emit({value:t});!this.start||this.end||t<this.start?(this.start=t,this.end=""):this.end=t,this.hoverIso="",this.draft={},this.bsChange.emit({start:this.start,end:this.end})}commitDraft(e){const t=this.draft[e];if(void 0===t)return;const a=u(t),s={...this.draft};if(delete s[e],this.draft=s,!a||this.isDisabled(a))return;let i="start"===e?h(a):this.start,r="end"===e?h(a):this.end;i&&r&&r<i&&("start"===e?r="":i=""),this.start=i,this.end=r,this.showSelection(),this.bsChange.emit({start:i,end:r})}moveView(e){const t=this.viewDate;this.viewDate=new Date(t.getFullYear(),t.getMonth()+e,1)}onKeyDown=(e,t)=>{const a={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let s;if(e.key in a)s=v(t,a[e.key]);else if("Home"===e.key||"End"===e.key){const a=(t.getDay()-this.safeFirstDay+7)%7;s=v(t,"Home"===e.key?-a:6-a)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const a="PageUp"===e.key?-1:1;s=function(e,t){const a=new Date(e.getFullYear(),e.getMonth()+t,1),s=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return new Date(a.getFullYear(),a.getMonth(),Math.min(e.getDate(),s))}(t,e.shiftKey?12*a:a)}}e.preventDefault(),this.focusedIso=h(s),this.viewDate=k(s),this.shouldFocusDay=!0};get safeFirstDay(){const e=Math.trunc(Number(this.firstDayOfWeek));return Number.isFinite(e)?(e%7+7)%7:0}get fmt(){const e=this.locale||"en-GB";try{return e}catch{return"en-GB"}}formatField(e){const t=u(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:u(this.value);return e?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"long",year:"numeric"}).format(e):new Intl.DateTimeFormat(this.fmt,{month:"long",year:"numeric"}).format(this.viewDate)}monthOptions(){const e=new Intl.DateTimeFormat(this.fmt,{month:"long"});return Array.from({length:12},((t,a)=>({label:e.format(new Date(2e3,a,1)),value:a+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=u(this.min)?.getFullYear()??e-100,a=u(this.max)?.getFullYear()??e+100,s=[];for(let i=Math.min(t,e);i<=Math.max(a,e);i++)s.push({label:i+"",value:i+""});return s}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,a)=>e.format(new Date(2023,0,1+(this.safeFirstDay+a)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,a=v(e,-t);return Array.from({length:42},((e,t)=>v(a,t)))}renderHeader(){if(this.range){const e=(e,t)=>i("bs-input",{label:t,placeholder:"YYYY-MM-DD",value:this.draft[e]??this.formatField(this[e]),onBsInput:t=>this.draft={...this.draft,[e]:t.detail},onBsChange:()=>this.commitDraft(e),onFocusin:()=>{void 0===this.draft[e]&&(this.draft={...this.draft,[e]:this[e]})},onFocusout:()=>this.commitDraft(e)});return i("div",{part:"header",class:"bs-datepicker__header bs-datepicker__header--range"},e("start",this.startLabel),e("end",this.endLabel))}return i("div",{part:"header",class:"bs-datepicker__header"},this.renderDropdown("month",this.monthLabel,this.monthOptions(),this.viewDate.getMonth()+"",(e=>this.viewDate=new Date(this.viewDate.getFullYear(),Number(e),1))),this.renderDropdown("year",this.yearLabel,this.yearOptions(),this.viewDate.getFullYear()+"",(e=>this.viewDate=new Date(Number(e),this.viewDate.getMonth(),1))))}renderDropdown(e,t,a,s,r){const n=this.openMenu===e,d=()=>{this.openMenu=null};return i("div",{class:"bs-datepicker__dropdown",onKeyDown:e=>{"Escape"===e.key&&n&&(d(),e.currentTarget.querySelector("bs-input")?.focus())},onFocusout:e=>{const t=e.relatedTarget;!n||t&&e.currentTarget.contains(t)||d()}},i("bs-input",{type:"dropdown",class:"bs-datepicker__select",label:t,value:a.find((e=>e.value===s))?.label??"",open:n,onBsOpen:()=>{this.menuToScroll=!n,this.openMenu=n?null:e}}),n&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},a.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===s?"":void 0,"aria-current":e.value===s?"true":void 0,onBsSelect:()=>{r(e.value),d(),this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${t}"]`)?.focus()}},i("span",{class:"bs-datepicker__option"},i("span",null,e.label),e.value===s&&i("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{d:"M5 12.5L10 17.5L19 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))))))}render(){const e=this.gridDays(),t=h(new Date),a=this.range?this.start:this.value,s=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:s,n=e.some((e=>h(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),d=e=>!!a&&!!r&&e>a&&e<r,o=this.weekdays();return i("bs-card",{key:"cd66b2bc8f611383ea5df6d01e29b03a940bc06b",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"7020d13ee4ea5f05c2548966cb56c20b59eb067b",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"4ed03f1fb642d2a3a226a27e6e86001a478eab4c",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"e844a021afa02f834026ebb4237f5b2f5b9d1a4c",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"f68be6b62a9deb6334b63c6e7152b4968ebdbeab",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"a7ee70143ce7b839c44483c1d15daf2714306bf7",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"7eb7fd38ca59a4a6ba9692180bcd5096f54ac783",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"1e515d27746a10acfe9f04f08c4a09753cb5b98b",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"f5dde56a61d31b93aa9877b0fc473264d40305ba",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"765b53c7f7e8618618622a5121ecab294610bf8a",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"e56fa1a425055d77ae04039890758b823f14ee8d",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"2471a9291aa29111217aaaa1f02f2cfc8861e49e",class:"bs-datepicker__row",role:"row"},o.map((e=>i("div",{part:"weekday",class:"bs-datepicker__weekday",role:"columnheader"},e)))),Array.from({length:6},((r,o)=>{const c=e.slice(7*o,7*o+7);return i("div",{class:"bs-datepicker__row",role:"row"},c.map(((e,r)=>{const o=h(e),b=e.getMonth()!==this.viewDate.getMonth(),l=o===a||!!s&&o===s,p=d(o),u={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&d(h(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&d(h(c[r+1])))},k=["day",l&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:u,role:"gridcell","aria-selected":l||p?"true":"false"},i("button",{part:k,type:"button",class:{"bs-datepicker__day":!0,"bs-datepicker__day--selected":l,"bs-datepicker__day--in-range":p,"bs-datepicker__day--outside":b,"bs-datepicker__day--today":o===t},"data-date":o,tabindex:o===n?0:-1,disabled:this.isDisabled(e),"aria-current":o===t?"date":void 0,"aria-label":new Intl.DateTimeFormat(this.fmt,{weekday:"long",day:"2-digit",month:"long",year:"numeric"}).format(e),onClick:()=>this.selectDay(e),onKeyDown:t=>this.onKeyDown(t,e),onMouseEnter:()=>{this.range&&this.start&&!this.end&&(this.hoverIso=o)}},(e.getDate()+"").padStart(2,"0")))})))})))))}defaultTabbable(e){const t=t=>e.some((e=>h(e)===t&&e.getMonth()===this.viewDate.getMonth())),a=this.range?this.start:this.value;if(a&&t(a))return a;const s=h(new Date);return t(s)?s:h(this.viewDate)}static get formAssociated(){return!0}static get watchers(){return{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}}static get style(){return":host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-paper-bg-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{width:var(--bs-datepicker-width);max-width:100%;color:var(--bs-datepicker-color);font-size:var(--bs-datepicker-font-size);--bs-card-bg:var(--bs-datepicker-bg);--bs-card-radius:var(--bs-datepicker-radius);--bs-card-padding:var(--bs-datepicker-padding);--bs-card-shadow:var(--bs-datepicker-shadow);--bs-card-overflow:visible}.bs-datepicker__body{display:flex;flex-direction:column;gap:var(--bs-datepicker-gap)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header--range>bs-input{--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}"}},[577,"bs-datepicker",{name:[513],range:[516],value:[1537],start:[1537],end:[1537],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],startLabel:[1,"start-label"],endLabel:[1,"end-label"],monthLabel:[1,"month-label"],yearLabel:[1,"year-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],viewDate:[32],focusedIso:[32],hoverIso:[32],draft:[32],openMenu:[32]},void 0,{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}]);function p(e){return(e+"").padStart(2,"0")}function h(e){return`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`}function u(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const a=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return h(a)===`${t[1]}-${t[2]}-${t[3]}`?a:void 0}function k(e){return new Date(e.getFullYear(),e.getMonth(),1)}function v(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function g(){"undefined"!=typeof customElements&&["bs-datepicker","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),l);break;case"bs-card":customElements.get(e(t))||r();break;case"bs-chip-informative":customElements.get(e(t))||n();break;case"bs-icon-button":customElements.get(e(t))||d();break;case"bs-input":customElements.get(e(t))||o();break;case"bs-menu":customElements.get(e(t))||c();break;case"bs-menu-item":customElements.get(e(t))||b()}}))}g();const f=l,m=g;export{f as BsDatepicker,m as defineCustomElement}
@@ -1 +1 @@
1
- import{B as s,d as o}from"./p-BUskqBR6.js";const p=s,r=o;export{p as BsInput,r as defineCustomElement}
1
+ import{B as o,d as s}from"./p-BGW5q5LZ.js";const p=o,r=s;export{p as BsInput,r as defineCustomElement}
@@ -1 +1 @@
1
- import{h as s,t,p as e,H as i,c as o}from"./p-CVrEuVFo.js";import{d as n}from"./p-Dr0Qk9Zc.js";import{d as a}from"./p-qmS2CBqi.js";import{d as r}from"./p-CA31vqjL.js";import{d as b}from"./p-DuLL7Ouw.js";import{d as c}from"./p-zTHlbyH6.js";import{d as l}from"./p-CncySD_-.js";import{d}from"./p-BUskqBR6.js";import{d as u}from"./p-CeUK3n7D.js";import{d as m}from"./p-C_j_jDM6.js";import{d as h}from"./p-CbimDNGY.js";const p=e(class extends i{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsPrimary=o(this,"bsPrimary"),this.bsSecondary=o(this,"bsSecondary"),this.bsAlternative=o(this,"bsAlternative"),this.bsCancel=o(this,"bsCancel"),this.bsExpire=o(this,"bsExpire")}get el(){return this}type="warning";heading;headingLevel=2;description;hideIcon=!1;primaryLabel;secondaryLabel;secondsLeft=0;totalSeconds=0;countdown=!1;timeLeftLabel="minutes left";secondsLeftLabel="seconds left";savedMessage;accountName;accountEmail;accountInitials;passwordLabel="Password";passwordError;dividerLabel="or";alternatives=[{id:"passkey",label:"Use passkey",icon:"fingerprint"},{id:"bankid",label:"Use BankID",icon:"key"}];cancelLabel="Cancel";bsPrimary;bsSecondary;bsAlternative;bsCancel;bsExpire;password="";announcement="";initialTotal=0;timer;componentWillLoad(){this.initialTotal=this.secondsLeft}componentDidLoad(){this.syncTimer()}disconnectedCallback(){this.stopTimer()}connectedCallback(){void 0===this.timer&&this.el.isConnected&&this.syncTimer()}onTimerInputsChange(){this.syncTimer()}stopTimer(){void 0!==this.timer&&clearInterval(this.timer),this.timer=void 0}syncTimer(){this.stopTimer(),!this.countdown||"warning"!==this.type||this.secondsLeft<=0||(this.timer=setInterval((()=>this.tick()),1e3))}tick(){this.secondsLeft<=0||(this.secondsLeft=this.secondsLeft-1,[60,30,10].includes(this.secondsLeft)&&(this.announcement=`${g(this.secondsLeft)} ${this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel}`),this.secondsLeft<=0&&(this.stopTimer(),this.bsExpire.emit()))}get defaults(){return k[this.type]??k.warning}renderHeading(t,e){const i=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||2));return s("div",{class:"bs-session-timeout__heading-group"},s("h"+i,{part:"heading",id:"heading",class:{"bs-session-timeout__heading":!0}},t),e&&s("p",{part:"description",class:"bs-session-timeout__description"},e))}renderWarning(){const t=this.totalSeconds>0?this.totalSeconds:this.initialTotal||this.secondsLeft,e=t>0?Math.max(0,Math.min(100,this.secondsLeft/t*100)):0,i=this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel;return s("div",{part:"countdown",class:"bs-session-timeout__countdown"},s("div",{class:"bs-session-timeout__time-row"},s("span",{part:"time",class:"bs-session-timeout__time",role:"timer"},g(this.secondsLeft)),s("span",{class:"bs-session-timeout__unit"},i)),s("bs-progress-linear",{type:"determinate",size:"large",value:e,showLabel:!1,ariaLabel:`${g(this.secondsLeft)} ${i}`}))}renderAccount(){const t=this.accountName??"",e=this.accountInitials??t.split(/\s+/).filter(Boolean).slice(0,2).map((s=>s[0].toUpperCase())).join("");return t||this.accountEmail?s("div",{part:"account",class:"bs-session-timeout__account"},s("bs-avatar",{type:"initials",size:"lg",initials:e,ariaLabel:t||this.accountEmail}),s("div",{class:"bs-session-timeout__account-text"},t&&s("span",{class:"bs-session-timeout__account-name"},t),this.accountEmail&&s("span",{class:"bs-session-timeout__account-email"},this.accountEmail))):null}renderConfirm(){const t=this.alternatives??[];return[s("bs-input",{part:"password",class:"bs-session-timeout__password",type:"password",label:this.passwordLabel,value:this.password,error:this.passwordError,onBsInput:s=>this.password=s.detail,onBsChange:s=>this.password=s.detail}),s("bs-button",{part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit({password:this.password})},this.primaryLabel??this.defaults.primary),t.length>0&&s("div",{part:"divider",class:"bs-session-timeout__divider",role:"separator"},s("span",{class:"bs-session-timeout__rule"}),s("span",{class:"bs-session-timeout__divider-label"},this.dividerLabel),s("span",{class:"bs-session-timeout__rule"})),t.length>0&&s("div",{part:"alternatives",class:"bs-session-timeout__alternatives"},t.map((t=>s("bs-button",{key:t.id,variant:"outlined",onClick:()=>this.bsAlternative.emit({id:t.id})},s("key"===t.icon?w:y,{slot:"icon"}),t.label)))),this.cancelLabel&&s("bs-button",{part:"cancel",class:"bs-session-timeout__block-button bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsCancel.emit()},this.cancelLabel)]}render(){const t=this.defaults,e=this.heading??t.heading,i=this.description??t.description,o=this.primaryLabel??t.primary,n=this.secondaryLabel??t.secondary;return s("bs-card",{key:"45a056eabc2f536128ee6adbc6104d76793301f4",part:"container",class:"bs-session-timeout",surface:"base",role:"region","aria-labelledby":"heading"},s("div",{key:"035795cb4b5b0252212270236f048e3216d5d401",class:"bs-session-timeout__body"},!this.hideIcon&&s("bs-icon-tile",{key:"857db99f58d07483d3c7dadd95e5951a645d0c59",part:"art",intent:t.intent,size:"lg"},s("slot",{key:"41504daf4751677d9b1df0d211e719d8f441f5b2",name:"icon"},t.glyph())),this.renderHeading(e,i),"warning"===this.type&&this.renderWarning(),"warning"===this.type&&this.savedMessage&&s("p",{key:"8ba10b3921db4b3cedbeb3d45bddfb89425bbdbb",part:"saved",class:"bs-session-timeout__saved"},s(x,{key:"44ea938fca553c67ae23628833471ceb98e63b06"}),s("span",{key:"672ebc96828437ffbc67711082fd7018611153b7"},this.savedMessage)),"signed-out"===this.type&&this.renderAccount(),"confirm-identity"===this.type&&this.renderConfirm(),"warning"===this.type&&(o||n)&&s("div",{key:"94221156fe30010bd0fbe4fb0146c95feceab50f",part:"actions",class:"bs-session-timeout__actions"},n&&s("bs-button",{key:"09b14d30bc185a4644902e52100f0493da6109a0",part:"secondary",variant:"outlined",onClick:()=>this.bsSecondary.emit()},n),o&&s("bs-button",{key:"be381ed4be453efd306b28da3e1f4b7f0740c024",part:"primary",variant:"primary",onClick:()=>this.bsPrimary.emit()},o)),"signed-out"===this.type&&(o||n)&&s("div",{key:"6b3b3622809165f70d83c68db409e2373ea1008e",part:"actions",class:"bs-session-timeout__actions bs-session-timeout__actions--stacked"},o&&s("bs-button",{key:"f03d85c00ce0c18e14e26d2b4332ddb987b93f9e",part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit()},o),n&&s("bs-button",{key:"a9bf95d13955110f7f36561b9acc3c89a5862de5",part:"secondary",class:"bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsSecondary.emit()},n)),s("div",{key:"69ada1eed62f93587b2c2f45aa1d3ea933ba682f",class:"bs-session-timeout__sr-only",role:"status","aria-live":"polite"},this.announcement)))}static get watchers(){return{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}}static get style(){return":host{display:block;width:var(--bs-session-timeout-width);min-width:var(--bs-session-timeout-min-width);max-width:var(--bs-session-timeout-max-width);--bs-session-timeout-width:440px;--bs-session-timeout-min-width:380px;--bs-session-timeout-max-width:560px;--bs-session-timeout-bg:var(--bs-paper-bg-base);--bs-session-timeout-radius:var(--bs-border-radius-150);--bs-session-timeout-padding:var(--bs-spacing-200);--bs-session-timeout-gap:var(--bs-spacing-150);--bs-session-timeout-shadow:0 8px 8px var(--bs-elevation-higher);--bs-session-timeout-color:var(--bs-text-default);--bs-session-timeout-color-secondary:var(--bs-text-secondary);--bs-session-timeout-countdown-bg:var(--bs-surface-container);--bs-session-timeout-countdown-fill:var(--bs-color-warning-default);--bs-session-timeout-countdown-track:var(--bs-surface-hover);--bs-session-timeout-rule:var(--bs-border-default)}.bs-session-timeout{--bs-card-bg:var(--bs-session-timeout-bg);--bs-card-radius:var(--bs-session-timeout-radius);--bs-card-padding:var(--bs-session-timeout-padding);--bs-card-shadow:var(--bs-session-timeout-shadow);color:var(--bs-session-timeout-color)}.bs-session-timeout__body{display:flex;flex-direction:column;align-items:stretch;gap:var(--bs-session-timeout-gap)}bs-icon-tile{align-self:flex-start}.bs-session-timeout__glyph,::slotted([slot='icon']){width:24px;height:24px}.bs-session-timeout__heading-group{display:flex;flex-direction:column;gap:6px}.bs-session-timeout__heading{margin:0;font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:32px}.bs-session-timeout__description{margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-md);line-height:24px}.bs-session-timeout__countdown{display:flex;flex-direction:column;gap:var(--bs-spacing-100);padding:var(--bs-spacing-200);border-radius:var(--bs-border-radius-100);background:var(--bs-session-timeout-countdown-bg)}.bs-session-timeout__countdown bs-progress-linear{--bs-progress-linear-fill:var(--bs-session-timeout-countdown-fill);--bs-progress-linear-track:var(--bs-session-timeout-countdown-track)}.bs-session-timeout__time-row{display:flex;align-items:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__time{font-size:var(--bs-font-size-3xl);font-weight:var(--bs-font-weight-bold);line-height:40px;font-variant-numeric:tabular-nums}.bs-session-timeout__unit{padding-bottom:6px;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved{display:flex;align-items:center;gap:var(--bs-spacing-100);margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved-icon{flex:none;width:16px;height:16px}.bs-session-timeout__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__actions bs-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__block-button{--bs-button-height-md:var(--bs-spacing-550)}.bs-session-timeout__account{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150) var(--bs-spacing-200);border:1px solid var(--bs-session-timeout-rule);border-radius:var(--bs-border-radius-100)}.bs-session-timeout__account-text{display:flex;flex-direction:column;gap:var(--bs-spacing-25);min-width:0;line-height:24px}.bs-session-timeout__account-name{font-weight:var(--bs-font-weight-semibold)}.bs-session-timeout__account-email{overflow-wrap:anywhere}.bs-session-timeout__actions--stacked{flex-direction:column;align-items:stretch;justify-content:flex-start}.bs-session-timeout__block-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__actions--stacked bs-button{--bs-button-width:100%}.bs-session-timeout__text-button{--bs-button-subtle-color:var(--bs-text-action);--bs-button-height-lg:var(--bs-spacing-600)}.bs-session-timeout__password{display:block;--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px);margin-bottom:calc(var(--bs-spacing-200) - var(--bs-session-timeout-gap))}.bs-session-timeout__divider{display:flex;align-items:center;gap:var(--bs-spacing-100);align-self:center;width:320px;max-width:100%;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-xs);line-height:16px}.bs-session-timeout__rule{flex:1 1 0;height:1px;background:var(--bs-session-timeout-rule)}.bs-session-timeout__alternatives{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr));gap:var(--bs-spacing-100)}.bs-session-timeout__sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}"}},[769,"bs-session-timeout",{type:[513],heading:[1],headingLevel:[2,"heading-level"],description:[1],hideIcon:[4,"hide-icon"],primaryLabel:[1,"primary-label"],secondaryLabel:[1,"secondary-label"],secondsLeft:[1026,"seconds-left"],totalSeconds:[2,"total-seconds"],countdown:[4],timeLeftLabel:[1,"time-left-label"],secondsLeftLabel:[1,"seconds-left-label"],savedMessage:[1,"saved-message"],accountName:[1,"account-name"],accountEmail:[1,"account-email"],accountInitials:[1,"account-initials"],passwordLabel:[1,"password-label"],passwordError:[1,"password-error"],dividerLabel:[1,"divider-label"],alternatives:[16],cancelLabel:[1,"cancel-label"],password:[32],announcement:[32],initialTotal:[32]},void 0,{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}]);function g(s){const t=Math.max(0,Math.trunc(Number(s))||0);return`${Math.floor(t/60)}:${function(s){return(s+"").padStart(2,"0")}(t%60)}`}const f=t=>e=>s("svg",{class:"bs-session-timeout__glyph",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",...e},t),v=f(s("g",null,s("circle",{cx:"12",cy:"13.5",r:"7"}),s("path",{d:"M12 10V13.5L14 15"}),s("path",{d:"M9.5 3.5H14.5"}))),_=f(s("g",null,s("rect",{x:"5",y:"10.5",width:"14",height:"9.5",rx:"1.5"}),s("path",{d:"M8.5 10.5V8A3.5 3.5 0 0 1 15.5 8V10.5"}))),y=f(s("g",null,s("path",{d:"M6 10A6 6 0 0 1 18 10"}),s("path",{d:"M9 20C10 18 10 16 10 13A2 2 0 0 1 14 13C14 16 13.5 18.5 12.5 20.5"}),s("path",{d:"M6 13C6 15.5 5.5 17.5 4.5 19.5"}),s("path",{d:"M18 13C18 15.5 17.5 18 16.5 20"}),s("path",{d:"M12 13C12 15 11.5 17 10.8 18.5"}))),w=f(s("g",null,s("circle",{cx:"8",cy:"15",r:"4"}),s("path",{d:"M11 12L19.5 3.5"}),s("path",{d:"M16 7L19 10"}))),x=()=>s("svg",{class:"bs-session-timeout__saved-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","aria-hidden":"true"},s("circle",{cx:"8",cy:"8",r:"6.2"}),s("path",{d:"M8 7.2V11"}),s("path",{d:"M8 5V5.1"})),k={warning:{intent:"warning",heading:"You’ll be signed out soon",description:"For your security, we sign you out after a period without activity.",primary:"Stay signed in",secondary:"Sign out now",glyph:()=>s(v,null)},"signed-out":{intent:"default",heading:"You’ve been signed out",description:"You were inactive for a while. Your work was saved and will be there when you sign in.",primary:"Sign in again",secondary:"Use a different account",glyph:()=>s(_,null)},"confirm-identity":{intent:"default",heading:"Confirm it’s you",description:"This action needs a fresh sign-in.",primary:"Confirm",secondary:"",glyph:()=>s(y,null)}};function C(){"undefined"!=typeof customElements&&["bs-session-timeout","bs-avatar","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-icon-tile","bs-input","bs-menu","bs-menu-item","bs-progress-linear"].forEach((s=>{switch(s){case"bs-session-timeout":customElements.get(t(s))||customElements.define(t(s),p);break;case"bs-avatar":customElements.get(t(s))||n();break;case"bs-button":customElements.get(t(s))||a();break;case"bs-card":customElements.get(t(s))||r();break;case"bs-chip-informative":customElements.get(t(s))||b();break;case"bs-icon-button":customElements.get(t(s))||c();break;case"bs-icon-tile":customElements.get(t(s))||l();break;case"bs-input":customElements.get(t(s))||d();break;case"bs-menu":customElements.get(t(s))||u();break;case"bs-menu-item":customElements.get(t(s))||m();break;case"bs-progress-linear":customElements.get(t(s))||h()}}))}C();const L=p,M=C;export{L as BsSessionTimeout,M as defineCustomElement}
1
+ import{h as s,t,p as e,H as i,c as o}from"./p-CVrEuVFo.js";import{d as n}from"./p-Dr0Qk9Zc.js";import{d as a}from"./p-qmS2CBqi.js";import{d as r}from"./p-CA31vqjL.js";import{d as b}from"./p-DuLL7Ouw.js";import{d as c}from"./p-zTHlbyH6.js";import{d as l}from"./p-CncySD_-.js";import{d}from"./p-BGW5q5LZ.js";import{d as u}from"./p-CeUK3n7D.js";import{d as m}from"./p-C_j_jDM6.js";import{d as h}from"./p-CbimDNGY.js";const p=e(class extends i{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsPrimary=o(this,"bsPrimary"),this.bsSecondary=o(this,"bsSecondary"),this.bsAlternative=o(this,"bsAlternative"),this.bsCancel=o(this,"bsCancel"),this.bsExpire=o(this,"bsExpire")}get el(){return this}type="warning";heading;headingLevel=2;description;hideIcon=!1;primaryLabel;secondaryLabel;secondsLeft=0;totalSeconds=0;countdown=!1;timeLeftLabel="minutes left";secondsLeftLabel="seconds left";savedMessage;accountName;accountEmail;accountInitials;passwordLabel="Password";passwordError;dividerLabel="or";alternatives=[{id:"passkey",label:"Use passkey",icon:"fingerprint"},{id:"bankid",label:"Use BankID",icon:"key"}];cancelLabel="Cancel";bsPrimary;bsSecondary;bsAlternative;bsCancel;bsExpire;password="";announcement="";initialTotal=0;timer;componentWillLoad(){this.initialTotal=this.secondsLeft}componentDidLoad(){this.syncTimer()}disconnectedCallback(){this.stopTimer()}connectedCallback(){void 0===this.timer&&this.el.isConnected&&this.syncTimer()}onTimerInputsChange(){this.syncTimer()}stopTimer(){void 0!==this.timer&&clearInterval(this.timer),this.timer=void 0}syncTimer(){this.stopTimer(),!this.countdown||"warning"!==this.type||this.secondsLeft<=0||(this.timer=setInterval((()=>this.tick()),1e3))}tick(){this.secondsLeft<=0||(this.secondsLeft=this.secondsLeft-1,[60,30,10].includes(this.secondsLeft)&&(this.announcement=`${g(this.secondsLeft)} ${this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel}`),this.secondsLeft<=0&&(this.stopTimer(),this.bsExpire.emit()))}get defaults(){return k[this.type]??k.warning}renderHeading(t,e){const i=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||2));return s("div",{class:"bs-session-timeout__heading-group"},s("h"+i,{part:"heading",id:"heading",class:{"bs-session-timeout__heading":!0}},t),e&&s("p",{part:"description",class:"bs-session-timeout__description"},e))}renderWarning(){const t=this.totalSeconds>0?this.totalSeconds:this.initialTotal||this.secondsLeft,e=t>0?Math.max(0,Math.min(100,this.secondsLeft/t*100)):0,i=this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel;return s("div",{part:"countdown",class:"bs-session-timeout__countdown"},s("div",{class:"bs-session-timeout__time-row"},s("span",{part:"time",class:"bs-session-timeout__time",role:"timer"},g(this.secondsLeft)),s("span",{class:"bs-session-timeout__unit"},i)),s("bs-progress-linear",{type:"determinate",size:"large",value:e,showLabel:!1,ariaLabel:`${g(this.secondsLeft)} ${i}`}))}renderAccount(){const t=this.accountName??"",e=this.accountInitials??t.split(/\s+/).filter(Boolean).slice(0,2).map((s=>s[0].toUpperCase())).join("");return t||this.accountEmail?s("div",{part:"account",class:"bs-session-timeout__account"},s("bs-avatar",{type:"initials",size:"lg",initials:e,ariaLabel:t||this.accountEmail}),s("div",{class:"bs-session-timeout__account-text"},t&&s("span",{class:"bs-session-timeout__account-name"},t),this.accountEmail&&s("span",{class:"bs-session-timeout__account-email"},this.accountEmail))):null}renderConfirm(){const t=this.alternatives??[];return[s("bs-input",{part:"password",class:"bs-session-timeout__password",type:"password",label:this.passwordLabel,value:this.password,error:this.passwordError,onBsInput:s=>this.password=s.detail,onBsChange:s=>this.password=s.detail}),s("bs-button",{part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit({password:this.password})},this.primaryLabel??this.defaults.primary),t.length>0&&s("div",{part:"divider",class:"bs-session-timeout__divider",role:"separator"},s("span",{class:"bs-session-timeout__rule"}),s("span",{class:"bs-session-timeout__divider-label"},this.dividerLabel),s("span",{class:"bs-session-timeout__rule"})),t.length>0&&s("div",{part:"alternatives",class:"bs-session-timeout__alternatives"},t.map((t=>s("bs-button",{key:t.id,variant:"outlined",onClick:()=>this.bsAlternative.emit({id:t.id})},s("key"===t.icon?w:y,{slot:"icon"}),t.label)))),this.cancelLabel&&s("bs-button",{part:"cancel",class:"bs-session-timeout__block-button bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsCancel.emit()},this.cancelLabel)]}render(){const t=this.defaults,e=this.heading??t.heading,i=this.description??t.description,o=this.primaryLabel??t.primary,n=this.secondaryLabel??t.secondary;return s("bs-card",{key:"45a056eabc2f536128ee6adbc6104d76793301f4",part:"container",class:"bs-session-timeout",surface:"base",role:"region","aria-labelledby":"heading"},s("div",{key:"035795cb4b5b0252212270236f048e3216d5d401",class:"bs-session-timeout__body"},!this.hideIcon&&s("bs-icon-tile",{key:"857db99f58d07483d3c7dadd95e5951a645d0c59",part:"art",intent:t.intent,size:"lg"},s("slot",{key:"41504daf4751677d9b1df0d211e719d8f441f5b2",name:"icon"},t.glyph())),this.renderHeading(e,i),"warning"===this.type&&this.renderWarning(),"warning"===this.type&&this.savedMessage&&s("p",{key:"8ba10b3921db4b3cedbeb3d45bddfb89425bbdbb",part:"saved",class:"bs-session-timeout__saved"},s(x,{key:"44ea938fca553c67ae23628833471ceb98e63b06"}),s("span",{key:"672ebc96828437ffbc67711082fd7018611153b7"},this.savedMessage)),"signed-out"===this.type&&this.renderAccount(),"confirm-identity"===this.type&&this.renderConfirm(),"warning"===this.type&&(o||n)&&s("div",{key:"94221156fe30010bd0fbe4fb0146c95feceab50f",part:"actions",class:"bs-session-timeout__actions"},n&&s("bs-button",{key:"09b14d30bc185a4644902e52100f0493da6109a0",part:"secondary",variant:"outlined",onClick:()=>this.bsSecondary.emit()},n),o&&s("bs-button",{key:"be381ed4be453efd306b28da3e1f4b7f0740c024",part:"primary",variant:"primary",onClick:()=>this.bsPrimary.emit()},o)),"signed-out"===this.type&&(o||n)&&s("div",{key:"6b3b3622809165f70d83c68db409e2373ea1008e",part:"actions",class:"bs-session-timeout__actions bs-session-timeout__actions--stacked"},o&&s("bs-button",{key:"f03d85c00ce0c18e14e26d2b4332ddb987b93f9e",part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit()},o),n&&s("bs-button",{key:"a9bf95d13955110f7f36561b9acc3c89a5862de5",part:"secondary",class:"bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsSecondary.emit()},n)),s("div",{key:"69ada1eed62f93587b2c2f45aa1d3ea933ba682f",class:"bs-session-timeout__sr-only",role:"status","aria-live":"polite"},this.announcement)))}static get watchers(){return{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}}static get style(){return":host{display:block;width:var(--bs-session-timeout-width);min-width:var(--bs-session-timeout-min-width);max-width:var(--bs-session-timeout-max-width);--bs-session-timeout-width:440px;--bs-session-timeout-min-width:380px;--bs-session-timeout-max-width:560px;--bs-session-timeout-bg:var(--bs-paper-bg-base);--bs-session-timeout-radius:var(--bs-border-radius-150);--bs-session-timeout-padding:var(--bs-spacing-200);--bs-session-timeout-gap:var(--bs-spacing-150);--bs-session-timeout-shadow:0 8px 8px var(--bs-elevation-higher);--bs-session-timeout-color:var(--bs-text-default);--bs-session-timeout-color-secondary:var(--bs-text-secondary);--bs-session-timeout-countdown-bg:var(--bs-surface-container);--bs-session-timeout-countdown-fill:var(--bs-color-warning-default);--bs-session-timeout-countdown-track:var(--bs-surface-hover);--bs-session-timeout-rule:var(--bs-border-default)}.bs-session-timeout{--bs-card-bg:var(--bs-session-timeout-bg);--bs-card-radius:var(--bs-session-timeout-radius);--bs-card-padding:var(--bs-session-timeout-padding);--bs-card-shadow:var(--bs-session-timeout-shadow);color:var(--bs-session-timeout-color)}.bs-session-timeout__body{display:flex;flex-direction:column;align-items:stretch;gap:var(--bs-session-timeout-gap)}bs-icon-tile{align-self:flex-start}.bs-session-timeout__glyph,::slotted([slot='icon']){width:24px;height:24px}.bs-session-timeout__heading-group{display:flex;flex-direction:column;gap:6px}.bs-session-timeout__heading{margin:0;font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:32px}.bs-session-timeout__description{margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-md);line-height:24px}.bs-session-timeout__countdown{display:flex;flex-direction:column;gap:var(--bs-spacing-100);padding:var(--bs-spacing-200);border-radius:var(--bs-border-radius-100);background:var(--bs-session-timeout-countdown-bg)}.bs-session-timeout__countdown bs-progress-linear{--bs-progress-linear-fill:var(--bs-session-timeout-countdown-fill);--bs-progress-linear-track:var(--bs-session-timeout-countdown-track)}.bs-session-timeout__time-row{display:flex;align-items:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__time{font-size:var(--bs-font-size-3xl);font-weight:var(--bs-font-weight-bold);line-height:40px;font-variant-numeric:tabular-nums}.bs-session-timeout__unit{padding-bottom:6px;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved{display:flex;align-items:center;gap:var(--bs-spacing-100);margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved-icon{flex:none;width:16px;height:16px}.bs-session-timeout__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__actions bs-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__block-button{--bs-button-height-md:var(--bs-spacing-550)}.bs-session-timeout__account{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150) var(--bs-spacing-200);border:1px solid var(--bs-session-timeout-rule);border-radius:var(--bs-border-radius-100)}.bs-session-timeout__account-text{display:flex;flex-direction:column;gap:var(--bs-spacing-25);min-width:0;line-height:24px}.bs-session-timeout__account-name{font-weight:var(--bs-font-weight-semibold)}.bs-session-timeout__account-email{overflow-wrap:anywhere}.bs-session-timeout__actions--stacked{flex-direction:column;align-items:stretch;justify-content:flex-start}.bs-session-timeout__block-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__actions--stacked bs-button{--bs-button-width:100%}.bs-session-timeout__text-button{--bs-button-subtle-color:var(--bs-text-action);--bs-button-height-lg:var(--bs-spacing-600)}.bs-session-timeout__password{display:block;--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px);margin-bottom:calc(var(--bs-spacing-200) - var(--bs-session-timeout-gap))}.bs-session-timeout__divider{display:flex;align-items:center;gap:var(--bs-spacing-100);align-self:center;width:320px;max-width:100%;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-xs);line-height:16px}.bs-session-timeout__rule{flex:1 1 0;height:1px;background:var(--bs-session-timeout-rule)}.bs-session-timeout__alternatives{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr));gap:var(--bs-spacing-100)}.bs-session-timeout__sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}"}},[769,"bs-session-timeout",{type:[513],heading:[1],headingLevel:[2,"heading-level"],description:[1],hideIcon:[4,"hide-icon"],primaryLabel:[1,"primary-label"],secondaryLabel:[1,"secondary-label"],secondsLeft:[1026,"seconds-left"],totalSeconds:[2,"total-seconds"],countdown:[4],timeLeftLabel:[1,"time-left-label"],secondsLeftLabel:[1,"seconds-left-label"],savedMessage:[1,"saved-message"],accountName:[1,"account-name"],accountEmail:[1,"account-email"],accountInitials:[1,"account-initials"],passwordLabel:[1,"password-label"],passwordError:[1,"password-error"],dividerLabel:[1,"divider-label"],alternatives:[16],cancelLabel:[1,"cancel-label"],password:[32],announcement:[32],initialTotal:[32]},void 0,{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}]);function g(s){const t=Math.max(0,Math.trunc(Number(s))||0);return`${Math.floor(t/60)}:${function(s){return(s+"").padStart(2,"0")}(t%60)}`}const f=t=>e=>s("svg",{class:"bs-session-timeout__glyph",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",...e},t),v=f(s("g",null,s("circle",{cx:"12",cy:"13.5",r:"7"}),s("path",{d:"M12 10V13.5L14 15"}),s("path",{d:"M9.5 3.5H14.5"}))),_=f(s("g",null,s("rect",{x:"5",y:"10.5",width:"14",height:"9.5",rx:"1.5"}),s("path",{d:"M8.5 10.5V8A3.5 3.5 0 0 1 15.5 8V10.5"}))),y=f(s("g",null,s("path",{d:"M6 10A6 6 0 0 1 18 10"}),s("path",{d:"M9 20C10 18 10 16 10 13A2 2 0 0 1 14 13C14 16 13.5 18.5 12.5 20.5"}),s("path",{d:"M6 13C6 15.5 5.5 17.5 4.5 19.5"}),s("path",{d:"M18 13C18 15.5 17.5 18 16.5 20"}),s("path",{d:"M12 13C12 15 11.5 17 10.8 18.5"}))),w=f(s("g",null,s("circle",{cx:"8",cy:"15",r:"4"}),s("path",{d:"M11 12L19.5 3.5"}),s("path",{d:"M16 7L19 10"}))),x=()=>s("svg",{class:"bs-session-timeout__saved-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","aria-hidden":"true"},s("circle",{cx:"8",cy:"8",r:"6.2"}),s("path",{d:"M8 7.2V11"}),s("path",{d:"M8 5V5.1"})),k={warning:{intent:"warning",heading:"You’ll be signed out soon",description:"For your security, we sign you out after a period without activity.",primary:"Stay signed in",secondary:"Sign out now",glyph:()=>s(v,null)},"signed-out":{intent:"default",heading:"You’ve been signed out",description:"You were inactive for a while. Your work was saved and will be there when you sign in.",primary:"Sign in again",secondary:"Use a different account",glyph:()=>s(_,null)},"confirm-identity":{intent:"default",heading:"Confirm it’s you",description:"This action needs a fresh sign-in.",primary:"Confirm",secondary:"",glyph:()=>s(y,null)}};function C(){"undefined"!=typeof customElements&&["bs-session-timeout","bs-avatar","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-icon-tile","bs-input","bs-menu","bs-menu-item","bs-progress-linear"].forEach((s=>{switch(s){case"bs-session-timeout":customElements.get(t(s))||customElements.define(t(s),p);break;case"bs-avatar":customElements.get(t(s))||n();break;case"bs-button":customElements.get(t(s))||a();break;case"bs-card":customElements.get(t(s))||r();break;case"bs-chip-informative":customElements.get(t(s))||b();break;case"bs-icon-button":customElements.get(t(s))||c();break;case"bs-icon-tile":customElements.get(t(s))||l();break;case"bs-input":customElements.get(t(s))||d();break;case"bs-menu":customElements.get(t(s))||u();break;case"bs-menu-item":customElements.get(t(s))||m();break;case"bs-progress-linear":customElements.get(t(s))||h()}}))}C();const L=p,M=C;export{L as BsSessionTimeout,M as defineCustomElement}
@@ -1 +1 @@
1
- import{t as e,p as i,H as t,c as s,h as r}from"./p-CVrEuVFo.js";import{d as a}from"./p-qmS2CBqi.js";import{d as c}from"./p-CA31vqjL.js";import{d as n}from"./p-DuLL7Ouw.js";import{d as o}from"./p-zTHlbyH6.js";import{d as b}from"./p-BUskqBR6.js";import{d as l}from"./p-CeUK3n7D.js";import{d as p}from"./p-C_j_jDM6.js";import{d}from"./p-Bl_tVzeq.js";const m=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.bsCancel=s(this,"bsCancel"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";typed="";name;value="";format="12h";minuteStep=1;heading="Select Time";formatLabel="24h";confirmLabel="Confirm";cancelLabel="Cancel";hourLabel="Hour";minuteLabel="Minute";periodLabel="AM/PM";bsChange;bsCancel;hour=0;minute=0;componentWillLoad(){this.initialValue=this.value,this.resetDraft(),this.syncFormValue()}onValueChange(){this.resetDraft(),this.syncFormValue()}onNameChange(){this.syncFormValue()}formResetCallback(){this.value=this.initialValue}resetDraft(){const e=function(e){const i=/^(\d{1,2}):(\d{2})$/.exec((e??"").trim());if(!i)return;const t=Number(i[1]),s=Number(i[2]);return t<=23&&s<=59?{hour:t,minute:s}:void 0}(this.value);this.hour=e?e.hour:0,this.minute=e?e.minute:0}syncFormValue(){this.internals?.setFormValue&&this.internals.setFormValue(this.value??"")}get step(){const e=Math.trunc(Number(this.minuteStep));return Number.isFinite(e)&&e>=1&&e<=59?e:1}get is12h(){return"24h"!==this.format}get isPm(){return this.hour>=12}shown(e){return"minute"===e?this.minute:this.is12h?this.hour%12||12:this.hour}bounds(e){return"minute"===e?[0,59]:this.is12h?[1,12]:[0,23]}setShown(e,i){"minute"===e?this.minute=i:this.hour=this.is12h?i%12+(this.isPm?12:0):i}stepBy(e,i){const[t,s]=this.bounds(e),r=s-t+1,a="minute"===e?this.step:1;let c=this.shown(e)+i*a;if("minute"===e){const t=this.shown(e);c=1===i?Math.floor(t/a)*a+a:Math.ceil(t/a)*a-a}this.setShown(e,((c-t)%r+r)%r+t)}onKeyDown=e=>i=>{const[t,s]=this.bounds(e);if("ArrowUp"===i.key)this.stepBy(e,1);else if("ArrowDown"===i.key)this.stepBy(e,-1);else if("Home"===i.key)this.setShown(e,t);else{if("End"!==i.key){if(/^\d$/.test(i.key)){const r=Number((this.typed+i.key).slice(-2));if(this.typed=(this.typed+i.key).slice(-2),r>=t&&r<=s)this.setShown(e,r);else{this.typed=i.key;const r=Number(i.key);r>=t&&r<=s&&this.setShown(e,r)}return 2===this.typed.length&&(this.typed=""),void i.preventDefault()}return}this.setShown(e,s)}this.typed="",i.preventDefault()};confirm=()=>{const e=`${h(this.hour)}:${h(this.minute)}`;this.value=e,this.bsChange.emit({value:e})};cancel=()=>{this.resetDraft(),this.bsCancel.emit()};renderColumn(e,i){const[t,s]=this.bounds(e),a=this.shown(e),c=e=>`${e} ${i.toLowerCase()}`;return r("div",{part:"spinner",class:"bs-timepicker__spinner"},r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Increase"),tabindex:-1,onClick:()=>this.stepBy(e,1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M18 15L12 9L6 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),r("div",{part:"value",class:"bs-timepicker__value",role:"spinbutton",tabindex:0,"aria-label":i,"aria-valuemin":t,"aria-valuemax":s,"aria-valuenow":a,"aria-valuetext":h(a),onKeyDown:this.onKeyDown(e),onBlur:()=>this.typed=""},h(a)),r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Decrease"),tabindex:-1,onClick:()=>this.stepBy(e,-1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M6 9L12 15L18 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))}render(){return r("bs-card",{key:"e0545d99e052005bcad5509f81505f628adb5dc4",part:"container",class:"bs-timepicker",surface:"raised"},r("div",{key:"664c7184dcefe5c63f03afad3953787cbc3064cc",class:"bs-timepicker__body"},r("div",{key:"602d4f0ca6975b22daa7c7a37a6d53a259c39768",part:"header",class:"bs-timepicker__header"},r("div",{key:"1650464c84e066f14f6343f18f779e35932535c3",part:"title",class:"bs-timepicker__title"},this.heading),r("label",{key:"debc6155ccf39b90f281d49240203d642fb5039d",class:"bs-timepicker__format"},r("span",{key:"147a6d85b4f0922b5c7d96ebef88b3c70d1fbe05"},this.formatLabel),r("bs-switch",{key:"ddb0be1751ce8246acbfd6c187e66fb6bc878cd5",part:"format-toggle",size:"md",ariaLabel:this.formatLabel,checked:!this.is12h,onBsChange:e=>this.format=e.detail?"24h":"12h"}))),r("div",{key:"35f13bd74133f2c1109df96aafdc456178e4a32f",class:"bs-timepicker__divider"}),r("div",{key:"9c979a8d3300a8f5dba7d8df784dc8ef691a40a6",part:"selector",class:"bs-timepicker__selector"},this.renderColumn("hour",this.hourLabel),r("div",{key:"5b4af0371fd816067b92854da2b35e5a7de8e4ea",part:"separator",class:"bs-timepicker__separator","aria-hidden":"true"},r("svg",{key:"a70450b5068add559c48e795ce6aca204b30d02d",viewBox:"0 0 4 32",fill:"currentColor"},r("circle",{key:"26a760f4d4712eca3df48b97bde276ce241511d5",cx:"2",cy:"10",r:"2"}),r("circle",{key:"3c6eb56e2736353dc5e5bc4a1d6ef64242f6a367",cx:"2",cy:"22",r:"2"}))),this.renderColumn("minute",this.minuteLabel),this.is12h&&r("bs-input",{key:"948e724c331008bbd00fd84c516d02e919e622e1",part:"period",class:"bs-timepicker__period",type:"dropdown",label:this.periodLabel,value:this.isPm?"PM":"AM",options:[{label:"AM",value:"AM"},{label:"PM",value:"PM"}],onBsChange:e=>{"PM"===e.detail!==this.isPm&&(this.hour=(this.hour+12)%24)}})),r("div",{key:"08b57e8c0b895e272d98386fe5b2ac2e55a87de0",class:"bs-timepicker__divider"}),r("div",{key:"5b1af1da10c4333ef6b826eaafd75fa12ef2e785",part:"footer",class:"bs-timepicker__footer"},r("bs-button",{key:"ad24615dbe6ae46e00ca558f71cee030504573a5",part:"cancel",variant:"subtle",onClick:this.cancel},this.cancelLabel),r("bs-button",{key:"f76cd192e1e7e0bb524080cf54a655c5b4508a3c",part:"confirm",variant:"primary",onClick:this.confirm},this.confirmLabel))))}static get formAssociated(){return!0}static get watchers(){return{value:[{onValueChange:0}],name:[{onNameChange:0}]}}static get style(){return":host{display:inline-block;--bs-timepicker-width:294px;--bs-timepicker-bg:var(--bs-paper-bg-raised);--bs-timepicker-radius:var(--bs-border-radius-100);--bs-timepicker-padding-y:var(--bs-spacing-200);--bs-timepicker-padding-x:var(--bs-spacing-200);--bs-timepicker-gap:var(--bs-spacing-200);--bs-timepicker-shadow:var(--bs-shadow-md);--bs-timepicker-title-size:var(--bs-font-size-2xl);--bs-timepicker-title-line-height:var(--bs-line-height-heading-h6);--bs-timepicker-color:var(--bs-text-default);--bs-timepicker-color-secondary:var(--bs-text-secondary);--bs-timepicker-divider:var(--bs-border-neutral-container);--bs-timepicker-cell-size:var(--bs-spacing-550);--bs-timepicker-cell-radius:var(--bs-border-radius-100);--bs-timepicker-value-radius:var(--bs-border-radius-50);--bs-timepicker-hover:var(--bs-surface-hover);--bs-timepicker-pressed:var(--bs-surface-pressed);--bs-timepicker-focus-ring-color:var(--bs-border-neutral-container-focused)}.bs-timepicker{width:var(--bs-timepicker-width);max-width:100%;color:var(--bs-timepicker-color);font-size:var(--bs-font-size-md);--bs-card-bg:var(--bs-timepicker-bg);--bs-card-radius:var(--bs-timepicker-radius);--bs-card-padding:var(--bs-timepicker-padding-y) 0;--bs-card-shadow:var(--bs-timepicker-shadow);--bs-card-overflow:visible}.bs-timepicker__body{display:flex;flex-direction:column;gap:var(--bs-timepicker-gap)}.bs-timepicker__header{display:flex;align-items:center;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__title{flex:1 1 0;min-width:0;font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px)}.bs-timepicker__format{display:flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-timepicker-color-secondary);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-timepicker__divider{height:1px;background:var(--bs-timepicker-divider)}.bs-timepicker__selector{display:flex;align-items:center;justify-content:center;gap:var(--bs-spacing-200);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__spinner{display:flex;flex-direction:column;align-items:center;gap:var(--bs-spacing-100);width:var(--bs-timepicker-cell-size)}.bs-timepicker__step,.bs-timepicker__value{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-timepicker-cell-size);height:var(--bs-timepicker-cell-size);padding:0;border:none;background:transparent;font-family:inherit}.bs-timepicker__step{border-radius:var(--bs-timepicker-cell-radius);color:var(--bs-timepicker-color-secondary);cursor:pointer}.bs-timepicker__step svg{width:24px;height:24px}.bs-timepicker__value{border-radius:var(--bs-timepicker-value-radius);color:var(--bs-timepicker-color);font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px);font-variant-numeric:tabular-nums;cursor:pointer;user-select:none}.bs-timepicker__step:hover,.bs-timepicker__value:hover{background:var(--bs-timepicker-hover)}.bs-timepicker__step:active,.bs-timepicker__value:active{background:var(--bs-timepicker-pressed)}.bs-timepicker__step:focus-visible,.bs-timepicker__value:focus-visible{outline:2px solid var(--bs-timepicker-focus-ring-color);outline-offset:0}.bs-timepicker__separator{display:flex;align-items:center;color:var(--bs-timepicker-color)}.bs-timepicker__separator svg{width:4px;height:32px}.bs-timepicker__period::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-timepicker__period{width:112px}.bs-timepicker__period::part(control){caret-color:transparent;cursor:pointer;text-overflow:clip}.bs-timepicker__footer{display:flex;align-items:flex-start;justify-content:flex-end;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}"}},[577,"bs-timepicker",{name:[513],value:[1537],format:[1537],minuteStep:[2,"minute-step"],heading:[1],formatLabel:[1,"format-label"],confirmLabel:[1,"confirm-label"],cancelLabel:[1,"cancel-label"],hourLabel:[1,"hour-label"],minuteLabel:[1,"minute-label"],periodLabel:[1,"period-label"],hour:[32],minute:[32]},void 0,{value:[{onValueChange:0}],name:[{onNameChange:0}]}]);function h(e){return(e+"").padStart(2,"0")}function u(){"undefined"!=typeof customElements&&["bs-timepicker","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item","bs-switch"].forEach((i=>{switch(i){case"bs-timepicker":customElements.get(e(i))||customElements.define(e(i),m);break;case"bs-button":customElements.get(e(i))||a();break;case"bs-card":customElements.get(e(i))||c();break;case"bs-chip-informative":customElements.get(e(i))||n();break;case"bs-icon-button":customElements.get(e(i))||o();break;case"bs-input":customElements.get(e(i))||b();break;case"bs-menu":customElements.get(e(i))||l();break;case"bs-menu-item":customElements.get(e(i))||p();break;case"bs-switch":customElements.get(e(i))||d()}}))}u();const k=m,f=u;export{k as BsTimepicker,f as defineCustomElement}
1
+ import{t as e,p as i,H as t,c as s,h as r}from"./p-CVrEuVFo.js";import{d as a}from"./p-qmS2CBqi.js";import{d as c}from"./p-CA31vqjL.js";import{d as n}from"./p-DuLL7Ouw.js";import{d as o}from"./p-zTHlbyH6.js";import{d as b}from"./p-BGW5q5LZ.js";import{d as l}from"./p-CeUK3n7D.js";import{d as p}from"./p-C_j_jDM6.js";import{d}from"./p-Bl_tVzeq.js";const m=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.bsCancel=s(this,"bsCancel"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";typed="";name;value="";format="12h";minuteStep=1;heading="Select Time";formatLabel="24h";confirmLabel="Confirm";cancelLabel="Cancel";hourLabel="Hour";minuteLabel="Minute";periodLabel="AM/PM";bsChange;bsCancel;hour=0;minute=0;componentWillLoad(){this.initialValue=this.value,this.resetDraft(),this.syncFormValue()}onValueChange(){this.resetDraft(),this.syncFormValue()}onNameChange(){this.syncFormValue()}formResetCallback(){this.value=this.initialValue}resetDraft(){const e=function(e){const i=/^(\d{1,2}):(\d{2})$/.exec((e??"").trim());if(!i)return;const t=Number(i[1]),s=Number(i[2]);return t<=23&&s<=59?{hour:t,minute:s}:void 0}(this.value);this.hour=e?e.hour:0,this.minute=e?e.minute:0}syncFormValue(){this.internals?.setFormValue&&this.internals.setFormValue(this.value??"")}get step(){const e=Math.trunc(Number(this.minuteStep));return Number.isFinite(e)&&e>=1&&e<=59?e:1}get is12h(){return"24h"!==this.format}get isPm(){return this.hour>=12}shown(e){return"minute"===e?this.minute:this.is12h?this.hour%12||12:this.hour}bounds(e){return"minute"===e?[0,59]:this.is12h?[1,12]:[0,23]}setShown(e,i){"minute"===e?this.minute=i:this.hour=this.is12h?i%12+(this.isPm?12:0):i}stepBy(e,i){const[t,s]=this.bounds(e),r=s-t+1,a="minute"===e?this.step:1;let c=this.shown(e)+i*a;if("minute"===e){const t=this.shown(e);c=1===i?Math.floor(t/a)*a+a:Math.ceil(t/a)*a-a}this.setShown(e,((c-t)%r+r)%r+t)}onKeyDown=e=>i=>{const[t,s]=this.bounds(e);if("ArrowUp"===i.key)this.stepBy(e,1);else if("ArrowDown"===i.key)this.stepBy(e,-1);else if("Home"===i.key)this.setShown(e,t);else{if("End"!==i.key){if(/^\d$/.test(i.key)){const r=Number((this.typed+i.key).slice(-2));if(this.typed=(this.typed+i.key).slice(-2),r>=t&&r<=s)this.setShown(e,r);else{this.typed=i.key;const r=Number(i.key);r>=t&&r<=s&&this.setShown(e,r)}return 2===this.typed.length&&(this.typed=""),void i.preventDefault()}return}this.setShown(e,s)}this.typed="",i.preventDefault()};confirm=()=>{const e=`${h(this.hour)}:${h(this.minute)}`;this.value=e,this.bsChange.emit({value:e})};cancel=()=>{this.resetDraft(),this.bsCancel.emit()};renderColumn(e,i){const[t,s]=this.bounds(e),a=this.shown(e),c=e=>`${e} ${i.toLowerCase()}`;return r("div",{part:"spinner",class:"bs-timepicker__spinner"},r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Increase"),tabindex:-1,onClick:()=>this.stepBy(e,1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M18 15L12 9L6 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),r("div",{part:"value",class:"bs-timepicker__value",role:"spinbutton",tabindex:0,"aria-label":i,"aria-valuemin":t,"aria-valuemax":s,"aria-valuenow":a,"aria-valuetext":h(a),onKeyDown:this.onKeyDown(e),onBlur:()=>this.typed=""},h(a)),r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Decrease"),tabindex:-1,onClick:()=>this.stepBy(e,-1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M6 9L12 15L18 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))}render(){return r("bs-card",{key:"e0545d99e052005bcad5509f81505f628adb5dc4",part:"container",class:"bs-timepicker",surface:"raised"},r("div",{key:"664c7184dcefe5c63f03afad3953787cbc3064cc",class:"bs-timepicker__body"},r("div",{key:"602d4f0ca6975b22daa7c7a37a6d53a259c39768",part:"header",class:"bs-timepicker__header"},r("div",{key:"1650464c84e066f14f6343f18f779e35932535c3",part:"title",class:"bs-timepicker__title"},this.heading),r("label",{key:"debc6155ccf39b90f281d49240203d642fb5039d",class:"bs-timepicker__format"},r("span",{key:"147a6d85b4f0922b5c7d96ebef88b3c70d1fbe05"},this.formatLabel),r("bs-switch",{key:"ddb0be1751ce8246acbfd6c187e66fb6bc878cd5",part:"format-toggle",size:"md",ariaLabel:this.formatLabel,checked:!this.is12h,onBsChange:e=>this.format=e.detail?"24h":"12h"}))),r("div",{key:"35f13bd74133f2c1109df96aafdc456178e4a32f",class:"bs-timepicker__divider"}),r("div",{key:"9c979a8d3300a8f5dba7d8df784dc8ef691a40a6",part:"selector",class:"bs-timepicker__selector"},this.renderColumn("hour",this.hourLabel),r("div",{key:"5b4af0371fd816067b92854da2b35e5a7de8e4ea",part:"separator",class:"bs-timepicker__separator","aria-hidden":"true"},r("svg",{key:"a70450b5068add559c48e795ce6aca204b30d02d",viewBox:"0 0 4 32",fill:"currentColor"},r("circle",{key:"26a760f4d4712eca3df48b97bde276ce241511d5",cx:"2",cy:"10",r:"2"}),r("circle",{key:"3c6eb56e2736353dc5e5bc4a1d6ef64242f6a367",cx:"2",cy:"22",r:"2"}))),this.renderColumn("minute",this.minuteLabel),this.is12h&&r("bs-input",{key:"948e724c331008bbd00fd84c516d02e919e622e1",part:"period",class:"bs-timepicker__period",type:"dropdown",label:this.periodLabel,value:this.isPm?"PM":"AM",options:[{label:"AM",value:"AM"},{label:"PM",value:"PM"}],onBsChange:e=>{"PM"===e.detail!==this.isPm&&(this.hour=(this.hour+12)%24)}})),r("div",{key:"08b57e8c0b895e272d98386fe5b2ac2e55a87de0",class:"bs-timepicker__divider"}),r("div",{key:"5b1af1da10c4333ef6b826eaafd75fa12ef2e785",part:"footer",class:"bs-timepicker__footer"},r("bs-button",{key:"ad24615dbe6ae46e00ca558f71cee030504573a5",part:"cancel",variant:"subtle",onClick:this.cancel},this.cancelLabel),r("bs-button",{key:"f76cd192e1e7e0bb524080cf54a655c5b4508a3c",part:"confirm",variant:"primary",onClick:this.confirm},this.confirmLabel))))}static get formAssociated(){return!0}static get watchers(){return{value:[{onValueChange:0}],name:[{onNameChange:0}]}}static get style(){return":host{display:inline-block;--bs-timepicker-width:294px;--bs-timepicker-bg:var(--bs-paper-bg-raised);--bs-timepicker-radius:var(--bs-border-radius-100);--bs-timepicker-padding-y:var(--bs-spacing-200);--bs-timepicker-padding-x:var(--bs-spacing-200);--bs-timepicker-gap:var(--bs-spacing-200);--bs-timepicker-shadow:var(--bs-shadow-md);--bs-timepicker-title-size:var(--bs-font-size-2xl);--bs-timepicker-title-line-height:var(--bs-line-height-heading-h6);--bs-timepicker-color:var(--bs-text-default);--bs-timepicker-color-secondary:var(--bs-text-secondary);--bs-timepicker-divider:var(--bs-border-neutral-container);--bs-timepicker-cell-size:var(--bs-spacing-550);--bs-timepicker-cell-radius:var(--bs-border-radius-100);--bs-timepicker-value-radius:var(--bs-border-radius-50);--bs-timepicker-hover:var(--bs-surface-hover);--bs-timepicker-pressed:var(--bs-surface-pressed);--bs-timepicker-focus-ring-color:var(--bs-border-neutral-container-focused)}.bs-timepicker{width:var(--bs-timepicker-width);max-width:100%;color:var(--bs-timepicker-color);font-size:var(--bs-font-size-md);--bs-card-bg:var(--bs-timepicker-bg);--bs-card-radius:var(--bs-timepicker-radius);--bs-card-padding:var(--bs-timepicker-padding-y) 0;--bs-card-shadow:var(--bs-timepicker-shadow);--bs-card-overflow:visible}.bs-timepicker__body{display:flex;flex-direction:column;gap:var(--bs-timepicker-gap)}.bs-timepicker__header{display:flex;align-items:center;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__title{flex:1 1 0;min-width:0;font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px)}.bs-timepicker__format{display:flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-timepicker-color-secondary);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-timepicker__divider{height:1px;background:var(--bs-timepicker-divider)}.bs-timepicker__selector{display:flex;align-items:center;justify-content:center;gap:var(--bs-spacing-200);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__spinner{display:flex;flex-direction:column;align-items:center;gap:var(--bs-spacing-100);width:var(--bs-timepicker-cell-size)}.bs-timepicker__step,.bs-timepicker__value{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-timepicker-cell-size);height:var(--bs-timepicker-cell-size);padding:0;border:none;background:transparent;font-family:inherit}.bs-timepicker__step{border-radius:var(--bs-timepicker-cell-radius);color:var(--bs-timepicker-color-secondary);cursor:pointer}.bs-timepicker__step svg{width:24px;height:24px}.bs-timepicker__value{border-radius:var(--bs-timepicker-value-radius);color:var(--bs-timepicker-color);font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px);font-variant-numeric:tabular-nums;cursor:pointer;user-select:none}.bs-timepicker__step:hover,.bs-timepicker__value:hover{background:var(--bs-timepicker-hover)}.bs-timepicker__step:active,.bs-timepicker__value:active{background:var(--bs-timepicker-pressed)}.bs-timepicker__step:focus-visible,.bs-timepicker__value:focus-visible{outline:2px solid var(--bs-timepicker-focus-ring-color);outline-offset:0}.bs-timepicker__separator{display:flex;align-items:center;color:var(--bs-timepicker-color)}.bs-timepicker__separator svg{width:4px;height:32px}.bs-timepicker__period::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-timepicker__period{width:112px}.bs-timepicker__period::part(control){caret-color:transparent;cursor:pointer;text-overflow:clip}.bs-timepicker__footer{display:flex;align-items:flex-start;justify-content:flex-end;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}"}},[577,"bs-timepicker",{name:[513],value:[1537],format:[1537],minuteStep:[2,"minute-step"],heading:[1],formatLabel:[1,"format-label"],confirmLabel:[1,"confirm-label"],cancelLabel:[1,"cancel-label"],hourLabel:[1,"hour-label"],minuteLabel:[1,"minute-label"],periodLabel:[1,"period-label"],hour:[32],minute:[32]},void 0,{value:[{onValueChange:0}],name:[{onNameChange:0}]}]);function h(e){return(e+"").padStart(2,"0")}function u(){"undefined"!=typeof customElements&&["bs-timepicker","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item","bs-switch"].forEach((i=>{switch(i){case"bs-timepicker":customElements.get(e(i))||customElements.define(e(i),m);break;case"bs-button":customElements.get(e(i))||a();break;case"bs-card":customElements.get(e(i))||c();break;case"bs-chip-informative":customElements.get(e(i))||n();break;case"bs-icon-button":customElements.get(e(i))||o();break;case"bs-input":customElements.get(e(i))||b();break;case"bs-menu":customElements.get(e(i))||l();break;case"bs-menu-item":customElements.get(e(i))||p();break;case"bs-switch":customElements.get(e(i))||d()}}))}u();const k=m,f=u;export{k as BsTimepicker,f as defineCustomElement}
@@ -1 +1 @@
1
- import{t as i,p as t,H as e,c as s,h as n}from"./p-CVrEuVFo.js";import{d as r}from"./p-DuLL7Ouw.js";import{d as o}from"./p-zTHlbyH6.js";import{d as a}from"./p-CeUK3n7D.js";import{d as l}from"./p-C_j_jDM6.js";const p=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsInput=s(this,"bsInput"),this.bsChange=s(this,"bsChange"),this.bsOpen=s(this,"bsOpen"),this.bsChipAdd=s(this,"bsChipAdd"),this.bsChipRemove=s(this,"bsChipRemove"),this.bsTitleChange=s(this,"bsTitleChange"),this.bsCountryChange=s(this,"bsCountryChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";name;value="";type="text";label;placeholder;description;error;disabled=!1;required=!1;step=1;min;max;options=[];rows=3;chips=[];titleOptions=[];initialsTitle="";countryOptions=[];country="";length=4;open=!1;bsInput;bsChange;bsOpen;bsChipAdd;bsChipRemove;bsTitleChange;bsCountryChange;hasIcon=!1;hasEndIcon=!1;passwordVisible=!1;chipDraft="";pinInputs=[];componentWillLoad(){this.initialValue=this.value,this.syncFormValue(),this.hasIcon=this.hasSlottedContent("icon"),this.hasEndIcon=this.hasSlottedContent("end-icon")}onFormStateChange(){this.syncFormValue()}syncFormValue(){if(this.internals?.setFormValue){if("chip"===this.type&&this.name){const i=new FormData;this.chips.forEach((t=>i.append(this.name,t))),this.internals.setFormValue(i)}else this.internals.setFormValue(this.value??"");this.required&&("chip"===this.type?0===this.chips.length:!this.value)?this.internals.setValidity({valueMissing:!0},"Please fill out this field."):this.internals.setValidity({})}}formResetCallback(){this.value=this.initialValue}formStateRestoreCallback(i){"string"==typeof i&&(this.value=i)}hasSlottedContent(i){return Array.from(this.el.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("slot")===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onEndIconSlotchange=i=>{this.hasEndIcon=i.target.assignedNodes().length>0};onInput=i=>{const t=i.target.value;this.value=t,this.bsInput.emit(t)};onChange=i=>{const t=i.target.value;this.value=t,this.bsChange.emit(t)};clampNumber(i){return void 0!==this.min&&i<this.min&&(i=this.min),void 0!==this.max&&i>this.max&&(i=this.max),i}onStepperIncrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)+this.step);this.value=String(i),this.bsChange.emit(this.value)};onStepperDecrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)-this.step);this.value=String(i),this.bsChange.emit(this.value)};onTogglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};onDropdownToggle=()=>{this.disabled||(this.open=!this.open,this.bsOpen.emit(this.open))};onDropdownKeydown=i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.onDropdownToggle())};onDropdownOptionSelect=i=>()=>{this.value=i.label,this.open=!1,this.bsChange.emit(this.value)};onHostKeydown(i){"dropdown"===this.type&&this.open&&"Escape"===i.key&&(this.open=!1)}onHostFocusOut(i){if("dropdown"!==this.type||!this.open)return;const t=i.relatedTarget;t&&this.el.contains(t)||(this.open=!1)}onChipDraftInput=i=>{this.chipDraft=i.target.value};onChipDraftKeydown=i=>{if("Enter"===i.key){i.preventDefault();const t=this.chipDraft.trim();t&&(this.bsChipAdd.emit(t),this.chipDraft="")}};onChipRemove=i=>()=>{this.bsChipRemove.emit(i)};onTitleChange=i=>{this.bsTitleChange.emit(i.target.value)};onCountryChange=i=>{this.bsCountryChange.emit(i.target.value)};onPinInput=i=>t=>{const e=t.target;let s=e.value;s.length>1&&(s=s.slice(-1),e.value=s),s&&i<this.length-1&&this.pinInputs[i+1]?.focus(),this.value=this.pinInputs.map((i=>i?.value??"")).join(""),this.bsChange.emit(this.value)};onPinKeydown=i=>t=>{"Backspace"===t.key&&!t.target.value&&i>0&&this.pinInputs[i-1]?.focus()};get showsEndIconArea(){return"number"===this.type||"password"===this.type||"dropdown"===this.type||"date"===this.type||this.hasEndIcon}get showsIconArea(){return"search"===this.type&&!this.hasIcon||this.hasIcon}renderIconContent(){return"search"!==this.type||this.hasIcon?n("slot",{name:"icon",onSlotchange:this.onIconSlotchange}):n("svg",{class:"bs-input__search-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor","stroke-width":"1.3"}),n("path",{d:"M11 11L14.5 14.5",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}))}renderEndIconContent(){return"number"===this.type?n("span",{class:"bs-input__stepper"},n("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Increment",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperIncrement},n("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},n("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}))),n("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Decrement",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperDecrement},n("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},n("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})))):"password"===this.type?n("button",{type:"button",part:"control",class:"bs-input__password-toggle","aria-label":this.passwordVisible?"Hide password":"Show password",disabled:this.disabled,onClick:this.onTogglePasswordVisibility},this.passwordVisible?n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),n("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M2 2L14 14",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"})):n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),n("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}))):"dropdown"===this.type?n("svg",{class:"bs-input__chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})):"date"!==this.type||this.hasEndIcon?n("slot",{name:"end-icon",onSlotchange:this.onEndIconSlotchange}):n("svg",{class:"bs-input__calendar",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M2 6.5H14",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M5 1.5V4M11 1.5V4",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}))}renderStandardControl(){return n("input",{id:"control",part:"control",class:"bs-input__control",type:"password"===this.type?this.passwordVisible?"text":"password":"dropdown"===this.type?"text":this.type,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:"dropdown"===this.type,role:"dropdown"===this.type?"combobox":void 0,"aria-haspopup":"dropdown"===this.type?"listbox":void 0,"aria-expanded":"dropdown"===this.type?String(this.open):void 0,min:"number"===this.type?this.min:void 0,max:"number"===this.type?this.max:void 0,step:"number"===this.type?this.step:void 0,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderSelectControl(){return n("select",{id:"control",part:"control",class:"bs-input__control",disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange},this.options.map((i=>n("option",{value:i.value,selected:i.value===this.value},i.label))))}renderTextareaControl(){return n("textarea",{id:"control",part:"control",class:"bs-input__control bs-input__control--textarea",rows:this.rows,value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderChipControl(){return n("div",{class:"bs-input__chips"},this.chips.map((i=>n("bs-chip-informative",{part:"chip",class:"bs-input__chip",size:"sm",disabled:this.disabled},i,n("bs-icon-button",{part:"chip-remove",class:"bs-input__chip-remove",variant:"subtle",size:"md",ariaLabel:`Remove ${i}`,disabled:this.disabled,onClick:this.onChipRemove(i)},n(d,null))))),n("input",{id:"control",part:"control",class:"bs-input__control bs-input__chip-input",type:"text",value:this.chipDraft,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onChipDraftInput,onKeyDown:this.onChipDraftKeydown}))}renderInitialsField(){const i=this.disabled?"bs-input__field--disabled":"";return n("div",{class:"bs-input__initials-row"},n("div",{part:"field",class:`bs-input__field bs-input__field--initials-title ${this.error?"bs-input__field--error":""} ${i}`},n("select",{part:"control",class:"bs-input__control bs-input__title-select",disabled:this.disabled,onChange:this.onTitleChange},this.titleOptions.map((i=>n("option",{value:i,selected:i===this.initialsTitle},i)))),this.renderSelectChevron()),n("div",{part:"field",class:`bs-input__field bs-input__field--initials-value ${this.error?"bs-input__field--error":""} ${i}`},n("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})))}renderSelectChevron(){return n("svg",{class:"bs-input__select-chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"}))}renderCountryControl(){return[n("select",{part:"control",class:"bs-input__control bs-input__country-select",disabled:this.disabled,onChange:this.onCountryChange},this.countryOptions.map((i=>n("option",{value:i.code,selected:i.code===this.country},i.flagIcon?`${i.flagIcon} `:"",i.code," ",i.label)))),this.renderSelectChevron(),n("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})]}renderControl(){switch(this.type){case"select":return this.renderSelectControl();case"textarea":return this.renderTextareaControl();case"chip":return this.renderChipControl();case"country":return this.renderCountryControl();default:return this.renderStandardControl()}}renderField(){const i=["bs-input__field",this.error?"bs-input__field--error":"",this.disabled?"bs-input__field--disabled":"","textarea"===this.type?"bs-input__field--textarea":"","chip"===this.type?"bs-input__field--chip":""].filter(Boolean).join(" "),t="dropdown"===this.type;return n("div",{class:"bs-input__field-wrapper"},n("div",{part:"field",class:i,onClick:t?this.onDropdownToggle:void 0,onKeyDown:t?this.onDropdownKeydown:void 0},n("span",{part:"icon",class:"bs-input__icon "+(this.showsIconArea?"bs-input__icon--visible":"")},this.renderIconContent()),this.renderControl(),n("span",{part:"end-icon",class:"bs-input__end-icon "+(this.showsEndIconArea?"bs-input__end-icon--visible":"")},this.renderEndIconContent())),t&&this.open&&this.options.length>0&&n("bs-menu",{part:"menu",class:"bs-input__dropdown-menu",role:"listbox"},this.options.map((i=>n("bs-menu-item",{key:i.value,onBsSelect:this.onDropdownOptionSelect(i)},i.label)))))}renderPinField(){return this.pinInputs=[],n("div",{part:"field",class:`bs-input__field bs-input__field--pin ${this.error?"bs-input__field--error":""} ${this.disabled?"bs-input__field--disabled":""}`},Array.from({length:this.length}).map(((i,t)=>n("input",{id:0===t?"control":void 0,ref:i=>this.pinInputs[t]=i,part:"control",class:"bs-input__pin-cell",type:"text",inputMode:"numeric",maxLength:1,value:this.value[t]??"",disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onPinInput(t),onKeyDown:this.onPinKeydown(t)}))))}render(){return n("div",{key:"6921873fb72be6f26a2389697f6b2f816d8011a9",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&n("label",{key:"64ec1ba4a6c8c87db6b45dfd38731adbdfd5d6a8",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&n("span",{key:"5176edfc672132f1c6aaec978002851ff27179a0",part:"required",class:"bs-input__required","aria-hidden":"true"},"*")),"pin"===this.type?this.renderPinField():"initials"===this.type?this.renderInitialsField():this.renderField(),this.error?n("span",{id:"description-or-error",part:"error",class:"bs-input__error"},n("svg",{part:"error-icon",class:"bs-input__error-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M8 5V8.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}),n("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})),this.error):this.description?n("span",{id:"description-or-error",part:"description",class:"bs-input__description"},this.description):null)}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}}static get style(){return":host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-550);--bs-input-padding-x:var(--bs-spacing-150);--bs-input-padding-y:var(--bs-spacing-100);--bs-input-gap:var(--bs-spacing-200);--bs-input-icon-size:var(--bs-spacing-300);--bs-input-stack-gap:var(--bs-spacing-50);--bs-input-error-icon-size:var(--bs-spacing-250);--bs-input-field-bg:var(--bs-input-bg-default);--bs-input-field-bg-disabled:var(--bs-input-bg-disabled);--bs-input-field-border:var(--bs-input-border-default);--bs-input-field-border-hover:var(--bs-input-border-hover);--bs-input-field-border-focus:var(--bs-input-border-focus);--bs-input-field-border-error:var(--bs-input-border-error);--bs-input-field-text:var(--bs-input-text);--bs-input-field-placeholder:var(--bs-input-placeholder);--bs-input-label-color:var(--bs-input-label);--bs-input-label-font-size:var(--bs-font-size-sm);--bs-input-label-font-weight:var(--bs-font-weight-medium);--bs-input-label-line-height:normal;--bs-input-description-color:var(--bs-input-description);--bs-input-error-color:var(--bs-input-error);--bs-input-icon-color:var(--bs-icon-muted);--bs-input-icon-color-error:var(--bs-input-icon-error);--bs-input-icon-color-disabled:var(--bs-input-icon-disabled);--bs-input-initials-title-width:80px;--bs-input-initials-gap:var(--bs-spacing-50)}.bs-input{display:flex;flex-direction:column;gap:var(--bs-input-stack-gap);font-family:inherit}.bs-input__label{font-size:var(--bs-input-label-font-size);font-weight:var(--bs-input-label-font-weight);line-height:var(--bs-input-label-line-height);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-inline-start:2px}.bs-input__field{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-input-gap);height:var(--bs-input-height);padding:var(--bs-input-padding-y) var(--bs-input-padding-x);border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg)}.bs-input__field:hover:not(.bs-input__field--disabled){border-color:var(--bs-input-field-border-hover)}.bs-input__field:focus-within{border-color:var(--bs-input-field-border-focus)}.bs-input__field--error{border-color:var(--bs-input-field-border-error)}.bs-input__field--disabled{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__control{flex:1;min-width:0;border:none;outline:none;padding:0;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-field-placeholder)}.bs-input__control:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input__control::-webkit-strong-password-auto-fill-button,.bs-input__control::-webkit-credentials-auto-fill-button{display:none !important;visibility:hidden;pointer-events:none;position:absolute;inset-inline-end:0}.bs-input__control::-webkit-textfield-decoration-container{visibility:hidden}.bs-input__control::-ms-reveal,.bs-input__control::-ms-clear{display:none}.bs-input--error .bs-input__label{color:var(--bs-input-label-color)}.bs-input__icon,.bs-input__end-icon{display:none;align-items:center;flex-shrink:0;color:var(--bs-input-icon-color)}.bs-input__icon--visible,.bs-input__end-icon--visible{display:flex}.bs-input__icon ::slotted(*),.bs-input__end-icon ::slotted(*){display:block;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--error .bs-input__icon,.bs-input__field--error .bs-input__end-icon{color:var(--bs-input-icon-color-error)}.bs-input__field--disabled .bs-input__icon,.bs-input__field--disabled .bs-input__end-icon{color:var(--bs-input-icon-color-disabled)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description-color)}.bs-input__error{display:flex;align-items:center;gap:var(--bs-input-stack-gap);font-size:var(--bs-font-size-xs);color:var(--bs-input-error-color)}.bs-input__error-icon{flex-shrink:0;width:var(--bs-input-error-icon-size);height:var(--bs-input-error-icon-size)}.bs-input__field--textarea{height:auto;align-items:flex-start}.bs-input__control--textarea{resize:vertical}.bs-input__stepper{display:flex;flex-direction:column}.bs-input__stepper-btn{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer}.bs-input__stepper-btn:disabled{cursor:not-allowed}.bs-input__password-toggle{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__password-toggle:disabled{cursor:not-allowed}.bs-input__password-toggle svg{width:100%;height:100%}.bs-input__chevron{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field-wrapper{position:relative;width:100%}.bs-input__dropdown-menu{position:absolute;top:calc(100% + var(--bs-input-stack-gap));inset-inline-start:0;inset-inline-end:0;z-index:1}.bs-input__calendar{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__search-icon{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--chip{flex-wrap:wrap;height:auto;min-height:var(--bs-input-height)}.bs-input__chips{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bs-spacing-100);flex:1;min-width:0}.bs-input__chip{--bs-chip-informative-padding-x-plain-side:var(--bs-spacing-150)}.bs-input__chip-remove{--bs-icon-button-size-xs:20px;--bs-icon-button-icon-size-xs:12px;margin-inline-end:calc(var(--bs-spacing-50) * -1)}.bs-input__chip-input{flex:1;min-width:60px}.bs-input__country-select{flex-shrink:0;width:auto;border:none;outline:none;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__title-select,.bs-input__country-select{appearance:none;-webkit-appearance:none;-moz-appearance:none}.bs-input__title-select::-ms-expand,.bs-input__country-select::-ms-expand{display:none}.bs-input__select-chevron{flex-shrink:0;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size);color:var(--bs-input-icon-color);pointer-events:none}.bs-input__field--disabled .bs-input__select-chevron{color:var(--bs-input-icon-color-disabled)}.bs-input__initials-row{display:flex;gap:var(--bs-input-initials-gap);width:100%}.bs-input__field--initials-title{flex:0 0 auto;width:var(--bs-input-initials-title-width);gap:var(--bs-spacing-50)}.bs-input__field--initials-title .bs-input__select-chevron{width:10px;height:10px}.bs-input__field--initials-value{flex:1;min-width:0}.bs-input__country-select{width:auto}.bs-input__field--pin{border:none;padding:0;background:transparent;gap:var(--bs-input-gap)}.bs-input__pin-cell{box-sizing:border-box;width:var(--bs-input-height);height:var(--bs-input-height);text-align:center;border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg);color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit;outline:none}.bs-input__pin-cell:focus{border-color:var(--bs-input-field-border-focus)}.bs-input__field--pin.bs-input__field--disabled .bs-input__pin-cell{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__field--pin.bs-input__field--error .bs-input__pin-cell{border-color:var(--bs-input-field-border-error)}@media (forced-colors: active){.bs-input__control{border:1px solid FieldText}.bs-input__control:focus-visible{outline:2px solid Highlight;outline-offset:2px}}"}},[849,"bs-input",{name:[513],value:[1025],type:[1],label:[1],placeholder:[1],description:[1],error:[1],disabled:[516],required:[4],step:[2],min:[2],max:[2],options:[16],rows:[2],chips:[16],titleOptions:[16],initialsTitle:[1,"initials-title"],countryOptions:[16],country:[1],length:[2],open:[1540],hasIcon:[32],hasEndIcon:[32],passwordVisible:[32],chipDraft:[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]],{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}]),d=()=>n("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));function h(){"undefined"!=typeof customElements&&["bs-input","bs-chip-informative","bs-icon-button","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-input":customElements.get(i(t))||customElements.define(i(t),p);break;case"bs-chip-informative":customElements.get(i(t))||r();break;case"bs-icon-button":customElements.get(i(t))||o();break;case"bs-menu":customElements.get(i(t))||a();break;case"bs-menu-item":customElements.get(i(t))||l()}}))}h();export{p as B,h as d}
1
+ import{t as i,p as t,H as e,c as s,h as n}from"./p-CVrEuVFo.js";import{d as r}from"./p-DuLL7Ouw.js";import{d as o}from"./p-zTHlbyH6.js";import{d as a}from"./p-CeUK3n7D.js";import{d as l}from"./p-C_j_jDM6.js";const p=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsInput=s(this,"bsInput"),this.bsChange=s(this,"bsChange"),this.bsOpen=s(this,"bsOpen"),this.bsChipAdd=s(this,"bsChipAdd"),this.bsChipRemove=s(this,"bsChipRemove"),this.bsTitleChange=s(this,"bsTitleChange"),this.bsCountryChange=s(this,"bsCountryChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";name;value="";type="text";label;placeholder;description;error;disabled=!1;required=!1;step=1;min;max;options=[];rows=3;chips=[];titleOptions=[];initialsTitle="";countryOptions=[];country="";length=4;open=!1;bsInput;bsChange;bsOpen;bsChipAdd;bsChipRemove;bsTitleChange;bsCountryChange;hasIcon=!1;hasEndIcon=!1;passwordVisible=!1;chipDraft="";pinInputs=[];componentWillLoad(){this.initialValue=this.value,this.syncFormValue(),this.hasIcon=this.hasSlottedContent("icon"),this.hasEndIcon=this.hasSlottedContent("end-icon")}onFormStateChange(){this.syncFormValue()}syncFormValue(){if(this.internals?.setFormValue){if("chip"===this.type&&this.name){const i=new FormData;this.chips.forEach((t=>i.append(this.name,t))),this.internals.setFormValue(i)}else this.internals.setFormValue(this.value??"");this.required&&("chip"===this.type?0===this.chips.length:!this.value)?this.internals.setValidity({valueMissing:!0},"Please fill out this field."):this.internals.setValidity({})}}formResetCallback(){this.value=this.initialValue}formStateRestoreCallback(i){"string"==typeof i&&(this.value=i)}hasSlottedContent(i){return Array.from(this.el.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("slot")===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onEndIconSlotchange=i=>{this.hasEndIcon=i.target.assignedNodes().length>0};onInput=i=>{const t=i.target.value;this.value=t,this.bsInput.emit(t)};onChange=i=>{const t=i.target.value;this.value=t,this.bsChange.emit(t)};clampNumber(i){return void 0!==this.min&&i<this.min&&(i=this.min),void 0!==this.max&&i>this.max&&(i=this.max),i}onStepperIncrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)+this.step);this.value=String(i),this.bsChange.emit(this.value)};onStepperDecrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)-this.step);this.value=String(i),this.bsChange.emit(this.value)};onTogglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};onDropdownToggle=()=>{this.disabled||(this.open=!this.open,this.bsOpen.emit(this.open))};onDropdownKeydown=i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.onDropdownToggle())};onDropdownOptionSelect=i=>()=>{this.value=i.label,this.open=!1,this.bsChange.emit(this.value)};onHostKeydown(i){"dropdown"===this.type&&this.open&&"Escape"===i.key&&(this.open=!1)}onHostFocusOut(i){if("dropdown"!==this.type||!this.open)return;const t=i.relatedTarget;t&&this.el.contains(t)||(this.open=!1)}onChipDraftInput=i=>{this.chipDraft=i.target.value};onChipDraftKeydown=i=>{if("Enter"===i.key){i.preventDefault();const t=this.chipDraft.trim();t&&(this.bsChipAdd.emit(t),this.chipDraft="")}};onChipRemove=i=>()=>{this.bsChipRemove.emit(i)};onTitleChange=i=>{this.bsTitleChange.emit(i.target.value)};onCountryChange=i=>{this.bsCountryChange.emit(i.target.value)};onPinInput=i=>t=>{const e=t.target;let s=e.value;s.length>1&&(s=s.slice(-1),e.value=s),s&&i<this.length-1&&this.pinInputs[i+1]?.focus(),this.value=this.pinInputs.map((i=>i?.value??"")).join(""),this.bsChange.emit(this.value)};onPinKeydown=i=>t=>{"Backspace"===t.key&&!t.target.value&&i>0&&this.pinInputs[i-1]?.focus()};get showsEndIconArea(){return"number"===this.type||"password"===this.type||"dropdown"===this.type||"date"===this.type||this.hasEndIcon}get showsIconArea(){return"search"===this.type&&!this.hasIcon||this.hasIcon}renderIconContent(){return"search"!==this.type||this.hasIcon?n("slot",{name:"icon",onSlotchange:this.onIconSlotchange}):n("svg",{class:"bs-input__search-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor","stroke-width":"1.3"}),n("path",{d:"M11 11L14.5 14.5",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}))}renderEndIconContent(){return"number"===this.type?n("span",{class:"bs-input__stepper"},n("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Increment",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperIncrement},n("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},n("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}))),n("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Decrement",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperDecrement},n("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},n("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})))):"password"===this.type?n("button",{type:"button",part:"control",class:"bs-input__password-toggle","aria-label":this.passwordVisible?"Hide password":"Show password",disabled:this.disabled,onClick:this.onTogglePasswordVisibility},this.passwordVisible?n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),n("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M2 2L14 14",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"})):n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),n("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}))):"dropdown"===this.type?n("svg",{class:"bs-input__chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})):"date"!==this.type||this.hasEndIcon?n("slot",{name:"end-icon",onSlotchange:this.onEndIconSlotchange}):n("svg",{class:"bs-input__calendar",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M2 6.5H14",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M5 1.5V4M11 1.5V4",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}))}renderStandardControl(){return n("input",{id:"control",part:"control",class:"bs-input__control",type:"password"===this.type?this.passwordVisible?"text":"password":"dropdown"===this.type?"text":this.type,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:"dropdown"===this.type,role:"dropdown"===this.type?"combobox":void 0,"aria-haspopup":"dropdown"===this.type?"listbox":void 0,"aria-expanded":"dropdown"===this.type?String(this.open):void 0,min:"number"===this.type?this.min:void 0,max:"number"===this.type?this.max:void 0,step:"number"===this.type?this.step:void 0,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderSelectControl(){return n("select",{id:"control",part:"control",class:"bs-input__control",disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange},this.options.map((i=>n("option",{value:i.value,selected:i.value===this.value},i.label))))}renderTextareaControl(){return n("textarea",{id:"control",part:"control",class:"bs-input__control bs-input__control--textarea",rows:this.rows,value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderChipControl(){return n("div",{class:"bs-input__chips"},this.chips.map((i=>n("bs-chip-informative",{part:"chip",class:"bs-input__chip",size:"sm",disabled:this.disabled},i,n("bs-icon-button",{part:"chip-remove",class:"bs-input__chip-remove",variant:"subtle",size:"xs",ariaLabel:`Remove ${i}`,disabled:this.disabled,onClick:this.onChipRemove(i)},n(d,null))))),n("input",{id:"control",part:"control",class:"bs-input__control bs-input__chip-input",type:"text",value:this.chipDraft,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onChipDraftInput,onKeyDown:this.onChipDraftKeydown}))}renderInitialsField(){const i=this.disabled?"bs-input__field--disabled":"";return n("div",{class:"bs-input__initials-row"},n("div",{part:"field",class:`bs-input__field bs-input__field--initials-title ${this.error?"bs-input__field--error":""} ${i}`},n("select",{part:"control",class:"bs-input__control bs-input__title-select",disabled:this.disabled,onChange:this.onTitleChange},this.titleOptions.map((i=>n("option",{value:i,selected:i===this.initialsTitle},i)))),this.renderSelectChevron()),n("div",{part:"field",class:`bs-input__field bs-input__field--initials-value ${this.error?"bs-input__field--error":""} ${i}`},n("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})))}renderSelectChevron(){return n("svg",{class:"bs-input__select-chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"}))}renderCountryControl(){return[n("select",{part:"control",class:"bs-input__control bs-input__country-select",disabled:this.disabled,onChange:this.onCountryChange},this.countryOptions.map((i=>n("option",{value:i.code,selected:i.code===this.country},i.flagIcon?`${i.flagIcon} `:"",i.code," ",i.label)))),this.renderSelectChevron(),n("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})]}renderControl(){switch(this.type){case"select":return this.renderSelectControl();case"textarea":return this.renderTextareaControl();case"chip":return this.renderChipControl();case"country":return this.renderCountryControl();default:return this.renderStandardControl()}}renderField(){const i=["bs-input__field",this.error?"bs-input__field--error":"",this.disabled?"bs-input__field--disabled":"","textarea"===this.type?"bs-input__field--textarea":"","chip"===this.type?"bs-input__field--chip":""].filter(Boolean).join(" "),t="dropdown"===this.type;return n("div",{class:"bs-input__field-wrapper"},n("div",{part:"field",class:i,onClick:t?this.onDropdownToggle:void 0,onKeyDown:t?this.onDropdownKeydown:void 0},n("span",{part:"icon",class:"bs-input__icon "+(this.showsIconArea?"bs-input__icon--visible":"")},this.renderIconContent()),this.renderControl(),n("span",{part:"end-icon",class:"bs-input__end-icon "+(this.showsEndIconArea?"bs-input__end-icon--visible":"")},this.renderEndIconContent())),t&&this.open&&this.options.length>0&&n("bs-menu",{part:"menu",class:"bs-input__dropdown-menu",role:"listbox"},this.options.map((i=>n("bs-menu-item",{key:i.value,onBsSelect:this.onDropdownOptionSelect(i)},i.label)))))}renderPinField(){return this.pinInputs=[],n("div",{part:"field",class:`bs-input__field bs-input__field--pin ${this.error?"bs-input__field--error":""} ${this.disabled?"bs-input__field--disabled":""}`},Array.from({length:this.length}).map(((i,t)=>n("input",{id:0===t?"control":void 0,ref:i=>this.pinInputs[t]=i,part:"control",class:"bs-input__pin-cell",type:"text",inputMode:"numeric",maxLength:1,value:this.value[t]??"",disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onPinInput(t),onKeyDown:this.onPinKeydown(t)}))))}render(){return n("div",{key:"6921873fb72be6f26a2389697f6b2f816d8011a9",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&n("label",{key:"64ec1ba4a6c8c87db6b45dfd38731adbdfd5d6a8",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&n("span",{key:"5176edfc672132f1c6aaec978002851ff27179a0",part:"required",class:"bs-input__required","aria-hidden":"true"},"*")),"pin"===this.type?this.renderPinField():"initials"===this.type?this.renderInitialsField():this.renderField(),this.error?n("span",{id:"description-or-error",part:"error",class:"bs-input__error"},n("svg",{part:"error-icon",class:"bs-input__error-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M8 5V8.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}),n("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})),this.error):this.description?n("span",{id:"description-or-error",part:"description",class:"bs-input__description"},this.description):null)}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}}static get style(){return":host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-550);--bs-input-padding-x:var(--bs-spacing-150);--bs-input-padding-y:var(--bs-spacing-100);--bs-input-gap:var(--bs-spacing-200);--bs-input-icon-size:var(--bs-spacing-300);--bs-input-stack-gap:var(--bs-spacing-50);--bs-input-error-icon-size:var(--bs-spacing-250);--bs-input-field-bg:var(--bs-input-bg-default);--bs-input-field-bg-disabled:var(--bs-input-bg-disabled);--bs-input-field-border:var(--bs-input-border-default);--bs-input-field-border-hover:var(--bs-input-border-hover);--bs-input-field-border-focus:var(--bs-input-border-focus);--bs-input-field-border-error:var(--bs-input-border-error);--bs-input-field-text:var(--bs-input-text);--bs-input-field-placeholder:var(--bs-input-placeholder);--bs-input-label-color:var(--bs-input-label);--bs-input-label-font-size:var(--bs-font-size-sm);--bs-input-label-font-weight:var(--bs-font-weight-medium);--bs-input-label-line-height:normal;--bs-input-description-color:var(--bs-input-description);--bs-input-error-color:var(--bs-input-error);--bs-input-icon-color:var(--bs-icon-muted);--bs-input-icon-color-error:var(--bs-input-icon-error);--bs-input-icon-color-disabled:var(--bs-input-icon-disabled);--bs-input-initials-title-width:80px;--bs-input-initials-gap:var(--bs-spacing-50)}.bs-input{display:flex;flex-direction:column;gap:var(--bs-input-stack-gap);font-family:inherit}.bs-input__label{font-size:var(--bs-input-label-font-size);font-weight:var(--bs-input-label-font-weight);line-height:var(--bs-input-label-line-height);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-inline-start:2px}.bs-input__field{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-input-gap);height:var(--bs-input-height);padding:var(--bs-input-padding-y) var(--bs-input-padding-x);border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg)}.bs-input__field:hover:not(.bs-input__field--disabled){border-color:var(--bs-input-field-border-hover)}.bs-input__field:focus-within{border-color:var(--bs-input-field-border-focus)}.bs-input__field--error{border-color:var(--bs-input-field-border-error)}.bs-input__field--disabled{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__control{flex:1;min-width:0;border:none;outline:none;padding:0;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-field-placeholder)}.bs-input__control:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input__control::-webkit-strong-password-auto-fill-button,.bs-input__control::-webkit-credentials-auto-fill-button{display:none !important;visibility:hidden;pointer-events:none;position:absolute;inset-inline-end:0}.bs-input__control::-webkit-textfield-decoration-container{visibility:hidden}.bs-input__control::-ms-reveal,.bs-input__control::-ms-clear{display:none}.bs-input--error .bs-input__label{color:var(--bs-input-label-color)}.bs-input__icon,.bs-input__end-icon{display:none;align-items:center;flex-shrink:0;color:var(--bs-input-icon-color)}.bs-input__icon--visible,.bs-input__end-icon--visible{display:flex}.bs-input__icon ::slotted(*),.bs-input__end-icon ::slotted(*){display:block;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--error .bs-input__icon,.bs-input__field--error .bs-input__end-icon{color:var(--bs-input-icon-color-error)}.bs-input__field--disabled .bs-input__icon,.bs-input__field--disabled .bs-input__end-icon{color:var(--bs-input-icon-color-disabled)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description-color)}.bs-input__error{display:flex;align-items:center;gap:var(--bs-input-stack-gap);font-size:var(--bs-font-size-xs);color:var(--bs-input-error-color)}.bs-input__error-icon{flex-shrink:0;width:var(--bs-input-error-icon-size);height:var(--bs-input-error-icon-size)}.bs-input__field--textarea{height:auto;align-items:flex-start}.bs-input__control--textarea{resize:vertical}.bs-input__stepper{display:flex;flex-direction:column}.bs-input__stepper-btn{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer}.bs-input__stepper-btn:disabled{cursor:not-allowed}.bs-input__password-toggle{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__password-toggle:disabled{cursor:not-allowed}.bs-input__password-toggle svg{width:100%;height:100%}.bs-input__chevron{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field-wrapper{position:relative;width:100%}.bs-input__dropdown-menu{position:absolute;top:calc(100% + var(--bs-input-stack-gap));inset-inline-start:0;inset-inline-end:0;z-index:1}.bs-input__calendar{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__search-icon{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--chip{flex-wrap:wrap;height:auto;min-height:var(--bs-input-height)}.bs-input__chips{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bs-spacing-100);flex:1;min-width:0}.bs-input__chip{--bs-chip-informative-padding-x-plain-side:var(--bs-spacing-150)}.bs-input__chip-remove{--bs-icon-button-size-xs:20px;--bs-icon-button-icon-size-xs:12px;margin-inline-end:calc(var(--bs-spacing-50) * -1)}.bs-input__chip-input{flex:1;min-width:60px}.bs-input__country-select{flex-shrink:0;width:auto;border:none;outline:none;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__title-select,.bs-input__country-select{appearance:none;-webkit-appearance:none;-moz-appearance:none}.bs-input__title-select::-ms-expand,.bs-input__country-select::-ms-expand{display:none}.bs-input__select-chevron{flex-shrink:0;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size);color:var(--bs-input-icon-color);pointer-events:none}.bs-input__field--disabled .bs-input__select-chevron{color:var(--bs-input-icon-color-disabled)}.bs-input__initials-row{display:flex;gap:var(--bs-input-initials-gap);width:100%}.bs-input__field--initials-title{flex:0 0 auto;width:var(--bs-input-initials-title-width);gap:var(--bs-spacing-50)}.bs-input__field--initials-title .bs-input__select-chevron{width:10px;height:10px}.bs-input__field--initials-value{flex:1;min-width:0}.bs-input__country-select{width:auto}.bs-input__field--pin{border:none;padding:0;background:transparent;gap:var(--bs-input-gap)}.bs-input__pin-cell{box-sizing:border-box;width:var(--bs-input-height);height:var(--bs-input-height);text-align:center;border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg);color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit;outline:none}.bs-input__pin-cell:focus{border-color:var(--bs-input-field-border-focus)}.bs-input__field--pin.bs-input__field--disabled .bs-input__pin-cell{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__field--pin.bs-input__field--error .bs-input__pin-cell{border-color:var(--bs-input-field-border-error)}@media (forced-colors: active){.bs-input__control{border:1px solid FieldText}.bs-input__control:focus-visible{outline:2px solid Highlight;outline-offset:2px}}"}},[849,"bs-input",{name:[513],value:[1025],type:[1],label:[1],placeholder:[1],description:[1],error:[1],disabled:[516],required:[4],step:[2],min:[2],max:[2],options:[16],rows:[2],chips:[16],titleOptions:[16],initialsTitle:[1,"initials-title"],countryOptions:[16],country:[1],length:[2],open:[1540],hasIcon:[32],hasEndIcon:[32],passwordVisible:[32],chipDraft:[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]],{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}]),d=()=>n("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));function h(){"undefined"!=typeof customElements&&["bs-input","bs-chip-informative","bs-icon-button","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-input":customElements.get(i(t))||customElements.define(i(t),p);break;case"bs-chip-informative":customElements.get(i(t))||r();break;case"bs-icon-button":customElements.get(i(t))||o();break;case"bs-menu":customElements.get(i(t))||a();break;case"bs-menu-item":customElements.get(i(t))||l()}}))}h();export{p as B,h as d}
@@ -298,7 +298,7 @@ const BsInput = class {
298
298
  return (h("textarea", { id: "control", part: "control", class: "bs-input__control bs-input__control--textarea", rows: this.rows, value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
299
299
  }
300
300
  renderChipControl() {
301
- return (h("div", { class: "bs-input__chips" }, this.chips.map(chip => (h("bs-chip-informative", { part: "chip", class: "bs-input__chip", size: "sm", disabled: this.disabled }, chip, h("bs-icon-button", { part: "chip-remove", class: "bs-input__chip-remove", variant: "subtle", size: "md", ariaLabel: `Remove ${chip}`, disabled: this.disabled, onClick: this.onChipRemove(chip) }, h(ChipRemoveIcon, null))))), h("input", { id: "control", part: "control", class: "bs-input__control bs-input__chip-input", type: "text", value: this.chipDraft, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onChipDraftInput, onKeyDown: this.onChipDraftKeydown })));
301
+ return (h("div", { class: "bs-input__chips" }, this.chips.map(chip => (h("bs-chip-informative", { part: "chip", class: "bs-input__chip", size: "sm", disabled: this.disabled }, chip, h("bs-icon-button", { part: "chip-remove", class: "bs-input__chip-remove", variant: "subtle", size: "xs", ariaLabel: `Remove ${chip}`, disabled: this.disabled, onClick: this.onChipRemove(chip) }, h(ChipRemoveIcon, null))))), h("input", { id: "control", part: "control", class: "bs-input__control bs-input__chip-input", type: "text", value: this.chipDraft, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onChipDraftInput, onKeyDown: this.onChipDraftKeydown })));
302
302
  }
303
303
  // type="initials" renders two genuinely separate bordered boxes side by side (each with its own
304
304
  // border/radius/background, a small gap between them), not one shared field wrapper -- Figma
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brandsync/wc",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },