@trendyol/baklava 2.4.0-beta.9 → 3.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/assets/badge.svg +5 -0
- package/dist/assets/express.svg +3 -0
- package/dist/assets/express_delivery.svg +6 -0
- package/dist/assets/express_furniture.svg +6 -0
- package/dist/assets/medal.svg +2 -10
- package/dist/assets/sorting_asc.svg +4 -0
- package/dist/assets/sorting_desc.svg +4 -0
- package/dist/assets/translation.svg +3 -0
- package/dist/baklava-react.d.ts +85 -27
- package/dist/baklava-react.d.ts.map +1 -1
- package/dist/baklava-react.js +1 -1
- package/dist/baklava-react.js.map +3 -3
- package/dist/baklava-vue.d.ts +7 -0
- package/dist/baklava.d.ts +7 -0
- package/dist/baklava.d.ts.map +1 -1
- package/dist/baklava.js +1 -1
- package/dist/{chunk-AVMAZXZT.js → chunk-3IQYFKUZ.js} +2 -2
- package/dist/{chunk-SLY6IY2R.js → chunk-3QXRSN5E.js} +2 -2
- package/dist/{chunk-XQUQIQBO.js → chunk-57IOXMBV.js} +2 -2
- package/dist/chunk-6DJUQN3S.js +2 -0
- package/dist/chunk-6DJUQN3S.js.map +7 -0
- package/dist/chunk-6FHZDUYQ.js +16 -0
- package/dist/chunk-6FHZDUYQ.js.map +7 -0
- package/dist/{chunk-EPFBV6RC.js → chunk-6H54TTNK.js} +3 -3
- package/dist/chunk-6H54TTNK.js.map +7 -0
- package/dist/chunk-BHKJL7XR.js +63 -0
- package/dist/chunk-BHKJL7XR.js.map +7 -0
- package/dist/chunk-DNSU2ZXO.js +2 -0
- package/dist/chunk-DNSU2ZXO.js.map +7 -0
- package/dist/{chunk-RQG2GHCK.js → chunk-DR4D2GMR.js} +2 -2
- package/dist/{chunk-MNNOI75G.js → chunk-FPDUGGJ5.js} +2 -2
- package/dist/chunk-HBMVE2VJ.js +26 -0
- package/dist/chunk-HBMVE2VJ.js.map +7 -0
- package/dist/chunk-HBPBDC7T.js +95 -0
- package/dist/chunk-HBPBDC7T.js.map +7 -0
- package/dist/chunk-HMDGICS5.js +2 -0
- package/dist/chunk-HMDGICS5.js.map +7 -0
- package/dist/{chunk-PCREGBBF.js → chunk-HSVSMABT.js} +2 -2
- package/dist/{chunk-X5MXYPRD.js → chunk-HULHLSIH.js} +2 -2
- package/dist/chunk-HZ6A5QFC.js +2 -0
- package/dist/chunk-HZ6A5QFC.js.map +7 -0
- package/dist/{chunk-FJTTJ5ZT.js → chunk-IU67AS3O.js} +2 -2
- package/dist/chunk-IZ2LK5GK.js +2 -0
- package/dist/{chunk-RFUZBNM4.js → chunk-JZ3S4JFA.js} +2 -2
- package/dist/chunk-K3IALLEI.js +2 -0
- package/dist/chunk-K3IALLEI.js.map +7 -0
- package/dist/{chunk-JI2OEPG2.js → chunk-L6BUT2FV.js} +2 -2
- package/dist/{chunk-6UTBN2XX.js → chunk-LYOZ36IH.js} +2 -2
- package/dist/{chunk-KR6AUZ77.js → chunk-MACM4RPG.js} +2 -2
- package/dist/chunk-MG23TBA3.js +18 -0
- package/dist/chunk-MG23TBA3.js.map +7 -0
- package/dist/chunk-O665PNJ6.js +33 -0
- package/dist/chunk-O665PNJ6.js.map +7 -0
- package/dist/{chunk-5EFPA3CA.js → chunk-PLUCMBSD.js} +5 -5
- package/dist/chunk-PLUCMBSD.js.map +7 -0
- package/dist/{chunk-WA7DDIST.js → chunk-Q7LYRUYQ.js} +2 -2
- package/dist/chunk-QXFCLEZB.js +16 -0
- package/dist/chunk-QXFCLEZB.js.map +7 -0
- package/dist/chunk-TI6K2YFV.js +11 -0
- package/dist/chunk-TI6K2YFV.js.map +7 -0
- package/dist/chunk-UERDT3VQ.js +50 -0
- package/dist/chunk-UERDT3VQ.js.map +7 -0
- package/dist/chunk-VZDVVGEO.js +110 -0
- package/dist/chunk-VZDVVGEO.js.map +7 -0
- package/dist/chunk-WJ2RNEDL.js +8 -0
- package/dist/chunk-WJ2RNEDL.js.map +7 -0
- package/dist/chunk-XDCNO7EY.js +2 -0
- package/dist/chunk-XDCNO7EY.js.map +7 -0
- package/dist/chunk-XDUIVR6I.js +2 -0
- package/dist/chunk-XDUIVR6I.js.map +7 -0
- package/dist/{chunk-LWG2UXQG.js → chunk-XLRX2X2I.js} +2 -2
- package/dist/{chunk-VOYAVKU3.js → chunk-YCHZB54C.js} +2 -2
- package/dist/{chunk-L4XYDFNG.js → chunk-YML6L24Q.js} +3 -3
- package/dist/{chunk-L4XYDFNG.js.map → chunk-YML6L24Q.js.map} +2 -2
- package/dist/components/alert/bl-alert.d.ts +1 -1
- package/dist/components/alert/bl-alert.d.ts.map +1 -1
- package/dist/components/alert/bl-alert.js +1 -1
- package/dist/components/badge/bl-badge.d.ts +1 -1
- package/dist/components/badge/bl-badge.d.ts.map +1 -1
- package/dist/components/badge/bl-badge.js +1 -1
- package/dist/components/button/bl-button.d.ts +4 -4
- package/dist/components/button/bl-button.d.ts.map +1 -1
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/checkbox-group/bl-checkbox-group.js +1 -1
- package/dist/components/checkbox-group/checkbox/bl-checkbox.js +1 -1
- package/dist/components/dialog/bl-dialog.d.ts.map +1 -1
- package/dist/components/dialog/bl-dialog.js +1 -1
- package/dist/components/dialog/bl-dialog.stories.d.ts +1 -1
- package/dist/components/dialog/bl-dialog.stories.d.ts.map +1 -1
- package/dist/components/dialog/bl-dialog.stories.js +1 -1
- package/dist/components/drawer/bl-drawer.d.ts +6 -0
- package/dist/components/drawer/bl-drawer.d.ts.map +1 -1
- package/dist/components/drawer/bl-drawer.js +1 -1
- package/dist/components/dropdown/bl-dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/bl-dropdown.js +1 -1
- package/dist/components/dropdown/group/bl-dropdown-group.js +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.d.ts +1 -0
- package/dist/components/dropdown/item/bl-dropdown-item.d.ts.map +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
- package/dist/components/icon/bl-icon.js +1 -1
- package/dist/components/icon/icon-list.d.ts +2 -2
- package/dist/components/icon/icon-list.d.ts.map +1 -1
- package/dist/components/icon/icon-list.js +1 -1
- package/dist/components/icon/icon-list.js.map +2 -2
- package/dist/components/input/bl-input.d.ts +2 -2
- package/dist/components/input/bl-input.d.ts.map +1 -1
- package/dist/components/input/bl-input.js +1 -1
- package/dist/components/notification/bl-notification.d.ts +3 -3
- package/dist/components/notification/bl-notification.d.ts.map +1 -1
- package/dist/components/notification/bl-notification.js +1 -1
- package/dist/components/notification/bl-notification.stories.d.ts +2 -2
- package/dist/components/notification/bl-notification.stories.d.ts.map +1 -1
- package/dist/components/notification/bl-notification.stories.js +1 -1
- package/dist/components/notification/bl-notification.stories.js.map +1 -1
- package/dist/components/notification/card/bl-notification-card.d.ts +1 -1
- package/dist/components/notification/card/bl-notification-card.d.ts.map +1 -1
- package/dist/components/notification/card/bl-notification-card.js +1 -1
- package/dist/components/pagination/bl-pagination.d.ts +2 -2
- package/dist/components/pagination/bl-pagination.d.ts.map +1 -1
- package/dist/components/pagination/bl-pagination.js +1 -1
- package/dist/components/popover/bl-popover.d.ts +2 -2
- package/dist/components/popover/bl-popover.d.ts.map +1 -1
- package/dist/components/popover/bl-popover.js +1 -1
- package/dist/components/progress-indicator/bl-progress-indicator.d.ts +1 -1
- package/dist/components/progress-indicator/bl-progress-indicator.d.ts.map +1 -1
- package/dist/components/progress-indicator/bl-progress-indicator.js +1 -1
- package/dist/components/radio-group/bl-radio-group.js +1 -1
- package/dist/components/radio-group/radio/bl-radio.js +1 -1
- package/dist/components/select/bl-select.d.ts +11 -9
- package/dist/components/select/bl-select.d.ts.map +1 -1
- package/dist/components/select/bl-select.js +1 -1
- package/dist/components/select/option/bl-select-option.d.ts +4 -0
- package/dist/components/select/option/bl-select-option.d.ts.map +1 -1
- package/dist/components/select/option/bl-select-option.js +1 -1
- package/dist/components/split-button/bl-split-button.d.ts +103 -0
- package/dist/components/split-button/bl-split-button.d.ts.map +1 -0
- package/dist/components/split-button/bl-split-button.js +2 -0
- package/dist/components/split-button/bl-split-button.js.map +7 -0
- package/dist/components/split-button/bl-split-button.test.d.ts +2 -0
- package/dist/components/split-button/bl-split-button.test.d.ts.map +1 -0
- package/dist/components/switch/bl-switch.d.ts.map +1 -1
- package/dist/components/switch/bl-switch.js +1 -1
- package/dist/components/tab-group/bl-tab-group.js +1 -1
- package/dist/components/tab-group/tab/bl-tab.js +1 -1
- package/dist/components/tab-group/tab-panel/bl-tab-panel.js +1 -1
- package/dist/components/table/bl-table.d.ts +120 -0
- package/dist/components/table/bl-table.d.ts.map +1 -0
- package/dist/components/table/bl-table.js +2 -0
- package/dist/components/table/bl-table.js.map +7 -0
- package/dist/components/table/bl-table.test.d.ts +6 -0
- package/dist/components/table/bl-table.test.d.ts.map +1 -0
- package/dist/components/table/table-body/bl-table-body.d.ts +19 -0
- package/dist/components/table/table-body/bl-table-body.d.ts.map +1 -0
- package/dist/components/table/table-body/bl-table-body.js +2 -0
- package/dist/components/table/table-body/bl-table-body.js.map +7 -0
- package/dist/components/table/table-body/bl-table-body.test.d.ts +2 -0
- package/dist/components/table/table-body/bl-table-body.test.d.ts.map +1 -0
- package/dist/components/table/table-cell/bl-table-cell.d.ts +35 -0
- package/dist/components/table/table-cell/bl-table-cell.d.ts.map +1 -0
- package/dist/components/table/table-cell/bl-table-cell.js +2 -0
- package/dist/components/table/table-cell/bl-table-cell.js.map +7 -0
- package/dist/components/table/table-cell/bl-table-cell.test.d.ts +2 -0
- package/dist/components/table/table-cell/bl-table-cell.test.d.ts.map +1 -0
- package/dist/components/table/table-header/bl-table-header.d.ts +22 -0
- package/dist/components/table/table-header/bl-table-header.d.ts.map +1 -0
- package/dist/components/table/table-header/bl-table-header.js +2 -0
- package/dist/components/table/table-header/bl-table-header.js.map +7 -0
- package/dist/components/table/table-header/bl-table-header.test.d.ts +2 -0
- package/dist/components/table/table-header/bl-table-header.test.d.ts.map +1 -0
- package/dist/components/table/table-header-cell/bl-table-header-cell.d.ts +43 -0
- package/dist/components/table/table-header-cell/bl-table-header-cell.d.ts.map +1 -0
- package/dist/components/table/table-header-cell/bl-table-header-cell.js +2 -0
- package/dist/components/table/table-header-cell/bl-table-header-cell.js.map +7 -0
- package/dist/components/table/table-header-cell/bl-table-header-cell.test.d.ts +2 -0
- package/dist/components/table/table-header-cell/bl-table-header-cell.test.d.ts.map +1 -0
- package/dist/components/table/table-row/bl-table-row.d.ts +31 -0
- package/dist/components/table/table-row/bl-table-row.d.ts.map +1 -0
- package/dist/components/table/table-row/bl-table-row.js +2 -0
- package/dist/components/table/table-row/bl-table-row.js.map +7 -0
- package/dist/components/table/table-row/bl-table-row.test.d.ts +2 -0
- package/dist/components/table/table-row/bl-table-row.test.d.ts.map +1 -0
- package/dist/components/textarea/bl-textarea.d.ts +1 -1
- package/dist/components/textarea/bl-textarea.d.ts.map +1 -1
- package/dist/components/textarea/bl-textarea.js +1 -1
- package/dist/components/tooltip/bl-tooltip.d.ts +1 -1
- package/dist/components/tooltip/bl-tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/bl-tooltip.js +1 -1
- package/dist/custom-elements.json +824 -43
- package/dist/generated/locale-codes.d.ts +14 -0
- package/dist/generated/locale-codes.d.ts.map +1 -0
- package/dist/generated/locale-codes.js +2 -0
- package/dist/generated/locale-codes.js.map +7 -0
- package/dist/generated/locales/tr.d.ts +9 -0
- package/dist/generated/locales/tr.d.ts.map +1 -0
- package/dist/generated/locales/tr.js +2 -0
- package/dist/generated/locales/tr.js.map +7 -0
- package/dist/localization.d.ts +4 -0
- package/dist/localization.d.ts.map +1 -0
- package/dist/localization.js +2 -0
- package/dist/localization.js.map +7 -0
- package/dist/utilities/icon-mock.d.ts +1 -1
- package/dist/utilities/icon-mock.d.ts.map +1 -1
- package/dist/utilities/style-to-px-converter.test.d.ts +2 -0
- package/dist/utilities/style-to-px-converter.test.d.ts.map +1 -0
- package/dist/utilities/style-to-px.converter.d.ts +2 -0
- package/dist/utilities/style-to-px.converter.d.ts.map +1 -0
- package/package.json +11 -7
- package/dist/chunk-5EFPA3CA.js.map +0 -7
- package/dist/chunk-AMAOGVPQ.js +0 -106
- package/dist/chunk-AMAOGVPQ.js.map +0 -7
- package/dist/chunk-BNACGMP2.js +0 -16
- package/dist/chunk-BNACGMP2.js.map +0 -7
- package/dist/chunk-CYCIT2TG.js +0 -2
- package/dist/chunk-DJOD4BTL.js +0 -2
- package/dist/chunk-DJOD4BTL.js.map +0 -7
- package/dist/chunk-EPFBV6RC.js.map +0 -7
- package/dist/chunk-FSFO7DCO.js +0 -50
- package/dist/chunk-FSFO7DCO.js.map +0 -7
- package/dist/chunk-HJWQ7Y3K.js +0 -5
- package/dist/chunk-HJWQ7Y3K.js.map +0 -7
- package/dist/chunk-JPRCBAHY.js +0 -23
- package/dist/chunk-JPRCBAHY.js.map +0 -7
- package/dist/chunk-KXWP6EDU.js +0 -26
- package/dist/chunk-KXWP6EDU.js.map +0 -7
- package/dist/chunk-MPKYBU46.js +0 -33
- package/dist/chunk-MPKYBU46.js.map +0 -7
- /package/dist/{chunk-AVMAZXZT.js.map → chunk-3IQYFKUZ.js.map} +0 -0
- /package/dist/{chunk-SLY6IY2R.js.map → chunk-3QXRSN5E.js.map} +0 -0
- /package/dist/{chunk-XQUQIQBO.js.map → chunk-57IOXMBV.js.map} +0 -0
- /package/dist/{chunk-RQG2GHCK.js.map → chunk-DR4D2GMR.js.map} +0 -0
- /package/dist/{chunk-MNNOI75G.js.map → chunk-FPDUGGJ5.js.map} +0 -0
- /package/dist/{chunk-PCREGBBF.js.map → chunk-HSVSMABT.js.map} +0 -0
- /package/dist/{chunk-X5MXYPRD.js.map → chunk-HULHLSIH.js.map} +0 -0
- /package/dist/{chunk-FJTTJ5ZT.js.map → chunk-IU67AS3O.js.map} +0 -0
- /package/dist/{chunk-CYCIT2TG.js.map → chunk-IZ2LK5GK.js.map} +0 -0
- /package/dist/{chunk-RFUZBNM4.js.map → chunk-JZ3S4JFA.js.map} +0 -0
- /package/dist/{chunk-JI2OEPG2.js.map → chunk-L6BUT2FV.js.map} +0 -0
- /package/dist/{chunk-6UTBN2XX.js.map → chunk-LYOZ36IH.js.map} +0 -0
- /package/dist/{chunk-KR6AUZ77.js.map → chunk-MACM4RPG.js.map} +0 -0
- /package/dist/{chunk-WA7DDIST.js.map → chunk-Q7LYRUYQ.js.map} +0 -0
- /package/dist/{chunk-LWG2UXQG.js.map → chunk-XLRX2X2I.js.map} +0 -0
- /package/dist/{chunk-VOYAVKU3.js.map → chunk-YCHZB54C.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/element-internals-polyfill/dist/index.js"],
|
|
4
|
+
"sourcesContent": ["(function () {\n 'use strict';\n\n const refMap = new WeakMap();\n const validityMap = new WeakMap();\n const hiddenInputMap = new WeakMap();\n const internalsMap = new WeakMap();\n const validationMessageMap = new WeakMap();\n const formsMap = new WeakMap();\n const shadowHostsMap = new WeakMap();\n const formElementsMap = new WeakMap();\n const refValueMap = new WeakMap();\n const upgradeMap = new WeakMap();\n const shadowRootMap = new WeakMap();\n const validationAnchorMap = new WeakMap();\n const documentFragmentMap = new WeakMap();\n const connectedCallbackMap = new WeakMap();\n const validityUpgradeMap = new WeakMap();\n\n const aom = {\n ariaAtomic: 'aria-atomic',\n ariaAutoComplete: 'aria-autocomplete',\n ariaBusy: 'aria-busy',\n ariaChecked: 'aria-checked',\n ariaColCount: 'aria-colcount',\n ariaColIndex: 'aria-colindex',\n ariaColIndexText: 'aria-colindextext',\n ariaColSpan: 'aria-colspan',\n ariaCurrent: 'aria-current',\n ariaDisabled: 'aria-disabled',\n ariaExpanded: 'aria-expanded',\n ariaHasPopup: 'aria-haspopup',\n ariaHidden: 'aria-hidden',\n ariaInvalid: 'aria-invalid',\n ariaKeyShortcuts: 'aria-keyshortcuts',\n ariaLabel: 'aria-label',\n ariaLevel: 'aria-level',\n ariaLive: 'aria-live',\n ariaModal: 'aria-modal',\n ariaMultiLine: 'aria-multiline',\n ariaMultiSelectable: 'aria-multiselectable',\n ariaOrientation: 'aria-orientation',\n ariaPlaceholder: 'aria-placeholder',\n ariaPosInSet: 'aria-posinset',\n ariaPressed: 'aria-pressed',\n ariaReadOnly: 'aria-readonly',\n ariaRelevant: 'aria-relevant',\n ariaRequired: 'aria-required',\n ariaRoleDescription: 'aria-roledescription',\n ariaRowCount: 'aria-rowcount',\n ariaRowIndex: 'aria-rowindex',\n ariaRowIndexText: 'aria-rowindextext',\n ariaRowSpan: 'aria-rowspan',\n ariaSelected: 'aria-selected',\n ariaSetSize: 'aria-setsize',\n ariaSort: 'aria-sort',\n ariaValueMax: 'aria-valuemax',\n ariaValueMin: 'aria-valuemin',\n ariaValueNow: 'aria-valuenow',\n ariaValueText: 'aria-valuetext',\n role: 'role'\n };\n const initAom = (ref, internals) => {\n for (let key in aom) {\n internals[key] = null;\n let closureValue = null;\n const attributeName = aom[key];\n Object.defineProperty(internals, key, {\n get() {\n return closureValue;\n },\n set(value) {\n closureValue = value;\n if (ref.isConnected) {\n ref.setAttribute(attributeName, value);\n }\n else {\n upgradeMap.set(ref, internals);\n }\n }\n });\n }\n };\n\n function initNode(node) {\n const internals = internalsMap.get(node);\n const { form } = internals;\n initForm(node, form, internals);\n initLabels(node, internals.labels);\n }\n const walkFieldset = (node, firstRender = false) => {\n const walker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node) {\n return internalsMap.has(node) ?\n NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n let current = walker.nextNode();\n const isCallNecessary = (!firstRender || node.disabled);\n while (current) {\n if (current.formDisabledCallback && isCallNecessary) {\n setDisabled(current, node.disabled);\n }\n current = walker.nextNode();\n }\n };\n const disabledObserverConfig = { attributes: true, attributeFilter: ['disabled'] };\n const disabledObserver = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n const target = mutation.target;\n if (target.constructor['formAssociated']) {\n setDisabled(target, target.hasAttribute('disabled'));\n }\n else if (target.localName === 'fieldset') {\n walkFieldset(target);\n }\n }\n });\n function observerCallback(mutationList) {\n mutationList.forEach(mutationRecord => {\n const { addedNodes, removedNodes } = mutationRecord;\n const added = Array.from(addedNodes);\n const removed = Array.from(removedNodes);\n added.forEach(node => {\n if (internalsMap.has(node) && node.constructor['formAssociated']) {\n initNode(node);\n }\n if (upgradeMap.has(node)) {\n const internals = upgradeMap.get(node);\n const aomKeys = Object.keys(aom);\n aomKeys\n .filter(key => internals[key] !== null)\n .forEach(key => {\n node.setAttribute(aom[key], internals[key]);\n });\n upgradeMap.delete(node);\n }\n if (validityUpgradeMap.has(node)) {\n const internals = validityUpgradeMap.get(node);\n node.setAttribute('internals-valid', internals.validity.valid.toString());\n node.setAttribute('internals-invalid', (!internals.validity.valid).toString());\n node.setAttribute('aria-invalid', (!internals.validity.valid).toString());\n validityUpgradeMap.delete(node);\n }\n if (node.localName === 'form') {\n const formElements = formElementsMap.get(node);\n const walker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node) {\n return internalsMap.has(node) && !(formElements && formElements.has(node)) ?\n NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n let current = walker.nextNode();\n while (current) {\n initNode(current);\n current = walker.nextNode();\n }\n }\n if (node.localName === 'fieldset') {\n disabledObserver.observe(node, disabledObserverConfig);\n walkFieldset(node, true);\n }\n });\n removed.forEach(node => {\n const internals = internalsMap.get(node);\n if (internals && hiddenInputMap.get(internals)) {\n removeHiddenInputs(internals);\n }\n if (shadowHostsMap.has(node)) {\n const observer = shadowHostsMap.get(node);\n observer.disconnect();\n }\n });\n });\n }\n function fragmentObserverCallback(mutationList) {\n mutationList.forEach(mutation => {\n const { removedNodes } = mutation;\n removedNodes.forEach(node => {\n const observer = documentFragmentMap.get(mutation.target);\n if (internalsMap.has(node)) {\n upgradeInternals(node);\n }\n observer.disconnect();\n });\n });\n }\n const deferUpgrade = (fragment) => {\n const observer = new MutationObserver(fragmentObserverCallback);\n observer.observe(fragment, { childList: true });\n documentFragmentMap.set(fragment, observer);\n };\n new MutationObserver(observerCallback);\n const observerConfig = {\n childList: true,\n subtree: true\n };\n\n const setDisabled = (ref, disabled) => {\n ref.toggleAttribute('internals-disabled', disabled);\n if (disabled) {\n ref.setAttribute('aria-disabled', 'true');\n }\n else {\n ref.removeAttribute('aria-disabled');\n }\n if (ref.formDisabledCallback) {\n ref.formDisabledCallback.apply(ref, [disabled]);\n }\n };\n const removeHiddenInputs = (internals) => {\n const hiddenInputs = hiddenInputMap.get(internals);\n hiddenInputs.forEach(hiddenInput => {\n hiddenInput.remove();\n });\n hiddenInputMap.set(internals, []);\n };\n const createHiddenInput = (ref, internals) => {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = ref.getAttribute('name');\n ref.after(input);\n hiddenInputMap.get(internals).push(input);\n return input;\n };\n const initRef = (ref, internals) => {\n hiddenInputMap.set(internals, []);\n disabledObserver.observe(ref, disabledObserverConfig);\n };\n const initLabels = (ref, labels) => {\n if (labels.length) {\n Array.from(labels).forEach(label => label.addEventListener('click', ref.click.bind(ref)));\n let firstLabelId = labels[0].id;\n if (!labels[0].id) {\n firstLabelId = `${labels[0].htmlFor}_Label`;\n labels[0].id = firstLabelId;\n }\n ref.setAttribute('aria-labelledby', firstLabelId);\n }\n };\n const setFormValidity = (form) => {\n const nativeControlValidity = Array.from(form.elements)\n .filter((element) => !element.tagName.includes('-') && element.validity)\n .map((element) => element.validity.valid);\n const polyfilledElements = formElementsMap.get(form) || [];\n const polyfilledValidity = Array.from(polyfilledElements)\n .filter(control => control.isConnected)\n .map((control) => internalsMap.get(control).validity.valid);\n const hasInvalid = [...nativeControlValidity, ...polyfilledValidity].includes(false);\n form.toggleAttribute('internals-invalid', hasInvalid);\n form.toggleAttribute('internals-valid', !hasInvalid);\n };\n const formInputCallback = (event) => {\n setFormValidity(findParentForm(event.target));\n };\n const formChangeCallback = (event) => {\n setFormValidity(findParentForm(event.target));\n };\n const wireSubmitLogic = (form) => {\n const SUBMIT_BUTTON_SELECTOR = ':is(:is(button, input)[type=submit], button:not([type])):not([disabled])';\n let submitButtonSelector = `${SUBMIT_BUTTON_SELECTOR}:not([form])`;\n if (form.id) {\n submitButtonSelector += `,${SUBMIT_BUTTON_SELECTOR}[form='${form.id}']`;\n }\n form.addEventListener('click', event => {\n const target = event.target;\n if (target.closest(submitButtonSelector)) {\n const elements = formElementsMap.get(form);\n if (form.noValidate) {\n return;\n }\n if (elements.size) {\n const nodes = Array.from(elements);\n const validityList = nodes\n .reverse()\n .map(node => {\n const internals = internalsMap.get(node);\n return internals.reportValidity();\n });\n if (validityList.includes(false)) {\n event.preventDefault();\n }\n }\n }\n });\n };\n const formResetCallback = (event) => {\n const elements = formElementsMap.get(event.target);\n if (elements && elements.size) {\n elements.forEach(element => {\n if (element.constructor.formAssociated && element.formResetCallback) {\n element.formResetCallback.apply(element);\n }\n });\n }\n };\n const initForm = (ref, form, internals) => {\n if (form) {\n const formElements = formElementsMap.get(form);\n if (formElements) {\n formElements.add(ref);\n }\n else {\n const initSet = new Set();\n initSet.add(ref);\n formElementsMap.set(form, initSet);\n wireSubmitLogic(form);\n form.addEventListener('reset', formResetCallback);\n form.addEventListener('input', formInputCallback);\n form.addEventListener('change', formChangeCallback);\n }\n formsMap.set(form, { ref, internals });\n if (ref.constructor['formAssociated'] && ref.formAssociatedCallback) {\n setTimeout(() => {\n ref.formAssociatedCallback.apply(ref, [form]);\n }, 0);\n }\n setFormValidity(form);\n }\n };\n const findParentForm = (elem) => {\n let parent = elem.parentNode;\n if (parent && parent.tagName !== 'FORM') {\n parent = findParentForm(parent);\n }\n return parent;\n };\n const throwIfNotFormAssociated = (ref, message, ErrorType = DOMException) => {\n if (!ref.constructor['formAssociated']) {\n throw new ErrorType(message);\n }\n };\n const overrideFormMethod = (form, returnValue, method) => {\n const elements = formElementsMap.get(form);\n if (elements && elements.size) {\n elements.forEach(element => {\n const internals = internalsMap.get(element);\n const valid = internals[method]();\n if (!valid) {\n returnValue = false;\n }\n });\n }\n return returnValue;\n };\n const upgradeInternals = (ref) => {\n if (ref.constructor['formAssociated']) {\n const internals = internalsMap.get(ref);\n const { labels, form } = internals;\n initLabels(ref, labels);\n initForm(ref, form, internals);\n }\n };\n\n class ValidityState {\n constructor() {\n this.badInput = false;\n this.customError = false;\n this.patternMismatch = false;\n this.rangeOverflow = false;\n this.rangeUnderflow = false;\n this.stepMismatch = false;\n this.tooLong = false;\n this.tooShort = false;\n this.typeMismatch = false;\n this.valid = true;\n this.valueMissing = false;\n Object.seal(this);\n }\n }\n const setValid = (validityObject) => {\n validityObject.badInput = false;\n validityObject.customError = false;\n validityObject.patternMismatch = false;\n validityObject.rangeOverflow = false;\n validityObject.rangeUnderflow = false;\n validityObject.stepMismatch = false;\n validityObject.tooLong = false;\n validityObject.tooShort = false;\n validityObject.typeMismatch = false;\n validityObject.valid = true;\n validityObject.valueMissing = false;\n return validityObject;\n };\n const reconcileValidity = (validityObject, newState, form) => {\n validityObject.valid = isValid(newState);\n Object.keys(newState).forEach(key => validityObject[key] = newState[key]);\n if (form) {\n setFormValidity(form);\n }\n return validityObject;\n };\n const isValid = (validityState) => {\n let valid = true;\n for (let key in validityState) {\n if (key !== 'valid' && validityState[key] !== false) {\n valid = false;\n }\n }\n return valid;\n };\n\n const customStateMap = new WeakMap();\n class CustomStateSet extends Set {\n static get isPolyfilled() {\n return true;\n }\n constructor(ref) {\n super();\n if (!ref || !ref.tagName || ref.tagName.indexOf('-') === -1) {\n throw new TypeError('Illegal constructor');\n }\n customStateMap.set(this, ref);\n }\n add(state) {\n if (!/^--/.test(state) || typeof state !== 'string') {\n throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${state} must start with '--'.`);\n }\n const result = super.add(state);\n const ref = customStateMap.get(this);\n ref.toggleAttribute(`state${state}`, true);\n if (ref.part) {\n ref.part.add(`state${state}`);\n }\n return result;\n }\n clear() {\n for (let [entry] of this.entries()) {\n this.delete(entry);\n }\n super.clear();\n }\n delete(state) {\n const result = super.delete(state);\n const ref = customStateMap.get(this);\n ref.toggleAttribute(`state${state}`, false);\n if (ref.part) {\n ref.part.remove(`state${state}`);\n }\n return result;\n }\n }\n\n function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n }\n function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n }\n\n var _HTMLFormControlsCollection_elements;\n class HTMLFormControlsCollection {\n constructor(elements) {\n _HTMLFormControlsCollection_elements.set(this, void 0);\n __classPrivateFieldSet(this, _HTMLFormControlsCollection_elements, elements, \"f\");\n for (let i = 0; i < elements.length; i++) {\n let element = elements[i];\n this[i] = element;\n if (element.hasAttribute('name')) {\n this[element.getAttribute('name')] = element;\n }\n }\n Object.freeze(this);\n }\n get length() {\n return __classPrivateFieldGet(this, _HTMLFormControlsCollection_elements, \"f\").length;\n }\n [(_HTMLFormControlsCollection_elements = new WeakMap(), Symbol.iterator)]() {\n return __classPrivateFieldGet(this, _HTMLFormControlsCollection_elements, \"f\")[Symbol.iterator]();\n }\n item(i) {\n return this[i] == null ? null : this[i];\n }\n namedItem(name) {\n return this[name] == null ? null : this[name];\n }\n }\n\n class ElementInternals {\n static get isPolyfilled() {\n return true;\n }\n constructor(ref) {\n if (!ref || !ref.tagName || ref.tagName.indexOf('-') === -1) {\n throw new TypeError('Illegal constructor');\n }\n const rootNode = ref.getRootNode();\n const validity = new ValidityState();\n this.states = new CustomStateSet(ref);\n refMap.set(this, ref);\n validityMap.set(this, validity);\n internalsMap.set(ref, this);\n initAom(ref, this);\n initRef(ref, this);\n Object.seal(this);\n upgradeInternals(ref);\n if (rootNode instanceof DocumentFragment) {\n deferUpgrade(rootNode);\n }\n }\n checkValidity() {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);\n if (!this.willValidate) {\n return true;\n }\n const validity = validityMap.get(this);\n if (!validity.valid) {\n const validityEvent = new Event('invalid', {\n bubbles: false,\n cancelable: true,\n composed: false\n });\n ref.dispatchEvent(validityEvent);\n }\n return validity.valid;\n }\n get form() {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.`);\n let form;\n if (ref.constructor['formAssociated'] === true) {\n form = findParentForm(ref);\n }\n return form;\n }\n get labels() {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.`);\n const id = ref.getAttribute('id');\n const hostRoot = ref.getRootNode();\n if (hostRoot && id) {\n return hostRoot.querySelectorAll(`[for=\"${id}\"]`);\n }\n return [];\n }\n reportValidity() {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);\n if (!this.willValidate) {\n return true;\n }\n const valid = this.checkValidity();\n const anchor = validationAnchorMap.get(this);\n if (anchor && !ref.constructor['formAssociated']) {\n throw new DOMException(`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);\n }\n if (!valid && anchor) {\n ref.focus();\n anchor.focus();\n }\n return valid;\n }\n setFormValue(value) {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element.`);\n removeHiddenInputs(this);\n if (value != null && !(value instanceof FormData)) {\n if (ref.getAttribute('name')) {\n const hiddenInput = createHiddenInput(ref, this);\n hiddenInput.value = value;\n }\n }\n else if (value != null && value instanceof FormData) {\n Array.from(value).reverse().forEach(([formDataKey, formDataValue]) => {\n if (typeof formDataValue === 'string') {\n const hiddenInput = createHiddenInput(ref, this);\n hiddenInput.name = formDataKey;\n hiddenInput.value = formDataValue;\n }\n });\n }\n refValueMap.set(ref, value);\n }\n setValidity(validityChanges, validationMessage, anchor) {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);\n if (!validityChanges) {\n throw new TypeError('Failed to execute \\'setValidity\\' on \\'ElementInternals\\': 1 argument required, but only 0 present.');\n }\n validationAnchorMap.set(this, anchor);\n const validity = validityMap.get(this);\n const validityChangesObj = {};\n for (const key in validityChanges) {\n validityChangesObj[key] = validityChanges[key];\n }\n if (Object.keys(validityChangesObj).length === 0) {\n setValid(validity);\n }\n const check = { ...validity, ...validityChangesObj };\n delete check.valid;\n const { valid } = reconcileValidity(validity, check, this.form);\n if (!valid && !validationMessage) {\n 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.`);\n }\n validationMessageMap.set(this, valid ? '' : validationMessage);\n if (ref.isConnected) {\n ref.toggleAttribute('internals-invalid', !valid);\n ref.toggleAttribute('internals-valid', valid);\n ref.setAttribute('aria-invalid', `${!valid}`);\n }\n else {\n validityUpgradeMap.set(ref, this);\n }\n }\n get shadowRoot() {\n const ref = refMap.get(this);\n const shadowRoot = shadowRootMap.get(ref);\n if (shadowRoot) {\n return shadowRoot;\n }\n return null;\n }\n get validationMessage() {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element.`);\n return validationMessageMap.get(this);\n }\n get validity() {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.`);\n const validity = validityMap.get(this);\n return validity;\n }\n get willValidate() {\n const ref = refMap.get(this);\n throwIfNotFormAssociated(ref, `Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element.`);\n if ((ref.disabled || ref.hasAttribute('disabled')) ||\n ref.hasAttribute('readonly')) {\n return false;\n }\n return true;\n }\n }\n function isElementInternalsSupported() {\n if (!window.ElementInternals || !HTMLElement.prototype.attachInternals) {\n return false;\n }\n class ElementInternalsFeatureDetection extends HTMLElement {\n constructor() {\n super();\n this.internals = this.attachInternals();\n }\n }\n const randomName = `element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g, '')}`;\n customElements.define(randomName, ElementInternalsFeatureDetection);\n const featureDetectionElement = new ElementInternalsFeatureDetection();\n return [\n 'shadowRoot',\n 'form',\n 'willValidate',\n 'validity',\n 'validationMessage',\n 'labels',\n 'setFormValue',\n 'setValidity',\n 'checkValidity',\n 'reportValidity'\n ].every(prop => prop in featureDetectionElement.internals);\n }\n if (!isElementInternalsSupported()) {\n window.ElementInternals = ElementInternals;\n const define = customElements.define;\n customElements.define = function (name, constructor, options) {\n if (constructor.formAssociated) {\n const connectedCallback = constructor.prototype.connectedCallback;\n constructor.prototype.connectedCallback = function () {\n if (!connectedCallbackMap.has(this)) {\n connectedCallbackMap.set(this, true);\n if (this.hasAttribute('disabled')) {\n setDisabled(this, true);\n }\n }\n if (connectedCallback != null) {\n connectedCallback.apply(this);\n }\n };\n }\n define.apply(customElements, [name, constructor, options]);\n };\n function attachShadowObserver(...args) {\n const shadowRoot = attachShadow.apply(this, args);\n const observer = new MutationObserver(observerCallback);\n shadowRootMap.set(this, shadowRoot);\n if (window.ShadyDOM) {\n observer.observe(this, observerConfig);\n }\n else {\n observer.observe(shadowRoot, observerConfig);\n }\n shadowHostsMap.set(this, observer);\n return shadowRoot;\n }\n function checkValidityOverride(...args) {\n let returnValue = checkValidity.apply(this, args);\n return overrideFormMethod(this, returnValue, 'checkValidity');\n }\n function reportValidityOverride(...args) {\n let returnValue = reportValidity.apply(this, args);\n return overrideFormMethod(this, returnValue, 'reportValidity');\n }\n HTMLElement.prototype.attachInternals = function () {\n if (!this.tagName) {\n return {};\n }\n else if (this.tagName.indexOf('-') === -1) {\n throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`);\n }\n if (internalsMap.has(this)) {\n throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);\n }\n return new ElementInternals(this);\n };\n const attachShadow = Element.prototype.attachShadow;\n Element.prototype.attachShadow = attachShadowObserver;\n const documentObserver = new MutationObserver(observerCallback);\n documentObserver.observe(document.documentElement, observerConfig);\n const checkValidity = HTMLFormElement.prototype.checkValidity;\n HTMLFormElement.prototype.checkValidity = checkValidityOverride;\n const reportValidity = HTMLFormElement.prototype.reportValidity;\n HTMLFormElement.prototype.reportValidity = reportValidityOverride;\n const { get } = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'elements');\n Object.defineProperty(HTMLFormElement.prototype, 'elements', {\n get(...args) {\n const elements = get.call(this, ...args);\n const polyfilledElements = Array.from(formElementsMap.get(this) || []);\n if (polyfilledElements.length === 0) {\n return elements;\n }\n const orderedElements = Array.from(elements).concat(polyfilledElements).sort((a, b) => {\n if (a.compareDocumentPosition) {\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n return 0;\n });\n return new HTMLFormControlsCollection(orderedElements);\n },\n });\n if (!window.CustomStateSet) {\n window.CustomStateSet = CustomStateSet;\n }\n }\n else if (!window.CustomStateSet) {\n window.CustomStateSet = CustomStateSet;\n const attachInternals = HTMLElement.prototype.attachInternals;\n HTMLElement.prototype.attachInternals = function (...args) {\n const internals = attachInternals.call(this, args);\n internals.states = new CustomStateSet(this);\n return internals;\n };\n }\n\n})();\n"],
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ACI,OAAO,iBACR,OAAO,eAAiB7C,GAapC,GAAG",
|
|
6
|
+
"names": ["refMap", "validityMap", "hiddenInputMap", "internalsMap", "validationMessageMap", "formsMap", "shadowHostsMap", "formElementsMap", "refValueMap", "upgradeMap", "shadowRootMap", "validationAnchorMap", "documentFragmentMap", "connectedCallbackMap", "validityUpgradeMap", "aom", "initAom", "ref", "internals", "key", "closureValue", "attributeName", "value", "initNode", "node", "form", "initForm", "initLabels", "walkFieldset", "firstRender", "walker", "current", "isCallNecessary", "setDisabled", "disabledObserverConfig", "disabledObserver", "mutationsList", "mutation", "target", "observerCallback", "mutationList", "mutationRecord", "addedNodes", "removedNodes", "added", "removed", "formElements", "removeHiddenInputs", "fragmentObserverCallback", "observer", "upgradeInternals", "deferUpgrade", "fragment", "observerConfig", "disabled", "hiddenInput", "createHiddenInput", "input", "initRef", "labels", "label", "firstLabelId", "setFormValidity", "nativeControlValidity", "element", "polyfilledElements", "polyfilledValidity", "control", "hasInvalid", "formInputCallback", "event", "findParentForm", "formChangeCallback", "wireSubmitLogic", "SUBMIT_BUTTON_SELECTOR", "submitButtonSelector", "elements", "formResetCallback", "initSet", "elem", "parent", "throwIfNotFormAssociated", "message", "ErrorType", "overrideFormMethod", "returnValue", "method", "ValidityState", "setValid", "validityObject", "reconcileValidity", "newState", "isValid", "validityState", "valid", "customStateMap", "CustomStateSet", "state", "result", "entry", "__classPrivateFieldGet", "receiver", "kind", "f", "__classPrivateFieldSet", "_HTMLFormControlsCollection_elements", "HTMLFormControlsCollection", "i", "name", "ElementInternals", "rootNode", "validity", "validityEvent", "id", "hostRoot", "anchor", "formDataKey", "formDataValue", "validityChanges", "validationMessage", "validityChangesObj", "check", "shadowRoot", "isElementInternalsSupported", "ElementInternalsFeatureDetection", "randomName", "featureDetectionElement", "prop", "attachInternals", "args", "attachShadowObserver", "attachShadow", "checkValidityOverride", "checkValidity", "reportValidityOverride", "reportValidity", "define", "constructor", "options", "connectedCallback", "get", "orderedElements", "a", "b"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f}from"./chunk-OSNB4BPE.js";import{a as m}from"./chunk-AAGDUS7G.js";import{a as g}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-OSNB4BPE.js";import{a as m}from"./chunk-AAGDUS7G.js";import{a as g}from"./chunk-XDUIVR6I.js";import{a as u}from"./chunk-Q7LYRUYQ.js";import{a as p}from"./chunk-6LT7O7T2.js";import{a as r}from"./chunk-DINNT5P2.js";import{a as n}from"./chunk-GRL4DWKG.js";import{a as v,b as i,c,e as b}from"./chunk-X2KXJYXQ.js";import{a as h,b as l,f as d}from"./chunk-4OT5AMS5.js";import{d as t}from"./chunk-IZ2LK5GK.js";var S=h`:host{display:inline-block;width:200px;position:relative}.wrapper{--border-color:var(--bl-color-neutral-lighter);--icon-color:var(--bl-color-neutral-light);--text-color:var(--bl-color-neutral-darker);--height:var(--bl-size-2xl);--input-font:var(--bl-font-body-text-2);--line-height:var(--bl-font-body-text-2-line-height);--icon-size:var(--line-height);--icon-gap:var(--bl-size-xs);--padding-vertical:calc((var(--height) - var(--line-height)) / 2);--padding-horizontal:var(--bl-size-xs);--autofill-bg-color:var(--bl-color-primary-contrast);--label-padding:var(--bl-size-3xs);--background-color:var(--bl-color-neutral-full);display:grid;position:relative;gap:var(--bl-size-3xs)}.wrapper:focus-within{--border-color:var(--bl-color-primary);--icon-color:var(--bl-color-primary)}.wrapper.dirty.invalid{--border-color:var(--bl-color-danger);--icon-color:var(--bl-color-danger)}:host([size="large"]) .wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m);--icon-gap:var(--bl-size-m)}:host([size="small"]) .wrapper{--height:var(--bl-size-xl);--input-font:var(--bl-font-body-text-3);--padding-vertical:var(--bl-size-3xs);--icon-size:var(--bl-font-body-text-3-line-height);--icon-gap:var(--bl-size-2xs)}.input-wrapper{--border-size:1px;outline:none;display:flex;box-sizing:border-box;gap:var(--padding-vertical);height:var(--height);border:solid var(--border-size) var(--border-color);padding:0 calc(
|
|
2
2
|
var(--bl-input-padding-end, var(--padding-horizontal)) - var(--label-padding) -
|
|
3
3
|
var(--border-size)
|
|
4
4
|
) 0 calc(
|
|
@@ -60,4 +60,4 @@ import{a as f}from"./chunk-OSNB4BPE.js";import{a as m}from"./chunk-AAGDUS7G.js";
|
|
|
60
60
|
</fieldset>
|
|
61
61
|
<div class="hint">${a} ${o}</div>
|
|
62
62
|
</div>`}};e.shadowRootOptions={...d.shadowRootOptions,delegatesFocus:!0},e.formControlValidators=f,t([b("input")],e.prototype,"validationTarget",2),t([i({reflect:!0})],e.prototype,"name",2),t([i({reflect:!0})],e.prototype,"type",2),t([i({reflect:!0})],e.prototype,"label",2),t([i({reflect:!0})],e.prototype,"placeholder",2),t([i({reflect:!0})],e.prototype,"value",2),t([i({type:Boolean,reflect:!0})],e.prototype,"required",2),t([i({type:Number,reflect:!0})],e.prototype,"minlength",2),t([i({type:Number,reflect:!0})],e.prototype,"maxlength",2),t([i({reflect:!0})],e.prototype,"min",2),t([i({reflect:!0})],e.prototype,"max",2),t([i({type:String,reflect:!0})],e.prototype,"pattern",2),t([i({type:Number,reflect:!0})],e.prototype,"step",2),t([i({type:String,reflect:!0})],e.prototype,"autocomplete",2),t([i({type:String,reflect:!0})],e.prototype,"inputmode",2),t([i({type:Boolean,reflect:!0})],e.prototype,"autofocus",2),t([i({type:String,reflect:!0})],e.prototype,"icon",2),t([i({type:String,reflect:!0})],e.prototype,"size",2),t([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),t([i({type:Boolean,reflect:!0})],e.prototype,"readonly",2),t([i({type:Boolean,attribute:"label-fixed",reflect:!0})],e.prototype,"labelFixed",2),t([i({type:String,attribute:"invalid-text",reflect:!0})],e.prototype,"customInvalidText",1),t([i({type:String,attribute:"help-text",reflect:!0})],e.prototype,"helpText",2),t([n("bl-change")],e.prototype,"onChange",2),t([n("bl-input")],e.prototype,"onInput",2),t([n("bl-invalid")],e.prototype,"onInvalid",2),t([c()],e.prototype,"dirty",2),t([c()],e.prototype,"passwordVisible",2),e=t([v("bl-input")],e);export{e as a};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-IU67AS3O.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var k=Object.create,i=Object.freeze,f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,n=Object.prototype.hasOwnProperty;var p=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),q=(b,a)=>{for(var d in a)f(b,d,{get:a[d],enumerable:!0})},o=(b,a,d,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of l(a))!n.call(b,c)&&c!==d&&f(b,c,{get:()=>a[c],enumerable:!(e=j(a,c))||e.enumerable});return b};var r=(b,a,d)=>(d=b!=null?k(m(b)):{},o(a||!b||!b.__esModule?f(d,"default",{value:b,enumerable:!0}):d,b));var s=(b,a,d,e)=>{for(var c=e>1?void 0:e?j(a,d):a,g=b.length-1,h;g>=0;g--)(h=b[g])&&(c=(e?h(a,d,c):h(c))||c);return e&&c&&f(a,d,c),c};var t=(b,a)=>i(f(b,"raw",{value:i(a||b.slice())}));export{p as a,q as b,r as c,s as d,t as e};
|
|
2
|
+
//# sourceMappingURL=chunk-IZ2LK5GK.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as y,c as g,d as D,e as H,f as $}from"./chunk-AYJMIZZ3.js";import{a as k,b as A,c as M,d as S}from"./chunk-X2KXJYXQ.js";import{a as
|
|
1
|
+
import{b as y,c as g,d as D,e as H,f as $}from"./chunk-AYJMIZZ3.js";import{a as Y}from"./chunk-DINNT5P2.js";import{a as k,b as A,c as M,d as S}from"./chunk-X2KXJYXQ.js";import{a as N,b as L,c as R}from"./chunk-7GK5LKBV.js";import{a as P,b as w,c as z,f as C}from"./chunk-4OT5AMS5.js";import{d as v}from"./chunk-IZ2LK5GK.js";var I=(s,f,t)=>{let o=new Map;for(let n=f;n<=t;n++)o.set(s[n],n);return o},V=L(class extends R{constructor(s){if(super(s),s.type!==N.CHILD)throw Error("repeat() can only be used in text expressions")}ct(s,f,t){let o;t===void 0?t=f:f!==void 0&&(o=f);let n=[],i=[],a=0;for(let c of s)n[a]=o?o(c,a):a,i[a]=t(c,a),a++;return{values:i,keys:n}}render(s,f,t){return this.ct(s,f,t).values}update(s,[f,t,o]){var n;let i=H(s),{values:a,keys:c}=this.ct(f,t,o);if(!Array.isArray(i))return this.ut=c,a;let p=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],m=[],b,x,e=0,l=i.length-1,r=0,d=a.length-1;for(;e<=l&&r<=d;)if(i[e]===null)e++;else if(i[l]===null)l--;else if(p[e]===c[r])m[r]=g(i[e],a[r]),e++,r++;else if(p[l]===c[d])m[d]=g(i[l],a[d]),l--,d--;else if(p[e]===c[d])m[d]=g(i[e],a[d]),y(s,m[d+1],i[e]),e++,d--;else if(p[l]===c[r])m[r]=g(i[l],a[r]),y(s,i[e],i[l]),l--,r++;else if(b===void 0&&(b=I(c,r,d),x=I(p,e,l)),b.has(p[e]))if(b.has(p[l])){let h=x.get(c[r]),T=h!==void 0?i[h]:null;if(T===null){let E=y(s,i[e]);g(E,a[r]),m[r]=E}else m[r]=g(T,a[r]),y(s,i[e],T),i[h]=null;r++}else $(i[l]),l--;else $(i[e]),e++;for(;r<=d;){let h=y(s,m[d+1]);g(h,a[r]),m[r++]=h}for(;e<=l;){let h=i[e++];h!==null&&$(h)}return this.ut=c,D(s,m),z}});var G=P`:host{--bl-notification-width:396px;--bl-notification-gap:var(--bl-size-2xs);--bl-notification-animation-duration:0.3s}.wrapper{--margin:var(--bl-size-xl);display:flex;flex-direction:column-reverse;position:fixed;top:0;right:0;max-width:var(--bl-notification-width);margin:var(--margin);width:calc(100% - var(--margin) * 2);z-index:var(--bl-index-notification)}@media screen and (max-width: 480px){.wrapper{flex-direction:column;max-width:100%}}.notification{will-change:transform height margin;animation:slide-in-right var(--bl-notification-animation-duration) ease;margin-bottom:var(--bl-notification-gap);touch-action:none}.notification[data-slide="top"]{animation:slide-in-top var(--bl-notification-animation-duration) ease}:host([no-animation]) .notification{animation:none}.notification.removing{animation:slide-out-right var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}.notification[data-slide="top"].removing{animation:slide-out-top var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}:host([no-animation]) .notification.removing{animation:size-to-zero 0}@media (prefers-reduced-motion){.notification.removing{animation:size-to-zero 0}.notification{animation:none}}@keyframes slide-in-right{from{transform:translateX(var(--travel-distance, 10px));height:0;opacity:0;margin:0}}@keyframes slide-out-right{to{transform:translateX(var(--travel-distance, 10px));opacity:0}}@keyframes slide-in-top{from{transform:translateY(var(--travel-distance, -10px));height:0;opacity:0;margin:0}}@keyframes slide-out-top{to{transform:translateY(var(--travel-distance, -10px));opacity:0}}@keyframes size-to-zero{to{height:0;margin:0}}`,B=G;var O=-50,u=class extends C{constructor(){super(...arguments);this.noAnimation=!1;this.duration=7;this.notifications=[];this.touchStartY=0}static get styles(){return[B]}get notificationList(){return this.notifications}get touchStart(){return{y:this.touchStartY}}get isMobile(){return window.matchMedia("(max-width: 480px)").matches}addNotification(t){let o=Math.random().toString(36).substr(2,9),n={...t,id:o,duration:t.duration||this.duration,remove:()=>this.removeNotification(o)},i=[...this.notifications,n];return this.notifications=i,n}async removeNotification(t){return new Promise(o=>{var i;let n=(i=this.shadowRoot)==null?void 0:i.getElementById(t);if(!n){o(!1);return}n.style.height=`${n.clientHeight}px`,n.addEventListener("animationend",({animationName:a})=>{a==="size-to-zero"&&(this.notifications=this.notifications.filter(c=>c.id!==t),o(!0))}),n.classList.add("removing")})}handleTouchStart(t){this.isMobile&&(t.stopPropagation(),this.touchStartY=t.touches[0].clientY)}handleTouchMove(t){if(!this.isMobile)return;t.stopPropagation();let o=t.currentTarget,n=t.touches[0].clientY,i=Math.min(n-this.touchStartY,0);o.style.transform=`translateY(${i}px)`}handleTouchEnd(t){if(!this.isMobile)return;t.stopPropagation();let o=t.currentTarget,i=t.changedTouches[0].clientY-this.touchStartY;i<O?(o.style.setProperty("--travel-distance",`${i-10}px`),this.removeNotification(o.id)):(o.style.transition="transform 0.3s ease",o.style.transform="translateY(0px)",o.addEventListener("transitionend",()=>{o.style.transition="",o.style.transform=""})),this.touchStartY=0}renderActionSlot(t,o){let n=t==="primary-action"?o.primaryAction:o.secondaryAction;return!n||!n.label?"":w`<bl-button slot="${t}" @bl-click=${()=>n.onClick(o)}>
|
|
2
2
|
${n.label}
|
|
3
3
|
</bl-button>`}render(){return w`
|
|
4
4
|
<div class="wrapper">
|
|
@@ -31,4 +31,4 @@ lit-html/directives/repeat.js:
|
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
32
|
*)
|
|
33
33
|
*/
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-JZ3S4JFA.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-WJ2RNEDL.js";import{a as s}from"./chunk-X2KXJYXQ.js";import{a as l,b as o,f as r}from"./chunk-4OT5AMS5.js";import{d as t}from"./chunk-IZ2LK5GK.js";var b=l`:host{display:table-row-group}`,m=b;var p="bl-table-body",e=class extends r{static get styles(){return[m]}connectedCallback(){super.connectedCallback(),this.closest(a)||console.warn("bl-table-body is designed to be used inside a bl-table",this)}render(){return o` <slot></slot> `}};e=t([s(p)],e);export{p as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-K3IALLEI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/table/table-body/bl-table-body.css", "../src/components/table/table-body/bl-table-body.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:table-row-group}`;\nexport default styles;\n", "import { html, LitElement, TemplateResult } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { CSSResultGroup } from \"lit/development\";\nimport \"element-internals-polyfill\";\nimport { blTableTag } from \"../bl-table\";\nimport type BlTable from \"../bl-table\";\nimport style from \"../table-body/bl-table-body.css\";\n\nexport const blTableBodyTag = \"bl-table-body\";\n\n/**\n * @tag bl-table-body\n * @summary Baklava Table component\n */\n@customElement(blTableBodyTag)\nexport default class BlTableBody extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n connectedCallback(): void {\n super.connectedCallback();\n if (!this.closest<BlTable>(blTableTag)) {\n console.warn(\"bl-table-body is designed to be used inside a bl-table\", this);\n }\n }\n\n render(): TemplateResult {\n return html` <slot></slot> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blTableBodyTag]: BlTableBody;\n }\n}\n"],
|
|
5
|
+
"mappings": "yKACO,IAAMA,EAASC,kCACfC,EAAQF,ECMR,IAAMG,EAAiB,gBAOTC,EAArB,cAAyCC,CAAW,CAClD,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CACA,mBAA0B,CACxB,MAAM,kBAAkB,EACnB,KAAK,QAAiBC,CAAU,GACnC,QAAQ,KAAK,yDAA0D,IAAI,CAE/E,CAEA,QAAyB,CACvB,OAAOC,kBACT,CACF,EAdqBJ,EAArBK,EAAA,CADCC,EAAcP,CAAc,GACRC",
|
|
6
|
+
"names": ["styles", "i", "bl_table_body_default", "blTableBodyTag", "BlTableBody", "s", "bl_table_body_default", "blTableTag", "x", "__decorateClass", "e"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m}from"./chunk-GRL4DWKG.js";import{a as f,b as v,c as g}from"./chunk-X2KXJYXQ.js";import{a as x}from"./chunk-3USCFSFQ.js";import{b as u}from"./chunk-7GK5LKBV.js";import{a as c,b as p,f as d}from"./chunk-4OT5AMS5.js";import{
|
|
1
|
+
import{a as m}from"./chunk-GRL4DWKG.js";import{a as f,b as v,c as g}from"./chunk-X2KXJYXQ.js";import{a as x}from"./chunk-3USCFSFQ.js";import{b as u}from"./chunk-7GK5LKBV.js";import{a as c,b as p,f as d}from"./chunk-4OT5AMS5.js";import{d as e}from"./chunk-IZ2LK5GK.js";var o=class extends x{};o.directiveName="unsafeSVG",o.resultType=2;var y=u(o);var l="./assets";function S(s){l=s}function w(){return l}var E=import.meta.url;E&&S(new URL(l,E).toString());var $=c`:host{display:inline-block}:host div{display:flex;align-items:stretch;width:1em;height:1em;min-width:1em;min-height:1em;overflow:hidden;transform:translateZ(0)}:host svg{width:1em;height:1em}`,P=$;var h=new Map,t=class extends d{static get styles(){return[P]}get name(){return this._iconName}set name(n){n!==this._iconName&&(this._iconName=n,this.load())}async load(){let r=`${w()}/${this.name}.svg`;h.has(r)||h.set(r,fetch(r));try{let i=await h.get(r),a=i==null?void 0:i.clone();a!=null&&a.ok?(this.svg=await a.text(),this.onLoad(`${this.name} icon loaded`),this.requestUpdate()):this.onError(`${this.name} icon failed to load`)}catch(i){this.onError(`${this.name} icon failed to load [${i}]`)}}render(){return p`<div aria-hidden="true">${y(this.svg)}</div>`}};e([v()],t.prototype,"name",1),e([m("bl-load")],t.prototype,"onLoad",2),e([m("bl-error")],t.prototype,"onError",2),e([g()],t.prototype,"svg",2),t=e([f("bl-icon")],t);export{S as a,w as b,t as c};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
lit-html/directives/unsafe-svg.js:
|
|
@@ -8,4 +8,4 @@ lit-html/directives/unsafe-svg.js:
|
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
9
|
*)
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-L6BUT2FV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as d}from"./chunk-X2KXJYXQ.js";import{a as l,b as n,f as r}from"./chunk-4OT5AMS5.js";import{
|
|
1
|
+
import{a as d}from"./chunk-X2KXJYXQ.js";import{a as l,b as n,f as r}from"./chunk-4OT5AMS5.js";import{d as i}from"./chunk-IZ2LK5GK.js";var b=l`.tabs{background-color:var(--bl-color-neutral-full);border-bottom:var(--bl-size-4xs) solid var(--bl-color-neutral-lightest);display:flex;flex-direction:row}.tabs-list{overflow-x:auto;border-radius:var(--bl-border-radius-m) var(--bl-border-radius-m) 0 0}.panels{border-radius:0 0 var(--bl-border-radius-m) var(--bl-border-radius-m)}`,o=b;var s=class extends r{constructor(){super(...arguments);this._connectedTabs=[];this._connectedPanels=[];this._tabFocus=0}static get styles(){return[o]}get tabs(){return this._connectedTabs}get panels(){return this._connectedPanels}registerTab(e){let t=this._connectedTabs.filter(a=>!a.disabled).length===0&&!e.disabled;this._connectedTabs.push(e),(!e.disabled&&e.selected||t)&&(this.selectedTabName=e.name,this._tabFocus=this._connectedTabs.length-1)}unregisterTab(e){var t;this._connectedTabs.splice(this._connectedTabs.indexOf(e),1),e.selected&&((t=this._connectedTabs.find(a=>!a.disabled))==null||t.select())}registerTabPanel(e){e.hidden=e.tab!==this.selectedTabName,e.tabIndex=0,this._connectedPanels.push(e)}unregisterTabPanel(e){this._connectedTabs.splice(this._connectedPanels.indexOf(e),1)}get selectedTabName(){return this._selectedTabName}set selectedTabName(e){this._selectedTabName=e,this._connectedTabs.forEach(t=>{t.selected=e===t.name}),this._connectedPanels.forEach(t=>{t.hidden=t.tab!==this._selectedTabName})}_handleTabSelected(e){this.selectedTabName=e.detail,this._tabFocus=this._connectedTabs.findIndex(t=>t.name===e.detail)}_handleTabListKeyDown(e){if(e.key==="ArrowRight"||e.key==="ArrowLeft"){if(e.key==="ArrowRight")do this._tabFocus++,this._tabFocus>=this._connectedTabs.length&&(this._tabFocus=0);while(this._connectedTabs[this._tabFocus].disabled);else if(e.key==="ArrowLeft")do this._tabFocus--,this._tabFocus<0&&(this._tabFocus=this._connectedTabs.length-1);while(this._connectedTabs[this._tabFocus].disabled);this._connectedTabs[this._tabFocus].focus()}}render(){return n` <div class="container" @bl-tab-selected="${this._handleTabSelected}">
|
|
2
2
|
<div role="tablist" @keydown=${this._handleTabListKeyDown} class="tabs-list">
|
|
3
3
|
<div class="tabs">
|
|
4
4
|
<slot name="tabs"></slot>
|
|
@@ -8,4 +8,4 @@ import{a as d}from"./chunk-X2KXJYXQ.js";import{a as l,b as n,f as r}from"./chunk
|
|
|
8
8
|
<slot></slot>
|
|
9
9
|
</div>
|
|
10
10
|
</div>`}};s=i([d("bl-tab-group")],s);export{s as a};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-LYOZ36IH.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as u,b as a,c as s,e as p}from"./chunk-X2KXJYXQ.js";import{a as i,b as l,f as o}from"./chunk-4OT5AMS5.js";import{
|
|
1
|
+
import{a as u,b as a,c as s,e as p}from"./chunk-X2KXJYXQ.js";import{a as i,b as l,f as o}from"./chunk-4OT5AMS5.js";import{d as r}from"./chunk-IZ2LK5GK.js";var m=i`.progress-indicator{--max:100;--value:0;--value-color:var(--bl-color-success);--height:var(--bl-size-2xs);--radius:var(--bl-border-radius-s);position:relative;background-color:var(--bl-color-neutral-lightest);height:var(--height);border-radius:var(--radius);width:100%}.progress-indicator::before{content:"";position:absolute;height:100%;width:calc(100% / var(--max) * var(--value));background-color:var(--value-color);border-radius:var(--radius);transition:width ease var(--bl-progress-indicator-transition-duration, 0.2s)}:host([size="small"]) .progress-indicator{--height:var(--bl-size-3xs);--radius:var(--bl-border-radius-xs)}:host([size="large"]) .progress-indicator{--height:var(--bl-size-xs);--radius:var(--bl-border-radius-m)}:host([failed]) .progress-indicator{--value-color:var(--bl-color-danger)}`,d=m;var e=class extends o{constructor(){super(...arguments);this.size="medium";this.failed=!1;this._max=100;this._value=0}static get styles(){return d}get max(){return this._max}set max(t){this._max=t,this.updateCssVariable()}get value(){return this._value}set value(t){this._value=t,this.updateCssVariable()}async updateCssVariable(){await this.updateComplete,this.wrapper.style.setProperty("--value",`${this.value}`),this.wrapper.style.setProperty("--max",`${this.max}`)}render(){return l`<div
|
|
2
2
|
class="progress-indicator"
|
|
3
3
|
role="progressbar"
|
|
4
4
|
aria-valuemax="${this._max}"
|
|
5
5
|
aria-valuenow="${this._value}"
|
|
6
6
|
></div>`}};r([p(".progress-indicator")],e.prototype,"wrapper",2),r([a({type:String,reflect:!0})],e.prototype,"size",2),r([a({type:Boolean,reflect:!0})],e.prototype,"failed",2),r([a({type:Number})],e.prototype,"max",1),r([a({type:Number})],e.prototype,"value",1),r([s()],e.prototype,"_max",2),r([s()],e.prototype,"_value",2),e=r([u("bl-progress-indicator")],e);export{e as a};
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-MACM4RPG.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{a as d}from"./chunk-DINNT5P2.js";import{a as b}from"./chunk-GRL4DWKG.js";import{a as h,b as a}from"./chunk-X2KXJYXQ.js";import{a as s,b as c,f as n}from"./chunk-4OT5AMS5.js";import{d as r}from"./chunk-IZ2LK5GK.js";var p=s`:host{display:inline-block;cursor:pointer;vertical-align:middle}span{display:inline-block}.switch{--track-height:var(--bl-size-xl);--track-width:var(--bl-size-4xl);--thumb-offset:var(--bl-size-4xs);--thumb-height:calc(var(--track-height) - calc(2 * var(--thumb-offset)));--thumb-width:var(--thumb-height);/* TODO: use predefined animation duration once it is ready */--animation-duration:var(--bl-switch-animation-duration, 300ms);--switch-color:var(--bl-switch-color-off, var(--bl-color-neutral-lighter));background-color:var(--switch-color);border-radius:var(--bl-border-radius-pill);height:var(--track-height);transition-property:background-color;transition-duration:var(--animation-duration);width:var(--track-width)}.switch::before{content:"";display:inline-block;background-color:white;border-radius:var(--bl-border-radius-circle);height:var(--thumb-height);left:var(--thumb-offset);position:relative;top:var(--thumb-offset);transition:transform;transition-duration:var(--animation-duration);width:var(--thumb-width)}label{display:flex;gap:var(--bl-size-2xs);color:var(--bl-color-neutral-darker);font:var(--bl-font-title-3);cursor:pointer;user-select:none;line-height:normal;align-items:center;margin-block:0}.label{overflow-wrap:anywhere}:host([disabled]) .label{color:var(--bl-color-neutral-light);border:1px solid var(--bl-color-neutral-lighter)}:host([checked]) .label,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .label,:host(:hover) .label{color:var(--bl-color-primary)}:host([checked]) .switch{--switch-color:var(--bl-switch-color-on, var(--bl-switch-color, var(--bl-color-primary)))}:host([checked]) .switch::before{transform:translateX(
|
|
2
|
+
calc(var(--track-width) - var(--thumb-width) - calc(2 * var(--thumb-offset)))
|
|
3
|
+
)}:host([disabled]) .switch{opacity:0.5}:host([disabled]){cursor:not-allowed}.switch:focus-visible{position:relative;outline:none}.switch:focus-visible::after{border:2px solid var(--switch-color);border-radius:var(--bl-border-radius-pill);content:"";position:absolute;inset:-3px}`,u=p;var m="bl-switch",e=class extends n{constructor(){super(...arguments);this.checked=!1;this.disabled=!1}static get styles(){return[u]}toggle(){this.disabled||(this.checked=!this.checked,this.onToggle(this.checked))}handleKeyDown(t){(t.code==="Enter"||t.code==="Space")&&(this.toggle(),t.preventDefault())}render(){var o,i,l;let t=(l=(i=this.ariaLabel)!=null?i:(o=this.attributes.getNamedItem("aria-label"))==null?void 0:o.value)!=null?l:void 0;return c`
|
|
4
|
+
<label @click=${this.toggle}>
|
|
5
|
+
<slot class="label"></slot>
|
|
6
|
+
<span
|
|
7
|
+
class="switch"
|
|
8
|
+
role="switch"
|
|
9
|
+
aria-checked=${this.checked}
|
|
10
|
+
aria-readonly=${!!this.disabled}
|
|
11
|
+
@keydown=${this.handleKeyDown}
|
|
12
|
+
aria-label=${d(t)}
|
|
13
|
+
tabindex="0"
|
|
14
|
+
>
|
|
15
|
+
</span>
|
|
16
|
+
</label>
|
|
17
|
+
`}};r([a({type:Boolean,reflect:!0})],e.prototype,"checked",2),r([a({type:Boolean,reflect:!0})],e.prototype,"disabled",2),r([b("bl-switch-toggle")],e.prototype,"onToggle",2),e=r([h(m)],e);export{m as a,e as b};
|
|
18
|
+
//# sourceMappingURL=chunk-MG23TBA3.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/switch/bl-switch.css", "../src/components/switch/bl-switch.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:inline-block;cursor:pointer;vertical-align:middle}span{display:inline-block}.switch{--track-height:var(--bl-size-xl);--track-width:var(--bl-size-4xl);--thumb-offset:var(--bl-size-4xs);--thumb-height:calc(var(--track-height) - calc(2 * var(--thumb-offset)));--thumb-width:var(--thumb-height);/* TODO: use predefined animation duration once it is ready */--animation-duration:var(--bl-switch-animation-duration, 300ms);--switch-color:var(--bl-switch-color-off, var(--bl-color-neutral-lighter));background-color:var(--switch-color);border-radius:var(--bl-border-radius-pill);height:var(--track-height);transition-property:background-color;transition-duration:var(--animation-duration);width:var(--track-width)}.switch::before{content:\"\";display:inline-block;background-color:white;border-radius:var(--bl-border-radius-circle);height:var(--thumb-height);left:var(--thumb-offset);position:relative;top:var(--thumb-offset);transition:transform;transition-duration:var(--animation-duration);width:var(--thumb-width)}label{display:flex;gap:var(--bl-size-2xs);color:var(--bl-color-neutral-darker);font:var(--bl-font-title-3);cursor:pointer;user-select:none;line-height:normal;align-items:center;margin-block:0}.label{overflow-wrap:anywhere}:host([disabled]) .label{color:var(--bl-color-neutral-light);border:1px solid var(--bl-color-neutral-lighter)}:host([checked]) .label,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .label,:host(:hover) .label{color:var(--bl-color-primary)}:host([checked]) .switch{--switch-color:var(--bl-switch-color-on, var(--bl-switch-color, var(--bl-color-primary)))}:host([checked]) .switch::before{transform:translateX(\n calc(var(--track-width) - var(--thumb-width) - calc(2 * var(--thumb-offset)))\n )}:host([disabled]) .switch{opacity:0.5}:host([disabled]){cursor:not-allowed}.switch:focus-visible{position:relative;outline:none}.switch:focus-visible::after{border:2px solid var(--switch-color);border-radius:var(--bl-border-radius-pill);content:\"\";position:absolute;inset:-3px}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport style from \"./bl-switch.css\";\n\nexport const blSwitchTag = \"bl-switch\";\n\n/**\n * @tag bl-switch\n * @summary Baklava Switch component\n *\n * @cssproperty [--bl-switch-color-on=--bl-color-primary] Set the checked color\n * @cssproperty [--bl-switch-color-off=--bl-color-neutral-lighter] Set the unchecked color\n * @cssproperty [--bl-switch-animation-duration=300ms] Set the animation duration of switch toggle\n */\n@customElement(blSwitchTag)\nexport default class BlSwitch extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the checked state for switch\n */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /**\n * Sets the disabled state for switch\n */\n @property({ type: Boolean, reflect: true })\n disabled? = false;\n\n /**\n * Fires whenever user toggles the switch\n */\n @event(\"bl-switch-toggle\") private onToggle: EventDispatcher<boolean>;\n\n toggle() {\n if (this.disabled) return;\n\n this.checked = !this.checked;\n this.onToggle(this.checked);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (event.code === \"Enter\" || event.code === \"Space\") {\n this.toggle();\n event.preventDefault();\n }\n }\n\n render(): TemplateResult {\n const ariaLabel =\n this.ariaLabel ?? this.attributes.getNamedItem(\"aria-label\")?.value ?? undefined;\n\n return html`\n <label @click=${this.toggle}>\n <slot class=\"label\"></slot>\n <span\n class=\"switch\"\n role=\"switch\"\n aria-checked=${this.checked}\n aria-readonly=${!!this.disabled}\n @keydown=${this.handleKeyDown}\n aria-label=${ifDefined(ariaLabel)}\n tabindex=\"0\"\n >\n </span>\n </label>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blSwitchTag]: BlSwitch;\n }\n}\n"],
|
|
5
|
+
"mappings": "6NACO,IAAMA,EAASC;AAAA;AAAA,2RAGfC,EAAQF,ECER,IAAMG,EAAc,YAWNC,EAArB,cAAsCC,CAAW,CAAjD,kCASE,aAAU,GAMV,cAAY,GAdZ,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAmBA,QAAS,CACH,KAAK,WAET,KAAK,QAAU,CAAC,KAAK,QACrB,KAAK,SAAS,KAAK,OAAO,EAC5B,CAEQ,cAAcC,EAAsB,EACtCA,EAAM,OAAS,SAAWA,EAAM,OAAS,WAC3C,KAAK,OAAO,EACZA,EAAM,eAAe,EAEzB,CAEA,QAAyB,CArD3B,IAAAC,EAAAC,EAAAC,EAsDI,IAAMC,GACJD,GAAAD,EAAA,KAAK,YAAL,KAAAA,GAAkBD,EAAA,KAAK,WAAW,aAAa,YAAY,IAAzC,YAAAA,EAA4C,QAA9D,KAAAE,EAAuE,OAEzE,OAAOE;AAAA,sBACW,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,yBAKF,KAAK;AAAA,0BACJ,CAAC,CAAC,KAAK;AAAA,qBACZ,KAAK;AAAA,uBACHC,EAAUF,CAAS;AAAA;AAAA;AAAA;AAAA;AAAA,KAMxC,CACF,EA/CEG,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARvBX,EASnB,uBAMAU,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAdvBX,EAenB,wBAKmCU,EAAA,CAAlCP,EAAM,kBAAkB,GApBNH,EAoBgB,wBApBhBA,EAArBU,EAAA,CADCC,EAAcZ,CAAW,GACLC",
|
|
6
|
+
"names": ["styles", "i", "bl_switch_default", "blSwitchTag", "BlSwitch", "s", "bl_switch_default", "event", "_a", "_b", "_c", "ariaLabel", "x", "l", "__decorateClass", "e"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{a as x}from"./chunk-6LT7O7T2.js";import{a as h}from"./chunk-GRL4DWKG.js";import{a as y,b as p,e as s}from"./chunk-X2KXJYXQ.js";import{a as m,b as r,f as w}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var k=m`:host{display:contents}.container{--background-color:var(--bl-color-neutral-full);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background-color:#273142b3}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background-color:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl);overflow:auto}.container.has-footer .content{padding-bottom:0}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{/* FIXME: Use variables for sizes */box-shadow:0 -4px 15px #27314226}@media only screen and (max-width: 471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`,E=k;var t=class extends w{constructor(){super(...arguments);this.open=!1;this.polyfilled=!0;this.clickOutsideHandler=e=>{e.composedPath().includes(this.container)||this.closeDialog("backdrop")};this.onKeydown=e=>{e.code==="Escape"&&this.open&&(e.preventDefault(),this.closeDialog("keyboard"))};this.toggleFooterShadow=()=>{var l,a,n,c,g,f,b;let e=(l=this.content)==null?void 0:l.scrollTop,i=(a=this.content)==null?void 0:a.scrollHeight,d=(n=this.content)==null?void 0:n.clientHeight;e+d>=i?(g=(c=this.footer)==null?void 0:c.classList)==null||g.remove("shadow"):(b=(f=this.footer)==null?void 0:f.classList)==null||b.add("shadow")}}static get styles(){return[E]}updated(e){(e.has("open")||e.has("polyfilled"))&&this.toggleDialogHandler()}get _hasFooter(){return[...this.childNodes].some(e=>e.nodeName==="BL-BUTTON")}toggleDialogHandler(){var e,i,d,l,a,n;this.open?((i=(e=this.dialog)==null?void 0:e.showModal)==null||i.call(e),this.onOpen({isOpen:!0}),document.body.style.overflow="hidden",this.toggleFooterShadow(),window==null||window.addEventListener("keydown",c=>this.onKeydown(c)),window==null||window.addEventListener("resize",this.toggleFooterShadow),(d=this.content)==null||d.addEventListener("scroll",this.toggleFooterShadow)):((a=(l=this.dialog)==null?void 0:l.close)==null||a.call(l),this.onClose({isOpen:!1}),document.body.style.overflow="auto",window==null||window.removeEventListener("keydown",this.onKeydown),window==null||window.removeEventListener("resize",this.toggleFooterShadow),(n=this.content)==null||n.removeEventListener("scroll",this.toggleFooterShadow))}closeDialog(e){this.onRequestClose({source:e},{cancelable:!0}).defaultPrevented||(this.open=!1)}renderFooter(){return this._hasFooter?r`<footer>
|
|
2
|
+
<slot name="primary-action"></slot>
|
|
3
|
+
<slot name="secondary-action"></slot>
|
|
4
|
+
<slot name="tertiary-action"></slot>
|
|
5
|
+
</footer>`:""}renderContainer(){let e=this.caption?r`<h2 id="dialog-caption">${this.caption}</h2>`:"",i={container:!0,"has-footer":this._hasFooter};return r` <div class="${x(i)}">
|
|
6
|
+
<header>
|
|
7
|
+
${e}
|
|
8
|
+
<bl-button
|
|
9
|
+
@click="${()=>this.closeDialog("close-button")}"
|
|
10
|
+
icon="close"
|
|
11
|
+
variant="tertiary"
|
|
12
|
+
kind="neutral"
|
|
13
|
+
></bl-button>
|
|
14
|
+
</header>
|
|
15
|
+
<section class="content"><slot></slot></section>
|
|
16
|
+
${this.renderFooter()}
|
|
17
|
+
</div>`}render(){return this.polyfilled||!window.HTMLDialogElement?r`<div
|
|
18
|
+
class="dialog-polyfill"
|
|
19
|
+
role="dialog"
|
|
20
|
+
aria-labelledby="dialog-caption"
|
|
21
|
+
@click=${this.clickOutsideHandler}
|
|
22
|
+
>
|
|
23
|
+
${this.renderContainer()}
|
|
24
|
+
</div>`:r`
|
|
25
|
+
<dialog
|
|
26
|
+
class="dialog"
|
|
27
|
+
aria-labelledby="dialog-caption"
|
|
28
|
+
@click=${this.clickOutsideHandler}
|
|
29
|
+
>
|
|
30
|
+
${this.renderContainer()}
|
|
31
|
+
</dialog>
|
|
32
|
+
`}};o([p({type:Boolean,reflect:!0,hasChanged(v,u){return v===!1&&u===void 0?!1:v!==u}})],t.prototype,"open",2),o([p({type:String})],t.prototype,"caption",2),o([p({type:Boolean,reflect:!0})],t.prototype,"polyfilled",2),o([s(".dialog")],t.prototype,"dialog",2),o([s("footer")],t.prototype,"footer",2),o([s(".container")],t.prototype,"container",2),o([s(".content")],t.prototype,"content",2),o([h("bl-dialog-open")],t.prototype,"onOpen",2),o([h("bl-dialog-request-close")],t.prototype,"onRequestClose",2),o([h("bl-dialog-close")],t.prototype,"onClose",2),t=o([y("bl-dialog")],t);export{t as a};
|
|
33
|
+
//# sourceMappingURL=chunk-O665PNJ6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/dialog/bl-dialog.css", "../src/components/dialog/bl-dialog.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:contents}.container{--background-color:var(--bl-color-neutral-full);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background-color:#273142b3}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background-color:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl);overflow:auto}.container.has-footer .content{padding-bottom:0}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{/* FIXME: Use variables for sizes */box-shadow:0 -4px 15px #27314226}@media only screen and (max-width: 471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../button/bl-button\";\nimport style from \"./bl-dialog.css\";\n\ntype DialogElement = {\n showModal: () => void;\n close: () => void;\n};\n\n/**\n * @tag bl-dialog\n * @summary Baklava Dialog component\n */\n@customElement(\"bl-dialog\")\nexport default class BlDialog extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets dialog open-close status\n */\n @property({\n type: Boolean,\n reflect: true,\n hasChanged(newVal: boolean, oldVal: boolean | undefined) {\n if (newVal === false && oldVal === undefined) {\n // Assume that the initial value is false\n return false;\n }\n return newVal !== oldVal;\n },\n })\n open = false;\n\n /**\n * Sets the dialog title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Determines if dialog currently uses polyfilled version instead of native HTML Dialog. By\n * default, it uses native Dialog if the browser supports it, otherwise polyfills. You can force\n * using polyfill by setting this to true in some cases like to show some content on top of dialog\n * in case you are not able to use Popover API. Be aware that, polyfilled version can cause some\n * inconsistencies in terms of accessibility and stacking context. So use it with extra caution.\n *\n * As of the current implementation, you can render above the dialog HTML element using the Popover API. However,\n * it will block any actions on the Popover element. This issue was encountered during the development of the `bl-notification` component.\n * As a result, we decided to enable the polyfill for the `bl-dialog` component by default. If you prefer to use the native dialog, you can set\n * this property to false. Please note, doing so will cause notifications to render under the dialog backdrop.\n * For more information, refer to the comment linked below:\n *\n * https://github.com/Trendyol/baklava/issues/141#issuecomment-1810301413\n */\n @property({ type: Boolean, reflect: true })\n polyfilled = true;\n\n @query(\".dialog\")\n private dialog: HTMLDialogElement & DialogElement;\n\n @query(\"footer\")\n private footer: HTMLElement;\n\n @query(\".container\")\n private container: HTMLElement;\n\n @query(\".content\")\n private content: HTMLElement;\n\n /**\n * Fires when the dialog is opened\n */\n @event(\"bl-dialog-open\") private onOpen: EventDispatcher<object>;\n\n /**\n * Fires before the dialog is closed with internal actions like clicking close button,\n * pressing Escape key or clicking backdrop. Can be prevented by calling `event.preventDefault()`\n */\n @event(\"bl-dialog-request-close\") private onRequestClose: EventDispatcher<{\n source: \"close-button\" | \"keyboard\" | \"backdrop\";\n }>;\n\n /**\n * Fires when the dialog is closed\n */\n @event(\"bl-dialog-close\") private onClose: EventDispatcher<object>;\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has(\"open\") || changedProperties.has(\"polyfilled\")) {\n this.toggleDialogHandler();\n }\n }\n\n private get _hasFooter() {\n return [...this.childNodes].some(node => node.nodeName === \"BL-BUTTON\");\n }\n\n private toggleDialogHandler() {\n if (this.open) {\n this.dialog?.showModal?.();\n this.onOpen({ isOpen: true });\n document.body.style.overflow = \"hidden\";\n this.toggleFooterShadow();\n window?.addEventListener(\"keydown\", event => this.onKeydown(event));\n window?.addEventListener(\"resize\", this.toggleFooterShadow);\n this.content?.addEventListener(\"scroll\", this.toggleFooterShadow);\n } else {\n this.dialog?.close?.();\n this.onClose({ isOpen: false });\n document.body.style.overflow = \"auto\";\n window?.removeEventListener(\"keydown\", this.onKeydown);\n window?.removeEventListener(\"resize\", this.toggleFooterShadow);\n this.content?.removeEventListener(\"scroll\", this.toggleFooterShadow);\n }\n }\n\n private closeDialog(source: \"close-button\" | \"keyboard\" | \"backdrop\") {\n const requestCloseEvent = this.onRequestClose({ source }, { cancelable: true });\n\n if (requestCloseEvent.defaultPrevented) {\n return;\n }\n\n this.open = false;\n }\n\n private clickOutsideHandler = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath.includes(this.container)) {\n this.closeDialog(\"backdrop\");\n }\n };\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === \"Escape\" && this.open) {\n event.preventDefault();\n this.closeDialog(\"keyboard\");\n }\n };\n\n private toggleFooterShadow = () => {\n const scrollTop = this.content?.scrollTop;\n const scrollHeight = this.content?.scrollHeight;\n const clientHeight = this.content?.clientHeight;\n\n if (scrollTop + clientHeight >= scrollHeight) {\n this.footer?.classList?.remove(\"shadow\");\n } else {\n this.footer?.classList?.add(\"shadow\");\n }\n };\n\n private renderFooter() {\n return this._hasFooter\n ? html`<footer>\n <slot name=\"primary-action\"></slot>\n <slot name=\"secondary-action\"></slot>\n <slot name=\"tertiary-action\"></slot>\n </footer>`\n : \"\";\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"dialog-caption\">${this.caption}</h2>` : \"\";\n\n const classes = {\n \"container\": true,\n \"has-footer\": this._hasFooter,\n };\n\n return html` <div class=\"${classMap(classes)}\">\n <header>\n ${title}\n <bl-button\n @click=\"${() => this.closeDialog(\"close-button\")}\"\n icon=\"close\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </header>\n <section class=\"content\"><slot></slot></section>\n ${this.renderFooter()}\n </div>`;\n }\n\n render(): TemplateResult {\n return this.polyfilled || !window.HTMLDialogElement\n ? html`<div\n class=\"dialog-polyfill\"\n role=\"dialog\"\n aria-labelledby=\"dialog-caption\"\n @click=${this.clickOutsideHandler}\n >\n ${this.renderContainer()}\n </div>`\n : html`\n <dialog\n class=\"dialog\"\n aria-labelledby=\"dialog-caption\"\n @click=${this.clickOutsideHandler}\n >\n ${this.renderContainer()}\n </dialog>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-dialog\": BlDialog;\n }\n}\n"],
|
|
5
|
+
"mappings": "oOACO,IAAMA,EAASC,+iDACfC,EAAQF,ECef,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCAmBE,UAAO,GAwBP,gBAAa,GAuEb,KAAQ,oBAAuBC,GAAsB,CACjCA,EAAM,aAAa,EAEtB,SAAS,KAAK,SAAS,GACpC,KAAK,YAAY,UAAU,CAE/B,EAEA,KAAQ,UAAaA,GAA+B,CAC9CA,EAAM,OAAS,UAAY,KAAK,OAClCA,EAAM,eAAe,EACrB,KAAK,YAAY,UAAU,EAE/B,EAEA,KAAQ,mBAAqB,IAAM,CAlJrC,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAmJI,IAAMC,GAAYP,EAAA,KAAK,UAAL,YAAAA,EAAc,UAC1BQ,GAAeP,EAAA,KAAK,UAAL,YAAAA,EAAc,aAC7BQ,GAAeP,EAAA,KAAK,UAAL,YAAAA,EAAc,aAE/BK,EAAYE,GAAgBD,GAC9BJ,GAAAD,EAAA,KAAK,SAAL,YAAAA,EAAa,YAAb,MAAAC,EAAwB,OAAO,WAE/BE,GAAAD,EAAA,KAAK,SAAL,YAAAA,EAAa,YAAb,MAAAC,EAAwB,IAAI,SAEhC,EA1IA,WAAW,QAAyB,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", "_f", "_g", "scrollTop", "scrollHeight", "clientHeight", "bl_dialog_default", "changedProperties", "node", "source", "x", "title", "classes", "o", "__decorateClass", "e", "newVal", "oldVal", "i"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as r}from"./chunk-GRL4DWKG.js";import{a as c,b as
|
|
1
|
+
import{a as r}from"./chunk-GRL4DWKG.js";import{a as c,b as l,c as p,e as u}from"./chunk-X2KXJYXQ.js";import{a as n,b as i,f as a}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var d=n`:host{position:relative}.option-container{--option-font:var(--bl-font-title-3-regular);--option-spacing:var(--bl-size-xs) 0;--option-selected-color:var(--bl-color-primary);--option-hover-color:var(--bl-color-primary-highlight);--option-color:var(--bl-color-neutral-darker);--option-disabled-color:var(--bl-color-neutral-light);--option-separator:1px solid var(--bl-color-neutral-lighter);--option-gap:var(--bl-size-2xs);--option-transition:color 120ms ease-out}.option-container::after{position:absolute;content:"";width:100%;bottom:0;border-bottom:var(--option-separator)}.no-border-bottom::after{border-bottom:none}:host(:last-of-type) .option-container::after{border-bottom:none}.single-option{width:100%;display:block;cursor:pointer;color:var(--option-color);margin:var(--option-spacing);transition:var(--option-transition);font:var(--option-font);user-select:none;position:relative;outline:none}.single-option:focus-visible::after{content:"";position:absolute;inset:calc(var(--bl-size-3xs) * -1);border:var(--bl-size-4xs) solid var(--option-hover-color);border-radius:var(--bl-size-4xs)}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .single-option,:host(:hover) .single-option{color:var(--option-hover-color)}:host([selected]) .single-option{color:var(--option-selected-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .single-option{color:var(--option-disabled-color);cursor:not-allowed;pointer-events:none}.checkbox-option{width:100%;display:block;color:var(--option-color);padding:var(--option-spacing)}`,h=d;var e=class extends a{constructor(){super(...arguments);this.label="";this.disabled=!1;this.selected=!1;this.multiple=!1}static get styles(){return[h]}get value(){return this._value||this.textContent}set value(t){this._value=t}focus(){this.multiple||(this.focusTarget.tabIndex=0),this.focusTarget.focus(),this.onFocus(this.value)}blur(){this.onBlur(this.value),this.focusTarget.tabIndex=-1}singleOptionTemplate(){return i`<div
|
|
2
2
|
class="single-option focus-target"
|
|
3
3
|
@blur=${this.blur}
|
|
4
4
|
@keydown=${this.handleKeydown}
|
|
@@ -7,7 +7,7 @@ import{a as r}from"./chunk-GRL4DWKG.js";import{a as c,b as i,c as p,e as h}from"
|
|
|
7
7
|
aria-selected="${this.selected}"
|
|
8
8
|
>
|
|
9
9
|
<slot></slot>
|
|
10
|
-
</div>`}checkboxOptionTemplate(){return
|
|
10
|
+
</div>`}checkboxOptionTemplate(){return i`<bl-checkbox
|
|
11
11
|
class="checkbox-option focus-target"
|
|
12
12
|
.checked="${this.selected}"
|
|
13
13
|
.disabled="${this.disabled}"
|
|
@@ -16,7 +16,7 @@ import{a as r}from"./chunk-GRL4DWKG.js";import{a as c,b as i,c as p,e as h}from"
|
|
|
16
16
|
aria-selected="${this.selected}"
|
|
17
17
|
>
|
|
18
18
|
<slot></slot>
|
|
19
|
-
</bl-checkbox>`}render(){return
|
|
19
|
+
</bl-checkbox>`}render(){return i`<div class="option-container">
|
|
20
20
|
${this.multiple?this.checkboxOptionTemplate():this.singleOptionTemplate()}
|
|
21
|
-
</div>`}handleKeydown(
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
</div>`}handleKeydown(t){(t.code==="Enter"||t.code==="Space")&&(this._onClickOption(),t.preventDefault())}_handleEvent(){this._onSelect(this.value)}_onClickOption(){this.selected=!this.selected,this._handleEvent()}_onCheckboxChange(t){this.selected=t.detail,this._handleEvent()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{var t,s;this.blSelect=this.closest("bl-select"),this.multiple=((t=this.blSelect)==null?void 0:t.multiple)||!1,(s=this.blSelect)==null||s.registerOption(this)})}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.blSelect)==null||t.unregisterOption(this)}};o([l({})],e.prototype,"value",1),o([l({type:String,reflect:!0,attribute:"label"})],e.prototype,"label",2),o([l({type:Boolean,reflect:!0})],e.prototype,"disabled",2),o([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),o([p()],e.prototype,"multiple",2),o([r("bl-select-option")],e.prototype,"_onSelect",2),o([r("bl-focus")],e.prototype,"onFocus",2),o([r("bl-blur")],e.prototype,"onBlur",2),o([u(".focus-target")],e.prototype,"focusTarget",2),e=o([c("bl-select-option")],e);export{e as a};
|
|
22
|
+
//# sourceMappingURL=chunk-PLUCMBSD.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/select/option/bl-select-option.css", "../src/components/select/option/bl-select-option.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative}.option-container{--option-font:var(--bl-font-title-3-regular);--option-spacing:var(--bl-size-xs) 0;--option-selected-color:var(--bl-color-primary);--option-hover-color:var(--bl-color-primary-highlight);--option-color:var(--bl-color-neutral-darker);--option-disabled-color:var(--bl-color-neutral-light);--option-separator:1px solid var(--bl-color-neutral-lighter);--option-gap:var(--bl-size-2xs);--option-transition:color 120ms ease-out}.option-container::after{position:absolute;content:\"\";width:100%;bottom:0;border-bottom:var(--option-separator)}.no-border-bottom::after{border-bottom:none}:host(:last-of-type) .option-container::after{border-bottom:none}.single-option{width:100%;display:block;cursor:pointer;color:var(--option-color);margin:var(--option-spacing);transition:var(--option-transition);font:var(--option-font);user-select:none;position:relative;outline:none}.single-option:focus-visible::after{content:\"\";position:absolute;inset:calc(var(--bl-size-3xs) * -1);border:var(--bl-size-4xs) solid var(--option-hover-color);border-radius:var(--bl-size-4xs)}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .single-option,:host(:hover) .single-option{color:var(--option-hover-color)}:host([selected]) .single-option{color:var(--option-selected-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .single-option{color:var(--option-disabled-color);cursor:not-allowed;pointer-events:none}.checkbox-option{width:100%;display:block;color:var(--option-color);padding:var(--option-spacing)}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { FormValue } from \"@open-wc/form-helpers\";\nimport { event, EventDispatcher } from \"../../../utilities/event\";\nimport BlSelect from \"../bl-select\";\nimport style from \"./bl-select-option.css\";\n\n@customElement(\"bl-select-option\")\nexport default class BlSelectOption<ValueType extends FormValue = string> extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n private _value: ValueType;\n\n /* Declare reactive properties */\n /**\n * Sets the value for the option\n */\n @property({})\n get value(): ValueType {\n return this._value || (this.textContent as ValueType);\n }\n\n set value(val: ValueType) {\n this._value = val;\n }\n\n /**\n * Sets the label for bl-select, and bl-select renders this value instead of the option's textContent\n */\n @property({ type: String, reflect: true, attribute: \"label\" })\n label = \"\";\n\n /**\n * Sets option as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Sets option as selected state\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n @state()\n multiple = false;\n\n /**\n * Fires when clicked on the option\n */\n @event(\"bl-select-option\") private _onSelect: EventDispatcher<ValueType | string | null>;\n\n /**\n * Fires when checkbox is focused\n */\n @event(\"bl-focus\") private onFocus: EventDispatcher<ValueType | string | null>;\n\n /**\n * Fires when checkbox is blurred\n */\n @event(\"bl-blur\") private onBlur: EventDispatcher<ValueType | string | null>;\n\n @query(\".focus-target\") private focusTarget: HTMLElement;\n\n /**\n * Focuses this option\n */\n focus() {\n if (!this.multiple) {\n this.focusTarget.tabIndex = 0;\n }\n this.focusTarget.focus();\n this.onFocus(this.value);\n }\n\n /**\n * Blurs from this option\n */\n blur() {\n this.onBlur(this.value);\n this.focusTarget.tabIndex = -1;\n }\n\n private blSelect: BlSelect<ValueType> | null;\n\n private singleOptionTemplate() {\n return html`<div\n class=\"single-option focus-target\"\n @blur=${this.blur}\n @keydown=${this.handleKeydown}\n @click=\"${this._onClickOption}\"\n role=\"option\"\n aria-selected=\"${this.selected}\"\n >\n <slot></slot>\n </div>`;\n }\n\n private checkboxOptionTemplate() {\n return html`<bl-checkbox\n class=\"checkbox-option focus-target\"\n .checked=\"${this.selected}\"\n .disabled=\"${this.disabled}\"\n @bl-checkbox-change=\"${this._onCheckboxChange}\"\n role=\"option\"\n aria-selected=\"${this.selected}\"\n >\n <slot></slot>\n </bl-checkbox>`;\n }\n\n render() {\n return html`<div class=\"option-container\">\n ${this.multiple ? this.checkboxOptionTemplate() : this.singleOptionTemplate()}\n </div>`;\n }\n\n private handleKeydown(event: KeyboardEvent) {\n if (event.code === \"Enter\" || event.code === \"Space\") {\n this._onClickOption();\n event.preventDefault();\n }\n }\n\n private _handleEvent() {\n this._onSelect(this.value);\n }\n\n private _onClickOption() {\n this.selected = !this.selected;\n this._handleEvent();\n }\n\n private _onCheckboxChange(event: CustomEvent) {\n this.selected = event.detail;\n this._handleEvent();\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this.blSelect = this.closest<BlSelect<ValueType>>(\"bl-select\");\n // FIXME: We should warn when parent is not bl-select\n\n this.multiple = this.blSelect?.multiple || false;\n this.blSelect?.registerOption(this);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.blSelect?.unregisterOption(this);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-select-option\": BlSelectOption;\n }\n}\n"],
|
|
5
|
+
"mappings": "mMACO,IAAMA,EAASC,6/CACfC,EAAQF,ECMf,IAAqBG,EAArB,cAAkFC,CAAW,CAA7F,kCAwBE,WAAQ,GAMR,cAAW,GAMX,cAAW,GAGX,cAAW,GAtCX,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CASA,IAAI,OAAmB,CACrB,OAAO,KAAK,QAAW,KAAK,WAC9B,CAEA,IAAI,MAAMC,EA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AAiB,KAClC,CACF,EAxIME,EAAA,CADHC,EAAS,CAAC,CAAC,GAXOT,EAYf,qBAYJQ,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,OAAQ,CAAC,GAvB1CT,EAwBnB,qBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA7BvBT,EA8BnB,wBAMAQ,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAnCvBT,EAoCnB,wBAGAQ,EAAA,CADCE,EAAM,GAtCYV,EAuCnB,wBAKmCQ,EAAA,CAAlCH,EAAM,kBAAkB,GA5CNL,EA4CgB,yBAKRQ,EAAA,CAA1BH,EAAM,UAAU,GAjDEL,EAiDQ,uBAKDQ,EAAA,CAAzBH,EAAM,SAAS,GAtDGL,EAsDO,sBAEMQ,EAAA,CAA/BG,EAAM,eAAe,GAxDHX,EAwDa,2BAxDbA,EAArBQ,EAAA,CADCC,EAAc,kBAAkB,GACZT",
|
|
6
|
+
"names": ["styles", "i", "bl_select_option_default", "BlSelectOption", "s", "bl_select_option_default", "val", "x", "event", "_a", "_b", "__decorateClass", "e", "t", "i"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-6LT7O7T2.js";import{a as y}from"./chunk-GRL4DWKG.js";import{a as m,b as e,c as g,e as f}from"./chunk-X2KXJYXQ.js";import{a as
|
|
1
|
+
import{a as _}from"./chunk-6LT7O7T2.js";import{a as n}from"./chunk-DINNT5P2.js";import{a as y}from"./chunk-GRL4DWKG.js";import{a as m,b as e,c as g,e as f}from"./chunk-X2KXJYXQ.js";import{a as p,b as a,f as v}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var x=l=>{if(!(!l.noValidate&&!l.reportValidity())){let d=new SubmitEvent("submit",{bubbles:!0,cancelable:!0});l.dispatchEvent(d),d.defaultPrevented||l.submit()}};var z=p`@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}:host{display:var(--bl-button-display, inline-block);max-width:100%;position:relative}.button{--main-color:var(--bl-color-primary);--main-hover-color:var(--bl-color-primary-highlight);--text-hover-color:var(--bl-color-neutral-lightest);--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-color);--border-color:var(--main-color);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-m);--margin-icon:var(--padding-vertical);--icon-size:var(--bl-size-m);--font:var(--bl-font-title-3-medium);--height:var(--bl-size-2xl);display:flex;gap:var(--margin-icon);justify-content:var(--bl-button-justify, center);align-items:center;box-sizing:border-box;width:100%;height:var(--height);border:solid 1px var(--border-color);border-radius:var(--bl-border-radius-m);text-decoration:none;padding:var(--padding-vertical) var(--padding-horizontal);cursor:pointer;background-color:var(--bg-color);color:var(--content-color);font:var(--font);font-kerning:none;user-select:none}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button,:host(:hover) .button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size="small"]) .button{--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-2xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl)}:host([size="large"]) .button{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-xl);--margin-icon:var(--bl-size-2xs);--height:var(--bl-size-3xl)}.button:focus{outline:none}.button:focus-visible{position:relative;outline:none}.button:focus-visible::after{border:2px solid var(--main-color);border-radius:var(--bl-border-radius-l);content:"";position:absolute;inset:-4px}.loading-icon{animation:spin 1s linear infinite;font-size:var(--icon-size)}:host ::slotted(bl-icon){font-size:var(--icon-size)}:host([loading]) ::slotted(bl-icon){display:none}:host .has-icon:not(.has-content){--padding-horizontal:var(--padding-vertical);--margin-icon:0}:host([variant="secondary"]) .button{--bg-color:transparent;--content-color:var(--main-color)}:host([variant="tertiary"]) .button{--content-color:var(--main-color);--border-color:transparent;--bg-color:transparent}:host([kind="neutral"]) .button{--main-color:var(--bl-color-neutral-darker);--main-hover-color:var(--bl-color-neutral-darkest)}:host([kind="success"]) .button{--main-color:var(--bl-color-success);--main-hover-color:var(--bl-color-success-highlight)}:host([kind="danger"]) .button{--main-color:var(--bl-color-danger);--main-hover-color:var(--bl-color-danger-highlight)}:host([disabled]){cursor:not-allowed}:host([loading]){cursor:wait}:host([loading]) bl-icon:not(.loading-icon){display:none}:host .button[aria-disabled="true"]{--main-color:var(--bl-color-neutral-lightest);--main-hover-color:var(--bl-color-neutral-lightest);--content-color:var(--bl-color-neutral-lighter);--bg-color:var(--main-color);pointer-events:none;text-decoration:none}:host([variant="tertiary"]) .button[aria-disabled="true"]{--main-color:transparent}:host([variant="secondary"].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled="false"],:host([variant="secondary"]:hover) .button[aria-disabled="false"]{--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-hover-color)}:host([variant="tertiary"].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled="false"],:host([variant="tertiary"]:hover) .button[aria-disabled="false"]{--content-color:var(--main-hover-color);--bg-color:var(--text-hover-color)}:host([dropdown]) .open{display:none}:host([dropdown]) .active .open{display:inline-block}:host([dropdown]) .active .close{display:none}:host .active.button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}:host([variant="secondary"]) .active.button{--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-hover-color)}:host([variant="tertiary"]) .active.button{--content-color:var(--main-color);--bg-color:var(--bl-color-neutral-lightest);--border-color:transparent}`,T=z;var t=class extends v{constructor(){super(...arguments);this.variant="primary";this.kind="default";this.size="medium";this.loading=!1;this.disabled=!1;this.target="_self";this.dropdown=!1;this.autofocus=!1;this.active=!1}static get styles(){return[T]}get _isActive(){return this.active}connectedCallback(){super.connectedCallback()}caretTemplate(){return a` <bl-icon class="open" name="arrow_up"></bl-icon>
|
|
2
2
|
<bl-icon class="close" name="arrow_down"></bl-icon>`}_handleClick(){if(this.type==="submit"){let r;this.form instanceof HTMLFormElement?r=this.form:typeof this.form=="string"?r=document.getElementById(this.form):r=this.closest("form"),r&&x(r)}this.onClick("Click event fired!")}focus(){this.button.focus()}get _hasIconSlot(){return this.querySelector(':scope > [slot="icon"]')!==null}get _hasDefaultSlot(){return[...this.childNodes].some(i=>{var c;let s=i.nodeType;return s===i.TEXT_NODE&&((c=i.textContent)==null?void 0:c.trim())!==""||s===i.ELEMENT_NODE&&!i.hasAttribute("slot")})}render(){let r=this.loading||this.disabled,i=this.loading&&this.loadingLabel?this.loadingLabel:a`<slot></slot>`,s=!!this.href,c=this.icon?a`<bl-icon name=${this.icon}></bl-icon>`:"",b=this.loading?a`<bl-icon class="loading-icon" name="loading"></bl-icon>`:"",h=a`<slot name="icon">${c}</slot> <span class="label">${i}</span>`,E=this.dropdown?this.caretTemplate():"",u=_({button:!0,"has-icon":this.icon||this._hasIconSlot,"has-content":this._hasDefaultSlot,active:!s&&this._isActive});return s?a`<a
|
|
3
3
|
class=${u}
|
|
4
4
|
?autofocus=${this.autofocus}
|
|
@@ -18,4 +18,4 @@ import{a as _}from"./chunk-6LT7O7T2.js";import{a as y}from"./chunk-GRL4DWKG.js";
|
|
|
18
18
|
>
|
|
19
19
|
${b} ${h} ${E}
|
|
20
20
|
</button>`}};o([e({type:String,reflect:!0})],t.prototype,"variant",2),o([e({type:String,reflect:!0})],t.prototype,"kind",2),o([e({type:String,reflect:!0})],t.prototype,"size",2),o([e({type:String})],t.prototype,"label",2),o([e({type:String,attribute:"loading-label"})],t.prototype,"loadingLabel",2),o([e({type:Boolean,reflect:!0})],t.prototype,"loading",2),o([e({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([e({type:String})],t.prototype,"href",2),o([e({type:String})],t.prototype,"icon",2),o([e({type:String})],t.prototype,"target",2),o([e({type:String})],t.prototype,"type",2),o([e({type:Boolean})],t.prototype,"dropdown",2),o([e({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),o([e({type:String})],t.prototype,"form",2),o([g({})],t.prototype,"active",2),o([f(".button")],t.prototype,"button",2),o([y("bl-click")],t.prototype,"onClick",2),t=o([m("bl-button")],t);export{x as a,t as b};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-Q7LYRUYQ.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{a as s,b as i}from"./chunk-X2KXJYXQ.js";import{a as e,b as l,f as r}from"./chunk-4OT5AMS5.js";import{d as o}from"./chunk-IZ2LK5GK.js";var p=e`:host{display:block;position:relative;width:100%}.dropdown-group{display:flex;flex-direction:column;gap:var(--bl-size-xs)}.caption{font:var(--bl-font-caption);font-size:var(--bl-font-size-xs);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-s);color:var(--bl-color-neutral-dark)}:host(:not(:first-child)) .dropdown-group{border-top:1px solid var(--bl-color-neutral-lighter);padding-top:var(--bl-size-xs)}:host(:not(:last-child)) .dropdown-group{border-bottom:1px solid var(--bl-color-neutral-lighter);padding-bottom:var(--bl-size-xs)}/*
|
|
2
|
+
:host(:not([caption])) ::slotted(:first-child) {
|
|
3
|
+
padding-block: var(--bl-size-xs) 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host(:not(:last-child)) ::slotted(:last-child) {
|
|
7
|
+
padding-block: 0 var(--bl-size-xs);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host(:not(:first-child)) .caption {
|
|
11
|
+
padding-block: var(--bl-size-xs) 0;
|
|
12
|
+
} */`,a=p;var d="bl-dropdown-group",t=class extends r{static get styles(){return[a]}render(){let n=this.caption?l`<span id="label" class="caption">${this.caption}</span>`:"";return l`<div class="dropdown-group" role="group" aria-labelledby="label">
|
|
13
|
+
${n}
|
|
14
|
+
<slot></slot>
|
|
15
|
+
</div>`}};o([i({type:String})],t.prototype,"caption",2),t=o([s(d)],t);export{d as a,t as b};
|
|
16
|
+
//# sourceMappingURL=chunk-QXFCLEZB.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/dropdown/group/bl-dropdown-group.css", "../src/components/dropdown/group/bl-dropdown-group.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:block;position:relative;width:100%}.dropdown-group{display:flex;flex-direction:column;gap:var(--bl-size-xs)}.caption{font:var(--bl-font-caption);font-size:var(--bl-font-size-xs);font-weight:var(--bl-font-weight-medium);line-height:var(--bl-font-size-s);color:var(--bl-color-neutral-dark)}:host(:not(:first-child)) .dropdown-group{border-top:1px solid var(--bl-color-neutral-lighter);padding-top:var(--bl-size-xs)}:host(:not(:last-child)) .dropdown-group{border-bottom:1px solid var(--bl-color-neutral-lighter);padding-bottom:var(--bl-size-xs)}/*\n:host(:not([caption])) ::slotted(:first-child) {\n padding-block: var(--bl-size-xs) 0;\n}\n\n:host(:not(:last-child)) ::slotted(:last-child) {\n padding-block: 0 var(--bl-size-xs);\n}\n\n:host(:not(:first-child)) .caption {\n padding-block: var(--bl-size-xs) 0;\n} */`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport style from \"./bl-dropdown-group.css\";\n\nexport const blDropdownGroupTag = \"bl-dropdown-group\";\n\n/**\n * @tag bl-dropdown-group\n * @summary Baklava Dropdown Group component\n */\n@customElement(blDropdownGroupTag)\nexport default class BlDropdownGroup extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the caption.\n */\n @property({ type: String })\n caption?: string;\n\n render(): TemplateResult {\n const caption = this.caption\n ? html`<span id=\"label\" class=\"caption\">${this.caption}</span>`\n : \"\";\n\n return html`<div class=\"dropdown-group\" role=\"group\" aria-labelledby=\"label\">\n ${caption}\n <slot></slot>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownGroupTag]: BlDropdownGroup;\n }\n}\n"],
|
|
5
|
+
"mappings": "6IACO,IAAMA,EAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAYfC,EAAQF,ECTR,IAAMG,EAAqB,oBAObC,EAArB,cAA6CC,CAAW,CACtD,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAQA,QAAyB,CACvB,IAAMC,EAAU,KAAK,QACjBC,qCAAwC,KAAK,iBAC7C,GAEJ,OAAOA;AAAA,QACHD;AAAA;AAAA,WAGN,CACF,EAZEE,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GARPN,EASnB,uBATmBA,EAArBK,EAAA,CADCC,EAAcP,CAAkB,GACZC",
|
|
6
|
+
"names": ["styles", "i", "bl_dropdown_group_default", "blDropdownGroupTag", "BlDropdownGroup", "s", "bl_dropdown_group_default", "caption", "x", "__decorateClass", "e"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as b}from"./chunk-HMDGICS5.js";import{a as s,b as n}from"./chunk-X2KXJYXQ.js";import{a as i,b as o,f as a}from"./chunk-4OT5AMS5.js";import{d as l}from"./chunk-IZ2LK5GK.js";var d=i`:host{display:table-cell;border:1px solid var(--bl-color-neutral-lighter);padding:var(--bl-size-m);font:var(--bl-font-title-3-regular);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;word-break:break-word;background-color:var(--bl-color-neutral-full);background-clip:padding-box;border-top:none;border-right:none}.table-cell{display:flex;align-items:center}.table-cell.shadow-right::before{content:"";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-cell.shadow-left::before{content:"";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right:var(--bl-size-m)}`,c=d;var h="bl-table-cell",t=class extends a{constructor(){super(...arguments);this.disableSelection=!1}static get styles(){return[c]}get _table(){return this.closest("bl-table")}get _tableRow(){return this.closest("bl-table-row")}get disabled(){return this.disableSelection}get selectable(){var e;return this.index===0&&!!((e=this._table)!=null&&e.isSelectable(!1))&&this.selectionKey}get index(){let e=this.parentNode;return e?[...e.children].indexOf(this):-1}get selectionKey(){return this._tableRow?this._tableRow.selectionKey:""}get checked(){var e;return!!((e=this._tableRow)!=null&&e.checked)}get shadowRight(){var e;return!!((e=this._tableRow)!=null&&e.stickyFirstColumn)&&this.index===0}get shadowLeft(){var e;return!!((e=this._tableRow)!=null&&e.stickyLastColumn)&&this.nextElementSibling===null}connectedCallback(){super.connectedCallback(),this.closest(b)||console.warn("bl-table-cell is designed to be used inside a bl-table-row",this)}onChange(e){var r;(r=this._table)==null||r.onSelectionChange(!1,e.detail,this.selectionKey)}_renderCheckbox(){return this.selectable?o`<bl-checkbox
|
|
2
|
+
?checked=${this.checked}
|
|
3
|
+
?disabled=${this.disabled}
|
|
4
|
+
value="row"
|
|
5
|
+
@bl-checkbox-change=${this.onChange}
|
|
6
|
+
>
|
|
7
|
+
</bl-checkbox>`:null}render(){let e=this.shadowRight?"shadow-right":this.shadowLeft?"shadow-left":"";return o`<div class="table-cell ${e}">
|
|
8
|
+
${this._renderCheckbox()}
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</div>`}};l([n({type:Boolean,reflect:!0,attribute:"disabled"})],t.prototype,"disableSelection",2),t=l([s(h)],t);export{h as a,t as b};
|
|
11
|
+
//# sourceMappingURL=chunk-TI6K2YFV.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/table/table-cell/bl-table-cell.css", "../src/components/table/table-cell/bl-table-cell.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:table-cell;border:1px solid var(--bl-color-neutral-lighter);padding:var(--bl-size-m);font:var(--bl-font-title-3-regular);color:var(--bl-color-neutral-darker);box-sizing:border-box;vertical-align:middle;word-break:break-word;background-color:var(--bl-color-neutral-full);background-clip:padding-box;border-top:none;border-right:none}.table-cell{display:flex;align-items:center}.table-cell.shadow-right::before{content:\"\";position:absolute;right:-1px;top:0;width:16px;height:100%;z-index:-1;border-right:1px solid var(--bl-color-neutral-lighter);box-shadow:8px 0 16px 0 rgb(39 49 66 / 10%)}.table-cell.shadow-left::before{content:\"\";position:absolute;left:-1px;top:0;width:16px;height:100%;z-index:-1;border-left:1px solid var(--bl-color-neutral-lighter);box-shadow:-8px 0 16px 0 rgb(39 49 66 / 10%)}bl-checkbox{margin-right:var(--bl-size-m)}`;\nexport default styles;\n", "import { html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { CSSResultGroup } from \"lit/development\";\nimport \"element-internals-polyfill\";\nimport \"../../checkbox-group/checkbox/bl-checkbox\";\nimport style from \"../table-cell/bl-table-cell.css\";\nimport BlTableRow, { blTableRowTag } from \"../table-row/bl-table-row\";\n\nexport const blTableCellTag = \"bl-table-cell\";\n/**\n * @tag bl-table-cell\n * @summary Baklava Table component\n */\n@customElement(blTableCellTag)\nexport default class BlTableCell extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Disable selection\n */\n @property({ type: Boolean, reflect: true, attribute: \"disabled\" })\n disableSelection = false;\n\n private get _table() {\n return this.closest(\"bl-table\");\n }\n private get _tableRow() {\n return this.closest(\"bl-table-row\");\n }\n get disabled() {\n return this.disableSelection;\n }\n get selectable() {\n return this.index === 0 && !!this._table?.isSelectable(false) && this.selectionKey;\n }\n get index() {\n const parent = this.parentNode;\n\n if (!parent) {\n return -1;\n }\n return [...parent.children].indexOf(this);\n }\n get selectionKey(): string {\n return this._tableRow ? this._tableRow.selectionKey : \"\";\n }\n get checked() {\n return !!this._tableRow?.checked;\n }\n get shadowRight() {\n return !!this._tableRow?.stickyFirstColumn && this.index === 0;\n }\n get shadowLeft() {\n return !!this._tableRow?.stickyLastColumn && this.nextElementSibling === null;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (!this.closest<BlTableRow>(blTableRowTag)) {\n console.warn(\"bl-table-cell is designed to be used inside a bl-table-row\", this);\n }\n }\n\n onChange(event: CustomEvent) {\n this._table?.onSelectionChange(false, event.detail, this.selectionKey);\n }\n\n private _renderCheckbox() {\n return this.selectable\n ? html`<bl-checkbox\n ?checked=${this.checked}\n ?disabled=${this.disabled}\n value=\"row\"\n @bl-checkbox-change=${this.onChange}\n >\n </bl-checkbox>`\n : null;\n }\n render(): TemplateResult {\n const className = this.shadowRight ? \"shadow-right\" : this.shadowLeft ? \"shadow-left\" : \"\";\n\n return html`<div class=\"table-cell ${className}\">\n ${this._renderCheckbox()}\n <slot></slot>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blTableCellTag]: BlTableCell;\n }\n}\n"],
|
|
5
|
+
"mappings": "qLACO,IAAMA,EAAS,01BACfC,EAAQD,ECMR,IAAME,EAAiB,gBAMTC,EAArB,cAAyCC,CAAW,CAApD,kCASE,sBAAmB,GARnB,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAQA,IAAY,QAAS,CACnB,OAAO,KAAK,QAAQ,UAAU,CAChC,CACA,IAAY,WAAY,CACtB,OAAO,KAAK,QAAQ,cAAc,CACpC,CACA,IAAI,UAAW,CACb,OAAO,KAAK,gBACd,CACA,IAAI,YAAa,CAlCnB,IAAAC,EAmCI,OAAO,KAAK,QAAU,GAAK,CAAC,GAACA,EAAA,KAAK,SAAL,MAAAA,EAAa,aAAa,MAAU,KAAK,YACxE,CACA,IAAI,OAAQ,CACV,IAAMC,EAAS,KAAK,WAEpB,OAAKA,EAGE,CAAC,GAAGA,EAAO,QAAQ,EAAE,QAAQ,IAAI,EAF/B,EAGX,CACA,IAAI,cAAuB,CACzB,OAAO,KAAK,UAAY,KAAK,UAAU,aAAe,EACxD,CACA,IAAI,SAAU,CAhDhB,IAAAD,EAiDI,MAAO,CAAC,GAACA,EAAA,KAAK,YAAL,MAAAA,EAAgB,QAC3B,CACA,IAAI,aAAc,CAnDpB,IAAAA,EAoDI,MAAO,CAAC,GAACA,EAAA,KAAK,YAAL,MAAAA,EAAgB,oBAAqB,KAAK,QAAU,CAC/D,CACA,IAAI,YAAa,CAtDnB,IAAAA,EAuDI,MAAO,CAAC,GAACA,EAAA,KAAK,YAAL,MAAAA,EAAgB,mBAAoB,KAAK,qBAAuB,IAC3E,CAEA,mBAA0B,CACxB,MAAM,kBAAkB,EACnB,KAAK,QAAoBE,CAAa,GACzC,QAAQ,KAAK,6DAA8D,IAAI,CAEnF,CAEA,SAASC,EAAoB,CAjE/B,IAAAH,GAkEIA,EAAA,KAAK,SAAL,MAAAA,EAAa,kBAAkB,GAAOG,EAAM,OAAQ,KAAK,aAC3D,CAEQ,iBAAkB,CACxB,OAAO,KAAK,WACRC;AAAA,qBACa,KAAK;AAAA,sBACJ,KAAK;AAAA;AAAA,gCAEK,KAAK;AAAA;AAAA,wBAG7B,IACN,CACA,QAAyB,CACvB,IAAMC,EAAY,KAAK,YAAc,eAAiB,KAAK,WAAa,cAAgB,GAExF,OAAOD,2BAA8BC;AAAA,QACjC,KAAK,gBAAgB;AAAA;AAAA,WAG3B,CACF,EAjEEC,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,UAAW,CAAC,GAR9CV,EASnB,gCATmBA,EAArBS,EAAA,CADCC,EAAcX,CAAc,GACRC",
|
|
6
|
+
"names": ["styles", "bl_table_cell_default", "blTableCellTag", "BlTableCell", "s", "bl_table_cell_default", "_a", "parent", "blTableRowTag", "event", "x", "className", "__decorateClass", "e"]
|
|
7
|
+
}
|