@six-group/ui-library 3.0.0-beta.1.7 → 3.0.0-beta.1.8
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/{event-listeners-4a8d66d5.js → event-listeners-74715e62.js} +38 -38
- package/dist/cjs/{execution-control-3bc9c7c4.js → execution-control-46f388e0.js} +35 -35
- package/dist/cjs/{focus-visible-b08d956f.js → focus-visible-0b352c74.js} +40 -40
- package/dist/cjs/{form-control-9e4dffd1.js → form-control-866bbece.js} +25 -25
- package/dist/cjs/{modal-a9679ddf.js → modal-48d42228.js} +41 -41
- package/dist/cjs/{popover-e3781f5a.js → popover-1d2a037c.js} +95 -95
- package/dist/cjs/{scroll-5b8676ba.js → scroll-76e6f5d7.js} +57 -57
- package/dist/cjs/set-attributes_2.cjs.entry.js +57 -57
- package/dist/cjs/six-alert.cjs.entry.js +131 -131
- package/dist/cjs/six-avatar.cjs.entry.js +28 -28
- package/dist/cjs/six-badge.cjs.entry.js +26 -26
- package/dist/cjs/six-button.cjs.entry.js +97 -97
- package/dist/cjs/six-card.cjs.entry.js +8 -8
- package/dist/cjs/six-checkbox.cjs.entry.js +152 -152
- package/dist/cjs/six-datepicker.cjs.entry.js +1189 -1189
- package/dist/cjs/six-details.cjs.entry.js +139 -139
- package/dist/cjs/six-dialog.cjs.entry.js +152 -152
- package/dist/cjs/six-drawer.cjs.entry.js +174 -174
- package/dist/cjs/six-dropdown_3.cjs.entry.js +728 -728
- package/dist/cjs/six-error-page.cjs.entry.js +94 -94
- package/dist/cjs/six-file-list-item.cjs.entry.js +38 -38
- package/dist/cjs/six-file-list.cjs.entry.js +8 -8
- package/dist/cjs/six-file-upload.cjs.entry.js +96 -96
- package/dist/cjs/six-footer.cjs.entry.js +8 -8
- package/dist/cjs/six-form.cjs.entry.js +219 -219
- package/dist/cjs/six-group-label.cjs.entry.js +46 -46
- package/dist/cjs/six-header.cjs.entry.js +149 -149
- package/dist/cjs/six-icon-button.cjs.entry.js +33 -33
- package/dist/cjs/six-icon.cjs.entry.js +24 -24
- package/dist/cjs/six-input.cjs.entry.js +230 -230
- package/dist/cjs/six-item-picker.cjs.entry.js +361 -361
- package/dist/cjs/six-language-switcher.cjs.entry.js +52 -52
- package/dist/cjs/six-layout-grid.cjs.entry.js +19 -19
- package/dist/cjs/six-main-container.cjs.entry.js +11 -11
- package/dist/cjs/six-menu-divider.cjs.entry.js +8 -8
- package/dist/cjs/six-menu-label.cjs.entry.js +8 -8
- package/dist/cjs/six-picto.cjs.entry.js +15 -15
- package/dist/cjs/six-progress-bar.cjs.entry.js +17 -17
- package/dist/cjs/six-progress-ring.cjs.entry.js +31 -31
- package/dist/cjs/six-radio.cjs.entry.js +121 -121
- package/dist/cjs/six-range.cjs.entry.js +198 -198
- package/dist/cjs/six-root.cjs.entry.js +34 -34
- package/dist/cjs/six-search-field.cjs.entry.js +43 -43
- package/dist/cjs/six-select.cjs.entry.js +447 -447
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +42 -42
- package/dist/cjs/six-sidebar-item.cjs.entry.js +18 -18
- package/dist/cjs/six-sidebar.cjs.entry.js +171 -171
- package/dist/cjs/six-spinner.cjs.entry.js +16 -16
- package/dist/cjs/six-switch.cjs.entry.js +100 -100
- package/dist/cjs/six-tab-group.cjs.entry.js +226 -226
- package/dist/cjs/six-tab-panel.cjs.entry.js +17 -17
- package/dist/cjs/six-tab.cjs.entry.js +42 -42
- package/dist/cjs/six-table-cell_4.cjs.entry.js +70 -70
- package/dist/cjs/six-table.cjs.entry.js +145 -145
- package/dist/cjs/six-tag.cjs.entry.js +40 -40
- package/dist/cjs/six-textarea.cjs.entry.js +211 -211
- package/dist/cjs/six-tile.cjs.entry.js +89 -89
- package/dist/cjs/six-timepicker.cjs.entry.js +489 -489
- package/dist/cjs/{six-timepicker.types-c58cc88b.js → six-timepicker.types-c19ebff3.js} +43 -43
- package/dist/cjs/six-tooltip.cjs.entry.js +172 -172
- package/dist/cjs/{slot-8abe833c.js → slot-ad537f24.js} +42 -42
- package/dist/cjs/{types-65e5c95b.js → types-581e8ff0.js} +12 -12
- package/dist/cjs/{types-0c28e484.js → types-64878648.js} +12 -12
- package/dist/collection/components/six-alert/six-alert.js +366 -366
- package/dist/collection/components/six-avatar/six-avatar.js +131 -131
- package/dist/collection/components/six-badge/six-badge.js +101 -101
- package/dist/collection/components/six-button/six-button.js +466 -466
- package/dist/collection/components/six-card/six-card.js +21 -21
- package/dist/collection/components/six-checkbox/six-checkbox.js +550 -550
- package/dist/collection/components/six-datepicker/components/day-selection.js +13 -13
- package/dist/collection/components/six-datepicker/components/month-selection.js +12 -12
- package/dist/collection/components/six-datepicker/components/year-selection.js +10 -10
- package/dist/collection/components/six-datepicker/six-date-formats.js +23 -23
- package/dist/collection/components/six-datepicker/six-datepicker.js +1343 -1343
- package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js +16 -16
- package/dist/collection/components/six-details/six-details.js +432 -432
- package/dist/collection/components/six-dialog/six-dialog.js +401 -401
- package/dist/collection/components/six-drawer/six-drawer.js +458 -458
- package/dist/collection/components/six-dropdown/six-dropdown.js +939 -939
- package/dist/collection/components/six-error-page/six-error-page.js +199 -199
- package/dist/collection/components/six-file-list/six-file-list.js +20 -20
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +203 -203
- package/dist/collection/components/six-file-upload/six-file-upload.js +272 -272
- package/dist/collection/components/six-footer/six-footer.js +21 -21
- package/dist/collection/components/six-form/six-form.js +408 -408
- package/dist/collection/components/six-group-label/six-group-label.js +166 -166
- package/dist/collection/components/six-header/six-header.js +420 -420
- package/dist/collection/components/six-icon/six-icon.js +77 -77
- package/dist/collection/components/six-icon-button/six-icon-button.js +142 -142
- package/dist/collection/components/six-input/six-input.js +1141 -1141
- package/dist/collection/components/six-item-picker/six-item-picker.js +688 -688
- package/dist/collection/components/six-item-picker/types.js +13 -13
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +128 -128
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +52 -52
- package/dist/collection/components/six-main-container/six-main-container.js +53 -53
- package/dist/collection/components/six-menu/six-menu.js +406 -406
- package/dist/collection/components/six-menu-divider/six-menu-divider.js +22 -22
- package/dist/collection/components/six-menu-item/six-menu-item.js +177 -177
- package/dist/collection/components/six-menu-label/six-menu-label.js +25 -25
- package/dist/collection/components/six-picto/six-picto.js +50 -50
- package/dist/collection/components/six-progress-bar/six-progress-bar.js +77 -77
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +111 -111
- package/dist/collection/components/six-radio/six-radio.js +410 -410
- package/dist/collection/components/six-range/six-range.js +620 -620
- package/dist/collection/components/six-root/six-root.js +167 -167
- package/dist/collection/components/six-search-field/six-search-field.js +171 -171
- package/dist/collection/components/six-select/six-select.js +1105 -1105
- package/dist/collection/components/six-sidebar/six-sidebar.js +455 -455
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +89 -89
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +158 -158
- package/dist/collection/components/six-spinner/six-spinner.js +55 -55
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +46 -46
- package/dist/collection/components/six-switch/six-switch.js +393 -393
- package/dist/collection/components/six-tab/six-tab.js +198 -198
- package/dist/collection/components/six-tab-group/six-tab-group.js +362 -362
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +75 -75
- package/dist/collection/components/six-table/six-table.js +209 -209
- package/dist/collection/components/six-table/test/helpers.js +13 -13
- package/dist/collection/components/six-table/types.js +8 -8
- package/dist/collection/components/six-table/util/filter-by.js +34 -34
- package/dist/collection/components/six-table/util/from-data.js +33 -33
- package/dist/collection/components/six-table/util/is.js +3 -3
- package/dist/collection/components/six-table/util/quick-filter-by.js +13 -13
- package/dist/collection/components/six-table/util/sort-by.js +25 -25
- package/dist/collection/components/six-table-cell/six-table-cell.js +21 -21
- package/dist/collection/components/six-table-header/six-table-header.js +21 -21
- package/dist/collection/components/six-table-header-cell/get-next-state.js +7 -7
- package/dist/collection/components/six-table-header-cell/icons.js +12 -12
- package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +174 -174
- package/dist/collection/components/six-table-header-cell/types.js +13 -13
- package/dist/collection/components/six-table-header-cell/util/create-model.js +6 -6
- package/dist/collection/components/six-table-header-cell/util/get-next-state.js +7 -7
- package/dist/collection/components/six-table-row/six-table-row.js +21 -21
- package/dist/collection/components/six-tag/six-tag.js +157 -157
- package/dist/collection/components/six-textarea/six-textarea.js +912 -912
- package/dist/collection/components/six-tile/six-tile.js +315 -315
- package/dist/collection/components/six-timepicker/six-time-format.js +14 -14
- package/dist/collection/components/six-timepicker/six-timepicker.js +980 -980
- package/dist/collection/components/six-timepicker/six-timepicker.types.js +40 -40
- package/dist/collection/components/six-tooltip/six-tooltip.js +435 -435
- package/dist/collection/functional-components/form-control/form-control.js +28 -28
- package/dist/collection/index.js +1 -1
- package/dist/collection/testUtil/delay.js +3 -3
- package/dist/collection/utils/as-array.js +1 -1
- package/dist/collection/utils/date-util.js +712 -712
- package/dist/collection/utils/event-listeners.js +39 -39
- package/dist/collection/utils/execution-control.js +38 -38
- package/dist/collection/utils/focus-visible.js +41 -41
- package/dist/collection/utils/matchers.js +2 -2
- package/dist/collection/utils/modal.js +28 -28
- package/dist/collection/utils/offset.js +13 -13
- package/dist/collection/utils/popover.js +113 -113
- package/dist/collection/utils/scroll.js +47 -47
- package/dist/collection/utils/slot.js +59 -59
- package/dist/collection/utils/support.js +15 -15
- package/dist/collection/utils/tabbable.js +22 -22
- package/dist/collection/utils/testing.js +38 -38
- package/dist/collection/utils/time.util.js +74 -74
- package/dist/collection/utils/type-check.js +5 -5
- package/dist/collection/utils/types.js +1 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js +68 -68
- package/dist/components.json +1 -1
- package/dist/custom-elements/index.js +7595 -7595
- package/dist/esm/{event-listeners-1bef934e.js → event-listeners-570a24ea.js} +38 -38
- package/dist/esm/{execution-control-235f5126.js → execution-control-1a60d709.js} +35 -35
- package/dist/esm/{focus-visible-4b7946aa.js → focus-visible-97933ea9.js} +40 -40
- package/dist/esm/{form-control-17478ad2.js → form-control-24f446af.js} +25 -25
- package/dist/esm/{modal-e5709f6b.js → modal-5ebdc320.js} +41 -41
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{popover-5a51f84d.js → popover-1c7a1139.js} +95 -95
- package/dist/esm/{scroll-99b214c2.js → scroll-180b53fd.js} +57 -57
- package/dist/esm/set-attributes_2.entry.js +57 -57
- package/dist/esm/six-alert.entry.js +131 -131
- package/dist/esm/six-avatar.entry.js +28 -28
- package/dist/esm/six-badge.entry.js +26 -26
- package/dist/esm/six-button.entry.js +97 -97
- package/dist/esm/six-card.entry.js +8 -8
- package/dist/esm/six-checkbox.entry.js +152 -152
- package/dist/esm/six-datepicker.entry.js +1189 -1189
- package/dist/esm/six-details.entry.js +139 -139
- package/dist/esm/six-dialog.entry.js +152 -152
- package/dist/esm/six-drawer.entry.js +174 -174
- package/dist/esm/six-dropdown_3.entry.js +728 -728
- package/dist/esm/six-error-page.entry.js +94 -94
- package/dist/esm/six-file-list-item.entry.js +38 -38
- package/dist/esm/six-file-list.entry.js +8 -8
- package/dist/esm/six-file-upload.entry.js +96 -96
- package/dist/esm/six-footer.entry.js +8 -8
- package/dist/esm/six-form.entry.js +219 -219
- package/dist/esm/six-group-label.entry.js +46 -46
- package/dist/esm/six-header.entry.js +149 -149
- package/dist/esm/six-icon-button.entry.js +33 -33
- package/dist/esm/six-icon.entry.js +24 -24
- package/dist/esm/six-input.entry.js +230 -230
- package/dist/esm/six-item-picker.entry.js +361 -361
- package/dist/esm/six-language-switcher.entry.js +52 -52
- package/dist/esm/six-layout-grid.entry.js +19 -19
- package/dist/esm/six-main-container.entry.js +11 -11
- package/dist/esm/six-menu-divider.entry.js +8 -8
- package/dist/esm/six-menu-label.entry.js +8 -8
- package/dist/esm/six-picto.entry.js +15 -15
- package/dist/esm/six-progress-bar.entry.js +17 -17
- package/dist/esm/six-progress-ring.entry.js +31 -31
- package/dist/esm/six-radio.entry.js +121 -121
- package/dist/esm/six-range.entry.js +198 -198
- package/dist/esm/six-root.entry.js +34 -34
- package/dist/esm/six-search-field.entry.js +43 -43
- package/dist/esm/six-select.entry.js +447 -447
- package/dist/esm/six-sidebar-item-group.entry.js +42 -42
- package/dist/esm/six-sidebar-item.entry.js +18 -18
- package/dist/esm/six-sidebar.entry.js +171 -171
- package/dist/esm/six-spinner.entry.js +16 -16
- package/dist/esm/six-switch.entry.js +100 -100
- package/dist/esm/six-tab-group.entry.js +226 -226
- package/dist/esm/six-tab-panel.entry.js +17 -17
- package/dist/esm/six-tab.entry.js +42 -42
- package/dist/esm/six-table-cell_4.entry.js +70 -70
- package/dist/esm/six-table.entry.js +145 -145
- package/dist/esm/six-tag.entry.js +40 -40
- package/dist/esm/six-textarea.entry.js +211 -211
- package/dist/esm/six-tile.entry.js +89 -89
- package/dist/esm/six-timepicker.entry.js +489 -489
- package/dist/esm/{six-timepicker.types-cd6bac03.js → six-timepicker.types-e161a447.js} +43 -43
- package/dist/esm/six-tooltip.entry.js +172 -172
- package/dist/esm/{slot-5253e199.js → slot-6f3984c7.js} +42 -42
- package/dist/esm/{types-a37c1695.js → types-4b10b413.js} +12 -12
- package/dist/esm/{types-33d15673.js → types-ed860f7c.js} +12 -12
- package/dist/types/components/six-alert/six-alert.d.ts +60 -60
- package/dist/types/components/six-avatar/six-avatar.d.ts +27 -27
- package/dist/types/components/six-badge/six-badge.d.ts +20 -20
- package/dist/types/components/six-button/six-button.d.ts +69 -69
- package/dist/types/components/six-card/six-card.d.ts +9 -9
- package/dist/types/components/six-checkbox/six-checkbox.d.ts +86 -86
- package/dist/types/components/six-datepicker/components/day-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/components/month-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/components/year-selection.d.ts +5 -5
- package/dist/types/components/six-datepicker/six-date-formats.d.ts +22 -22
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +214 -214
- package/dist/types/components/six-datepicker/test/six-datepicker.test-helpers.d.ts +1 -1
- package/dist/types/components/six-details/six-details.d.ts +61 -61
- package/dist/types/components/six-dialog/six-dialog.d.ts +75 -75
- package/dist/types/components/six-drawer/six-drawer.d.ts +82 -82
- package/dist/types/components/six-dropdown/six-dropdown.d.ts +140 -140
- package/dist/types/components/six-error-page/six-error-page.d.ts +27 -27
- package/dist/types/components/six-file-list/six-file-list.d.ts +8 -8
- package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +35 -35
- package/dist/types/components/six-file-upload/six-file-upload.d.ts +42 -42
- package/dist/types/components/six-footer/six-footer.d.ts +9 -9
- package/dist/types/components/six-form/six-form.d.ts +69 -69
- package/dist/types/components/six-group-label/six-group-label.d.ts +37 -37
- package/dist/types/components/six-header/six-header.d.ts +90 -90
- package/dist/types/components/six-icon/six-icon.d.ts +13 -13
- package/dist/types/components/six-icon-button/six-icon-button.d.ts +28 -28
- package/dist/types/components/six-input/six-input.d.ts +165 -165
- package/dist/types/components/six-item-picker/six-item-picker.d.ts +106 -106
- package/dist/types/components/six-item-picker/types.d.ts +11 -11
- package/dist/types/components/six-language-switcher/six-language-switcher.d.ts +25 -25
- package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +14 -14
- package/dist/types/components/six-main-container/six-main-container.d.ts +16 -16
- package/dist/types/components/six-menu/six-menu.d.ts +81 -81
- package/dist/types/components/six-menu-divider/six-menu-divider.d.ts +11 -11
- package/dist/types/components/six-menu-item/six-menu-item.d.ts +36 -36
- package/dist/types/components/six-menu-label/six-menu-label.d.ts +13 -13
- package/dist/types/components/six-picto/six-picto.d.ts +14 -14
- package/dist/types/components/six-progress-bar/six-progress-bar.d.ts +19 -19
- package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +24 -24
- package/dist/types/components/six-radio/six-radio.d.ts +66 -66
- package/dist/types/components/six-range/six-range.d.ts +101 -101
- package/dist/types/components/six-root/six-root.d.ts +34 -34
- package/dist/types/components/six-search-field/six-search-field.d.ts +32 -32
- package/dist/types/components/six-select/six-select.d.ts +163 -163
- package/dist/types/components/six-sidebar/six-sidebar.d.ts +55 -55
- package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +15 -15
- package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +26 -26
- package/dist/types/components/six-spinner/six-spinner.d.ts +15 -15
- package/dist/types/components/six-stage-indicator/six-stage-indicator.d.ts +6 -6
- package/dist/types/components/six-switch/six-switch.d.ts +62 -62
- package/dist/types/components/six-tab/six-tab.d.ts +35 -35
- package/dist/types/components/six-tab-group/six-tab-group.d.ts +62 -62
- package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +19 -19
- package/dist/types/components/six-table/six-table.d.ts +30 -30
- package/dist/types/components/six-table/test/helpers.d.ts +2 -2
- package/dist/types/components/six-table/types.d.ts +33 -33
- package/dist/types/components/six-table/util/filter-by.d.ts +2 -2
- package/dist/types/components/six-table/util/from-data.d.ts +8 -8
- package/dist/types/components/six-table/util/is.d.ts +3 -3
- package/dist/types/components/six-table/util/quick-filter-by.d.ts +2 -2
- package/dist/types/components/six-table/util/sort-by.d.ts +2 -2
- package/dist/types/components/six-table-cell/six-table-cell.d.ts +9 -9
- package/dist/types/components/six-table-header/six-table-header.d.ts +9 -9
- package/dist/types/components/six-table-header-cell/get-next-state.d.ts +2 -2
- package/dist/types/components/six-table-header-cell/icons.d.ts +3 -3
- package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +32 -32
- package/dist/types/components/six-table-header-cell/types.d.ts +11 -11
- package/dist/types/components/six-table-header-cell/util/create-model.d.ts +4 -4
- package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +3 -3
- package/dist/types/components/six-table-row/six-table-row.d.ts +9 -9
- package/dist/types/components/six-tag/six-tag.d.ts +30 -30
- package/dist/types/components/six-textarea/six-textarea.d.ts +134 -134
- package/dist/types/components/six-tile/six-tile.d.ts +40 -40
- package/dist/types/components/six-timepicker/six-time-format.d.ts +13 -13
- package/dist/types/components/six-timepicker/six-timepicker.d.ts +184 -184
- package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +36 -36
- package/dist/types/components/six-tooltip/six-tooltip.d.ts +72 -72
- package/dist/types/functional-components/form-control/form-control.d.ts +34 -34
- package/dist/types/index.d.ts +1 -1
- package/dist/types/testUtil/delay.d.ts +1 -1
- package/dist/types/utils/as-array.d.ts +1 -1
- package/dist/types/utils/date-util.d.ts +194 -194
- package/dist/types/utils/event-listeners.d.ts +15 -15
- package/dist/types/utils/execution-control.d.ts +26 -26
- package/dist/types/utils/focus-visible.d.ts +6 -6
- package/dist/types/utils/matchers.d.ts +2 -2
- package/dist/types/utils/modal.d.ts +13 -13
- package/dist/types/utils/offset.d.ts +4 -4
- package/dist/types/utils/popover.d.ts +27 -27
- package/dist/types/utils/scroll.d.ts +3 -3
- package/dist/types/utils/slot.d.ts +9 -9
- package/dist/types/utils/support.d.ts +1 -1
- package/dist/types/utils/tabbable.d.ts +2 -2
- package/dist/types/utils/testing.d.ts +2 -2
- package/dist/types/utils/time.util.d.ts +10 -10
- package/dist/types/utils/type-check.d.ts +4 -4
- package/dist/types/utils/types.d.ts +4 -4
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +9 -9
- package/dist/ui-library/{p-a8c225f2.entry.js → p-007bc8e8.entry.js} +1 -1
- package/dist/ui-library/{p-f9c0cfb7.entry.js → p-044b784e.entry.js} +1 -1
- package/dist/ui-library/{p-c733dead.js → p-0786fa7c.js} +0 -0
- package/dist/ui-library/{p-12cc24c3.js → p-07d1e830.js} +0 -0
- package/dist/ui-library/{p-48ea4419.entry.js → p-09cb13fa.entry.js} +1 -1
- package/dist/ui-library/{p-e96dcf96.entry.js → p-0c596054.entry.js} +1 -1
- package/dist/ui-library/{p-a77a6442.entry.js → p-1b8dc7b7.entry.js} +1 -1
- package/dist/ui-library/{p-68d31736.js → p-25a3bf57.js} +0 -0
- package/dist/ui-library/{p-ebaea182.entry.js → p-281e8c2d.entry.js} +1 -1
- package/dist/ui-library/{p-9f2dc381.entry.js → p-2924f82f.entry.js} +1 -1
- package/dist/ui-library/{p-ea1fcff2.entry.js → p-2d7ed407.entry.js} +1 -1
- package/dist/ui-library/{p-89f68e76.entry.js → p-4162dcdd.entry.js} +1 -1
- package/dist/ui-library/{p-6f67f986.entry.js → p-4d3a4e93.entry.js} +1 -1
- package/dist/ui-library/{p-8bd0873f.entry.js → p-4ed023b8.entry.js} +1 -1
- package/dist/ui-library/{p-af3d757c.js → p-4f8394d7.js} +0 -0
- package/dist/ui-library/{p-1b92cc7a.entry.js → p-530ea6ec.entry.js} +1 -1
- package/dist/ui-library/{p-19543c96.entry.js → p-531ab886.entry.js} +1 -1
- package/dist/ui-library/{p-fdb455d7.entry.js → p-54c48654.entry.js} +1 -1
- package/dist/ui-library/{p-c948d3db.entry.js → p-55c64cbc.entry.js} +1 -1
- package/dist/ui-library/{p-1c9f0dc6.js → p-5f1c6a5f.js} +0 -0
- package/dist/ui-library/{p-60491176.entry.js → p-675a8243.entry.js} +1 -1
- package/dist/ui-library/{p-b9fb8455.entry.js → p-6d622ed0.entry.js} +1 -1
- package/dist/ui-library/{p-572e3690.js → p-75297ad7.js} +0 -0
- package/dist/ui-library/{p-2ff97cdf.entry.js → p-90b26447.entry.js} +1 -1
- package/dist/ui-library/{p-fcd2356c.entry.js → p-93945629.entry.js} +1 -1
- package/dist/ui-library/{p-7735d99f.js → p-9a860acc.js} +0 -0
- package/dist/ui-library/{p-4cc01afc.entry.js → p-aa37e45a.entry.js} +1 -1
- package/dist/ui-library/{p-191f958b.js → p-b1e66136.js} +0 -0
- package/dist/ui-library/{p-c09dc3a9.js → p-b4dfb7cf.js} +0 -0
- package/dist/ui-library/{p-968c5169.entry.js → p-c24292b3.entry.js} +1 -1
- package/dist/ui-library/{p-ed21cc57.entry.js → p-cd79de73.entry.js} +1 -1
- package/dist/ui-library/{p-34e6d8e8.js → p-d12c6092.js} +0 -0
- package/dist/ui-library/{p-f0e91e17.entry.js → p-d28ac80a.entry.js} +1 -1
- package/dist/ui-library/{p-5ead7b2f.entry.js → p-d837e5a8.entry.js} +1 -1
- package/dist/ui-library/{p-ec1ecc2a.entry.js → p-dd3cae68.entry.js} +1 -1
- package/dist/ui-library/{p-044c6bf9.js → p-eb8f05a9.js} +0 -0
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/package.json +1 -1
|
@@ -1,218 +1,218 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2605a62.js';
|
|
2
|
-
import { F as FormControl } from './form-control-
|
|
3
|
-
import { h as hasSlot } from './slot-
|
|
4
|
-
import { E as EventListeners } from './event-listeners-
|
|
2
|
+
import { F as FormControl } from './form-control-24f446af.js';
|
|
3
|
+
import { h as hasSlot } from './slot-6f3984c7.js';
|
|
4
|
+
import { E as EventListeners } from './event-listeners-570a24ea.js';
|
|
5
5
|
|
|
6
6
|
const sixTextareaCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:\"*\"}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;color:var(--six-color-danger-800);margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:block}.textarea{display:flex;align-items:center;position:relative;width:100%;font-family:var(--six-font-family);font-weight:var(--six-input-font-weight);line-height:var(--six-line-height-normal);letter-spacing:var(--six-input-letter-spacing);background-color:var(--six-input-background-color);border:solid var(--six-border-width) var(--six-input-border-color);vertical-align:middle;transition:var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;cursor:text}.textarea:hover:not(.textarea--disabled){background-color:var(--six-input-background-color-hover);border-color:var(--six-input-border-color-hover)}.textarea:hover:not(.textarea--disabled) .textarea__control{color:var(--six-input-color-hover)}.textarea.textarea--focused:not(.textarea--disabled){background-color:var(--six-input-background-color-focus);box-shadow:var(--six-input-focus-shadow);border-color:var(--six-input-border-color-focus);color:var(--six-input-color-focus)}.textarea.textarea--focused:not(.textarea--disabled) .textarea__control{color:var(--six-input-color-focus)}.textarea.textarea--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);cursor:not-allowed}.textarea.textarea--disabled .textarea__control{color:var(--six-input-color-disabled)}.textarea.textarea--disabled .textarea__control::placeholder{color:var(--six-input-placeholder-color-disabled)}.textarea__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.4;color:var(--sl-input-color);border:none;background:none;box-shadow:none;cursor:inherit;-webkit-appearance:none}.textarea__control::-webkit-search-decoration,.textarea__control::-webkit-search-cancel-button,.textarea__control::-webkit-search-results-button,.textarea__control::-webkit-search-results-decoration{-webkit-appearance:none}.textarea__control::placeholder{color:var(--six-input-placeholder-color);user-select:none}.textarea__control:focus{outline:none}.textarea--invalid:not(.textarea--disabled):not(.textarea--focused){border-color:var(--six-input-border-color-danger)}.textarea--small{border-radius:var(--six-input-border-radius-small);font-size:var(--six-input-font-size-small)}.textarea--small .textarea__control{padding:0.5em var(--six-input-spacing-small)}.textarea--medium{border-radius:var(--six-input-border-radius-medium);font-size:var(--six-input-font-size-medium)}.textarea--medium .textarea__control{padding:0.5em var(--six-input-spacing-medium)}.textarea--large{border-radius:var(--six-input-border-radius-large);font-size:var(--six-input-font-size-large)}.textarea--large .textarea__control{padding:0.5em var(--six-input-spacing-large)}.textarea--resize-none .textarea__control{resize:none}.textarea--resize-vertical .textarea__control{resize:vertical}.textarea--resize-auto .textarea__control{height:auto;resize:none}";
|
|
7
7
|
|
|
8
|
-
let id = 0;
|
|
9
|
-
let SixTextarea = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.sixChange = createEvent(this, "six-textarea-change", 7);
|
|
13
|
-
this.sixInput = createEvent(this, "six-textarea-input", 7);
|
|
14
|
-
this.sixFocus = createEvent(this, "six-textarea-focus", 7);
|
|
15
|
-
this.sixBlur = createEvent(this, "six-textarea-blur", 7);
|
|
16
|
-
this.sixValueChange = createEvent(this, "six-textarea-value-change", 7);
|
|
17
|
-
this.inputId = `textarea-${++id}`;
|
|
18
|
-
this.labelId = `textarea-label-${id}`;
|
|
19
|
-
this.helpTextId = `textarea-help-text-${id}`;
|
|
20
|
-
this.errorTextId = `input-error-text-${id}`;
|
|
21
|
-
this.customErrorText = '';
|
|
22
|
-
this.customValidation = false;
|
|
23
|
-
this.eventListeners = new EventListeners();
|
|
24
|
-
this.hasFocus = false;
|
|
25
|
-
this.hasHelpTextSlot = false;
|
|
26
|
-
this.hasErrorTextSlot = false;
|
|
27
|
-
this.hasLabelSlot = false;
|
|
28
|
-
/** The textarea's size. */
|
|
29
|
-
this.size = 'medium';
|
|
30
|
-
/** The textarea's name attribute. */
|
|
31
|
-
this.name = '';
|
|
32
|
-
/** The textarea's value attribute. */
|
|
33
|
-
this.value = '';
|
|
34
|
-
/** The textarea's label. Alternatively, you can use the label slot. */
|
|
35
|
-
this.label = '';
|
|
36
|
-
/** The textarea's help text. Alternatively, you can use the help-text slot. */
|
|
37
|
-
this.helpText = '';
|
|
38
|
-
/** The textarea's error text. Alternatively, you can use the error-text slot. */
|
|
39
|
-
this.errorText = '';
|
|
40
|
-
/** The number of rows to display by default. */
|
|
41
|
-
this.rows = 4;
|
|
42
|
-
/** Controls how the textarea can be resized. */
|
|
43
|
-
this.resize = 'vertical';
|
|
44
|
-
/** Set to true to disable the textarea. */
|
|
45
|
-
this.disabled = false;
|
|
46
|
-
/** Set to true for a readonly textarea. */
|
|
47
|
-
this.readonly = false;
|
|
48
|
-
/**
|
|
49
|
-
* This will be true when the control is in an invalid state. Validity is determined by props such as `required`,
|
|
50
|
-
* `minlength`, and `maxlength` using the browser's constraint validation API.
|
|
51
|
-
*/
|
|
52
|
-
this.invalid = false;
|
|
53
|
-
/** Set to display the error text on blur and not when typing */
|
|
54
|
-
this.errorOnBlur = false;
|
|
55
|
-
/** default value the textarea will be reverted to when reset is executed */
|
|
56
|
-
this.defaultValue = '';
|
|
57
|
-
}
|
|
58
|
-
handleLabelChange() {
|
|
59
|
-
this.handleSlotChange();
|
|
60
|
-
}
|
|
61
|
-
handleRowsChange() {
|
|
62
|
-
if (this.textarea) {
|
|
63
|
-
this.setTextareaHeight();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
handleValueChange() {
|
|
67
|
-
if (!this.textarea) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.textarea.value = this.value;
|
|
71
|
-
this.invalid = !this.textarea.checkValidity();
|
|
72
|
-
this.sixValueChange.emit();
|
|
73
|
-
}
|
|
74
|
-
connectedCallback() {
|
|
75
|
-
this.handleChange = this.handleChange.bind(this);
|
|
76
|
-
this.handleInput = this.handleInput.bind(this);
|
|
77
|
-
this.handleInvalid = this.handleInvalid.bind(this);
|
|
78
|
-
this.handleBlur = this.handleBlur.bind(this);
|
|
79
|
-
this.handleFocus = this.handleFocus.bind(this);
|
|
80
|
-
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
81
|
-
this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);
|
|
82
|
-
}
|
|
83
|
-
componentWillLoad() {
|
|
84
|
-
this.defaultValue = this.value || '';
|
|
85
|
-
this.handleSlotChange();
|
|
86
|
-
}
|
|
87
|
-
componentDidLoad() {
|
|
88
|
-
this.setTextareaHeight();
|
|
89
|
-
this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
|
|
90
|
-
this.resizeObserver.observe(this.textarea);
|
|
91
|
-
this.eventListeners.add(this.textarea, 'invalid', (event) => {
|
|
92
|
-
if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {
|
|
93
|
-
this.customErrorText = this.textarea.validationMessage;
|
|
94
|
-
}
|
|
95
|
-
event.preventDefault();
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
disconnectedCallback() {
|
|
99
|
-
this.resizeObserver.unobserve(this.textarea);
|
|
100
|
-
this.host.shadowRoot.removeEventListener('slotchange', this.handleSlotChange);
|
|
101
|
-
this.eventListeners.removeAll();
|
|
102
|
-
}
|
|
103
|
-
/** Sets focus on the textarea. */
|
|
104
|
-
async setFocus(options) {
|
|
105
|
-
this.textarea.focus(options);
|
|
106
|
-
}
|
|
107
|
-
/** Removes focus fromt the textarea. */
|
|
108
|
-
async removeFocus() {
|
|
109
|
-
this.textarea.blur();
|
|
110
|
-
}
|
|
111
|
-
/** Selects all the text in the input. */
|
|
112
|
-
async select() {
|
|
113
|
-
return this.textarea.select();
|
|
114
|
-
}
|
|
115
|
-
/** Sets the start and end positions of the text selection (0-based). */
|
|
116
|
-
async setSelectionRange(selectionStart, selectionEnd, selectionDirection = 'none') {
|
|
117
|
-
return this.textarea.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
|
|
118
|
-
}
|
|
119
|
-
/** Replaces a range of text with a new string. */
|
|
120
|
-
async setRangeText(replacement, start, end, selectMode = 'preserve') {
|
|
121
|
-
this.textarea.setRangeText(replacement, start, end, selectMode);
|
|
122
|
-
if (this.value !== this.textarea.value) {
|
|
123
|
-
this.value = this.textarea.value;
|
|
124
|
-
this.setTextareaHeight();
|
|
125
|
-
this.sixChange.emit();
|
|
126
|
-
this.sixInput.emit();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
130
|
-
async reportValidity() {
|
|
131
|
-
return this.textarea.reportValidity();
|
|
132
|
-
}
|
|
133
|
-
/** Checks for validity. */
|
|
134
|
-
async checkValidity() {
|
|
135
|
-
return this.textarea.validity.valid;
|
|
136
|
-
}
|
|
137
|
-
/** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
|
|
138
|
-
async setCustomValidity(message) {
|
|
139
|
-
this.customErrorText = '';
|
|
140
|
-
this.customValidation = message !== '';
|
|
141
|
-
this.textarea.setCustomValidity(message);
|
|
142
|
-
this.invalid = !this.textarea.checkValidity();
|
|
143
|
-
}
|
|
144
|
-
/** Resets the formcontrol */
|
|
145
|
-
async reset() {
|
|
146
|
-
this.value = this.defaultValue;
|
|
147
|
-
this.customErrorText = '';
|
|
148
|
-
this.customValidation = false;
|
|
149
|
-
this.textarea.setCustomValidity('');
|
|
150
|
-
this.invalid = false;
|
|
151
|
-
}
|
|
152
|
-
handleChange() {
|
|
153
|
-
this.sixChange.emit();
|
|
154
|
-
}
|
|
155
|
-
handleInput() {
|
|
156
|
-
this.value = this.textarea.value;
|
|
157
|
-
this.setTextareaHeight();
|
|
158
|
-
this.sixInput.emit();
|
|
159
|
-
}
|
|
160
|
-
handleInvalid() {
|
|
161
|
-
this.invalid = true;
|
|
162
|
-
}
|
|
163
|
-
handleBlur() {
|
|
164
|
-
this.hasFocus = false;
|
|
165
|
-
this.sixBlur.emit();
|
|
166
|
-
}
|
|
167
|
-
handleFocus() {
|
|
168
|
-
this.hasFocus = true;
|
|
169
|
-
this.sixFocus.emit();
|
|
170
|
-
}
|
|
171
|
-
handleSlotChange() {
|
|
172
|
-
this.hasLabelSlot = hasSlot(this.host, 'label');
|
|
173
|
-
this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
|
|
174
|
-
this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
|
|
175
|
-
}
|
|
176
|
-
setTextareaHeight() {
|
|
177
|
-
if (this.resize === 'auto') {
|
|
178
|
-
this.textarea.style.height = 'auto';
|
|
179
|
-
this.textarea.style.height = this.textarea.scrollHeight + 'px';
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
this.textarea.style.height = undefined;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
displayError() {
|
|
186
|
-
return this.invalid && (!this.errorOnBlur || !this.hasFocus);
|
|
187
|
-
}
|
|
188
|
-
render() {
|
|
189
|
-
var _a;
|
|
190
|
-
return (h(FormControl, { inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, errorTextId: this.errorTextId, errorText: this.customErrorText ? this.customErrorText : this.errorText, hasErrorTextSlot: this.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.displayError() }, h("div", { part: "base", class: {
|
|
191
|
-
textarea: true,
|
|
192
|
-
// Sizes
|
|
193
|
-
'textarea--small': this.size === 'small',
|
|
194
|
-
'textarea--medium': this.size === 'medium',
|
|
195
|
-
'textarea--large': this.size === 'large',
|
|
196
|
-
// States
|
|
197
|
-
'textarea--disabled': this.disabled,
|
|
198
|
-
'textarea--focused': this.hasFocus,
|
|
199
|
-
'textarea--empty': ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0,
|
|
200
|
-
'textarea--invalid': this.invalid,
|
|
201
|
-
// Modifiers
|
|
202
|
-
'textarea--resize-none': this.resize === 'none',
|
|
203
|
-
'textarea--resize-vertical': this.resize === 'vertical',
|
|
204
|
-
'textarea--resize-auto': this.resize === 'auto',
|
|
205
|
-
} }, h("textarea", { part: "textarea", ref: (el) => (this.textarea = el), id: this.inputId, class: "textarea__control", name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, rows: this.rows, minLength: this.minlength, maxLength: this.maxlength, value: this.value, autoCapitalize: this.autocapitalize, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, onChange: this.handleChange, onInput: this.handleInput, onInvalid: this.handleInvalid, onFocus: this.handleFocus, onBlur: this.handleBlur }))));
|
|
206
|
-
}
|
|
207
|
-
get host() { return getElement(this); }
|
|
208
|
-
static get watchers() { return {
|
|
209
|
-
"helpText": ["handleLabelChange"],
|
|
210
|
-
"errorText": ["handleLabelChange"],
|
|
211
|
-
"label": ["handleLabelChange"],
|
|
212
|
-
"rows": ["handleRowsChange"],
|
|
213
|
-
"value": ["handleValueChange"]
|
|
214
|
-
}; }
|
|
215
|
-
};
|
|
8
|
+
let id = 0;
|
|
9
|
+
let SixTextarea = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.sixChange = createEvent(this, "six-textarea-change", 7);
|
|
13
|
+
this.sixInput = createEvent(this, "six-textarea-input", 7);
|
|
14
|
+
this.sixFocus = createEvent(this, "six-textarea-focus", 7);
|
|
15
|
+
this.sixBlur = createEvent(this, "six-textarea-blur", 7);
|
|
16
|
+
this.sixValueChange = createEvent(this, "six-textarea-value-change", 7);
|
|
17
|
+
this.inputId = `textarea-${++id}`;
|
|
18
|
+
this.labelId = `textarea-label-${id}`;
|
|
19
|
+
this.helpTextId = `textarea-help-text-${id}`;
|
|
20
|
+
this.errorTextId = `input-error-text-${id}`;
|
|
21
|
+
this.customErrorText = '';
|
|
22
|
+
this.customValidation = false;
|
|
23
|
+
this.eventListeners = new EventListeners();
|
|
24
|
+
this.hasFocus = false;
|
|
25
|
+
this.hasHelpTextSlot = false;
|
|
26
|
+
this.hasErrorTextSlot = false;
|
|
27
|
+
this.hasLabelSlot = false;
|
|
28
|
+
/** The textarea's size. */
|
|
29
|
+
this.size = 'medium';
|
|
30
|
+
/** The textarea's name attribute. */
|
|
31
|
+
this.name = '';
|
|
32
|
+
/** The textarea's value attribute. */
|
|
33
|
+
this.value = '';
|
|
34
|
+
/** The textarea's label. Alternatively, you can use the label slot. */
|
|
35
|
+
this.label = '';
|
|
36
|
+
/** The textarea's help text. Alternatively, you can use the help-text slot. */
|
|
37
|
+
this.helpText = '';
|
|
38
|
+
/** The textarea's error text. Alternatively, you can use the error-text slot. */
|
|
39
|
+
this.errorText = '';
|
|
40
|
+
/** The number of rows to display by default. */
|
|
41
|
+
this.rows = 4;
|
|
42
|
+
/** Controls how the textarea can be resized. */
|
|
43
|
+
this.resize = 'vertical';
|
|
44
|
+
/** Set to true to disable the textarea. */
|
|
45
|
+
this.disabled = false;
|
|
46
|
+
/** Set to true for a readonly textarea. */
|
|
47
|
+
this.readonly = false;
|
|
48
|
+
/**
|
|
49
|
+
* This will be true when the control is in an invalid state. Validity is determined by props such as `required`,
|
|
50
|
+
* `minlength`, and `maxlength` using the browser's constraint validation API.
|
|
51
|
+
*/
|
|
52
|
+
this.invalid = false;
|
|
53
|
+
/** Set to display the error text on blur and not when typing */
|
|
54
|
+
this.errorOnBlur = false;
|
|
55
|
+
/** default value the textarea will be reverted to when reset is executed */
|
|
56
|
+
this.defaultValue = '';
|
|
57
|
+
}
|
|
58
|
+
handleLabelChange() {
|
|
59
|
+
this.handleSlotChange();
|
|
60
|
+
}
|
|
61
|
+
handleRowsChange() {
|
|
62
|
+
if (this.textarea) {
|
|
63
|
+
this.setTextareaHeight();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
handleValueChange() {
|
|
67
|
+
if (!this.textarea) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.textarea.value = this.value;
|
|
71
|
+
this.invalid = !this.textarea.checkValidity();
|
|
72
|
+
this.sixValueChange.emit();
|
|
73
|
+
}
|
|
74
|
+
connectedCallback() {
|
|
75
|
+
this.handleChange = this.handleChange.bind(this);
|
|
76
|
+
this.handleInput = this.handleInput.bind(this);
|
|
77
|
+
this.handleInvalid = this.handleInvalid.bind(this);
|
|
78
|
+
this.handleBlur = this.handleBlur.bind(this);
|
|
79
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
80
|
+
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
81
|
+
this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);
|
|
82
|
+
}
|
|
83
|
+
componentWillLoad() {
|
|
84
|
+
this.defaultValue = this.value || '';
|
|
85
|
+
this.handleSlotChange();
|
|
86
|
+
}
|
|
87
|
+
componentDidLoad() {
|
|
88
|
+
this.setTextareaHeight();
|
|
89
|
+
this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
|
|
90
|
+
this.resizeObserver.observe(this.textarea);
|
|
91
|
+
this.eventListeners.add(this.textarea, 'invalid', (event) => {
|
|
92
|
+
if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {
|
|
93
|
+
this.customErrorText = this.textarea.validationMessage;
|
|
94
|
+
}
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
disconnectedCallback() {
|
|
99
|
+
this.resizeObserver.unobserve(this.textarea);
|
|
100
|
+
this.host.shadowRoot.removeEventListener('slotchange', this.handleSlotChange);
|
|
101
|
+
this.eventListeners.removeAll();
|
|
102
|
+
}
|
|
103
|
+
/** Sets focus on the textarea. */
|
|
104
|
+
async setFocus(options) {
|
|
105
|
+
this.textarea.focus(options);
|
|
106
|
+
}
|
|
107
|
+
/** Removes focus fromt the textarea. */
|
|
108
|
+
async removeFocus() {
|
|
109
|
+
this.textarea.blur();
|
|
110
|
+
}
|
|
111
|
+
/** Selects all the text in the input. */
|
|
112
|
+
async select() {
|
|
113
|
+
return this.textarea.select();
|
|
114
|
+
}
|
|
115
|
+
/** Sets the start and end positions of the text selection (0-based). */
|
|
116
|
+
async setSelectionRange(selectionStart, selectionEnd, selectionDirection = 'none') {
|
|
117
|
+
return this.textarea.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
|
|
118
|
+
}
|
|
119
|
+
/** Replaces a range of text with a new string. */
|
|
120
|
+
async setRangeText(replacement, start, end, selectMode = 'preserve') {
|
|
121
|
+
this.textarea.setRangeText(replacement, start, end, selectMode);
|
|
122
|
+
if (this.value !== this.textarea.value) {
|
|
123
|
+
this.value = this.textarea.value;
|
|
124
|
+
this.setTextareaHeight();
|
|
125
|
+
this.sixChange.emit();
|
|
126
|
+
this.sixInput.emit();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
130
|
+
async reportValidity() {
|
|
131
|
+
return this.textarea.reportValidity();
|
|
132
|
+
}
|
|
133
|
+
/** Checks for validity. */
|
|
134
|
+
async checkValidity() {
|
|
135
|
+
return this.textarea.validity.valid;
|
|
136
|
+
}
|
|
137
|
+
/** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
|
|
138
|
+
async setCustomValidity(message) {
|
|
139
|
+
this.customErrorText = '';
|
|
140
|
+
this.customValidation = message !== '';
|
|
141
|
+
this.textarea.setCustomValidity(message);
|
|
142
|
+
this.invalid = !this.textarea.checkValidity();
|
|
143
|
+
}
|
|
144
|
+
/** Resets the formcontrol */
|
|
145
|
+
async reset() {
|
|
146
|
+
this.value = this.defaultValue;
|
|
147
|
+
this.customErrorText = '';
|
|
148
|
+
this.customValidation = false;
|
|
149
|
+
this.textarea.setCustomValidity('');
|
|
150
|
+
this.invalid = false;
|
|
151
|
+
}
|
|
152
|
+
handleChange() {
|
|
153
|
+
this.sixChange.emit();
|
|
154
|
+
}
|
|
155
|
+
handleInput() {
|
|
156
|
+
this.value = this.textarea.value;
|
|
157
|
+
this.setTextareaHeight();
|
|
158
|
+
this.sixInput.emit();
|
|
159
|
+
}
|
|
160
|
+
handleInvalid() {
|
|
161
|
+
this.invalid = true;
|
|
162
|
+
}
|
|
163
|
+
handleBlur() {
|
|
164
|
+
this.hasFocus = false;
|
|
165
|
+
this.sixBlur.emit();
|
|
166
|
+
}
|
|
167
|
+
handleFocus() {
|
|
168
|
+
this.hasFocus = true;
|
|
169
|
+
this.sixFocus.emit();
|
|
170
|
+
}
|
|
171
|
+
handleSlotChange() {
|
|
172
|
+
this.hasLabelSlot = hasSlot(this.host, 'label');
|
|
173
|
+
this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
|
|
174
|
+
this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
|
|
175
|
+
}
|
|
176
|
+
setTextareaHeight() {
|
|
177
|
+
if (this.resize === 'auto') {
|
|
178
|
+
this.textarea.style.height = 'auto';
|
|
179
|
+
this.textarea.style.height = this.textarea.scrollHeight + 'px';
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
this.textarea.style.height = undefined;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
displayError() {
|
|
186
|
+
return this.invalid && (!this.errorOnBlur || !this.hasFocus);
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
var _a;
|
|
190
|
+
return (h(FormControl, { inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, helpTextId: this.helpTextId, helpText: this.helpText, hasHelpTextSlot: this.hasHelpTextSlot, errorTextId: this.errorTextId, errorText: this.customErrorText ? this.customErrorText : this.errorText, hasErrorTextSlot: this.hasErrorTextSlot, size: this.size, disabled: this.disabled, required: this.required, displayError: this.displayError() }, h("div", { part: "base", class: {
|
|
191
|
+
textarea: true,
|
|
192
|
+
// Sizes
|
|
193
|
+
'textarea--small': this.size === 'small',
|
|
194
|
+
'textarea--medium': this.size === 'medium',
|
|
195
|
+
'textarea--large': this.size === 'large',
|
|
196
|
+
// States
|
|
197
|
+
'textarea--disabled': this.disabled,
|
|
198
|
+
'textarea--focused': this.hasFocus,
|
|
199
|
+
'textarea--empty': ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 0,
|
|
200
|
+
'textarea--invalid': this.invalid,
|
|
201
|
+
// Modifiers
|
|
202
|
+
'textarea--resize-none': this.resize === 'none',
|
|
203
|
+
'textarea--resize-vertical': this.resize === 'vertical',
|
|
204
|
+
'textarea--resize-auto': this.resize === 'auto',
|
|
205
|
+
} }, h("textarea", { part: "textarea", ref: (el) => (this.textarea = el), id: this.inputId, class: "textarea__control", name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, rows: this.rows, minLength: this.minlength, maxLength: this.maxlength, value: this.value, autoCapitalize: this.autocapitalize, autoCorrect: this.autocorrect, autoFocus: this.autofocus, spellcheck: this.spellcheck, required: this.required, inputMode: this.inputmode, "aria-labelledby": this.labelId, onChange: this.handleChange, onInput: this.handleInput, onInvalid: this.handleInvalid, onFocus: this.handleFocus, onBlur: this.handleBlur }))));
|
|
206
|
+
}
|
|
207
|
+
get host() { return getElement(this); }
|
|
208
|
+
static get watchers() { return {
|
|
209
|
+
"helpText": ["handleLabelChange"],
|
|
210
|
+
"errorText": ["handleLabelChange"],
|
|
211
|
+
"label": ["handleLabelChange"],
|
|
212
|
+
"rows": ["handleRowsChange"],
|
|
213
|
+
"value": ["handleValueChange"]
|
|
214
|
+
}; }
|
|
215
|
+
};
|
|
216
216
|
SixTextarea.style = sixTextareaCss;
|
|
217
217
|
|
|
218
218
|
export { SixTextarea as six_textarea };
|
|
@@ -1,96 +1,96 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2605a62.js';
|
|
2
|
-
import { h as hasSlot } from './slot-
|
|
2
|
+
import { h as hasSlot } from './slot-6f3984c7.js';
|
|
3
3
|
|
|
4
4
|
const sixTileCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:inline-block}.tile{min-height:var(--tile-size);width:var(--tile-size);background-color:var(--six-color-clay-50);display:inline-grid;grid-template-columns:100%;grid-template-areas:\"header\" \"middle\" \"footer\"}.tile--small{--tile-size:80px;--tile-padding-size:var(--six-spacing-medium)}.tile--medium{--tile-size:120px;--tile-padding-size:var(--six-spacing-large)}.tile--large{--tile-size:160px;--tile-padding-size:var(--six-spacing-x-large)}.tile:not(.tile--visible){visibility:hidden}.tile--elevated{border:0;box-shadow:var(--six-elevation-8dp)}.tile__header{grid-area:header;height:5%;justify-self:right;display:flex;justify-content:right;opacity:0;transition:var(--six-transition-fast) opacity}.tile:hover>.tile__header{opacity:1}.tile__header--hidden{visibility:hidden}.tile__header six-icon-button{margin-top:-6px;margin-right:-6px;margin-bottom:-16px}.tile__body,.tile__body--large,.tile__body--medium,.tile__body--small{grid-area:middle;display:grid;place-items:center;cursor:pointer;padding-left:var(--tile-padding-size);padding-right:var(--tile-padding-size)}.tile__body six-icon::part(base),.tile__body--large six-icon::part(base),.tile__body--medium six-icon::part(base),.tile__body--small six-icon::part(base){padding:0}.tile__body--small{--tile-padding-size:var(--six-spacing-medium)}.tile__body--medium{--tile-padding-size:var(--six-spacing-large)}.tile__body--large{--tile-padding-size:var(--six-spacing-x-large)}.tile__footer,.tile__footer--large,.tile__footer--medium,.tile__footer--small{grid-area:footer;display:flex;justify-content:center;cursor:pointer;font-weight:var(--six-font-weight-normal);color:var(--six-color-web-rock-900)}.tile__footer--small{font-size:var(--six-font-size-xxx-small)}.tile__footer--medium{font-size:var(--six-font-size-xx-small)}.tile__footer--large{font-size:var(--six-font-size-small)}.tile__footer .label__footer,.tile__footer--small .label__footer,.tile__footer--medium .label__footer,.tile__footer--large .label__footer{overflow:hidden;text-overflow:ellipsis;width:calc(var(--tile-size) - 2em);text-align:center}";
|
|
5
5
|
|
|
6
|
-
let SixTile = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.sixTileClose = createEvent(this, "six-tile-closed", 7);
|
|
10
|
-
this.sixTileSelected = createEvent(this, "six-tile-selected", 7);
|
|
11
|
-
/** The tile's label. */
|
|
12
|
-
this.label = '';
|
|
13
|
-
/** Flag, whether the tile is closeable. */
|
|
14
|
-
this.closeable = true;
|
|
15
|
-
/** Flag, whether the tile should cast a shadow. */
|
|
16
|
-
this.elevated = false;
|
|
17
|
-
/** Enables tile tooltip for tiles */
|
|
18
|
-
this.disableTooltip = true;
|
|
19
|
-
/** Set to true to disable the tile. */
|
|
20
|
-
this.disabled = false;
|
|
21
|
-
/** The tile's size. */
|
|
22
|
-
this.size = 'medium';
|
|
23
|
-
this.visible = true;
|
|
24
|
-
this.hasIconSlot = false;
|
|
25
|
-
this.hasLabelSlot = false;
|
|
26
|
-
this.handleCloseClickEvent = () => {
|
|
27
|
-
this.visible = false;
|
|
28
|
-
this.sixTileClose.emit();
|
|
29
|
-
};
|
|
30
|
-
this.handleClickEvent = () => {
|
|
31
|
-
this.sixTileSelected.emit();
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/** Hides the tile */
|
|
35
|
-
async hide() {
|
|
36
|
-
this.visible = false;
|
|
37
|
-
}
|
|
38
|
-
/** Shows the tile */
|
|
39
|
-
async show() {
|
|
40
|
-
this.visible = true;
|
|
41
|
-
}
|
|
42
|
-
connectedCallback() {
|
|
43
|
-
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
44
|
-
}
|
|
45
|
-
componentWillLoad() {
|
|
46
|
-
this.handleSlotChange();
|
|
47
|
-
}
|
|
48
|
-
handleSlotChange() {
|
|
49
|
-
this.hasIconSlot = hasSlot(this.host, 'icon');
|
|
50
|
-
this.hasLabelSlot = hasSlot(this.host, 'label');
|
|
51
|
-
if (this.hasIconSlot) {
|
|
52
|
-
let slot = this.host.querySelector(`[slot="icon"]`);
|
|
53
|
-
slot.addEventListener('click', this.handleClickEvent);
|
|
54
|
-
}
|
|
55
|
-
if (this.hasLabelSlot) {
|
|
56
|
-
let slot = this.host.querySelector(`[slot="label"]`);
|
|
57
|
-
slot.addEventListener('click', this.handleClickEvent);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
return (h("six-tooltip", { disabled: this.disableTooltip || this.label === '', content: this.label }, h("div", { part: "base", class: {
|
|
62
|
-
tile: true,
|
|
63
|
-
'tile--visible': this.visible,
|
|
64
|
-
'tile--small': this.size === 'small',
|
|
65
|
-
'tile--medium': this.size === 'medium',
|
|
66
|
-
'tile--large': this.size === 'large',
|
|
67
|
-
'tile--elevated': this.elevated,
|
|
68
|
-
} }, h("div", { part: "header", class: "tile__header" }, h("six-icon-button", { class: {
|
|
69
|
-
'tile__header--hidden': !this.closeable,
|
|
70
|
-
}, name: "close", size: closeIconSize(this.size), onClick: this.handleCloseClickEvent })), h("div", { part: "body", class: "tile__body" }, this.iconName && (h("six-icon", { onClick: this.handleClickEvent, size: iconSize(this.size) }, this.iconName)), this.hasIconSlot && h("slot", { name: "icon" })), h("div", { part: "footer", class: {
|
|
71
|
-
'tile__footer--small': this.size === 'small',
|
|
72
|
-
'tile__footer--medium': this.size === 'medium',
|
|
73
|
-
'tile__footer--large': this.size === 'large',
|
|
74
|
-
} }, this.label && (h("div", { class: {
|
|
75
|
-
'.label__footer': true,
|
|
76
|
-
}, onClick: this.handleClickEvent }, this.label)), this.hasLabelSlot && h("slot", { name: "label" })))));
|
|
77
|
-
}
|
|
78
|
-
get host() { return getElement(this); }
|
|
79
|
-
};
|
|
80
|
-
const closeIconSize = (size) => {
|
|
81
|
-
return {
|
|
82
|
-
small: 'xxSmall',
|
|
83
|
-
medium: 'medium',
|
|
84
|
-
large: 'medium',
|
|
85
|
-
}[size];
|
|
86
|
-
};
|
|
87
|
-
const iconSize = (size) => {
|
|
88
|
-
return {
|
|
89
|
-
small: 'xLarge',
|
|
90
|
-
medium: 'xxLarge',
|
|
91
|
-
large: 'xxxLarge',
|
|
92
|
-
}[size];
|
|
93
|
-
};
|
|
6
|
+
let SixTile = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.sixTileClose = createEvent(this, "six-tile-closed", 7);
|
|
10
|
+
this.sixTileSelected = createEvent(this, "six-tile-selected", 7);
|
|
11
|
+
/** The tile's label. */
|
|
12
|
+
this.label = '';
|
|
13
|
+
/** Flag, whether the tile is closeable. */
|
|
14
|
+
this.closeable = true;
|
|
15
|
+
/** Flag, whether the tile should cast a shadow. */
|
|
16
|
+
this.elevated = false;
|
|
17
|
+
/** Enables tile tooltip for tiles */
|
|
18
|
+
this.disableTooltip = true;
|
|
19
|
+
/** Set to true to disable the tile. */
|
|
20
|
+
this.disabled = false;
|
|
21
|
+
/** The tile's size. */
|
|
22
|
+
this.size = 'medium';
|
|
23
|
+
this.visible = true;
|
|
24
|
+
this.hasIconSlot = false;
|
|
25
|
+
this.hasLabelSlot = false;
|
|
26
|
+
this.handleCloseClickEvent = () => {
|
|
27
|
+
this.visible = false;
|
|
28
|
+
this.sixTileClose.emit();
|
|
29
|
+
};
|
|
30
|
+
this.handleClickEvent = () => {
|
|
31
|
+
this.sixTileSelected.emit();
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Hides the tile */
|
|
35
|
+
async hide() {
|
|
36
|
+
this.visible = false;
|
|
37
|
+
}
|
|
38
|
+
/** Shows the tile */
|
|
39
|
+
async show() {
|
|
40
|
+
this.visible = true;
|
|
41
|
+
}
|
|
42
|
+
connectedCallback() {
|
|
43
|
+
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
44
|
+
}
|
|
45
|
+
componentWillLoad() {
|
|
46
|
+
this.handleSlotChange();
|
|
47
|
+
}
|
|
48
|
+
handleSlotChange() {
|
|
49
|
+
this.hasIconSlot = hasSlot(this.host, 'icon');
|
|
50
|
+
this.hasLabelSlot = hasSlot(this.host, 'label');
|
|
51
|
+
if (this.hasIconSlot) {
|
|
52
|
+
let slot = this.host.querySelector(`[slot="icon"]`);
|
|
53
|
+
slot.addEventListener('click', this.handleClickEvent);
|
|
54
|
+
}
|
|
55
|
+
if (this.hasLabelSlot) {
|
|
56
|
+
let slot = this.host.querySelector(`[slot="label"]`);
|
|
57
|
+
slot.addEventListener('click', this.handleClickEvent);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
return (h("six-tooltip", { disabled: this.disableTooltip || this.label === '', content: this.label }, h("div", { part: "base", class: {
|
|
62
|
+
tile: true,
|
|
63
|
+
'tile--visible': this.visible,
|
|
64
|
+
'tile--small': this.size === 'small',
|
|
65
|
+
'tile--medium': this.size === 'medium',
|
|
66
|
+
'tile--large': this.size === 'large',
|
|
67
|
+
'tile--elevated': this.elevated,
|
|
68
|
+
} }, h("div", { part: "header", class: "tile__header" }, h("six-icon-button", { class: {
|
|
69
|
+
'tile__header--hidden': !this.closeable,
|
|
70
|
+
}, name: "close", size: closeIconSize(this.size), onClick: this.handleCloseClickEvent })), h("div", { part: "body", class: "tile__body" }, this.iconName && (h("six-icon", { onClick: this.handleClickEvent, size: iconSize(this.size) }, this.iconName)), this.hasIconSlot && h("slot", { name: "icon" })), h("div", { part: "footer", class: {
|
|
71
|
+
'tile__footer--small': this.size === 'small',
|
|
72
|
+
'tile__footer--medium': this.size === 'medium',
|
|
73
|
+
'tile__footer--large': this.size === 'large',
|
|
74
|
+
} }, this.label && (h("div", { class: {
|
|
75
|
+
'.label__footer': true,
|
|
76
|
+
}, onClick: this.handleClickEvent }, this.label)), this.hasLabelSlot && h("slot", { name: "label" })))));
|
|
77
|
+
}
|
|
78
|
+
get host() { return getElement(this); }
|
|
79
|
+
};
|
|
80
|
+
const closeIconSize = (size) => {
|
|
81
|
+
return {
|
|
82
|
+
small: 'xxSmall',
|
|
83
|
+
medium: 'medium',
|
|
84
|
+
large: 'medium',
|
|
85
|
+
}[size];
|
|
86
|
+
};
|
|
87
|
+
const iconSize = (size) => {
|
|
88
|
+
return {
|
|
89
|
+
small: 'xLarge',
|
|
90
|
+
medium: 'xxLarge',
|
|
91
|
+
large: 'xxxLarge',
|
|
92
|
+
}[size];
|
|
93
|
+
};
|
|
94
94
|
SixTile.style = sixTileCss;
|
|
95
95
|
|
|
96
96
|
export { SixTile as six_tile };
|