@mozaic-ds/web-components 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/public/ClickOutside-63071e7a.js +1 -15
- package/public/ClickOutside-63071e7a.js.map +1 -1
- package/public/DataTableDefaultAction.nested-4da4dc44.js +1 -759
- package/public/DataTableDefaultAction.nested-4da4dc44.js.map +1 -1
- package/public/DataTableUtilities-60220c78.js +1 -370
- package/public/DataTableUtilities-60220c78.js.map +1 -1
- package/public/EventForward-8492ff62.js +1 -109
- package/public/EventForward-8492ff62.js.map +1 -1
- package/public/EventHandler-02058705.js +1 -15
- package/public/EventHandler-02058705.js.map +1 -1
- package/public/adeo/components/checkbox/Checkbox.js +1 -1
- package/public/adeo/components/checkbox/Checkbox.js.map +1 -1
- package/public/adeo/components/checkbox/Checkbox.svelte +2 -2
- package/public/adeo/components/datatable/DataTable.js +1 -1
- package/public/adeo/components/datatable/DataTable.js.map +1 -1
- package/public/adeo/components/datatable/DataTable.svelte +18 -18
- package/public/adeo/components/fileuploader/FileUploader.js +1 -1
- package/public/adeo/components/fileuploader/FileUploader.js.map +1 -1
- package/public/adeo/components/fileuploader/FileUploader.svelte +8 -5
- package/public/adeo/components/fileuploader/ResultFile.nested.js +1 -1
- package/public/adeo/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/adeo/components/layer/Layer.js +1 -1
- package/public/adeo/components/layer/Layer.js.map +1 -1
- package/public/adeo/components/layer/Layer.svelte +2 -1
- package/public/adeo/components/link/Link.js +1 -1
- package/public/adeo/components/link/Link.js.map +1 -1
- package/public/adeo/components/link/Link.svelte +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.svelte +72 -9
- package/public/adeo/components/quantityselector/QuantitySelector.js +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/adeo/components/resultfile/ResultFile.nested.svelte +1 -1
- package/public/array-5b770a93.js +1 -13
- package/public/array-5b770a93.js.map +1 -1
- package/public/axis-fbc0f7b5.js +1 -174
- package/public/axis-fbc0f7b5.js.map +1 -1
- package/public/band-d7a07d2c.js +1 -186
- package/public/band-d7a07d2c.js.map +1 -1
- package/public/bricoman/components/chart/Donut.js +1 -1
- package/public/bricoman/components/checkbox/Checkbox.js +1 -1
- package/public/bricoman/components/checkbox/Checkbox.js.map +1 -1
- package/public/bricoman/components/checkbox/Checkbox.svelte +2 -2
- package/public/bricoman/components/datatable/DataTable.js +1 -1
- package/public/bricoman/components/datatable/DataTable.js.map +1 -1
- package/public/bricoman/components/datatable/DataTable.svelte +18 -18
- package/public/bricoman/components/fileuploader/FileUploader.js +1 -1
- package/public/bricoman/components/fileuploader/FileUploader.js.map +1 -1
- package/public/bricoman/components/fileuploader/FileUploader.svelte +8 -5
- package/public/bricoman/components/fileuploader/ResultFile.nested.js +1 -1
- package/public/bricoman/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/bricoman/components/header/Header.js +1 -1
- package/public/bricoman/components/hero/Hero.js +1 -1
- package/public/bricoman/components/layer/Layer.js +1 -1
- package/public/bricoman/components/layer/Layer.js.map +1 -1
- package/public/bricoman/components/layer/Layer.svelte +2 -1
- package/public/bricoman/components/link/Link.js +1 -1
- package/public/bricoman/components/link/Link.js.map +1 -1
- package/public/bricoman/components/link/Link.svelte +1 -1
- package/public/bricoman/components/listbox/Listbox.js +1 -1
- package/public/bricoman/components/listbox/Listbox.nested.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.svelte +72 -9
- package/public/bricoman/components/price/Price.js +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.js +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/bricoman/components/resultfile/ResultFile.nested.svelte +1 -1
- package/public/components/accordion/Accordion.js +1 -365
- package/public/components/accordion/Accordion.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.js +1 -1515
- package/public/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/components/badge/Badge.js +1 -155
- package/public/components/badge/Badge.js.map +1 -1
- package/public/components/badge/Badge.nested.js +1 -101
- package/public/components/badge/Badge.nested.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.js +1 -372
- package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js +1 -319
- package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/components/button/Button.js +1 -1138
- package/public/components/button/Button.js.map +1 -1
- package/public/components/card/Card.js +1 -369
- package/public/components/card/Card.js.map +1 -1
- package/public/components/chart/BarChart.js +1 -582
- package/public/components/chart/BarChart.js.map +1 -1
- package/public/components/chart/Donut.js +1 -1189
- package/public/components/chart/Donut.js.map +1 -1
- package/public/components/chart/GroupedBarChart.js +1 -750
- package/public/components/chart/GroupedBarChart.js.map +1 -1
- package/public/components/chart/LineChart.js +1 -1731
- package/public/components/chart/LineChart.js.map +1 -1
- package/public/components/chart/Radar.js +1 -729
- package/public/components/chart/Radar.js.map +1 -1
- package/public/components/chart/StackedBarChart.js +1 -745
- package/public/components/chart/StackedBarChart.js.map +1 -1
- package/public/components/checkbox/Checkbox.js +1 -307
- package/public/components/checkbox/Checkbox.js.map +1 -1
- package/public/components/checkbox/Checkbox.svelte +2 -2
- package/public/components/checkboxgroup/checkboxGroup.js +1 -404
- package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
- package/public/components/datatable/DataTable.js +1 -3064
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTable.svelte +18 -18
- package/public/components/datatable/DataTableDefaultAction.nested.js +1 -4
- package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -164
- package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -380
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -424
- package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +1 -263
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
- package/public/components/datatable/DataTableFooter.nested.js +1 -637
- package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
- package/public/components/dropdown/Dropdown.js +1 -1426
- package/public/components/dropdown/Dropdown.js.map +1 -1
- package/public/components/field/Field.js +1 -375
- package/public/components/field/Field.js.map +1 -1
- package/public/components/fileuploader/FileUploader.js +1 -555
- package/public/components/fileuploader/FileUploader.js.map +1 -1
- package/public/components/fileuploader/FileUploader.svelte +8 -5
- package/public/components/fileuploader/ResultFile.nested.js +1 -265
- package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/components/flag/Flag.js +1 -174
- package/public/components/flag/Flag.js.map +1 -1
- package/public/components/header/Header.js +1 -903
- package/public/components/header/Header.js.map +1 -1
- package/public/components/hero/Hero.js +1 -271
- package/public/components/hero/Hero.js.map +1 -1
- package/public/components/layer/Layer.js +1 -453
- package/public/components/layer/Layer.js.map +1 -1
- package/public/components/layer/Layer.svelte +2 -1
- package/public/components/link/Link.js +1 -380
- package/public/components/link/Link.js.map +1 -1
- package/public/components/link/Link.svelte +1 -1
- package/public/components/listbox/Listbox.js +1 -595
- package/public/components/listbox/Listbox.js.map +1 -1
- package/public/components/listbox/Listbox.nested.js +1 -629
- package/public/components/listbox/Listbox.nested.js.map +1 -1
- package/public/components/loader/Loader.js +1 -246
- package/public/components/loader/Loader.js.map +1 -1
- package/public/components/loader/Loader.nested.js +1 -176
- package/public/components/loader/Loader.nested.js.map +1 -1
- package/public/components/modal/Modal.js +1 -395
- package/public/components/modal/Modal.js.map +1 -1
- package/public/components/notification/Notification.js +1 -458
- package/public/components/notification/Notification.js.map +1 -1
- package/public/components/optionbutton/OptionButton.js +1 -316
- package/public/components/optionbutton/OptionButton.js.map +1 -1
- package/public/components/overlay/Overlay.js +1 -104
- package/public/components/overlay/Overlay.js.map +1 -1
- package/public/components/overlay/OverlayLoader.js +1 -151
- package/public/components/overlay/OverlayLoader.js.map +1 -1
- package/public/components/pagination/Pagination.js +1 -613
- package/public/components/pagination/Pagination.js.map +1 -1
- package/public/components/passwordinput/PasswordInput.js +1 -291
- package/public/components/passwordinput/PasswordInput.js.map +1 -1
- package/public/components/phonenumber/PhoneNumber.js +1 -6894
- package/public/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/components/price/Price.js +1 -768
- package/public/components/price/Price.js.map +1 -1
- package/public/components/progressbar/ProgressBar.js +1 -278
- package/public/components/progressbar/ProgressBar.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.js +1 -333
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/components/radio/Radio.js +1 -273
- package/public/components/radio/Radio.js.map +1 -1
- package/public/components/radiogroup/RadioGroup.js +1 -414
- package/public/components/radiogroup/RadioGroup.js.map +1 -1
- package/public/components/ratings/StarsInput.js +1 -292
- package/public/components/ratings/StarsInput.js.map +1 -1
- package/public/components/ratings/StarsResult.js +1 -246
- package/public/components/ratings/StarsResult.js.map +1 -1
- package/public/components/resultfile/ResultFile.nested.svelte +1 -1
- package/public/components/select/Select.js +1 -451
- package/public/components/select/Select.js.map +1 -1
- package/public/components/sidebar/Sidebar.js +1 -784
- package/public/components/sidebar/Sidebar.js.map +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js +1 -594
- package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-feature.nested.js +1 -402
- package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-section.nested.js +1 -394
- package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js +1 -200
- package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-separator.nested.js +1 -49
- package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js +1 -312
- package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-user.nested.js +1 -733
- package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
- package/public/components/stepper/Stepper.js +1 -371
- package/public/components/stepper/Stepper.js.map +1 -1
- package/public/components/tabs/Tabs.js +1 -615
- package/public/components/tabs/Tabs.js.map +1 -1
- package/public/components/tabs/Tabs.nested.js +1 -472
- package/public/components/tabs/Tabs.nested.js.map +1 -1
- package/public/components/tag/Tag.js +1 -665
- package/public/components/tag/Tag.js.map +1 -1
- package/public/components/tag/Tag.nested.js +1 -554
- package/public/components/tag/Tag.nested.js.map +1 -1
- package/public/components/taglist/TagList.js +1 -475
- package/public/components/taglist/TagList.js.map +1 -1
- package/public/components/textarea/Textarea.js +1 -303
- package/public/components/textarea/Textarea.js.map +1 -1
- package/public/components/textinput/Textinput.js +1 -497
- package/public/components/textinput/Textinput.js.map +1 -1
- package/public/components/textinput/Textinput.nested.js +1 -320
- package/public/components/textinput/Textinput.nested.js.map +1 -1
- package/public/components/toggle/Toggle.js +1 -278
- package/public/components/toggle/Toggle.js.map +1 -1
- package/public/components/tooltip/Tooltip.js +1 -173
- package/public/components/tooltip/Tooltip.js.map +1 -1
- package/public/index-c33b3772.js +1 -873
- package/public/index-c33b3772.js.map +1 -1
- package/public/linear-f46d7e9e.js +1 -700
- package/public/linear-f46d7e9e.js.map +1 -1
- package/public/path-1b5da959.js +1 -186
- package/public/path-1b5da959.js.map +1 -1
- package/public/sidebar-service-275bf9ef.js +1 -129
- package/public/sidebar-service-275bf9ef.js.map +1 -1
- package/public/symbol-b05a6e2b.js +1 -169
- package/public/symbol-b05a6e2b.js.map +1 -1
- package/public/transform-15d69d5d.js +1 -2743
- package/public/transform-15d69d5d.js.map +1 -1
- package/public/utilities/stories/fileuploader/FileUploader.stories.d.ts.map +1 -1
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","sources":["../../../src/components/sidebar/Sidebar.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onDestroy } from 'svelte';\n import Segment from './sidebar-segment.nested.svelte';\n import Section from './sidebar-section.nested.svelte';\n import NavigationUser from './sidebar-user.nested.svelte';\n import NavigationSeparator from './sidebar-separator.nested.svelte';\n import { EventHandler } from '../../utilities/EventHandler';\n import {\n selectFeature,\n updateSidebarData,\n toggleSidebar,\n isSidebarOpen,\n sidebar,\n selectedFeature,\n } from './sidebar-service';\n import type { Unsubscriber } from 'svelte/store';\n import type { A11yLabels, Sidebar, User } from './sidebar.types';\n\n export let data: string | Sidebar;\n export let open: boolean;\n export let code: string;\n export let user: string | User;\n export let a11yLabels: A11yLabels;\n let eventHandler = new EventHandler();\n let parsedUser: User;\n let previousCode: string;\n let previousData: string | Sidebar;\n let previousOpen = false;\n\n $: updateData(code, data);\n $: updateOpen(open);\n $: parsedUser = typeof user === 'string' ? (JSON.parse(user) as User) : user;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n function updateData(newCode: string, newData: string | Sidebar) {\n if (typeof previousData !== typeof newData || previousData !== newData) {\n previousData = newData;\n updateSidebarData(newData);\n }\n if (typeof previousCode !== typeof newCode || previousCode !== newCode) {\n previousCode = newCode;\n selectFeature(newCode);\n }\n }\n\n function updateOpen(newOpenStatus?: boolean) {\n if (\n typeof previousOpen !== typeof newOpenStatus ||\n previousOpen !== newOpenStatus\n ) {\n previousOpen = Boolean(newOpenStatus);\n toggleSidebar(Boolean(newOpenStatus));\n }\n }\n\n const unsubscribes: Unsubscriber[] = [];\n unsubscribes.push(\n isSidebarOpen.subscribe((state) => {\n eventHandler.dispatch('on-toggle', state);\n }),\n );\n\n unsubscribes.push(\n selectedFeature.subscribe((selection) => {\n // Emit an event and close the menu when the selection changes.\n if (selection) {\n toggleSidebar(false);\n eventHandler.dispatch(\n 'on-select',\n selection.lv2?.code ?? selection.lv1?.code ?? selection.lv0?.code,\n );\n }\n }),\n );\n\n onDestroy(() => {\n for (const unsubscribe of unsubscribes) {\n unsubscribe();\n }\n });\n</script>\n\n<nav\n class=\"mc-sidebar {$isSidebarOpen ? 'is-open' : 'is-close'}\"\n aria-expanded={$isSidebarOpen}\n aria-labelledby=\"mc-sidebar__trigger\"\n {...attributes}\n>\n <div class=\"mc-sidebar__container {parsedUser ? 'has-bottom-panel' : ''}\">\n <button\n id=\"mc-sidebar__trigger\"\n class=\"mc-sidebar__trigger\"\n aria-label={$isSidebarOpen\n ? a11yLabels?.['close'] || 'Close the sidebar'\n : a11yLabels?.['open'] || 'Open the sidebar'}\n on:click={() => toggleSidebar()}\n >\n <span class=\"mc-sidebar__trigger__container\">\n {#if $isSidebarOpen}\n <svg\n class=\"mc-sidebar__trigger-icon\"\n width=\"24px\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n ><path\n d=\"M10.707 5.707a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L4.414 12l6.293-6.293zm9 0a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L13.414 12l6.293-6.293z\"\n /></svg\n >\n {:else}\n <svg\n class=\"mc-sidebar__trigger-icon\"\n width=\"24px\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n ><path\n d=\"M5.707 4.293a1 1 0 00-1.414 1.414L10.586 12l-6.293 6.293a1 1 0 101.414 1.414l7-7a1 1 0 000-1.414l-7-7zm9 0a1 1 0 10-1.414 1.414L19.586 12l-6.293 6.293a1 1 0 001.414 1.414l7-7a1 1 0 000-1.414l-7-7z\"\n /></svg\n >\n {/if}\n </span>\n </button>\n <Segment data={$sidebar?.HOME} />\n <NavigationSeparator />\n <Section data={$sidebar?.FEATURES} {a11yLabels} />\n {#if $sidebar?.UTILITIES}\n <div class=\"mc-sidebar__utilities\">\n {#each $sidebar?.UTILITIES as section}\n <NavigationSeparator />\n <ul>\n {#each section as feature}\n <li class=\"mc-sidebar__utilities__item\">\n <Segment data={feature} />\n </li>\n {/each}\n </ul>\n {/each}\n </div>\n {/if}\n </div>\n {#if parsedUser}\n <NavigationUser\n user={parsedUser}\n data={$sidebar?.USER_FEATURES}\n {a11yLabels}\n />\n {/if}\n</nav>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import './sidebar-variables';\n\n .mc-sidebar {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 10;\n font-size: 14px;\n color: white;\n box-sizing: border-box;\n fill: $color-sidebar-icon;\n width: 320px;\n background: $color-sidebar-background;\n display: block;\n height: 100vh;\n\n &__container {\n height: 100%;\n display: flex;\n flex-direction: column;\n &.has-bottom-panel {\n height: calc(100% - 88px);\n }\n }\n\n &__utilities {\n margin-bottom: 24px;\n\n &__item {\n margin: 4px 0px;\n &:first-child {\n margin-top: 0;\n }\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n &__trigger {\n cursor: pointer;\n background: none;\n border: none;\n padding: 0;\n margin: 28px 0;\n min-height: 38px;\n width: 100%;\n font-size: inherit;\n font-family: inherit;\n\n &-icon {\n fill: $color-sidebar-icon;\n }\n\n &__container {\n height: 38px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > * {\n width: 24px;\n height: 24px;\n }\n }\n\n &:hover &__container {\n background: $color-sidebar-feature-hover-background;\n }\n\n &:focus-visible {\n box-shadow: none;\n border: none;\n outline: none;\n\n & .mc-sidebar__trigger__container {\n box-shadow: none;\n border: none;\n border-radius: 6px;\n outline: 1px solid #0b96cc;\n }\n }\n }\n\n &.is-open {\n @include transition(width 300ms ease-in-out);\n\n .mc-sidebar__trigger__container {\n @include transition(\n width 300ms ease-in-out,\n margin-left 300ms ease-in-out,\n border-radius 300ms ease-in-out\n );\n margin-left: 266px;\n width: 38px;\n border-radius: 4px;\n }\n }\n\n &.is-close {\n @include transition(width 300ms ease-in-out);\n\n width: 64px;\n padding: 0;\n\n .mc-sidebar__trigger__container {\n @include transition(\n width 300ms ease-in-out,\n margin-left 300ms ease-in-out,\n border-radius 300ms ease-in-out\n );\n margin-left: 0px;\n width: 64px;\n border-radius: 0px;\n }\n }\n\n ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n }\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHU,MAQA,CAAA,MAAA,EAAA,GAAA,EAAA,MAAA,CAAA,CAAA;GAHG,MAEC,CAAA,GAAA,EAAA,IAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;GAjBJ,MAQA,CAAA,MAAA,EAAA,GAAA,EAAA,MAAA,CAAA,CAAA;GAHG,MAEC,CAAA,GAAA,EAAA,IAAA,CAAA,CAAA;;;;;;;;;;;;AAoBC,CAAA,IAAA,UAAA,gBAAA,GAAQ,KAAE,SAAS,CAAA;;;gCAAxB,MAAI,EAAA,CAAA,IAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;;GADR,MAWK,CAAA,MAAA,EAAA,GAAA,EAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;AAVI,IAAA,UAAA,gBAAA,GAAQ,KAAE,SAAS,CAAA;;;+BAAxB,MAAI,EAAA,CAAA,IAAA,CAAA,EAAA;;;;;;;;;;;;;;;;wBAAJ,MAAI,EAAA,CAAA,GAAA,WAAA,CAAA,MAAA,EAAA,CAAA,IAAA,CAA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AAA,EAAA,UAAU,GAAU,OAAA,IAAI,KAAK,QAAQ,GAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAa,IAAI,CAAA,CAAA;;;AAC5E,kBAAG,UAAU,GAAf,MAAA,CAAA,MAAA,KAAuB,WAAW,CAAA,CAAA,CAAA;;;GAC/B,OAAS,UAAU,CAAC,KAAK,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Sidebar.js","sources":["../../../src/components/sidebar/Sidebar.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onDestroy } from 'svelte';\n import Segment from './sidebar-segment.nested.svelte';\n import Section from './sidebar-section.nested.svelte';\n import NavigationUser from './sidebar-user.nested.svelte';\n import NavigationSeparator from './sidebar-separator.nested.svelte';\n import { EventHandler } from '../../utilities/EventHandler';\n import {\n selectFeature,\n updateSidebarData,\n toggleSidebar,\n isSidebarOpen,\n sidebar,\n selectedFeature,\n } from './sidebar-service';\n import type { Unsubscriber } from 'svelte/store';\n import type { A11yLabels, Sidebar, User } from './sidebar.types';\n\n export let data: string | Sidebar;\n export let open: boolean;\n export let code: string;\n export let user: string | User;\n export let a11yLabels: A11yLabels;\n let eventHandler = new EventHandler();\n let parsedUser: User;\n let previousCode: string;\n let previousData: string | Sidebar;\n let previousOpen = false;\n\n $: updateData(code, data);\n $: updateOpen(open);\n $: parsedUser = typeof user === 'string' ? (JSON.parse(user) as User) : user;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n function updateData(newCode: string, newData: string | Sidebar) {\n if (typeof previousData !== typeof newData || previousData !== newData) {\n previousData = newData;\n updateSidebarData(newData);\n }\n if (typeof previousCode !== typeof newCode || previousCode !== newCode) {\n previousCode = newCode;\n selectFeature(newCode);\n }\n }\n\n function updateOpen(newOpenStatus?: boolean) {\n if (\n typeof previousOpen !== typeof newOpenStatus ||\n previousOpen !== newOpenStatus\n ) {\n previousOpen = Boolean(newOpenStatus);\n toggleSidebar(Boolean(newOpenStatus));\n }\n }\n\n const unsubscribes: Unsubscriber[] = [];\n unsubscribes.push(\n isSidebarOpen.subscribe((state) => {\n eventHandler.dispatch('on-toggle', state);\n }),\n );\n\n unsubscribes.push(\n selectedFeature.subscribe((selection) => {\n // Emit an event and close the menu when the selection changes.\n if (selection) {\n toggleSidebar(false);\n eventHandler.dispatch(\n 'on-select',\n selection.lv2?.code ?? selection.lv1?.code ?? selection.lv0?.code,\n );\n }\n }),\n );\n\n onDestroy(() => {\n for (const unsubscribe of unsubscribes) {\n unsubscribe();\n }\n });\n</script>\n\n<nav\n class=\"mc-sidebar {$isSidebarOpen ? 'is-open' : 'is-close'}\"\n aria-expanded={$isSidebarOpen}\n aria-labelledby=\"mc-sidebar__trigger\"\n {...attributes}\n>\n <div class=\"mc-sidebar__container {parsedUser ? 'has-bottom-panel' : ''}\">\n <button\n id=\"mc-sidebar__trigger\"\n class=\"mc-sidebar__trigger\"\n aria-label={$isSidebarOpen\n ? a11yLabels?.['close'] || 'Close the sidebar'\n : a11yLabels?.['open'] || 'Open the sidebar'}\n on:click={() => toggleSidebar()}\n >\n <span class=\"mc-sidebar__trigger__container\">\n {#if $isSidebarOpen}\n <svg\n class=\"mc-sidebar__trigger-icon\"\n width=\"24px\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n ><path\n d=\"M10.707 5.707a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L4.414 12l6.293-6.293zm9 0a1 1 0 00-1.414-1.414l-7 7a1 1 0 000 1.414l7 7a1 1 0 001.414-1.414L13.414 12l6.293-6.293z\"\n /></svg\n >\n {:else}\n <svg\n class=\"mc-sidebar__trigger-icon\"\n width=\"24px\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n ><path\n d=\"M5.707 4.293a1 1 0 00-1.414 1.414L10.586 12l-6.293 6.293a1 1 0 101.414 1.414l7-7a1 1 0 000-1.414l-7-7zm9 0a1 1 0 10-1.414 1.414L19.586 12l-6.293 6.293a1 1 0 001.414 1.414l7-7a1 1 0 000-1.414l-7-7z\"\n /></svg\n >\n {/if}\n </span>\n </button>\n <Segment data={$sidebar?.HOME} />\n <NavigationSeparator />\n <Section data={$sidebar?.FEATURES} {a11yLabels} />\n {#if $sidebar?.UTILITIES}\n <div class=\"mc-sidebar__utilities\">\n {#each $sidebar?.UTILITIES as section}\n <NavigationSeparator />\n <ul>\n {#each section as feature}\n <li class=\"mc-sidebar__utilities__item\">\n <Segment data={feature} />\n </li>\n {/each}\n </ul>\n {/each}\n </div>\n {/if}\n </div>\n {#if parsedUser}\n <NavigationUser\n user={parsedUser}\n data={$sidebar?.USER_FEATURES}\n {a11yLabels}\n />\n {/if}\n</nav>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import './sidebar-variables';\n\n .mc-sidebar {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 10;\n font-size: 14px;\n color: white;\n box-sizing: border-box;\n fill: $color-sidebar-icon;\n width: 320px;\n background: $color-sidebar-background;\n display: block;\n height: 100vh;\n\n &__container {\n height: 100%;\n display: flex;\n flex-direction: column;\n &.has-bottom-panel {\n height: calc(100% - 88px);\n }\n }\n\n &__utilities {\n margin-bottom: 24px;\n\n &__item {\n margin: 4px 0px;\n &:first-child {\n margin-top: 0;\n }\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n &__trigger {\n cursor: pointer;\n background: none;\n border: none;\n padding: 0;\n margin: 28px 0;\n min-height: 38px;\n width: 100%;\n font-size: inherit;\n font-family: inherit;\n\n &-icon {\n fill: $color-sidebar-icon;\n }\n\n &__container {\n height: 38px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > * {\n width: 24px;\n height: 24px;\n }\n }\n\n &:hover &__container {\n background: $color-sidebar-feature-hover-background;\n }\n\n &:focus-visible {\n box-shadow: none;\n border: none;\n outline: none;\n\n & .mc-sidebar__trigger__container {\n box-shadow: none;\n border: none;\n border-radius: 6px;\n outline: 1px solid #0b96cc;\n }\n }\n }\n\n &.is-open {\n @include transition(width 300ms ease-in-out);\n\n .mc-sidebar__trigger__container {\n @include transition(\n width 300ms ease-in-out,\n margin-left 300ms ease-in-out,\n border-radius 300ms ease-in-out\n );\n margin-left: 266px;\n width: 38px;\n border-radius: 4px;\n }\n }\n\n &.is-close {\n @include transition(width 300ms ease-in-out);\n\n width: 64px;\n padding: 0;\n\n .mc-sidebar__trigger__container {\n @include transition(\n width 300ms ease-in-out,\n margin-left 300ms ease-in-out,\n border-radius 300ms ease-in-out\n );\n margin-left: 0px;\n width: 64px;\n border-radius: 0px;\n }\n }\n\n ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n }\n</style>\n"],"names":["insert","target","svg","anchor","append","path","each_value","ctx","UTILITIES","length","i","div","each_blocks","li","ul","data","USER_FEATURES","dirty","navigationuser_changes","create_if_block_2","props","HOME","FEATURES","if_block1","create_if_block_1","create_if_block","nav","button","span","segment_changes","section_changes","class","nav_class_value","parsedUser","previousCode","previousData","$$props","open","code","user","a11yLabels","eventHandler","EventHandler","previousOpen","unsubscribes","push","isSidebarOpen","subscribe","state","dispatch","selectedFeature","selection","toggleSidebar","_d","_b","_a","lv2","_c","lv1","_e","lv0","onDestroy","unsubscribe","newCode","newData","newOpenStatus","updateSidebarData","selectFeature","Boolean","$$invalidate","JSON","parse","attributes","Object","assign","$$restProps"],"mappings":"uqCAgHUA,EAQAC,EAAAC,EAAAC,GAHGC,EAECF,EAAAG,6YAjBJL,EAQAC,EAAAC,EAAAC,GAHGC,EAECF,EAAAG,yCAoBCC,EAAAC,MAAUC,+BAAfC,OAAIC,GAAA,oKADRV,EAWKC,EAAAU,EAAAR,oFAVIG,EAAAC,MAAUC,kBAAfC,OAAIC,GAAA,EAAA,yGAAJD,OAAIC,EAAAE,EAAAH,OA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KACXC,EAAcC,WAAWC,IACvBP,EAAaQ,SAAS,YAAaD,EAAK,KAI5CJ,EAAaC,KACXK,EAAgBH,WAAWI,kBAErBA,IACFC,GAAc,GACdX,EAAaQ,SACX,YADV,QAAAI,EAAA,QAAAC,EAAA,QAAAC,EAEUJ,EAAUK,eAFpBD,SAAAA,EAEyBjB,gBAFzBgB,EAAAA,EAAA,QAAAG,EAEiCN,EAAUO,WAF3C,IAAAD,SAAAA,EAEgDnB,gBAFhDe,EAAAA,EAAA,QAAAM,EAEwDR,EAAUS,WAFlE,IAAAD,SAAAA,EAEuErB,WAMrEuB,GAAS,KACI,IAAA,MAAAC,KAAelB,EACxBkB,+NA3CgBC,EAAiBC,EAWjBC,mBAXAF,EANNzB,SAODH,UADwB6B,EANjBjD,IAO4BoB,IAAiB6B,IAC7D7B,EAAe6B,EACfE,EAAkBF,WAET9B,UAAwB6B,GAAW7B,IAAiB6B,IAC7D7B,EAAe6B,EACfI,EAAcJ,4BAMPpB,UAFSsB,EAhBN5B,IAmBVM,IAAiBsB,IAEjBtB,EAAeyB,QAAQH,GACvBb,EAAcgB,QAAQH,sBArBvBI,EAAA,EAAApC,EAA6B,iBAATM,EAAqB+B,KAAKC,MAAMhC,GAAiBA,OACrEiC,EAALC,OAAAC,UAAuBC,yBACXH,EAAWzC,8BA+DDqB"}
|
|
@@ -1,595 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Sidebar_feature_nested from './sidebar-feature.nested.js';
|
|
3
|
-
import { a as selectFeature, i as isSidebarOpen, s as selectedFeature } from '../../sidebar-service-275bf9ef.js';
|
|
4
|
-
import { E as EventHandler } from '../../EventHandler-02058705.js';
|
|
5
|
-
|
|
6
|
-
/* src/components/sidebar/sidebar-feature-group.nested.svelte generated by Svelte v3.58.0 */
|
|
7
|
-
|
|
8
|
-
function add_css(target) {
|
|
9
|
-
append_styles(target, "svelte-vmcfrr", ".mc-feature-group.svelte-vmcfrr.svelte-vmcfrr{background:none;border:none;color:#191919;cursor:pointer;font-size:inherit;font-family:inherit;text-align:initial;margin:0;padding:0;overflow:hidden}.mc-feature-group__icon.svelte-vmcfrr.svelte-vmcfrr{fill:#191919}.mc-feature-group__container.svelte-vmcfrr.svelte-vmcfrr{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:5px 0;padding:8px 0px;-o-transition:margin 300ms ease-in-out;-webkit-transition:margin 300ms ease-in-out;transition:margin 300ms ease-in-out}.mc-feature-group__label.svelte-vmcfrr.svelte-vmcfrr{margin:0 8px;width:200px;min-width:200px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.mc-feature-group__label__tooltip.svelte-vmcfrr.svelte-vmcfrr{opacity:0;-webkit-transition:0s opacity;-o-transition:0s opacity;transition:0s opacity;background-color:#b3b3b3;border:1px solid #191919;border-radius:4px;position:absolute;pointer-events:none;left:calc(100% - 16px);padding:8px 16px;width:188px}.mc-feature-group__label__tooltip__pointer.svelte-vmcfrr.svelte-vmcfrr{position:absolute;top:50%;left:-8px;top:calc(50% - 6px);width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:8px solid white}.mc-feature-group__label__tooltip__pointer.svelte-vmcfrr div.svelte-vmcfrr{position:relative;top:-6px;left:2px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:8px solid #b3b3b3}.mc-feature-group__label.svelte-vmcfrr:hover+.mc-feature-group__label__tooltip.svelte-vmcfrr{opacity:1;-webkit-transition-delay:1s;-o-transition-delay:1s;transition-delay:1s}.mc-feature-group__content.svelte-vmcfrr.svelte-vmcfrr{overflow:hidden;-o-transition:height 300ms ease-in-out;-webkit-transition:height 300ms ease-in-out;transition:height 300ms ease-in-out}.mc-feature-group__content.is-close.svelte-vmcfrr.svelte-vmcfrr{height:0}.mc-feature-group.is-selected.svelte-vmcfrr.svelte-vmcfrr{background:#cfd2d8}.mc-feature-group.is-close.svelte-vmcfrr .mc-feature-group__container.svelte-vmcfrr{margin:0 20px;width:24px}.mc-feature-group.is-open.svelte-vmcfrr .mc-feature-group__container.svelte-vmcfrr{margin:0 32px}.mc-feature-group.svelte-vmcfrr.svelte-vmcfrr:hover{background:#b3b7c1}.mc-feature-group.svelte-vmcfrr.svelte-vmcfrr:focus-visible{-webkit-box-shadow:none;box-shadow:none;border:none;outline:none}.mc-feature-group.svelte-vmcfrr:focus-visible .mc-feature-group__container.svelte-vmcfrr{-webkit-box-shadow:none;box-shadow:none;border:none;border-radius:6px;outline:1px solid #0b96cc}ul.svelte-vmcfrr.svelte-vmcfrr,li.svelte-vmcfrr.svelte-vmcfrr{list-style-type:none;margin:0;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}ul.svelte-vmcfrr.svelte-vmcfrr{-webkit-box-align:start;-ms-flex-align:start;align-items:start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}ul.svelte-vmcfrr li.svelte-vmcfrr{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box}");
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function get_each_context(ctx, list, i) {
|
|
13
|
-
const child_ctx = ctx.slice();
|
|
14
|
-
child_ctx[15] = list[i];
|
|
15
|
-
return child_ctx;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// (71:4) {#if featureGroup.icon}
|
|
19
|
-
function create_if_block_3(ctx) {
|
|
20
|
-
let html_tag;
|
|
21
|
-
let raw_value = `<${generateIcon(/*featureGroup*/ ctx[0].icon)} class="mc-feature-group__icon" style="${mediumIconStyle}" />` + "";
|
|
22
|
-
let html_anchor;
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
c() {
|
|
26
|
-
html_tag = new HtmlTag(false);
|
|
27
|
-
html_anchor = empty();
|
|
28
|
-
html_tag.a = html_anchor;
|
|
29
|
-
},
|
|
30
|
-
m(target, anchor) {
|
|
31
|
-
html_tag.m(raw_value, target, anchor);
|
|
32
|
-
insert(target, html_anchor, anchor);
|
|
33
|
-
},
|
|
34
|
-
p(ctx, dirty) {
|
|
35
|
-
if (dirty & /*featureGroup*/ 1 && raw_value !== (raw_value = `<${generateIcon(/*featureGroup*/ ctx[0].icon)} class="mc-feature-group__icon" style="${mediumIconStyle}" />` + "")) html_tag.p(raw_value);
|
|
36
|
-
},
|
|
37
|
-
d(detaching) {
|
|
38
|
-
if (detaching) detach(html_anchor);
|
|
39
|
-
if (detaching) html_tag.d();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// (76:4) {#if $isSidebarOpen}
|
|
45
|
-
function create_if_block(ctx) {
|
|
46
|
-
let span;
|
|
47
|
-
let t0_value = /*featureGroup*/ ctx[0].label + "";
|
|
48
|
-
let t0;
|
|
49
|
-
let t1;
|
|
50
|
-
let t2;
|
|
51
|
-
let if_block1_anchor;
|
|
52
|
-
let if_block0 = /*label*/ ctx[6]?.offsetHeight < /*label*/ ctx[6]?.scrollHeight && create_if_block_2(ctx);
|
|
53
|
-
|
|
54
|
-
function select_block_type(ctx, dirty) {
|
|
55
|
-
if (!/*expand*/ ctx[1]) return create_if_block_1;
|
|
56
|
-
return create_else_block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
let current_block_type = select_block_type(ctx);
|
|
60
|
-
let if_block1 = current_block_type(ctx);
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
c() {
|
|
64
|
-
span = element("span");
|
|
65
|
-
t0 = text(t0_value);
|
|
66
|
-
t1 = space();
|
|
67
|
-
if (if_block0) if_block0.c();
|
|
68
|
-
t2 = space();
|
|
69
|
-
if_block1.c();
|
|
70
|
-
if_block1_anchor = empty();
|
|
71
|
-
attr(span, "class", "mc-feature-group__label svelte-vmcfrr");
|
|
72
|
-
},
|
|
73
|
-
m(target, anchor) {
|
|
74
|
-
insert(target, span, anchor);
|
|
75
|
-
append(span, t0);
|
|
76
|
-
/*span_binding*/ ctx[9](span);
|
|
77
|
-
insert(target, t1, anchor);
|
|
78
|
-
if (if_block0) if_block0.m(target, anchor);
|
|
79
|
-
insert(target, t2, anchor);
|
|
80
|
-
if_block1.m(target, anchor);
|
|
81
|
-
insert(target, if_block1_anchor, anchor);
|
|
82
|
-
},
|
|
83
|
-
p(ctx, dirty) {
|
|
84
|
-
if (dirty & /*featureGroup*/ 1 && t0_value !== (t0_value = /*featureGroup*/ ctx[0].label + "")) set_data(t0, t0_value);
|
|
85
|
-
|
|
86
|
-
if (/*label*/ ctx[6]?.offsetHeight < /*label*/ ctx[6]?.scrollHeight) {
|
|
87
|
-
if (if_block0) {
|
|
88
|
-
if_block0.p(ctx, dirty);
|
|
89
|
-
} else {
|
|
90
|
-
if_block0 = create_if_block_2(ctx);
|
|
91
|
-
if_block0.c();
|
|
92
|
-
if_block0.m(t2.parentNode, t2);
|
|
93
|
-
}
|
|
94
|
-
} else if (if_block0) {
|
|
95
|
-
if_block0.d(1);
|
|
96
|
-
if_block0 = null;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
|
|
100
|
-
if_block1.d(1);
|
|
101
|
-
if_block1 = current_block_type(ctx);
|
|
102
|
-
|
|
103
|
-
if (if_block1) {
|
|
104
|
-
if_block1.c();
|
|
105
|
-
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
d(detaching) {
|
|
110
|
-
if (detaching) detach(span);
|
|
111
|
-
/*span_binding*/ ctx[9](null);
|
|
112
|
-
if (detaching) detach(t1);
|
|
113
|
-
if (if_block0) if_block0.d(detaching);
|
|
114
|
-
if (detaching) detach(t2);
|
|
115
|
-
if_block1.d(detaching);
|
|
116
|
-
if (detaching) detach(if_block1_anchor);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// (80:6) {#if label?.offsetHeight < label?.scrollHeight}
|
|
122
|
-
function create_if_block_2(ctx) {
|
|
123
|
-
let div2;
|
|
124
|
-
let div1;
|
|
125
|
-
let t0;
|
|
126
|
-
let span;
|
|
127
|
-
let t1_value = /*featureGroup*/ ctx[0].label + "";
|
|
128
|
-
let t1;
|
|
129
|
-
|
|
130
|
-
return {
|
|
131
|
-
c() {
|
|
132
|
-
div2 = element("div");
|
|
133
|
-
div1 = element("div");
|
|
134
|
-
div1.innerHTML = `<div class="svelte-vmcfrr"></div>`;
|
|
135
|
-
t0 = space();
|
|
136
|
-
span = element("span");
|
|
137
|
-
t1 = text(t1_value);
|
|
138
|
-
attr(div1, "class", "mc-feature-group__label__tooltip__pointer svelte-vmcfrr");
|
|
139
|
-
attr(div2, "aria-hidden", "true");
|
|
140
|
-
attr(div2, "class", "mc-feature-group__label__tooltip svelte-vmcfrr");
|
|
141
|
-
},
|
|
142
|
-
m(target, anchor) {
|
|
143
|
-
insert(target, div2, anchor);
|
|
144
|
-
append(div2, div1);
|
|
145
|
-
append(div2, t0);
|
|
146
|
-
append(div2, span);
|
|
147
|
-
append(span, t1);
|
|
148
|
-
},
|
|
149
|
-
p(ctx, dirty) {
|
|
150
|
-
if (dirty & /*featureGroup*/ 1 && t1_value !== (t1_value = /*featureGroup*/ ctx[0].label + "")) set_data(t1, t1_value);
|
|
151
|
-
},
|
|
152
|
-
d(detaching) {
|
|
153
|
-
if (detaching) detach(div2);
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// (96:6) {:else}
|
|
159
|
-
function create_else_block(ctx) {
|
|
160
|
-
let svg;
|
|
161
|
-
let path;
|
|
162
|
-
|
|
163
|
-
return {
|
|
164
|
-
c() {
|
|
165
|
-
svg = svg_element("svg");
|
|
166
|
-
path = svg_element("path");
|
|
167
|
-
attr(path, "d", "M12 9H4a1 1 0 010-2h8a1 1 0 010 2z");
|
|
168
|
-
attr(svg, "class", "mc-feature-group__icon svelte-vmcfrr");
|
|
169
|
-
attr(svg, "width", "16px");
|
|
170
|
-
attr(svg, "height", "16px");
|
|
171
|
-
attr(svg, "viewBox", "0 0 16 16");
|
|
172
|
-
},
|
|
173
|
-
m(target, anchor) {
|
|
174
|
-
insert(target, svg, anchor);
|
|
175
|
-
append(svg, path);
|
|
176
|
-
},
|
|
177
|
-
d(detaching) {
|
|
178
|
-
if (detaching) detach(svg);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// (86:6) {#if !expand}
|
|
184
|
-
function create_if_block_1(ctx) {
|
|
185
|
-
let svg;
|
|
186
|
-
let path;
|
|
187
|
-
|
|
188
|
-
return {
|
|
189
|
-
c() {
|
|
190
|
-
svg = svg_element("svg");
|
|
191
|
-
path = svg_element("path");
|
|
192
|
-
attr(path, "d", "M13 7H9V3a1 1 0 00-2 0v4H3a1 1 0 000 2h4v4a1 1 0 002 0V9h4a1 1 0 000-2z");
|
|
193
|
-
attr(svg, "class", "mc-feature-group__icon svelte-vmcfrr");
|
|
194
|
-
attr(svg, "width", "16px");
|
|
195
|
-
attr(svg, "height", "16px");
|
|
196
|
-
attr(svg, "viewBox", "0 0 16 16");
|
|
197
|
-
},
|
|
198
|
-
m(target, anchor) {
|
|
199
|
-
insert(target, svg, anchor);
|
|
200
|
-
append(svg, path);
|
|
201
|
-
},
|
|
202
|
-
d(detaching) {
|
|
203
|
-
if (detaching) detach(svg);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// (114:2) {#each featureGroup.items as feature}
|
|
209
|
-
function create_each_block(ctx) {
|
|
210
|
-
let li;
|
|
211
|
-
let featurecomponent;
|
|
212
|
-
let t;
|
|
213
|
-
let current;
|
|
214
|
-
let mounted;
|
|
215
|
-
let dispose;
|
|
216
|
-
|
|
217
|
-
featurecomponent = new Sidebar_feature_nested({
|
|
218
|
-
props: {
|
|
219
|
-
feature: /*feature*/ ctx[15],
|
|
220
|
-
a11yLabels: /*a11yLabels*/ ctx[2]
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
function click_handler() {
|
|
225
|
-
return /*click_handler*/ ctx[10](/*feature*/ ctx[15]);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
return {
|
|
229
|
-
c() {
|
|
230
|
-
li = element("li");
|
|
231
|
-
create_component(featurecomponent.$$.fragment);
|
|
232
|
-
t = space();
|
|
233
|
-
attr(li, "class", "svelte-vmcfrr");
|
|
234
|
-
},
|
|
235
|
-
m(target, anchor) {
|
|
236
|
-
insert(target, li, anchor);
|
|
237
|
-
mount_component(featurecomponent, li, null);
|
|
238
|
-
append(li, t);
|
|
239
|
-
current = true;
|
|
240
|
-
|
|
241
|
-
if (!mounted) {
|
|
242
|
-
dispose = listen(li, "click", stop_propagation(click_handler));
|
|
243
|
-
mounted = true;
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
p(new_ctx, dirty) {
|
|
247
|
-
ctx = new_ctx;
|
|
248
|
-
const featurecomponent_changes = {};
|
|
249
|
-
if (dirty & /*featureGroup*/ 1) featurecomponent_changes.feature = /*feature*/ ctx[15];
|
|
250
|
-
if (dirty & /*a11yLabels*/ 4) featurecomponent_changes.a11yLabels = /*a11yLabels*/ ctx[2];
|
|
251
|
-
featurecomponent.$set(featurecomponent_changes);
|
|
252
|
-
},
|
|
253
|
-
i(local) {
|
|
254
|
-
if (current) return;
|
|
255
|
-
transition_in(featurecomponent.$$.fragment, local);
|
|
256
|
-
current = true;
|
|
257
|
-
},
|
|
258
|
-
o(local) {
|
|
259
|
-
transition_out(featurecomponent.$$.fragment, local);
|
|
260
|
-
current = false;
|
|
261
|
-
},
|
|
262
|
-
d(detaching) {
|
|
263
|
-
if (detaching) detach(li);
|
|
264
|
-
destroy_component(featurecomponent);
|
|
265
|
-
mounted = false;
|
|
266
|
-
dispose();
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
function create_fragment(ctx) {
|
|
272
|
-
let button;
|
|
273
|
-
let span;
|
|
274
|
-
let t0;
|
|
275
|
-
let button_class_value;
|
|
276
|
-
let button_aria_label_value;
|
|
277
|
-
let button_aria_expanded_value;
|
|
278
|
-
let button_aria_controls_value;
|
|
279
|
-
let button_id_value;
|
|
280
|
-
let t1;
|
|
281
|
-
let ul;
|
|
282
|
-
let ul_aria_hidden_value;
|
|
283
|
-
let ul_id_value;
|
|
284
|
-
let current;
|
|
285
|
-
let if_block0 = /*featureGroup*/ ctx[0].icon && create_if_block_3(ctx);
|
|
286
|
-
let if_block1 = /*$isSidebarOpen*/ ctx[3] && create_if_block(ctx);
|
|
287
|
-
let each_value = /*featureGroup*/ ctx[0].items;
|
|
288
|
-
let each_blocks = [];
|
|
289
|
-
|
|
290
|
-
for (let i = 0; i < each_value.length; i += 1) {
|
|
291
|
-
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
295
|
-
each_blocks[i] = null;
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
return {
|
|
299
|
-
c() {
|
|
300
|
-
button = element("button");
|
|
301
|
-
span = element("span");
|
|
302
|
-
if (if_block0) if_block0.c();
|
|
303
|
-
t0 = space();
|
|
304
|
-
if (if_block1) if_block1.c();
|
|
305
|
-
t1 = space();
|
|
306
|
-
ul = element("ul");
|
|
307
|
-
|
|
308
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
309
|
-
each_blocks[i].c();
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
attr(span, "class", "mc-feature-group__container svelte-vmcfrr");
|
|
313
|
-
attr(button, "class", button_class_value = "mc-feature-group " + (/*isSelected*/ ctx[5] ? 'is-selected' : '') + " " + (/*$isSidebarOpen*/ ctx[3] ? 'is-open' : 'is-close') + " svelte-vmcfrr");
|
|
314
|
-
attr(button, "aria-label", button_aria_label_value = /*featureGroup*/ ctx[0].label);
|
|
315
|
-
attr(button, "aria-expanded", button_aria_expanded_value = /*$isSidebarOpen*/ ctx[3] && /*expand*/ ctx[1]);
|
|
316
|
-
attr(button, "aria-controls", button_aria_controls_value = "" + (/*featureGroup*/ ctx[0].code + "-list"));
|
|
317
|
-
attr(button, "id", button_id_value = /*featureGroup*/ ctx[0].code);
|
|
318
|
-
attr(ul, "class", "mc-feature-group__content is-close svelte-vmcfrr");
|
|
319
|
-
attr(ul, "aria-hidden", ul_aria_hidden_value = !/*$isSidebarOpen*/ ctx[3] || !/*expand*/ ctx[1]);
|
|
320
|
-
attr(ul, "id", ul_id_value = "" + (/*featureGroup*/ ctx[0].code + "-list"));
|
|
321
|
-
},
|
|
322
|
-
m(target, anchor) {
|
|
323
|
-
insert(target, button, anchor);
|
|
324
|
-
append(button, span);
|
|
325
|
-
if (if_block0) if_block0.m(span, null);
|
|
326
|
-
append(span, t0);
|
|
327
|
-
if (if_block1) if_block1.m(span, null);
|
|
328
|
-
insert(target, t1, anchor);
|
|
329
|
-
insert(target, ul, anchor);
|
|
330
|
-
|
|
331
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
332
|
-
if (each_blocks[i]) {
|
|
333
|
-
each_blocks[i].m(ul, null);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/*ul_binding*/ ctx[11](ul);
|
|
338
|
-
current = true;
|
|
339
|
-
},
|
|
340
|
-
p(ctx, [dirty]) {
|
|
341
|
-
if (/*featureGroup*/ ctx[0].icon) {
|
|
342
|
-
if (if_block0) {
|
|
343
|
-
if_block0.p(ctx, dirty);
|
|
344
|
-
} else {
|
|
345
|
-
if_block0 = create_if_block_3(ctx);
|
|
346
|
-
if_block0.c();
|
|
347
|
-
if_block0.m(span, t0);
|
|
348
|
-
}
|
|
349
|
-
} else if (if_block0) {
|
|
350
|
-
if_block0.d(1);
|
|
351
|
-
if_block0 = null;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
if (/*$isSidebarOpen*/ ctx[3]) {
|
|
355
|
-
if (if_block1) {
|
|
356
|
-
if_block1.p(ctx, dirty);
|
|
357
|
-
} else {
|
|
358
|
-
if_block1 = create_if_block(ctx);
|
|
359
|
-
if_block1.c();
|
|
360
|
-
if_block1.m(span, null);
|
|
361
|
-
}
|
|
362
|
-
} else if (if_block1) {
|
|
363
|
-
if_block1.d(1);
|
|
364
|
-
if_block1 = null;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
if (!current || dirty & /*isSelected, $isSidebarOpen*/ 40 && button_class_value !== (button_class_value = "mc-feature-group " + (/*isSelected*/ ctx[5] ? 'is-selected' : '') + " " + (/*$isSidebarOpen*/ ctx[3] ? 'is-open' : 'is-close') + " svelte-vmcfrr")) {
|
|
368
|
-
attr(button, "class", button_class_value);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
if (!current || dirty & /*featureGroup*/ 1 && button_aria_label_value !== (button_aria_label_value = /*featureGroup*/ ctx[0].label)) {
|
|
372
|
-
attr(button, "aria-label", button_aria_label_value);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
if (!current || dirty & /*$isSidebarOpen, expand*/ 10 && button_aria_expanded_value !== (button_aria_expanded_value = /*$isSidebarOpen*/ ctx[3] && /*expand*/ ctx[1])) {
|
|
376
|
-
attr(button, "aria-expanded", button_aria_expanded_value);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
if (!current || dirty & /*featureGroup*/ 1 && button_aria_controls_value !== (button_aria_controls_value = "" + (/*featureGroup*/ ctx[0].code + "-list"))) {
|
|
380
|
-
attr(button, "aria-controls", button_aria_controls_value);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
if (!current || dirty & /*featureGroup*/ 1 && button_id_value !== (button_id_value = /*featureGroup*/ ctx[0].code)) {
|
|
384
|
-
attr(button, "id", button_id_value);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
if (dirty & /*handleClick, featureGroup, a11yLabels*/ 133) {
|
|
388
|
-
each_value = /*featureGroup*/ ctx[0].items;
|
|
389
|
-
let i;
|
|
390
|
-
|
|
391
|
-
for (i = 0; i < each_value.length; i += 1) {
|
|
392
|
-
const child_ctx = get_each_context(ctx, each_value, i);
|
|
393
|
-
|
|
394
|
-
if (each_blocks[i]) {
|
|
395
|
-
each_blocks[i].p(child_ctx, dirty);
|
|
396
|
-
transition_in(each_blocks[i], 1);
|
|
397
|
-
} else {
|
|
398
|
-
each_blocks[i] = create_each_block(child_ctx);
|
|
399
|
-
each_blocks[i].c();
|
|
400
|
-
transition_in(each_blocks[i], 1);
|
|
401
|
-
each_blocks[i].m(ul, null);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
group_outros();
|
|
406
|
-
|
|
407
|
-
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
|
408
|
-
out(i);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
check_outros();
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
if (!current || dirty & /*$isSidebarOpen, expand*/ 10 && ul_aria_hidden_value !== (ul_aria_hidden_value = !/*$isSidebarOpen*/ ctx[3] || !/*expand*/ ctx[1])) {
|
|
415
|
-
attr(ul, "aria-hidden", ul_aria_hidden_value);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
if (!current || dirty & /*featureGroup*/ 1 && ul_id_value !== (ul_id_value = "" + (/*featureGroup*/ ctx[0].code + "-list"))) {
|
|
419
|
-
attr(ul, "id", ul_id_value);
|
|
420
|
-
}
|
|
421
|
-
},
|
|
422
|
-
i(local) {
|
|
423
|
-
if (current) return;
|
|
424
|
-
|
|
425
|
-
for (let i = 0; i < each_value.length; i += 1) {
|
|
426
|
-
transition_in(each_blocks[i]);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
current = true;
|
|
430
|
-
},
|
|
431
|
-
o(local) {
|
|
432
|
-
each_blocks = each_blocks.filter(Boolean);
|
|
433
|
-
|
|
434
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
435
|
-
transition_out(each_blocks[i]);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
current = false;
|
|
439
|
-
},
|
|
440
|
-
d(detaching) {
|
|
441
|
-
if (detaching) detach(button);
|
|
442
|
-
if (if_block0) if_block0.d();
|
|
443
|
-
if (if_block1) if_block1.d();
|
|
444
|
-
if (detaching) detach(t1);
|
|
445
|
-
if (detaching) detach(ul);
|
|
446
|
-
destroy_each(each_blocks, detaching);
|
|
447
|
-
/*ul_binding*/ ctx[11](null);
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
const mediumIconStyle = 'width: 24px; height: 24px;';
|
|
453
|
-
|
|
454
|
-
function generateIcon(iconname) {
|
|
455
|
-
return `${iconname} size="2rem"`;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
function instance($$self, $$props, $$invalidate) {
|
|
459
|
-
let $isSidebarOpen;
|
|
460
|
-
let $selectedFeature;
|
|
461
|
-
component_subscribe($$self, isSidebarOpen, $$value => $$invalidate(3, $isSidebarOpen = $$value));
|
|
462
|
-
component_subscribe($$self, selectedFeature, $$value => $$invalidate(8, $selectedFeature = $$value));
|
|
463
|
-
let { featureGroup } = $$props;
|
|
464
|
-
let { expand } = $$props;
|
|
465
|
-
let { a11yLabels } = $$props;
|
|
466
|
-
let eventHandler = new EventHandler();
|
|
467
|
-
let content;
|
|
468
|
-
let isSelected = false;
|
|
469
|
-
let label;
|
|
470
|
-
|
|
471
|
-
function updateSelection(isExpanded, isOpen, group, selection) {
|
|
472
|
-
var _a, _b;
|
|
473
|
-
|
|
474
|
-
$$invalidate(5, isSelected = (_b = (selection === null || selection === void 0
|
|
475
|
-
? void 0
|
|
476
|
-
: selection.lv0) && group.code === ((_a = selection === null || selection === void 0
|
|
477
|
-
? void 0
|
|
478
|
-
: selection.lv0) === null || _a === void 0
|
|
479
|
-
? void 0
|
|
480
|
-
: _a.code) && (!selection.lv1 || !isExpanded || !isOpen)) !== null && _b !== void 0
|
|
481
|
-
? _b
|
|
482
|
-
: false);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
function updateContentCSS(isExpanded, isOpen) {
|
|
486
|
-
if (content) {
|
|
487
|
-
$$invalidate(4, content.style.height = '', content);
|
|
488
|
-
$$invalidate(4, content.style.transition = 'none', content);
|
|
489
|
-
const startHeight = window.getComputedStyle(content).height;
|
|
490
|
-
content.classList.add(isOpen && isExpanded ? 'is-open' : 'is-close');
|
|
491
|
-
content.classList.remove(isOpen && isExpanded ? 'is-close' : 'is-open');
|
|
492
|
-
const height = window.getComputedStyle(content).height;
|
|
493
|
-
$$invalidate(4, content.style.height = startHeight, content);
|
|
494
|
-
|
|
495
|
-
requestAnimationFrame(() => {
|
|
496
|
-
$$invalidate(4, content.style.transition = '', content);
|
|
497
|
-
|
|
498
|
-
requestAnimationFrame(() => {
|
|
499
|
-
$$invalidate(4, content.style.height = height, content);
|
|
500
|
-
});
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
const handler = () => {
|
|
504
|
-
$$invalidate(4, content.style.height = '', content);
|
|
505
|
-
content.removeEventListener('transitionend', handler);
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
content.addEventListener('transitionend', handler);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
function handleClick(feature) {
|
|
513
|
-
var _a;
|
|
514
|
-
|
|
515
|
-
if (!feature.disabled) {
|
|
516
|
-
if ((_a = feature.items) === null || _a === void 0
|
|
517
|
-
? void 0
|
|
518
|
-
: _a.length) {
|
|
519
|
-
eventHandler.dispatch('feature-click', feature);
|
|
520
|
-
} else {
|
|
521
|
-
selectFeature(feature.code);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
function span_binding($$value) {
|
|
527
|
-
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
528
|
-
label = $$value;
|
|
529
|
-
$$invalidate(6, label);
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
const click_handler = feature => handleClick(feature);
|
|
534
|
-
|
|
535
|
-
function ul_binding($$value) {
|
|
536
|
-
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
537
|
-
content = $$value;
|
|
538
|
-
$$invalidate(4, content);
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
$$self.$$set = $$props => {
|
|
543
|
-
if ('featureGroup' in $$props) $$invalidate(0, featureGroup = $$props.featureGroup);
|
|
544
|
-
if ('expand' in $$props) $$invalidate(1, expand = $$props.expand);
|
|
545
|
-
if ('a11yLabels' in $$props) $$invalidate(2, a11yLabels = $$props.a11yLabels);
|
|
546
|
-
};
|
|
547
|
-
|
|
548
|
-
$$self.$$.update = () => {
|
|
549
|
-
if ($$self.$$.dirty & /*expand, $isSidebarOpen, featureGroup, $selectedFeature*/ 267) {
|
|
550
|
-
updateSelection(expand, $isSidebarOpen, featureGroup, $selectedFeature);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
if ($$self.$$.dirty & /*expand, $isSidebarOpen*/ 10) {
|
|
554
|
-
updateContentCSS(expand, $isSidebarOpen);
|
|
555
|
-
}
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
return [
|
|
559
|
-
featureGroup,
|
|
560
|
-
expand,
|
|
561
|
-
a11yLabels,
|
|
562
|
-
$isSidebarOpen,
|
|
563
|
-
content,
|
|
564
|
-
isSelected,
|
|
565
|
-
label,
|
|
566
|
-
handleClick,
|
|
567
|
-
$selectedFeature,
|
|
568
|
-
span_binding,
|
|
569
|
-
click_handler,
|
|
570
|
-
ul_binding
|
|
571
|
-
];
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
class Sidebar_feature_group_nested extends SvelteComponent {
|
|
575
|
-
constructor(options) {
|
|
576
|
-
super();
|
|
577
|
-
|
|
578
|
-
init(
|
|
579
|
-
this,
|
|
580
|
-
options,
|
|
581
|
-
instance,
|
|
582
|
-
create_fragment,
|
|
583
|
-
safe_not_equal,
|
|
584
|
-
{
|
|
585
|
-
featureGroup: 0,
|
|
586
|
-
expand: 1,
|
|
587
|
-
a11yLabels: 2
|
|
588
|
-
},
|
|
589
|
-
add_css
|
|
590
|
-
);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
export { Sidebar_feature_group_nested as default };
|
|
1
|
+
import{P as e,i as t,s as r,Q as i,e as o,d as s,g as l,b as n,j as a,C as c,E as f,D as u,o as d,J as m,ab as p,K as v,t as b,k as g,x as h,A as x,l as _,I as w,G as y,M as k,v as $,Z as L,T as H}from"../../index-c33b3772.js";import j from"./sidebar-feature.nested.js";import{a as z,i as E,s as G}from"../../sidebar-service-275bf9ef.js";import{E as M}from"../../EventHandler-02058705.js";function A(e){i(e,"svelte-vmcfrr",".mc-feature-group.svelte-vmcfrr.svelte-vmcfrr{background:none;border:none;color:#191919;cursor:pointer;font-size:inherit;font-family:inherit;text-align:initial;margin:0;padding:0;overflow:hidden}.mc-feature-group__icon.svelte-vmcfrr.svelte-vmcfrr{fill:#191919}.mc-feature-group__container.svelte-vmcfrr.svelte-vmcfrr{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:5px 0;padding:8px 0px;-o-transition:margin 300ms ease-in-out;-webkit-transition:margin 300ms ease-in-out;transition:margin 300ms ease-in-out}.mc-feature-group__label.svelte-vmcfrr.svelte-vmcfrr{margin:0 8px;width:200px;min-width:200px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.mc-feature-group__label__tooltip.svelte-vmcfrr.svelte-vmcfrr{opacity:0;-webkit-transition:0s opacity;-o-transition:0s opacity;transition:0s opacity;background-color:#b3b3b3;border:1px solid #191919;border-radius:4px;position:absolute;pointer-events:none;left:calc(100% - 16px);padding:8px 16px;width:188px}.mc-feature-group__label__tooltip__pointer.svelte-vmcfrr.svelte-vmcfrr{position:absolute;top:50%;left:-8px;top:calc(50% - 6px);width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:8px solid white}.mc-feature-group__label__tooltip__pointer.svelte-vmcfrr div.svelte-vmcfrr{position:relative;top:-6px;left:2px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:8px solid #b3b3b3}.mc-feature-group__label.svelte-vmcfrr:hover+.mc-feature-group__label__tooltip.svelte-vmcfrr{opacity:1;-webkit-transition-delay:1s;-o-transition-delay:1s;transition-delay:1s}.mc-feature-group__content.svelte-vmcfrr.svelte-vmcfrr{overflow:hidden;-o-transition:height 300ms ease-in-out;-webkit-transition:height 300ms ease-in-out;transition:height 300ms ease-in-out}.mc-feature-group__content.is-close.svelte-vmcfrr.svelte-vmcfrr{height:0}.mc-feature-group.is-selected.svelte-vmcfrr.svelte-vmcfrr{background:#cfd2d8}.mc-feature-group.is-close.svelte-vmcfrr .mc-feature-group__container.svelte-vmcfrr{margin:0 20px;width:24px}.mc-feature-group.is-open.svelte-vmcfrr .mc-feature-group__container.svelte-vmcfrr{margin:0 32px}.mc-feature-group.svelte-vmcfrr.svelte-vmcfrr:hover{background:#b3b7c1}.mc-feature-group.svelte-vmcfrr.svelte-vmcfrr:focus-visible{-webkit-box-shadow:none;box-shadow:none;border:none;outline:none}.mc-feature-group.svelte-vmcfrr:focus-visible .mc-feature-group__container.svelte-vmcfrr{-webkit-box-shadow:none;box-shadow:none;border:none;border-radius:6px;outline:1px solid #0b96cc}ul.svelte-vmcfrr.svelte-vmcfrr,li.svelte-vmcfrr.svelte-vmcfrr{list-style-type:none;margin:0;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}ul.svelte-vmcfrr.svelte-vmcfrr{-webkit-box-align:start;-ms-flex-align:start;align-items:start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}ul.svelte-vmcfrr li.svelte-vmcfrr{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box}")}function B(e,t,r){const i=e.slice();return i[15]=t[r],i}function C(e){let t,r,i=`<${I(e[0].icon)} class="mc-feature-group__icon" style="${D}" />`;return{c(){t=new L(!1),r=v(),t.a=r},m(e,o){t.m(i,e,o),n(e,r,o)},p(e,r){1&r&&i!==(i=`<${I(e[0].icon)} class="mc-feature-group__icon" style="${D}" />`)&&t.p(i)},d(e){e&&d(r),e&&t.d()}}}function q(e){let t,r,i,c,f,u=e[0].label+"",m=e[6]?.offsetHeight<e[6]?.scrollHeight&&F(e);function p(e,t){return e[1]?N:S}let h=p(e),x=h(e);return{c(){t=o("span"),r=b(u),i=s(),m&&m.c(),c=s(),x.c(),f=v(),l(t,"class","mc-feature-group__label svelte-vmcfrr")},m(o,s){n(o,t,s),a(t,r),e[9](t),n(o,i,s),m&&m.m(o,s),n(o,c,s),x.m(o,s),n(o,f,s)},p(e,t){1&t&&u!==(u=e[0].label+"")&&g(r,u),e[6]?.offsetHeight<e[6]?.scrollHeight?m?m.p(e,t):(m=F(e),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null),h!==(h=p(e))&&(x.d(1),x=h(e),x&&(x.c(),x.m(f.parentNode,f)))},d(r){r&&d(t),e[9](null),r&&d(i),m&&m.d(r),r&&d(c),x.d(r),r&&d(f)}}}function F(e){let t,r,i,c,f,u=e[0].label+"";return{c(){t=o("div"),r=o("div"),r.innerHTML='<div class="svelte-vmcfrr"></div>',i=s(),c=o("span"),f=b(u),l(r,"class","mc-feature-group__label__tooltip__pointer svelte-vmcfrr"),l(t,"aria-hidden","true"),l(t,"class","mc-feature-group__label__tooltip svelte-vmcfrr")},m(e,o){n(e,t,o),a(t,r),a(t,i),a(t,c),a(c,f)},p(e,t){1&t&&u!==(u=e[0].label+"")&&g(f,u)},d(e){e&&d(t)}}}function N(e){let t,r;return{c(){t=H("svg"),r=H("path"),l(r,"d","M12 9H4a1 1 0 010-2h8a1 1 0 010 2z"),l(t,"class","mc-feature-group__icon svelte-vmcfrr"),l(t,"width","16px"),l(t,"height","16px"),l(t,"viewBox","0 0 16 16")},m(e,i){n(e,t,i),a(t,r)},d(e){e&&d(t)}}}function S(e){let t,r;return{c(){t=H("svg"),r=H("path"),l(r,"d","M13 7H9V3a1 1 0 00-2 0v4H3a1 1 0 000 2h4v4a1 1 0 002 0V9h4a1 1 0 000-2z"),l(t,"class","mc-feature-group__icon svelte-vmcfrr"),l(t,"width","16px"),l(t,"height","16px"),l(t,"viewBox","0 0 16 16")},m(e,i){n(e,t,i),a(t,r)},d(e){e&&d(t)}}}function T(e){let t,r,i,f,m,p;function v(){return e[10](e[15])}return r=new j({props:{feature:e[15],a11yLabels:e[2]}}),{c(){t=o("li"),h(r.$$.fragment),i=s(),l(t,"class","svelte-vmcfrr")},m(e,o){n(e,t,o),x(r,t,null),a(t,i),f=!0,m||(p=_(t,"click",w(v)),m=!0)},p(t,i){e=t;const o={};1&i&&(o.feature=e[15]),4&i&&(o.a11yLabels=e[2]),r.$set(o)},i(e){f||(c(r.$$.fragment,e),f=!0)},o(e){u(r.$$.fragment,e),f=!1},d(e){e&&d(t),y(r),m=!1,p()}}}function V(e){let t,r,i,p,v,b,g,h,x,_,w,y,$,L=e[0].icon&&C(e),H=e[3]&&q(e),j=e[0].items,z=[];for(let t=0;t<j.length;t+=1)z[t]=T(B(e,j,t));const E=e=>u(z[e],1,1,(()=>{z[e]=null}));return{c(){t=o("button"),r=o("span"),L&&L.c(),i=s(),H&&H.c(),x=s(),_=o("ul");for(let e=0;e<z.length;e+=1)z[e].c();l(r,"class","mc-feature-group__container svelte-vmcfrr"),l(t,"class",p="mc-feature-group "+(e[5]?"is-selected":"")+" "+(e[3]?"is-open":"is-close")+" svelte-vmcfrr"),l(t,"aria-label",v=e[0].label),l(t,"aria-expanded",b=e[3]&&e[1]),l(t,"aria-controls",g=e[0].code+"-list"),l(t,"id",h=e[0].code),l(_,"class","mc-feature-group__content is-close svelte-vmcfrr"),l(_,"aria-hidden",w=!e[3]||!e[1]),l(_,"id",y=e[0].code+"-list")},m(o,s){n(o,t,s),a(t,r),L&&L.m(r,null),a(r,i),H&&H.m(r,null),n(o,x,s),n(o,_,s);for(let e=0;e<z.length;e+=1)z[e]&&z[e].m(_,null);e[11](_),$=!0},p(e,[o]){if(e[0].icon?L?L.p(e,o):(L=C(e),L.c(),L.m(r,i)):L&&(L.d(1),L=null),e[3]?H?H.p(e,o):(H=q(e),H.c(),H.m(r,null)):H&&(H.d(1),H=null),(!$||40&o&&p!==(p="mc-feature-group "+(e[5]?"is-selected":"")+" "+(e[3]?"is-open":"is-close")+" svelte-vmcfrr"))&&l(t,"class",p),(!$||1&o&&v!==(v=e[0].label))&&l(t,"aria-label",v),(!$||10&o&&b!==(b=e[3]&&e[1]))&&l(t,"aria-expanded",b),(!$||1&o&&g!==(g=e[0].code+"-list"))&&l(t,"aria-controls",g),(!$||1&o&&h!==(h=e[0].code))&&l(t,"id",h),133&o){let t;for(j=e[0].items,t=0;t<j.length;t+=1){const r=B(e,j,t);z[t]?(z[t].p(r,o),c(z[t],1)):(z[t]=T(r),z[t].c(),c(z[t],1),z[t].m(_,null))}for(k(),t=j.length;t<z.length;t+=1)E(t);f()}(!$||10&o&&w!==(w=!e[3]||!e[1]))&&l(_,"aria-hidden",w),(!$||1&o&&y!==(y=e[0].code+"-list"))&&l(_,"id",y)},i(e){if(!$){for(let e=0;e<j.length;e+=1)c(z[e]);$=!0}},o(e){z=z.filter(Boolean);for(let e=0;e<z.length;e+=1)u(z[e]);$=!1},d(r){r&&d(t),L&&L.d(),H&&H.d(),r&&d(x),r&&d(_),m(z,r),e[11](null)}}}const D="width: 24px; height: 24px;";function I(e){return`${e} size="2rem"`}function J(e,t,r){let i,o;p(e,E,(e=>r(3,i=e))),p(e,G,(e=>r(8,o=e)));let s,l,{featureGroup:n}=t,{expand:a}=t,{a11yLabels:c}=t,f=new M,u=!1;function d(e){var t;e.disabled||((null===(t=e.items)||void 0===t?void 0:t.length)?f.dispatch("feature-click",e):z(e.code))}return e.$$set=e=>{"featureGroup"in e&&r(0,n=e.featureGroup),"expand"in e&&r(1,a=e.expand),"a11yLabels"in e&&r(2,c=e.a11yLabels)},e.$$.update=()=>{var t,l,c,f,d,m;267&e.$$.dirty&&(t=a,l=i,c=n,r(5,u=null!==(m=(null==(f=o)?void 0:f.lv0)&&c.code===(null===(d=null==f?void 0:f.lv0)||void 0===d?void 0:d.code)&&(!f.lv1||!t||!l))&&void 0!==m&&m)),10&e.$$.dirty&&function(e,t){if(s){r(4,s.style.height="",s),r(4,s.style.transition="none",s);const i=window.getComputedStyle(s).height;s.classList.add(t&&e?"is-open":"is-close"),s.classList.remove(t&&e?"is-close":"is-open");const o=window.getComputedStyle(s).height;r(4,s.style.height=i,s),requestAnimationFrame((()=>{r(4,s.style.transition="",s),requestAnimationFrame((()=>{r(4,s.style.height=o,s)}))}));const l=()=>{r(4,s.style.height="",s),s.removeEventListener("transitionend",l)};s.addEventListener("transitionend",l)}}(a,i)},[n,a,c,i,s,u,l,d,o,function(e){$[e?"unshift":"push"]((()=>{l=e,r(6,l)}))},e=>d(e),function(e){$[e?"unshift":"push"]((()=>{s=e,r(4,s)}))}]}class K extends e{constructor(e){super(),t(this,e,J,V,r,{featureGroup:0,expand:1,a11yLabels:2},A)}}export{K as default};
|
|
595
2
|
//# sourceMappingURL=sidebar-feature-group.nested.js.map
|