@limetech/lime-elements 35.0.0-next.9 → 35.0.1-next.2
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/{_arrayIncludesWith-36a6fafb.js → _arrayIncludesWith-29083f83.js} +5 -4
- package/dist/cjs/{_assignValue-c9fc3712.js → _assignValue-7c18d8d6.js} +1 -1
- package/dist/cjs/_defineProperty-8f56146d.js +13 -0
- package/dist/cjs/{_defineProperty-8351e789.js → _getNative-60328036.js} +0 -9
- package/dist/cjs/checkbox.template-b6c6562c.js +43 -0
- package/dist/cjs/{component-f7ef9087.js → component-66df95e7.js} +190 -132
- package/dist/cjs/{component-f532119f.js → component-67144c1c.js} +47 -3
- package/dist/cjs/{component-ed21410d.js → component-ae3bfacf.js} +367 -235
- package/dist/cjs/{component-2faaa141.js → component-cf490570.js} +213 -143
- package/dist/cjs/{component-10dbdd60.js → component-dd795ff0.js} +7 -5
- package/dist/cjs/{dateFormatter-26eac73a.js → dateFormatter-05d80b12.js} +37 -31
- package/dist/cjs/identity-6dc34885.js +44 -0
- package/dist/cjs/{index-e63a89d7.js → index-2a28697b.js} +27 -1
- package/dist/cjs/{isEqual-e3b9c27c.js → isEqual-d2a13a24.js} +13 -55
- package/dist/cjs/lime-elements.cjs.js +3 -3
- package/dist/cjs/limel-badge.cjs.entry.js +4 -4
- package/dist/cjs/limel-banner.cjs.entry.js +2 -2
- package/dist/cjs/limel-button-group.cjs.entry.js +3 -3
- package/dist/cjs/limel-button.cjs.entry.js +3 -3
- package/dist/cjs/limel-checkbox.cjs.entry.js +136 -90
- package/dist/cjs/limel-chip-set.cjs.entry.js +235 -191
- package/dist/cjs/limel-circular-progress.cjs.entry.js +3 -3
- package/dist/cjs/limel-code-editor.cjs.entry.js +51 -24
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
- package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +7 -6
- package/dist/cjs/limel-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-config.cjs.entry.js +2 -2
- package/dist/cjs/limel-date-picker.cjs.entry.js +8 -8
- package/dist/cjs/limel-dialog.cjs.entry.js +35 -19
- package/dist/cjs/limel-file.cjs.entry.js +11 -9
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +987 -669
- package/dist/cjs/limel-flex-container.cjs.entry.js +6 -2
- package/dist/cjs/limel-form.cjs.entry.js +19985 -20009
- package/dist/cjs/limel-grid.cjs.entry.js +2 -2
- package/dist/cjs/limel-header.cjs.entry.js +2 -2
- package/dist/cjs/limel-icon-button.cjs.entry.js +6 -6
- package/dist/cjs/limel-icon.cjs.entry.js +2 -2
- package/dist/cjs/limel-input-field.cjs.entry.js +12 -10
- package/dist/cjs/limel-linear-progress.cjs.entry.js +4 -4
- package/dist/cjs/limel-list_3.cjs.entry.js +154 -91
- package/dist/cjs/limel-menu-list.cjs.entry.js +87 -74
- package/dist/cjs/limel-menu.cjs.entry.js +6 -5
- package/dist/cjs/limel-picker.cjs.entry.js +6 -8
- package/dist/cjs/limel-popover-surface.cjs.entry.js +3 -3
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +2 -2
- package/dist/cjs/limel-progress-flow.cjs.entry.js +2 -2
- package/dist/cjs/limel-select.cjs.entry.js +6 -6
- package/dist/cjs/limel-slider.cjs.entry.js +34 -7
- package/dist/cjs/limel-snackbar.cjs.entry.js +79 -73
- package/dist/cjs/limel-spinner.cjs.entry.js +2 -2
- package/dist/cjs/limel-switch.cjs.entry.js +498 -202
- package/dist/cjs/limel-tab-bar.cjs.entry.js +269 -190
- package/dist/cjs/limel-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/limel-table.cjs.entry.js +79 -17
- package/dist/cjs/limel-tooltip_2.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{moment-d287c0ed.js → moment-5cfac5cd.js} +94 -79
- package/dist/cjs/{pickBy-88b0430a.js → pickBy-3ef47bf2.js} +6 -5
- package/dist/cjs/{zipObject-4050a45f.js → zipObject-93a471fa.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/badge/badge.css +9 -15
- package/dist/collection/components/badge/badge.js +2 -2
- package/dist/collection/components/button/button.css +333 -145
- package/dist/collection/components/button-group/button-group.css +30 -5
- package/dist/collection/components/checkbox/checkbox.css +71 -20
- package/dist/collection/components/checkbox/checkbox.js +5 -4
- package/dist/collection/components/checkbox/checkbox.template.js +24 -20
- package/dist/collection/components/chip-set/chip-set.css +367 -34
- package/dist/collection/components/circular-progress/circular-progress.css +2 -2
- package/dist/collection/components/code-editor/code-editor.css +8 -13
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +1 -1
- package/dist/collection/components/dialog/dialog.css +153 -109
- package/dist/collection/components/dialog/dialog.js +36 -11
- package/dist/collection/components/file/icon-background-colors.js +2 -1
- package/dist/collection/components/file/icon-fill-colors.js +2 -1
- package/dist/collection/components/file/icons.js +1 -1
- package/dist/collection/components/flex-container/flex-container.js +10 -0
- package/dist/collection/components/form/fields/schema-field.js +0 -1
- package/dist/collection/components/form/form.css +5 -1
- package/dist/collection/components/form/form.js +34 -0
- package/dist/collection/components/form/form.types.js +0 -1
- package/dist/collection/components/form/templates/common.js +4 -1
- package/dist/collection/components/icon-button/icon-button.css +116 -59
- package/dist/collection/components/icon-button/icon-button.js +1 -0
- package/dist/collection/components/input-field/input-field.css +344 -29
- package/dist/collection/components/input-field/input-field.js +5 -3
- package/dist/collection/components/linear-progress/linear-progress.css +14 -2
- package/dist/collection/components/list/list-renderer.js +1 -4
- package/dist/collection/components/list/list.css +938 -93
- package/dist/collection/components/list/list.js +13 -6
- package/dist/collection/components/menu-list/menu-list-renderer.js +1 -4
- package/dist/collection/components/menu-list/menu-list.css +938 -93
- package/dist/collection/components/menu-surface/menu-surface.css +31 -7
- package/dist/collection/components/picker/picker.js +6 -7
- package/dist/collection/components/popover-surface/popover-surface.css +1 -0
- package/dist/collection/components/select/select.css +424 -17
- package/dist/collection/components/select/select.template.js +1 -1
- package/dist/collection/components/slider/slider.css +49 -2
- package/dist/collection/components/snackbar/snackbar.css +588 -301
- package/dist/collection/components/switch/switch.css +592 -222
- package/dist/collection/components/switch/switch.js +18 -12
- package/dist/collection/components/tab-bar/tab-bar.css +77 -48
- package/dist/collection/components/table/table.css +219 -165
- package/dist/collection/components/table/table.js +99 -15
- package/dist/collection/components/table/table.types.js +0 -1
- package/dist/collection/style/functions.scss +3 -1
- package/dist/collection/style/internal/lime-theme.scss +30 -31
- package/dist/collection/style/internal/lime-typography.scss +55 -56
- package/dist/esm/{_arrayIncludesWith-b5d3fd9e.js → _arrayIncludesWith-969bccda.js} +4 -3
- package/dist/esm/{_assignValue-08fe10bc.js → _assignValue-fb2bf80a.js} +1 -1
- package/dist/esm/_defineProperty-2105cb48.js +11 -0
- package/dist/esm/{_defineProperty-8c869077.js → _getNative-93d6bfe9.js} +1 -9
- package/dist/esm/checkbox.template-2f1bbc98.js +41 -0
- package/dist/esm/{component-89e0ce26.js → component-19eb6e2b.js} +7 -5
- package/dist/esm/{component-2630c3d7.js → component-288691f3.js} +367 -235
- package/dist/esm/{component-d682c974.js → component-410aad5a.js} +44 -4
- package/dist/esm/{component-429e92ee.js → component-5b4ac85a.js} +213 -143
- package/dist/esm/{component-834d85a1.js → component-fffa3419.js} +190 -132
- package/dist/esm/{dateFormatter-c9b41548.js → dateFormatter-2cad0292.js} +37 -31
- package/dist/esm/identity-87aa3962.js +41 -0
- package/dist/esm/{index-2316f345.js → index-11cd0b60.js} +27 -1
- package/dist/esm/{isArrayLike-dd37ba9a.js → isArrayLike-385e0f31.js} +1 -1
- package/dist/esm/{isEqual-4f22635f.js → isEqual-c5a636a4.js} +3 -43
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-badge.entry.js +4 -4
- package/dist/esm/limel-banner.entry.js +2 -2
- package/dist/esm/limel-button-group.entry.js +3 -3
- package/dist/esm/limel-button.entry.js +3 -3
- package/dist/esm/limel-checkbox.entry.js +136 -90
- package/dist/esm/limel-chip-set.entry.js +235 -191
- package/dist/esm/limel-circular-progress.entry.js +3 -3
- package/dist/esm/limel-code-editor.entry.js +51 -24
- package/dist/esm/limel-collapsible-section.entry.js +2 -2
- package/dist/esm/limel-color-picker-palette_2.entry.js +7 -6
- package/dist/esm/limel-color-picker.entry.js +2 -2
- package/dist/esm/limel-config.entry.js +2 -2
- package/dist/esm/limel-date-picker.entry.js +8 -8
- package/dist/esm/limel-dialog.entry.js +35 -19
- package/dist/esm/limel-file.entry.js +11 -9
- package/dist/esm/limel-flatpickr-adapter.entry.js +988 -670
- package/dist/esm/limel-flex-container.entry.js +6 -2
- package/dist/esm/limel-form.entry.js +19966 -19990
- package/dist/esm/limel-grid.entry.js +2 -2
- package/dist/esm/limel-header.entry.js +2 -2
- package/dist/esm/limel-icon-button.entry.js +6 -6
- package/dist/esm/limel-icon.entry.js +2 -2
- package/dist/esm/limel-input-field.entry.js +12 -10
- package/dist/esm/limel-linear-progress.entry.js +4 -4
- package/dist/esm/limel-list_3.entry.js +154 -91
- package/dist/esm/limel-menu-list.entry.js +87 -74
- package/dist/esm/limel-menu.entry.js +6 -5
- package/dist/esm/limel-picker.entry.js +6 -8
- package/dist/esm/limel-popover-surface.entry.js +3 -3
- package/dist/esm/limel-progress-flow-item.entry.js +2 -2
- package/dist/esm/limel-progress-flow.entry.js +2 -2
- package/dist/esm/limel-select.entry.js +6 -6
- package/dist/esm/limel-slider.entry.js +34 -7
- package/dist/esm/limel-snackbar.entry.js +79 -73
- package/dist/esm/limel-spinner.entry.js +2 -2
- package/dist/esm/limel-switch.entry.js +498 -202
- package/dist/esm/limel-tab-bar.entry.js +269 -190
- package/dist/esm/limel-tab-panel.entry.js +2 -2
- package/dist/esm/limel-table.entry.js +80 -18
- package/dist/esm/limel-tooltip_2.entry.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{moment-8dadd938.js → moment-367e51c5.js} +94 -79
- package/dist/esm/{pickBy-8a849e46.js → pickBy-d359eb12.js} +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{zipObject-22e88ce9.js → zipObject-2bb1968e.js} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-101af376.entry.js +1 -0
- package/dist/lime-elements/p-1a9a961a.entry.js +11 -0
- package/dist/lime-elements/p-1c284626.js +73 -0
- package/dist/lime-elements/p-1ede893b.js +1 -0
- package/dist/lime-elements/p-2639edf9.entry.js +73 -0
- package/dist/lime-elements/p-2754e134.entry.js +1 -0
- package/dist/lime-elements/p-2da6e2a3.entry.js +1 -0
- package/dist/lime-elements/p-36ecbd03.entry.js +1 -0
- package/dist/lime-elements/p-3af5f9ad.js +3 -0
- package/dist/lime-elements/p-404e1465.entry.js +1 -0
- package/dist/lime-elements/p-42b67933.entry.js +1 -0
- package/dist/lime-elements/p-440454ed.entry.js +1 -0
- package/dist/lime-elements/{p-076bd4dc.js → p-48d4ef20.js} +3 -3
- package/dist/lime-elements/p-4c3358cb.js +1 -0
- package/dist/lime-elements/p-4d5a874a.entry.js +1 -0
- package/dist/lime-elements/p-53e01330.entry.js +1 -0
- package/dist/lime-elements/p-5908c21d.entry.js +1 -0
- package/dist/lime-elements/p-5fdb83c9.js +1 -0
- package/dist/lime-elements/p-63e25a0a.entry.js +1 -0
- package/dist/lime-elements/p-669626e5.js +1 -0
- package/dist/lime-elements/p-6966b5df.entry.js +1 -0
- package/dist/lime-elements/p-6e7809a6.entry.js +1 -0
- package/dist/lime-elements/p-705334c1.entry.js +1 -0
- package/dist/lime-elements/p-71efe2ca.entry.js +37 -0
- package/dist/lime-elements/p-7cda574b.js +1 -0
- package/dist/lime-elements/p-83ea517b.entry.js +1 -0
- package/dist/lime-elements/p-84f933f7.entry.js +16 -0
- package/dist/lime-elements/p-8827628d.entry.js +131 -0
- package/dist/lime-elements/{p-8ad5e143.entry.js → p-94899019.entry.js} +1 -1
- package/dist/lime-elements/p-95f275ab.entry.js +1 -0
- package/dist/lime-elements/p-97d6c4a6.entry.js +1 -0
- package/dist/lime-elements/{p-7f43b0c4.js → p-9acf7b5d.js} +1 -1
- package/dist/lime-elements/p-a465084b.entry.js +82 -0
- package/dist/lime-elements/p-a5af84a7.entry.js +1 -0
- package/dist/lime-elements/p-ad8cb388.js +1 -0
- package/dist/lime-elements/p-ade76f1d.js +1 -0
- package/dist/lime-elements/p-af0ec482.entry.js +16 -0
- package/dist/lime-elements/{p-090bc949.js → p-b28128d2.js} +1 -1
- package/dist/lime-elements/p-b91dc1ef.entry.js +1 -0
- package/dist/lime-elements/p-b95e80c9.entry.js +1 -0
- package/dist/lime-elements/p-bd8c9384.entry.js +1 -0
- package/dist/lime-elements/p-c7953a05.entry.js +82 -0
- package/dist/lime-elements/p-c80acfb2.entry.js +59 -0
- package/dist/lime-elements/p-cbc43682.js +81 -0
- package/dist/lime-elements/{p-ace9affc.js → p-d0a7de87.js} +2 -2
- package/dist/lime-elements/p-d1ee4501.entry.js +37 -0
- package/dist/lime-elements/p-d74fa89e.entry.js +1 -0
- package/dist/lime-elements/{p-e1928c0e.js → p-d76f896d.js} +1 -1
- package/dist/lime-elements/p-dfba92de.js +126 -0
- package/dist/lime-elements/p-dfbe015e.entry.js +1 -0
- package/dist/lime-elements/p-e80dd2ff.entry.js +1 -0
- package/dist/lime-elements/p-e83dddcd.entry.js +126 -0
- package/dist/lime-elements/p-e98d76e8.entry.js +59 -0
- package/dist/lime-elements/{p-92146da6.js → p-e9a95b8f.js} +1 -1
- package/dist/lime-elements/p-ed65468d.entry.js +1 -0
- package/dist/lime-elements/p-f0c9dadd.entry.js +1 -0
- package/dist/lime-elements/p-f9bfbeb3.entry.js +82 -0
- package/dist/lime-elements/p-fa607ed3.js +1 -0
- package/dist/lime-elements/style/functions.scss +3 -1
- package/dist/lime-elements/style/internal/lime-theme.scss +30 -31
- package/dist/lime-elements/style/internal/lime-typography.scss +55 -56
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +3 -2
- package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
- package/dist/types/components/dialog/dialog.d.ts +11 -5
- package/dist/types/components/dialog/dialog.types.d.ts +4 -0
- package/dist/types/components/flex-container/flex-container.d.ts +7 -0
- package/dist/types/components/form/fields/array-field.d.ts +0 -1
- package/dist/types/components/form/fields/object-field.d.ts +2 -2
- package/dist/types/components/form/form.d.ts +8 -1
- package/dist/types/components/form/form.types.d.ts +6 -0
- package/dist/types/components/picker/picker.d.ts +2 -1
- package/dist/types/components/switch/switch.d.ts +2 -2
- package/dist/types/components/table/table.d.ts +10 -1
- package/dist/types/components/table/table.types.d.ts +13 -0
- package/dist/types/components.d.ts +23 -7
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/package.json +31 -44
- package/dist/cjs/checkbox.template-50eb8b76.js +0 -39
- package/dist/esm/checkbox.template-50f7c07b.js +0 -37
- package/dist/lime-elements/p-041ae00c.entry.js +0 -1
- package/dist/lime-elements/p-0ce9165f.entry.js +0 -1
- package/dist/lime-elements/p-0fd208f3.entry.js +0 -82
- package/dist/lime-elements/p-143705b1.entry.js +0 -1
- package/dist/lime-elements/p-1876a96a.entry.js +0 -1
- package/dist/lime-elements/p-1a64b531.js +0 -1
- package/dist/lime-elements/p-1fb5340d.entry.js +0 -1
- package/dist/lime-elements/p-250f55be.js +0 -1
- package/dist/lime-elements/p-29f054cc.entry.js +0 -37
- package/dist/lime-elements/p-31fecf5d.entry.js +0 -1
- package/dist/lime-elements/p-34c7872e.entry.js +0 -1
- package/dist/lime-elements/p-379955f4.js +0 -1
- package/dist/lime-elements/p-3ae6bb75.entry.js +0 -82
- package/dist/lime-elements/p-3ae6dfba.entry.js +0 -73
- package/dist/lime-elements/p-426d11b4.js +0 -1
- package/dist/lime-elements/p-440084ea.js +0 -1
- package/dist/lime-elements/p-468e940e.entry.js +0 -16
- package/dist/lime-elements/p-4932c029.entry.js +0 -1
- package/dist/lime-elements/p-4b5af81b.entry.js +0 -1
- package/dist/lime-elements/p-510bb5a4.entry.js +0 -1
- package/dist/lime-elements/p-58cbe99d.entry.js +0 -1
- package/dist/lime-elements/p-597cbe05.entry.js +0 -1
- package/dist/lime-elements/p-6003f817.entry.js +0 -1
- package/dist/lime-elements/p-668795a7.js +0 -73
- package/dist/lime-elements/p-714fde78.entry.js +0 -1
- package/dist/lime-elements/p-7476efe0.entry.js +0 -1
- package/dist/lime-elements/p-887d5bda.entry.js +0 -1
- package/dist/lime-elements/p-8a2c1038.entry.js +0 -16
- package/dist/lime-elements/p-902347b9.js +0 -81
- package/dist/lime-elements/p-90c6fa15.js +0 -126
- package/dist/lime-elements/p-90f3e17c.entry.js +0 -37
- package/dist/lime-elements/p-a2cf74c1.entry.js +0 -1
- package/dist/lime-elements/p-a397bab7.js +0 -3
- package/dist/lime-elements/p-a4c532a7.entry.js +0 -1
- package/dist/lime-elements/p-be56ffab.entry.js +0 -1
- package/dist/lime-elements/p-c306c953.entry.js +0 -1
- package/dist/lime-elements/p-c35874db.entry.js +0 -1
- package/dist/lime-elements/p-c8c8a946.entry.js +0 -59
- package/dist/lime-elements/p-ca664c9f.entry.js +0 -1
- package/dist/lime-elements/p-d2c74396.entry.js +0 -1
- package/dist/lime-elements/p-d48ad9f7.entry.js +0 -126
- package/dist/lime-elements/p-d93a3b07.entry.js +0 -16
- package/dist/lime-elements/p-df8faeb4.entry.js +0 -59
- package/dist/lime-elements/p-dfe0a58b.entry.js +0 -1
- package/dist/lime-elements/p-e275f502.entry.js +0 -37
- package/dist/lime-elements/p-e881e98d.entry.js +0 -1
- package/dist/lime-elements/p-f2c706b8.entry.js +0 -131
- package/dist/lime-elements/p-f83213b8.js +0 -1
- package/dist/lime-elements/p-fc30b8e3.entry.js +0 -1
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import{M as t,a as n}from"./p-076bd4dc.js";import{a as i,M as e,b as r}from"./p-902347b9.js";import{m as u}from"./p-dcc97cc2.js";import{M as s,a as o}from"./p-ace9affc.js";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var c=function(t,n){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function f(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}c(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var h=function(){return(h=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},a=function(t,n){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};
|
|
16
|
-
/*! *****************************************************************************
|
|
17
|
-
Copyright (c) Microsoft Corporation.
|
|
18
|
-
|
|
19
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
-
purpose with or without fee is hereby granted.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
-
***************************************************************************** */function l(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}a(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var d=function(){return(d=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},b={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},g=function(t){function n(i){var e=t.call(this,d(d({},n.defaultAdapter),i))||this;return e.transitionEndHandler_=function(t){return e.handleTransitionEnd(t)},e}return l(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return b},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler_)},n.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler_)},n.prototype.activate=function(){this.adapter.removeClass(b.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(b.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(b.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(t){var n=this.adapter.hasClass(b.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&n&&(this.adapter.removeClass(b.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(b.LINE_RIPPLE_DEACTIVATING))},n}(t),m=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return l(n,t),n.attachTo=function(t){return new n(t)},n.prototype.activate=function(){this.foundation.activate()},n.prototype.deactivate=function(){this.foundation.deactivate()},n.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},n.prototype.getDefaultFoundation=function(){var t=this;return new g({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},setStyle:function(n,i){return t.root.style.setProperty(n,i)},registerEventHandler:function(n,i){return t.listen(n,i)},deregisterEventHandler:function(n,i){return t.unlisten(n,i)}})},n}(n),v=function(t,n){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};
|
|
30
|
-
/**
|
|
31
|
-
* @license
|
|
32
|
-
* Copyright 2018 Google Inc.
|
|
33
|
-
*
|
|
34
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
35
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
36
|
-
* in the Software without restriction, including without limitation the rights
|
|
37
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
38
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
39
|
-
* furnished to do so, subject to the following conditions:
|
|
40
|
-
*
|
|
41
|
-
* The above copyright notice and this permission notice shall be included in
|
|
42
|
-
* all copies or substantial portions of the Software.
|
|
43
|
-
*
|
|
44
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
45
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
46
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
47
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
48
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
49
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
50
|
-
* THE SOFTWARE.
|
|
51
|
-
*/function O(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}v(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var p=function(){return(p=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},E={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},I={NOTCH_ELEMENT_PADDING:8},C={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},L=function(t){function n(i){return t.call(this,p(p({},n.defaultAdapter),i))||this}return O(n,t),Object.defineProperty(n,"strings",{get:function(){return E},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return C},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return I},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),n.prototype.notch=function(t){var i=n.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=I.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(i)},n.prototype.closeNotch=function(){this.adapter.removeClass(n.cssClasses.OUTLINE_NOTCHED),this.adapter.removeNotchWidthProperty()},n}(t),_=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return O(n,t),n.attachTo=function(t){return new n(t)},n.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(E.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+s.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(C.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root.classList.add(C.NO_LABEL)},n.prototype.notch=function(t){this.foundation.notch(t)},n.prototype.closeNotch=function(){this.foundation.closeNotch()},n.prototype.getDefaultFoundation=function(){var t=this;return new L({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},setNotchWidthProperty:function(n){return t.notchElement_.style.setProperty("width",n+"px")},removeNotchWidthProperty:function(){return t.notchElement_.style.removeProperty("width")}})},n}(n),x={ROOT:"mdc-text-field-character-counter"},A={ROOT_SELECTOR:"."+x.ROOT},T=function(t){function n(i){return t.call(this,h(h({},n.defaultAdapter),i))||this}return f(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return A},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!1,configurable:!0}),n.prototype.setCounterValue=function(t,n){t=Math.min(t,n),this.adapter.setContent(t+" / "+n)},n}(t),j=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return f(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new T({setContent:function(n){t.root.textContent=n}})},n}(n),R={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},w={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon"},N={LABEL_SCALE:.75},H=["pattern","min","max","required","step","minlength","maxlength"],S=["color","date","datetime-local","month","range","time","week"],y=["mousedown","touchstart"],F=["click","keydown"],D=function(t){function n(i,e){void 0===e&&(e={});var r=t.call(this,h(h({},n.defaultAdapter),i))||this;return r.isFocused_=!1,r.receivedUserInput_=!1,r.isValid_=!0,r.useNativeValidation_=!0,r.validateOnValueChange_=!0,r.helperText_=e.helperText,r.characterCounter_=e.characterCounter,r.leadingIcon_=e.leadingIcon,r.trailingIcon_=e.trailingIcon,r.inputFocusHandler_=function(){return r.activateFocus()},r.inputBlurHandler_=function(){return r.deactivateFocus()},r.inputInputHandler_=function(){return r.handleInput()},r.setPointerXOffset_=function(t){return r.setTransformOrigin(t)},r.textFieldInteractionHandler_=function(){return r.handleTextFieldInteraction()},r.validationAttributeChangeHandler_=function(t){return r.handleValidationAttributeChange(t)},r}return f(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return w},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return R},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return N},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat_",{get:function(){var t=this.getNativeInput_().type;return S.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat_||this.isFocused_||!!this.getValue()||this.isBadInput_()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused_&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t=this;this.adapter.hasLabel()&&this.getNativeInput_().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler_():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating_(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler_),y.forEach((function(n){t.adapter.registerInputInteractionHandler(n,t.setPointerXOffset_)})),F.forEach((function(n){t.adapter.registerTextFieldInteractionHandler(n,t.textFieldInteractionHandler_)})),this.validationObserver_=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_),this.setCharacterCounter_(this.getValue().length)},n.prototype.destroy=function(){var t=this;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler_),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler_),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler_),y.forEach((function(n){t.adapter.deregisterInputInteractionHandler(n,t.setPointerXOffset_)})),F.forEach((function(n){t.adapter.deregisterTextFieldInteractionHandler(n,t.textFieldInteractionHandler_)})),this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_)},n.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput_=!0)},n.prototype.handleValidationAttributeChange=function(t){var n=this;t.some((function(t){return H.indexOf(t)>-1&&(n.styleValidity_(!0),n.adapter.setLabelRequired(n.getNativeInput_().required),!0)})),t.indexOf("maxlength")>-1&&this.setCharacterCounter_(this.getValue().length)},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var n=this.adapter.getLabelWidth()*N.LABEL_SCALE;this.adapter.notchOutline(n)}else this.adapter.closeOutline()},n.prototype.activateFocus=function(){this.isFocused_=!0,this.styleFocused_(this.isFocused_),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText_||!this.helperText_.isPersistent()&&this.helperText_.isValidation()&&this.isValid_||this.helperText_.showToScreenReader()},n.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var n=t.touches,i=n?n[0]:t,e=i.target.getBoundingClientRect();this.adapter.setLineRippleTransformOrigin(i.clientX-e.left)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setCharacterCounter_(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput_||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused_=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity_(t),this.styleFocused_(this.isFocused_),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput_=!1)},n.prototype.getValue=function(){return this.getNativeInput_().value},n.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput_().value=t),this.setCharacterCounter_(t.length),this.validateOnValueChange_){var n=this.isValid();this.styleValidity_(n)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating_(this.shouldFloat),this.validateOnValueChange_&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation_?this.isNativeInputValid_():this.isValid_},n.prototype.setValid=function(t){this.isValid_=t,this.styleValidity_(t);var n=!t&&!this.isFocused_&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(n)},n.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange_=t},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange_},n.prototype.setUseNativeValidation=function(t){this.useNativeValidation_=t},n.prototype.isDisabled=function(){return this.getNativeInput_().disabled},n.prototype.setDisabled=function(t){this.getNativeInput_().disabled=t,this.styleDisabled_(t)},n.prototype.setHelperTextContent=function(t){this.helperText_&&this.helperText_.setContent(t)},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon_&&this.leadingIcon_.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon_&&this.leadingIcon_.setContent(t)},n.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon_&&this.trailingIcon_.setAriaLabel(t)},n.prototype.setTrailingIconContent=function(t){this.trailingIcon_&&this.trailingIcon_.setContent(t)},n.prototype.setCharacterCounter_=function(t){if(this.characterCounter_){var n=this.getNativeInput_().maxLength;if(-1===n)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter_.setCounterValue(t,n)}},n.prototype.isBadInput_=function(){return this.getNativeInput_().validity.badInput||!1},n.prototype.isNativeInputValid_=function(){return this.getNativeInput_().validity.valid},n.prototype.styleValidity_=function(t){var i=n.cssClasses.INVALID;if(t?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText_){if(this.helperText_.setValidity(t),!this.helperText_.isValidation())return;var e=this.helperText_.isVisible(),r=this.helperText_.getId();e&&r?this.adapter.setInputAttr(R.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(R.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused_=function(t){var i=n.cssClasses.FOCUSED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.styleDisabled_=function(t){var i=n.cssClasses,e=i.DISABLED,r=i.INVALID;t?(this.adapter.addClass(e),this.adapter.removeClass(r)):this.adapter.removeClass(e),this.leadingIcon_&&this.leadingIcon_.setDisabled(t),this.trailingIcon_&&this.trailingIcon_.setDisabled(t)},n.prototype.styleFloating_=function(t){var i=n.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.getNativeInput_=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(t),P={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},M={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+P.ROOT},B=function(t){function n(i){return t.call(this,h(h({},n.defaultAdapter),i))||this}return f(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return M},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),n.prototype.getId=function(){return this.adapter.getAttr("id")},n.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(M.ARIA_HIDDEN)},n.prototype.setContent=function(t){this.adapter.setContent(t)},n.prototype.isPersistent=function(){return this.adapter.hasClass(P.HELPER_TEXT_PERSISTENT)},n.prototype.setPersistent=function(t){t?this.adapter.addClass(P.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(P.HELPER_TEXT_PERSISTENT)},n.prototype.isValidation=function(){return this.adapter.hasClass(P.HELPER_TEXT_VALIDATION_MSG)},n.prototype.setValidation=function(t){t?this.adapter.addClass(P.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(P.HELPER_TEXT_VALIDATION_MSG)},n.prototype.showToScreenReader=function(){this.adapter.removeAttr(M.ARIA_HIDDEN)},n.prototype.setValidity=function(t){var n=this.adapter.hasClass(P.HELPER_TEXT_PERSISTENT),i=this.adapter.hasClass(P.HELPER_TEXT_VALIDATION_MSG)&&!t;i?(this.showToScreenReader(),this.adapter.setAttr(M.ROLE,"alert")):this.adapter.removeAttr(M.ROLE),n||i||this.hide_()},n.prototype.hide_=function(){this.adapter.setAttr(M.ARIA_HIDDEN,"true")},n}(t),V=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return f(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new B({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n}})},n}(n),k={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},G={ROOT:"mdc-text-field__icon"},U=["click","keydown"],W=function(t){function n(i){var e=t.call(this,h(h({},n.defaultAdapter),i))||this;return e.savedTabIndex_=null,e.interactionHandler_=function(t){return e.handleInteraction(t)},e}return f(n,t),Object.defineProperty(n,"strings",{get:function(){return k},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t=this;this.savedTabIndex_=this.adapter.getAttr("tabindex"),U.forEach((function(n){t.adapter.registerInteractionHandler(n,t.interactionHandler_)}))},n.prototype.destroy=function(){var t=this;U.forEach((function(n){t.adapter.deregisterInteractionHandler(n,t.interactionHandler_)}))},n.prototype.setDisabled=function(t){this.savedTabIndex_&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex_),this.adapter.setAttr("role",k.ICON_ROLE)))},n.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},n.prototype.setContent=function(t){this.adapter.setContent(t)},n.prototype.handleInteraction=function(t){("click"===t.type||"Enter"===t.key||13===t.keyCode)&&(t.preventDefault(),this.adapter.notifyIconAction())},n}(t),q=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return f(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new W({getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)},notifyIconAction:function(){return t.emit(W.strings.ICON_EVENT,{},!0)}})},n}(n),X=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return f(n,t),n.attachTo=function(t){return new n(t)},n.prototype.initialize=function(t,n,i,r,u,s,c){void 0===t&&(t=function(t,n){return new e(t,n)}),void 0===n&&(n=function(t){return new m(t)}),void 0===i&&(i=function(t){return new V(t)}),void 0===r&&(r=function(t){return new j(t)}),void 0===u&&(u=function(t){return new q(t)}),void 0===s&&(s=function(t){return new o(t)}),void 0===c&&(c=function(t){return new _(t)}),this.input_=this.root.querySelector(R.INPUT_SELECTOR);var f=this.root.querySelector(R.LABEL_SELECTOR);this.label_=f?s(f):null;var h=this.root.querySelector(R.LINE_RIPPLE_SELECTOR);this.lineRipple_=h?n(h):null;var a=this.root.querySelector(R.OUTLINE_SELECTOR);this.outline_=a?c(a):null;var l=B.strings,d=this.root.nextElementSibling,b=d&&d.classList.contains(w.HELPER_LINE),g=b&&d&&d.querySelector(l.ROOT_SELECTOR);this.helperText_=g?i(g):null;var v=T.strings,O=this.root.querySelector(v.ROOT_SELECTOR);!O&&b&&d&&(O=d.querySelector(v.ROOT_SELECTOR)),this.characterCounter_=O?r(O):null;var p=this.root.querySelector(R.LEADING_ICON_SELECTOR);this.leadingIcon_=p?u(p):null;var E=this.root.querySelector(R.TRAILING_ICON_SELECTOR);this.trailingIcon_=E?u(E):null,this.prefix_=this.root.querySelector(R.PREFIX_SELECTOR),this.suffix_=this.root.querySelector(R.SUFFIX_SELECTOR),this.ripple=this.createRipple_(t)},n.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple_&&this.lineRipple_.destroy(),this.helperText_&&this.helperText_.destroy(),this.characterCounter_&&this.characterCounter_.destroy(),this.leadingIcon_&&this.leadingIcon_.destroy(),this.trailingIcon_&&this.trailingIcon_.destroy(),this.label_&&this.label_.destroy(),this.outline_&&this.outline_.destroy(),t.prototype.destroy.call(this)},n.prototype.initialSyncWithDOM=function(){this.disabled=this.input_.disabled},Object.defineProperty(n.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this.input_.required},set:function(t){this.input_.required=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pattern",{get:function(){return this.input_.pattern},set:function(t){this.input_.pattern=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"minLength",{get:function(){return this.input_.minLength},set:function(t){this.input_.minLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxLength",{get:function(){return this.input_.maxLength},set:function(t){t<0?this.input_.removeAttribute("maxLength"):this.input_.maxLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"min",{get:function(){return this.input_.min},set:function(t){this.input_.min=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this.input_.max},set:function(t){this.input_.max=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"step",{get:function(){return this.input_.step},set:function(t){this.input_.step=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation.setTrailingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"trailingIconContent",{set:function(t){this.foundation.setTrailingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"useNativeValidation",{set:function(t){this.foundation.setUseNativeValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prefixText",{get:function(){return this.prefix_?this.prefix_.textContent:null},set:function(t){this.prefix_&&(this.prefix_.textContent=t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"suffixText",{get:function(){return this.suffix_?this.suffix_.textContent:null},set:function(t){this.suffix_&&(this.suffix_.textContent=t)},enumerable:!1,configurable:!0}),n.prototype.focus=function(){this.input_.focus()},n.prototype.layout=function(){this.foundation.notchOutline(this.foundation.shouldFloat)},n.prototype.getDefaultFoundation=function(){var t=h(h(h(h(h({},this.getRootAdapterMethods_()),this.getInputAdapterMethods_()),this.getLabelAdapterMethods_()),this.getLineRippleAdapterMethods_()),this.getOutlineAdapterMethods_());return new D(t,this.getFoundationMap_())},n.prototype.getRootAdapterMethods_=function(){var t=this;return{addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},registerTextFieldInteractionHandler:function(n,i){t.listen(n,i)},deregisterTextFieldInteractionHandler:function(n,i){t.unlisten(n,i)},registerValidationAttributeChangeHandler:function(n){var i=new MutationObserver((function(t){return n(function(t){return t.map((function(t){return t.attributeName})).filter((function(t){return t}))}(t))}));return i.observe(t.input_,{attributes:!0}),i},deregisterValidationAttributeChangeHandler:function(t){t.disconnect()}}},n.prototype.getInputAdapterMethods_=function(){var t=this;return{getNativeInput:function(){return t.input_},setInputAttr:function(n,i){t.input_.setAttribute(n,i)},removeInputAttr:function(n){t.input_.removeAttribute(n)},isFocused:function(){return document.activeElement===t.input_},registerInputInteractionHandler:function(n,e){t.input_.addEventListener(n,e,i())},deregisterInputInteractionHandler:function(n,e){t.input_.removeEventListener(n,e,i())}}},n.prototype.getLabelAdapterMethods_=function(){var t=this;return{floatLabel:function(n){return t.label_&&t.label_.float(n)},getLabelWidth:function(){return t.label_?t.label_.getWidth():0},hasLabel:function(){return Boolean(t.label_)},shakeLabel:function(n){return t.label_&&t.label_.shake(n)},setLabelRequired:function(n){return t.label_&&t.label_.setRequired(n)}}},n.prototype.getLineRippleAdapterMethods_=function(){var t=this;return{activateLineRipple:function(){t.lineRipple_&&t.lineRipple_.activate()},deactivateLineRipple:function(){t.lineRipple_&&t.lineRipple_.deactivate()},setLineRippleTransformOrigin:function(n){t.lineRipple_&&t.lineRipple_.setRippleCenter(n)}}},n.prototype.getOutlineAdapterMethods_=function(){var t=this;return{closeOutline:function(){return t.outline_&&t.outline_.closeNotch()},hasOutline:function(){return Boolean(t.outline_)},notchOutline:function(n){return t.outline_&&t.outline_.notch(n)}}},n.prototype.getFoundationMap_=function(){return{characterCounter:this.characterCounter_?this.characterCounter_.foundationForTextField:void 0,helperText:this.helperText_?this.helperText_.foundationForTextField:void 0,leadingIcon:this.leadingIcon_?this.leadingIcon_.foundationForTextField:void 0,trailingIcon:this.trailingIcon_?this.trailingIcon_.foundationForTextField:void 0}},n.prototype.createRipple_=function(t){var n=this,s=this.root.classList.contains(w.TEXTAREA),o=this.root.classList.contains(w.OUTLINED);if(s||o)return null;var c=h(h({},e.createAdapter(this)),{isSurfaceActive:function(){return u(n.input_,":active")},registerInteractionHandler:function(t,e){return n.input_.addEventListener(t,e,i())},deregisterInteractionHandler:function(t,e){return n.input_.removeEventListener(t,e,i())}});return t(this.root,new r(c))},n}(n);
|
|
52
|
-
/**
|
|
53
|
-
* @license
|
|
54
|
-
* Copyright 2018 Google Inc.
|
|
55
|
-
*
|
|
56
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
57
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
58
|
-
* in the Software without restriction, including without limitation the rights
|
|
59
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
60
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
61
|
-
* furnished to do so, subject to the following conditions:
|
|
62
|
-
*
|
|
63
|
-
* The above copyright notice and this permission notice shall be included in
|
|
64
|
-
* all copies or substantial portions of the Software.
|
|
65
|
-
*
|
|
66
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
67
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
68
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
69
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
70
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
71
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
72
|
-
* THE SOFTWARE.
|
|
73
|
-
*/export{X as M}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,g as e}from"./p-92146da6.js";import{c as r}from"./p-6c094f3f.js";import{z as o}from"./p-440084ea.js";import"./p-090bc949.js";import"./p-379955f4.js";import"./p-eda23c05.js";import"./p-c93050d6.js";let n=class{constructor(s){t(this,s),this.cancel=i(this,"cancel",7),this.select=i(this,"select",7),this.items=[],this.disabled=!1,this.openDirection="right",this.open=!1,this.badgeIcons=!1,this.gridLayout=!1,this.setTriggerAttributes=t=>{const i={"aria-haspopup":!0,"aria-expanded":this.open,disabled:this.disabled,role:"button"};for(const[s,e]of Object.entries(i))e?t.setAttribute(s,String(e)):t.removeAttribute(s)},this.onClose=()=>{this.cancel.emit(),this.open=!1},this.onTriggerClick=t=>{t.stopPropagation(),this.disabled||(this.open=!this.open)},this.onListChange=t=>{this.items=this.items.map((i=>i===t.detail?t.detail:i)),this.select.emit(t.detail),this.open=!1},this.setListElement=t=>{this.list=t},this.focusMenuItem=()=>{var t;const i=this.list.shadowRoot.activeElement;null==i||i.blur();const s=this.items.filter(this.isMenuItem),e=Math.max(s.findIndex((t=>t.selected)),0);null===(t=Array.from(this.list.shadowRoot.querySelectorAll('[role="menuitem"]'))[e])||void 0===t||t.focus()},this.portalId=r()}componentDidLoad(){this.host.querySelector('[slot="trigger"]')||console.warn("Using limel-menu with the default trigger is deprecated. Please provide your own trigger element.")}openWatcher(){if(!this.open)return;const t=new IntersectionObserver((()=>{t.unobserve(this.list),this.focusMenuItem()}));t.observe(this.list)}render(){const t=this.getCssProperties(),i=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index");return s("div",{class:"mdc-menu-surface--anchor",onClick:this.onTriggerClick},s("slot",{name:"trigger"}),s("limel-portal",{visible:this.open,containerId:this.portalId,openDirection:this.openDirection,position:"absolute",containerStyle:{"z-index":i}},s("limel-menu-surface",{open:this.open,onDismiss:this.onClose,style:t,class:{"has-grid-layout":this.gridLayout}},s("limel-menu-list",{class:{"has-grid-layout has-interactive-items":this.gridLayout},items:this.items,type:"menu",badgeIcons:this.badgeIcons,onChange:this.onListChange,ref:this.setListElement}))))}componentDidRender(){this.host.shadowRoot.querySelector("slot").assignedElements().forEach(this.setTriggerAttributes)}getCssProperties(){const t=["--menu-surface-width","--list-grid-item-max-width","--list-grid-item-min-width","--list-grid-gap"],i=getComputedStyle(this.host),s=t.map((t=>i.getPropertyValue(t)));return o(t,s)}isMenuItem(t){return!("separator"in t)}get host(){return e(this)}static get watchers(){return{open:["openWatcher"]}}};n.style=":host{display:inline-block}:host([hidden]){display:none}.menu__trigger{border-color:transparent;border-width:1px;border-style:solid;background:none;color:rgb(var(--contrast-800));height:2.25rem}.menu__trigger-enabled:hover{border-color:rgb(var(--contrast-800));color:rgb(var(--contrast-1100))}.mdc-menu-surface--anchor{position:relative}";export{n as limel_menu}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-92146da6.js";let n=class{constructor(t){e(this,t),this.direction="horizontal",this.justify="space-between",this.align="center",this.reverse=!1}render(){return t("slot",null)}};n.style=":host(limel-flex-container){display:flex}:host(limel-flex-container[hidden]){display:none}:host(limel-flex-container[direction=horizontal]){flex-direction:row}:host(limel-flex-container[direction=horizontal][reverse]){flex-direction:row-reverse}:host(limel-flex-container[direction=vertical]){flex-direction:column}:host(limel-flex-container[direction=vertical][reverse]){flex-direction:column-reverse}:host(limel-flex-container[align=start]){align-items:flex-start}:host(limel-flex-container[align=end]){align-items:flex-end}:host(limel-flex-container[align=center]){align-items:center}:host(limel-flex-container[align=stretch]){align-items:stretch}:host(limel-flex-container[justify=start]){justify-content:flex-start}:host(limel-flex-container[justify=end]){justify-content:flex-end}:host(limel-flex-container[justify=center]){justify-content:center}:host(limel-flex-container[justify=space-between]){justify-content:space-between}:host(limel-flex-container[justify=space-around]){justify-content:space-around}:host(limel-flex-container[justify=space-evenly]){justify-content:space-evenly}:host(limel-flex-container[slot=button]){gap:0.5rem;width:100%;justify-content:flex-end}:host(limel-flex-container[slot=button][direction=horizontal][reverse]){justify-content:flex-start}";export{n as limel_flex_container}
|