popover#toggle\" data-action=\"mouseenter->popover#show mouseleave->popover#hide\">\n\nimport { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['content']\n static values = {\n dismissAfter: Number,\n open: { type: Boolean, default: false }\n }\n\n openValueChanged() {\n transition(this.contentTarget, this.openValue)\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n }\n\n // If already true, extend the dismissal another X seconds since this will not trigger openValueChanged\n show(event) {\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n this.openValue = true\n }\n\n hide() {\n this.openValue = false\n }\n\n toggle() {\n this.openValue = !this.openValue\n }\n\n get shouldAutoDismiss() {\n return (this.openValue && this.hasDismissAfterValue)\n }\n\n scheduleDismissal() {\n if (!this.hasDismissAfterValue) return\n\n // Cancel any existing dismissals\n this.cancelDismissal()\n\n // Schedule the next dismissal\n this.timeoutId = setTimeout(() => {\n this.hide()\n this.timeoutId = undefined\n }, this.dismissAfterValue)\n }\n\n cancelDismissal() {\n if (typeof this.timeoutId === \"number\") {\n clearTimeout(this.timeoutId)\n this.timeoutId = undefined\n }\n }\n}\n", "import Dropdown from './dropdown.js'\nimport { transition } from './transition'\n\nexport default class extends Dropdown {\n static targets = ['overlay', 'close']\n\n openValueChanged() {\n transition(this.overlayTarget, this.openValue)\n transition(this.menuTarget, this.openValue)\n if (this.hasCloseTarget) transition(this.closeTarget, this.openValue)\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static classes = [ \"activeTab\", \"inactiveTab\" ]\n static targets = ['tab', 'panel', 'select']\n static values = {\n index: 0,\n updateAnchor: Boolean,\n scrollToAnchor: Boolean,\n }\n\n initialize() {\n if (this.anchor) this.indexValue = this.tabTargets.findIndex((tab) => tab.id === this.anchor)\n }\n\n connect() {\n this.showTab()\n }\n\n // Changes to the clicked tab\n change(event) {\n if (event.currentTarget.tagName === \"SELECT\") {\n this.indexValue = event.currentTarget.selectedIndex\n\n // If target specifies an index, use that\n } else if (event.currentTarget.dataset.index) {\n this.indexValue = event.currentTarget.dataset.index\n\n // If target specifies an id, use that\n } else if (event.currentTarget.dataset.id) {\n this.indexValue = this.tabTargets.findIndex((tab) => tab.id == event.currentTarget.dataset.id)\n\n // Otherwise, use the index of the current target\n } else {\n this.indexValue = this.tabTargets.indexOf(event.currentTarget)\n }\n\n window.dispatchEvent(new CustomEvent('tsc:tab-change'))\n }\n\n nextTab() {\n this.indexValue = Math.min(this.indexValue + 1, this.tabsCount - 1)\n }\n\n previousTab() {\n this.indexValue = Math.max(this.indexValue - 1, 0)\n }\n\n firstTab() {\n this.indexValue = 0\n }\n\n lastTab() {\n this.indexValue = this.tabsCount - 1\n }\n\n indexValueChanged() {\n this.showTab()\n\n // Update URL with the tab ID if it has one\n // This will be automatically selected on page load\n if (this.updateAnchorValue) {\n const new_tab_id = this.tabTargets[this.indexValue].id // Grab the id from the newly activated tab\n if (this.scrollToAnchorValue){\n location.hash = new_tab_id // Use location.hash to change the URL with scrolling\n } else {\n const currentUrl = window.location.href // Get the current URL\n const newUrl = currentUrl.split('#')[0] + '#' + new_tab_id // Create a new URL with the updated ID\n history.replaceState({}, document.title, newUrl) // Use history.replaceState to change the URL without scrolling\n }\n }\n }\n\n showTab() {\n this.panelTargets.forEach((panel, index) => {\n const tab = this.tabTargets[index]\n\n if (index === this.indexValue) {\n panel.classList.remove('hidden')\n if (this.hasInactiveTabClass) tab?.classList?.remove(...this.inactiveTabClasses)\n if (this.hasActiveTabClass) tab?.classList?.add(...this.activeTabClasses)\n } else {\n panel.classList.add('hidden')\n if (this.hasActiveTabClass) tab?.classList?.remove(...this.activeTabClasses)\n if (this.hasInactiveTabClass) tab?.classList?.add(...this.inactiveTabClasses)\n }\n })\n\n if (this.hasSelectTarget) {\n this.selectTarget.selectedIndex = this.indexValue\n }\n }\n\n get tabsCount() {\n return this.tabTargets.length\n }\n\n get anchor() {\n return (document.URL.split('#').length > 1) ? document.URL.split('#')[1] : null;\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['toggleable']\n static values = {\n open: { type: Boolean, default: false }\n }\n\n toggle(event) {\n this.openValue = !this.openValue\n this.animate()\n }\n\n // Sets open to value of checkbox or radio\n toggleInput(event) {\n this.openValue = event.target.checked\n this.animate()\n }\n\n hide() {\n this.openValue = false\n this.animate()\n }\n\n show() {\n this.openValue = true\n this.animate()\n }\n\n animate() {\n this.toggleableTargets.forEach(target => {\n transition(target, this.openValue)\n })\n }\n}\n"],
- "mappings": "4xBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,aAAAC,EAAA,iBAAAC,EAAA,aAAAC,EAAA,UAAAC,EAAA,YAAAC,EAAA,cAAAC,EAAA,SAAAC,EAAA,WAAAC,IAAA,eAAAC,EAAAX,GCAA,IAAAY,EAA2B,8BCO3B,eAAsBC,EAAWC,EAASC,EAAOC,EAAoB,CAAC,EAAG,CACjED,EACJE,EAAMH,EAASE,CAAiB,EAEhCE,EAAMJ,EAASE,CAAiB,CAEpC,CASA,eAAsBC,EAAMH,EAASE,EAAoB,CAAC,EAAG,CAC3D,IAAMG,EAAoBL,EAAQ,QAAQ,iBAAmBE,EAAkB,OAAS,QAClFI,EACJN,EAAQ,QAAQ,qBAAuBE,EAAkB,WAAa,aAClEK,EAAYP,EAAQ,QAAQ,mBAAqBE,EAAkB,SAAW,WAC9EM,EAAcR,EAAQ,QAAQ,aAAeE,EAAkB,aAAe,SAGpFF,EAAQ,UAAU,IAAI,GAAGK,EAAkB,MAAM,GAAG,CAAC,EACrDL,EAAQ,UAAU,IAAI,GAAGM,EAAY,MAAM,GAAG,CAAC,EAC/CN,EAAQ,UAAU,OAAO,GAAGO,EAAU,MAAM,GAAG,CAAC,EAChDP,EAAQ,UAAU,OAAO,GAAGQ,EAAY,MAAM,GAAG,CAAC,EAElD,MAAMC,EAAU,EAEhBT,EAAQ,UAAU,OAAO,GAAGM,EAAY,MAAM,GAAG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AO,EACP,aAAc,QACd,eAAgB,OAClB,GCTF,IAAAQ,EAA2B,8BAG3B,IAAOC,EAAP,cAA6B,YAAW,CAMtC,OAAOC,EAAO,CACZ,KAAK,UAAY,CAAC,KAAK,UACvB,KAAK,QAAQ,CACf,CAGA,YAAYA,EAAO,CACjB,KAAK,UAAYA,EAAM,OAAO,QAC9B,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,SAAU,CACR,KAAK,kBAAkB,QAAQC,GAAU,CACvCC,EAAWD,EAAQ,KAAK,SAAS,CACnC,CAAC,CACH,CACF,EA/BEE,EADKJ,EACE,UAAU,CAAC,YAAY,GAC9BI,EAFKJ,EAEE,SAAS,CACd,KAAM,CAAE,KAAM,QAAS,QAAS,EAAM,CACxC",
- "names": ["src_exports", "__export", "alert_default", "autosave_default", "color_preview_default", "dropdown_default", "modal_default", "popover_default", "slideover_default", "tabs_default", "toggle_default", "__toCommonJS", "import_stimulus", "transition", "element", "state", "transitionOptions", "enter", "leave", "transitionClasses", "fromClasses", "toClasses", "toggleClass", "nextFrame", "afterTransition", "resolve", "animation", "alert_default", "enter", "leave", "__publicField", "import_stimulus", "autosave_default", "message", "__publicField", "import_stimulus", "color_preview_default", "color", "yiqColor", "hexColor", "yiqThreshold", "r", "g", "b", "__publicField", "import_stimulus", "_initializeDropdownActions", "initializeDropdownActions_fn", "dropdown_default", "__privateAdd", "__privateMethod", "transition", "event", "actions", "__publicField", "import_stimulus", "modal_default", "__publicField", "import_stimulus", "popover_default", "transition", "event", "__publicField", "slideover_default", "dropdown_default", "transition", "__publicField", "import_stimulus", "tabs_default", "tab", "event", "new_tab_id", "newUrl", "panel", "index", "__publicField", "import_stimulus", "toggle_default", "event", "target", "transition", "__publicField"]
+ "sourcesContent": ["export { default as Alert } from './alert'\nexport { default as Autosave } from './autosave'\nexport { default as ColorPreview } from './color_preview'\nexport { default as Dropdown } from './dropdown'\nexport { default as Modal } from './modal'\nexport { default as Popover } from './popover'\nexport { default as Slideover } from './slideover'\nexport { default as Tabs } from './tabs'\nexport { default as Toggle } from './toggle'\n", "import { Controller } from '@hotwired/stimulus'\nimport { enter, leave } from \"./transition\"\n\nexport default class extends Controller {\n static values = {\n dismissAfter: Number,\n showDelay: { type: Number, default: 0 },\n removeDelay: { type: Number, default: 1100 }\n }\n\n connect() {\n setTimeout(() => {\n enter(this.element)\n }, this.showDelayValue)\n\n // Auto dimiss if defined\n if (this.hasDismissAfterValue) {\n setTimeout(() => {\n this.close()\n }, this.dismissAfterValue)\n }\n }\n\n // Runs hide animation and then removes element from the page\n close() {\n leave(this.element).then(() => {\n this.element.remove()\n })\n }\n}\n", "// Enter transition:\n//\n// transition(this.element, true)\n//\n// Leave transition:\n//\n// transition(this.element, false)\nexport async function transition(element, state, transitionOptions = {}) {\n if (!!state) {\n enter(element, transitionOptions)\n } else {\n leave(element, transitionOptions)\n }\n}\n\n// class=\"fixed inset-0 bg-black overflow-y-auto flex items-center justify-center bg-opacity-80 hidden\"\n// data-transition-enter=\"transition-all ease-in-out duration-300\"\n// data-transition-enter-from=\"bg-opacity-0\"\n// data-transition-enter-to=\"bg-opacity-80\"\n// data-transition-leave=\"transition-all ease-in-out duration-300\"\n// data-transition-leave-from=\"bg-opacity-80\"\n// data-transition-leave-to=\"bg-opacity-0\"\nexport async function enter(element, transitionOptions = {}) {\n const transitionClasses = element.dataset.transitionEnter || transitionOptions.enter || 'enter'\n const fromClasses =\n element.dataset.transitionEnterFrom || transitionOptions.enterFrom || 'enter-from'\n const toClasses = element.dataset.transitionEnterTo || transitionOptions.enterTo || 'enter-to'\n const toggleClass = element.dataset.toggleClass || transitionOptions.toggleClass || 'hidden'\n\n // Prepare transition\n element.classList.add(...transitionClasses.split(' '))\n element.classList.add(...fromClasses.split(' '))\n element.classList.remove(...toClasses.split(' '))\n element.classList.remove(...toggleClass.split(' '))\n\n await nextFrame()\n\n element.classList.remove(...fromClasses.split(' '))\n element.classList.add(...toClasses.split(' '))\n\n try {\n await afterTransition(element)\n } finally {\n element.classList.remove(...transitionClasses.split(' '))\n }\n}\n\nexport async function leave(element, transitionOptions = {}) {\n const transitionClasses = element.dataset.transitionLeave || transitionOptions.leave || 'leave'\n const fromClasses =\n element.dataset.transitionLeaveFrom || transitionOptions.leaveFrom || 'leave-from'\n const toClasses = element.dataset.transitionLeaveTo || transitionOptions.leaveTo || 'leave-to'\n const toggleClass = element.dataset.toggleClass || transitionOptions.toogle || 'hidden'\n\n // Prepare transition\n element.classList.add(...transitionClasses.split(' '))\n element.classList.add(...fromClasses.split(' '))\n element.classList.remove(...toClasses.split(' '))\n\n await nextFrame()\n\n element.classList.remove(...fromClasses.split(' '))\n element.classList.add(...toClasses.split(' '))\n\n try {\n await afterTransition(element)\n } finally {\n element.classList.remove(...transitionClasses.split(' '))\n element.classList.add(...toggleClass.split(' '))\n }\n}\n\nfunction nextFrame() {\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n requestAnimationFrame(resolve)\n })\n })\n}\n\nfunction afterTransition(element) {\n return Promise.all(element.getAnimations().map(animation => animation.finished))\n}\n", "// Form autosave\n//\n// <%= form_with(model: post, data: { controller: \"autosave\", autosave_target: \"form\", action: \"turbo:submit-end->autosave#success turbo:fetch-request-error->autosave#error\" }) do |form| %>\n//
\n// <%= form.label :title %>\n// <%= form.text_field :title, class: 'form-control', data: { action: \"keyup->autosave#save\" } %>\n//
\n// <% end %>\n\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['form', 'status']\n static values = {\n submitDuration: {type: Number, default: 1000},\n statusDuration: {type: Number, default: 2000},\n submittingText: {type: String, default: \"Saving...\"},\n successText: {type: String, default: \"Saved!\"},\n errorText: {type: String, default: \"Unable to save.\"}\n }\n\n connect() {\n this.timeout = null\n }\n\n save() {\n clearTimeout(this.timeout)\n\n this.timeout = setTimeout(() => {\n this.statusTarget.textContent = this.submittingTextValue\n this.formTarget.requestSubmit()\n }, this.submitDurationValue)\n }\n\n success() {\n this.setStatus(this.successTextValue)\n }\n\n error() {\n this.setStatus(this.errorTextValue)\n }\n\n setStatus(message) {\n this.statusTarget.textContent = message\n\n this.timeout = setTimeout(() => {\n this.statusTarget.textContent = ''\n }, this.statusDurationValue)\n }\n}\n", "// A color picker preview where you can choose to have the color or backgroundColor\n// get updated based on the result of a color picker. It also supports ensuring\n// the foreground text is always readable by performing a YIQ calculation to\n// set the text to black or white based on the contrast of the color and backgroundColor.\n\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['preview', 'color'];\n static values = {\n style: {type: String, default: \"backgroundColor\"}\n }\n\n update() {\n this.preview = this.colorTarget.value\n }\n\n set preview(color) {\n this.previewTarget.style[this.styleValue] = color\n\n // Ensure the foreground text is always readable by setting either the\n // backgroundColor or color to black or white.\n const yiqColor = this._getContrastYIQ(color)\n\n if (this.styleValue === 'color') {\n this.previewTarget.style.backgroundColor = yiqColor\n } else {\n this.previewTarget.style.color = yiqColor\n }\n }\n\n _getContrastYIQ(hexColor) {\n // Taken from: https://24ways.org/2010/calculating-color-contrast/\n hexColor = hexColor.replace('#', '');\n\n const yiqThreshold = 128;\n const r = parseInt(hexColor.substr(0, 2), 16);\n const g = parseInt(hexColor.substr(2, 2), 16);\n const b = parseInt(hexColor.substr(4, 2), 16);\n const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;\n\n return (yiq >= yiqThreshold) ? '#000' : '#fff';\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\nimport { transition } from './transition'\n\nexport default class extends Controller {\n static targets = ['menu', 'button', 'menuItem']\n static values = {\n open: { type: Boolean, default: false },\n closeOnEscape: { type: Boolean, default: true },\n closeOnClickOutside: { type: Boolean, default: true },\n }\n\n static classes = ['enter', 'enterFrom', 'enterTo', 'leave', 'leaveFrom', 'leaveTo', 'toggle']\n\n // lifecycle\n connect() {\n document.addEventListener(\"turbo:before-cache\", this.beforeCache.bind(this))\n this.#initializeDropdownActions()\n }\n\n disconnect() {\n document.removeEventListener(\"turbo:before-cache\", this.beforeCache.bind(this))\n\n if (this.hasButtonTarget) {\n this.buttonTarget.removeEventListener(\"keydown\", this._onMenuButtonKeydown)\n this.buttonTarget.removeAttribute(\"aria-haspopup\")\n }\n }\n\n // callbacks\n openValueChanged() {\n transition(this.menuTarget, this.openValue, this.transitionOptions)\n\n if (this.openValue === true && this.hasMenuItemTarget) {\n this.menuItemTargets[0].focus()\n }\n }\n\n // actions\n show() {\n this.openValue = true\n }\n\n close() {\n this.openValue = false\n }\n\n hide(event) {\n // if the event is a click and the target is not inside the dropdown, then close it\n if (\n this.closeOnClickOutsideValue &&\n event.target.nodeType &&\n this.element.contains(event.target) === false &&\n this.openValue\n ) {\n this.openValue = false\n }\n\n // if the event is a keydown and the key is escape, then close it\n if (this.closeOnEscapeValue && event.key === 'Escape' && this.openValue) {\n this.openValue = false\n }\n }\n\n toggle() {\n this.openValue = !this.openValue\n }\n\n nextItem(event) {\n event.preventDefault()\n\n this.menuItemTargets[this.nextIndex].focus()\n }\n\n previousItem(event) {\n event.preventDefault()\n\n this.menuItemTargets[this.previousIndex].focus()\n }\n\n // getters and setters\n get currentItemIndex() {\n return this.menuItemTargets.indexOf(document.activeElement)\n }\n\n get nextIndex() {\n return Math.min(this.currentItemIndex + 1, this.menuItemTargets.length - 1)\n }\n\n get previousIndex() {\n return Math.max(this.currentItemIndex - 1, 0)\n }\n\n get transitionOptions() {\n // once the Class API default values are available, we can simplify this\n return {\n enter: this.hasEnterClass ? this.enterClass : 'transition ease-out duration-100',\n enterFrom: this.hasEnterFromClass ? this.enterFromClass : 'transform opacity-0 scale-95',\n enterTo: this.hasEnterToClass ? this.enterToClass : 'transform opacity-100 scale-100',\n leave: this.hasLeaveClass ? this.leaveClass : 'transition ease-in duration-75',\n leaveFrom: this.hasLeaveFromClass ? this.leaveFromClass : 'transform opacity-100 scale-100',\n leaveTo: this.hasLeaveToClass ? this.leaveToClass : 'transform opacity-0 scale-95',\n toggleClass: this.hasToggleClass ? this.toggleClass : 'hidden',\n }\n }\n\n // private\n\n #initializeDropdownActions() {\n // this will set the necessary actions on the dropdown element for it to work\n // data-action=\"click->dropdown#toggle click@window->dropdown#hide keydown.up->dropdown#previousItem keydown.down->dropdown#nextItem\"\n // Note: If existing actions are already specified by the user, they will be preserved and augmented without any redundancy.\n\n const actions = this.element.dataset.action ? this.element.dataset.action.split(' ') : []\n actions.push('click->dropdown#toggle')\n actions.push('click@window->dropdown#hide')\n actions.push('keydown.up->dropdown#previousItem')\n actions.push('keydown.down->dropdown#nextItem')\n actions.push('keydown.esc->dropdown#hide')\n this.element.dataset.action = [...new Set(actions)].join(' ')\n }\n\n // Ensures the menu is hidden before Turbo caches the page\n beforeCache() {\n this.openValue = false\n this.menuTarget.classList.add(\"hidden\")\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { enter, leave } from \"./transition\"\n\nexport default class extends Controller {\n static targets = [\"dialog\"]\n static values = {\n open: Boolean\n }\n\n connect() {\n if (this.openValue) this.showModal()\n }\n\n showModal() {\n this.dialogTarget.showModal()\n }\n\n show() {\n this.dialogTarget.show()\n }\n\n close() {\n this.dialogTarget.close()\n }\n}\n", "// A simple inline popover to be used wherever needed, with a configurable offset.\n// Visit The Stimulus Handbook for more details\n// https://stimulusjs.org/handbook/introduction\n//\n// This example controller works with specially annotated HTML like:\n//\n//
\n// which shows you local search results before normal organic results.\n//\n//\n// You can also toggle the popover using the click action.\n//
popover#toggle\" data-action=\"mouseenter->popover#show mouseleave->popover#hide\">\n\nimport { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['content']\n static values = {\n dismissAfter: Number,\n open: { type: Boolean, default: false }\n }\n\n openValueChanged() {\n transition(this.contentTarget, this.openValue)\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n }\n\n // If already true, extend the dismissal another X seconds since this will not trigger openValueChanged\n show(event) {\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n this.openValue = true\n }\n\n hide() {\n this.openValue = false\n }\n\n toggle() {\n this.openValue = !this.openValue\n }\n\n get shouldAutoDismiss() {\n return (this.openValue && this.hasDismissAfterValue)\n }\n\n scheduleDismissal() {\n if (!this.hasDismissAfterValue) return\n\n // Cancel any existing dismissals\n this.cancelDismissal()\n\n // Schedule the next dismissal\n this.timeoutId = setTimeout(() => {\n this.hide()\n this.timeoutId = undefined\n }, this.dismissAfterValue)\n }\n\n cancelDismissal() {\n if (typeof this.timeoutId === \"number\") {\n clearTimeout(this.timeoutId)\n this.timeoutId = undefined\n }\n }\n}\n", "import Dropdown from './dropdown.js'\nimport { transition } from './transition'\n\nexport default class extends Dropdown {\n static targets = ['overlay', 'close']\n\n openValueChanged() {\n transition(this.overlayTarget, this.openValue)\n transition(this.menuTarget, this.openValue)\n if (this.hasCloseTarget) transition(this.closeTarget, this.openValue)\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static classes = [ \"activeTab\", \"inactiveTab\" ]\n static targets = ['tab', 'panel', 'select']\n static values = {\n index: 0,\n updateAnchor: Boolean,\n scrollToAnchor: Boolean,\n }\n\n initialize() {\n if (this.anchor) this.indexValue = this.tabTargets.findIndex((tab) => tab.id === this.anchor)\n }\n\n connect() {\n this.showTab()\n }\n\n // Changes to the clicked tab\n change(event) {\n if (event.currentTarget.tagName === \"SELECT\") {\n this.indexValue = event.currentTarget.selectedIndex\n\n // If target specifies an index, use that\n } else if (event.currentTarget.dataset.index) {\n this.indexValue = event.currentTarget.dataset.index\n\n // If target specifies an id, use that\n } else if (event.currentTarget.dataset.id) {\n this.indexValue = this.tabTargets.findIndex((tab) => tab.id == event.currentTarget.dataset.id)\n\n // Otherwise, use the index of the current target\n } else {\n this.indexValue = this.tabTargets.indexOf(event.currentTarget)\n }\n\n window.dispatchEvent(new CustomEvent('tsc:tab-change'))\n }\n\n nextTab() {\n this.indexValue = Math.min(this.indexValue + 1, this.tabsCount - 1)\n }\n\n previousTab() {\n this.indexValue = Math.max(this.indexValue - 1, 0)\n }\n\n firstTab() {\n this.indexValue = 0\n }\n\n lastTab() {\n this.indexValue = this.tabsCount - 1\n }\n\n indexValueChanged() {\n this.showTab()\n\n // Update URL with the tab ID if it has one\n // This will be automatically selected on page load\n if (this.updateAnchorValue) {\n const new_tab_id = this.tabTargets[this.indexValue].id // Grab the id from the newly activated tab\n if (this.scrollToAnchorValue){\n location.hash = new_tab_id // Use location.hash to change the URL with scrolling\n } else {\n const currentUrl = window.location.href // Get the current URL\n const newUrl = currentUrl.split('#')[0] + '#' + new_tab_id // Create a new URL with the updated ID\n history.replaceState({}, document.title, newUrl) // Use history.replaceState to change the URL without scrolling\n }\n }\n }\n\n showTab() {\n this.panelTargets.forEach((panel, index) => {\n const tab = this.tabTargets[index]\n\n if (index === this.indexValue) {\n panel.classList.remove('hidden')\n tab.ariaSelected = 'true'\n if (this.hasInactiveTabClass) tab?.classList?.remove(...this.inactiveTabClasses)\n if (this.hasActiveTabClass) tab?.classList?.add(...this.activeTabClasses)\n } else {\n panel.classList.add('hidden')\n tab.ariaSelected = null\n if (this.hasActiveTabClass) tab?.classList?.remove(...this.activeTabClasses)\n if (this.hasInactiveTabClass) tab?.classList?.add(...this.inactiveTabClasses)\n }\n })\n\n if (this.hasSelectTarget) {\n this.selectTarget.selectedIndex = this.indexValue\n }\n\n this.scrollActiveTabIntoView()\n }\n\n // If tabs have horizontal scrolling, the active tab may be out of sight.\n // Make sure the active tab is visible by scrolling it into the view.\n scrollActiveTabIntoView() {\n const activeTab = this.element.querySelector('[aria-selected]');\n if (activeTab)\n activeTab.scrollIntoView({\n inline: 'center',\n });\n }\n\n get tabsCount() {\n return this.tabTargets.length\n }\n\n get anchor() {\n return (document.URL.split('#').length > 1) ? document.URL.split('#')[1] : null;\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['toggleable']\n static values = {\n open: { type: Boolean, default: false }\n }\n\n toggle(event) {\n this.openValue = !this.openValue\n this.animate()\n }\n\n // Sets open to value of checkbox or radio\n toggleInput(event) {\n this.openValue = event.target.checked\n this.animate()\n }\n\n hide() {\n this.openValue = false\n this.animate()\n }\n\n show() {\n this.openValue = true\n this.animate()\n }\n\n animate() {\n this.toggleableTargets.forEach(target => {\n transition(target, this.openValue)\n })\n }\n}\n"],
+ "mappings": "4xBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,aAAAC,EAAA,iBAAAC,EAAA,aAAAC,EAAA,UAAAC,EAAA,YAAAC,EAAA,cAAAC,EAAA,SAAAC,EAAA,WAAAC,IAAA,eAAAC,EAAAX,GCAA,IAAAY,EAA2B,8BCO3B,eAAsBC,EAAWC,EAASC,EAAOC,EAAoB,CAAC,EAAG,CACjED,EACJE,EAAMH,EAASE,CAAiB,EAEhCE,EAAMJ,EAASE,CAAiB,CAEpC,CASA,eAAsBC,EAAMH,EAASE,EAAoB,CAAC,EAAG,CAC3D,IAAMG,EAAoBL,EAAQ,QAAQ,iBAAmBE,EAAkB,OAAS,QAClFI,EACJN,EAAQ,QAAQ,qBAAuBE,EAAkB,WAAa,aAClEK,EAAYP,EAAQ,QAAQ,mBAAqBE,EAAkB,SAAW,WAC9EM,EAAcR,EAAQ,QAAQ,aAAeE,EAAkB,aAAe,SAGpFF,EAAQ,UAAU,IAAI,GAAGK,EAAkB,MAAM,GAAG,CAAC,EACrDL,EAAQ,UAAU,IAAI,GAAGM,EAAY,MAAM,GAAG,CAAC,EAC/CN,EAAQ,UAAU,OAAO,GAAGO,EAAU,MAAM,GAAG,CAAC,EAChDP,EAAQ,UAAU,OAAO,GAAGQ,EAAY,MAAM,GAAG,CAAC,EAElD,MAAMC,EAAU,EAEhBT,EAAQ,UAAU,OAAO,GAAGM,EAAY,MAAM,GAAG,CAAC,EAClDN,EAAQ,UAAU,IAAI,GAAGO,EAAU,MAAM,GAAG,CAAC,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AAU,CAAE,YAAa,aAAc,GAC9CQ,EAFKR,EAEE,UAAU,CAAC,MAAO,QAAS,QAAQ,GAC1CQ,EAHKR,EAGE,SAAS,CACd,MAAO,EACP,aAAc,QACd,eAAgB,OAClB,GCTF,IAAAS,EAA2B,8BAG3B,IAAOC,EAAP,cAA6B,YAAW,CAMtC,OAAOC,EAAO,CACZ,KAAK,UAAY,CAAC,KAAK,UACvB,KAAK,QAAQ,CACf,CAGA,YAAYA,EAAO,CACjB,KAAK,UAAYA,EAAM,OAAO,QAC9B,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,SAAU,CACR,KAAK,kBAAkB,QAAQC,GAAU,CACvCC,EAAWD,EAAQ,KAAK,SAAS,CACnC,CAAC,CACH,CACF,EA/BEE,EADKJ,EACE,UAAU,CAAC,YAAY,GAC9BI,EAFKJ,EAEE,SAAS,CACd,KAAM,CAAE,KAAM,QAAS,QAAS,EAAM,CACxC",
+ "names": ["src_exports", "__export", "alert_default", "autosave_default", "color_preview_default", "dropdown_default", "modal_default", "popover_default", "slideover_default", "tabs_default", "toggle_default", "__toCommonJS", "import_stimulus", "transition", "element", "state", "transitionOptions", "enter", "leave", "transitionClasses", "fromClasses", "toClasses", "toggleClass", "nextFrame", "afterTransition", "resolve", "animation", "alert_default", "enter", "leave", "__publicField", "import_stimulus", "autosave_default", "message", "__publicField", "import_stimulus", "color_preview_default", "color", "yiqColor", "hexColor", "yiqThreshold", "r", "g", "b", "__publicField", "import_stimulus", "_initializeDropdownActions", "initializeDropdownActions_fn", "dropdown_default", "__privateAdd", "__privateMethod", "transition", "event", "actions", "__publicField", "import_stimulus", "modal_default", "__publicField", "import_stimulus", "popover_default", "transition", "event", "__publicField", "slideover_default", "dropdown_default", "transition", "__publicField", "import_stimulus", "tabs_default", "tab", "event", "new_tab_id", "newUrl", "panel", "index", "activeTab", "__publicField", "import_stimulus", "toggle_default", "event", "target", "transition", "__publicField"]
}
diff --git a/dist/tailwindcss-stimulus-components.module.js b/dist/tailwindcss-stimulus-components.module.js
index 9318625..d819d0a 100644
--- a/dist/tailwindcss-stimulus-components.module.js
+++ b/dist/tailwindcss-stimulus-components.module.js
@@ -1 +1 @@
-var I=Object.defineProperty;var L=(t,e,s)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var a=(t,e,s)=>(L(t,typeof e!="symbol"?e+"":e,s),s),A=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var b=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)};var C=(t,e,s)=>(A(t,e,"access private method"),s);import{Controller as D}from"@hotwired/stimulus";async function i(t,e,s={}){e?v(t,s):x(t,s)}async function v(t,e={}){let s=t.dataset.transitionEnter||e.enter||"enter",r=t.dataset.transitionEnterFrom||e.enterFrom||"enter-from",n=t.dataset.transitionEnterTo||e.enterTo||"enter-to",p=t.dataset.toggleClass||e.toggleClass||"hidden";t.classList.add(...s.split(" ")),t.classList.add(...r.split(" ")),t.classList.remove(...n.split(" ")),t.classList.remove(...p.split(" ")),await V(),t.classList.remove(...r.split(" ")),t.classList.add(...n.split(" "));try{await w(t)}finally{t.classList.remove(...s.split(" "))}}async function x(t,e={}){let s=t.dataset.transitionLeave||e.leave||"leave",r=t.dataset.transitionLeaveFrom||e.leaveFrom||"leave-from",n=t.dataset.transitionLeaveTo||e.leaveTo||"leave-to",p=t.dataset.toggleClass||e.toogle||"hidden";t.classList.add(...s.split(" ")),t.classList.add(...r.split(" ")),t.classList.remove(...n.split(" ")),await V(),t.classList.remove(...r.split(" ")),t.classList.add(...n.split(" "));try{await w(t)}finally{t.classList.remove(...s.split(" ")),t.classList.add(...p.split(" "))}}function V(){return new Promise(t=>{requestAnimationFrame(()=>{requestAnimationFrame(t)})})}function w(t){return Promise.all(t.getAnimations().map(e=>e.finished))}var f=class extends D{connect(){setTimeout(()=>{v(this.element)},this.showDelayValue),this.hasDismissAfterValue&&setTimeout(()=>{this.close()},this.dismissAfterValue)}close(){x(this.element).then(()=>{this.element.remove()})}};a(f,"values",{dismissAfter:Number,showDelay:{type:Number,default:0},removeDelay:{type:Number,default:1100}});import{Controller as E}from"@hotwired/stimulus";var u=class extends E{connect(){this.timeout=null}save(){clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.statusTarget.textContent=this.submittingTextValue,this.formTarget.requestSubmit()},this.submitDurationValue)}success(){this.setStatus(this.successTextValue)}error(){this.setStatus(this.errorTextValue)}setStatus(t){this.statusTarget.textContent=t,this.timeout=setTimeout(()=>{this.statusTarget.textContent=""},this.statusDurationValue)}};a(u,"targets",["form","status"]),a(u,"values",{submitDuration:{type:Number,default:1e3},statusDuration:{type:Number,default:2e3},submittingText:{type:String,default:"Saving..."},successText:{type:String,default:"Saved!"},errorText:{type:String,default:"Unable to save."}});import{Controller as F}from"@hotwired/stimulus";var h=class extends F{update(){this.preview=this.colorTarget.value}set preview(t){this.previewTarget.style[this.styleValue]=t;let e=this._getContrastYIQ(t);this.styleValue==="color"?this.previewTarget.style.backgroundColor=e:this.previewTarget.style.color=e}_getContrastYIQ(t){t=t.replace("#","");let e=128,s=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),n=parseInt(t.substr(4,2),16);return(s*299+r*587+n*114)/1e3>=e?"#000":"#fff"}};a(h,"targets",["preview","color"]),a(h,"values",{style:{type:String,default:"backgroundColor"}});import{Controller as S}from"@hotwired/stimulus";var g,y,o=class extends S{constructor(){super(...arguments);b(this,g)}connect(){document.addEventListener("turbo:before-cache",this.beforeCache.bind(this)),C(this,g,y).call(this)}disconnect(){document.removeEventListener("turbo:before-cache",this.beforeCache.bind(this)),this.hasButtonTarget&&(this.buttonTarget.removeEventListener("keydown",this._onMenuButtonKeydown),this.buttonTarget.removeAttribute("aria-haspopup"))}openValueChanged(){i(this.menuTarget,this.openValue,this.transitionOptions),this.openValue===!0&&this.hasMenuItemTarget&&this.menuItemTargets[0].focus()}show(){this.openValue=!0}close(){this.openValue=!1}hide(e){this.closeOnClickOutsideValue&&e.target.nodeType&&this.element.contains(e.target)===!1&&this.openValue&&(this.openValue=!1),this.closeOnEscapeValue&&e.key==="Escape"&&this.openValue&&(this.openValue=!1)}toggle(){this.openValue=!this.openValue}nextItem(e){e.preventDefault(),this.menuItemTargets[this.nextIndex].focus()}previousItem(e){e.preventDefault(),this.menuItemTargets[this.previousIndex].focus()}get currentItemIndex(){return this.menuItemTargets.indexOf(document.activeElement)}get nextIndex(){return Math.min(this.currentItemIndex+1,this.menuItemTargets.length-1)}get previousIndex(){return Math.max(this.currentItemIndex-1,0)}get transitionOptions(){return{enter:this.hasEnterClass?this.enterClass:"transition ease-out duration-100",enterFrom:this.hasEnterFromClass?this.enterFromClass:"transform opacity-0 scale-95",enterTo:this.hasEnterToClass?this.enterToClass:"transform opacity-100 scale-100",leave:this.hasLeaveClass?this.leaveClass:"transition ease-in duration-75",leaveFrom:this.hasLeaveFromClass?this.leaveFromClass:"transform opacity-100 scale-100",leaveTo:this.hasLeaveToClass?this.leaveToClass:"transform opacity-0 scale-95",toggleClass:this.hasToggleClass?this.toggleClass:"hidden"}}beforeCache(){this.openValue=!1,this.menuTarget.classList.add("hidden")}};g=new WeakSet,y=function(){let e=this.element.dataset.action?this.element.dataset.action.split(" "):[];e.push("click->dropdown#toggle"),e.push("click@window->dropdown#hide"),e.push("keydown.up->dropdown#previousItem"),e.push("keydown.down->dropdown#nextItem"),e.push("keydown.esc->dropdown#hide"),this.element.dataset.action=[...new Set(e)].join(" ")},a(o,"targets",["menu","button","menuItem"]),a(o,"values",{open:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0}}),a(o,"classes",["enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","toggle"]);import{Controller as k}from"@hotwired/stimulus";var d=class extends k{connect(){this.openValue&&this.showModal()}showModal(){this.dialogTarget.showModal()}show(){this.dialogTarget.show()}close(){this.dialogTarget.close()}};a(d,"targets",["dialog"]),a(d,"values",{open:Boolean});import{Controller as B}from"@hotwired/stimulus";var c=class extends B{openValueChanged(){i(this.contentTarget,this.openValue),this.shouldAutoDismiss&&this.scheduleDismissal()}show(t){this.shouldAutoDismiss&&this.scheduleDismissal(),this.openValue=!0}hide(){this.openValue=!1}toggle(){this.openValue=!this.openValue}get shouldAutoDismiss(){return this.openValue&&this.hasDismissAfterValue}scheduleDismissal(){this.hasDismissAfterValue&&(this.cancelDismissal(),this.timeoutId=setTimeout(()=>{this.hide(),this.timeoutId=void 0},this.dismissAfterValue))}cancelDismissal(){typeof this.timeoutId=="number"&&(clearTimeout(this.timeoutId),this.timeoutId=void 0)}};a(c,"targets",["content"]),a(c,"values",{dismissAfter:Number,open:{type:Boolean,default:!1}});var T=class extends o{openValueChanged(){i(this.overlayTarget,this.openValue),i(this.menuTarget,this.openValue),this.hasCloseTarget&&i(this.closeTarget,this.openValue)}};a(T,"targets",["overlay","close"]);import{Controller as M}from"@hotwired/stimulus";var l=class extends M{initialize(){this.anchor&&(this.indexValue=this.tabTargets.findIndex(t=>t.id===this.anchor))}connect(){this.showTab()}change(t){t.currentTarget.tagName==="SELECT"?this.indexValue=t.currentTarget.selectedIndex:t.currentTarget.dataset.index?this.indexValue=t.currentTarget.dataset.index:t.currentTarget.dataset.id?this.indexValue=this.tabTargets.findIndex(e=>e.id==t.currentTarget.dataset.id):this.indexValue=this.tabTargets.indexOf(t.currentTarget),window.dispatchEvent(new CustomEvent("tsc:tab-change"))}nextTab(){this.indexValue=Math.min(this.indexValue+1,this.tabsCount-1)}previousTab(){this.indexValue=Math.max(this.indexValue-1,0)}firstTab(){this.indexValue=0}lastTab(){this.indexValue=this.tabsCount-1}indexValueChanged(){if(this.showTab(),this.updateAnchorValue){let t=this.tabTargets[this.indexValue].id;if(this.scrollToAnchorValue)location.hash=t;else{let s=window.location.href.split("#")[0]+"#"+t;history.replaceState({},document.title,s)}}}showTab(){this.panelTargets.forEach((t,e)=>{let s=this.tabTargets[e];e===this.indexValue?(t.classList.remove("hidden"),this.hasInactiveTabClass&&s?.classList?.remove(...this.inactiveTabClasses),this.hasActiveTabClass&&s?.classList?.add(...this.activeTabClasses)):(t.classList.add("hidden"),this.hasActiveTabClass&&s?.classList?.remove(...this.activeTabClasses),this.hasInactiveTabClass&&s?.classList?.add(...this.inactiveTabClasses))}),this.hasSelectTarget&&(this.selectTarget.selectedIndex=this.indexValue)}get tabsCount(){return this.tabTargets.length}get anchor(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}};a(l,"classes",["activeTab","inactiveTab"]),a(l,"targets",["tab","panel","select"]),a(l,"values",{index:0,updateAnchor:Boolean,scrollToAnchor:Boolean});import{Controller as q}from"@hotwired/stimulus";var m=class extends q{toggle(t){this.openValue=!this.openValue,this.animate()}toggleInput(t){this.openValue=t.target.checked,this.animate()}hide(){this.openValue=!1,this.animate()}show(){this.openValue=!0,this.animate()}animate(){this.toggleableTargets.forEach(t=>{i(t,this.openValue)})}};a(m,"targets",["toggleable"]),a(m,"values",{open:{type:Boolean,default:!1}});export{f as Alert,u as Autosave,h as ColorPreview,o as Dropdown,d as Modal,c as Popover,T as Slideover,l as Tabs,m as Toggle};
+var I=Object.defineProperty;var L=(t,e,s)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var a=(t,e,s)=>(L(t,typeof e!="symbol"?e+"":e,s),s),A=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var b=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)};var V=(t,e,s)=>(A(t,e,"access private method"),s);import{Controller as D}from"@hotwired/stimulus";async function i(t,e,s={}){e?v(t,s):x(t,s)}async function v(t,e={}){let s=t.dataset.transitionEnter||e.enter||"enter",r=t.dataset.transitionEnterFrom||e.enterFrom||"enter-from",n=t.dataset.transitionEnterTo||e.enterTo||"enter-to",p=t.dataset.toggleClass||e.toggleClass||"hidden";t.classList.add(...s.split(" ")),t.classList.add(...r.split(" ")),t.classList.remove(...n.split(" ")),t.classList.remove(...p.split(" ")),await C(),t.classList.remove(...r.split(" ")),t.classList.add(...n.split(" "));try{await w(t)}finally{t.classList.remove(...s.split(" "))}}async function x(t,e={}){let s=t.dataset.transitionLeave||e.leave||"leave",r=t.dataset.transitionLeaveFrom||e.leaveFrom||"leave-from",n=t.dataset.transitionLeaveTo||e.leaveTo||"leave-to",p=t.dataset.toggleClass||e.toogle||"hidden";t.classList.add(...s.split(" ")),t.classList.add(...r.split(" ")),t.classList.remove(...n.split(" ")),await C(),t.classList.remove(...r.split(" ")),t.classList.add(...n.split(" "));try{await w(t)}finally{t.classList.remove(...s.split(" ")),t.classList.add(...p.split(" "))}}function C(){return new Promise(t=>{requestAnimationFrame(()=>{requestAnimationFrame(t)})})}function w(t){return Promise.all(t.getAnimations().map(e=>e.finished))}var f=class extends D{connect(){setTimeout(()=>{v(this.element)},this.showDelayValue),this.hasDismissAfterValue&&setTimeout(()=>{this.close()},this.dismissAfterValue)}close(){x(this.element).then(()=>{this.element.remove()})}};a(f,"values",{dismissAfter:Number,showDelay:{type:Number,default:0},removeDelay:{type:Number,default:1100}});import{Controller as E}from"@hotwired/stimulus";var u=class extends E{connect(){this.timeout=null}save(){clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.statusTarget.textContent=this.submittingTextValue,this.formTarget.requestSubmit()},this.submitDurationValue)}success(){this.setStatus(this.successTextValue)}error(){this.setStatus(this.errorTextValue)}setStatus(t){this.statusTarget.textContent=t,this.timeout=setTimeout(()=>{this.statusTarget.textContent=""},this.statusDurationValue)}};a(u,"targets",["form","status"]),a(u,"values",{submitDuration:{type:Number,default:1e3},statusDuration:{type:Number,default:2e3},submittingText:{type:String,default:"Saving..."},successText:{type:String,default:"Saved!"},errorText:{type:String,default:"Unable to save."}});import{Controller as S}from"@hotwired/stimulus";var h=class extends S{update(){this.preview=this.colorTarget.value}set preview(t){this.previewTarget.style[this.styleValue]=t;let e=this._getContrastYIQ(t);this.styleValue==="color"?this.previewTarget.style.backgroundColor=e:this.previewTarget.style.color=e}_getContrastYIQ(t){t=t.replace("#","");let e=128,s=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),n=parseInt(t.substr(4,2),16);return(s*299+r*587+n*114)/1e3>=e?"#000":"#fff"}};a(h,"targets",["preview","color"]),a(h,"values",{style:{type:String,default:"backgroundColor"}});import{Controller as F}from"@hotwired/stimulus";var g,y,o=class extends F{constructor(){super(...arguments);b(this,g)}connect(){document.addEventListener("turbo:before-cache",this.beforeCache.bind(this)),V(this,g,y).call(this)}disconnect(){document.removeEventListener("turbo:before-cache",this.beforeCache.bind(this)),this.hasButtonTarget&&(this.buttonTarget.removeEventListener("keydown",this._onMenuButtonKeydown),this.buttonTarget.removeAttribute("aria-haspopup"))}openValueChanged(){i(this.menuTarget,this.openValue,this.transitionOptions),this.openValue===!0&&this.hasMenuItemTarget&&this.menuItemTargets[0].focus()}show(){this.openValue=!0}close(){this.openValue=!1}hide(e){this.closeOnClickOutsideValue&&e.target.nodeType&&this.element.contains(e.target)===!1&&this.openValue&&(this.openValue=!1),this.closeOnEscapeValue&&e.key==="Escape"&&this.openValue&&(this.openValue=!1)}toggle(){this.openValue=!this.openValue}nextItem(e){e.preventDefault(),this.menuItemTargets[this.nextIndex].focus()}previousItem(e){e.preventDefault(),this.menuItemTargets[this.previousIndex].focus()}get currentItemIndex(){return this.menuItemTargets.indexOf(document.activeElement)}get nextIndex(){return Math.min(this.currentItemIndex+1,this.menuItemTargets.length-1)}get previousIndex(){return Math.max(this.currentItemIndex-1,0)}get transitionOptions(){return{enter:this.hasEnterClass?this.enterClass:"transition ease-out duration-100",enterFrom:this.hasEnterFromClass?this.enterFromClass:"transform opacity-0 scale-95",enterTo:this.hasEnterToClass?this.enterToClass:"transform opacity-100 scale-100",leave:this.hasLeaveClass?this.leaveClass:"transition ease-in duration-75",leaveFrom:this.hasLeaveFromClass?this.leaveFromClass:"transform opacity-100 scale-100",leaveTo:this.hasLeaveToClass?this.leaveToClass:"transform opacity-0 scale-95",toggleClass:this.hasToggleClass?this.toggleClass:"hidden"}}beforeCache(){this.openValue=!1,this.menuTarget.classList.add("hidden")}};g=new WeakSet,y=function(){let e=this.element.dataset.action?this.element.dataset.action.split(" "):[];e.push("click->dropdown#toggle"),e.push("click@window->dropdown#hide"),e.push("keydown.up->dropdown#previousItem"),e.push("keydown.down->dropdown#nextItem"),e.push("keydown.esc->dropdown#hide"),this.element.dataset.action=[...new Set(e)].join(" ")},a(o,"targets",["menu","button","menuItem"]),a(o,"values",{open:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0}}),a(o,"classes",["enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","toggle"]);import{Controller as k}from"@hotwired/stimulus";var c=class extends k{connect(){this.openValue&&this.showModal()}showModal(){this.dialogTarget.showModal()}show(){this.dialogTarget.show()}close(){this.dialogTarget.close()}};a(c,"targets",["dialog"]),a(c,"values",{open:Boolean});import{Controller as B}from"@hotwired/stimulus";var d=class extends B{openValueChanged(){i(this.contentTarget,this.openValue),this.shouldAutoDismiss&&this.scheduleDismissal()}show(t){this.shouldAutoDismiss&&this.scheduleDismissal(),this.openValue=!0}hide(){this.openValue=!1}toggle(){this.openValue=!this.openValue}get shouldAutoDismiss(){return this.openValue&&this.hasDismissAfterValue}scheduleDismissal(){this.hasDismissAfterValue&&(this.cancelDismissal(),this.timeoutId=setTimeout(()=>{this.hide(),this.timeoutId=void 0},this.dismissAfterValue))}cancelDismissal(){typeof this.timeoutId=="number"&&(clearTimeout(this.timeoutId),this.timeoutId=void 0)}};a(d,"targets",["content"]),a(d,"values",{dismissAfter:Number,open:{type:Boolean,default:!1}});var T=class extends o{openValueChanged(){i(this.overlayTarget,this.openValue),i(this.menuTarget,this.openValue),this.hasCloseTarget&&i(this.closeTarget,this.openValue)}};a(T,"targets",["overlay","close"]);import{Controller as M}from"@hotwired/stimulus";var l=class extends M{initialize(){this.anchor&&(this.indexValue=this.tabTargets.findIndex(t=>t.id===this.anchor))}connect(){this.showTab()}change(t){t.currentTarget.tagName==="SELECT"?this.indexValue=t.currentTarget.selectedIndex:t.currentTarget.dataset.index?this.indexValue=t.currentTarget.dataset.index:t.currentTarget.dataset.id?this.indexValue=this.tabTargets.findIndex(e=>e.id==t.currentTarget.dataset.id):this.indexValue=this.tabTargets.indexOf(t.currentTarget),window.dispatchEvent(new CustomEvent("tsc:tab-change"))}nextTab(){this.indexValue=Math.min(this.indexValue+1,this.tabsCount-1)}previousTab(){this.indexValue=Math.max(this.indexValue-1,0)}firstTab(){this.indexValue=0}lastTab(){this.indexValue=this.tabsCount-1}indexValueChanged(){if(this.showTab(),this.updateAnchorValue){let t=this.tabTargets[this.indexValue].id;if(this.scrollToAnchorValue)location.hash=t;else{let s=window.location.href.split("#")[0]+"#"+t;history.replaceState({},document.title,s)}}}showTab(){this.panelTargets.forEach((t,e)=>{let s=this.tabTargets[e];e===this.indexValue?(t.classList.remove("hidden"),s.ariaSelected="true",this.hasInactiveTabClass&&s?.classList?.remove(...this.inactiveTabClasses),this.hasActiveTabClass&&s?.classList?.add(...this.activeTabClasses)):(t.classList.add("hidden"),s.ariaSelected=null,this.hasActiveTabClass&&s?.classList?.remove(...this.activeTabClasses),this.hasInactiveTabClass&&s?.classList?.add(...this.inactiveTabClasses))}),this.hasSelectTarget&&(this.selectTarget.selectedIndex=this.indexValue),this.scrollActiveTabIntoView()}scrollActiveTabIntoView(){let t=this.element.querySelector("[aria-selected]");t&&t.scrollIntoView({inline:"center"})}get tabsCount(){return this.tabTargets.length}get anchor(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}};a(l,"classes",["activeTab","inactiveTab"]),a(l,"targets",["tab","panel","select"]),a(l,"values",{index:0,updateAnchor:Boolean,scrollToAnchor:Boolean});import{Controller as q}from"@hotwired/stimulus";var m=class extends q{toggle(t){this.openValue=!this.openValue,this.animate()}toggleInput(t){this.openValue=t.target.checked,this.animate()}hide(){this.openValue=!1,this.animate()}show(){this.openValue=!0,this.animate()}animate(){this.toggleableTargets.forEach(t=>{i(t,this.openValue)})}};a(m,"targets",["toggleable"]),a(m,"values",{open:{type:Boolean,default:!1}});export{f as Alert,u as Autosave,h as ColorPreview,o as Dropdown,c as Modal,d as Popover,T as Slideover,l as Tabs,m as Toggle};
diff --git a/dist/tailwindcss-stimulus-components.module.js.map b/dist/tailwindcss-stimulus-components.module.js.map
index a2b0a87..5a47b9d 100644
--- a/dist/tailwindcss-stimulus-components.module.js.map
+++ b/dist/tailwindcss-stimulus-components.module.js.map
@@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../src/alert.js", "../src/transition.js", "../src/autosave.js", "../src/color_preview.js", "../src/dropdown.js", "../src/modal.js", "../src/popover.js", "../src/slideover.js", "../src/tabs.js", "../src/toggle.js"],
- "sourcesContent": ["import { Controller } from '@hotwired/stimulus'\nimport { enter, leave } from \"./transition\"\n\nexport default class extends Controller {\n static values = {\n dismissAfter: Number,\n showDelay: { type: Number, default: 0 },\n removeDelay: { type: Number, default: 1100 }\n }\n\n connect() {\n setTimeout(() => {\n enter(this.element)\n }, this.showDelayValue)\n\n // Auto dimiss if defined\n if (this.hasDismissAfterValue) {\n setTimeout(() => {\n this.close()\n }, this.dismissAfterValue)\n }\n }\n\n // Runs hide animation and then removes element from the page\n close() {\n leave(this.element).then(() => {\n this.element.remove()\n })\n }\n}\n", "// Enter transition:\n//\n// transition(this.element, true)\n//\n// Leave transition:\n//\n// transition(this.element, false)\nexport async function transition(element, state, transitionOptions = {}) {\n if (!!state) {\n enter(element, transitionOptions)\n } else {\n leave(element, transitionOptions)\n }\n}\n\n// class=\"fixed inset-0 bg-black overflow-y-auto flex items-center justify-center bg-opacity-80 hidden\"\n// data-transition-enter=\"transition-all ease-in-out duration-300\"\n// data-transition-enter-from=\"bg-opacity-0\"\n// data-transition-enter-to=\"bg-opacity-80\"\n// data-transition-leave=\"transition-all ease-in-out duration-300\"\n// data-transition-leave-from=\"bg-opacity-80\"\n// data-transition-leave-to=\"bg-opacity-0\"\nexport async function enter(element, transitionOptions = {}) {\n const transitionClasses = element.dataset.transitionEnter || transitionOptions.enter || 'enter'\n const fromClasses =\n element.dataset.transitionEnterFrom || transitionOptions.enterFrom || 'enter-from'\n const toClasses = element.dataset.transitionEnterTo || transitionOptions.enterTo || 'enter-to'\n const toggleClass = element.dataset.toggleClass || transitionOptions.toggleClass || 'hidden'\n\n // Prepare transition\n element.classList.add(...transitionClasses.split(' '))\n element.classList.add(...fromClasses.split(' '))\n element.classList.remove(...toClasses.split(' '))\n element.classList.remove(...toggleClass.split(' '))\n\n await nextFrame()\n\n element.classList.remove(...fromClasses.split(' '))\n element.classList.add(...toClasses.split(' '))\n\n try {\n await afterTransition(element)\n } finally {\n element.classList.remove(...transitionClasses.split(' '))\n }\n}\n\nexport async function leave(element, transitionOptions = {}) {\n const transitionClasses = element.dataset.transitionLeave || transitionOptions.leave || 'leave'\n const fromClasses =\n element.dataset.transitionLeaveFrom || transitionOptions.leaveFrom || 'leave-from'\n const toClasses = element.dataset.transitionLeaveTo || transitionOptions.leaveTo || 'leave-to'\n const toggleClass = element.dataset.toggleClass || transitionOptions.toogle || 'hidden'\n\n // Prepare transition\n element.classList.add(...transitionClasses.split(' '))\n element.classList.add(...fromClasses.split(' '))\n element.classList.remove(...toClasses.split(' '))\n\n await nextFrame()\n\n element.classList.remove(...fromClasses.split(' '))\n element.classList.add(...toClasses.split(' '))\n\n try {\n await afterTransition(element)\n } finally {\n element.classList.remove(...transitionClasses.split(' '))\n element.classList.add(...toggleClass.split(' '))\n }\n}\n\nfunction nextFrame() {\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n requestAnimationFrame(resolve)\n })\n })\n}\n\nfunction afterTransition(element) {\n return Promise.all(element.getAnimations().map(animation => animation.finished))\n}\n", "// Form autosave\n//\n// <%= form_with(model: post, data: { controller: \"autosave\", autosave_target: \"form\", action: \"turbo:submit-end->autosave#success turbo:fetch-request-error->autosave#error\" }) do |form| %>\n//
\n// <%= form.label :title %>\n// <%= form.text_field :title, class: 'form-control', data: { action: \"keyup->autosave#save\" } %>\n//
\n//\n//
\n// <% end %>\n\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['form', 'status']\n static values = {\n submitDuration: {type: Number, default: 1000},\n statusDuration: {type: Number, default: 2000},\n submittingText: {type: String, default: \"Saving...\"},\n successText: {type: String, default: \"Saved!\"},\n errorText: {type: String, default: \"Unable to save.\"}\n }\n\n connect() {\n this.timeout = null\n }\n\n save() {\n clearTimeout(this.timeout)\n\n this.timeout = setTimeout(() => {\n this.statusTarget.textContent = this.submittingTextValue\n this.formTarget.requestSubmit()\n }, this.submitDurationValue)\n }\n\n success() {\n this.setStatus(this.successTextValue)\n }\n\n error() {\n this.setStatus(this.errorTextValue)\n }\n\n setStatus(message) {\n this.statusTarget.textContent = message\n\n this.timeout = setTimeout(() => {\n this.statusTarget.textContent = ''\n }, this.statusDurationValue)\n }\n}\n", "// A color picker preview where you can choose to have the color or backgroundColor\n// get updated based on the result of a color picker. It also supports ensuring\n// the foreground text is always readable by performing a YIQ calculation to\n// set the text to black or white based on the contrast of the color and backgroundColor.\n\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['preview', 'color'];\n static values = {\n style: {type: String, default: \"backgroundColor\"}\n }\n\n update() {\n this.preview = this.colorTarget.value\n }\n\n set preview(color) {\n this.previewTarget.style[this.styleValue] = color\n\n // Ensure the foreground text is always readable by setting either the\n // backgroundColor or color to black or white.\n const yiqColor = this._getContrastYIQ(color)\n\n if (this.styleValue === 'color') {\n this.previewTarget.style.backgroundColor = yiqColor\n } else {\n this.previewTarget.style.color = yiqColor\n }\n }\n\n _getContrastYIQ(hexColor) {\n // Taken from: https://24ways.org/2010/calculating-color-contrast/\n hexColor = hexColor.replace('#', '');\n\n const yiqThreshold = 128;\n const r = parseInt(hexColor.substr(0, 2), 16);\n const g = parseInt(hexColor.substr(2, 2), 16);\n const b = parseInt(hexColor.substr(4, 2), 16);\n const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;\n\n return (yiq >= yiqThreshold) ? '#000' : '#fff';\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\nimport { transition } from './transition'\n\nexport default class extends Controller {\n static targets = ['menu', 'button', 'menuItem']\n static values = {\n open: { type: Boolean, default: false },\n closeOnEscape: { type: Boolean, default: true },\n closeOnClickOutside: { type: Boolean, default: true },\n }\n\n static classes = ['enter', 'enterFrom', 'enterTo', 'leave', 'leaveFrom', 'leaveTo', 'toggle']\n\n // lifecycle\n connect() {\n document.addEventListener(\"turbo:before-cache\", this.beforeCache.bind(this))\n this.#initializeDropdownActions()\n }\n\n disconnect() {\n document.removeEventListener(\"turbo:before-cache\", this.beforeCache.bind(this))\n\n if (this.hasButtonTarget) {\n this.buttonTarget.removeEventListener(\"keydown\", this._onMenuButtonKeydown)\n this.buttonTarget.removeAttribute(\"aria-haspopup\")\n }\n }\n\n // callbacks\n openValueChanged() {\n transition(this.menuTarget, this.openValue, this.transitionOptions)\n\n if (this.openValue === true && this.hasMenuItemTarget) {\n this.menuItemTargets[0].focus()\n }\n }\n\n // actions\n show() {\n this.openValue = true\n }\n\n close() {\n this.openValue = false\n }\n\n hide(event) {\n // if the event is a click and the target is not inside the dropdown, then close it\n if (\n this.closeOnClickOutsideValue &&\n event.target.nodeType &&\n this.element.contains(event.target) === false &&\n this.openValue\n ) {\n this.openValue = false\n }\n\n // if the event is a keydown and the key is escape, then close it\n if (this.closeOnEscapeValue && event.key === 'Escape' && this.openValue) {\n this.openValue = false\n }\n }\n\n toggle() {\n this.openValue = !this.openValue\n }\n\n nextItem(event) {\n event.preventDefault()\n\n this.menuItemTargets[this.nextIndex].focus()\n }\n\n previousItem(event) {\n event.preventDefault()\n\n this.menuItemTargets[this.previousIndex].focus()\n }\n\n // getters and setters\n get currentItemIndex() {\n return this.menuItemTargets.indexOf(document.activeElement)\n }\n\n get nextIndex() {\n return Math.min(this.currentItemIndex + 1, this.menuItemTargets.length - 1)\n }\n\n get previousIndex() {\n return Math.max(this.currentItemIndex - 1, 0)\n }\n\n get transitionOptions() {\n // once the Class API default values are available, we can simplify this\n return {\n enter: this.hasEnterClass ? this.enterClass : 'transition ease-out duration-100',\n enterFrom: this.hasEnterFromClass ? this.enterFromClass : 'transform opacity-0 scale-95',\n enterTo: this.hasEnterToClass ? this.enterToClass : 'transform opacity-100 scale-100',\n leave: this.hasLeaveClass ? this.leaveClass : 'transition ease-in duration-75',\n leaveFrom: this.hasLeaveFromClass ? this.leaveFromClass : 'transform opacity-100 scale-100',\n leaveTo: this.hasLeaveToClass ? this.leaveToClass : 'transform opacity-0 scale-95',\n toggleClass: this.hasToggleClass ? this.toggleClass : 'hidden',\n }\n }\n\n // private\n\n #initializeDropdownActions() {\n // this will set the necessary actions on the dropdown element for it to work\n // data-action=\"click->dropdown#toggle click@window->dropdown#hide keydown.up->dropdown#previousItem keydown.down->dropdown#nextItem\"\n // Note: If existing actions are already specified by the user, they will be preserved and augmented without any redundancy.\n\n const actions = this.element.dataset.action ? this.element.dataset.action.split(' ') : []\n actions.push('click->dropdown#toggle')\n actions.push('click@window->dropdown#hide')\n actions.push('keydown.up->dropdown#previousItem')\n actions.push('keydown.down->dropdown#nextItem')\n actions.push('keydown.esc->dropdown#hide')\n this.element.dataset.action = [...new Set(actions)].join(' ')\n }\n\n // Ensures the menu is hidden before Turbo caches the page\n beforeCache() {\n this.openValue = false\n this.menuTarget.classList.add(\"hidden\")\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { enter, leave } from \"./transition\"\n\nexport default class extends Controller {\n static targets = [\"dialog\"]\n static values = {\n open: Boolean\n }\n\n connect() {\n if (this.openValue) this.showModal()\n }\n\n showModal() {\n this.dialogTarget.showModal()\n }\n\n show() {\n this.dialogTarget.show()\n }\n\n close() {\n this.dialogTarget.close()\n }\n}\n", "// A simple inline popover to be used wherever needed, with a configurable offset.\n// Visit The Stimulus Handbook for more details\n// https://stimulusjs.org/handbook/introduction\n//\n// This example controller works with specially annotated HTML like:\n//\n//
\n// Beginning in 2015, Google introduced what is called the\n//
popover#mouseOver mouseout->popover#mouseOut\">\n//
'local snack pack',\n//
\n// Terrible name - we know. But the biggest name in SEO came up with it.\n//
\n//
\n// which shows you local search results before normal organic results.\n//\n//\n// You can also toggle the popover using the click action.\n//
popover#toggle\" data-action=\"mouseenter->popover#show mouseleave->popover#hide\">\n\nimport { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['content']\n static values = {\n dismissAfter: Number,\n open: { type: Boolean, default: false }\n }\n\n openValueChanged() {\n transition(this.contentTarget, this.openValue)\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n }\n\n // If already true, extend the dismissal another X seconds since this will not trigger openValueChanged\n show(event) {\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n this.openValue = true\n }\n\n hide() {\n this.openValue = false\n }\n\n toggle() {\n this.openValue = !this.openValue\n }\n\n get shouldAutoDismiss() {\n return (this.openValue && this.hasDismissAfterValue)\n }\n\n scheduleDismissal() {\n if (!this.hasDismissAfterValue) return\n\n // Cancel any existing dismissals\n this.cancelDismissal()\n\n // Schedule the next dismissal\n this.timeoutId = setTimeout(() => {\n this.hide()\n this.timeoutId = undefined\n }, this.dismissAfterValue)\n }\n\n cancelDismissal() {\n if (typeof this.timeoutId === \"number\") {\n clearTimeout(this.timeoutId)\n this.timeoutId = undefined\n }\n }\n}\n", "import Dropdown from './dropdown.js'\nimport { transition } from './transition'\n\nexport default class extends Dropdown {\n static targets = ['overlay', 'close']\n\n openValueChanged() {\n transition(this.overlayTarget, this.openValue)\n transition(this.menuTarget, this.openValue)\n if (this.hasCloseTarget) transition(this.closeTarget, this.openValue)\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static classes = [ \"activeTab\", \"inactiveTab\" ]\n static targets = ['tab', 'panel', 'select']\n static values = {\n index: 0,\n updateAnchor: Boolean,\n scrollToAnchor: Boolean,\n }\n\n initialize() {\n if (this.anchor) this.indexValue = this.tabTargets.findIndex((tab) => tab.id === this.anchor)\n }\n\n connect() {\n this.showTab()\n }\n\n // Changes to the clicked tab\n change(event) {\n if (event.currentTarget.tagName === \"SELECT\") {\n this.indexValue = event.currentTarget.selectedIndex\n\n // If target specifies an index, use that\n } else if (event.currentTarget.dataset.index) {\n this.indexValue = event.currentTarget.dataset.index\n\n // If target specifies an id, use that\n } else if (event.currentTarget.dataset.id) {\n this.indexValue = this.tabTargets.findIndex((tab) => tab.id == event.currentTarget.dataset.id)\n\n // Otherwise, use the index of the current target\n } else {\n this.indexValue = this.tabTargets.indexOf(event.currentTarget)\n }\n\n window.dispatchEvent(new CustomEvent('tsc:tab-change'))\n }\n\n nextTab() {\n this.indexValue = Math.min(this.indexValue + 1, this.tabsCount - 1)\n }\n\n previousTab() {\n this.indexValue = Math.max(this.indexValue - 1, 0)\n }\n\n firstTab() {\n this.indexValue = 0\n }\n\n lastTab() {\n this.indexValue = this.tabsCount - 1\n }\n\n indexValueChanged() {\n this.showTab()\n\n // Update URL with the tab ID if it has one\n // This will be automatically selected on page load\n if (this.updateAnchorValue) {\n const new_tab_id = this.tabTargets[this.indexValue].id // Grab the id from the newly activated tab\n if (this.scrollToAnchorValue){\n location.hash = new_tab_id // Use location.hash to change the URL with scrolling\n } else {\n const currentUrl = window.location.href // Get the current URL\n const newUrl = currentUrl.split('#')[0] + '#' + new_tab_id // Create a new URL with the updated ID\n history.replaceState({}, document.title, newUrl) // Use history.replaceState to change the URL without scrolling\n }\n }\n }\n\n showTab() {\n this.panelTargets.forEach((panel, index) => {\n const tab = this.tabTargets[index]\n\n if (index === this.indexValue) {\n panel.classList.remove('hidden')\n if (this.hasInactiveTabClass) tab?.classList?.remove(...this.inactiveTabClasses)\n if (this.hasActiveTabClass) tab?.classList?.add(...this.activeTabClasses)\n } else {\n panel.classList.add('hidden')\n if (this.hasActiveTabClass) tab?.classList?.remove(...this.activeTabClasses)\n if (this.hasInactiveTabClass) tab?.classList?.add(...this.inactiveTabClasses)\n }\n })\n\n if (this.hasSelectTarget) {\n this.selectTarget.selectedIndex = this.indexValue\n }\n }\n\n get tabsCount() {\n return this.tabTargets.length\n }\n\n get anchor() {\n return (document.URL.split('#').length > 1) ? document.URL.split('#')[1] : null;\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['toggleable']\n static values = {\n open: { type: Boolean, default: false }\n }\n\n toggle(event) {\n this.openValue = !this.openValue\n this.animate()\n }\n\n // Sets open to value of checkbox or radio\n toggleInput(event) {\n this.openValue = event.target.checked\n this.animate()\n }\n\n hide() {\n this.openValue = false\n this.animate()\n }\n\n show() {\n this.openValue = true\n this.animate()\n }\n\n animate() {\n this.toggleableTargets.forEach(target => {\n transition(target, this.openValue)\n })\n }\n}\n"],
- "mappings": "4ZAAA,OAAS,cAAAA,MAAkB,qBCO3B,eAAsBC,EAAWC,EAASC,EAAOC,EAAoB,CAAC,EAAG,CACjED,EACJE,EAAMH,EAASE,CAAiB,EAEhCE,EAAMJ,EAASE,CAAiB,CAEpC,CASA,eAAsBC,EAAMH,EAASE,EAAoB,CAAC,EAAG,CAC3D,IAAMG,EAAoBL,EAAQ,QAAQ,iBAAmBE,EAAkB,OAAS,QAClFI,EACJN,EAAQ,QAAQ,qBAAuBE,EAAkB,WAAa,aAClEK,EAAYP,EAAQ,QAAQ,mBAAqBE,EAAkB,SAAW,WAC9EM,EAAcR,EAAQ,QAAQ,aAAeE,EAAkB,aAAe,SAGpFF,EAAQ,UAAU,IAAI,GAAGK,EAAkB,MAAM,GAAG,CAAC,EACrDL,EAAQ,UAAU,IAAI,GAAGM,EAAY,MAAM,GAAG,CAAC,EAC/CN,EAAQ,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IAAI,MAAM,GAAG,EAAE,OAAS,EAAK,SAAS,IAAI,MAAM,GAAG,EAAE,CAAC,EAAI,IAC7E,CACF,EAjGEM,EADKR,EACE,UAAU,CAAE,YAAa,aAAc,GAC9CQ,EAFKR,EAEE,UAAU,CAAC,MAAO,QAAS,QAAQ,GAC1CQ,EAHKR,EAGE,SAAS,CACd,MAAO,EACP,aAAc,QACd,eAAgB,OAClB,GCTF,OAAS,cAAAS,MAAkB,qBAG3B,IAAOC,EAAP,cAA6BC,CAAW,CAMtC,OAAOC,EAAO,CACZ,KAAK,UAAY,CAAC,KAAK,UACvB,KAAK,QAAQ,CACf,CAGA,YAAYA,EAAO,CACjB,KAAK,UAAYA,EAAM,OAAO,QAC9B,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,SAAU,CACR,KAAK,kBAAkB,QAAQC,GAAU,CACvCC,EAAWD,EAAQ,KAAK,SAAS,CACnC,CAAC,CACH,CACF,EA/BEE,EADKL,EACE,UAAU,CAAC,YAAY,GAC9BK,EAFKL,EAEE,SAAS,CACd,KAAM,CAAE,KAAM,QAAS,QAAS,EAAM,CACxC",
- "names": ["Controller", "transition", "element", "state", "transitionOptions", "enter", "leave", "transitionClasses", "fromClasses", "toClasses", "toggleClass", "nextFrame", "afterTransition", "resolve", "animation", "alert_default", "Controller", "enter", "leave", "__publicField", "Controller", "autosave_default", "Controller", "message", "__publicField", "Controller", "color_preview_default", "Controller", "color", "yiqColor", "hexColor", "yiqThreshold", "r", "g", "b", "__publicField", "Controller", "_initializeDropdownActions", "initializeDropdownActions_fn", "dropdown_default", "Controller", "__privateAdd", "__privateMethod", "transition", "event", "actions", "__publicField", "Controller", "modal_default", "Controller", "__publicField", "Controller", "popover_default", "Controller", "transition", "event", "__publicField", "slideover_default", "dropdown_default", "transition", "__publicField", "Controller", "tabs_default", "Controller", "tab", "event", "new_tab_id", "newUrl", "panel", "index", "__publicField", "Controller", "toggle_default", "Controller", "event", "target", "transition", "__publicField"]
+ "sourcesContent": ["import { Controller } from '@hotwired/stimulus'\nimport { enter, leave } from \"./transition\"\n\nexport default class extends Controller {\n static values = {\n dismissAfter: Number,\n showDelay: { type: Number, default: 0 },\n removeDelay: { type: Number, default: 1100 }\n }\n\n connect() {\n setTimeout(() => {\n enter(this.element)\n }, this.showDelayValue)\n\n // Auto dimiss if defined\n if (this.hasDismissAfterValue) {\n setTimeout(() => {\n this.close()\n }, this.dismissAfterValue)\n }\n }\n\n // Runs hide animation and then removes element from the page\n close() {\n leave(this.element).then(() => {\n this.element.remove()\n })\n }\n}\n", "// Enter transition:\n//\n// transition(this.element, true)\n//\n// Leave transition:\n//\n// transition(this.element, false)\nexport async function transition(element, state, transitionOptions = {}) {\n if (!!state) {\n enter(element, transitionOptions)\n } else {\n leave(element, transitionOptions)\n }\n}\n\n// class=\"fixed inset-0 bg-black overflow-y-auto flex items-center justify-center bg-opacity-80 hidden\"\n// data-transition-enter=\"transition-all ease-in-out duration-300\"\n// data-transition-enter-from=\"bg-opacity-0\"\n// data-transition-enter-to=\"bg-opacity-80\"\n// data-transition-leave=\"transition-all ease-in-out duration-300\"\n// data-transition-leave-from=\"bg-opacity-80\"\n// data-transition-leave-to=\"bg-opacity-0\"\nexport async function enter(element, transitionOptions = {}) {\n const transitionClasses = element.dataset.transitionEnter || transitionOptions.enter || 'enter'\n const fromClasses =\n element.dataset.transitionEnterFrom || transitionOptions.enterFrom || 'enter-from'\n const toClasses = element.dataset.transitionEnterTo || transitionOptions.enterTo || 'enter-to'\n const toggleClass = element.dataset.toggleClass || transitionOptions.toggleClass || 'hidden'\n\n // Prepare transition\n element.classList.add(...transitionClasses.split(' '))\n element.classList.add(...fromClasses.split(' '))\n element.classList.remove(...toClasses.split(' '))\n element.classList.remove(...toggleClass.split(' '))\n\n await nextFrame()\n\n element.classList.remove(...fromClasses.split(' '))\n element.classList.add(...toClasses.split(' '))\n\n try {\n await afterTransition(element)\n } finally {\n element.classList.remove(...transitionClasses.split(' '))\n }\n}\n\nexport async function leave(element, transitionOptions = {}) {\n const transitionClasses = element.dataset.transitionLeave || transitionOptions.leave || 'leave'\n const fromClasses =\n element.dataset.transitionLeaveFrom || transitionOptions.leaveFrom || 'leave-from'\n const toClasses = element.dataset.transitionLeaveTo || transitionOptions.leaveTo || 'leave-to'\n const toggleClass = element.dataset.toggleClass || transitionOptions.toogle || 'hidden'\n\n // Prepare transition\n element.classList.add(...transitionClasses.split(' '))\n element.classList.add(...fromClasses.split(' '))\n element.classList.remove(...toClasses.split(' '))\n\n await nextFrame()\n\n element.classList.remove(...fromClasses.split(' '))\n element.classList.add(...toClasses.split(' '))\n\n try {\n await afterTransition(element)\n } finally {\n element.classList.remove(...transitionClasses.split(' '))\n element.classList.add(...toggleClass.split(' '))\n }\n}\n\nfunction nextFrame() {\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n requestAnimationFrame(resolve)\n })\n })\n}\n\nfunction afterTransition(element) {\n return Promise.all(element.getAnimations().map(animation => animation.finished))\n}\n", "// Form autosave\n//\n// <%= form_with(model: post, data: { controller: \"autosave\", autosave_target: \"form\", action: \"turbo:submit-end->autosave#success turbo:fetch-request-error->autosave#error\" }) do |form| %>\n//
\n// <%= form.label :title %>\n// <%= form.text_field :title, class: 'form-control', data: { action: \"keyup->autosave#save\" } %>\n//
\n//\n//
\n// <% end %>\n\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['form', 'status']\n static values = {\n submitDuration: {type: Number, default: 1000},\n statusDuration: {type: Number, default: 2000},\n submittingText: {type: String, default: \"Saving...\"},\n successText: {type: String, default: \"Saved!\"},\n errorText: {type: String, default: \"Unable to save.\"}\n }\n\n connect() {\n this.timeout = null\n }\n\n save() {\n clearTimeout(this.timeout)\n\n this.timeout = setTimeout(() => {\n this.statusTarget.textContent = this.submittingTextValue\n this.formTarget.requestSubmit()\n }, this.submitDurationValue)\n }\n\n success() {\n this.setStatus(this.successTextValue)\n }\n\n error() {\n this.setStatus(this.errorTextValue)\n }\n\n setStatus(message) {\n this.statusTarget.textContent = message\n\n this.timeout = setTimeout(() => {\n this.statusTarget.textContent = ''\n }, this.statusDurationValue)\n }\n}\n", "// A color picker preview where you can choose to have the color or backgroundColor\n// get updated based on the result of a color picker. It also supports ensuring\n// the foreground text is always readable by performing a YIQ calculation to\n// set the text to black or white based on the contrast of the color and backgroundColor.\n\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['preview', 'color'];\n static values = {\n style: {type: String, default: \"backgroundColor\"}\n }\n\n update() {\n this.preview = this.colorTarget.value\n }\n\n set preview(color) {\n this.previewTarget.style[this.styleValue] = color\n\n // Ensure the foreground text is always readable by setting either the\n // backgroundColor or color to black or white.\n const yiqColor = this._getContrastYIQ(color)\n\n if (this.styleValue === 'color') {\n this.previewTarget.style.backgroundColor = yiqColor\n } else {\n this.previewTarget.style.color = yiqColor\n }\n }\n\n _getContrastYIQ(hexColor) {\n // Taken from: https://24ways.org/2010/calculating-color-contrast/\n hexColor = hexColor.replace('#', '');\n\n const yiqThreshold = 128;\n const r = parseInt(hexColor.substr(0, 2), 16);\n const g = parseInt(hexColor.substr(2, 2), 16);\n const b = parseInt(hexColor.substr(4, 2), 16);\n const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;\n\n return (yiq >= yiqThreshold) ? '#000' : '#fff';\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\nimport { transition } from './transition'\n\nexport default class extends Controller {\n static targets = ['menu', 'button', 'menuItem']\n static values = {\n open: { type: Boolean, default: false },\n closeOnEscape: { type: Boolean, default: true },\n closeOnClickOutside: { type: Boolean, default: true },\n }\n\n static classes = ['enter', 'enterFrom', 'enterTo', 'leave', 'leaveFrom', 'leaveTo', 'toggle']\n\n // lifecycle\n connect() {\n document.addEventListener(\"turbo:before-cache\", this.beforeCache.bind(this))\n this.#initializeDropdownActions()\n }\n\n disconnect() {\n document.removeEventListener(\"turbo:before-cache\", this.beforeCache.bind(this))\n\n if (this.hasButtonTarget) {\n this.buttonTarget.removeEventListener(\"keydown\", this._onMenuButtonKeydown)\n this.buttonTarget.removeAttribute(\"aria-haspopup\")\n }\n }\n\n // callbacks\n openValueChanged() {\n transition(this.menuTarget, this.openValue, this.transitionOptions)\n\n if (this.openValue === true && this.hasMenuItemTarget) {\n this.menuItemTargets[0].focus()\n }\n }\n\n // actions\n show() {\n this.openValue = true\n }\n\n close() {\n this.openValue = false\n }\n\n hide(event) {\n // if the event is a click and the target is not inside the dropdown, then close it\n if (\n this.closeOnClickOutsideValue &&\n event.target.nodeType &&\n this.element.contains(event.target) === false &&\n this.openValue\n ) {\n this.openValue = false\n }\n\n // if the event is a keydown and the key is escape, then close it\n if (this.closeOnEscapeValue && event.key === 'Escape' && this.openValue) {\n this.openValue = false\n }\n }\n\n toggle() {\n this.openValue = !this.openValue\n }\n\n nextItem(event) {\n event.preventDefault()\n\n this.menuItemTargets[this.nextIndex].focus()\n }\n\n previousItem(event) {\n event.preventDefault()\n\n this.menuItemTargets[this.previousIndex].focus()\n }\n\n // getters and setters\n get currentItemIndex() {\n return this.menuItemTargets.indexOf(document.activeElement)\n }\n\n get nextIndex() {\n return Math.min(this.currentItemIndex + 1, this.menuItemTargets.length - 1)\n }\n\n get previousIndex() {\n return Math.max(this.currentItemIndex - 1, 0)\n }\n\n get transitionOptions() {\n // once the Class API default values are available, we can simplify this\n return {\n enter: this.hasEnterClass ? this.enterClass : 'transition ease-out duration-100',\n enterFrom: this.hasEnterFromClass ? this.enterFromClass : 'transform opacity-0 scale-95',\n enterTo: this.hasEnterToClass ? this.enterToClass : 'transform opacity-100 scale-100',\n leave: this.hasLeaveClass ? this.leaveClass : 'transition ease-in duration-75',\n leaveFrom: this.hasLeaveFromClass ? this.leaveFromClass : 'transform opacity-100 scale-100',\n leaveTo: this.hasLeaveToClass ? this.leaveToClass : 'transform opacity-0 scale-95',\n toggleClass: this.hasToggleClass ? this.toggleClass : 'hidden',\n }\n }\n\n // private\n\n #initializeDropdownActions() {\n // this will set the necessary actions on the dropdown element for it to work\n // data-action=\"click->dropdown#toggle click@window->dropdown#hide keydown.up->dropdown#previousItem keydown.down->dropdown#nextItem\"\n // Note: If existing actions are already specified by the user, they will be preserved and augmented without any redundancy.\n\n const actions = this.element.dataset.action ? this.element.dataset.action.split(' ') : []\n actions.push('click->dropdown#toggle')\n actions.push('click@window->dropdown#hide')\n actions.push('keydown.up->dropdown#previousItem')\n actions.push('keydown.down->dropdown#nextItem')\n actions.push('keydown.esc->dropdown#hide')\n this.element.dataset.action = [...new Set(actions)].join(' ')\n }\n\n // Ensures the menu is hidden before Turbo caches the page\n beforeCache() {\n this.openValue = false\n this.menuTarget.classList.add(\"hidden\")\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { enter, leave } from \"./transition\"\n\nexport default class extends Controller {\n static targets = [\"dialog\"]\n static values = {\n open: Boolean\n }\n\n connect() {\n if (this.openValue) this.showModal()\n }\n\n showModal() {\n this.dialogTarget.showModal()\n }\n\n show() {\n this.dialogTarget.show()\n }\n\n close() {\n this.dialogTarget.close()\n }\n}\n", "// A simple inline popover to be used wherever needed, with a configurable offset.\n// Visit The Stimulus Handbook for more details\n// https://stimulusjs.org/handbook/introduction\n//\n// This example controller works with specially annotated HTML like:\n//\n//
\n// Beginning in 2015, Google introduced what is called the\n//
popover#mouseOver mouseout->popover#mouseOut\">\n//
'local snack pack',\n//
\n// Terrible name - we know. But the biggest name in SEO came up with it.\n//
\n//
\n// which shows you local search results before normal organic results.\n//\n//\n// You can also toggle the popover using the click action.\n//
popover#toggle\" data-action=\"mouseenter->popover#show mouseleave->popover#hide\">\n\nimport { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['content']\n static values = {\n dismissAfter: Number,\n open: { type: Boolean, default: false }\n }\n\n openValueChanged() {\n transition(this.contentTarget, this.openValue)\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n }\n\n // If already true, extend the dismissal another X seconds since this will not trigger openValueChanged\n show(event) {\n if (this.shouldAutoDismiss) this.scheduleDismissal()\n this.openValue = true\n }\n\n hide() {\n this.openValue = false\n }\n\n toggle() {\n this.openValue = !this.openValue\n }\n\n get shouldAutoDismiss() {\n return (this.openValue && this.hasDismissAfterValue)\n }\n\n scheduleDismissal() {\n if (!this.hasDismissAfterValue) return\n\n // Cancel any existing dismissals\n this.cancelDismissal()\n\n // Schedule the next dismissal\n this.timeoutId = setTimeout(() => {\n this.hide()\n this.timeoutId = undefined\n }, this.dismissAfterValue)\n }\n\n cancelDismissal() {\n if (typeof this.timeoutId === \"number\") {\n clearTimeout(this.timeoutId)\n this.timeoutId = undefined\n }\n }\n}\n", "import Dropdown from './dropdown.js'\nimport { transition } from './transition'\n\nexport default class extends Dropdown {\n static targets = ['overlay', 'close']\n\n openValueChanged() {\n transition(this.overlayTarget, this.openValue)\n transition(this.menuTarget, this.openValue)\n if (this.hasCloseTarget) transition(this.closeTarget, this.openValue)\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static classes = [ \"activeTab\", \"inactiveTab\" ]\n static targets = ['tab', 'panel', 'select']\n static values = {\n index: 0,\n updateAnchor: Boolean,\n scrollToAnchor: Boolean,\n }\n\n initialize() {\n if (this.anchor) this.indexValue = this.tabTargets.findIndex((tab) => tab.id === this.anchor)\n }\n\n connect() {\n this.showTab()\n }\n\n // Changes to the clicked tab\n change(event) {\n if (event.currentTarget.tagName === \"SELECT\") {\n this.indexValue = event.currentTarget.selectedIndex\n\n // If target specifies an index, use that\n } else if (event.currentTarget.dataset.index) {\n this.indexValue = event.currentTarget.dataset.index\n\n // If target specifies an id, use that\n } else if (event.currentTarget.dataset.id) {\n this.indexValue = this.tabTargets.findIndex((tab) => tab.id == event.currentTarget.dataset.id)\n\n // Otherwise, use the index of the current target\n } else {\n this.indexValue = this.tabTargets.indexOf(event.currentTarget)\n }\n\n window.dispatchEvent(new CustomEvent('tsc:tab-change'))\n }\n\n nextTab() {\n this.indexValue = Math.min(this.indexValue + 1, this.tabsCount - 1)\n }\n\n previousTab() {\n this.indexValue = Math.max(this.indexValue - 1, 0)\n }\n\n firstTab() {\n this.indexValue = 0\n }\n\n lastTab() {\n this.indexValue = this.tabsCount - 1\n }\n\n indexValueChanged() {\n this.showTab()\n\n // Update URL with the tab ID if it has one\n // This will be automatically selected on page load\n if (this.updateAnchorValue) {\n const new_tab_id = this.tabTargets[this.indexValue].id // Grab the id from the newly activated tab\n if (this.scrollToAnchorValue){\n location.hash = new_tab_id // Use location.hash to change the URL with scrolling\n } else {\n const currentUrl = window.location.href // Get the current URL\n const newUrl = currentUrl.split('#')[0] + '#' + new_tab_id // Create a new URL with the updated ID\n history.replaceState({}, document.title, newUrl) // Use history.replaceState to change the URL without scrolling\n }\n }\n }\n\n showTab() {\n this.panelTargets.forEach((panel, index) => {\n const tab = this.tabTargets[index]\n\n if (index === this.indexValue) {\n panel.classList.remove('hidden')\n tab.ariaSelected = 'true'\n if (this.hasInactiveTabClass) tab?.classList?.remove(...this.inactiveTabClasses)\n if (this.hasActiveTabClass) tab?.classList?.add(...this.activeTabClasses)\n } else {\n panel.classList.add('hidden')\n tab.ariaSelected = null\n if (this.hasActiveTabClass) tab?.classList?.remove(...this.activeTabClasses)\n if (this.hasInactiveTabClass) tab?.classList?.add(...this.inactiveTabClasses)\n }\n })\n\n if (this.hasSelectTarget) {\n this.selectTarget.selectedIndex = this.indexValue\n }\n\n this.scrollActiveTabIntoView()\n }\n\n // If tabs have horizontal scrolling, the active tab may be out of sight.\n // Make sure the active tab is visible by scrolling it into the view.\n scrollActiveTabIntoView() {\n const activeTab = this.element.querySelector('[aria-selected]');\n if (activeTab)\n activeTab.scrollIntoView({\n inline: 'center',\n });\n }\n\n get tabsCount() {\n return this.tabTargets.length\n }\n\n get anchor() {\n return (document.URL.split('#').length > 1) ? document.URL.split('#')[1] : null;\n }\n}\n", "import { Controller } from '@hotwired/stimulus'\nimport { transition } from \"./transition\"\n\nexport default class extends Controller {\n static targets = ['toggleable']\n static values = {\n open: { type: Boolean, default: false }\n }\n\n toggle(event) {\n this.openValue = !this.openValue\n this.animate()\n }\n\n // Sets open to value of checkbox or radio\n toggleInput(event) {\n this.openValue = event.target.checked\n this.animate()\n }\n\n hide() {\n this.openValue = false\n this.animate()\n }\n\n show() {\n this.openValue = true\n this.animate()\n }\n\n animate() {\n this.toggleableTargets.forEach(target => {\n transition(target, this.openValue)\n })\n }\n}\n"],
+ "mappings": "4ZAAA,OAAS,cAAAA,MAAkB,qBCO3B,eAAsBC,EAAWC,EAASC,EAAOC,EAAoB,CAAC,EAAG,CACjED,EACJE,EAAMH,EAASE,CAAiB,EAEhCE,EAAMJ,EAASE,CAAiB,CAEpC,CASA,eAAsBC,EAAMH,EAASE,EAAoB,CAAC,EAAG,CAC3D,IAAMG,EAAoBL,EAAQ,QAAQ,iBAAmBE,EAAkB,OAAS,QAClFI,EACJN,EAAQ,QAAQ,qBAAuBE,EAAkB,WAAa,aAClEK,EAAYP,EAAQ,QAAQ,mBAAqBE,EAAkB,SAAW,WAC9EM,EAAcR,EAAQ,QAAQ,aAAeE,EAAkB,aAAe,SAGpFF,EAAQ,UAAU,IAAI,GAAGK,EAAkB,MAAM,GAAG,CAAC,EACrDL,EAAQ,UAAU,IAAI,GAAGM,EAAY,MAAM,GAAG,CAAC,EAC/CN,EAAQ,UAAU,OAAO,GAAGO,EAAU,MAAM,GAAG,CAAC,EAChDP,EAAQ,UAAU,OAAO,GAAGQ,EAAY,MAAM,GAAG,CAAC,EAElD,MAAMC,EAAU,EAEhBT,EAAQ,UAAU,OAAO,GAAGM,EAAY,MAAM,GAAG,CAAC,EAClDN,EAAQ,UAAU,IAAI,GAAGO,EAAU,MAAM,GAAG,CAAC,EAE7C,GAAI,CACF,MAAMG,EAAgBV,CAAO,CAC/B,QAAE,CACAA,EAAQ,UAAU,OAAO,GAAGK,EA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AEE,UAAU,CAAC,MAAO,QAAS,QAAQ,GAC1CS,EAHKT,EAGE,SAAS,CACd,MAAO,EACP,aAAc,QACd,eAAgB,OAClB,GCTF,OAAS,cAAAU,MAAkB,qBAG3B,IAAOC,EAAP,cAA6BC,CAAW,CAMtC,OAAOC,EAAO,CACZ,KAAK,UAAY,CAAC,KAAK,UACvB,KAAK,QAAQ,CACf,CAGA,YAAYA,EAAO,CACjB,KAAK,UAAYA,EAAM,OAAO,QAC9B,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,MAAO,CACL,KAAK,UAAY,GACjB,KAAK,QAAQ,CACf,CAEA,SAAU,CACR,KAAK,kBAAkB,QAAQC,GAAU,CACvCC,EAAWD,EAAQ,KAAK,SAAS,CACnC,CAAC,CACH,CACF,EA/BEE,EADKL,EACE,UAAU,CAAC,YAAY,GAC9BK,EAFKL,EAEE,SAAS,CACd,KAAM,CAAE,KAAM,QAAS,QAAS,EAAM,CACxC",
+ "names": ["Controller", "transition", "element", "state", "transitionOptions", "enter", "leave", "transitionClasses", "fromClasses", "toClasses", "toggleClass", "nextFrame", "afterTransition", "resolve", "animation", "alert_default", "Controller", "enter", "leave", "__publicField", "Controller", "autosave_default", "Controller", "message", "__publicField", "Controller", "color_preview_default", "Controller", "color", "yiqColor", "hexColor", "yiqThreshold", "r", "g", "b", "__publicField", "Controller", "_initializeDropdownActions", "initializeDropdownActions_fn", "dropdown_default", "Controller", "__privateAdd", "__privateMethod", "transition", "event", "actions", "__publicField", "Controller", "modal_default", "Controller", "__publicField", "Controller", "popover_default", "Controller", "transition", "event", "__publicField", "slideover_default", "dropdown_default", "transition", "__publicField", "Controller", "tabs_default", "Controller", "tab", "event", "new_tab_id", "newUrl", "panel", "index", "activeTab", "__publicField", "Controller", "toggle_default", "Controller", "event", "target", "transition", "__publicField"]
}
diff --git a/index.html b/index.html
index acf06ea..c615f0a 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,7 @@
+
TailwindCSS Stimulus Components