@rededor/cura 2.0.0-alpha.12 → 2.0.0-alpha.13

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.
@@ -9,7 +9,7 @@ require('./static-DHz-FA_O.js');
9
9
  const defineCustomElements = async (win, options) => {
10
10
  if (typeof window === 'undefined') return undefined;
11
11
  await appGlobals.globalScripts();
12
- return index.bootstrapLazy(JSON.parse("[[\"cura-accordion_21.cjs\",[[257,\"cura-dropdown-search\",{\"name\":[513],\"size\":[513],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"placeholder\":[513],\"label\":[513],\"icon\":[513],\"maxheight\":[513],\"value\":[1025],\"searchdelay\":[514],\"searchminchars\":[514],\"styles\":[32],\"zoomState\":[32],\"isOnFocus\":[32],\"dropdownItems\":[32],\"setFocus\":[64],\"selectOption\":[64]}],[321,\"cura-button\",{\"type\":[513],\"size\":[513],\"disabled\":[516],\"isLoading\":[516,\"is-loading\"],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconOnly\":[516,\"icon-only\"],\"href\":[513],\"target\":[513],\"color\":[1],\"background\":[513],\"fontColor\":[513,\"font-color\"],\"textAlign\":[513,\"text-align\"],\"justify\":[516],\"styles\":[32],\"hovered\":[32]},null,{\"background\":[{\"setColors\":0}],\"color\":[{\"setColors\":0}]}],[257,\"cura-accordion-item\",{\"label\":[513],\"iconSize\":[514,\"icon-size\"],\"labelIcon\":[513,\"label-icon\"],\"openIcon\":[513,\"open-icon\"],\"closeIcon\":[513,\"close-icon\"],\"iconColor\":[513,\"icon-color\"],\"colorMode\":[1,\"color-mode\"],\"level\":[514],\"opened\":[1540],\"styles\":[32]}],[257,\"cura-tabs\",{\"name\":[513],\"iconName\":[513,\"icon-name\"],\"selected\":[1540],\"disabled\":[1540],\"borderBottom\":[1540,\"border-bottom\"],\"size\":[513],\"colorMode\":[1537,\"color-mode\"],\"hovered\":[32],\"styles\":[32]},null,{\"colorMode\":[{\"setColors\":0}]}],[1,\"cura-badge-distance\",{\"distance\":[2],\"label\":[513],\"styles\":[32],\"displayDistance\":[32]},null,{\"distance\":[{\"formatDistance\":0}]}],[257,\"cura-dropdown-search-category\"],[257,\"cura-accordion\",{\"color\":[513],\"colorMode\":[513,\"color-mode\"],\"iconSize\":[514,\"icon-size\"],\"labelIcon\":[513,\"label-icon\"],\"openIcon\":[513,\"open-icon\"],\"closeIcon\":[513,\"close-icon\"],\"iconColor\":[513,\"icon-color\"],\"behavior\":[513],\"level\":[514],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}]}],[1,\"cura-avatar\",{\"size\":[1],\"backgroundColor\":[513,\"background-color\"],\"borderColor\":[513,\"border-color\"],\"borderRadius\":[513,\"border-radius\"],\"border\":[516],\"type\":[513],\"imageSrc\":[1537,\"image-src\"],\"imageSrcDefault\":[513,\"image-src-default\"],\"floating\":[516],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}]}],[257,\"cura-card\",{\"hasPadding\":[1028,\"has-padding\"],\"hasShadow\":[1028,\"has-shadow\"],\"type\":[1025],\"colorMode\":[1025,\"color-mode\"],\"href\":[1537],\"target\":[513],\"styles\":[32]}],[257,\"cura-dropdown-search-option\",{\"value\":[1],\"optionid\":[1],\"selectable\":[516],\"selected\":[516],\"highlighted\":[516]}],[257,\"cura-page-template\",{\"contentwidth\":[513]}],[257,\"cura-tabs-group\",{\"gap\":[514],\"borderBottom\":[1540,\"border-bottom\"],\"colorMode\":[1537,\"color-mode\"],\"styles\":[32]},[[0,\"tabSelect\",\"handleTabSelect\"]]],[321,\"cura-input-text\",{\"mode\":[1537],\"status\":[1537],\"size\":[1537],\"type\":[513],\"inputMode\":[513,\"input-mode\"],\"label\":[513],\"name\":[513],\"placeholder\":[513],\"value\":[1544],\"iconName\":[1537,\"icon-name\"],\"helperText\":[1537,\"helper-text\"],\"disabled\":[516],\"required\":[516],\"maskPreset\":[8,\"mask-preset\"],\"enableSelectionMode\":[1540,\"enable-selection-mode\"],\"maskRegex\":[1537,\"mask-regex\"],\"maskAdvanced\":[1544,\"mask-advanced\"],\"maxlength\":[1538],\"readOnly\":[516,\"read-only\"],\"isLoading\":[1540,\"is-loading\"],\"clearIcon\":[1540,\"clear-icon\"],\"hideErrorIcon\":[4,\"hide-error-icon\"],\"autocomplete\":[513],\"isHovered\":[32],\"isFocused\":[32],\"styles\":[32],\"setFocus\":[64]},null,{\"styles\":[{\"connectedCallback\":0}],\"size\":[{\"getClasses\":0}],\"status\":[{\"renderIcon\":0}],\"mode\":[{\"renderIcon\":0}],\"maskPreset\":[{\"initializeMask\":0}],\"maskRegex\":[{\"initializeMask\":0}],\"maskAdvanced\":[{\"initializeMask\":0}]}],[321,\"cura-select\",{\"label\":[513],\"placeholder\":[513],\"value\":[1537],\"mode\":[513],\"size\":[513],\"iconName\":[1,\"icon-name\"],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"searchBehavior\":[516,\"search-behavior\"],\"caseSensitive\":[516,\"case-sensitive\"],\"maxHeight\":[513,\"max-height\"],\"isHovered\":[32],\"isFocused\":[32],\"isOpen\":[32],\"isPositioned\":[32],\"menuStyle\":[32],\"options\":[32],\"activeIndex\":[32],\"preferredPlacement\":[32],\"textInput\":[32]},null,{\"activeIndex\":[{\"updateOptionHighlights\":0}],\"textInput\":[{\"filterOptions\":0}],\"value\":[{\"handleValueChange\":0}]}],[257,\"cura-select-option\",{\"value\":[513],\"selected\":[516],\"active\":[516],\"size\":[1],\"styles\":[32]},null,{\"size\":[{\"getSize\":0}]}],[321,\"cura-button-transparent\",{\"type\":[513],\"size\":[513],\"disabled\":[516],\"isLoading\":[516,\"is-loading\"],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconOnly\":[516,\"icon-only\"],\"href\":[513],\"target\":[513],\"color\":[513],\"fontColor\":[513,\"font-color\"],\"textAlign\":[513,\"text-align\"],\"justify\":[516],\"hovered\":[32],\"styles\":[32]},null,{\"fontColor\":[{\"getSymbolColor\":0}],\"color\":[{\"getSymbolColor\":0}]}],[257,\"cura-paragraph\",{\"size\":[513],\"spotColor\":[513,\"spot-color\"],\"color\":[513],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"textOverflow\":[513,\"text-overflow\"],\"styles\":[32]}],[257,\"cura-heading\",{\"level\":[514],\"size\":[513],\"weight\":[513],\"spotColor\":[513,\"spot-color\"],\"color\":[513],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"textOverflow\":[513,\"text-overflow\"],\"styles\":[32]}],[1,\"cura-loader-circle\",{\"size\":[513],\"color\":[513]}],[1,\"cura-icon\",{\"name\":[513],\"color\":[1],\"size\":[8],\"iconset\":[513],\"disabled\":[4]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"colorHandler\":0}],\"disabled\":[{\"colorHandler\":0}]}],[257,\"cura-label\",{\"size\":[513],\"weight\":[513],\"spotColor\":[513,\"spot-color\"],\"color\":[1],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"textOverflow\":[513,\"text-overflow\"],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}],\"spotColor\":[{\"handleChangeColor\":0}]}]]],[\"cura-input-date.cjs\",[[65,\"cura-input-date\",{\"label\":[513],\"status\":[1537],\"size\":[513],\"name\":[513],\"helperText\":[513,\"helper-text\"],\"enableRangeDates\":[516,\"enable-range-dates\"],\"disableFutureDates\":[516,\"disable-future-dates\"],\"disablePassDates\":[516,\"disable-pass-dates\"],\"iconName\":[513,\"icon-name\"],\"placeholder\":[513],\"calendarType\":[513,\"calendar-type\"],\"styles\":[32],\"isCalendarVisible\":[32],\"dates\":[32],\"value\":[32],\"dateSettings\":[32]},[[8,\"click\",\"handleClick\"]],{\"enableRangeDates\":[{\"updateDateSettings\":0}]}]]],[\"cura-stepper.cjs\",[[1,\"cura-stepper\",{\"activeStepIndex\":[514,\"active-step-index\"],\"errorInCurrentStep\":[516,\"error-in-current-step\"],\"displayHeading\":[516,\"display-heading\"],\"variant\":[513],\"steps\":[1],\"styles\":[32],\"stepList\":[32]}]]],[\"cura-tooltip.cjs\",[[257,\"cura-tooltip\",{\"elementId\":[1,\"element-id\"],\"interactive\":[4],\"delay\":[2],\"maxWidth\":[1,\"max-width\"],\"position\":[513],\"label\":[513],\"closeButton\":[516,\"close-button\"],\"isMobile\":[32]},[[9,\"resize\",\"onWindowResize\"],[9,\"scroll\",\"onWindowScroll\"]]]]],[\"cura-modal.cjs\",[[257,\"cura-modal\",{\"open\":[1540],\"background\":[1],\"top\":[2],\"bottom\":[2],\"left\":[2],\"right\":[2],\"mobileCloseLabel\":[513,\"mobile-close-label\"],\"canClose\":[516,\"can-close\"],\"zindex\":[513],\"styles\":[32]},null,{\"background\":[{\"setColors\":0}],\"top\":[{\"setTop\":0}],\"bottom\":[{\"setBottom\":0}],\"left\":[{\"setLeft\":0}],\"right\":[{\"setRight\":0}]}]]],[\"cura-toast.cjs\",[[257,\"cura-toast\",{\"type\":[1],\"position\":[1],\"icon\":[513],\"label\":[513],\"closeButton\":[516,\"close-button\"],\"loader\":[516],\"autoCloseDelay\":[514,\"auto-close-delay\"],\"styles\":[32],\"progress\":[32],\"close\":[64]},null,{\"type\":[{\"handleChangeType\":0}],\"position\":[{\"handleChangeType\":0}]}]]],[\"cura-alert.cjs\",[[257,\"cura-alert\",{\"type\":[1],\"floating\":[516],\"label\":[513],\"closeable\":[516],\"icon\":[513],\"styles\":[32]},null,{\"type\":[{\"setColors\":0}]}]]],[\"cura-button-outline.cjs\",[[321,\"cura-button-outline\",{\"type\":[513],\"size\":[513],\"disabled\":[516],\"isLoading\":[516,\"is-loading\"],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconOnly\":[516,\"icon-only\"],\"href\":[513],\"target\":[513],\"color\":[1],\"background\":[1],\"fontColor\":[1,\"font-color\"],\"textAlign\":[513,\"text-align\"],\"justify\":[516],\"styles\":[32],\"hovered\":[32]},null,{\"background\":[{\"setColors\":0}],\"color\":[{\"setColors\":0},{\"getSymbolColor\":0}],\"fontColor\":[{\"getSymbolColor\":0}]}]]],[\"cura-button-select.cjs\",[[257,\"cura-button-select\",{\"selected\":[1540],\"iconName\":[1537,\"icon-name\"],\"size\":[513],\"counter\":[1538],\"disabled\":[516],\"background\":[1],\"color\":[1],\"iconPosition\":[513,\"icon-position\"],\"hovered\":[32],\"styles\":[32]},null,{\"background\":[{\"setColors\":0}],\"color\":[{\"setColors\":0}]}]]],[\"cura-checkbox.cjs\",[[321,\"cura-checkbox\",{\"checked\":[1540],\"indeterminate\":[1540],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"label\":[513],\"ontabindex\":[514],\"position\":[513],\"value\":[513],\"name\":[513],\"size\":[513],\"background\":[1],\"iconColor\":[1,\"icon-color\"],\"color\":[1],\"overflowLabel\":[513,\"overflow-label\"],\"overflowHelper\":[513,\"overflow-helper\"],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"setColors\":0}],\"background\":[{\"setColors\":0},{\"assignColor\":0}],\"iconColor\":[{\"assignColor\":0}]}]]],[\"cura-icons-view.cjs\",[[1,\"cura-icons-view\",{\"selected\":[32]}]]],[\"cura-tabs-button.cjs\",[[257,\"cura-tabs-button\",{\"name\":[513],\"iconName\":[513,\"icon-name\"],\"counter\":[1538],\"selected\":[1540],\"disabled\":[1540],\"size\":[513],\"colorMode\":[1537,\"color-mode\"],\"hovered\":[32],\"styles\":[32]},null,{\"colorMode\":[{\"setColors\":0}]}]]],[\"cura-radio.cjs\",[[321,\"cura-radio\",{\"checked\":[1540],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"label\":[513],\"ontabindex\":[514],\"position\":[513],\"value\":[513],\"name\":[513],\"background\":[1],\"size\":[1],\"color\":[1],\"overflowLabel\":[513,\"overflow-label\"],\"overflowHelper\":[513,\"overflow-helper\"],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"setColors\":0}],\"background\":[{\"setColors\":0},{\"assignColor\":0}]}]]],[\"cura-tabs-transparent.cjs\",[[257,\"cura-tabs-transparent\",{\"name\":[513],\"iconName\":[513,\"icon-name\"],\"selected\":[1540],\"disabled\":[1540],\"borderBottom\":[1540,\"border-bottom\"],\"size\":[513],\"colorMode\":[1537,\"color-mode\"],\"hovered\":[32],\"styles\":[32]},null,{\"colorMode\":[{\"setColors\":0}]}]]],[\"cura-dropdown-search-not-found.cjs\",[[257,\"cura-dropdown-search-not-found\"]]],[\"cura-switch.cjs\",[[321,\"cura-switch\",{\"checked\":[1540],\"disabled\":[516],\"label\":[513],\"ontabindex\":[514],\"position\":[513],\"size\":[513],\"background\":[1],\"color\":[1],\"overflowLabel\":[513,\"overflow-label\"],\"overflowHelper\":[513,\"overflow-helper\"],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"setColors\":0}],\"background\":[{\"setColors\":0}]}]]],[\"cura-badge-dot.cjs\",[[1,\"cura-badge-dot\",{\"color\":[1],\"disabled\":[516],\"type\":[513],\"styles\":[32]}]]],[\"cura-display.cjs\",[[257,\"cura-display\",{\"level\":[514],\"size\":[513],\"spotColor\":[1,\"spot-color\"],\"color\":[1],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}],\"spotColor\":[{\"handleChangeColor\":0}]}]]],[\"cura-calendar.cjs\",[[1,\"cura-calendar\",{\"period\":[513],\"width\":[513],\"minWidth\":[513,\"min-width\"],\"maxWidth\":[513,\"max-width\"],\"mode\":[513],\"dateFormat\":[1537,\"date-format\"],\"locale\":[513],\"type\":[513],\"disable\":[16],\"enable\":[16],\"defaultDate\":[1537,\"default-date\"],\"showToday\":[516,\"show-today\"],\"customDates\":[16],\"limitRange\":[514,\"limit-range\"],\"disablePassDates\":[1540,\"disable-pass-dates\"],\"disableFutureDates\":[1540,\"disable-future-dates\"],\"collapsed\":[1540],\"floating\":[1540],\"embedded\":[1540],\"selectLabelColorMode\":[1537,\"select-label-color-mode\"],\"selectedDates\":[32],\"rangeStart\":[32],\"defaultDates\":[32],\"currentDate\":[32],\"selectMonth\":[32],\"selectYear\":[32],\"styles\":[32]},null,{\"defaultDate\":[{\"initializeDefaultDates\":0},{\"handleDefaultDateChange\":0}],\"customDates\":[{\"watchDefaultDatesArray\":0}]}]]],[\"cura-loader-bar.cjs\",[[1,\"cura-loader-bar\",{\"color\":[1],\"progress\":[2],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}],\"progress\":[{\"handleProgress\":0}]}]]],[\"cura-badge-pill.cjs\",[[257,\"cura-badge-pill\",{\"type\":[513],\"color\":[1],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"disabled\":[516],\"iconOnly\":[516,\"icon-only\"],\"borderRadius\":[513,\"border-radius\"],\"styles\":[32]},null,{\"color\":[{\"watchColorChange\":0}]}]]],[\"cura-progress-bar_2.cjs\",[[1,\"cura-stepper-item\",{\"displayHeading\":[516,\"display-heading\"],\"heading\":[513],\"label\":[513],\"status\":[513],\"styles\":[32]}],[257,\"cura-progress-bar\",{\"progressColor\":[513,\"progress-color\"],\"progress\":[514],\"size\":[514],\"strokeWidth\":[514,\"stroke-width\"],\"active\":[516]}]]],[\"cura-badge-counter.cjs\",[[1,\"cura-badge-counter\",{\"number\":[514],\"color\":[1],\"disabled\":[4],\"type\":[1],\"styles\":[32]},null,{\"disabled\":[{\"handleColorChange\":0}],\"color\":[{\"handleColorChange\":0}],\"type\":[{\"handleColorChange\":0}]}]]]]"), options);
12
+ return index.bootstrapLazy(JSON.parse("[[\"cura-accordion_22.cjs\",[[257,\"cura-dropdown-search\",{\"name\":[513],\"size\":[513],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"placeholder\":[513],\"label\":[513],\"icon\":[513],\"maxheight\":[513],\"value\":[1025],\"searchdelay\":[514],\"searchminchars\":[514],\"styles\":[32],\"zoomState\":[32],\"isOnFocus\":[32],\"dropdownItems\":[32],\"setFocus\":[64],\"selectOption\":[64]}],[321,\"cura-button\",{\"type\":[513],\"size\":[513],\"disabled\":[516],\"isLoading\":[516,\"is-loading\"],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconOnly\":[516,\"icon-only\"],\"href\":[513],\"target\":[513],\"color\":[1],\"background\":[513],\"fontColor\":[513,\"font-color\"],\"textAlign\":[513,\"text-align\"],\"justify\":[516],\"styles\":[32],\"hovered\":[32]},null,{\"background\":[{\"setColors\":0}],\"color\":[{\"setColors\":0}]}],[257,\"cura-accordion-item\",{\"label\":[513],\"iconSize\":[514,\"icon-size\"],\"labelIcon\":[513,\"label-icon\"],\"openIcon\":[513,\"open-icon\"],\"closeIcon\":[513,\"close-icon\"],\"iconColor\":[513,\"icon-color\"],\"colorMode\":[1,\"color-mode\"],\"level\":[514],\"opened\":[1540],\"styles\":[32]}],[257,\"cura-tabs\",{\"name\":[513],\"iconName\":[513,\"icon-name\"],\"selected\":[1540],\"disabled\":[1540],\"borderBottom\":[1540,\"border-bottom\"],\"size\":[513],\"colorMode\":[1537,\"color-mode\"],\"hovered\":[32],\"styles\":[32]},null,{\"colorMode\":[{\"setColors\":0}]}],[1,\"cura-badge-distance\",{\"distance\":[2],\"label\":[513],\"styles\":[32],\"displayDistance\":[32]},null,{\"distance\":[{\"formatDistance\":0}]}],[257,\"cura-dropdown-search-category\"],[257,\"cura-accordion\",{\"color\":[513],\"colorMode\":[513,\"color-mode\"],\"iconSize\":[514,\"icon-size\"],\"labelIcon\":[513,\"label-icon\"],\"openIcon\":[513,\"open-icon\"],\"closeIcon\":[513,\"close-icon\"],\"iconColor\":[513,\"icon-color\"],\"behavior\":[513],\"level\":[514],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}]}],[1,\"cura-avatar\",{\"size\":[1],\"backgroundColor\":[513,\"background-color\"],\"borderColor\":[513,\"border-color\"],\"borderRadius\":[513,\"border-radius\"],\"border\":[516],\"type\":[513],\"imageSrc\":[1537,\"image-src\"],\"imageSrcDefault\":[513,\"image-src-default\"],\"floating\":[516],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}]}],[257,\"cura-card\",{\"hasPadding\":[1028,\"has-padding\"],\"hasShadow\":[1028,\"has-shadow\"],\"type\":[1025],\"colorMode\":[1025,\"color-mode\"],\"href\":[1537],\"target\":[513],\"styles\":[32]}],[257,\"cura-dropdown-search-option\",{\"value\":[1],\"optionid\":[1],\"selectable\":[516],\"selected\":[516],\"highlighted\":[516]}],[257,\"cura-page-template\",{\"contentwidth\":[513]}],[257,\"cura-tabs-group\",{\"gap\":[514],\"borderBottom\":[1540,\"border-bottom\"],\"colorMode\":[1537,\"color-mode\"],\"styles\":[32]},[[0,\"tabSelect\",\"handleTabSelect\"]]],[1,\"cura-calendar\",{\"isDisabled\":[516,\"is-disabled\"],\"period\":[513],\"width\":[513],\"minWidth\":[513,\"min-width\"],\"maxWidth\":[513,\"max-width\"],\"mode\":[513],\"dateFormat\":[1537,\"date-format\"],\"locale\":[513],\"type\":[513],\"disable\":[16],\"enable\":[16],\"defaultDate\":[1537,\"default-date\"],\"showToday\":[516,\"show-today\"],\"customDates\":[16],\"limitRange\":[514,\"limit-range\"],\"disablePassDates\":[1540,\"disable-pass-dates\"],\"disableFutureDates\":[1540,\"disable-future-dates\"],\"collapsed\":[1540],\"floating\":[1540],\"embedded\":[1540],\"selectLabelColorMode\":[1537,\"select-label-color-mode\"],\"selectedDates\":[32],\"rangeStart\":[32],\"defaultDates\":[32],\"currentDate\":[32],\"selectMonth\":[32],\"selectYear\":[32],\"styles\":[32]},null,{\"defaultDate\":[{\"initializeDefaultDates\":0},{\"handleDefaultDateChange\":0}],\"customDates\":[{\"watchDefaultDatesArray\":0}]}],[321,\"cura-input-text\",{\"mode\":[1537],\"status\":[1537],\"size\":[1537],\"type\":[513],\"inputMode\":[513,\"input-mode\"],\"label\":[513],\"name\":[513],\"placeholder\":[513],\"value\":[1544],\"iconName\":[1537,\"icon-name\"],\"helperText\":[1537,\"helper-text\"],\"disabled\":[516],\"required\":[516],\"maskPreset\":[8,\"mask-preset\"],\"enableSelectionMode\":[1540,\"enable-selection-mode\"],\"maskRegex\":[1537,\"mask-regex\"],\"maskAdvanced\":[1544,\"mask-advanced\"],\"maxlength\":[1538],\"readOnly\":[516,\"read-only\"],\"isLoading\":[1540,\"is-loading\"],\"clearIcon\":[1540,\"clear-icon\"],\"hideErrorIcon\":[4,\"hide-error-icon\"],\"autocomplete\":[513],\"isHovered\":[32],\"isFocused\":[32],\"styles\":[32],\"setFocus\":[64]},null,{\"styles\":[{\"connectedCallback\":0}],\"size\":[{\"getClasses\":0}],\"status\":[{\"renderIcon\":0}],\"mode\":[{\"renderIcon\":0}],\"maskPreset\":[{\"initializeMask\":0}],\"maskRegex\":[{\"initializeMask\":0}],\"maskAdvanced\":[{\"initializeMask\":0}]}],[321,\"cura-select\",{\"label\":[513],\"placeholder\":[513],\"value\":[1537],\"mode\":[513],\"size\":[513],\"iconName\":[1,\"icon-name\"],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"searchBehavior\":[516,\"search-behavior\"],\"caseSensitive\":[516,\"case-sensitive\"],\"maxHeight\":[513,\"max-height\"],\"isHovered\":[32],\"isFocused\":[32],\"isOpen\":[32],\"isPositioned\":[32],\"menuStyle\":[32],\"options\":[32],\"activeIndex\":[32],\"preferredPlacement\":[32],\"textInput\":[32]},null,{\"activeIndex\":[{\"updateOptionHighlights\":0}],\"textInput\":[{\"filterOptions\":0}],\"value\":[{\"handleValueChange\":0}]}],[257,\"cura-select-option\",{\"value\":[513],\"selected\":[516],\"active\":[516],\"size\":[1],\"styles\":[32]},null,{\"size\":[{\"getSize\":0}]}],[321,\"cura-button-transparent\",{\"type\":[513],\"size\":[513],\"disabled\":[516],\"isLoading\":[516,\"is-loading\"],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconOnly\":[516,\"icon-only\"],\"href\":[513],\"target\":[513],\"color\":[513],\"fontColor\":[513,\"font-color\"],\"textAlign\":[513,\"text-align\"],\"justify\":[516],\"hovered\":[32],\"styles\":[32]},null,{\"fontColor\":[{\"getSymbolColor\":0}],\"color\":[{\"getSymbolColor\":0}]}],[257,\"cura-paragraph\",{\"size\":[513],\"spotColor\":[513,\"spot-color\"],\"color\":[513],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"textOverflow\":[513,\"text-overflow\"],\"styles\":[32]}],[257,\"cura-heading\",{\"level\":[514],\"size\":[513],\"weight\":[513],\"spotColor\":[513,\"spot-color\"],\"color\":[513],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"textOverflow\":[513,\"text-overflow\"],\"styles\":[32]}],[1,\"cura-loader-circle\",{\"size\":[513],\"color\":[513]}],[1,\"cura-icon\",{\"name\":[513],\"color\":[1],\"size\":[8],\"iconset\":[513],\"disabled\":[4]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"colorHandler\":0}],\"disabled\":[{\"colorHandler\":0}]}],[257,\"cura-label\",{\"size\":[513],\"weight\":[513],\"spotColor\":[513,\"spot-color\"],\"color\":[1],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"textOverflow\":[513,\"text-overflow\"],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}],\"spotColor\":[{\"handleChangeColor\":0}]}]]],[\"cura-input-date.cjs\",[[65,\"cura-input-date\",{\"label\":[513],\"status\":[1537],\"size\":[513],\"name\":[513],\"helperText\":[513,\"helper-text\"],\"enableRangeDates\":[516,\"enable-range-dates\"],\"disableFutureDates\":[516,\"disable-future-dates\"],\"disablePassDates\":[516,\"disable-pass-dates\"],\"iconName\":[513,\"icon-name\"],\"placeholder\":[513],\"calendarType\":[513,\"calendar-type\"],\"styles\":[32],\"isCalendarVisible\":[32],\"dates\":[32],\"value\":[32],\"dateSettings\":[32]},[[8,\"click\",\"handleClick\"]],{\"enableRangeDates\":[{\"updateDateSettings\":0}]}]]],[\"cura-stepper.cjs\",[[1,\"cura-stepper\",{\"activeStepIndex\":[514,\"active-step-index\"],\"errorInCurrentStep\":[516,\"error-in-current-step\"],\"displayHeading\":[516,\"display-heading\"],\"variant\":[513],\"steps\":[1],\"styles\":[32],\"stepList\":[32]}]]],[\"cura-tooltip.cjs\",[[257,\"cura-tooltip\",{\"elementId\":[1,\"element-id\"],\"interactive\":[4],\"delay\":[2],\"maxWidth\":[1,\"max-width\"],\"position\":[513],\"label\":[513],\"closeButton\":[516,\"close-button\"],\"isMobile\":[32]},[[9,\"resize\",\"onWindowResize\"],[9,\"scroll\",\"onWindowScroll\"]]]]],[\"cura-modal.cjs\",[[257,\"cura-modal\",{\"open\":[1540],\"background\":[1],\"top\":[2],\"bottom\":[2],\"left\":[2],\"right\":[2],\"mobileCloseLabel\":[513,\"mobile-close-label\"],\"canClose\":[516,\"can-close\"],\"zindex\":[513],\"styles\":[32]},null,{\"background\":[{\"setColors\":0}],\"top\":[{\"setTop\":0}],\"bottom\":[{\"setBottom\":0}],\"left\":[{\"setLeft\":0}],\"right\":[{\"setRight\":0}]}]]],[\"cura-toast.cjs\",[[257,\"cura-toast\",{\"type\":[1],\"position\":[1],\"icon\":[513],\"label\":[513],\"closeButton\":[516,\"close-button\"],\"loader\":[516],\"autoCloseDelay\":[514,\"auto-close-delay\"],\"styles\":[32],\"progress\":[32],\"close\":[64]},null,{\"type\":[{\"handleChangeType\":0}],\"position\":[{\"handleChangeType\":0}]}]]],[\"cura-alert.cjs\",[[257,\"cura-alert\",{\"type\":[1],\"floating\":[516],\"label\":[513],\"closeable\":[516],\"icon\":[513],\"styles\":[32]},null,{\"type\":[{\"setColors\":0}]}]]],[\"cura-button-outline.cjs\",[[321,\"cura-button-outline\",{\"type\":[513],\"size\":[513],\"disabled\":[516],\"isLoading\":[516,\"is-loading\"],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"iconPosition\":[513,\"icon-position\"],\"iconOnly\":[516,\"icon-only\"],\"href\":[513],\"target\":[513],\"color\":[1],\"background\":[1],\"fontColor\":[1,\"font-color\"],\"textAlign\":[513,\"text-align\"],\"justify\":[516],\"styles\":[32],\"hovered\":[32]},null,{\"background\":[{\"setColors\":0}],\"color\":[{\"setColors\":0},{\"getSymbolColor\":0}],\"fontColor\":[{\"getSymbolColor\":0}]}]]],[\"cura-button-select.cjs\",[[257,\"cura-button-select\",{\"selected\":[1540],\"iconName\":[1537,\"icon-name\"],\"size\":[513],\"counter\":[1538],\"disabled\":[516],\"background\":[1],\"color\":[1],\"iconPosition\":[513,\"icon-position\"],\"hovered\":[32],\"styles\":[32]},null,{\"background\":[{\"setColors\":0}],\"color\":[{\"setColors\":0}]}]]],[\"cura-checkbox.cjs\",[[321,\"cura-checkbox\",{\"checked\":[1540],\"indeterminate\":[1540],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"label\":[513],\"ontabindex\":[514],\"position\":[513],\"value\":[513],\"name\":[513],\"size\":[513],\"background\":[1],\"iconColor\":[1,\"icon-color\"],\"color\":[1],\"overflowLabel\":[513,\"overflow-label\"],\"overflowHelper\":[513,\"overflow-helper\"],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"setColors\":0}],\"background\":[{\"setColors\":0},{\"assignColor\":0}],\"iconColor\":[{\"assignColor\":0}]}]]],[\"cura-icons-view.cjs\",[[1,\"cura-icons-view\",{\"selected\":[32]}]]],[\"cura-tabs-button.cjs\",[[257,\"cura-tabs-button\",{\"name\":[513],\"iconName\":[513,\"icon-name\"],\"counter\":[1538],\"selected\":[1540],\"disabled\":[1540],\"size\":[513],\"colorMode\":[1537,\"color-mode\"],\"hovered\":[32],\"styles\":[32]},null,{\"colorMode\":[{\"setColors\":0}]}]]],[\"cura-radio.cjs\",[[321,\"cura-radio\",{\"checked\":[1540],\"status\":[1537],\"disabled\":[516],\"required\":[516],\"label\":[513],\"ontabindex\":[514],\"position\":[513],\"value\":[513],\"name\":[513],\"background\":[1],\"size\":[1],\"color\":[1],\"overflowLabel\":[513,\"overflow-label\"],\"overflowHelper\":[513,\"overflow-helper\"],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"setColors\":0}],\"background\":[{\"setColors\":0},{\"assignColor\":0}]}]]],[\"cura-tabs-transparent.cjs\",[[257,\"cura-tabs-transparent\",{\"name\":[513],\"iconName\":[513,\"icon-name\"],\"selected\":[1540],\"disabled\":[1540],\"borderBottom\":[1540,\"border-bottom\"],\"size\":[513],\"colorMode\":[1537,\"color-mode\"],\"hovered\":[32],\"styles\":[32]},null,{\"colorMode\":[{\"setColors\":0}]}]]],[\"cura-dropdown-search-not-found.cjs\",[[257,\"cura-dropdown-search-not-found\"]]],[\"cura-switch.cjs\",[[321,\"cura-switch\",{\"checked\":[1540],\"disabled\":[516],\"label\":[513],\"ontabindex\":[514],\"position\":[513],\"size\":[513],\"background\":[1],\"color\":[1],\"overflowLabel\":[513,\"overflow-label\"],\"overflowHelper\":[513,\"overflow-helper\"],\"styles\":[32]},null,{\"size\":[{\"sizeHandler\":0}],\"color\":[{\"setColors\":0}],\"background\":[{\"setColors\":0}]}]]],[\"cura-badge-dot.cjs\",[[1,\"cura-badge-dot\",{\"color\":[1],\"disabled\":[516],\"type\":[513],\"styles\":[32]}]]],[\"cura-display.cjs\",[[257,\"cura-display\",{\"level\":[514],\"size\":[513],\"spotColor\":[1,\"spot-color\"],\"color\":[1],\"marginBlock\":[513,\"margin-block\"],\"lineHeight\":[513,\"line-height\"],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}],\"spotColor\":[{\"handleChangeColor\":0}]}]]],[\"cura-loader-bar.cjs\",[[1,\"cura-loader-bar\",{\"color\":[1],\"progress\":[2],\"styles\":[32]},null,{\"color\":[{\"handleChangeColor\":0}],\"progress\":[{\"handleProgress\":0}]}]]],[\"cura-badge-pill.cjs\",[[257,\"cura-badge-pill\",{\"type\":[513],\"color\":[1],\"iconName\":[513,\"icon-name\"],\"iconset\":[513],\"disabled\":[516],\"iconOnly\":[516,\"icon-only\"],\"borderRadius\":[513,\"border-radius\"],\"styles\":[32]},null,{\"color\":[{\"watchColorChange\":0}]}]]],[\"cura-progress-bar_2.cjs\",[[1,\"cura-stepper-item\",{\"displayHeading\":[516,\"display-heading\"],\"heading\":[513],\"label\":[513],\"status\":[513],\"styles\":[32]}],[257,\"cura-progress-bar\",{\"progressColor\":[513,\"progress-color\"],\"progress\":[514],\"size\":[514],\"strokeWidth\":[514,\"stroke-width\"],\"active\":[516]}]]],[\"cura-badge-counter.cjs\",[[1,\"cura-badge-counter\",{\"number\":[514],\"color\":[1],\"disabled\":[4],\"type\":[1],\"styles\":[32]},null,{\"disabled\":[{\"handleColorChange\":0}],\"color\":[{\"handleColorChange\":0}],\"type\":[{\"handleColorChange\":0}]}]]]]"), options);
13
13
  };
14
14
 
15
15
  exports.setNonce = index.setNonce;
@@ -239,4 +239,31 @@
239
239
  border-radius: 4px;
240
240
  border: 1px solid #ccc;
241
241
  background: #f7f7f7;
242
+ }
243
+ :host .--disabled .icon::before {
244
+ display: none;
245
+ }
246
+ :host .--disabled .date {
247
+ cursor: initial;
248
+ }
249
+ @media (min-width: 992px) {
250
+ :host .--disabled .date:hover {
251
+ color: var(--neutral-dark);
252
+ cursor: initial;
253
+ background: none;
254
+ box-shadow: none;
255
+ }
256
+ }
257
+ :host .--disabled .default-dates {
258
+ background-color: transparent;
259
+ color: var(--neutral-dark) !important;
260
+ }
261
+ :host .--disabled .today {
262
+ border: 2px solid var(--neutral-dark);
263
+ color: var(--neutral-dark);
264
+ cursor: initial;
265
+ }
266
+ :host .--disabled .valid {
267
+ color: var(--neutral-dark);
268
+ font-weight: initial;
242
269
  }
@@ -4,6 +4,13 @@ import enAU from "date-fns/locale/en-AU";
4
4
  import ptBR from "date-fns/locale/pt-BR";
5
5
  export class CuraCalendar {
6
6
  constructor() {
7
+ /**
8
+ * Disable component
9
+ *
10
+ * @type {boolean}
11
+ * @default false
12
+ */
13
+ this.isDisabled = false;
7
14
  /**
8
15
  * An array of specific dates to be highlighted or processed.
9
16
  *
@@ -163,6 +170,33 @@ export class CuraCalendar {
163
170
  this.theme = window.CuraAPI.theme;
164
171
  this.weights = this.theme.fonts.getWeights();
165
172
  this.optionsLocale = { 'pt-BR': ptBR, 'en-US': enAU };
173
+ this.handlePrevMonth = () => {
174
+ if (this.isDisabled) {
175
+ return;
176
+ }
177
+ if (!this.collapsed) {
178
+ this.updateCurrentMonth('prev');
179
+ return;
180
+ }
181
+ this.updateCurrentWeek('prev');
182
+ };
183
+ this.handleNextMonth = () => {
184
+ if (this.isDisabled) {
185
+ return;
186
+ }
187
+ if (!this.collapsed) {
188
+ this.updateCurrentMonth('next');
189
+ return;
190
+ }
191
+ this.updateCurrentWeek('next');
192
+ };
193
+ this.renderItemWeekDays = (day, index) => {
194
+ const textColor = !this.isDisabled ? 'neutral-black' : 'neutral-medium';
195
+ return (h("cura-label", { class: "day", size: "xsmall", color: textColor, weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase()));
196
+ };
197
+ this.getDisabledClassModifier = () => {
198
+ return this.isDisabled ? ' --disabled' : '';
199
+ };
166
200
  }
167
201
  connectedCallback() {
168
202
  this.setFontProperties();
@@ -391,6 +425,9 @@ export class CuraCalendar {
391
425
  * @param {Date} date - The date that was clicked.
392
426
  */
393
427
  onDateClick(date) {
428
+ if (this.isDisabled) {
429
+ return;
430
+ }
394
431
  if (!this.isDateInValidPeriod(date) || this.isDateInDisabledPeriod(date) || !this.isDateInEnabledPeriod(date))
395
432
  return;
396
433
  const selectionHandlers = {
@@ -593,9 +630,9 @@ export class CuraCalendar {
593
630
  }
594
631
  render() {
595
632
  const { months } = this.fetchMonthNames();
596
- return (h(Host, { key: 'fc0c0ba9f7696dac1c23fbf333b7ebfa50fd17d7', style: this.getHostCSSProperties() }, h("div", { key: '12c069835f8ef50d9e5dd8c70b11619586efae4d', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, h("header", { key: '2131f1b2c16f7b0c07e1274cfb21d2efd9f863a8', class: "header" }, h("div", { key: '0c8920a9370fce33ab504f614871d22a8868b654', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: 'd9fb9f2aa6ecec2b1d078eca07094dbff7015ec6', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", color: this.determinePrevButtonColor(), onClick: !this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev') }), this.type === 'dropdown' ? (h("div", { class: "select" }, h("cura-select", { size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), h("cura-select", { size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (h("cura-label", { color: "neutral-black", size: "large" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), h("cura-icon", { key: '563b39493efe4f2ad2f8bfcdb6717b0c1e8f74fd', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), h("span", { key: '545eb91c68e19b5d8134e740b214c69cd504625a', class: "days-of-week" }, this.fetchWeekDays().map((day, index) => (h("cura-label", { class: "day", size: "xsmall", color: "neutral-black", weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase())))), h("div", { key: 'cee270aa873f773efa811f5a03207253724095c7', class: "dates" }, !this.collapsed
633
+ return (h(Host, { key: '0058175ddba56d4ddf6e1ba9aa6b66575f9bfb01', style: this.getHostCSSProperties() }, h("div", { key: 'fb70c1f051075f6b7904baef0733dd45d37b12a0', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''} ${this.getDisabledClassModifier()}`, style: this.styles }, h("header", { key: 'e109068ef54873f86212b6ec35090961ec3ea2d7', class: "header" }, h("div", { key: '1a03a0147439e7fe5da109f5ae315cf5b4e9f363', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: '916ff723610f006170cc6ad16a466d6643ff4537', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", disabled: this.isDisabled, color: this.determinePrevButtonColor(), onClick: this.handlePrevMonth }), this.type === 'dropdown' ? (h("div", { class: "select" }, h("cura-select", { disabled: this.isDisabled, size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), h("cura-select", { disabled: this.isDisabled, size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (h("cura-label", { color: !this.isDisabled ? 'neutral-black' : 'neutral-dark', size: "small" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), h("cura-icon", { key: '7989ae104c7ae55c93ce76756f8cdcc15625a9c9', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", disabled: this.isDisabled, color: "primary-base", onClick: this.handleNextMonth }))), h("span", { key: '15f1486afe03202f30352ec4efa1d21d39fffd73', class: "days-of-week" }, this.fetchWeekDays().map(this.renderItemWeekDays)), h("div", { key: '75f3070e86bdd892e5a48be48911b70ceac795a4', class: "dates" }, !this.collapsed
597
634
  ? this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
598
- : this.fetchDaysOfWeek().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))), this.collapsed !== null ? (this.collapsed ? (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { onClick: () => this.showNotColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "plusCircle" }, "Veja mais datas"))) : (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { onClick: () => this.showColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "minusCircle" }, "Veja menos datas")))) : null)));
635
+ : this.fetchDaysOfWeek().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))), this.collapsed !== null ? (this.collapsed ? (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { disabled: this.isDisabled, onClick: () => this.showNotColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "plusCircle" }, "Veja mais datas"))) : (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { onClick: () => this.showColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "minusCircle" }, "Veja menos datas")))) : null)));
599
636
  }
600
637
  static get is() { return "cura-calendar"; }
601
638
  static get encapsulation() { return "shadow"; }
@@ -611,6 +648,32 @@ export class CuraCalendar {
611
648
  }
612
649
  static get properties() {
613
650
  return {
651
+ "isDisabled": {
652
+ "type": "boolean",
653
+ "mutable": false,
654
+ "complexType": {
655
+ "original": "boolean",
656
+ "resolved": "boolean",
657
+ "references": {}
658
+ },
659
+ "required": false,
660
+ "optional": false,
661
+ "docs": {
662
+ "tags": [{
663
+ "name": "type",
664
+ "text": "{boolean}"
665
+ }, {
666
+ "name": "default",
667
+ "text": "false"
668
+ }],
669
+ "text": "Disable component"
670
+ },
671
+ "getter": false,
672
+ "setter": false,
673
+ "reflect": true,
674
+ "attribute": "is-disabled",
675
+ "defaultValue": "false"
676
+ },
614
677
  "period": {
615
678
  "type": "string",
616
679
  "mutable": false,
@@ -1,6 +1,7 @@
1
1
  const renderCuraCalendar = (args) => {
2
2
  return `
3
3
  <cura-calendar
4
+ ${args.isDisabled && `is-disabled="${args.isDisabled}"`}
4
5
  ${args.period && `period="${args.period}"`}
5
6
  ${args.width && `width="${args.width}"`}
6
7
  ${args.maxWidth && `max-width="${args.maxWidth}"`}
@@ -33,6 +34,14 @@ export default {
33
34
  return renderCuraCalendar(args);
34
35
  },
35
36
  argTypes: {
37
+ isDisabled: {
38
+ control: 'boolean',
39
+ description: 'Desabilita controles do componente.',
40
+ table: {
41
+ category: 'Properties',
42
+ defaultValue: { summary: false },
43
+ },
44
+ },
36
45
  period: {
37
46
  control: 'array',
38
47
  description: 'Define os períodos disponíveis para o calendário. Quando não informado, considera todas as datas como habilitadas',
@@ -193,6 +202,7 @@ export default {
193
202
  };
194
203
  export const Calendar = {
195
204
  args: {
205
+ isDisabled: false,
196
206
  period: [
197
207
  '2024-08-01',
198
208
  '2024-08-30',
@@ -1,3 +1,5 @@
1
+ /* Polyfill para suporte a Safari -16.5 */
2
+ import "element-internals-polyfill";
1
3
  import CuraThemeModule from "./api/modules/cura-theme-module";
2
4
  export function CuraInit(options, w = window) {
3
5
  w.CuraInit = options;
@@ -1 +1 @@
1
- import{C as o,d as p}from"./p-CpmZ68rD.js";const r=o,s=p;export{r as CuraCalendar,s as defineCustomElement}
1
+ import{C as o,d as r}from"./p-C05r6CQV.js";const s=o,p=r;export{s as CuraCalendar,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,k as s,i as a,j as i,t as r}from"./p-DBXUEjWh.js";import{d as n}from"./p-DXlGQp3a.js";import{i as o,a as l,d}from"./p-CpmZ68rD.js";import{d as c}from"./p-fn4zJrKE.js";import{d as h}from"./p-B8xnU6YS.js";import{d as u}from"./p-BSdkRryc.js";import{d as p}from"./p-Bf21UQXV.js";import{d as m}from"./p-DxJedO3K.js";import{d as b}from"./p-BYA8glxD.js";const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.dateChange=s(this,"dateChange"),this.statusInputChange=s(this,"statusInputChange"),this.label="",this.status="default",this.size="medium",this.name="",this.iconName="",this.placeholder=null,this.calendarType="dropdown",this.styles={},this.isCalendarVisible=!1,this.dates=[],this.value="",this.dateSettings={placeholder:null,mask:"date",mode:"single"}}connectedCallback(){const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme,a=t.getWeights();this.styles={"--base-spacing":s.getSpacing(),"--neutral-purewhite":e.getColor("neutral-purewhite"),"--neutral-lighter":e.getColor("neutral-lighter"),"--neutral-base":e.getColor("neutral-base"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":a.regular}}componentWillLoad(){this.updateDateSettings()}formAssociatedCallback(t){t.ariaLabel=this.label}updateDateSettings(){const t=this.getDateSettings(this.enableRangeDates);this.shouldUpdateDateSettings(t)&&(this.dateSettings=t)}getDateSettings(t){return{placeholder:this.placeholder||(t?"dd/mm/aaaa - dd/mm/aaaa":"dd/mm/aaaa"),mask:t?"dateRange":"date",mode:t?"range":"single"}}shouldUpdateDateSettings(t){return this.dateSettings.placeholder!==t.placeholder||this.dateSettings.mask!==t.mask||this.dateSettings.mode!==t.mode}handleClick(t){this.el.contains(t.target)||this.hideCalendar()}hideCalendar(){this.isCalendarVisible=!1}showCalendar(){this.isCalendarVisible=!0}handleInputDates(t){const e=t.target.value,s=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/,a=/^(\d{2}\/\d{2}\/\d{4})$/;if(s.test(e)){const t=e.match(s),a=this.parseStringToDate(t[1]),i=this.parseStringToDate(t[2]);this.isDateValid(a)&&this.isDateValid(i)?(this.status="default",this.dates=[a,i],this.value=`${this.parseDateToString(a)} - ${this.parseDateToString(i)}`,this.dateChange.emit(this.value)):this.resetDates()}else if(a.test(e)){const t=e.match(a),s=this.parseStringToDate(t[1]);this.isDateValid(s)?(this.status="default",this.dates=[s],this.value=this.parseDateToString(s),this.dateChange.emit(this.value)):this.resetDates()}else this.dates=[]}handleChangeDates(t){""===t.detail&&(this.dates=[],this.status="default",this.value="",this.dateChange.emit(this.value),this.statusInputChange.emit(this.status))}isDateValid(t){const e=new Date;return e.setHours(0,0,0,0),this.disablePassDates?!o(t,e):!this.disableFutureDates||!l(t,e)}parseStringToDate(t){const[e,s,a]=t.split("/").map(Number);return new Date(a,s-1,e)}parseDateToString(t){return`${(t.getDate()+"").padStart(2,"0")}/${(t.getMonth()+1+"").padStart(2,"0")}/${t.getFullYear()}`}resetDates(){this.status="error",this.dates=[],this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){return this.isCalendarVisible?a("div",{class:"calendar visible"},a("cura-calendar",{customDates:this.dates,mode:this.dateSettings.mode,type:this.calendarType||"dropdown",width:"100%",maxWidth:"400px",embedded:!1,floating:!1,disableFutureDates:this.disableFutureDates,disablePassDates:this.disablePassDates,onOnchangeday:t=>{const e=t.detail.days;this.value=1===e.length?this.parseDateToString(e[0]):e.length>0?`${this.parseDateToString(e[0])} - ${this.parseDateToString(e[e.length-1])}`:"",this.dateChange.emit(this.value)}})):this.helperText}render(){return a(i,{key:"a274509eede61a43a6677fbf20dc4645c745d41d"},a("div",{key:"857056581ab374e280ab442aecc49d6b93a21cd2",class:"container",style:this.styles},a("cura-input-text",{key:"417fd4a96ea71a747f7fee55e7a5b524c6b51ef5",label:this.label,name:this.name,status:this.status,value:this.value,onFocus:()=>this.showCalendar(),size:this.size,"icon-name":this.iconName,placeholder:this.dateSettings.placeholder,"mask-preset":this.dateSettings.mask,"enable-selection-mode":!0,onKeyUp:t=>this.handleInputDates(t),autocomplete:"off",onValueChange:t=>this.handleChangeDates(t)},this.renderCalendarOrHelperText())))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{enableRangeDates:[{updateDateSettings:0}]}}static get style(){return":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--cura-spacing-base) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;top:100%;z-index:10;display:none;opacity:0;pointer-events:none}.container .calendar.visible{box-sizing:border-box;display:block;opacity:1;pointer-events:all;width:100%;background-color:#fff}"}},[65,"cura-input-date",{label:[513],status:[1537],size:[513],name:[513],helperText:[513,"helper-text"],enableRangeDates:[516,"enable-range-dates"],disableFutureDates:[516,"disable-future-dates"],disablePassDates:[516,"disable-pass-dates"],iconName:[513,"icon-name"],placeholder:[513],calendarType:[513,"calendar-type"],styles:[32],isCalendarVisible:[32],dates:[32],value:[32],dateSettings:[32]},[[8,"click","handleClick"]],{enableRangeDates:[{updateDateSettings:0}]}]),g=f,D=function(){"undefined"!=typeof customElements&&["cura-input-date","cura-button-transparent","cura-calendar","cura-icon","cura-input-text","cura-label","cura-loader-circle","cura-select","cura-select-option"].forEach((t=>{switch(t){case"cura-input-date":customElements.get(r(t))||customElements.define(r(t),f);break;case"cura-button-transparent":customElements.get(r(t))||n();break;case"cura-calendar":customElements.get(r(t))||d();break;case"cura-icon":customElements.get(r(t))||c();break;case"cura-input-text":customElements.get(r(t))||h();break;case"cura-label":customElements.get(r(t))||u();break;case"cura-loader-circle":customElements.get(r(t))||p();break;case"cura-select":customElements.get(r(t))||m();break;case"cura-select-option":customElements.get(r(t))||b()}}))};export{g as CuraInputDate,D as defineCustomElement}
1
+ import{p as t,H as e,k as s,i as a,j as i,t as r}from"./p-DBXUEjWh.js";import{d as n}from"./p-DXlGQp3a.js";import{i as o,a as l,d}from"./p-C05r6CQV.js";import{d as c}from"./p-fn4zJrKE.js";import{d as h}from"./p-B8xnU6YS.js";import{d as u}from"./p-BSdkRryc.js";import{d as p}from"./p-Bf21UQXV.js";import{d as m}from"./p-DxJedO3K.js";import{d as b}from"./p-BYA8glxD.js";const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.dateChange=s(this,"dateChange"),this.statusInputChange=s(this,"statusInputChange"),this.label="",this.status="default",this.size="medium",this.name="",this.iconName="",this.placeholder=null,this.calendarType="dropdown",this.styles={},this.isCalendarVisible=!1,this.dates=[],this.value="",this.dateSettings={placeholder:null,mask:"date",mode:"single"}}connectedCallback(){const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme,a=t.getWeights();this.styles={"--base-spacing":s.getSpacing(),"--neutral-purewhite":e.getColor("neutral-purewhite"),"--neutral-lighter":e.getColor("neutral-lighter"),"--neutral-base":e.getColor("neutral-base"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":a.regular}}componentWillLoad(){this.updateDateSettings()}formAssociatedCallback(t){t.ariaLabel=this.label}updateDateSettings(){const t=this.getDateSettings(this.enableRangeDates);this.shouldUpdateDateSettings(t)&&(this.dateSettings=t)}getDateSettings(t){return{placeholder:this.placeholder||(t?"dd/mm/aaaa - dd/mm/aaaa":"dd/mm/aaaa"),mask:t?"dateRange":"date",mode:t?"range":"single"}}shouldUpdateDateSettings(t){return this.dateSettings.placeholder!==t.placeholder||this.dateSettings.mask!==t.mask||this.dateSettings.mode!==t.mode}handleClick(t){this.el.contains(t.target)||this.hideCalendar()}hideCalendar(){this.isCalendarVisible=!1}showCalendar(){this.isCalendarVisible=!0}handleInputDates(t){const e=t.target.value,s=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/,a=/^(\d{2}\/\d{2}\/\d{4})$/;if(s.test(e)){const t=e.match(s),a=this.parseStringToDate(t[1]),i=this.parseStringToDate(t[2]);this.isDateValid(a)&&this.isDateValid(i)?(this.status="default",this.dates=[a,i],this.value=`${this.parseDateToString(a)} - ${this.parseDateToString(i)}`,this.dateChange.emit(this.value)):this.resetDates()}else if(a.test(e)){const t=e.match(a),s=this.parseStringToDate(t[1]);this.isDateValid(s)?(this.status="default",this.dates=[s],this.value=this.parseDateToString(s),this.dateChange.emit(this.value)):this.resetDates()}else this.dates=[]}handleChangeDates(t){""===t.detail&&(this.dates=[],this.status="default",this.value="",this.dateChange.emit(this.value),this.statusInputChange.emit(this.status))}isDateValid(t){const e=new Date;return e.setHours(0,0,0,0),this.disablePassDates?!o(t,e):!this.disableFutureDates||!l(t,e)}parseStringToDate(t){const[e,s,a]=t.split("/").map(Number);return new Date(a,s-1,e)}parseDateToString(t){return`${(t.getDate()+"").padStart(2,"0")}/${(t.getMonth()+1+"").padStart(2,"0")}/${t.getFullYear()}`}resetDates(){this.status="error",this.dates=[],this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){return this.isCalendarVisible?a("div",{class:"calendar visible"},a("cura-calendar",{customDates:this.dates,mode:this.dateSettings.mode,type:this.calendarType||"dropdown",width:"100%",maxWidth:"400px",embedded:!1,floating:!1,disableFutureDates:this.disableFutureDates,disablePassDates:this.disablePassDates,onOnchangeday:t=>{const e=t.detail.days;this.value=1===e.length?this.parseDateToString(e[0]):e.length>0?`${this.parseDateToString(e[0])} - ${this.parseDateToString(e[e.length-1])}`:"",this.dateChange.emit(this.value)}})):this.helperText}render(){return a(i,{key:"a274509eede61a43a6677fbf20dc4645c745d41d"},a("div",{key:"857056581ab374e280ab442aecc49d6b93a21cd2",class:"container",style:this.styles},a("cura-input-text",{key:"417fd4a96ea71a747f7fee55e7a5b524c6b51ef5",label:this.label,name:this.name,status:this.status,value:this.value,onFocus:()=>this.showCalendar(),size:this.size,"icon-name":this.iconName,placeholder:this.dateSettings.placeholder,"mask-preset":this.dateSettings.mask,"enable-selection-mode":!0,onKeyUp:t=>this.handleInputDates(t),autocomplete:"off",onValueChange:t=>this.handleChangeDates(t)},this.renderCalendarOrHelperText())))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{enableRangeDates:[{updateDateSettings:0}]}}static get style(){return":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--cura-spacing-base) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;top:100%;z-index:10;display:none;opacity:0;pointer-events:none}.container .calendar.visible{box-sizing:border-box;display:block;opacity:1;pointer-events:all;width:100%;background-color:#fff}"}},[65,"cura-input-date",{label:[513],status:[1537],size:[513],name:[513],helperText:[513,"helper-text"],enableRangeDates:[516,"enable-range-dates"],disableFutureDates:[516,"disable-future-dates"],disablePassDates:[516,"disable-pass-dates"],iconName:[513,"icon-name"],placeholder:[513],calendarType:[513,"calendar-type"],styles:[32],isCalendarVisible:[32],dates:[32],value:[32],dateSettings:[32]},[[8,"click","handleClick"]],{enableRangeDates:[{updateDateSettings:0}]}]),g=f,x=function(){"undefined"!=typeof customElements&&["cura-input-date","cura-button-transparent","cura-calendar","cura-icon","cura-input-text","cura-label","cura-loader-circle","cura-select","cura-select-option"].forEach((t=>{switch(t){case"cura-input-date":customElements.get(r(t))||customElements.define(r(t),f);break;case"cura-button-transparent":customElements.get(r(t))||n();break;case"cura-calendar":customElements.get(r(t))||d();break;case"cura-icon":customElements.get(r(t))||c();break;case"cura-input-text":customElements.get(r(t))||h();break;case"cura-label":customElements.get(r(t))||u();break;case"cura-loader-circle":customElements.get(r(t))||p();break;case"cura-select":customElements.get(r(t))||m();break;case"cura-select-option":customElements.get(r(t))||b()}}))};export{g as CuraInputDate,x as defineCustomElement}
@@ -1 +1 @@
1
- import{T as t,a as o,b as i,c as e,d as a,e as n,t as c}from"./p-DBXUEjWh.js";export{g as getAssetPath,r as render,s as setAssetPath,f as setNonce,h as setPlatformOptions}from"./p-DBXUEjWh.js";import{S as u}from"./p-B8xnU6YS.js";import{CuraAccordion as m}from"./cura-accordion.js";import{CuraAccordionItem as l}from"./cura-accordion-item.js";import{CuraAlert as p}from"./cura-alert.js";import{CuraAvatar as d}from"./cura-avatar.js";import{CuraBadgeCounter as j}from"./cura-badge-counter.js";import{CuraBadgeDistance as b}from"./cura-badge-distance.js";import{CuraBadgeDot as w}from"./cura-badge-dot.js";import{CuraBadgePill as v}from"./cura-badge-pill.js";import{CuraButton as y}from"./cura-button.js";import{CuraButtonOutline as $}from"./cura-button-outline.js";import{CuraButtonSelect as S}from"./cura-button-select.js";import{CuraButtonTransparent as C}from"./cura-button-transparent.js";import{CuraCalendar as k}from"./cura-calendar.js";import{CuraCard as x}from"./cura-card.js";import{CuraCheckbox as E}from"./cura-checkbox.js";import{CuraDisplay as O}from"./cura-display.js";import{CuraDropdownSearch as D}from"./cura-dropdown-search.js";import{CuraDropdownSearchCategory as A}from"./cura-dropdown-search-category.js";import{CuraDropdownSearchNotFound as P}from"./cura-dropdown-search-not-found.js";import{CuraDropdownSearchOption as W}from"./cura-dropdown-search-option.js";import{CuraHeading as B}from"./cura-heading.js";import{CuraIcon as N}from"./cura-icon.js";import{CuraIconsView as T}from"./cura-icons-view.js";import{CuraInputDate as U}from"./cura-input-date.js";import{CuraInputText as _}from"./cura-input-text.js";import{CuraLabel as z}from"./cura-label.js";import{CuraLoaderBar as F}from"./cura-loader-bar.js";import{CuraLoaderCircle as J}from"./cura-loader-circle.js";import{CuraModal as R}from"./cura-modal.js";import{CuraPageTemplate as X}from"./cura-page-template.js";import{CuraParagraph as G}from"./cura-paragraph.js";import{CuraProgressBar as I}from"./cura-progress-bar.js";import{CuraRadio as L}from"./cura-radio.js";import{CuraSelect as V}from"./cura-select.js";import{CuraSelectOption as Y}from"./cura-select-option.js";import{CuraStepper as q}from"./cura-stepper.js";import{CuraStepperItem as H}from"./cura-stepper-item.js";import{CuraSwitch as K}from"./cura-switch.js";import{CuraTabs as M}from"./cura-tabs.js";import{CuraTabsButton as Q}from"./cura-tabs-button.js";import{CuraTabsGroup as Z}from"./cura-tabs-group.js";import{CuraTabsTransparent as tt}from"./cura-tabs-transparent.js";import{CuraToast as rt}from"./cura-toast.js";import{CuraTooltip as ot}from"./cura-tooltip.js";const st={default:n,maternidade:a,oncologia:e,richet:i,perinatalTemp:o,legacyDefault:t};class it{constructor(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"},this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}getColor(t="primary-base",r=1){const{color:o,depth:s}=this.splitColorDepth(t);return this.getStatic(o,s,r)||this.getDynamic(o,s,r)}getStatic(t,r,o=1){var s,i,e;if(!u.color[t])return null;const a="neutral"===t?this.NeutralDepthAlias[r]:this.ColorDepthAlias[r];return(null===(s=u.color[t])||void 0===s?void 0:s[a])?`rgba(${null===(i=u.color[t])||void 0===i?void 0:i[a]}, ${o})`:`rgba(${null===(e=u.color[t])||void 0===e?void 0:e[r]}, ${o})`}getDynamic(t,r,o){const s=this.ColorDepthAlias[r]?`--cura-color-${t}-${this.ColorDepthAlias[r]}`:`--cura-color-${t}-${r}`;return getComputedStyle(document.documentElement).getPropertyValue(s)?`rgba(var(${s}), ${o})`:`rgba(var(--cura-color-primary-500), ${o})`}splitColorDepth(t){const[r,o]=t.toLowerCase().split(/-(.*)/);return{color:null!=r?r:"primary",depth:null!=o?o:"base"}}}class et{constructor(){this.curaSpacing="--cura-spacing-base"}getSpacing(){return getComputedStyle(document.body).getPropertyValue(this.curaSpacing)?`var(${this.curaSpacing})`:"4"}}class at{constructor(){this.getSize=()=>"var(--cura-font-size)",this.getColor=()=>"var(--cura-font-color)"}getFamily(t="body"){const r="--cura-font-"+t.toLowerCase();return getComputedStyle(document.body).getPropertyValue(r)?`var(${r})`:"var(--cura-font-body)"}getWeights(){const t={};return Object.keys(n.font.weights).forEach((r=>t[r]=`var(--cura-font-weights-${r})`)),t}}class nt{constructor(){}get(t=null,r=null){if(t){const o=r?u.breakpoints[t][r]:u.breakpoints[t];if(o||0===o)return o}return u.breakpoints}}class ct{constructor(){var t;this.prefix="--cura",this.colors=new it,this.spacing=new et,this.fonts=new at,this.breakpoints=new nt,this.groupObject={},this.setCssVar=(t,r)=>{const o=this.groupPath(r,t[0]);this.rootElement.style.setProperty(o,t[1])},this.groupPath=(t,r)=>`${t}-${r}`,this.isObject=t=>t&&"object"==typeof t&&!Array.isArray(t),this.mergeObject=(t,r)=>{const o=Object.entries(t);for(let t of o)this.isObject(t[1])?this.mergeObject(t[1],r[t[0]]):r[t[0]]=t[1]},this.buildCssVars=(t,r,o=!1)=>{const s=Object.entries(r);for(let r of s)if(this.isObject(r[1]))this.buildCssVars(this.groupPath(t,r[0]),r[1],o);else if(o){const o=this.groupPath(t,r[0]);this.groupObject[o]=r[1]}else this.setCssVar(r,t)},"undefined"!=typeof window&&(this.rootElement=null===(t=null===window||void 0===window?void 0:window.document)||void 0===t?void 0:t.documentElement)}load(t="default"){this.buildCssVars(this.prefix,st[t]?st[t]:st.default)}loadVarsSSR(t="default"){return this.buildCssVars(this.prefix,st[t]?st[t]:st.default,!0),this.groupObject}setCustom(t){const r=t.name;if(r in st)console.log("Error building custom theme. Theme %s already exists. Loading default theme.",r),this.load("default");else{const o=Object.assign({},JSON.parse(JSON.stringify(t.fromPreset&&t.fromPreset in st?st[t.fromPreset]:st.default)));this.mergeObject(t.definitions,o),st[r]=o,this.load(r)}}}class ut{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";const r=new ct;this.theme={load:function(t){r.load(t)},setCustom:function(t){r.setCustom(t)},colors:{getColor:function(t,o){return r.colors.getColor(t,o)}},fonts:{getFamily:function(t){return r.fonts.getFamily(t)},getWeights:function(){return r.fonts.getWeights()},getSize:function(){return r.fonts.getSize()},getColor:function(){return r.fonts.getColor()}},spacing:{getSpacing:function(){return r.spacing.getSpacing()}},breakpoints:{get:function(t,o){return r.breakpoints.get(t,o)}}},this._addGlobalClasses(),t&&t.customTheme?this.theme.setCustom(t.customTheme):this.theme.load(t&&t.theme?t.theme:"default")}_addGlobalClasses(){const t="cura_global_classes";let r=document.head.querySelector("#"+t);r||(r=document.createElement("style"),r.id=t,r.textContent="\n .cura-body-scroll-lock {\n overflow: hidden;\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n }\n ",document.head.appendChild(r))}}function mt(t,r=window){r.CuraInit=t}function lt(t){return(new ct).loadVarsSSR(t)}(function(){const t=window.CuraInit;window.CuraAPI=t?new ut(t):new ut;const r=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:r}})),t&&"function"==typeof t.onReady&&t.onReady(r)}||(()=>{}))();const pt=t=>{"undefined"!=typeof customElements&&[m,l,p,d,j,b,w,v,y,$,S,C,k,x,E,O,D,A,P,W,B,N,T,U,_,z,F,J,R,X,G,I,L,V,Y,q,H,K,M,Q,Z,tt,rt,ot].forEach((r=>{customElements.get(c(r.is))||customElements.define(c(r.is),r,t)}))};export{mt as CuraInit,lt as InitVarsTheme,pt as defineCustomElements}
1
+ import{T as t,a as e,b as a,c as i,d as o,e as n,t as l}from"./p-DBXUEjWh.js";export{g as getAssetPath,r as render,s as setAssetPath,f as setNonce,h as setPlatformOptions}from"./p-DBXUEjWh.js";import{S as c}from"./p-B8xnU6YS.js";import{CuraAccordion as u}from"./cura-accordion.js";import{CuraAccordionItem as d}from"./cura-accordion-item.js";import{CuraAlert as m}from"./cura-alert.js";import{CuraAvatar as p}from"./cura-avatar.js";import{CuraBadgeCounter as w}from"./cura-badge-counter.js";import{CuraBadgeDistance as b}from"./cura-badge-distance.js";import{CuraBadgeDot as y}from"./cura-badge-dot.js";import{CuraBadgePill as v}from"./cura-badge-pill.js";import{CuraButton as j}from"./cura-button.js";import{CuraButtonOutline as E}from"./cura-button-outline.js";import{CuraButtonSelect as M}from"./cura-button-select.js";import{CuraButtonTransparent as T}from"./cura-button-transparent.js";import{CuraCalendar as x}from"./cura-calendar.js";import{CuraCard as F}from"./cura-card.js";import{CuraCheckbox as k}from"./cura-checkbox.js";import{CuraDisplay as O}from"./cura-display.js";import{CuraDropdownSearch as S}from"./cura-dropdown-search.js";import{CuraDropdownSearchCategory as C}from"./cura-dropdown-search-category.js";import{CuraDropdownSearchNotFound as I}from"./cura-dropdown-search-not-found.js";import{CuraDropdownSearchOption as V}from"./cura-dropdown-search-option.js";import{CuraHeading as L}from"./cura-heading.js";import{CuraIcon as $}from"./cura-icon.js";import{CuraIconsView as W}from"./cura-icons-view.js";import{CuraInputDate as D}from"./cura-input-date.js";import{CuraInputText as H}from"./cura-input-text.js";import{CuraLabel as R}from"./cura-label.js";import{CuraLoaderBar as A}from"./cura-loader-bar.js";import{CuraLoaderCircle as N}from"./cura-loader-circle.js";import{CuraModal as P}from"./cura-modal.js";import{CuraPageTemplate as B}from"./cura-page-template.js";import{CuraParagraph as z}from"./cura-paragraph.js";import{CuraProgressBar as U}from"./cura-progress-bar.js";import{CuraRadio as _}from"./cura-radio.js";import{CuraSelect as q}from"./cura-select.js";import{CuraSelectOption as J}from"./cura-select-option.js";import{CuraStepper as X}from"./cura-stepper.js";import{CuraStepperItem as G}from"./cura-stepper-item.js";import{CuraSwitch as K}from"./cura-switch.js";import{CuraTabs as Y}from"./cura-tabs.js";import{CuraTabsButton as Q}from"./cura-tabs-button.js";import{CuraTabsGroup as Z}from"./cura-tabs-group.js";import{CuraTabsTransparent as tt}from"./cura-tabs-transparent.js";import{CuraToast as et}from"./cura-toast.js";import{CuraTooltip as rt}from"./cura-tooltip.js";const at={default:n,maternidade:o,oncologia:i,richet:a,perinatalTemp:e,legacyDefault:t};class it{constructor(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"},this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}getColor(t="primary-base",e=1){const{color:r,depth:a}=this.splitColorDepth(t);return this.getStatic(r,a,e)||this.getDynamic(r,a,e)}getStatic(t,e,r=1){var a,i,o;if(!c.color[t])return null;const n="neutral"===t?this.NeutralDepthAlias[e]:this.ColorDepthAlias[e];return(null===(a=c.color[t])||void 0===a?void 0:a[n])?`rgba(${null===(i=c.color[t])||void 0===i?void 0:i[n]}, ${r})`:`rgba(${null===(o=c.color[t])||void 0===o?void 0:o[e]}, ${r})`}getDynamic(t,e,r){const a=this.ColorDepthAlias[e]?`--cura-color-${t}-${this.ColorDepthAlias[e]}`:`--cura-color-${t}-${e}`;return getComputedStyle(document.documentElement).getPropertyValue(a)?`rgba(var(${a}), ${r})`:`rgba(var(--cura-color-primary-500), ${r})`}splitColorDepth(t){const[e,r]=t.toLowerCase().split(/-(.*)/);return{color:null!=e?e:"primary",depth:null!=r?r:"base"}}}class ot{constructor(){this.curaSpacing="--cura-spacing-base"}getSpacing(){return getComputedStyle(document.body).getPropertyValue(this.curaSpacing)?`var(${this.curaSpacing})`:"4"}}class nt{constructor(){this.getSize=()=>"var(--cura-font-size)",this.getColor=()=>"var(--cura-font-color)"}getFamily(t="body"){const e="--cura-font-"+t.toLowerCase();return getComputedStyle(document.body).getPropertyValue(e)?`var(${e})`:"var(--cura-font-body)"}getWeights(){const t={};return Object.keys(n.font.weights).forEach((e=>t[e]=`var(--cura-font-weights-${e})`)),t}}class st{constructor(){}get(t=null,e=null){if(t){const r=e?c.breakpoints[t][e]:c.breakpoints[t];if(r||0===r)return r}return c.breakpoints}}class lt{constructor(){var t;this.prefix="--cura",this.colors=new it,this.spacing=new ot,this.fonts=new nt,this.breakpoints=new st,this.groupObject={},this.setCssVar=(t,e)=>{const r=this.groupPath(e,t[0]);this.rootElement.style.setProperty(r,t[1])},this.groupPath=(t,e)=>`${t}-${e}`,this.isObject=t=>t&&"object"==typeof t&&!Array.isArray(t),this.mergeObject=(t,e)=>{const r=Object.entries(t);for(let t of r)this.isObject(t[1])?this.mergeObject(t[1],e[t[0]]):e[t[0]]=t[1]},this.buildCssVars=(t,e,r=!1)=>{const a=Object.entries(e);for(let e of a)if(this.isObject(e[1]))this.buildCssVars(this.groupPath(t,e[0]),e[1],r);else if(r){const r=this.groupPath(t,e[0]);this.groupObject[r]=e[1]}else this.setCssVar(e,t)},"undefined"!=typeof window&&(this.rootElement=null===(t=null===window||void 0===window?void 0:window.document)||void 0===t?void 0:t.documentElement)}load(t="default"){this.buildCssVars(this.prefix,at[t]?at[t]:at.default)}loadVarsSSR(t="default"){return this.buildCssVars(this.prefix,at[t]?at[t]:at.default,!0),this.groupObject}setCustom(t){const e=t.name;if(e in at)console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e),this.load("default");else{const r=Object.assign({},JSON.parse(JSON.stringify(t.fromPreset&&t.fromPreset in at?at[t.fromPreset]:at.default)));this.mergeObject(t.definitions,r),at[e]=r,this.load(e)}}}class ct{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";const e=new lt;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t,r){return e.colors.getColor(t,r)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}},spacing:{getSpacing:function(){return e.spacing.getSpacing()}},breakpoints:{get:function(t,r){return e.breakpoints.get(t,r)}}},this._addGlobalClasses(),t&&t.customTheme?this.theme.setCustom(t.customTheme):this.theme.load(t&&t.theme?t.theme:"default")}_addGlobalClasses(){const t="cura_global_classes";let e=document.head.querySelector("#"+t);e||(e=document.createElement("style"),e.id=t,e.textContent="\n .cura-body-scroll-lock {\n overflow: hidden;\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n }\n ",document.head.appendChild(e))}}const ut=function(){const t=window.CuraInit;window.CuraAPI=t?new ct(t):new ct;const e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}})),t&&"function"==typeof t.onReady&&t.onReady(e)}||(()=>{}),dt=new WeakMap,mt=new WeakMap,ft=new WeakMap,ht=new WeakMap,pt=new WeakMap,wt=new WeakMap,bt=new WeakMap,yt=new WeakMap,gt=new WeakMap,vt=new WeakMap,jt=new WeakMap,Et=new WeakMap,Mt=new WeakMap,Tt=new WeakMap,xt=new WeakMap,Ft=(t,e,r)=>{t.getAttribute(e)!==r&&t.setAttribute(e,r)},kt=(t,e)=>{t.toggleAttribute("internals-disabled",e),e?Ft(t,"aria-disabled","true"):t.removeAttribute("aria-disabled"),t.formDisabledCallback&&t.formDisabledCallback.call(t,e)},Ot=t=>{ft.get(t).forEach((t=>{t.remove()})),ft.set(t,[])},St=(t,e)=>{const r=document.createElement("input");return r.type="hidden",r.name=t.getAttribute("name"),t.after(r),ft.get(e).push(r),r},Ct=(t,e)=>{if(e.length){const r=Array.from(e);r.forEach((e=>e.addEventListener("click",t.click.bind(t))));const[a]=r;let i=a.id;a.id||(i=a.htmlFor+"_Label",a.id=i),Ft(t,"aria-labelledby",i)}},It=t=>{const e=Array.from(t.elements).filter((t=>!t.tagName.includes("-")&&t.validity)).map((t=>t.validity.valid)),r=yt.get(t)||[],a=[...e,...Array.from(r).filter((t=>t.isConnected)).map((t=>ht.get(t).validity.valid))].includes(!1);t.toggleAttribute("internals-invalid",a),t.toggleAttribute("internals-valid",!a)},Vt=t=>{It(Dt(t.target))},Lt=t=>{It(Dt(t.target))},$t=t=>{const e=yt.get(t.target);e&&e.size&&e.forEach((t=>{t.constructor.formAssociated&&t.formResetCallback&&t.formResetCallback.apply(t)}))},Wt=(t,e,r)=>{if(e){const a=yt.get(e);if(a)a.add(t);else{const r=new Set;r.add(t),yt.set(e,r),(t=>{const e=["button[type=submit]","input[type=submit]","button:not([type])"].map((t=>t+":not([disabled])")).map((e=>`${e}:not([form])${t.id?`,${e}[form='${t.id}']`:""}`)).join(",");t.addEventListener("click",(r=>{if(r.target.closest(e)){const e=yt.get(t);if(t.noValidate)return;e.size&&Array.from(e).reverse().map((t=>ht.get(t).reportValidity())).includes(!1)&&r.preventDefault()}}))})(e),e.addEventListener("reset",$t),e.addEventListener("input",Vt),e.addEventListener("change",Lt)}wt.set(e,{ref:t,internals:r}),t.constructor.formAssociated&&t.formAssociatedCallback&&setTimeout((()=>{t.formAssociatedCallback.call(t,e)}),0),It(e)}},Dt=t=>{let e=t.parentNode;return e&&"FORM"!==e.tagName&&(e=Dt(e)),e},Ht=(t,e,r=DOMException)=>{if(!t.constructor.formAssociated)throw new r(e)},Rt=(t,e,r)=>{const a=yt.get(t);return a&&a.size&&a.forEach((t=>{ht.get(t)[r]()||(e=!1)})),e},At=t=>{let e=!1;if(t.constructor.formAssociated){let r=ht.get(t);void 0===r&&(t.attachInternals(),r=ht.get(t),e=!0);const{labels:a,form:i}=r;Ct(t,a),Wt(t,i,r)}return e};function Nt(){return"undefined"!=typeof MutationObserver}const Pt={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"};function Bt(t){const e=ht.get(t),{form:r}=e;Wt(t,r,e),Ct(t,e.labels)}const zt=(t,e=!1)=>{const r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>ht.has(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=r.nextNode();const i=!e||t.disabled;for(;a;)a.formDisabledCallback&&i&&kt(a,t.disabled),a=r.nextNode()},Ut={attributes:!0,attributeFilter:["disabled","name"]},_t=Nt()?new MutationObserver((t=>{for(const e of t){const t=e.target;if("disabled"===e.attributeName&&(t.constructor.formAssociated?kt(t,t.hasAttribute("disabled")):"fieldset"===t.localName&&zt(t)),"name"===e.attributeName&&t.constructor.formAssociated){const e=ht.get(t),r=gt.get(t);e.setFormValue(r)}}})):{};function qt(t){t.forEach((t=>{const{addedNodes:e,removedNodes:r}=t,a=Array.from(e),i=Array.from(r);a.forEach((t=>{if(ht.has(t)&&t.constructor.formAssociated&&Bt(t),vt.has(t)){const e=vt.get(t);Object.keys(Pt).filter((t=>null!==e[t])).forEach((r=>{Ft(t,Pt[r],e[r])})),vt.delete(t)}if(xt.has(t)){const e=xt.get(t);Ft(t,"internals-valid",""+e.validity.valid),Ft(t,"internals-invalid",""+!e.validity.valid),Ft(t,"aria-invalid",""+!e.validity.valid),xt.delete(t)}if("form"===t.localName){const e=yt.get(t),r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>!ht.has(t)||!t.constructor.formAssociated||e&&e.has(t)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});let a=r.nextNode();for(;a;)Bt(a),a=r.nextNode()}"fieldset"===t.localName&&(_t.observe?.(t,Ut),zt(t,!0))})),i.forEach((t=>{const e=ht.get(t);e&&ft.get(e)&&Ot(e),bt.has(t)&&bt.get(t).disconnect()}))}))}function Jt(t){t.forEach((t=>{const{removedNodes:e}=t;e.forEach((e=>{const r=Mt.get(t.target);ht.has(e)&&At(e),r.disconnect()}))}))}!Nt()||new MutationObserver(qt);const Xt={childList:!0,subtree:!0};class Gt{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const Kt=new WeakMap;function Yt(t,e){t.toggleAttribute(e,!0),t.part&&t.part.add(e)}class Qt extends Set{static get isPolyfilled(){return!0}constructor(t){if(super(),!t||!t.tagName||-1===t.tagName.indexOf("-"))throw new TypeError("Illegal constructor");Kt.set(this,t)}add(t){if(!/^--/.test(t)||"string"!=typeof t)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);const e=super.add(t),r=Kt.get(this),a="state"+t;return r.isConnected?Yt(r,a):setTimeout((()=>{Yt(r,a)})),e}clear(){for(let[t]of this.entries())this.delete(t);super.clear()}delete(t){const e=super.delete(t),r=Kt.get(this);return r.isConnected?(r.toggleAttribute("state"+t,!1),r.part&&r.part.remove("state"+t)):setTimeout((()=>{r.toggleAttribute("state"+t,!1),r.part&&r.part.remove("state"+t)})),e}}var Zt,te=function(t,e,r,a){if("a"===r&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(t):a?a.value:e.get(t)};class ee{constructor(t){Zt.set(this,void 0),function(t,e,r,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===a?i.call(t,r):i?i.value=r:e.set(t,r)}(this,Zt,t,"f");for(let e=0;e<t.length;e++){let r=t[e];this[e]=r,r.hasAttribute("name")&&(this[r.getAttribute("name")]=r)}Object.freeze(this)}get length(){return te(this,Zt,"f").length}[(Zt=new WeakMap,Symbol.iterator)](){return te(this,Zt,"f")[Symbol.iterator]()}item(t){return null==this[t]?null:this[t]}namedItem(t){return null==this[t]?null:this[t]}}class re{static get isPolyfilled(){return!0}constructor(t){if(!t||!t.tagName||-1===t.tagName.indexOf("-"))throw new TypeError("Illegal constructor");const e=t.getRootNode(),r=new Gt;this.states=new Qt(t),dt.set(this,t),mt.set(this,r),ht.set(t,this),((t,e)=>{for(let r in Pt){e[r]=null;let a=null;const i=Pt[r];Object.defineProperty(e,r,{get:()=>a,set(r){a=r,t.isConnected?Ft(t,i,r):vt.set(t,e)}})}})(t,this),(t=>{ft.set(this,[]),_t.observe?.(t,Ut)})(t),Object.seal(this),e instanceof DocumentFragment&&(t=>{const e=new MutationObserver(Jt);window?.ShadyDOM?.inUse&&t.mode&&t.host&&(t=t.host),e.observe?.(t,{childList:!0}),Mt.set(t,e)})(e)}checkValidity(){const t=dt.get(this);if(Ht(t,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const e=mt.get(this);if(!e.valid){const e=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});t.dispatchEvent(e)}return e.valid}get form(){const t=dt.get(this);let e;return Ht(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."),!0===t.constructor.formAssociated&&(e=Dt(t)),e}get labels(){const t=dt.get(this);Ht(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const e=t.getAttribute("id"),r=t.getRootNode();return r&&e?r.querySelectorAll(`[for="${e}"]`):[]}reportValidity(){const t=dt.get(this);if(Ht(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const e=this.checkValidity(),r=Et.get(this);if(r&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!e&&r&&(t.focus(),r.focus()),e}setFormValue(t){const e=dt.get(this);Ht(e,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Ot(this),null==t||t instanceof FormData?null!=t&&t instanceof FormData&&Array.from(t).reverse().forEach((([t,r])=>{if("string"==typeof r){const a=St(e,this);a.name=t,a.value=r}})):e.getAttribute("name")&&(St(e,this).value=t),gt.set(e,t)}setValidity(t,e,r){const a=dt.get(this);if(Ht(a,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!t)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");Et.set(this,r);const i=mt.get(this),o={};for(const e in t)o[e]=t[e];0===Object.keys(o).length&&(t=>{t.badInput=!1,t.customError=!1,t.patternMismatch=!1,t.rangeOverflow=!1,t.rangeUnderflow=!1,t.stepMismatch=!1,t.tooLong=!1,t.tooShort=!1,t.typeMismatch=!1,t.valid=!0,t.valueMissing=!1})(i);const n={...i,...o};delete n.valid;const{valid:s}=((t,e,r)=>(t.valid=(t=>{let e=!0;for(let r in t)"valid"!==r&&!1!==t[r]&&(e=!1);return e})(e),Object.keys(e).forEach((r=>t[r]=e[r])),r&&It(r),t))(i,n,this.form);if(!s&&!e)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");pt.set(this,s?"":e),a.isConnected?(a.toggleAttribute("internals-invalid",!s),a.toggleAttribute("internals-valid",s),Ft(a,"aria-invalid",""+!s)):xt.set(a,this)}get shadowRoot(){const t=dt.get(this);return jt.get(t)||null}get validationMessage(){const t=dt.get(this);return Ht(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),pt.get(this)}get validity(){const t=dt.get(this);return Ht(t,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),mt.get(this)}get willValidate(){const t=dt.get(this);return Ht(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.matches(":disabled")||t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}let ae=!1,ie=!1;function oe(t){ie||(ie=!0,window.CustomStateSet=Qt,t&&(HTMLElement.prototype.attachInternals=function(...e){const r=t.call(this,e);return r.states=new Qt(this),r}))}function ne(t,e=window){e.CuraInit=t}function se(t){return(new lt).loadVarsSSR(t)}!!customElements.polyfillWrapFlushCallback||(function(){if("undefined"==typeof window||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class t extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const e="element-internals-feature-detection-"+Math.random().toString(36).replace(/[^a-z]+/g,"");customElements.define(e,t);const r=new t;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every((t=>t in r.internals))}()?"undefined"==typeof window||window.CustomStateSet||oe(HTMLElement.prototype.attachInternals):function(t=!0){let e=!1;if(!ae){if(ae=!0,"undefined"!=typeof window&&(window.ElementInternals=re),"undefined"!=typeof CustomElementRegistry){const r=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(t,a,i){if(a.formAssociated){const t=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){Tt.has(this)||(Tt.set(this,!0),this.hasAttribute("disabled")&&kt(this,!0)),null!=t&&t.apply(this),e=At(this)}}r.call(this,t,a,i)}}if("undefined"!=typeof HTMLElement&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(-1===this.tagName.indexOf("-"))throw Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");if(ht.has(this)&&!e)throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new re(this)}),"undefined"!=typeof Element){function a(...t){const e=i.apply(this,t);if(jt.set(this,e),Nt()){const t=new MutationObserver(qt);window.ShadyDOM?t.observe(this,Xt):t.observe(e,Xt),bt.set(this,t)}return e}const i=Element.prototype.attachShadow;Element.prototype.attachShadow=a}Nt()&&"undefined"!=typeof document&&new MutationObserver(qt).observe(document.documentElement,Xt),"undefined"!=typeof HTMLFormElement&&function(){const t=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=function(...e){let r=t.apply(this,e);return Rt(this,r,"checkValidity")};const e=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=function(...t){let r=e.apply(this,t);return Rt(this,r,"reportValidity")};const{get:r}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...t){const e=r.call(this,...t),a=Array.from(yt.get(this)||[]);if(0===a.length)return e;const i=Array.from(e).concat(a).sort(((t,e)=>t.compareDocumentPosition?2&t.compareDocumentPosition(e)?1:-1:0));return new ee(i)}})}(),(t||"undefined"!=typeof window&&!window.CustomStateSet)&&oe()}}(!1)),ut();const le=t=>{"undefined"!=typeof customElements&&[u,d,m,p,w,b,y,v,j,E,M,T,x,F,k,O,S,C,I,V,L,$,W,D,H,R,A,N,P,B,z,U,_,q,J,X,G,K,Y,Q,Z,tt,et,rt].forEach((e=>{customElements.get(l(e.is))||customElements.define(l(e.is),e,t)}))};export{ne as CuraInit,se as InitVarsTheme,le as defineCustomElements}