@db-ux/wc-core-components 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/db-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/db-accordion.cjs.entry.js +1 -1
- package/dist/cjs/db-badge.cjs.entry.js +1 -1
- package/dist/cjs/db-brand.cjs.entry.js +1 -1
- package/dist/cjs/db-button.cjs.entry.js +1 -1
- package/dist/cjs/db-card.cjs.entry.js +1 -1
- package/dist/cjs/db-checkbox.cjs.entry.js +15 -16
- package/dist/cjs/db-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/db-divider.cjs.entry.js +1 -1
- package/dist/cjs/db-drawer.cjs.entry.js +1 -1
- package/dist/cjs/db-header.cjs.entry.js +2 -2
- package/dist/cjs/db-icon.cjs.entry.js +1 -1
- package/dist/cjs/db-infotext.cjs.entry.js +1 -1
- package/dist/cjs/db-input.cjs.entry.js +3 -3
- package/dist/cjs/db-input.cjs.entry.js.map +1 -1
- package/dist/cjs/db-link.cjs.entry.js +1 -1
- package/dist/cjs/db-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/db-navigation.cjs.entry.js +1 -1
- package/dist/cjs/db-notification.cjs.entry.js +1 -1
- package/dist/cjs/db-page.cjs.entry.js +1 -1
- package/dist/cjs/db-popover.cjs.entry.js +1 -1
- package/dist/cjs/db-radio.cjs.entry.js +4 -9
- package/dist/cjs/db-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/db-section.cjs.entry.js +1 -1
- package/dist/cjs/db-select.cjs.entry.js +5 -5
- package/dist/cjs/db-select.cjs.entry.js.map +1 -1
- package/dist/cjs/db-stack.cjs.entry.js +1 -1
- package/dist/cjs/db-switch.cjs.entry.js +8 -4
- package/dist/cjs/db-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tab-item_3.cjs.entry.js +3 -3
- package/dist/cjs/db-tab-item_3.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tabs.cjs.entry.js +21 -4
- package/dist/cjs/db-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tag.cjs.entry.js +1 -1
- package/dist/cjs/db-textarea.cjs.entry.js +1 -1
- package/dist/cjs/db-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/db-ux.cjs.js +1 -1
- package/dist/cjs/{index-c0df827d.js → index-403366c7.js} +1 -12
- package/dist/cjs/index-403366c7.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{navigation-bb2d5552.js → navigation-5586b826.js} +2 -2
- package/dist/cjs/{navigation-bb2d5552.js.map → navigation-5586b826.js.map} +1 -1
- package/dist/collection/components/checkbox/checkbox.js +21 -22
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/input/input.js +27 -2
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/input/model.js.map +1 -1
- package/dist/collection/components/radio/radio.js +3 -8
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/select/model.js.map +1 -1
- package/dist/collection/components/select/select.js +29 -4
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/switch/model.js.map +1 -1
- package/dist/collection/components/switch/switch.js +38 -10
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/tab-item/tab-item.js +2 -2
- package/dist/collection/components/tab-item/tab-item.js.map +1 -1
- package/dist/collection/components/tabs/model.js.map +1 -1
- package/dist/collection/components/tabs/tabs.js +51 -3
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/shared/model.js.map +1 -1
- package/dist/collection/utils/index.js +0 -11
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/react.js +16 -0
- package/dist/collection/utils/react.js.map +1 -0
- package/dist/custom-elements.json +144 -43
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/db-ux.esm.js.map +1 -1
- package/dist/db-ux/index.esm.js +1 -1
- package/dist/db-ux/index.esm.js.map +1 -1
- package/dist/db-ux/p-0983e297.entry.js +2 -0
- package/dist/db-ux/p-0983e297.entry.js.map +1 -0
- package/dist/db-ux/{p-34f88e4e.js → p-0cdf053e.js} +2 -2
- package/dist/db-ux/{p-2d32aa06.entry.js → p-0d08f973.entry.js} +2 -2
- package/dist/db-ux/{p-78e5293a.entry.js → p-123cb839.entry.js} +2 -2
- package/dist/db-ux/p-123cb839.entry.js.map +1 -0
- package/dist/db-ux/{p-10d30f53.entry.js → p-1665a1f6.entry.js} +2 -2
- package/dist/db-ux/{p-b0f1a571.entry.js → p-1efdd41a.entry.js} +2 -2
- package/dist/db-ux/{p-031e9fbf.entry.js → p-223b1031.entry.js} +2 -2
- package/dist/db-ux/{p-a3be13fd.entry.js → p-2f695fb2.entry.js} +2 -2
- package/dist/db-ux/{p-ab8a1944.entry.js → p-300fb4ff.entry.js} +2 -2
- package/dist/db-ux/{p-d48f3770.entry.js → p-3958b712.entry.js} +2 -2
- package/dist/db-ux/p-3958b712.entry.js.map +1 -0
- package/dist/db-ux/{p-fea6db86.entry.js → p-398c72a6.entry.js} +2 -2
- package/dist/db-ux/p-45bb9feb.js +2 -0
- package/dist/db-ux/p-45bb9feb.js.map +1 -0
- package/dist/db-ux/{p-43aa16d7.entry.js → p-5c1b65ac.entry.js} +2 -2
- package/dist/db-ux/p-69948f78.entry.js +2 -0
- package/dist/db-ux/p-69948f78.entry.js.map +1 -0
- package/dist/db-ux/{p-6b6f1f7f.entry.js → p-7eb92648.entry.js} +2 -2
- package/dist/db-ux/{p-1c12853c.entry.js → p-8d9ef330.entry.js} +2 -2
- package/dist/db-ux/{p-79b43b42.entry.js → p-90caefe4.entry.js} +2 -2
- package/dist/db-ux/{p-c6d54dd4.entry.js → p-95e59a69.entry.js} +2 -2
- package/dist/db-ux/{p-71cb932e.entry.js → p-ab783af4.entry.js} +2 -2
- package/dist/db-ux/{p-3f2e2d87.entry.js → p-b0b04684.entry.js} +2 -2
- package/dist/db-ux/{p-79d9caa7.entry.js → p-b2886d1c.entry.js} +2 -2
- package/dist/db-ux/p-b4eefd78.entry.js +2 -0
- package/dist/db-ux/{p-08126c21.entry.js → p-c367b891.entry.js} +2 -2
- package/dist/db-ux/{p-1066cd52.entry.js → p-cf22eaea.entry.js} +2 -2
- package/dist/db-ux/{p-2e318e2a.entry.js → p-e1788dce.entry.js} +2 -2
- package/dist/db-ux/p-e1788dce.entry.js.map +1 -0
- package/dist/db-ux/p-e24051a3.entry.js +2 -0
- package/dist/db-ux/p-e24051a3.entry.js.map +1 -0
- package/dist/db-ux/{p-683d690f.entry.js → p-e6f5c82d.entry.js} +2 -2
- package/dist/db-ux/{p-5a689165.entry.js → p-f23ca7f6.entry.js} +2 -2
- package/dist/db-ux/{p-b47af6eb.entry.js → p-f3251c56.entry.js} +2 -2
- package/dist/db-ux/{p-8e2a086b.entry.js → p-f78c8591.entry.js} +2 -2
- package/dist/db-ux/p-fa9a7966.entry.js +2 -0
- package/dist/db-ux/p-fa9a7966.entry.js.map +1 -0
- package/dist/esm/db-accordion-item.entry.js +1 -1
- package/dist/esm/db-accordion.entry.js +1 -1
- package/dist/esm/db-badge.entry.js +1 -1
- package/dist/esm/db-brand.entry.js +1 -1
- package/dist/esm/db-button.entry.js +1 -1
- package/dist/esm/db-card.entry.js +1 -1
- package/dist/esm/db-checkbox.entry.js +15 -16
- package/dist/esm/db-checkbox.entry.js.map +1 -1
- package/dist/esm/db-divider.entry.js +1 -1
- package/dist/esm/db-drawer.entry.js +1 -1
- package/dist/esm/db-header.entry.js +2 -2
- package/dist/esm/db-icon.entry.js +1 -1
- package/dist/esm/db-infotext.entry.js +1 -1
- package/dist/esm/db-input.entry.js +3 -3
- package/dist/esm/db-input.entry.js.map +1 -1
- package/dist/esm/db-link.entry.js +1 -1
- package/dist/esm/db-navigation-item.entry.js +2 -2
- package/dist/esm/db-navigation.entry.js +1 -1
- package/dist/esm/db-notification.entry.js +1 -1
- package/dist/esm/db-page.entry.js +1 -1
- package/dist/esm/db-popover.entry.js +1 -1
- package/dist/esm/db-radio.entry.js +4 -9
- package/dist/esm/db-radio.entry.js.map +1 -1
- package/dist/esm/db-section.entry.js +1 -1
- package/dist/esm/db-select.entry.js +5 -5
- package/dist/esm/db-select.entry.js.map +1 -1
- package/dist/esm/db-stack.entry.js +1 -1
- package/dist/esm/db-switch.entry.js +8 -4
- package/dist/esm/db-switch.entry.js.map +1 -1
- package/dist/esm/db-tab-item_3.entry.js +3 -3
- package/dist/esm/db-tab-item_3.entry.js.map +1 -1
- package/dist/esm/db-tabs.entry.js +22 -5
- package/dist/esm/db-tabs.entry.js.map +1 -1
- package/dist/esm/db-tag.entry.js +1 -1
- package/dist/esm/db-textarea.entry.js +1 -1
- package/dist/esm/db-tooltip.entry.js +1 -1
- package/dist/esm/db-ux.js +1 -1
- package/dist/esm/{index-fad99efc.js → index-7d31752e.js} +2 -11
- package/dist/esm/index-7d31752e.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{navigation-9fec9921.js → navigation-09e3ace3.js} +2 -2
- package/dist/esm/{navigation-9fec9921.js.map → navigation-09e3ace3.js.map} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/input/model.d.ts +2 -2
- package/dist/types/components/select/model.d.ts +2 -2
- package/dist/types/components/select/select.d.ts +1 -0
- package/dist/types/components/switch/model.d.ts +2 -2
- package/dist/types/components/switch/switch.d.ts +3 -2
- package/dist/types/components/tab-item/tab-item.d.ts +1 -2
- package/dist/types/components/tabs/model.d.ts +9 -0
- package/dist/types/components/tabs/tabs.d.ts +3 -0
- package/dist/types/components.d.ts +24 -0
- package/dist/types/shared/model.d.ts +6 -0
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/react.d.ts +7 -0
- package/dist/vscode.html-custom-data.json +14 -7
- package/dist/web-types.json +54 -19
- package/package.json +3 -3
- package/dist/cjs/index-c0df827d.js.map +0 -1
- package/dist/db-ux/p-1566cfef.entry.js +0 -2
- package/dist/db-ux/p-1566cfef.entry.js.map +0 -1
- package/dist/db-ux/p-2e318e2a.entry.js.map +0 -1
- package/dist/db-ux/p-6f645f17.entry.js +0 -2
- package/dist/db-ux/p-6f645f17.entry.js.map +0 -1
- package/dist/db-ux/p-78e5293a.entry.js.map +0 -1
- package/dist/db-ux/p-871805e1.entry.js +0 -2
- package/dist/db-ux/p-871805e1.entry.js.map +0 -1
- package/dist/db-ux/p-99d90022.js +0 -2
- package/dist/db-ux/p-99d90022.js.map +0 -1
- package/dist/db-ux/p-a494046c.entry.js +0 -2
- package/dist/db-ux/p-a494046c.entry.js.map +0 -1
- package/dist/db-ux/p-d48f3770.entry.js.map +0 -1
- package/dist/db-ux/p-f65f4eac.entry.js +0 -2
- package/dist/esm/index-fad99efc.js.map +0 -1
- /package/dist/db-ux/{p-34f88e4e.js.map → p-0cdf053e.js.map} +0 -0
- /package/dist/db-ux/{p-2d32aa06.entry.js.map → p-0d08f973.entry.js.map} +0 -0
- /package/dist/db-ux/{p-10d30f53.entry.js.map → p-1665a1f6.entry.js.map} +0 -0
- /package/dist/db-ux/{p-b0f1a571.entry.js.map → p-1efdd41a.entry.js.map} +0 -0
- /package/dist/db-ux/{p-031e9fbf.entry.js.map → p-223b1031.entry.js.map} +0 -0
- /package/dist/db-ux/{p-a3be13fd.entry.js.map → p-2f695fb2.entry.js.map} +0 -0
- /package/dist/db-ux/{p-ab8a1944.entry.js.map → p-300fb4ff.entry.js.map} +0 -0
- /package/dist/db-ux/{p-fea6db86.entry.js.map → p-398c72a6.entry.js.map} +0 -0
- /package/dist/db-ux/{p-43aa16d7.entry.js.map → p-5c1b65ac.entry.js.map} +0 -0
- /package/dist/db-ux/{p-6b6f1f7f.entry.js.map → p-7eb92648.entry.js.map} +0 -0
- /package/dist/db-ux/{p-1c12853c.entry.js.map → p-8d9ef330.entry.js.map} +0 -0
- /package/dist/db-ux/{p-79b43b42.entry.js.map → p-90caefe4.entry.js.map} +0 -0
- /package/dist/db-ux/{p-c6d54dd4.entry.js.map → p-95e59a69.entry.js.map} +0 -0
- /package/dist/db-ux/{p-71cb932e.entry.js.map → p-ab783af4.entry.js.map} +0 -0
- /package/dist/db-ux/{p-3f2e2d87.entry.js.map → p-b0b04684.entry.js.map} +0 -0
- /package/dist/db-ux/{p-79d9caa7.entry.js.map → p-b2886d1c.entry.js.map} +0 -0
- /package/dist/db-ux/{p-f65f4eac.entry.js.map → p-b4eefd78.entry.js.map} +0 -0
- /package/dist/db-ux/{p-08126c21.entry.js.map → p-c367b891.entry.js.map} +0 -0
- /package/dist/db-ux/{p-1066cd52.entry.js.map → p-cf22eaea.entry.js.map} +0 -0
- /package/dist/db-ux/{p-683d690f.entry.js.map → p-e6f5c82d.entry.js.map} +0 -0
- /package/dist/db-ux/{p-5a689165.entry.js.map → p-f23ca7f6.entry.js.map} +0 -0
- /package/dist/db-ux/{p-b47af6eb.entry.js.map → p-f3251c56.entry.js.map} +0 -0
- /package/dist/db-ux/{p-8e2a086b.entry.js.map → p-f78c8591.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"navigation-9fec9921.js","mappings":";;MASa,2BAA2B,GAAG,CAAC,KAAc;;IACxD,MAAM,EACJ,MAAM,EACP,GAAI,KAEH,CAAC;IACH,OAAO,OAAO,CAAC,EAAC,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,QAAQ,CAAC,kCAAkC,CAAC,CAAA,KAAI,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,0CAAE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA,CAAC,CAAC;AACtJ,EAAE;MACW,0BAA0B;IAQrC,YAAY,OAA2B,EAAE,aAA6B;;QALrD,wBAAmB,GAAmB,IAA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,IAAI,CAAC;QACjC,OAAO;YACL,EAAE;YACF,EAAE;YACF,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,WAAW;SAChB,CAAC;KACH;IACM,kBAAkB,CAAC,KAAiB;QACzC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACnF,OAAO;SACR;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;QAC7D,MAAM,mBAAmB,GAAG,IAAI,CAAC,4BAA4B,EAAE,CAAC;QAChE,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,GAAG,UAAU,GAAG,eAAe,CAAC,CAAC;QACpG,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO;SACR;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,WAAW,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;QACxJ,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;SAC/B;KACF;;;;;","names":[],"sources":["src/utils/navigation.ts"],"sourcesContent":["import { handleDataOutside } from './index';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = (event as {\n target: HTMLElement;\n });\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: Element | null;\n private readonly parentSubNavigation: Element | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: Element | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationItemSafeTriangle\n}"],"version":3}
|
|
1
|
+
{"file":"navigation-09e3ace3.js","mappings":";;MASa,2BAA2B,GAAG,CAAC,KAAc;;IACxD,MAAM,EACJ,MAAM,EACP,GAAI,KAEH,CAAC;IACH,OAAO,OAAO,CAAC,EAAC,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,QAAQ,CAAC,kCAAkC,CAAC,CAAA,KAAI,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,0CAAE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA,CAAC,CAAC;AACtJ,EAAE;MACW,0BAA0B;IAQrC,YAAY,OAA2B,EAAE,aAA6B;;QALrD,wBAAmB,GAAmB,IAAI,CAAC;QAEpD,gBAAW,GAAY,KAAK,CAAC;QAC7B,WAAM,GAAW,CAAC,CAAC;QACnB,WAAM,GAAW,CAAC,CAAC;QAEzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACxC,OAAO;SACR;QACD,IAAI,CAAC,mBAAmB,GAAG,MAAA,IAAI,CAAC,OAAO,0CAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;;;;;;QAOvE,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACnE,IAAI,CAAC,IAAI,EAAE,CAAC;SACb;KACF;IACO,IAAI;;QACV,MAAM,kBAAkB,GAAG,MAAA,MAAA,IAAI,CAAC,mBAAmB,0CA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B,CAAC,mBAAmB,GAAG,UAAU,GAAG,eAAe,CAAC,CAAC;QACpG,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO;SACR;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,WAAW,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;QACxJ,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;SAC/B;KACF;;;;;","names":[],"sources":["src/utils/navigation.ts"],"sourcesContent":["import { handleDataOutside } from './index';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = (event as {\n target: HTMLElement;\n });\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: Element | null;\n private readonly parentSubNavigation: Element | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: Element | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationItemSafeTriangle\n}"],"version":3}
|
|
@@ -9,8 +9,8 @@ export declare class DBCheckbox {
|
|
|
9
9
|
id: DBCheckboxProps["id"];
|
|
10
10
|
message: DBCheckboxProps["message"];
|
|
11
11
|
showMessage: DBCheckboxProps["showMessage"];
|
|
12
|
-
checked: DBCheckboxProps["checked"];
|
|
13
12
|
indeterminate: DBCheckboxProps["indeterminate"];
|
|
13
|
+
checked: DBCheckboxProps["checked"];
|
|
14
14
|
onChange: any;
|
|
15
15
|
change: DBCheckboxProps["change"];
|
|
16
16
|
validation: DBCheckboxProps["validation"];
|
|
@@ -42,6 +42,7 @@ export declare class DBInput {
|
|
|
42
42
|
min: DBInputProps["min"];
|
|
43
43
|
readOnly: DBInputProps["readOnly"];
|
|
44
44
|
form: DBInputProps["form"];
|
|
45
|
+
size: DBInputProps["size"];
|
|
45
46
|
autocomplete: DBInputProps["autocomplete"];
|
|
46
47
|
autofocus: DBInputProps["autofocus"];
|
|
47
48
|
dataList: DBInputProps["dataList"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormState, FormTextProps, GlobalProps, GlobalState, IconAfterProps, IconProps, InputEventProps, InputEventState, ShowIconProps, ValueLabelType } from '../../shared/model';
|
|
1
|
+
import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FormTextProps, GlobalProps, GlobalState, IconAfterProps, IconProps, InputEventProps, InputEventState, ShowIconProps, ValueLabelType } from '../../shared/model';
|
|
2
2
|
export declare const InputTypeList: readonly ["color", "date", "datetime-local", "email", "file", "hidden", "month", "number", "password", "range", "search", "tel", "text", "time", "url", "week"];
|
|
3
3
|
export type InputTypeType = (typeof InputTypeList)[number];
|
|
4
4
|
export type DBInputDefaultProps = {
|
|
@@ -31,7 +31,7 @@ export type DBInputDefaultProps = {
|
|
|
31
31
|
*/
|
|
32
32
|
step?: number | string;
|
|
33
33
|
};
|
|
34
|
-
export type DBInputProps = DBInputDefaultProps & GlobalProps & FormTextProps & InputEventProps<HTMLInputElement> & ChangeEventProps<HTMLInputElement> & FocusEventProps<HTMLInputElement> & FormProps & IconProps & IconAfterProps & FormMessageProps & ShowIconProps;
|
|
34
|
+
export type DBInputProps = DBInputDefaultProps & GlobalProps & FormTextProps & InputEventProps<HTMLInputElement> & ChangeEventProps<HTMLInputElement> & FocusEventProps<HTMLInputElement> & FormProps & IconProps & IconAfterProps & FormMessageProps & ShowIconProps & FormSizeProps;
|
|
35
35
|
export type DBInputDefaultState = {
|
|
36
36
|
_dataListId?: string;
|
|
37
37
|
getDataList: (_list?: string[] | ValueLabelType[]) => ValueLabelType[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, ClickEventProps, ClickEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormState, GlobalProps, GlobalState, IconProps, InitializedState, InputEventProps, InputEventState, ShowIconProps } from '../../shared/model';
|
|
1
|
+
import { ChangeEventProps, ChangeEventState, ClickEventProps, ClickEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, GlobalProps, GlobalState, IconProps, InitializedState, InputEventProps, InputEventState, ShowIconProps } from '../../shared/model';
|
|
2
2
|
export type DBSelectDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The description attribute will add a paragraph below the select.
|
|
@@ -35,7 +35,7 @@ export type DBSelectOptionType = {
|
|
|
35
35
|
*/
|
|
36
36
|
value: string | string[] | number;
|
|
37
37
|
};
|
|
38
|
-
export type DBSelectProps = DBSelectDefaultProps & GlobalProps & ClickEventProps<HTMLSelectElement> & ChangeEventProps<HTMLSelectElement> & FocusEventProps<HTMLSelectElement> & InputEventProps<HTMLSelectElement> & FormProps & IconProps & FormMessageProps & ShowIconProps;
|
|
38
|
+
export type DBSelectProps = DBSelectDefaultProps & GlobalProps & ClickEventProps<HTMLSelectElement> & ChangeEventProps<HTMLSelectElement> & FocusEventProps<HTMLSelectElement> & InputEventProps<HTMLSelectElement> & FormProps & IconProps & FormMessageProps & ShowIconProps & FormSizeProps;
|
|
39
39
|
export type DBSelectDefaultState = {
|
|
40
40
|
_placeholderId: string;
|
|
41
41
|
getOptionLabel: (option: DBSelectOptionType) => string;
|
|
@@ -31,6 +31,7 @@ export declare class DBSelect {
|
|
|
31
31
|
label: DBSelectProps["label"];
|
|
32
32
|
disabled: DBSelectProps["disabled"];
|
|
33
33
|
name: DBSelectProps["name"];
|
|
34
|
+
size: DBSelectProps["size"];
|
|
34
35
|
autocomplete: DBSelectProps["autocomplete"];
|
|
35
36
|
options: DBSelectProps["options"];
|
|
36
37
|
placeholder: DBSelectProps["placeholder"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEventProps, ChangeEventState, EmphasisProps, FocusEventProps, FocusEventState, FormCheckProps, FormProps, FormState, GlobalProps, GlobalState, IconAfterProps, IconProps,
|
|
1
|
+
import { ChangeEventProps, ChangeEventState, EmphasisProps, FocusEventProps, FocusEventState, FormCheckProps, FormProps, FormState, GlobalProps, GlobalState, IconAfterProps, IconProps, SizeProps } from '../../shared/model';
|
|
2
2
|
export type DBSwitchDefaultProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Add additional icons to indicate active/inactive state.
|
|
@@ -9,4 +9,4 @@ export type DBSwitchProps = DBSwitchDefaultProps & GlobalProps & ChangeEventProp
|
|
|
9
9
|
export type DBSwitchDefaultState = {
|
|
10
10
|
_checked: boolean;
|
|
11
11
|
};
|
|
12
|
-
export type DBSwitchState = DBSwitchDefaultState & GlobalState & ChangeEventState<HTMLInputElement> & FocusEventState<HTMLInputElement> & FormState
|
|
12
|
+
export type DBSwitchState = DBSwitchDefaultState & GlobalState & ChangeEventState<HTMLInputElement> & FocusEventState<HTMLInputElement> & FormState;
|
|
@@ -7,6 +7,7 @@ import { ChangeEvent, InteractionEvent } from "../../shared/model";
|
|
|
7
7
|
export declare class DBSwitch {
|
|
8
8
|
private _ref;
|
|
9
9
|
id: DBSwitchProps["id"];
|
|
10
|
+
checked: DBSwitchProps["checked"];
|
|
10
11
|
onChange: any;
|
|
11
12
|
change: DBSwitchProps["change"];
|
|
12
13
|
onBlur: any;
|
|
@@ -18,7 +19,7 @@ export declare class DBSwitch {
|
|
|
18
19
|
showLabel: DBSwitchProps["showLabel"];
|
|
19
20
|
emphasis: DBSwitchProps["emphasis"];
|
|
20
21
|
className: DBSwitchProps["className"];
|
|
21
|
-
|
|
22
|
+
value: DBSwitchProps["value"];
|
|
22
23
|
disabled: DBSwitchProps["disabled"];
|
|
23
24
|
describedbyid: DBSwitchProps["describedbyid"];
|
|
24
25
|
validation: DBSwitchProps["validation"];
|
|
@@ -29,7 +30,6 @@ export declare class DBSwitch {
|
|
|
29
30
|
label: DBSwitchProps["label"];
|
|
30
31
|
_id: any;
|
|
31
32
|
_checked: boolean;
|
|
32
|
-
initialized: boolean;
|
|
33
33
|
handleChange(event: ChangeEvent<HTMLInputElement>): void;
|
|
34
34
|
handleBlur(event: InteractionEvent<HTMLInputElement>): void;
|
|
35
35
|
handleFocus(event: InteractionEvent<HTMLInputElement>): void;
|
|
@@ -40,5 +40,6 @@ export declare class DBSwitch {
|
|
|
40
40
|
*/
|
|
41
41
|
private enableAttributePassing;
|
|
42
42
|
componentDidLoad(): void;
|
|
43
|
+
componentDidUpdate(): void;
|
|
43
44
|
render(): any;
|
|
44
45
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DBTabItemProps } from "./model";
|
|
2
|
-
import { ChangeEvent } from "../../shared/model";
|
|
3
2
|
/**
|
|
4
3
|
* @slot children - This is a default/unnamed slot
|
|
5
4
|
|
|
@@ -21,7 +20,7 @@ export declare class DBTabItem {
|
|
|
21
20
|
label: DBTabItemProps["label"];
|
|
22
21
|
initialized: boolean;
|
|
23
22
|
_selected: boolean;
|
|
24
|
-
handleChange(event:
|
|
23
|
+
handleChange(event: any): void;
|
|
25
24
|
/**
|
|
26
25
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
27
26
|
* @param element the ref for the component
|
|
@@ -27,6 +27,14 @@ export type DBTabsDefaultProps = {
|
|
|
27
27
|
* The name of the tab bar, is required for grouping multiple tabs together. Will overwrite names from children.
|
|
28
28
|
*/
|
|
29
29
|
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Informs the user if the current tab index has changed.
|
|
32
|
+
*/
|
|
33
|
+
onIndexChange?: (index?: number) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Informs the user if another tab has been selected.
|
|
36
|
+
*/
|
|
37
|
+
onTabSelect?: (event?: Event) => void;
|
|
30
38
|
/**
|
|
31
39
|
* Provide simple tabs with label + text as content
|
|
32
40
|
*/
|
|
@@ -43,5 +51,6 @@ export type DBTabsDefaultState = {
|
|
|
43
51
|
convertTabs: (tabs?: unknown[] | string | undefined) => DBSimpleTabProps[];
|
|
44
52
|
initTabList: () => void;
|
|
45
53
|
initTabs: (init?: boolean) => void;
|
|
54
|
+
handleChange: (event: any) => void;
|
|
46
55
|
};
|
|
47
56
|
export type DBTabsState = DBTabsDefaultState & GlobalState & InitializedState;
|
|
@@ -12,6 +12,8 @@ export declare class DBTabs {
|
|
|
12
12
|
behavior: DBTabsProps["behavior"];
|
|
13
13
|
initialSelectedMode: DBTabsProps["initialSelectedMode"];
|
|
14
14
|
initialSelectedIndex: DBTabsProps["initialSelectedIndex"];
|
|
15
|
+
onIndexChange: any;
|
|
16
|
+
onTabSelect: any;
|
|
15
17
|
className: DBTabsProps["className"];
|
|
16
18
|
alignment: DBTabsProps["alignment"];
|
|
17
19
|
width: DBTabsProps["width"];
|
|
@@ -27,6 +29,7 @@ export declare class DBTabs {
|
|
|
27
29
|
scroll(left?: boolean): void;
|
|
28
30
|
initTabList(): void;
|
|
29
31
|
initTabs(init?: boolean): void;
|
|
32
|
+
handleChange(event: any): void;
|
|
30
33
|
/**
|
|
31
34
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
32
35
|
* @param element the ref for the component
|
|
@@ -229,6 +229,7 @@ export namespace Components {
|
|
|
229
229
|
"showIcon": DBInputProps["showIcon"];
|
|
230
230
|
"showLabel": DBInputProps["showLabel"];
|
|
231
231
|
"showMessage": DBInputProps["showMessage"];
|
|
232
|
+
"size": DBInputProps["size"];
|
|
232
233
|
"step": DBInputProps["step"];
|
|
233
234
|
"type": DBInputProps["type"];
|
|
234
235
|
"validMessage": DBInputProps["validMessage"];
|
|
@@ -352,6 +353,7 @@ export namespace Components {
|
|
|
352
353
|
"showIcon": DBSelectProps["showIcon"];
|
|
353
354
|
"showLabel": DBSelectProps["showLabel"];
|
|
354
355
|
"showMessage": DBSelectProps["showMessage"];
|
|
356
|
+
"size": DBSelectProps["size"];
|
|
355
357
|
"validMessage": DBSelectProps["validMessage"];
|
|
356
358
|
"validation": DBSelectProps["validation"];
|
|
357
359
|
"value": DBSelectProps["value"];
|
|
@@ -385,6 +387,7 @@ export namespace Components {
|
|
|
385
387
|
"showLabel": DBSwitchProps["showLabel"];
|
|
386
388
|
"size": DBSwitchProps["size"];
|
|
387
389
|
"validation": DBSwitchProps["validation"];
|
|
390
|
+
"value": DBSwitchProps["value"];
|
|
388
391
|
"visualAid": DBSwitchProps["visualAid"];
|
|
389
392
|
}
|
|
390
393
|
interface DbTabItem {
|
|
@@ -538,6 +541,10 @@ export interface DbTabItemCustomEvent<T> extends CustomEvent<T> {
|
|
|
538
541
|
detail: T;
|
|
539
542
|
target: HTMLDbTabItemElement;
|
|
540
543
|
}
|
|
544
|
+
export interface DbTabsCustomEvent<T> extends CustomEvent<T> {
|
|
545
|
+
detail: T;
|
|
546
|
+
target: HTMLDbTabsElement;
|
|
547
|
+
}
|
|
541
548
|
export interface DbTagCustomEvent<T> extends CustomEvent<T> {
|
|
542
549
|
detail: T;
|
|
543
550
|
target: HTMLDbTagElement;
|
|
@@ -876,7 +883,19 @@ declare global {
|
|
|
876
883
|
prototype: HTMLDbTabPanelElement;
|
|
877
884
|
new (): HTMLDbTabPanelElement;
|
|
878
885
|
};
|
|
886
|
+
interface HTMLDbTabsElementEventMap {
|
|
887
|
+
"onIndexChange": any;
|
|
888
|
+
"onTabSelect": any;
|
|
889
|
+
}
|
|
879
890
|
interface HTMLDbTabsElement extends Components.DbTabs, HTMLStencilElement {
|
|
891
|
+
addEventListener<K extends keyof HTMLDbTabsElementEventMap>(type: K, listener: (this: HTMLDbTabsElement, ev: DbTabsCustomEvent<HTMLDbTabsElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
892
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
893
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
894
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
895
|
+
removeEventListener<K extends keyof HTMLDbTabsElementEventMap>(type: K, listener: (this: HTMLDbTabsElement, ev: DbTabsCustomEvent<HTMLDbTabsElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
896
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
897
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
898
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
880
899
|
}
|
|
881
900
|
var HTMLDbTabsElement: {
|
|
882
901
|
prototype: HTMLDbTabsElement;
|
|
@@ -1133,6 +1152,7 @@ declare namespace LocalJSX {
|
|
|
1133
1152
|
"showIcon"?: DBInputProps["showIcon"];
|
|
1134
1153
|
"showLabel"?: DBInputProps["showLabel"];
|
|
1135
1154
|
"showMessage"?: DBInputProps["showMessage"];
|
|
1155
|
+
"size"?: DBInputProps["size"];
|
|
1136
1156
|
"step"?: DBInputProps["step"];
|
|
1137
1157
|
"type"?: DBInputProps["type"];
|
|
1138
1158
|
"validMessage"?: DBInputProps["validMessage"];
|
|
@@ -1267,6 +1287,7 @@ declare namespace LocalJSX {
|
|
|
1267
1287
|
"showIcon"?: DBSelectProps["showIcon"];
|
|
1268
1288
|
"showLabel"?: DBSelectProps["showLabel"];
|
|
1269
1289
|
"showMessage"?: DBSelectProps["showMessage"];
|
|
1290
|
+
"size"?: DBSelectProps["size"];
|
|
1270
1291
|
"validMessage"?: DBSelectProps["validMessage"];
|
|
1271
1292
|
"validation"?: DBSelectProps["validation"];
|
|
1272
1293
|
"value"?: DBSelectProps["value"];
|
|
@@ -1303,6 +1324,7 @@ declare namespace LocalJSX {
|
|
|
1303
1324
|
"showLabel"?: DBSwitchProps["showLabel"];
|
|
1304
1325
|
"size"?: DBSwitchProps["size"];
|
|
1305
1326
|
"validation"?: DBSwitchProps["validation"];
|
|
1327
|
+
"value"?: DBSwitchProps["value"];
|
|
1306
1328
|
"visualAid"?: DBSwitchProps["visualAid"];
|
|
1307
1329
|
}
|
|
1308
1330
|
interface DbTabItem {
|
|
@@ -1339,6 +1361,8 @@ declare namespace LocalJSX {
|
|
|
1339
1361
|
"initialSelectedIndex"?: DBTabsProps["initialSelectedIndex"];
|
|
1340
1362
|
"initialSelectedMode"?: DBTabsProps["initialSelectedMode"];
|
|
1341
1363
|
"name"?: DBTabsProps["name"];
|
|
1364
|
+
"onOnIndexChange"?: (event: DbTabsCustomEvent<any>) => void;
|
|
1365
|
+
"onOnTabSelect"?: (event: DbTabsCustomEvent<any>) => void;
|
|
1342
1366
|
"orientation"?: DBTabsProps["orientation"];
|
|
1343
1367
|
"tabs"?: DBTabsProps["tabs"];
|
|
1344
1368
|
"width"?: DBTabsProps["width"];
|
|
@@ -227,6 +227,12 @@ export type FormTextProps = {
|
|
|
227
227
|
*/
|
|
228
228
|
readOnly?: boolean;
|
|
229
229
|
};
|
|
230
|
+
export type FormSizeProps = {
|
|
231
|
+
/**
|
|
232
|
+
* Size of the control
|
|
233
|
+
*/
|
|
234
|
+
size?: number;
|
|
235
|
+
};
|
|
230
236
|
export type FormCheckProps = {
|
|
231
237
|
/**
|
|
232
238
|
* Define the radio or checkbox elements checked state
|
|
@@ -7,8 +7,6 @@ export type ClassNameArg = string | {
|
|
|
7
7
|
[key: string]: boolean | undefined;
|
|
8
8
|
} | undefined;
|
|
9
9
|
export declare const cls: (...args: ClassNameArg[]) => string;
|
|
10
|
-
export declare const filterPassingProps: (props: Record<string, unknown>, propsPassingFilter: string[]) => Record<string, unknown>;
|
|
11
|
-
export declare const getRootProps: (props: Record<string, unknown>, rooProps: string[]) => Record<string, unknown>;
|
|
12
10
|
export declare const visibleInVX: (el: Element) => boolean;
|
|
13
11
|
export declare const visibleInVY: (el: Element) => boolean;
|
|
14
12
|
export declare const isInView: (el: Element) => {
|
|
@@ -34,8 +32,6 @@ export declare const getBooleanAsString: (originBool?: boolean) => any;
|
|
|
34
32
|
export declare const getHideProp: (show?: boolean) => any;
|
|
35
33
|
export declare const stringPropVisible: (givenString?: string, showString?: boolean) => string | boolean;
|
|
36
34
|
declare const _default: {
|
|
37
|
-
getRootProps: (props: Record<string, unknown>, rooProps: string[]) => Record<string, unknown>;
|
|
38
|
-
filterPassingProps: (props: Record<string, unknown>, propsPassingFilter: string[]) => Record<string, unknown>;
|
|
39
35
|
cls: (...args: ClassNameArg[]) => string;
|
|
40
36
|
addAttributeToChildren: (element: Element, attribute: {
|
|
41
37
|
key: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const filterPassingProps: (props: Record<string, unknown>, propsPassingFilter: string[]) => Record<string, unknown>;
|
|
2
|
+
export declare const getRootProps: (props: Record<string, unknown>, rooProps: string[]) => Record<string, unknown>;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
getRootProps: (props: Record<string, unknown>, rooProps: string[]) => Record<string, unknown>;
|
|
5
|
+
filterPassingProps: (props: Record<string, unknown>, propsPassingFilter: string[]) => Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -411,13 +411,13 @@
|
|
|
411
411
|
"values": []
|
|
412
412
|
},
|
|
413
413
|
{
|
|
414
|
-
"name": "
|
|
415
|
-
"description": "Define
|
|
414
|
+
"name": "indeterminate",
|
|
415
|
+
"description": "Define an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#indeterminate) state of a checkbox",
|
|
416
416
|
"values": []
|
|
417
417
|
},
|
|
418
418
|
{
|
|
419
|
-
"name": "
|
|
420
|
-
"description": "Define
|
|
419
|
+
"name": "checked",
|
|
420
|
+
"description": "Define the radio or checkbox elements checked state",
|
|
421
421
|
"values": []
|
|
422
422
|
},
|
|
423
423
|
{ "name": "change", "values": [{ "name": "functiontype" }] },
|
|
@@ -853,6 +853,7 @@
|
|
|
853
853
|
"description": "Associates the control with a form element",
|
|
854
854
|
"values": []
|
|
855
855
|
},
|
|
856
|
+
{ "name": "size", "description": "Size of the control", "values": [] },
|
|
856
857
|
{
|
|
857
858
|
"name": "autocomplete",
|
|
858
859
|
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete",
|
|
@@ -1265,6 +1266,7 @@
|
|
|
1265
1266
|
"description": "The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.",
|
|
1266
1267
|
"values": []
|
|
1267
1268
|
},
|
|
1269
|
+
{ "name": "size", "description": "Size of the control", "values": [] },
|
|
1268
1270
|
{
|
|
1269
1271
|
"name": "autocomplete",
|
|
1270
1272
|
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete",
|
|
@@ -1355,6 +1357,11 @@
|
|
|
1355
1357
|
"description": "[ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.",
|
|
1356
1358
|
"values": []
|
|
1357
1359
|
},
|
|
1360
|
+
{
|
|
1361
|
+
"name": "checked",
|
|
1362
|
+
"description": "Define the radio or checkbox elements checked state",
|
|
1363
|
+
"values": []
|
|
1364
|
+
},
|
|
1358
1365
|
{ "name": "change", "values": [{ "name": "functiontype" }] },
|
|
1359
1366
|
{ "name": "blur", "values": [{ "name": "functiontype" }] },
|
|
1360
1367
|
{ "name": "focus", "values": [{ "name": "functiontype" }] },
|
|
@@ -1384,8 +1391,8 @@
|
|
|
1384
1391
|
"values": []
|
|
1385
1392
|
},
|
|
1386
1393
|
{
|
|
1387
|
-
"name": "
|
|
1388
|
-
"description": "
|
|
1394
|
+
"name": "value",
|
|
1395
|
+
"description": "The value property is to receive results from the native form element.",
|
|
1389
1396
|
"values": []
|
|
1390
1397
|
},
|
|
1391
1398
|
{
|
|
@@ -2113,7 +2120,7 @@
|
|
|
2113
2120
|
},
|
|
2114
2121
|
{
|
|
2115
2122
|
"name": "db-tabs",
|
|
2116
|
-
"description": "\n---\n\n\n### **Slots:**\n - **children** - default slot",
|
|
2123
|
+
"description": "\n---\n\n\n### **Events:**\n - **onIndexChange**\n- **onTabSelect**\n\n### **Slots:**\n - **children** - default slot",
|
|
2117
2124
|
"attributes": [
|
|
2118
2125
|
{
|
|
2119
2126
|
"name": "id",
|
package/dist/web-types.json
CHANGED
|
@@ -730,13 +730,13 @@
|
|
|
730
730
|
"value": { "type": "boolean" }
|
|
731
731
|
},
|
|
732
732
|
{
|
|
733
|
-
"name": "
|
|
734
|
-
"description": "Define
|
|
733
|
+
"name": "indeterminate",
|
|
734
|
+
"description": "Define an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#indeterminate) state of a checkbox",
|
|
735
735
|
"value": { "type": "boolean" }
|
|
736
736
|
},
|
|
737
737
|
{
|
|
738
|
-
"name": "
|
|
739
|
-
"description": "Define
|
|
738
|
+
"name": "checked",
|
|
739
|
+
"description": "Define the radio or checkbox elements checked state",
|
|
740
740
|
"value": { "type": "boolean" }
|
|
741
741
|
},
|
|
742
742
|
{ "name": "change", "value": { "type": "functiontype" } },
|
|
@@ -827,13 +827,13 @@
|
|
|
827
827
|
"type": "boolean"
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
|
-
"name": "
|
|
831
|
-
"description": "Define
|
|
830
|
+
"name": "indeterminate",
|
|
831
|
+
"description": "Define an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#indeterminate) state of a checkbox",
|
|
832
832
|
"type": "boolean"
|
|
833
833
|
},
|
|
834
834
|
{
|
|
835
|
-
"name": "
|
|
836
|
-
"description": "Define
|
|
835
|
+
"name": "checked",
|
|
836
|
+
"description": "Define the radio or checkbox elements checked state",
|
|
837
837
|
"type": "boolean"
|
|
838
838
|
},
|
|
839
839
|
{ "name": "change", "type": "functiontype" },
|
|
@@ -1442,6 +1442,11 @@
|
|
|
1442
1442
|
"description": "Associates the control with a form element",
|
|
1443
1443
|
"value": { "type": "string" }
|
|
1444
1444
|
},
|
|
1445
|
+
{
|
|
1446
|
+
"name": "size",
|
|
1447
|
+
"description": "Size of the control",
|
|
1448
|
+
"value": { "type": "number" }
|
|
1449
|
+
},
|
|
1445
1450
|
{
|
|
1446
1451
|
"name": "autocomplete",
|
|
1447
1452
|
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete",
|
|
@@ -1618,6 +1623,11 @@
|
|
|
1618
1623
|
"description": "Associates the control with a form element",
|
|
1619
1624
|
"type": "string"
|
|
1620
1625
|
},
|
|
1626
|
+
{
|
|
1627
|
+
"name": "size",
|
|
1628
|
+
"description": "Size of the control",
|
|
1629
|
+
"type": "number"
|
|
1630
|
+
},
|
|
1621
1631
|
{
|
|
1622
1632
|
"name": "autocomplete",
|
|
1623
1633
|
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete",
|
|
@@ -2198,6 +2208,11 @@
|
|
|
2198
2208
|
"description": "The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.",
|
|
2199
2209
|
"value": { "type": "string" }
|
|
2200
2210
|
},
|
|
2211
|
+
{
|
|
2212
|
+
"name": "size",
|
|
2213
|
+
"description": "Size of the control",
|
|
2214
|
+
"value": { "type": "number" }
|
|
2215
|
+
},
|
|
2201
2216
|
{
|
|
2202
2217
|
"name": "autocomplete",
|
|
2203
2218
|
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete",
|
|
@@ -2315,6 +2330,11 @@
|
|
|
2315
2330
|
"description": "The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.",
|
|
2316
2331
|
"type": "string"
|
|
2317
2332
|
},
|
|
2333
|
+
{
|
|
2334
|
+
"name": "size",
|
|
2335
|
+
"description": "Size of the control",
|
|
2336
|
+
"type": "number"
|
|
2337
|
+
},
|
|
2318
2338
|
{
|
|
2319
2339
|
"name": "autocomplete",
|
|
2320
2340
|
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete",
|
|
@@ -2364,6 +2384,11 @@
|
|
|
2364
2384
|
"description": "[ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.",
|
|
2365
2385
|
"value": { "type": "string" }
|
|
2366
2386
|
},
|
|
2387
|
+
{
|
|
2388
|
+
"name": "checked",
|
|
2389
|
+
"description": "Define the radio or checkbox elements checked state",
|
|
2390
|
+
"value": { "type": "boolean" }
|
|
2391
|
+
},
|
|
2367
2392
|
{ "name": "change", "value": { "type": "functiontype" } },
|
|
2368
2393
|
{ "name": "blur", "value": { "type": "functiontype" } },
|
|
2369
2394
|
{ "name": "focus", "value": { "type": "functiontype" } },
|
|
@@ -2393,9 +2418,9 @@
|
|
|
2393
2418
|
"value": { "type": "string" }
|
|
2394
2419
|
},
|
|
2395
2420
|
{
|
|
2396
|
-
"name": "
|
|
2397
|
-
"description": "
|
|
2398
|
-
"value": { "type": "
|
|
2421
|
+
"name": "value",
|
|
2422
|
+
"description": "The value property is to receive results from the native form element.",
|
|
2423
|
+
"value": { "type": "any" }
|
|
2399
2424
|
},
|
|
2400
2425
|
{
|
|
2401
2426
|
"name": "disabled",
|
|
@@ -2451,6 +2476,11 @@
|
|
|
2451
2476
|
"description": "[ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.",
|
|
2452
2477
|
"type": "string"
|
|
2453
2478
|
},
|
|
2479
|
+
{
|
|
2480
|
+
"name": "checked",
|
|
2481
|
+
"description": "Define the radio or checkbox elements checked state",
|
|
2482
|
+
"type": "boolean"
|
|
2483
|
+
},
|
|
2454
2484
|
{ "name": "change", "type": "functiontype" },
|
|
2455
2485
|
{ "name": "blur", "type": "functiontype" },
|
|
2456
2486
|
{ "name": "focus", "type": "functiontype" },
|
|
@@ -2480,9 +2510,9 @@
|
|
|
2480
2510
|
"type": "string"
|
|
2481
2511
|
},
|
|
2482
2512
|
{
|
|
2483
|
-
"name": "
|
|
2484
|
-
"description": "
|
|
2485
|
-
"type": "
|
|
2513
|
+
"name": "value",
|
|
2514
|
+
"description": "The value property is to receive results from the native form element.",
|
|
2515
|
+
"type": "any"
|
|
2486
2516
|
},
|
|
2487
2517
|
{
|
|
2488
2518
|
"name": "disabled",
|
|
@@ -2525,8 +2555,7 @@
|
|
|
2525
2555
|
"type": "string"
|
|
2526
2556
|
},
|
|
2527
2557
|
{ "name": "_id" },
|
|
2528
|
-
{ "name": "_checked", "type": "boolean" }
|
|
2529
|
-
{ "name": "initialized", "type": "boolean" }
|
|
2558
|
+
{ "name": "_checked", "type": "boolean" }
|
|
2530
2559
|
],
|
|
2531
2560
|
"events": [
|
|
2532
2561
|
{ "name": "onChange", "type": "any" },
|
|
@@ -3757,7 +3786,7 @@
|
|
|
3757
3786
|
},
|
|
3758
3787
|
{
|
|
3759
3788
|
"name": "db-tabs",
|
|
3760
|
-
"description": "\n---\n\n\n### **Slots:**\n - **children** - default slot",
|
|
3789
|
+
"description": "\n---\n\n\n### **Events:**\n - **onIndexChange**\n- **onTabSelect**\n\n### **Slots:**\n - **children** - default slot",
|
|
3761
3790
|
"doc-url": "https://db-ux-design-system.github.io/core-web/review/main/components/tabs/properties",
|
|
3762
3791
|
"attributes": [
|
|
3763
3792
|
{
|
|
@@ -3817,7 +3846,10 @@
|
|
|
3817
3846
|
}
|
|
3818
3847
|
],
|
|
3819
3848
|
"slots": [{ "name": "children", "description": "default slot" }],
|
|
3820
|
-
"events": [
|
|
3849
|
+
"events": [
|
|
3850
|
+
{ "name": "onIndexChange", "type": "any" },
|
|
3851
|
+
{ "name": "onTabSelect", "type": "any" }
|
|
3852
|
+
],
|
|
3821
3853
|
"js": {
|
|
3822
3854
|
"properties": [
|
|
3823
3855
|
{
|
|
@@ -3882,7 +3914,10 @@
|
|
|
3882
3914
|
{ "name": "showScrollRight", "type": "boolean" },
|
|
3883
3915
|
{ "name": "scrollContainer", "type": "null" }
|
|
3884
3916
|
],
|
|
3885
|
-
"events": [
|
|
3917
|
+
"events": [
|
|
3918
|
+
{ "name": "onIndexChange", "type": "any" },
|
|
3919
|
+
{ "name": "onTabSelect", "type": "any" }
|
|
3920
|
+
]
|
|
3886
3921
|
}
|
|
3887
3922
|
},
|
|
3888
3923
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/wc-core-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Stencil components for @db-ux/core-components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"web-types": "./dist/web-types.json",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@db-ux/core-components": "1.
|
|
46
|
-
"@db-ux/core-foundations": "1.
|
|
45
|
+
"@db-ux/core-components": "1.1.0",
|
|
46
|
+
"@db-ux/core-foundations": "1.1.0"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"index-c0df827d.js","mappings":";;MAAa,IAAI,GAAG;;IAClB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,IAAI,MAAA,MAAM,CAAC,MAAM,0CAAE,UAAU,EAAE;YAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;SACnC;aAAM,IAAI,MAAA,MAAM,CAAC,MAAM,0CAAE,eAAe,EAAE;YACzC,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAA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M;QACL,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;KACvC;IACD,OAAO,eAAe,CAAC;AACzB,EAAE;MACW,gBAAgB,GAAG,CAAC,KAAc,KAAwB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC7I,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;MACrC,YAAY,GAAG,MAAe,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;MAC3H,KAAK,GAAG,CAAC,EAAc,EAAE,EAAU,KAAK,IAAI,OAAO,CAAC,MAAM,UAAU,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;AAE3F;;;;;AAKA;MACa,kBAAkB,GAAG,CAAC,UAAoB;IACrD,IAAI,UAAU,EAAE;QACd,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;KAC3B;IACD,OAAO,UAAU,CAAC;AACpB,EAAE;AAEF;MACa,WAAW,GAAG,CAAC,IAAc;IACxC,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE;QACvC,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC;AACnC,EAAE;MACW,iBAAiB,GAAG,CAAC,WAAoB,EAAE,UAAoB;IAC1E,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,OAAO,CAAC,CAAC,WAAW,CAAC;KACtB;SAAM;QACL,OAAO,UAAU,IAAI,WAAW,CAAC;KAClC;AACH;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/index.ts"],"sourcesContent":["export const uuid = () => {\n if (typeof window !== 'undefined') {\n if (window.crypto?.randomUUID) {\n return window.crypto.randomUUID();\n } else if (window.crypto?.getRandomValues) {\n return window.crypto.getRandomValues(new Uint32Array(3)).join('-');\n }\n }\n return Math.random().toString().substring(2);\n};\nexport const addAttributeToChildren = (element: Element, attribute: {\n key: string;\n value: string;\n}) => {\n const children = element.children;\n Object.values(children).forEach((child: Element) => {\n child.setAttribute(attribute.key, attribute.value);\n if (child.children.length > 0) {\n addAttributeToChildren(child, attribute);\n }\n });\n};\nexport type ClassNameArg = string | {\n [key: string]: boolean | undefined;\n} | undefined;\nexport const cls = (...args: ClassNameArg[]) => {\n let result = '';\n for (const arg of args) {\n if (arg) {\n if (typeof arg === 'string') {\n result += `${arg} `;\n } else {\n for (const key in arg) {\n if (arg[key]) {\n result += `${key} `;\n }\n }\n }\n }\n }\n return result.trim();\n};\nconst reactHtmlAttributes = ['suppressHydrationWarning', 'suppressContentEditableWarning', 'translate', 'title', 'tabIndex', 'style', 'spellCheck', 'nonce', 'lang', 'hidden', 'draggable', 'dir', 'contextMenu', 'contentEditable', 'autoFocus', 'accessKey', 'is', 'inputMode', 'unselectable', 'security', 'results', 'vocab', 'typeof', 'rev', 'resource', 'rel', 'property', 'inlist', 'datatype', 'content', 'about', 'role', 'radioGroup', 'color'];\nexport const filterPassingProps = (props: Record<string, unknown>, propsPassingFilter: string[]): Record<string, unknown> => Object.keys(props).filter(key => (key.startsWith('data-') || key.startsWith('aria-') || key.startsWith('default') || key.startsWith('auto') || key.startsWith('item') || key.startsWith('on') || reactHtmlAttributes.includes(key)) && !propsPassingFilter.includes(key)).reduce((obj: Record<string, unknown>, key: string) => {\n return {\n ...obj,\n [key]: props[key]\n };\n}, {});\nexport const getRootProps = (props: Record<string, unknown>, rooProps: string[]): Record<string, unknown> => {\n return Object.keys(props).filter(key => rooProps.includes(key)).reduce((obj: Record<string, unknown>, key: string) => {\n return {\n ...obj,\n [key]: props[key]\n };\n }, {});\n};\nexport const visibleInVX = (el: Element) => {\n const {\n left,\n right\n } = el.getBoundingClientRect();\n const {\n innerWidth\n } = window;\n return left >= 0 && right <= innerWidth;\n};\nexport const visibleInVY = (el: Element) => {\n const {\n top,\n bottom\n } = el.getBoundingClientRect();\n const {\n innerHeight\n } = window;\n return top >= 0 && bottom <= innerHeight;\n};\nexport const isInView = (el: Element) => {\n const {\n top,\n bottom,\n left,\n right\n } = el.getBoundingClientRect();\n const {\n innerHeight,\n innerWidth\n } = window;\n let outTop = top < 0;\n let outBottom = bottom > innerHeight;\n let outLeft = left < 0;\n let outRight = right > innerWidth;\n\n // We need to check if it was already outside\n const outsideY = el.hasAttribute('data-outside-vy');\n const outsideX = el.hasAttribute('data-outside-vx');\n const parentRect = el?.parentElement?.getBoundingClientRect();\n if (parentRect) {\n if (outsideY) {\n const position = el.getAttribute('data-outside-vy');\n if (position === 'top') {\n outTop = parentRect.top - (bottom - parentRect.bottom) < 0;\n } else {\n outBottom = parentRect.bottom + (parentRect.top - top) > innerHeight;\n }\n }\n if (outsideX) {\n const position = el.getAttribute('data-outside-vx');\n if (position === 'left') {\n outLeft = parentRect.left - (right - parentRect.right) < 0;\n } else {\n outRight = parentRect.right + (parentRect.left - left) > innerWidth;\n }\n }\n }\n return {\n outTop,\n outBottom,\n outLeft,\n outRight\n };\n};\nexport interface DBDataOutsidePair {\n vx?: 'left' | 'right';\n vy?: 'top' | 'bottom';\n}\nexport const handleDataOutside = (el: Element): DBDataOutsidePair => {\n const {\n outTop,\n outBottom,\n outLeft,\n outRight\n } = isInView(el);\n let dataOutsidePair: DBDataOutsidePair = {};\n if (outTop || outBottom) {\n dataOutsidePair = {\n vy: outTop ? 'top' : 'bottom'\n };\n el.setAttribute('data-outside-vy', dataOutsidePair.vy!);\n } else {\n el.removeAttribute('data-outside-vy');\n }\n if (outLeft || outRight) {\n dataOutsidePair = {\n ...dataOutsidePair,\n vx: outRight ? 'right' : 'left'\n };\n el.setAttribute('data-outside-vx', dataOutsidePair.vx!);\n } else {\n el.removeAttribute('data-outside-vx');\n }\n return dataOutsidePair;\n};\nexport const isArrayOfStrings = (value: unknown): value is string[] => Array.isArray(value) && value.every(item => typeof item === 'string');\nconst appleOs = ['Mac', 'iPhone', 'iPad', 'iPod'];\nexport const hasVoiceOver = (): boolean => typeof window !== 'undefined' && appleOs.some(os => window.navigator.userAgent.includes(os));\nexport const delay = (fn: () => void, ms: number) => new Promise(() => setTimeout(fn, ms));\n\n/**\n * Some frameworks like stencil would not add \"true\" as value for a prop\n * if it is used in a framework like angular e.g.: [disabled]=\"myDisabledProp\"\n * @param originBool Some boolean to convert to string\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getBooleanAsString = (originBool?: boolean): any => {\n if (originBool) {\n return String(originBool);\n }\n return originBool;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getHideProp = (show?: boolean): any => {\n if (show === undefined || show === null) {\n return undefined;\n }\n return getBooleanAsString(!show);\n};\nexport const stringPropVisible = (givenString?: string, showString?: boolean) => {\n if (showString === undefined) {\n return !!givenString;\n } else {\n return showString && givenString;\n }\n};\nexport default {\n getRootProps,\n filterPassingProps,\n cls,\n addAttributeToChildren,\n uuid,\n visibleInVX,\n visibleInVY,\n isInView,\n handleDataOutside,\n isArrayOfStrings,\n hasVoiceOver,\n delay,\n getBooleanAsString,\n getHideProp,\n stringPropVisible\n}"],"version":3}
|