@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":"Pagination.js","sources":["../../../src/components/pagination/Pagination.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onMount, get_current_component } from 'svelte/internal';\n\n import { EventHandler } from '../../utilities/EventHandler';\n export let total = 1;\n export let value = 1;\n export let light = false;\n export let pagelabel: string;\n export let prefixlabel = 'Page';\n export let hrefprev = '';\n export let hrefnext = '';\n\n let eventHandler = new EventHandler();\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const component: any = get_current_component();\n onMount(() => {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n const select = component.shadowRoot.querySelector('.mc-select');\n const options = select.options;\n const selectedOption = options.namedItem(value);\n if (selectedOption) {\n selectedOption.selected = true;\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n });\n\n function dispatchPreviousPageEvent(): void {\n value--;\n eventHandler.dispatch('on-previous-page', value);\n }\n\n function dispatchNextPageEvent(): void {\n value++;\n eventHandler.dispatch('on-next-page', value);\n }\n\n function dispatchChangePageEvent(): void {\n eventHandler.dispatch('on-update-page', value);\n }\n</script>\n\n<nav\n class=\"mc-pagination {light ? 'mc-pagination--light' : ''}\"\n role=\"navigation\"\n aria-label=\"pagination\"\n {...$$restProps}\n>\n {#if hrefprev}\n <a\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n href={hrefprev}\n aria-label=\"Previous page\"\n disabled={Number(value) === 1 || Number(total) === 1}\n >\n <navigation-arrow-arrow--left-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </a>\n {:else}\n <button\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n aria-label=\"Previous page\"\n disabled={Number(value) === 1 || Number(total) === 1}\n on:click|preventDefault={dispatchPreviousPageEvent}\n >\n <navigation-arrow-arrow--left-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </button>\n {/if}\n {#if !light}\n <div class=\"mc-pagination__field\">\n <select\n class=\"mc-select mc-pagination__select\"\n disabled={Number(total) === 1}\n bind:value\n on:change={dispatchChangePageEvent}\n >\n {#each { length: total } as _, number}\n <option\n name={String(value)}\n selected={number + 1 == value}\n value={number + 1}\n >{prefixlabel} {number + 1} {pagelabel} {total}</option\n >\n {/each}\n </select>\n </div>\n {/if}\n {#if hrefnext}\n <a\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n href={hrefnext}\n aria-label=\"Next Page\"\n disabled={Number(value) === Number(total) || Number(total) === 1}\n >\n <navigation-arrow-arrow--right-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </a>\n {:else}\n <button\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n aria-label=\"Previous page\"\n disabled={Number(value) === Number(total) || Number(total) === 1}\n on:click|preventDefault={dispatchNextPageEvent}\n >\n <navigation-arrow-arrow--right-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </button>\n {/if}\n</nav>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.button';\n @import '@mozaic-ds/styles/components/c.select';\n @import '@mozaic-ds/styles/components/c.pagination';\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"Pagination.js","sources":["../../../src/components/pagination/Pagination.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { onMount, get_current_component } from 'svelte/internal';\n\n import { EventHandler } from '../../utilities/EventHandler';\n export let total = 1;\n export let value = 1;\n export let light = false;\n export let pagelabel: string;\n export let prefixlabel = 'Page';\n export let hrefprev = '';\n export let hrefnext = '';\n\n let eventHandler = new EventHandler();\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const component: any = get_current_component();\n onMount(() => {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n const select = component.shadowRoot.querySelector('.mc-select');\n const options = select.options;\n const selectedOption = options.namedItem(value);\n if (selectedOption) {\n selectedOption.selected = true;\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */\n });\n\n function dispatchPreviousPageEvent(): void {\n value--;\n eventHandler.dispatch('on-previous-page', value);\n }\n\n function dispatchNextPageEvent(): void {\n value++;\n eventHandler.dispatch('on-next-page', value);\n }\n\n function dispatchChangePageEvent(): void {\n eventHandler.dispatch('on-update-page', value);\n }\n</script>\n\n<nav\n class=\"mc-pagination {light ? 'mc-pagination--light' : ''}\"\n role=\"navigation\"\n aria-label=\"pagination\"\n {...$$restProps}\n>\n {#if hrefprev}\n <a\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n href={hrefprev}\n aria-label=\"Previous page\"\n disabled={Number(value) === 1 || Number(total) === 1}\n >\n <navigation-arrow-arrow--left-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </a>\n {:else}\n <button\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n aria-label=\"Previous page\"\n disabled={Number(value) === 1 || Number(total) === 1}\n on:click|preventDefault={dispatchPreviousPageEvent}\n >\n <navigation-arrow-arrow--left-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </button>\n {/if}\n {#if !light}\n <div class=\"mc-pagination__field\">\n <select\n class=\"mc-select mc-pagination__select\"\n disabled={Number(total) === 1}\n bind:value\n on:change={dispatchChangePageEvent}\n >\n {#each { length: total } as _, number}\n <option\n name={String(value)}\n selected={number + 1 == value}\n value={number + 1}\n >{prefixlabel} {number + 1} {pagelabel} {total}</option\n >\n {/each}\n </select>\n </div>\n {/if}\n {#if hrefnext}\n <a\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n href={hrefnext}\n aria-label=\"Next Page\"\n disabled={Number(value) === Number(total) || Number(total) === 1}\n >\n <navigation-arrow-arrow--right-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </a>\n {:else}\n <button\n class=\"mc-pagination__button mc-button mc-button--solid-neutral mc-button--square mc-button--s@from-l\"\n aria-label=\"Previous page\"\n disabled={Number(value) === Number(total) || Number(total) === 1}\n on:click|preventDefault={dispatchNextPageEvent}\n >\n <navigation-arrow-arrow--right-24px\n size=\"100%\"\n class=\"mc-pagination__button-icon mc-button__icon\"\n />\n </button>\n {/if}\n</nav>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.button';\n @import '@mozaic-ds/styles/components/c.select';\n @import '@mozaic-ds/styles/components/c.pagination';\n</style>\n"],"names":["Number","ctx","insert","target","button","anchor","append","navigation_arrow_arrow__left_24px","a","each_value","length","i","div","select","t2_value","attr","option","option_name_value","String","__value","dirty","navigation_arrow_arrow__right_24px","create_if_block_2","create_if_block_1","create_if_block","nav","class","nav_class_value","total","$$props","value","light","pagelabel","prefixlabel","hrefprev","hrefnext","eventHandler","EventHandler","component","get_current_component","onMount","selectedOption","shadowRoot","querySelector","options","namedItem","selected","dispatch"],"mappings":"+qBAkEkC,IAAlBA,OAAOC,EAAW,KAAuB,IAAlBD,OAAOC,EAAK,YAH/CC,EAUQC,EAAAC,EAAAC,GAJNC,EAGCF,EAAAG,uBALwBN,EAAyB,+BADtB,IAAlBD,OAAOC,EAAW,KAAuB,IAAlBD,OAAOC,EAAK,yUAbvCA,EAAQ,uDAEc,IAAlBD,OAAOC,EAAW,KAAuB,IAAlBD,OAAOC,EAAK,aAJ/CC,EAUGC,EAAAK,EAAAH,GAJDC,EAGCE,EAAAD,4BAPKN,EAAQ,gBAEc,IAAlBD,OAAOC,EAAW,KAAuB,IAAlBD,OAAOC,EAAK,oEA4BlCQ,EAAA,CAAAC,OAAQT,EAAK,yBAApBS,OAAIC,GAAA,wJAJsB,IAAlBX,OAAOC,EAAK,sFAH1BC,EAgBKC,EAAAS,EAAAP,GAfHC,EAcQM,EAAAC,yGAVKZ,EAAuB,sCAEzBQ,EAAA,CAAAC,OAAQT,EAAK,YAApBS,OAAIC,GAAA,EAAA,iHAAJD,mBAJ0B,IAAlBV,OAAOC,EAAK,2GASFa,EAAAb,MAAS,EAAC,gCAAxBA,EAAW,2BAAgBA,EAAS,cAAGA,EAAK,IAHxCc,EAAAC,EAAA,OAAAC,EAAAC,OAAOjB,EAAK,kBACRA,EAAM,IAAG,GAAKA,EAAK,GACtBe,EAAAG,QAAAlB,MAAS,4BAHlBC,EAKAC,EAAAa,EAAAX,sEADIJ,EAAW,aAAgBA,EAAS,aAAGA,EAAK,IAHxC,EAAAmB,GAAAH,KAAAA,EAAAC,OAAOjB,EAAK,gCACRA,EAAM,IAAG,GAAKA,EAAK,6WAwBzBD,OAAOC,EAAK,MAAMD,OAAOC,EAAK,KAAuB,IAAlBD,OAAOC,EAAK,YAH3DC,EAUQC,EAAAC,EAAAC,GAJNC,EAGCF,EAAAiB,uBALwBpB,EAAqB,+BADpCD,OAAOC,EAAK,MAAMD,OAAOC,EAAK,KAAuB,IAAlBD,OAAOC,EAAK,0UAbnDA,EAAQ,mDAEJD,OAAOC,EAAK,MAAMD,OAAOC,EAAK,KAAuB,IAAlBD,OAAOC,EAAK,aAJ3DC,EAUGC,EAAAK,EAAAH,GAJDC,EAGCE,EAAAa,4BAPKpB,EAAQ,gBAEJD,OAAOC,EAAK,MAAMD,OAAOC,EAAK,KAAuB,IAAlBD,OAAOC,EAAK,yFAjDxDA,EAAQ,GAAAqB,yBAyBPrB,EAAK,IAAAsB,EAAAtB,0BAmBNA,EAAQ,GAAAuB,oDAjDSvB,EAAK,GAAG,uBAAyB,qDAGnDA,EAAW,iIAJjBC,EA2EKC,EAAAsB,EAAApB,+HA5CGJ,EAAK,kKA9BWA,EAAK,GAAG,uBAAyB,MAAE,CAAAyB,MAAAC,2DAGrD1B,EAAW,sKA1CJ2B,MAAAA,EAAQ,GAACC,GACTC,MAAAA,EAAQ,GAACD,GACTE,MAAAA,GAAQ,GAAKF,aACbG,GAAiBH,GACjBI,YAAAA,EAAc,QAAMJ,GACpBK,SAAAA,EAAW,IAAEL,GACbM,SAAAA,EAAW,IAAEN,EAEpBO,MAAmBC,EAGjB,MAAAC,EAAiBC,WACvBC,GAAO,KAEC,MAEAC,EAFSH,EAAUI,WAAWC,cAAc,cAC3BC,QACQC,UAAUf,GACrCW,IACFA,EAAeK,UAAW,sTAM5BhB,IAAKA,GACLM,EAAaW,SAAS,mBAAoBjB,mBAI1CA,IAAKA,GACLM,EAAaW,SAAS,eAAgBjB,eAItCM,EAAaW,SAAS,iBAAkBjB"}
|
|
@@ -1,292 +1,2 @@
|
|
|
1
|
-
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert, f as flush, s as safe_not_equal, c as assign, e as element, d as space, t as text, n as noop, g as attr, z as toggle_class, h as set_attributes, j as append, B as action_destroyer, l as listen, k as set_data, m as get_spread_update, o as detach, H as run_all, p as compute_rest_props, r as get_current_component, q as exclude_internal_props } from '../../index-c33b3772.js';
|
|
2
|
-
import { c as createEventForwarder } from '../../EventForward-8492ff62.js';
|
|
3
|
-
|
|
4
|
-
/* src/components/passwordinput/PasswordInput.svelte generated by Svelte v3.58.0 */
|
|
5
|
-
|
|
6
|
-
function create_fragment(ctx) {
|
|
7
|
-
let div;
|
|
8
|
-
let input;
|
|
9
|
-
let input_type_value;
|
|
10
|
-
let t0;
|
|
11
|
-
let button;
|
|
12
|
-
let t1_value = setButtonLabel(/*isvisible*/ ctx[0]) + "";
|
|
13
|
-
let t1;
|
|
14
|
-
let button_aria_checked_value;
|
|
15
|
-
let button_aria_pressed_value;
|
|
16
|
-
let mounted;
|
|
17
|
-
let dispose;
|
|
18
|
-
let div_levels = [{ class: "mc-password-input" }, /*$$restProps*/ ctx[9]];
|
|
19
|
-
let div_data = {};
|
|
20
|
-
|
|
21
|
-
for (let i = 0; i < div_levels.length; i += 1) {
|
|
22
|
-
div_data = assign(div_data, div_levels[i]);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
c() {
|
|
27
|
-
div = element("div");
|
|
28
|
-
input = element("input");
|
|
29
|
-
t0 = space();
|
|
30
|
-
button = element("button");
|
|
31
|
-
t1 = text(t1_value);
|
|
32
|
-
this.c = noop;
|
|
33
|
-
attr(input, "type", input_type_value = setType(/*isvisible*/ ctx[0]));
|
|
34
|
-
attr(input, "class", "mc-text-input mc-password-input__control");
|
|
35
|
-
attr(input, "aria-invalid", /*isinvalid*/ ctx[4]);
|
|
36
|
-
attr(input, "spellcheck", "false");
|
|
37
|
-
attr(input, "id", /*id*/ ctx[1]);
|
|
38
|
-
attr(input, "placeholder", /*placeholder*/ ctx[2]);
|
|
39
|
-
input.disabled = /*disabled*/ ctx[5];
|
|
40
|
-
input.required = /*required*/ ctx[6];
|
|
41
|
-
toggle_class(input, "is-valid", /*isvalid*/ ctx[3]);
|
|
42
|
-
toggle_class(input, "is-invalid", /*isinvalid*/ ctx[4]);
|
|
43
|
-
attr(button, "type", "button");
|
|
44
|
-
attr(button, "class", "mc-password-input__button");
|
|
45
|
-
attr(button, "role", "switch");
|
|
46
|
-
attr(button, "aria-checked", button_aria_checked_value = /*isvisible*/ ctx[0] ? 'true' : 'false');
|
|
47
|
-
attr(button, "aria-pressed", button_aria_pressed_value = /*isvisible*/ ctx[0] ? 'true' : 'false');
|
|
48
|
-
set_attributes(div, div_data);
|
|
49
|
-
},
|
|
50
|
-
m(target, anchor) {
|
|
51
|
-
insert(target, div, anchor);
|
|
52
|
-
append(div, input);
|
|
53
|
-
append(div, t0);
|
|
54
|
-
append(div, button);
|
|
55
|
-
append(button, t1);
|
|
56
|
-
|
|
57
|
-
if (!mounted) {
|
|
58
|
-
dispose = [
|
|
59
|
-
action_destroyer(/*forwardEvents*/ ctx[7].call(null, input)),
|
|
60
|
-
listen(button, "click", /*onClick*/ ctx[8])
|
|
61
|
-
];
|
|
62
|
-
|
|
63
|
-
mounted = true;
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
p(ctx, [dirty]) {
|
|
67
|
-
if (dirty & /*isvisible*/ 1 && input_type_value !== (input_type_value = setType(/*isvisible*/ ctx[0]))) {
|
|
68
|
-
attr(input, "type", input_type_value);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (dirty & /*isinvalid*/ 16) {
|
|
72
|
-
attr(input, "aria-invalid", /*isinvalid*/ ctx[4]);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (dirty & /*id*/ 2) {
|
|
76
|
-
attr(input, "id", /*id*/ ctx[1]);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (dirty & /*placeholder*/ 4) {
|
|
80
|
-
attr(input, "placeholder", /*placeholder*/ ctx[2]);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (dirty & /*disabled*/ 32) {
|
|
84
|
-
input.disabled = /*disabled*/ ctx[5];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (dirty & /*required*/ 64) {
|
|
88
|
-
input.required = /*required*/ ctx[6];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (dirty & /*isvalid*/ 8) {
|
|
92
|
-
toggle_class(input, "is-valid", /*isvalid*/ ctx[3]);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (dirty & /*isinvalid*/ 16) {
|
|
96
|
-
toggle_class(input, "is-invalid", /*isinvalid*/ ctx[4]);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (dirty & /*isvisible*/ 1 && t1_value !== (t1_value = setButtonLabel(/*isvisible*/ ctx[0]) + "")) set_data(t1, t1_value);
|
|
100
|
-
|
|
101
|
-
if (dirty & /*isvisible*/ 1 && button_aria_checked_value !== (button_aria_checked_value = /*isvisible*/ ctx[0] ? 'true' : 'false')) {
|
|
102
|
-
attr(button, "aria-checked", button_aria_checked_value);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (dirty & /*isvisible*/ 1 && button_aria_pressed_value !== (button_aria_pressed_value = /*isvisible*/ ctx[0] ? 'true' : 'false')) {
|
|
106
|
-
attr(button, "aria-pressed", button_aria_pressed_value);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
set_attributes(div, div_data = get_spread_update(div_levels, [
|
|
110
|
-
{ class: "mc-password-input" },
|
|
111
|
-
dirty & /*$$restProps*/ 512 && /*$$restProps*/ ctx[9]
|
|
112
|
-
]));
|
|
113
|
-
},
|
|
114
|
-
i: noop,
|
|
115
|
-
o: noop,
|
|
116
|
-
d(detaching) {
|
|
117
|
-
if (detaching) detach(div);
|
|
118
|
-
mounted = false;
|
|
119
|
-
run_all(dispose);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function setType(isvisible) {
|
|
125
|
-
return isvisible ? 'text' : 'password';
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function setButtonLabel(isvisible) {
|
|
129
|
-
return isvisible ? 'Hide' : 'Show';
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function instance($$self, $$props, $$invalidate) {
|
|
133
|
-
const omit_props_names = ["id","placeholder","isvalid","isinvalid","disabled","required","isvisible"];
|
|
134
|
-
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
135
|
-
let { id } = $$props;
|
|
136
|
-
let { placeholder } = $$props;
|
|
137
|
-
let { isvalid } = $$props;
|
|
138
|
-
let { isinvalid } = $$props;
|
|
139
|
-
let { disabled = false } = $$props;
|
|
140
|
-
let { required = false } = $$props;
|
|
141
|
-
let { isvisible = false } = $$props;
|
|
142
|
-
const forwardEvents = createEventForwarder(get_current_component());
|
|
143
|
-
|
|
144
|
-
function onClick() {
|
|
145
|
-
$$invalidate(0, isvisible = !isvisible);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
$$self.$$set = $$new_props => {
|
|
149
|
-
$$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
|
|
150
|
-
$$invalidate(9, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
151
|
-
if ('id' in $$new_props) $$invalidate(1, id = $$new_props.id);
|
|
152
|
-
if ('placeholder' in $$new_props) $$invalidate(2, placeholder = $$new_props.placeholder);
|
|
153
|
-
if ('isvalid' in $$new_props) $$invalidate(3, isvalid = $$new_props.isvalid);
|
|
154
|
-
if ('isinvalid' in $$new_props) $$invalidate(4, isinvalid = $$new_props.isinvalid);
|
|
155
|
-
if ('disabled' in $$new_props) $$invalidate(5, disabled = $$new_props.disabled);
|
|
156
|
-
if ('required' in $$new_props) $$invalidate(6, required = $$new_props.required);
|
|
157
|
-
if ('isvisible' in $$new_props) $$invalidate(0, isvisible = $$new_props.isvisible);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
return [
|
|
161
|
-
isvisible,
|
|
162
|
-
id,
|
|
163
|
-
placeholder,
|
|
164
|
-
isvalid,
|
|
165
|
-
isinvalid,
|
|
166
|
-
disabled,
|
|
167
|
-
required,
|
|
168
|
-
forwardEvents,
|
|
169
|
-
onClick,
|
|
170
|
-
$$restProps
|
|
171
|
-
];
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
class PasswordInput extends SvelteElement {
|
|
175
|
-
constructor(options) {
|
|
176
|
-
super();
|
|
177
|
-
const style = document.createElement('style');
|
|
178
|
-
style.textContent = `.mc-text-input{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-password-input{display:-webkit-box;display:-ms-flexbox;display:flex}.mc-password-input__control.mc-text-input{border-right:none;border-bottom-right-radius:0;border-top-right-radius:0}.mc-password-input__button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;font-family:"LeroyMerlin", sans-serif;font-weight:600;background-color:#ffffff;border:1px solid #666666;border-bottom-right-radius:4px;border-top-right-radius:4px;color:#191919;display:block;position:relative;height:0;padding:0.875rem 0.9375rem;min-height:3rem}.mc-password-input__button:active,.mc-password-input__button:focus,.mc-password-input__button:hover{background-color:#e6e6e6}`;
|
|
179
|
-
this.shadowRoot.appendChild(style);
|
|
180
|
-
|
|
181
|
-
init(
|
|
182
|
-
this,
|
|
183
|
-
{
|
|
184
|
-
target: this.shadowRoot,
|
|
185
|
-
props: attribute_to_object(this.attributes),
|
|
186
|
-
customElement: true
|
|
187
|
-
},
|
|
188
|
-
instance,
|
|
189
|
-
create_fragment,
|
|
190
|
-
safe_not_equal,
|
|
191
|
-
{
|
|
192
|
-
id: 1,
|
|
193
|
-
placeholder: 2,
|
|
194
|
-
isvalid: 3,
|
|
195
|
-
isinvalid: 4,
|
|
196
|
-
disabled: 5,
|
|
197
|
-
required: 6,
|
|
198
|
-
isvisible: 0
|
|
199
|
-
},
|
|
200
|
-
null
|
|
201
|
-
);
|
|
202
|
-
|
|
203
|
-
if (options) {
|
|
204
|
-
if (options.target) {
|
|
205
|
-
insert(options.target, this, options.anchor);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
if (options.props) {
|
|
209
|
-
this.$set(options.props);
|
|
210
|
-
flush();
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
static get observedAttributes() {
|
|
216
|
-
return [
|
|
217
|
-
"id",
|
|
218
|
-
"placeholder",
|
|
219
|
-
"isvalid",
|
|
220
|
-
"isinvalid",
|
|
221
|
-
"disabled",
|
|
222
|
-
"required",
|
|
223
|
-
"isvisible"
|
|
224
|
-
];
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
get id() {
|
|
228
|
-
return this.$$.ctx[1];
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
set id(id) {
|
|
232
|
-
this.$$set({ id });
|
|
233
|
-
flush();
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
get placeholder() {
|
|
237
|
-
return this.$$.ctx[2];
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
set placeholder(placeholder) {
|
|
241
|
-
this.$$set({ placeholder });
|
|
242
|
-
flush();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
get isvalid() {
|
|
246
|
-
return this.$$.ctx[3];
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
set isvalid(isvalid) {
|
|
250
|
-
this.$$set({ isvalid });
|
|
251
|
-
flush();
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
get isinvalid() {
|
|
255
|
-
return this.$$.ctx[4];
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
set isinvalid(isinvalid) {
|
|
259
|
-
this.$$set({ isinvalid });
|
|
260
|
-
flush();
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
get disabled() {
|
|
264
|
-
return this.$$.ctx[5];
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
set disabled(disabled) {
|
|
268
|
-
this.$$set({ disabled });
|
|
269
|
-
flush();
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
get required() {
|
|
273
|
-
return this.$$.ctx[6];
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
set required(required) {
|
|
277
|
-
this.$$set({ required });
|
|
278
|
-
flush();
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
get isvisible() {
|
|
282
|
-
return this.$$.ctx[0];
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
set isvisible(isvisible) {
|
|
286
|
-
this.$$set({ isvisible });
|
|
287
|
-
flush();
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export { PasswordInput as default };
|
|
1
|
+
import{S as e,i,a as t,b as n,f as r,s as o,c as m,e as s,d as l,t as a,n as h,g as p,z as c,h as d,j as u,B as x,l as g,k as f,m as b,o as z,H as w,p as v,r as M,q as I}from"../../index-c33b3772.js";import{c as k}from"../../EventForward-8492ff62.js";function A(e){let i,t,r,o,v,M,I,k,A,$,j=y(e[0])+"",E=[{class:"mc-password-input"},e[9]],C={};for(let e=0;e<E.length;e+=1)C=m(C,E[e]);return{c(){i=s("div"),t=s("input"),o=l(),v=s("button"),M=a(j),this.c=h,p(t,"type",r=D(e[0])),p(t,"class","mc-text-input mc-password-input__control"),p(t,"aria-invalid",e[4]),p(t,"spellcheck","false"),p(t,"id",e[1]),p(t,"placeholder",e[2]),t.disabled=e[5],t.required=e[6],c(t,"is-valid",e[3]),c(t,"is-invalid",e[4]),p(v,"type","button"),p(v,"class","mc-password-input__button"),p(v,"role","switch"),p(v,"aria-checked",I=e[0]?"true":"false"),p(v,"aria-pressed",k=e[0]?"true":"false"),d(i,C)},m(r,m){n(r,i,m),u(i,t),u(i,o),u(i,v),u(v,M),A||($=[x(e[7].call(null,t)),g(v,"click",e[8])],A=!0)},p(e,[n]){1&n&&r!==(r=D(e[0]))&&p(t,"type",r),16&n&&p(t,"aria-invalid",e[4]),2&n&&p(t,"id",e[1]),4&n&&p(t,"placeholder",e[2]),32&n&&(t.disabled=e[5]),64&n&&(t.required=e[6]),8&n&&c(t,"is-valid",e[3]),16&n&&c(t,"is-invalid",e[4]),1&n&&j!==(j=y(e[0])+"")&&f(M,j),1&n&&I!==(I=e[0]?"true":"false")&&p(v,"aria-checked",I),1&n&&k!==(k=e[0]?"true":"false")&&p(v,"aria-pressed",k),d(i,C=b(E,[{class:"mc-password-input"},512&n&&e[9]]))},i:h,o:h,d(e){e&&z(i),A=!1,w($)}}}function D(e){return e?"text":"password"}function y(e){return e?"Hide":"Show"}function $(e,i,t){const n=["id","placeholder","isvalid","isinvalid","disabled","required","isvisible"];let r=v(i,n),{id:o}=i,{placeholder:s}=i,{isvalid:l}=i,{isinvalid:a}=i,{disabled:h=!1}=i,{required:p=!1}=i,{isvisible:c=!1}=i;const d=k(M());return e.$$set=e=>{i=m(m({},i),I(e)),t(9,r=v(i,n)),"id"in e&&t(1,o=e.id),"placeholder"in e&&t(2,s=e.placeholder),"isvalid"in e&&t(3,l=e.isvalid),"isinvalid"in e&&t(4,a=e.isinvalid),"disabled"in e&&t(5,h=e.disabled),"required"in e&&t(6,p=e.required),"isvisible"in e&&t(0,c=e.isvisible)},[c,o,s,l,a,h,p,d,function(){t(0,c=!c)},r]}class j extends e{constructor(e){super();const m=document.createElement("style");m.textContent='.mc-text-input{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:none;font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease;display:block;width:100%;position:relative;border:1px solid #666666;color:#191919;background-color:#ffffff;border-radius:4px}.mc-text-input[type=number]::-webkit-inner-spin-button,.mc-text-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.mc-text-input[type=number]{-moz-appearance:textfield}.mc-text-input[type=search]::-webkit-search-decoration:hover,.mc-text-input[type=search]::-webkit-search-cancel-button:hover{cursor:pointer}.mc-text-input::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input::placeholder{font-size:1rem;line-height:1.375}.mc-text-input::-webkit-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-moz-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input:-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::-ms-input-placeholder{margin:0;color:#666666;opacity:1}.mc-text-input::placeholder{margin:0;color:#666666;opacity:1}.mc-text-input.is-valid,.mc-text-input.is-invalid{background-repeat:no-repeat;background-size:1.5rem 1.5rem;background-position:right 0.4375rem center;padding-right:2.5rem}.mc-text-input.is-valid{border-color:#46a610;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDExLTggOCA4IDggMCAwMTgtOG0wLTJhMTAgMTAgMCAxMDEwIDEwQTEwIDEwIDAgMDAxMiAyeiIvPjxwYXRoIGQ9Ik0xMC43MyAxNS43NWExIDEgMCAwMS0uNjgtLjI2bC0zLTIuNzRhMSAxIDAgMDExLjM2LTEuNDdsMi4yNSAyLjA4IDQuMzYtNC40MmExIDEgMCAxMTEuNDIgMS40MWwtNSA1LjFhMSAxIDAgMDEtLjcxLjN6Ii8+PC9zdmc+")}.mc-text-input.is-valid:hover,.mc-text-input.is-valid.is-hover{border-color:#035010}.mc-text-input.is-invalid{border-color:#c61112;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNjNjExMTIiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMTAxMCAxMEExMCAxMCAwIDAwMTIgMnptMCAxOGE4IDggMCAxMTgtOCA4IDggMCAwMS04IDh6Ii8+PHBhdGggZD0iTTEyIDdhMSAxIDAgMDAtMSAxdjQuMzhhMSAxIDAgMDAyIDBWOGExIDEgMCAwMC0xLTF6Ii8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxNiIgcj0iMSIvPjwvc3ZnPg==")}.mc-text-input.is-invalid:hover,.mc-text-input.is-invalid.is-hover{border-color:#530000}.mc-text-input.is-hover,.mc-text-input:hover{border-color:#191919}.mc-text-input.is-focus,.mc-text-input:focus{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.mc-text-input:disabled{background:#e6e6e6;border-color:#e6e6e6;color:#666666;cursor:not-allowed}.mc-text-input--s{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m::placeholder{font-size:1rem;line-height:1.375}@media screen and (min-width: 680px){.mc-text-input--s\\@from-m{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-m::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-m::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-m{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-m::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-m::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1024px){.mc-text-input--s\\@from-l{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-l::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-l::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-l{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-l::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-l::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1280px){.mc-text-input--s\\@from-xl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xl::placeholder{font-size:1rem;line-height:1.375}}@media screen and (min-width: 1920px){.mc-text-input--s\\@from-xxl{font-size:0.875rem;line-height:1.2857142857;min-height:2rem;padding:0.375rem 0.4375rem}.mc-text-input--s\\@from-xxl::-webkit-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-moz-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl:-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::-ms-input-placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--s\\@from-xxl::placeholder{font-size:0.875rem;line-height:1.2857142857}.mc-text-input--m\\@from-xxl{font-size:1rem;line-height:1.375;min-height:3rem;padding:0.75rem 0.6875rem}.mc-text-input--m\\@from-xxl::-webkit-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-moz-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl:-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::-ms-input-placeholder{font-size:1rem;line-height:1.375}.mc-text-input--m\\@from-xxl::placeholder{font-size:1rem;line-height:1.375}}.mc-password-input{display:-webkit-box;display:-ms-flexbox;display:flex}.mc-password-input__control.mc-text-input{border-right:none;border-bottom-right-radius:0;border-top-right-radius:0}.mc-password-input__button{margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;border:none;cursor:pointer;padding:0;font-family:"LeroyMerlin", sans-serif;font-weight:600;background-color:#ffffff;border:1px solid #666666;border-bottom-right-radius:4px;border-top-right-radius:4px;color:#191919;display:block;position:relative;height:0;padding:0.875rem 0.9375rem;min-height:3rem}.mc-password-input__button:active,.mc-password-input__button:focus,.mc-password-input__button:hover{background-color:#e6e6e6}',this.shadowRoot.appendChild(m),i(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},$,A,o,{id:1,placeholder:2,isvalid:3,isinvalid:4,disabled:5,required:6,isvisible:0},null),e&&(e.target&&n(e.target,this,e.anchor),e.props&&(this.$set(e.props),r()))}static get observedAttributes(){return["id","placeholder","isvalid","isinvalid","disabled","required","isvisible"]}get id(){return this.$$.ctx[1]}set id(e){this.$$set({id:e}),r()}get placeholder(){return this.$$.ctx[2]}set placeholder(e){this.$$set({placeholder:e}),r()}get isvalid(){return this.$$.ctx[3]}set isvalid(e){this.$$set({isvalid:e}),r()}get isinvalid(){return this.$$.ctx[4]}set isinvalid(e){this.$$set({isinvalid:e}),r()}get disabled(){return this.$$.ctx[5]}set disabled(e){this.$$set({disabled:e}),r()}get required(){return this.$$.ctx[6]}set required(e){this.$$set({required:e}),r()}get isvisible(){return this.$$.ctx[0]}set isvisible(e){this.$$set({isvisible:e}),r()}}export{j as default};
|
|
292
2
|
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.js","sources":["../../../src/components/passwordinput/PasswordInput.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { createEventForwarder } from '../../utilities/EventForward';\n export let id: string;\n export let placeholder: string;\n export let isvalid: boolean;\n export let isinvalid: boolean;\n export let disabled = false;\n export let required = false;\n export let isvisible = false;\n\n const forwardEvents = createEventForwarder(get_current_component());\n\n function setType(isvisible: boolean) {\n return isvisible ? 'text' : 'password';\n }\n\n function onClick(): void {\n isvisible = !isvisible;\n }\n\n function setButtonLabel(isvisible: boolean) {\n return isvisible ? 'Hide' : 'Show';\n }\n</script>\n\n<div class=\"mc-password-input\" {...$$restProps}>\n <input\n use:forwardEvents\n type={setType(isvisible)}\n class=\"mc-text-input mc-password-input__control\"\n class:is-valid={isvalid}\n class:is-invalid={isinvalid}\n aria-invalid={isinvalid}\n spellcheck=\"false\"\n {id}\n {placeholder}\n {disabled}\n {required}\n />\n\n <button\n type=\"button\"\n class=\"mc-password-input__button\"\n role=\"switch\"\n aria-checked={isvisible ? 'true' : 'false'}\n aria-pressed={isvisible ? 'true' : 'false'}\n on:click={onClick}\n >\n {setButtonLabel(isvisible)}\n </button>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.text-input';\n @import '@mozaic-ds/styles/components/c.password-input';\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","sources":["../../../src/components/passwordinput/PasswordInput.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import { get_current_component } from 'svelte/internal';\n import { createEventForwarder } from '../../utilities/EventForward';\n export let id: string;\n export let placeholder: string;\n export let isvalid: boolean;\n export let isinvalid: boolean;\n export let disabled = false;\n export let required = false;\n export let isvisible = false;\n\n const forwardEvents = createEventForwarder(get_current_component());\n\n function setType(isvisible: boolean) {\n return isvisible ? 'text' : 'password';\n }\n\n function onClick(): void {\n isvisible = !isvisible;\n }\n\n function setButtonLabel(isvisible: boolean) {\n return isvisible ? 'Hide' : 'Show';\n }\n</script>\n\n<div class=\"mc-password-input\" {...$$restProps}>\n <input\n use:forwardEvents\n type={setType(isvisible)}\n class=\"mc-text-input mc-password-input__control\"\n class:is-valid={isvalid}\n class:is-invalid={isinvalid}\n aria-invalid={isinvalid}\n spellcheck=\"false\"\n {id}\n {placeholder}\n {disabled}\n {required}\n />\n\n <button\n type=\"button\"\n class=\"mc-password-input__button\"\n role=\"switch\"\n aria-checked={isvisible ? 'true' : 'false'}\n aria-pressed={isvisible ? 'true' : 'false'}\n on:click={onClick}\n >\n {setButtonLabel(isvisible)}\n </button>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.text-input';\n @import '@mozaic-ds/styles/components/c.password-input';\n</style>\n"],"names":["t1_value","setButtonLabel","ctx","attr","input","input_type_value","setType","insert","target","div","anchor","append","button","dirty","set_data","t1","isvisible","id","$$props","placeholder","isvalid","isinvalid","disabled","required","forwardEvents","createEventForwarder","get_current_component","$$invalidate"],"mappings":"iSAmDKA,EAAAC,EAAeC,EAAS,IAAA,kCAvBMA,EAAW,wHAGpCC,EAAAC,EAAA,OAAAC,EAAAC,EAAQJ,EAAS,gFAITA,EAAS,oHAFPA,EAAO,qBACLA,EAAS,4GAabA,EAAS,GAAG,OAAS,8BACrBA,EAAS,GAAG,OAAS,wBApBvCK,EAyBKC,EAAAC,EAAAC,GAxBHC,EAYCF,EAAAL,UAEDO,EASQF,EAAAG,kDAHIV,EAAO,qBAlBX,EAAAW,GAAAR,KAAAA,EAAAC,EAAQJ,EAAS,6CAITA,EAAS,yHAFPA,EAAO,2BACLA,EAAS,IAiB1B,EAAAW,GAAAb,KAAAA,EAAAC,EAAeC,EAAS,IAAA,KAAAY,EAAAC,EAAAf,eAJXE,EAAS,GAAG,OAAS,4CACrBA,EAAS,GAAG,OAAS,8EApBJA,EAAW,wCAbnC,SAAAI,EAAQU,UACRA,EAAY,OAAS,WAOrB,SAAAf,EAAee,UACfA,EAAY,OAAS,+HAnBnBC,GAAUC,eACVC,GAAmBD,WACnBE,GAAgBF,aAChBG,GAAkBH,GAClBI,SAAAA,GAAW,GAAKJ,GAChBK,SAAAA,GAAW,GAAKL,GAChBF,UAAAA,GAAY,GAAKE,QAEtBM,EAAgBC,EAAqBC,+TAOzCC,EAAA,EAAAX,GAAaA"}
|