@limetech/lime-elements 37.0.0-next.1 → 37.1.0-dev.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/dist/cjs/{checkbox.template-234f4813.js → checkbox.template-df6fc114.js} +5 -5
- package/dist/cjs/checkbox.template-df6fc114.js.map +1 -0
- package/dist/cjs/{index-aafa56ee.js → index-38eb64b5.js} +14 -1
- package/dist/cjs/index-38eb64b5.js.map +1 -0
- package/dist/cjs/lime-elements.cjs.js +2 -2
- package/dist/cjs/limel-action-bar-item_2.cjs.entry.js +10 -2
- package/dist/cjs/limel-action-bar-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-action-bar.cjs.entry.js +1 -1
- package/dist/cjs/limel-action-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-badge.cjs.entry.js +1 -1
- package/dist/cjs/limel-banner.cjs.entry.js +1 -1
- package/dist/cjs/limel-button-group.cjs.entry.js +2 -2
- package/dist/cjs/limel-button.cjs.entry.js +9 -1
- package/dist/cjs/limel-button.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-callout.cjs.entry.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +5 -4
- package/dist/cjs/limel-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
- package/dist/cjs/limel-circular-progress_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +11 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +3 -3
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js +3 -3
- package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-config.cjs.entry.js +1 -1
- package/dist/cjs/limel-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
- package/dist/cjs/limel-dock-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-dock.cjs.entry.js +1 -1
- package/dist/cjs/limel-file.cjs.entry.js +2 -2
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +15 -3
- package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -1
- package/dist/cjs/limel-helper-line.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js +8 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-icon.cjs.entry.js +91 -9
- package/dist/cjs/limel-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limel-input-field.cjs.entry.js +11 -11
- package/dist/cjs/limel-input-field.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-list_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-menu_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-popover_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-portal.cjs.entry.js +1 -1
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-progress-flow.cjs.entry.js +1 -1
- package/dist/cjs/limel-select.cjs.entry.js +2 -2
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +138 -129
- package/dist/cjs/limel-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/limel-spinner.cjs.entry.js +1 -1
- package/dist/cjs/limel-split-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-switch.cjs.entry.js +25 -12
- package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +1 -1
- package/dist/cjs/limel-tooltip_2.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/makeEnterClickable-aa2ed75b.js +68 -0
- package/dist/cjs/makeEnterClickable-aa2ed75b.js.map +1 -0
- package/dist/cjs/{random-string-4c3b7f1c.js → random-string-c8445652.js} +10 -2
- package/dist/cjs/random-string-c8445652.js.map +1 -0
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js +9 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js.map +1 -1
- package/dist/collection/components/action-bar/action-bar.js +0 -1
- package/dist/collection/components/action-bar/action-bar.js.map +1 -1
- package/dist/collection/components/button/button.js +8 -0
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.js +18 -1
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.template.js +3 -3
- package/dist/collection/components/checkbox/checkbox.template.js.map +1 -1
- package/dist/collection/components/collapsible-section/collapsible-section.js +11 -1
- package/dist/collection/components/collapsible-section/collapsible-section.js.map +1 -1
- package/dist/collection/components/color-picker/color-picker-palette.css +46 -21
- package/dist/collection/components/color-picker/color-picker-palette.js +1 -1
- package/dist/collection/components/color-picker/color-picker-palette.js.map +1 -1
- package/dist/collection/components/color-picker/color-picker.css +29 -21
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/color-picker/color-picker.js.map +1 -1
- package/dist/collection/components/form/fields/schema-field.js +13 -1
- package/dist/collection/components/form/fields/schema-field.js.map +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icon.js.map +1 -1
- package/dist/collection/components/icon-button/icon-button.js +7 -0
- package/dist/collection/components/icon-button/icon-button.js.map +1 -1
- package/dist/collection/components/input-field/input-field.js +9 -9
- package/dist/collection/components/input-field/input-field.js.map +1 -1
- package/dist/collection/components/slider/slider.js +140 -131
- package/dist/collection/components/slider/slider.js.map +1 -1
- package/dist/collection/components/switch/switch.css +22 -1
- package/dist/collection/components/switch/switch.js +50 -10
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/global/{icon-cache.js → icon-cache/cache-storage-icon-cache.js} +4 -9
- package/dist/collection/global/icon-cache/cache-storage-icon-cache.js.map +1 -0
- package/dist/collection/global/icon-cache/factory.js +16 -0
- package/dist/collection/global/icon-cache/factory.js.map +1 -0
- package/dist/collection/global/icon-cache/in-memory-icon-cache.js +73 -0
- package/dist/collection/global/icon-cache/in-memory-icon-cache.js.map +1 -0
- package/dist/collection/util/makeEnterClickable.js +61 -0
- package/dist/collection/util/makeEnterClickable.js.map +1 -0
- package/dist/collection/util/random-string.js +9 -1
- package/dist/collection/util/random-string.js.map +1 -1
- package/dist/esm/{checkbox.template-c838ee7b.js → checkbox.template-c2d0fa10.js} +5 -5
- package/dist/esm/checkbox.template-c2d0fa10.js.map +1 -0
- package/dist/esm/{index-9bd6d7c6.js → index-232e9616.js} +14 -2
- package/dist/{lime-elements/p-c8818b66.js.map → esm/index-232e9616.js.map} +1 -1
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-action-bar-item_2.entry.js +10 -2
- package/dist/esm/limel-action-bar-item_2.entry.js.map +1 -1
- package/dist/esm/limel-action-bar.entry.js +1 -1
- package/dist/esm/limel-action-bar.entry.js.map +1 -1
- package/dist/esm/limel-badge.entry.js +1 -1
- package/dist/esm/limel-banner.entry.js +1 -1
- package/dist/esm/limel-button-group.entry.js +2 -2
- package/dist/esm/limel-button.entry.js +9 -1
- package/dist/esm/limel-button.entry.js.map +1 -1
- package/dist/esm/limel-callout.entry.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +5 -4
- package/dist/esm/limel-checkbox.entry.js.map +1 -1
- package/dist/esm/limel-chip-set.entry.js +1 -1
- package/dist/esm/limel-circular-progress_2.entry.js +1 -1
- package/dist/esm/limel-code-editor.entry.js +1 -1
- package/dist/esm/limel-collapsible-section.entry.js +11 -1
- package/dist/esm/limel-collapsible-section.entry.js.map +1 -1
- package/dist/esm/limel-color-picker-palette.entry.js +3 -3
- package/dist/esm/limel-color-picker-palette.entry.js.map +1 -1
- package/dist/esm/limel-color-picker.entry.js +3 -3
- package/dist/esm/limel-color-picker.entry.js.map +1 -1
- package/dist/esm/limel-config.entry.js +1 -1
- package/dist/esm/limel-date-picker.entry.js +2 -2
- package/dist/esm/limel-dialog.entry.js +2 -2
- package/dist/esm/limel-dock-button.entry.js +2 -2
- package/dist/esm/limel-dock.entry.js +1 -1
- package/dist/esm/limel-file.entry.js +2 -2
- package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
- package/dist/esm/limel-flex-container.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +15 -3
- package/dist/esm/limel-form.entry.js.map +1 -1
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +1 -1
- package/dist/esm/limel-helper-line.entry.js +1 -1
- package/dist/esm/limel-icon-button.entry.js +8 -1
- package/dist/esm/limel-icon-button.entry.js.map +1 -1
- package/dist/esm/limel-icon.entry.js +91 -9
- package/dist/esm/limel-icon.entry.js.map +1 -1
- package/dist/esm/limel-info-tile.entry.js +1 -1
- package/dist/esm/limel-input-field.entry.js +11 -11
- package/dist/esm/limel-input-field.entry.js.map +1 -1
- package/dist/esm/limel-list_2.entry.js +2 -2
- package/dist/esm/limel-menu_2.entry.js +2 -2
- package/dist/esm/limel-picker.entry.js +2 -2
- package/dist/esm/limel-popover_2.entry.js +2 -2
- package/dist/esm/limel-portal.entry.js +1 -1
- package/dist/esm/limel-progress-flow-item.entry.js +1 -1
- package/dist/esm/limel-progress-flow.entry.js +1 -1
- package/dist/esm/limel-select.entry.js +2 -2
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +138 -129
- package/dist/esm/limel-slider.entry.js.map +1 -1
- package/dist/esm/limel-snackbar.entry.js +1 -1
- package/dist/esm/limel-spinner.entry.js +1 -1
- package/dist/esm/limel-split-button.entry.js +1 -1
- package/dist/esm/limel-switch.entry.js +25 -12
- package/dist/esm/limel-switch.entry.js.map +1 -1
- package/dist/esm/limel-tab-bar.entry.js +1 -1
- package/dist/esm/limel-tab-panel.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +1 -1
- package/dist/esm/limel-tooltip_2.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/makeEnterClickable-b5ad939a.js +65 -0
- package/dist/esm/makeEnterClickable-b5ad939a.js.map +1 -0
- package/dist/esm/{random-string-2246b81e.js → random-string-812b1c35.js} +10 -2
- package/dist/esm/random-string-812b1c35.js.map +1 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/{p-9aab2892.entry.js → p-095e03af.entry.js} +2 -2
- package/dist/lime-elements/{p-e0fa49ca.entry.js → p-0d823554.entry.js} +2 -2
- package/dist/lime-elements/p-0d823554.entry.js.map +1 -0
- package/dist/lime-elements/{p-40b7d717.entry.js → p-0edcca0b.entry.js} +2 -2
- package/dist/lime-elements/{p-ca9b383b.entry.js → p-1754c5ae.entry.js} +2 -2
- package/dist/lime-elements/{p-a3bea367.entry.js → p-1bdc524d.entry.js} +2 -2
- package/dist/lime-elements/{p-c8818b66.js → p-3075aa67.js} +3 -3
- package/dist/lime-elements/p-3075aa67.js.map +1 -0
- package/dist/lime-elements/{p-13ed01eb.entry.js → p-32127a17.entry.js} +2 -2
- package/dist/lime-elements/{p-2565927b.entry.js → p-378bb196.entry.js} +3 -3
- package/dist/lime-elements/{p-2565927b.entry.js.map → p-378bb196.entry.js.map} +1 -1
- package/dist/lime-elements/p-3ccdc4a3.js +2 -0
- package/dist/lime-elements/p-3ccdc4a3.js.map +1 -0
- package/dist/lime-elements/{p-17ac8cca.entry.js → p-42f06b16.entry.js} +2 -2
- package/dist/lime-elements/{p-8b339748.entry.js → p-455edb30.entry.js} +2 -2
- package/dist/lime-elements/p-4607900f.entry.js +2 -0
- package/dist/lime-elements/p-4607900f.entry.js.map +1 -0
- package/dist/lime-elements/{p-9fe3bc64.entry.js → p-4a04ede1.entry.js} +2 -2
- package/dist/lime-elements/{p-a8714655.entry.js → p-4fc7e0df.entry.js} +2 -2
- package/dist/lime-elements/p-5235c79f.entry.js +2 -0
- package/dist/lime-elements/p-5235c79f.entry.js.map +1 -0
- package/dist/lime-elements/{p-1a80da5e.entry.js → p-550cae4a.entry.js} +2 -2
- package/dist/lime-elements/{p-623d09d9.entry.js → p-552fd521.entry.js} +2 -2
- package/dist/lime-elements/{p-42a24572.entry.js → p-55dcbc35.entry.js} +2 -2
- package/dist/lime-elements/{p-30df2bb6.entry.js → p-5afea754.entry.js} +2 -2
- package/dist/lime-elements/{p-c647b197.entry.js → p-5fb4402e.entry.js} +2 -2
- package/dist/lime-elements/{p-3670f018.entry.js → p-6762616d.entry.js} +2 -2
- package/dist/lime-elements/{p-d7c39d02.entry.js → p-6f09978e.entry.js} +8 -8
- package/dist/lime-elements/p-6f09978e.entry.js.map +1 -0
- package/dist/lime-elements/p-6f2fad3a.entry.js +2 -0
- package/dist/lime-elements/p-6f2fad3a.entry.js.map +1 -0
- package/dist/lime-elements/{p-2b0c6ccd.entry.js → p-7972528a.entry.js} +2 -2
- package/dist/lime-elements/p-7cfc8998.js +2 -0
- package/dist/lime-elements/p-7cfc8998.js.map +1 -0
- package/dist/lime-elements/{p-a40e05c3.entry.js → p-7d159ddf.entry.js} +2 -2
- package/dist/lime-elements/{p-6b952164.entry.js → p-8d44ea19.entry.js} +2 -2
- package/dist/lime-elements/{p-848437f8.entry.js → p-94cb40fb.entry.js} +2 -2
- package/dist/lime-elements/{p-795079c9.entry.js → p-95ed1b9b.entry.js} +2 -2
- package/dist/lime-elements/{p-d228fd62.entry.js → p-9a5745e5.entry.js} +2 -2
- package/dist/lime-elements/{p-4114c214.entry.js → p-9c1db0e7.entry.js} +2 -2
- package/dist/lime-elements/{p-55a09930.entry.js → p-9f5250a0.entry.js} +2 -2
- package/dist/lime-elements/{p-d07f1a1f.entry.js → p-add09e7d.entry.js} +2 -2
- package/dist/lime-elements/{p-e59e0040.entry.js → p-af374a0c.entry.js} +2 -2
- package/dist/lime-elements/{p-648d9057.entry.js → p-b3ff8fef.entry.js} +2 -2
- package/dist/lime-elements/{p-715d3252.entry.js → p-b70f517e.entry.js} +2 -2
- package/dist/lime-elements/{p-da25e94d.entry.js → p-b714596f.entry.js} +2 -2
- package/dist/lime-elements/p-b714596f.entry.js.map +1 -0
- package/dist/lime-elements/{p-753f500b.entry.js → p-b897fe1f.entry.js} +2 -2
- package/dist/lime-elements/{p-2359d139.entry.js → p-b9698f79.entry.js} +2 -2
- package/dist/lime-elements/{p-5b374246.entry.js → p-bc23beb6.entry.js} +2 -2
- package/dist/lime-elements/{p-f1d9723a.entry.js → p-bd62071d.entry.js} +2 -2
- package/dist/lime-elements/{p-4ed75a11.entry.js → p-c6f8ea40.entry.js} +6 -6
- package/dist/lime-elements/p-c6f8ea40.entry.js.map +1 -0
- package/dist/lime-elements/p-c9bdda85.js +2 -0
- package/dist/lime-elements/p-c9bdda85.js.map +1 -0
- package/dist/lime-elements/{p-b8ed25b3.entry.js → p-ce1fca54.entry.js} +2 -2
- package/dist/lime-elements/p-ce1fca54.entry.js.map +1 -0
- package/dist/lime-elements/{p-a11a971e.entry.js → p-cf61ac34.entry.js} +2 -2
- package/dist/lime-elements/{p-9e78a21c.entry.js → p-d419c102.entry.js} +3 -3
- package/dist/lime-elements/{p-9e78a21c.entry.js.map → p-d419c102.entry.js.map} +1 -1
- package/dist/lime-elements/{p-7a3f58cd.entry.js → p-dd14b927.entry.js} +2 -2
- package/dist/lime-elements/p-e0a0065f.entry.js +2 -0
- package/dist/lime-elements/p-e0a0065f.entry.js.map +1 -0
- package/dist/lime-elements/{p-2118b9ae.entry.js → p-eae4f1ed.entry.js} +2 -2
- package/dist/lime-elements/p-ee887c40.entry.js +2 -0
- package/dist/lime-elements/p-ee887c40.entry.js.map +1 -0
- package/dist/lime-elements/{p-461b5f85.entry.js → p-f1b0951f.entry.js} +5 -5
- package/dist/lime-elements/p-f1b0951f.entry.js.map +1 -0
- package/dist/lime-elements/p-f4ff7ecc.entry.js +2 -0
- package/dist/lime-elements/p-f4ff7ecc.entry.js.map +1 -0
- package/dist/types/components/action-bar/action-bar-item/action-bar-item.d.ts +3 -0
- package/dist/types/components/action-bar/action-bar.d.ts +0 -1
- package/dist/types/components/button/button.d.ts +3 -0
- package/dist/types/components/checkbox/checkbox.d.ts +17 -0
- package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
- package/dist/types/components/collapsible-section/collapsible-section.d.ts +3 -0
- package/dist/types/components/icon-button/icon-button.d.ts +2 -0
- package/dist/types/components/input-field/input-field.d.ts +2 -0
- package/dist/types/components/slider/slider.d.ts +13 -11
- package/dist/types/components/switch/switch.d.ts +19 -1
- package/dist/types/components.d.ts +92 -8
- package/dist/types/global/{icon-cache.d.ts → icon-cache/cache-storage-icon-cache.d.ts} +2 -4
- package/dist/types/global/icon-cache/factory.d.ts +4 -0
- package/dist/types/global/icon-cache/in-memory-icon-cache.d.ts +15 -0
- package/dist/types/util/makeEnterClickable.d.ts +7 -0
- package/package.json +11 -11
- package/dist/cjs/checkbox.template-234f4813.js.map +0 -1
- package/dist/cjs/index-aafa56ee.js.map +0 -1
- package/dist/cjs/random-string-4c3b7f1c.js.map +0 -1
- package/dist/collection/global/icon-cache.js.map +0 -1
- package/dist/esm/checkbox.template-c838ee7b.js.map +0 -1
- package/dist/esm/index-9bd6d7c6.js.map +0 -1
- package/dist/esm/random-string-2246b81e.js.map +0 -1
- package/dist/lime-elements/p-0137d2fb.entry.js +0 -2
- package/dist/lime-elements/p-0137d2fb.entry.js.map +0 -1
- package/dist/lime-elements/p-1dc042e5.entry.js +0 -2
- package/dist/lime-elements/p-1dc042e5.entry.js.map +0 -1
- package/dist/lime-elements/p-28da3c47.entry.js +0 -2
- package/dist/lime-elements/p-28da3c47.entry.js.map +0 -1
- package/dist/lime-elements/p-461b5f85.entry.js.map +0 -1
- package/dist/lime-elements/p-4ed75a11.entry.js.map +0 -1
- package/dist/lime-elements/p-5b6d2d55.js +0 -2
- package/dist/lime-elements/p-5b6d2d55.js.map +0 -1
- package/dist/lime-elements/p-63111b62.entry.js +0 -2
- package/dist/lime-elements/p-63111b62.entry.js.map +0 -1
- package/dist/lime-elements/p-6c094f3f.js +0 -2
- package/dist/lime-elements/p-6c094f3f.js.map +0 -1
- package/dist/lime-elements/p-896043d6.entry.js +0 -2
- package/dist/lime-elements/p-896043d6.entry.js.map +0 -1
- package/dist/lime-elements/p-b8ed25b3.entry.js.map +0 -1
- package/dist/lime-elements/p-d7c39d02.entry.js.map +0 -1
- package/dist/lime-elements/p-da25e94d.entry.js.map +0 -1
- package/dist/lime-elements/p-e0fa49ca.entry.js.map +0 -1
- package/dist/lime-elements/p-fb799569.entry.js +0 -2
- package/dist/lime-elements/p-fb799569.entry.js.map +0 -1
- /package/dist/lime-elements/{p-9aab2892.entry.js.map → p-095e03af.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-40b7d717.entry.js.map → p-0edcca0b.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-ca9b383b.entry.js.map → p-1754c5ae.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-a3bea367.entry.js.map → p-1bdc524d.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-13ed01eb.entry.js.map → p-32127a17.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-17ac8cca.entry.js.map → p-42f06b16.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-8b339748.entry.js.map → p-455edb30.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-9fe3bc64.entry.js.map → p-4a04ede1.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-a8714655.entry.js.map → p-4fc7e0df.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-1a80da5e.entry.js.map → p-550cae4a.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-623d09d9.entry.js.map → p-552fd521.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-42a24572.entry.js.map → p-55dcbc35.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-30df2bb6.entry.js.map → p-5afea754.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-c647b197.entry.js.map → p-5fb4402e.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-3670f018.entry.js.map → p-6762616d.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-2b0c6ccd.entry.js.map → p-7972528a.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-a40e05c3.entry.js.map → p-7d159ddf.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-6b952164.entry.js.map → p-8d44ea19.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-848437f8.entry.js.map → p-94cb40fb.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-795079c9.entry.js.map → p-95ed1b9b.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-d228fd62.entry.js.map → p-9a5745e5.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-4114c214.entry.js.map → p-9c1db0e7.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-55a09930.entry.js.map → p-9f5250a0.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-d07f1a1f.entry.js.map → p-add09e7d.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-e59e0040.entry.js.map → p-af374a0c.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-648d9057.entry.js.map → p-b3ff8fef.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-715d3252.entry.js.map → p-b70f517e.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-753f500b.entry.js.map → p-b897fe1f.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-2359d139.entry.js.map → p-b9698f79.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-5b374246.entry.js.map → p-bc23beb6.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-f1d9723a.entry.js.map → p-bd62071d.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-a11a971e.entry.js.map → p-cf61ac34.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-7a3f58cd.entry.js.map → p-dd14b927.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-2118b9ae.entry.js.map → p-eae4f1ed.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","CssClasses","Selectors","observeProperty","target","property","observer","targetObservers","installObserver","observers","getObservers","push","splice","indexOf","allTargetObservers","WeakMap","observersMap","Map","has","set","isEnabled","key","get","installedProperties","Set","descriptor","getDescriptor","configurable","enumerable","value","writable","observedDescriptor","descGet","descSet","value_1","newValue","e_4","_a","previous","_b","__values","_c","next","done","e_4_1","error","return","add","defineProperty","descriptorTarget","getOwnPropertyDescriptor","getPrototypeOf","setObserversEnabled","enabled","MDCObserverFoundation","_super","adapter","_this","unobserves","destroy","unobserve","observe","e_1","cleanup","keys","bind","e_1_1","e_2","cleanup_1","cleanup_1_1","cleanupFn","e_2_1","delete","e_3","__spreadArray","__read","e_3_1","MDCFoundation","MDCSwitchFoundation","handleClick","init","state","disabled","stopProcessingIfDisabled","processing","selected","MDCSwitchRenderFoundation","onDisabledChange","onProcessingChange","onSelectedChange","initFromDOM","hasClass","SELECTED","isDisabled","PROCESSING","setDisabled","toggleClass","setAriaChecked","UNSELECTED","addClass","className","removeClass","MDCSwitch","root","foundation","attachTo","initialize","ripple","MDCRipple","createRippleFoundation","initialSyncWithDOM","rippleElement","querySelector","RIPPLE","Error","addEventListener","removeEventListener","getDefaultFoundation","createAdapter","classList","contains","remove","ariaChecked","setAttribute","MDCRippleFoundation","createRippleAdapter","computeBoundingRect","getBoundingClientRect","isUnbounded","MDCComponent","switchCss","Switch","event","stopPropagation","change","emit","createRandomString","connectedCallback","componentDidLoad","element","host","shadowRoot","mdcSwitch","disconnectedCallback","render","h","id","fieldId","class","readonly","type","role","onClick","viewBox","htmlFor","label","valueWatcher"],"sources":["./node_modules/@material/switch/node_modules/tslib/tslib.es6.js","./node_modules/@material/switch/constants.js","./node_modules/@material/base/observer.js","./node_modules/@material/base/observer-foundation.js","./node_modules/@material/switch/foundation.js","./node_modules/@material/switch/component.js","./src/components/switch/switch.scss?tag=limel-switch&encapsulation=shadow","./src/components/switch/switch.tsx"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * CSS classes used for switch.\n */\nexport var CssClasses;\n(function (CssClasses) {\n CssClasses[\"PROCESSING\"] = \"mdc-switch--processing\";\n CssClasses[\"SELECTED\"] = \"mdc-switch--selected\";\n CssClasses[\"UNSELECTED\"] = \"mdc-switch--unselected\";\n})(CssClasses || (CssClasses = {}));\n/**\n * Query selectors used for switch.\n */\nexport var Selectors;\n(function (Selectors) {\n Selectors[\"RIPPLE\"] = \".mdc-switch__ripple\";\n})(Selectors || (Selectors = {}));\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __read, __spreadArray, __values } from \"tslib\";\n/**\n * Mixin to add `MDCObserver` functionality to an optional base class.\n *\n * @deprecated Prefer MDCObserverFoundation for stricter closure compliance.\n * @template C Optional base class constructor type.\n * @param baseClass - Optional base class.\n * @return A class that extends the optional base class with `MDCObserver`\n * functionality.\n */\nexport function mdcObserver(baseClass) {\n if (baseClass === void 0) { baseClass = /** @class */ (function () {\n function class_1() {\n }\n return class_1;\n }()); }\n // Mixin classes cannot use private members and Symbol() cannot be used in 3P\n // for IE11.\n var unobserveMap = new WeakMap();\n return /** @class */ (function (_super) {\n __extends(MDCObserver, _super);\n function MDCObserver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MDCObserver.prototype.observe = function (target, observers) {\n var e_1, _a;\n var _this = this;\n var cleanup = [];\n try {\n for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var property = _c.value;\n var observer = observers[property].bind(this);\n cleanup.push(observeProperty(target, property, observer));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var unobserve = function () {\n var e_2, _a;\n try {\n for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n var cleanupFn = cleanup_1_1.value;\n cleanupFn();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n var unobserves = unobserveMap.get(_this) || [];\n var index = unobserves.indexOf(unobserve);\n if (index > -1) {\n unobserves.splice(index, 1);\n }\n };\n var unobserves = unobserveMap.get(this);\n if (!unobserves) {\n unobserves = [];\n unobserveMap.set(this, unobserves);\n }\n unobserves.push(unobserve);\n return unobserve;\n };\n MDCObserver.prototype.setObserversEnabled = function (target, enabled) {\n setObserversEnabled(target, enabled);\n };\n MDCObserver.prototype.unobserve = function () {\n var e_3, _a;\n // Iterate over a copy since unobserve() will remove themselves from the\n // array\n var unobserves = unobserveMap.get(this) || [];\n try {\n for (var _b = __values(__spreadArray([], __read(unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n var unobserve = _c.value;\n unobserve();\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n return MDCObserver;\n }(baseClass));\n}\n/**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current and\n * previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n * changes.\n * @return A cleanup function that will stop observing changes for the provided\n * `Observer`.\n */\nexport function observeProperty(target, property, observer) {\n var targetObservers = installObserver(target, property);\n var observers = targetObservers.getObservers(property);\n observers.push(observer);\n return function () {\n observers.splice(observers.indexOf(observer), 1);\n };\n}\n/**\n * A Map of all `TargetObservers` that have been installed.\n */\nvar allTargetObservers = new WeakMap();\n/**\n * Installs a `TargetObservers` for the provided target (if not already\n * installed), and replaces the given property with a getter and setter that\n * will respond to changes and call `TargetObservers`.\n *\n * Subsequent calls to `installObserver()` with the same target and property\n * will not override the property's previously installed getter/setter.\n *\n * @template T The observed target type.\n * @template K The observed property to create a getter/setter for.\n * @param target - The target to observe.\n * @param property - The property to create a getter/setter for, if needed.\n * @return The installed `TargetObservers` for the provided target.\n */\nfunction installObserver(target, property) {\n var observersMap = new Map();\n if (!allTargetObservers.has(target)) {\n allTargetObservers.set(target, {\n isEnabled: true,\n getObservers: function (key) {\n var observers = observersMap.get(key) || [];\n if (!observersMap.has(key)) {\n observersMap.set(key, observers);\n }\n return observers;\n },\n installedProperties: new Set()\n });\n }\n var targetObservers = allTargetObservers.get(target);\n if (targetObservers.installedProperties.has(property)) {\n // The getter/setter has already been replaced for this property\n return targetObservers;\n }\n // Retrieve (or create if it's a plain property) the original descriptor from\n // the target...\n var descriptor = getDescriptor(target, property) || {\n configurable: true,\n enumerable: true,\n value: target[property],\n writable: true\n };\n // ...and create a copy that will be used for the observer.\n var observedDescriptor = __assign({}, descriptor);\n var descGet = descriptor.get, descSet = descriptor.set;\n if ('value' in descriptor) {\n // The descriptor is a simple value (not a getter/setter).\n // For our observer descriptor that we copied, delete the value/writable\n // properties, since they are incompatible with the get/set properties\n // for descriptors.\n delete observedDescriptor.value;\n delete observedDescriptor.writable;\n // Set up a simple getter...\n var value_1 = descriptor.value;\n descGet = function () { return value_1; };\n // ...and setter (if the original property was writable).\n if (descriptor.writable) {\n descSet = function (newValue) {\n value_1 = newValue;\n };\n }\n }\n if (descGet) {\n observedDescriptor.get = function () {\n // `this as T` needed for closure conformance\n return descGet.call(this);\n };\n }\n if (descSet) {\n observedDescriptor.set = function (newValue) {\n var e_4, _a;\n // `thus as T` needed for closure conformance\n var previous = descGet ? descGet.call(this) : newValue;\n descSet.call(this, newValue);\n if (targetObservers.isEnabled && (!descGet || newValue !== previous)) {\n try {\n for (var _b = __values(targetObservers.getObservers(property)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer(newValue, previous);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n };\n }\n targetObservers.installedProperties.add(property);\n Object.defineProperty(target, property, observedDescriptor);\n return targetObservers;\n}\n/**\n * Retrieves the descriptor for a property from the provided target. This\n * function will walk up the target's prototype chain to search for the\n * descriptor.\n *\n * @template T The target type.\n * @template K The property type.\n * @param target - The target to retrieve a descriptor from.\n * @param property - The name of the property to retrieve a descriptor for.\n * @return the descriptor, or undefined if it does not exist. Keep in mind that\n * plain properties may not have a descriptor defined.\n */\nexport function getDescriptor(target, property) {\n var descriptorTarget = target;\n var descriptor;\n while (descriptorTarget) {\n descriptor = Object.getOwnPropertyDescriptor(descriptorTarget, property);\n if (descriptor) {\n break;\n }\n // Walk up the instance's prototype chain in case the property is declared\n // on a superclass.\n descriptorTarget = Object.getPrototypeOf(descriptorTarget);\n }\n return descriptor;\n}\n/**\n * Enables or disables all observers for a provided target. Changes to observed\n * properties will not call any observers when disabled.\n *\n * @template T The observed target type.\n * @param target - The target to enable or disable observers for.\n * @param enabled - True to enable or false to disable observers.\n */\nexport function setObserversEnabled(target, enabled) {\n var targetObservers = allTargetObservers.get(target);\n if (targetObservers) {\n targetObservers.isEnabled = enabled;\n }\n}\n//# sourceMappingURL=observer.js.map","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends, __read, __spreadArray, __values } from \"tslib\";\nimport { MDCFoundation } from './foundation';\nimport { observeProperty, setObserversEnabled } from './observer';\nvar MDCObserverFoundation = /** @class */ (function (_super) {\n __extends(MDCObserverFoundation, _super);\n function MDCObserverFoundation(adapter) {\n var _this = _super.call(this, adapter) || this;\n /** A set of cleanup functions to unobserve changes. */\n _this.unobserves = new Set();\n return _this;\n }\n MDCObserverFoundation.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.unobserve();\n };\n /**\n * Observe a target's properties for changes using the provided map of\n * property names and observer functions.\n *\n * @template T The target type.\n * @param target - The target to observe.\n * @param observers - An object whose keys are target properties and values\n * are observer functions that are called when the associated property\n * changes.\n * @return A cleanup function that can be called to unobserve the\n * target.\n */\n MDCObserverFoundation.prototype.observe = function (target, observers) {\n var e_1, _a;\n var _this = this;\n var cleanup = [];\n try {\n for (var _b = __values(Object.keys(observers)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var property = _c.value;\n var observer = observers[property].bind(this);\n cleanup.push(this.observeProperty(target, property, observer));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var unobserve = function () {\n var e_2, _a;\n try {\n for (var cleanup_1 = __values(cleanup), cleanup_1_1 = cleanup_1.next(); !cleanup_1_1.done; cleanup_1_1 = cleanup_1.next()) {\n var cleanupFn = cleanup_1_1.value;\n cleanupFn();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (cleanup_1_1 && !cleanup_1_1.done && (_a = cleanup_1.return)) _a.call(cleanup_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n _this.unobserves.delete(unobserve);\n };\n this.unobserves.add(unobserve);\n return unobserve;\n };\n /**\n * Observe a target's property for changes. When a property changes, the\n * provided `Observer` function will be invoked with the properties current\n * and previous values.\n *\n * The returned cleanup function will stop listening to changes for the\n * provided `Observer`.\n *\n * @template T The observed target type.\n * @template K The observed property.\n * @param target - The target to observe.\n * @param property - The property of the target to observe.\n * @param observer - An observer function to invoke each time the property\n * changes.\n * @return A cleanup function that will stop observing changes for the\n * provided `Observer`.\n */\n MDCObserverFoundation.prototype.observeProperty = function (target, property, observer) {\n return observeProperty(target, property, observer);\n };\n /**\n * Enables or disables all observers for the provided target. Disabling\n * observers will prevent them from being called until they are re-enabled.\n *\n * @param target - The target to enable or disable observers for.\n * @param enabled - Whether or not observers should be called.\n */\n MDCObserverFoundation.prototype.setObserversEnabled = function (target, enabled) {\n setObserversEnabled(target, enabled);\n };\n /**\n * Clean up all observers and stop listening for property changes.\n */\n MDCObserverFoundation.prototype.unobserve = function () {\n var e_3, _a;\n try {\n // Iterate over a copy since unobserve() will remove themselves from the set\n for (var _b = __values(__spreadArray([], __read(this.unobserves))), _c = _b.next(); !_c.done; _c = _b.next()) {\n var unobserve = _c.value;\n unobserve();\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n return MDCObserverFoundation;\n}(MDCFoundation));\nexport { MDCObserverFoundation };\n//# sourceMappingURL=observer-foundation.js.map","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __extends } from \"tslib\";\nimport { MDCObserverFoundation } from '@material/base/observer-foundation';\nimport { CssClasses } from './constants';\n/**\n * `MDCSwitchFoundation` provides a state-only foundation for a switch\n * component.\n *\n * State observers and event handler entrypoints update a component's adapter's\n * state with the logic needed for switch to function.\n */\nvar MDCSwitchFoundation = /** @class */ (function (_super) {\n __extends(MDCSwitchFoundation, _super);\n function MDCSwitchFoundation(adapter) {\n var _this = _super.call(this, adapter) || this;\n _this.handleClick = _this.handleClick.bind(_this);\n return _this;\n }\n /**\n * Initializes the foundation and starts observing state changes.\n */\n MDCSwitchFoundation.prototype.init = function () {\n this.observe(this.adapter.state, {\n disabled: this.stopProcessingIfDisabled,\n processing: this.stopProcessingIfDisabled,\n });\n };\n /**\n * Event handler for switch click events. Clicking on a switch will toggle its\n * selected state.\n */\n MDCSwitchFoundation.prototype.handleClick = function () {\n if (this.adapter.state.disabled) {\n return;\n }\n this.adapter.state.selected = !this.adapter.state.selected;\n };\n MDCSwitchFoundation.prototype.stopProcessingIfDisabled = function () {\n if (this.adapter.state.disabled) {\n this.adapter.state.processing = false;\n }\n };\n return MDCSwitchFoundation;\n}(MDCObserverFoundation));\nexport { MDCSwitchFoundation };\n/**\n * `MDCSwitchRenderFoundation` provides a state and rendering foundation for a\n * switch component.\n *\n * State observers and event handler entrypoints update a component's\n * adapter's state with the logic needed for switch to function.\n *\n * In response to state changes, the rendering foundation uses the component's\n * render adapter to keep the component's DOM updated with the state.\n */\nvar MDCSwitchRenderFoundation = /** @class */ (function (_super) {\n __extends(MDCSwitchRenderFoundation, _super);\n function MDCSwitchRenderFoundation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Initializes the foundation and starts observing state changes.\n */\n MDCSwitchRenderFoundation.prototype.init = function () {\n _super.prototype.init.call(this);\n this.observe(this.adapter.state, {\n disabled: this.onDisabledChange,\n processing: this.onProcessingChange,\n selected: this.onSelectedChange,\n });\n };\n /**\n * Initializes the foundation from a server side rendered (SSR) component.\n * This will sync the adapter's state with the current state of the DOM.\n *\n * This method should be called after `init()`.\n */\n MDCSwitchRenderFoundation.prototype.initFromDOM = function () {\n // Turn off observers while setting state\n this.setObserversEnabled(this.adapter.state, false);\n this.adapter.state.selected = this.adapter.hasClass(CssClasses.SELECTED);\n // Ensure aria-checked is set if attribute is not present\n this.onSelectedChange();\n this.adapter.state.disabled = this.adapter.isDisabled();\n this.adapter.state.processing =\n this.adapter.hasClass(CssClasses.PROCESSING);\n // Re-observe state\n this.setObserversEnabled(this.adapter.state, true);\n this.stopProcessingIfDisabled();\n };\n MDCSwitchRenderFoundation.prototype.onDisabledChange = function () {\n this.adapter.setDisabled(this.adapter.state.disabled);\n };\n MDCSwitchRenderFoundation.prototype.onProcessingChange = function () {\n this.toggleClass(this.adapter.state.processing, CssClasses.PROCESSING);\n };\n MDCSwitchRenderFoundation.prototype.onSelectedChange = function () {\n this.adapter.setAriaChecked(String(this.adapter.state.selected));\n this.toggleClass(this.adapter.state.selected, CssClasses.SELECTED);\n this.toggleClass(!this.adapter.state.selected, CssClasses.UNSELECTED);\n };\n MDCSwitchRenderFoundation.prototype.toggleClass = function (addClass, className) {\n if (addClass) {\n this.adapter.addClass(className);\n }\n else {\n this.adapter.removeClass(className);\n }\n };\n return MDCSwitchRenderFoundation;\n}(MDCSwitchFoundation));\nexport { MDCSwitchRenderFoundation };\n//# sourceMappingURL=foundation.js.map","/**\n * @license\n * Copyright 2021 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends } from \"tslib\";\nimport { MDCComponent } from '@material/base/component';\nimport { MDCRipple } from '@material/ripple/component';\nimport { MDCRippleFoundation } from '@material/ripple/foundation';\nimport { Selectors } from './constants';\nimport { MDCSwitchRenderFoundation } from './foundation';\n/**\n * `MDCSwitch` provides a component implementation of a Material Design switch.\n */\nvar MDCSwitch = /** @class */ (function (_super) {\n __extends(MDCSwitch, _super);\n function MDCSwitch(root, foundation) {\n var _this = _super.call(this, root, foundation) || this;\n _this.root = root;\n return _this;\n }\n /**\n * Creates a new `MDCSwitch` and attaches it to the given root element.\n * @param root The root to attach to.\n * @return the new component instance.\n */\n MDCSwitch.attachTo = function (root) {\n return new MDCSwitch(root);\n };\n MDCSwitch.prototype.initialize = function () {\n this.ripple = new MDCRipple(this.root, this.createRippleFoundation());\n };\n MDCSwitch.prototype.initialSyncWithDOM = function () {\n var rippleElement = this.root.querySelector(Selectors.RIPPLE);\n if (!rippleElement) {\n throw new Error(\"Switch \" + Selectors.RIPPLE + \" element is required.\");\n }\n this.rippleElement = rippleElement;\n this.root.addEventListener('click', this.foundation.handleClick);\n this.foundation.initFromDOM();\n };\n MDCSwitch.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.ripple.destroy();\n this.root.removeEventListener('click', this.foundation.handleClick);\n };\n MDCSwitch.prototype.getDefaultFoundation = function () {\n return new MDCSwitchRenderFoundation(this.createAdapter());\n };\n MDCSwitch.prototype.createAdapter = function () {\n var _this = this;\n return {\n addClass: function (className) {\n _this.root.classList.add(className);\n },\n hasClass: function (className) { return _this.root.classList.contains(className); },\n isDisabled: function () { return _this.root.disabled; },\n removeClass: function (className) {\n _this.root.classList.remove(className);\n },\n setAriaChecked: function (ariaChecked) {\n return _this.root.setAttribute('aria-checked', ariaChecked);\n },\n setDisabled: function (disabled) {\n _this.root.disabled = disabled;\n },\n state: this,\n };\n };\n MDCSwitch.prototype.createRippleFoundation = function () {\n return new MDCRippleFoundation(this.createRippleAdapter());\n };\n MDCSwitch.prototype.createRippleAdapter = function () {\n var _this = this;\n return __assign(__assign({}, MDCRipple.createAdapter(this)), { computeBoundingRect: function () { return _this.rippleElement.getBoundingClientRect(); }, isUnbounded: function () { return true; } });\n };\n return MDCSwitch;\n}(MDCComponent));\nexport { MDCSwitch };\n//# sourceMappingURL=component.js.map","@use '../../style/functions';\n@use '../../style/internal/shared_input-select-picker';\n@use '../../style/internal/lime-theme';\n@use '../../style/internal/lime-typography';\n\n@use '@material/switch/styles';\n\n$scale-factor: 0.8;\n\n:host(limel-switch) {\n display: inline-flex;\n align-items: center;\n\n --mdc-switch-selected-icon-color: transparent;\n --mdc-switch-unselected-icon-color: transparent;\n\n --mdc-switch-disabled-selected-icon-opacity: 1;\n --mdc-switch-disabled-unselected-icon-opacity: 1;\n\n --mdc-switch-selected-icon-size: 0.75rem;\n --mdc-switch-unselected-icon-size: 0.75rem;\n\n --mdc-switch-track-height: 1.25rem;\n --mdc-switch-track-shape: var(--mdc-switch-track-height);\n\n --mdc-switch-unselected-focus-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-focus-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-pressed-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-pressed-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-unselected-hover-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-handle-color: var(\n --lime-elevated-surface-background-color\n );\n --mdc-switch-selected-hover-handle-color: var(\n --lime-elevated-surface-background-color\n );\n\n --mdc-switch-unselected-track-color: rgb(var(--contrast-700));\n --mdc-switch-unselected-focus-track-color: rgb(var(--contrast-800));\n --mdc-switch-unselected-pressed-track-color: rgb(var(--contrast-800));\n --mdc-switch-unselected-hover-track-color: rgb(var(--contrast-800));\n --mdc-switch-selected-focus-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-pressed-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-track-color: var(--mdc-theme-primary);\n --mdc-switch-selected-hover-track-color: var(--mdc-theme-primary);\n\n --mdc-switch-handle-elevation: var(--button-shadow-normal);\n --mdc-switch-disabled-track-opacity: 0.4;\n}\n\n.mdc-switch {\n margin-right: functions.pxToRem(8);\n &:hover {\n --mdc-switch-handle-elevation: var(--button-shadow-hovered);\n }\n}\n\nlabel {\n @include lime-typography.typography(body2);\n color: var(--mdc-theme-on-surface);\n\n cursor: pointer;\n\n &.disabled {\n @include shared_input-select-picker.looks-disabled;\n }\n}\n\n.mdc-switch {\n &.mdc-switch--selected,\n &.mdc-switch.mdc-switch--unselected {\n .mdc-switch__handle {\n &:after,\n &:before {\n transform: scale($scale-factor);\n }\n }\n }\n .mdc-switch__shadow {\n transform: scale($scale-factor);\n }\n}\n\n@import './partial-styles/_readonly.scss';\n","import { MDCSwitch } from '@material/switch';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\n\n/**\n * @exampleComponent limel-example-switch\n */\n@Component({\n tag: 'limel-switch',\n shadow: true,\n styleUrl: 'switch.scss',\n})\nexport class Switch {\n /**\n * Label to display next to the switch\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Disables the switch when `true`,\n * and visually shows that the switch is editable but disabled.\n * This tells the users that if certain requirements are met,\n * the switch may become interactable.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Disables the switch when `true`. This visualizes the switch slightly differently.\n * But shows no visual sign indicating that the switch is disabled\n * or can ever become interactable.\n */\n @Prop({ reflect: true })\n public readonly = false;\n\n /**\n * The value of the switch\n */\n @Prop({ reflect: true })\n public value = false;\n\n /**\n * Emitted when the value has changed\n */\n @Event()\n private change: EventEmitter<boolean>;\n\n @Element()\n private host: HTMLLimelSwitchElement;\n\n @State()\n private fieldId = createRandomString();\n\n private mdcSwitch: MDCSwitch;\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector(\n '.mdc-switch'\n ) as HTMLButtonElement;\n if (!element) {\n return;\n }\n\n this.mdcSwitch = new MDCSwitch(element);\n }\n\n public disconnectedCallback() {\n this.mdcSwitch?.destroy();\n }\n\n public render() {\n return [\n <button\n id={this.fieldId}\n class={{\n 'mdc-switch': true,\n 'lime-switch--readonly': this.readonly,\n 'mdc-switch--unselected': !this.value,\n 'mdc-switch--selected': this.value,\n }}\n type=\"button\"\n role=\"switch\"\n aria-checked={this.value}\n disabled={this.disabled || this.readonly}\n onClick={this.handleClick}\n >\n <div class=\"mdc-switch__track\" />\n <div class=\"mdc-switch__handle-track\">\n <div class=\"mdc-switch__handle\">\n <div class=\"mdc-switch__shadow\">\n <div class=\"mdc-elevation-overlay\"></div>\n </div>\n <div class=\"mdc-switch__ripple\"></div>\n <div class=\"mdc-switch__icons\">\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--on\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\" />\n </svg>\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--off\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M20 13H4v-2h16v2z\" />\n </svg>\n </div>\n </div>\n </div>\n </button>,\n <label\n class={`${this.disabled || this.readonly ? 'disabled' : ''}`}\n htmlFor={this.fieldId}\n >\n {this.label}\n </label>,\n ];\n }\n\n @Watch('value')\n protected valueWatcher(newValue: boolean) {\n if (!this.mdcSwitch) {\n return;\n }\n\n this.mdcSwitch.selected = newValue;\n }\n\n private handleClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.change.emit(!this.value);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;gFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAC5BF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAE,GACzE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAG,GAAIC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,GAAIN,EAAEM,GAAKL,EAAEK,EAAG,EACnG,OAAOP,EAAcC,EAAGC,EAC5B,EAEO,SAASS,EAAUV,EAAGC,GACzB,UAAWA,IAAM,YAAcA,IAAM,KACjC,MAAM,IAAIU,UAAU,uBAAyBC,OAAOX,GAAK,iCAC7DF,EAAcC,EAAGC,GACjB,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0 @@
|
|
|
1
|
-
{"version":3,"names":["isItem","item","actionBarCss","ActionBar","this","firstRender","actionBarItems","renderActionBarItem","index","h","onSelect","handleSelect","isVisible","renderOverflowMenu","items","actions","length","overflowCutoff","openDirection","event","stopPropagation","detail","itemSelected","emit","handleIntersection","entries","intersectingItems","filter","entry","isIntersecting","notIntersectingItems","render","overflowActions","slice","Host","accessibleLabel","class","layout","map","connectedCallback","componentDidRender","haveItemsChanged","_a","intersectionObserver","disconnect","createIntersectionObserver","disconnectedCallback","undefined","options","root","host","shadowRoot","querySelector","rootMargin","threshold","IntersectionObserver","querySelectorAll","forEach","actionBarItem","observe","push","someItemRemoved","some","contains","someItemAdded","Array","from","includes"],"sources":["./src/components/action-bar/isItem.ts","./src/components/action-bar/action-bar.scss?tag=limel-action-bar&encapsulation=shadow","./src/components/action-bar/action-bar.tsx"],"sourcesContent":["import { ListSeparator } from '../list/list-item.types';\nimport { ActionBarItem } from './action-bar.types';\n\nexport function isItem(\n item: ActionBarItem | ListSeparator\n): item is ActionBarItem {\n return !('separator' in item);\n}\n","/**\n* @prop --action-bar-item-text-color: Text color of action bar items, defaults to `--contrast-1100`.\n* @prop --action-bar-item-icon-color: Color of the icons displayed on each action bar item. Defaults to the text color. To specify a color for an individual item, use the `iconColor` prop instead.\n* @prop --action-bar-item-max-width: Maximum width of a button in the action bar. Defaults to `10rem`. Keep in mind that the buttons should not appear too big.\n* @prop --action-bar-border-radius: Defines the roundness of the corners of the action bar. Defaults to `0`.\n* @prop --action-bar-background-color: Background color of the whole component. Defaults to `--contrast-100`.\n*/\n\n:host(limel-action-bar) {\n --action-bar-item-height: 2rem;\n\n --limel-action-bar-item-text-color: var(\n --action-bar-item-text-color,\n rgb(var(--contrast-1100))\n );\n\n box-sizing: border-box;\n\n display: inline-flex;\n align-items: center;\n padding: 0.125rem 0.25rem;\n max-width: 100%;\n border-radius: var(--action-bar-border-radius);\n\n background-color: var(\n --action-bar-background-color,\n rgb(var(--contrast-100))\n );\n}\n\n:host(limel-action-bar),\n.items {\n gap: 0.25rem;\n @media (pointer: coarse) {\n gap: 0.5rem;\n }\n}\n\n.items {\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n}\n\n:host(limel-action-bar.is-full-width) {\n width: 100%;\n}\n\n:host(limel-action-bar.is-floating) {\n --action-bar-border-radius: 100vw;\n\n padding-right: 0.125rem;\n padding-left: 0.125rem;\n\n max-width: calc(100% - 2rem);\n box-shadow: var(--shadow-depth-16);\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Element,\n} from '@stencil/core';\nimport { ActionBarItem } from './action-bar.types';\nimport { MenuItem, OpenDirection } from '../menu/menu.types';\nimport { ListSeparator } from '../list/list-item.types';\nimport { isItem } from './isItem';\n\n/**\n * An action bar is a user interface element commonly found in software applications and websites.\n * It typically appears at the top of the screen or within a specific section\n * and serves as a centralized hub for accessing various actions and commands\n * relevant to the current context or page.\n *\n * The action bar often contains a set of clickable icons or buttons (icons + labels)\n * that represent specific actions, such as saving, deleting, editing, sharing,\n * or bulk operations for selected items.\n *\n * The purpose of an action bar is to provide quick and convenient access to\n * frequently used functionalities, enabling users to perform common tasks efficiently.\n * It enhances usability by organizing important actions in a visually prominent and easily accessible location.\n *\n * The action bar's design and layout can vary based on the platform or application,\n * but its primary goal remains consistent—to\n * empower users to interact with the software and perform desired actions effortlessly.\n * @exampleComponent limel-example-action-bar\n * @exampleComponent limel-example-action-bar-overflow-menu\n * @exampleComponent limel-example-action-bar-colors\n * @exampleComponent limel-example-action-bar-floating\n * @exampleComponent limel-example-action-bar-styling\n * @exampleComponent limel-example-action-bar-as-primary-component\n * @private\n */\n@Component({\n tag: 'limel-action-bar',\n shadow: true,\n styleUrl: 'action-bar.scss',\n})\nexport class ActionBar {\n /**\n * Items that are placed in the action bar.\n * These represent primary actions.\n */\n @Prop()\n public actions: Array<ActionBarItem | ListSeparator> = [];\n\n /**\n * A label used to describe the purpose of the element to users\n * of assistive technologies, like screen readers.\n * Example value: \"toolbar\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * - When set to `fullWidth`, the component will take the\n * entire width of its container.\n * - When set to `floating`, the component will get basic stylings\n * to visualize the floating state.\n * :::note\n * You should still properly position the component\n * according to the structure of your user interface.\n * For example, use an `absolute` or `fixed` position.\n * :::\n */\n @Prop({ reflect: true })\n public layout?: 'fullWidth' | 'floating';\n\n /**\n * Defines the location that the content of the overflow menu\n * appears, in relation to its trigger.\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection;\n\n /**\n * Fired when a action bar item has been clicked.\n */\n @Event()\n public itemSelected: EventEmitter<ActionBarItem>;\n\n @Element()\n private host: HTMLElement;\n\n @State()\n private overflowCutoff: number = this.actions.length;\n\n private intersectionObserver: IntersectionObserver;\n private firstRender = true;\n private actionBarItems: HTMLLimelActionBarItemElement[] = [];\n\n public render() {\n let overflowActions: Array<MenuItem | ListSeparator> = [];\n if (this.actions.length) {\n overflowActions = this.actions.slice(this.overflowCutoff);\n }\n\n return (\n <Host\n aria-label={this.accessibleLabel}\n class={{\n 'is-full-width': this.layout === 'fullWidth',\n 'is-floating': this.layout === 'floating',\n }}\n >\n <div class=\"items\">\n {this.actions.map(this.renderActionBarItem)}\n </div>\n {this.renderOverflowMenu(overflowActions)}\n </Host>\n );\n }\n\n public connectedCallback() {}\n\n public componentDidRender() {\n if (this.haveItemsChanged()) {\n this.intersectionObserver?.disconnect();\n this.createIntersectionObserver();\n }\n }\n\n public disconnectedCallback() {\n this.intersectionObserver?.disconnect();\n this.intersectionObserver = undefined;\n this.actionBarItems = [];\n this.connectedCallback = () => this.createIntersectionObserver();\n }\n\n private renderActionBarItem = (item: ActionBarItem, index: number) => {\n return (\n <limel-action-bar-item\n item={item}\n onSelect={this.handleSelect}\n isVisible={this.isVisible(index)}\n />\n );\n };\n\n private renderOverflowMenu = (items: Array<MenuItem | ListSeparator>) => {\n if (!(this.actions.length - this.overflowCutoff)) {\n return;\n }\n\n return (\n <limel-action-bar-overflow-menu\n openDirection={this.openDirection}\n items={items}\n onSelect={this.handleSelect}\n />\n );\n };\n\n private isVisible(index: number) {\n return index < this.overflowCutoff;\n }\n\n private handleSelect = (\n event: CustomEvent<ActionBarItem | ListSeparator>\n ) => {\n event.stopPropagation();\n if (isItem(event.detail)) {\n this.itemSelected.emit(event.detail);\n }\n };\n\n private handleIntersection = (entries: IntersectionObserverEntry[]) => {\n const intersectingItems = entries.filter(\n (entry) => entry.isIntersecting\n );\n\n const notIntersectingItems = entries.filter(\n (entry) => !entry.isIntersecting\n );\n\n if (this.firstRender) {\n this.overflowCutoff = intersectingItems.length;\n } else {\n this.overflowCutoff =\n this.overflowCutoff +\n intersectingItems.length -\n notIntersectingItems.length;\n }\n\n this.firstRender = false;\n };\n\n private createIntersectionObserver() {\n const options = {\n root: this.host.shadowRoot.querySelector('.items'),\n rootMargin: '0px',\n threshold: 1.0,\n };\n\n this.overflowCutoff = this.actions.length;\n this.firstRender = true;\n\n this.actionBarItems = [];\n\n this.intersectionObserver = new IntersectionObserver(\n this.handleIntersection,\n options\n );\n\n this.host.shadowRoot\n .querySelectorAll('limel-action-bar-item')\n .forEach((actionBarItem) => {\n this.observe(actionBarItem);\n });\n }\n\n private observe(actionBarItem: HTMLLimelActionBarItemElement) {\n this.intersectionObserver.observe(actionBarItem);\n this.actionBarItems.push(actionBarItem);\n }\n\n private haveItemsChanged() {\n const someItemRemoved = this.actionBarItems.some(\n (actionBarItem: HTMLLimelActionBarItemElement) =>\n !this.host.shadowRoot.contains(actionBarItem)\n );\n\n const someItemAdded = Array.from(\n this.host.shadowRoot.querySelectorAll('limel-action-bar-item')\n ).some(\n (actionBarItem: HTMLLimelActionBarItemElement) =>\n !this.actionBarItems.includes(actionBarItem)\n );\n\n return someItemRemoved || someItemAdded;\n }\n}\n"],"mappings":"yEAGgBA,EACZC,GAEA,QAAS,cAAeA,EAC5B,CCPA,MAAMC,EAAe,mxB,MC6CRC,EAAS,M,oEAkDVC,KAAAC,YAA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uB,OACHJ,EAAAtC,KAAKuC,wBAAoB,MAAAD,SAAA,SAAAA,EAAEE,aAC3BxC,KAAKuC,qBAAuBI,UAC5B3C,KAAKE,eAAiB,GACtBF,KAAKmC,kBAAoB,IAAMnC,KAAKyC,4B,CA2BhCjC,UAAUJ,GACd,OAAOA,EAAQJ,KAAKa,c,CAiChB4B,6BACJ,MAAMG,EAAU,CACZC,KAAM7C,KAAK8C,KAAKC,WAAWC,cAAc,UACzCC,WAAY,MACZC,UAAW,GAGflD,KAAKa,eAAiBb,KAAKW,QAAQC,OACnCZ,KAAKC,YAAc,KAEnBD,KAAKE,eAAiB,GAEtBF,KAAKuC,qBAAuB,IAAIY,qBAC5BnD,KAAKoB,mBACLwB,GAGJ5C,KAAK8C,KAAKC,WACLK,iBAAiB,yBACjBC,SAASC,IACNtD,KAAKuD,QAAQD,EAAc,G,CAI/BC,QAAQD,GACZtD,KAAKuC,qBAAqBgB,QAAQD,GAClCtD,KAAKE,eAAesD,KAAKF,E,CAGrBjB,mBACJ,MAAMoB,EAAkBzD,KAAKE,eAAewD,MACvCJ,IACItD,KAAK8C,KAAKC,WAAWY,SAASL,KAGvC,MAAMM,EAAgBC,MAAMC,KACxB9D,KAAK8C,KAAKC,WAAWK,iBAAiB,0BACxCM,MACGJ,IACItD,KAAKE,eAAe6D,SAAST,KAGtC,OAAOG,GAAmBG,C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["colors","brightnesses","getColorName","color","brightness","getCssColor","colorPickerPaletteCss","Palette","this","renderSwatches","map","renderSwatch","colorName","classList","swatch","value","h","class","onClick","handleClick","tabindex","handleChange","event","stopPropagation","change","emit","detail","render","background","label","helperText","onChange","required","style"],"sources":["./src/components/color-picker/swatches.ts","./src/components/color-picker/color-picker-palette.scss?tag=limel-color-picker-palette&encapsulation=shadow","./src/components/color-picker/color-picker-palette.tsx"],"sourcesContent":["export const colors = [\n 'red',\n 'pink',\n 'magenta',\n 'purple',\n 'violet',\n 'indigo',\n 'blue',\n 'sky',\n 'cyan',\n 'teal',\n 'green',\n 'lime',\n 'grass',\n 'yellow',\n 'amber',\n 'orange',\n 'coral',\n 'brown',\n 'gray',\n 'glaucous',\n];\n\nexport const brightnesses = ['lighter', 'light', 'default', 'dark', 'darker'];\n\nexport function getColorName(color: string, brightness: string): string {\n return `--color-${color}-${brightness}`;\n}\n\nexport function getCssColor(color: string, brightness: string): string {\n return `rgb(var(${getColorName(color, brightness)}))`;\n}\n","@use '../../design-guidelines/color-system/examples/extended-color-palette';\n@import './color-picker';\n\n:host {\n border-radius: 0.75rem; // is like popover's default `--popover-border-radius`\n background-color: rgb(var(--kompendium-contrast-300));\n}\n\n.color-picker-palette {\n display: grid;\n gap: 0.25rem;\n grid-auto-flow: column;\n grid-template-columns: repeat(20, 1fr);\n grid-template-rows: repeat(4, 1fr) auto;\n margin: 1rem;\n}\n\n.chosen-color-name {\n box-sizing: border-box;\n padding: 1rem;\n display: grid;\n grid-template-columns: 1fr auto;\n gap: 0.5rem;\n}\n\n.chosen-color-preview {\n border: 1px solid rgba(var(--contrast-700), 0.65); // color is the same as\n // colors in shared_input-select-picker.scss\n border-radius: 50%;\n}\n\n.swatch:not(.hue) {\n // We could use the `@include mixins.is-flat-clickable();` mixin\n // But its `background-color` arguments would interfere with the\n // styles here. So we just copy/pasted the useful parts of the mixin here\n transition: color 0.2s ease, background-color 0.2s ease,\n box-shadow 0.2s ease, transform 0.1s ease-out;\n\n &:hover {\n box-shadow: var(--button-shadow-hovered);\n }\n\n &:active {\n box-shadow: var(--button-shadow-pressed);\n\n transform: translate3d(0, 0.08rem, 0);\n }\n cursor: pointer;\n\n &:focus-visible {\n box-shadow: var(--shadow-depth-8-focused),\n 0 0 0 0.25rem rgb(var(--contrast-100)) inset;\n }\n}\n\n.swatch--selected {\n border-radius: 50%;\n}\n","import { Component, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { FormComponent } from '../form/form.types';\nimport { brightnesses, colors, getColorName, getCssColor } from './swatches';\n\n/**\n * @private\n */\n@Component({\n tag: 'limel-color-picker-palette',\n shadow: true,\n styleUrl: 'color-picker-palette.scss',\n})\nexport class Palette implements FormComponent {\n /**\n * Color value that is manually typed by the user\n */\n @Prop({ reflect: true })\n public value: string;\n\n /**\n * Label of the input field\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Helper text of the input field\n */\n @Prop({ reflect: true })\n public helperText: string;\n\n /**\n * Set to `true` if a value is required\n */\n @Prop({ reflect: true })\n public required: boolean;\n\n /**\n * Emits chosen value to the parent component\n */\n @Event()\n public change: EventEmitter<string>;\n\n public render() {\n const background = this.value ? { '--background': this.value } : {};\n\n return [\n <div class=\"color-picker-palette\">{this.renderSwatches()}</div>,\n <div class=\"chosen-color-name\">\n <limel-input-field\n label={this.label}\n helperText={this.helperText}\n value={this.value}\n onChange={this.handleChange}\n required={this.required}\n />\n <div class=\"chosen-color-preview\" style={background} />\n </div>,\n ];\n }\n\n private renderSwatches = () => {\n return colors.map((color) => {\n return brightnesses.map(this.renderSwatch(color));\n });\n };\n\n private renderSwatch = (color: string) => (brightness: string) => {\n const colorName = getColorName(color, brightness);\n const classList = {\n swatch: true,\n [colorName]: true,\n 'swatch--selected': this.value === getCssColor(color, brightness),\n };\n\n return (\n <div\n class={classList}\n onClick={this.handleClick(color, brightness)}\n tabindex=\"0\"\n ></div>\n );\n };\n\n private handleChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.change.emit(event.detail);\n };\n\n private handleClick =\n (color: string, brightness: string) => (event: MouseEvent) => {\n const value = getCssColor(color, brightness);\n event.stopPropagation();\n this.change.emit(value);\n };\n}\n"],"mappings":"6CAAO,MAAMA,EAAS,CAClB,MACA,OACA,UACA,SACA,SACA,SACA,OACA,MACA,OACA,OACA,QACA,OACA,QACA,SACA,QACA,SACA,QACA,QACA,OACA,YAGG,MAAMC,EAAe,CAAC,UAAW,QAAS,UAAW,OAAQ,U,SAEpDC,EAAaC,EAAeC,GACxC,MAAO,WAAWD,KAASC,GAC/B,C,SAEgBC,EAAYF,EAAeC,GACvC,MAAO,WAAWF,EAAaC,EAAOC,MAC1C,CC/BA,MAAME,EAAwB,y7b,MCYjBC,EAAO,M,wDAiDRC,KAAAC,eAAiB,IACdT,EAAOU,KAAKP,GACRF,EAAaS,IAAIF,KAAKG,aAAaR,MAI1CK,KAAAG,aAAgBR,GAAmBC,IACvC,MAAMQ,EAAYV,EAAaC,EAAOC,GACtC,MAAMS,EAAY,CACdC,OAAQ,KACRF,CAACA,GAAY,KACb,mBAAoBJ,KAAKO,QAAUV,EAAYF,EAAOC,IAG1D,OACIY,EAAA,OACIC,MAAOJ,EACPK,QAASV,KAAKW,YAAYhB,EAAOC,GACjCgB,SAAS,KACN,EAIPZ,KAAAa,aAAgBC,IACpBA,EAAMC,kBACNf,KAAKgB,OAAOC,KAAKH,EAAMI,OAAO,EAG1BlB,KAAAW,YACJ,CAAChB,EAAeC,IAAwBkB,IACpC,MAAMP,EAAQV,EAAYF,EAAOC,GACjCkB,EAAMC,kBACNf,KAAKgB,OAAOC,KAAKV,EAAM,E,4FAlDxBY,SACH,MAAMC,EAAapB,KAAKO,MAAQ,CAAE,eAAgBP,KAAKO,OAAU,GAEjE,MAAO,CACHC,EAAA,OAAKC,MAAM,wBAAwBT,KAAKC,kBACxCO,EAAA,OAAKC,MAAM,qBACPD,EAAA,qBACIa,MAAOrB,KAAKqB,MACZC,WAAYtB,KAAKsB,WACjBf,MAAOP,KAAKO,MACZgB,SAAUvB,KAAKa,aACfW,SAAUxB,KAAKwB,WAEnBhB,EAAA,OAAKC,MAAM,uBAAuBgB,MAAOL,K"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as o,g as i}from"./p-c8818b66.js";const n='.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button.mdc-icon-button--reduced-size{width:40px;height:40px;padding:8px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-icon-button--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--touch{margin-top:0px;margin-bottom:0px}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-icon-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity}.mdc-icon-button .mdc-icon-button__ripple::before,.mdc-icon-button .mdc-icon-button__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-icon-button .mdc-icon-button__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-icon-button .mdc-icon-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-icon-button.mdc-ripple-upgraded--unbounded .mdc-icon-button__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-icon-button.mdc-ripple-upgraded--foreground-activation .mdc-icon-button__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-icon-button.mdc-ripple-upgraded--foreground-deactivation .mdc-icon-button__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-icon-button .mdc-icon-button__ripple::before,.mdc-icon-button .mdc-icon-button__ripple::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::before,.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-icon-button .mdc-icon-button__ripple::before,.mdc-icon-button .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-icon-button:hover .mdc-icon-button__ripple::before,.mdc-icon-button.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-icon-button:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-icon-button:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-icon-button .mdc-icon-button__ripple{pointer-events:none;z-index:1}:host([hidden]){display:none}:host([disabled]){pointer-events:none}.mdc-icon-button{transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--icon-background-color, transparent);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:2.25rem;width:2.25rem;padding:0.125rem;border-radius:50%}.mdc-icon-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.mdc-icon-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}:host([elevated]) .mdc-icon-button:not(:hover):not(:active):not(:focus-visible){box-shadow:var(--button-shadow-normal)}.mdc-icon-button:disabled{color:var(--mdc-theme-text-disabled-on-background)}.mdc-icon-button:focus-visible{box-shadow:var(--shadow-depth-8-focused);border-radius:50%}limel-icon{width:1.25rem;height:1.25rem}';const e=class{constructor(o){t(this,o);this.icon=undefined;this.elevated=false;this.label=undefined;this.disabled=false}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.host.shadowRoot.querySelector(".mdc-icon-button");if(!t){return}}render(){const t={};if(this.host.hasAttribute("tabindex")){t.tabindex=this.host.getAttribute("tabindex")}return o("button",Object.assign({class:"mdc-icon-button",disabled:this.disabled,"aria-label":this.label,title:this.label},t),o("limel-icon",{name:this.icon,badge:true}))}get host(){return i(this)}};e.style=n;export{e as limel_icon_button};
|
|
2
|
-
//# sourceMappingURL=p-fb799569.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["iconButtonCss","IconButton","connectedCallback","this","initialize","componentDidLoad","element","host","shadowRoot","querySelector","render","buttonAttributes","hasAttribute","tabindex","getAttribute","h","Object","assign","class","disabled","label","title","name","icon","badge"],"sources":["./src/components/icon-button/icon-button.scss?tag=limel-icon-button&encapsulation=shadow","./src/components/icon-button/icon-button.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/functions';\n@use '@material/icon-button/styles';\n\n/**\n * @prop --icon-background-color: Background color of the button.\n */\n\n$height-of-limel-button: functions.pxToRem(36);\n\n:host([hidden]) {\n display: none;\n}\n\n:host([disabled]) {\n pointer-events: none;\n}\n\n.mdc-icon-button {\n @include mixins.is-flat-clickable(\n $background-color: var(--icon-background-color, transparent)\n );\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n height: $height-of-limel-button;\n width: $height-of-limel-button;\n padding: functions.pxToRem(2);\n border-radius: 50%;\n\n :host([elevated]) & {\n &:not(:hover):not(:active):not(:focus-visible) {\n box-shadow: var(--button-shadow-normal);\n }\n }\n\n &:disabled {\n color: var(--mdc-theme-text-disabled-on-background);\n }\n\n &:focus-visible {\n // only when non-pointer input is being used,\n // e.g. tabbed into using keyboard\n box-shadow: var(--shadow-depth-8-focused);\n border-radius: 50%;\n }\n}\n\nlimel-icon {\n width: functions.pxToRem(20);\n height: functions.pxToRem(20);\n}\n","import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * @exampleComponent limel-example-icon-button-basic\n * @exampleComponent limel-example-icon-button-disabled\n * @exampleComponent limel-example-icon-button-elevated\n * @exampleComponent limel-example-icon-button-toggle-state\n * @exampleComponent limel-example-icon-button-composite\n */\n@Component({\n tag: 'limel-icon-button',\n shadow: true,\n styleUrl: 'icon-button.scss',\n})\nexport class IconButton {\n /**\n * The icon to display.\n */\n @Prop({ reflect: true })\n public icon: string;\n\n /**\n * Set to `true` to give the button our standard \"elevated\" look, lifting\n * it off the flat layout.\n */\n @Prop({ reflect: true })\n public elevated = false;\n\n /**\n * The text to show to screenreaders and other assistive tech.\n */\n @Prop({ reflect: true })\n public label: string;\n\n /**\n * Set to `true` to disable the button.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n @Element()\n private host: HTMLLimelIconButtonElement;\n\n public connectedCallback() {\n this.initialize();\n }\n\n public componentDidLoad() {\n this.initialize();\n }\n\n private initialize() {\n const element = this.host.shadowRoot.querySelector('.mdc-icon-button');\n if (!element) {\n return;\n }\n }\n\n public render() {\n const buttonAttributes: { tabindex?: string } = {};\n if (this.host.hasAttribute('tabindex')) {\n buttonAttributes.tabindex = this.host.getAttribute('tabindex');\n }\n\n return (\n <button\n class=\"mdc-icon-button\"\n disabled={this.disabled}\n aria-label={this.label}\n title={this.label}\n {...buttonAttributes}\n >\n <limel-icon name={this.icon} badge={true} />\n </button>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAgB,s/L,MCcTC,EAAU,M,2DAYD,M,mCAYA,K,CAKXC,oBACHC,KAAKC,Y,CAGFC,mBACHF,KAAKC,Y,CAGDA,aACJ,MAAME,EAAUH,KAAKI,KAAKC,WAAWC,cAAc,oBACnD,IAAKH,EAAS,CACV,M,EAIDI,SACH,MAAMC,EAA0C,GAChD,GAAIR,KAAKI,KAAKK,aAAa,YAAa,CACpCD,EAAiBE,SAAWV,KAAKI,KAAKO,aAAa,W,CAGvD,OACIC,EAAA,SAAAC,OAAAC,OAAA,CACIC,MAAM,kBACNC,SAAUhB,KAAKgB,SAAQ,aACXhB,KAAKiB,MACjBC,MAAOlB,KAAKiB,OACRT,GAEJI,EAAA,cAAYO,KAAMnB,KAAKoB,KAAMC,MAAO,O"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|