@six-group/ui-library 0.0.0-insider.a358260 → 0.0.0-insider.cd0cd0d
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-b835dfae.js +61 -0
- package/dist/cjs/event-listeners-b835dfae.js.map +1 -0
- package/dist/cjs/{execution-control-46f388e0.js → execution-control-45c84c46.js} +6 -3
- package/dist/cjs/execution-control-45c84c46.js.map +1 -0
- package/dist/cjs/{focus-visible-0b352c74.js → focus-visible-e0d93a95.js} +3 -3
- package/dist/cjs/focus-visible-e0d93a95.js.map +1 -0
- package/dist/cjs/form-8cbd4e0e.js +20 -0
- package/dist/cjs/form-8cbd4e0e.js.map +1 -0
- package/dist/cjs/{form-control-2c17c573.js → form-control-8df00a52.js} +9 -10
- package/dist/cjs/form-control-8df00a52.js.map +1 -0
- package/dist/cjs/index.cjs.js +94 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{modal-48d42228.js → modal-21350fb5.js} +4 -3
- package/dist/cjs/modal-21350fb5.js.map +1 -0
- package/dist/cjs/{popover-f743f62b.js → popover-8885d50f.js} +39 -31
- package/dist/cjs/popover-8885d50f.js.map +1 -0
- package/dist/cjs/popup-44836aaf.js +103 -0
- package/dist/cjs/popup-44836aaf.js.map +1 -0
- package/dist/cjs/set-attributes_2.cjs.entry.js +3 -1
- package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-alert.cjs.entry.js +17 -22
- package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +4 -7
- package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +1 -1
- package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/six-button.cjs.entry.js +35 -33
- package/dist/cjs/six-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-card.cjs.entry.js.map +1 -1
- package/dist/cjs/six-checkbox.cjs.entry.js +9 -47
- package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/six-datepicker.cjs.entry.js +150 -278
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +47 -46
- package/dist/cjs/six-details.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +35 -39
- package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/six-drawer.cjs.entry.js +32 -36
- package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +214 -195
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +19 -21
- package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-file-upload.cjs.entry.js +20 -20
- package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +11 -10
- package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
- package/dist/cjs/six-header.cjs.entry.js +65 -43
- package/dist/cjs/six-header.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +3 -3
- package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/six-input.cjs.entry.js +28 -87
- package/dist/cjs/six-input.cjs.entry.js.map +1 -1
- package/dist/cjs/six-item-picker.cjs.entry.js +58 -77
- package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +4 -2
- package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
- package/dist/cjs/six-menu-item.cjs.entry.js +8 -6
- package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +4 -1
- package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +3 -3
- package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +17 -23
- package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/six-range.cjs.entry.js +6 -44
- package/dist/cjs/six-range.cjs.entry.js.map +1 -1
- package/dist/cjs/six-root.cjs.entry.js +1 -1
- package/dist/cjs/six-root.cjs.entry.js.map +1 -1
- package/dist/cjs/six-search-field.cjs.entry.js +10 -5
- package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/six-select.cjs.entry.js +129 -222
- package/dist/cjs/six-select.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +9 -5
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-sidebar.cjs.entry.js +39 -18
- package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/six-switch.cjs.entry.js +54 -62
- package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-group.cjs.entry.js +130 -112
- package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +4 -2
- package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +4 -7
- package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +27 -76
- package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tile.cjs.entry.js +13 -16
- package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +157 -213
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +53 -56
- package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{slot-ad537f24.js → slot-bccbdb59.js} +11 -10
- package/dist/cjs/slot-bccbdb59.js.map +1 -0
- package/dist/cjs/ui-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/six-alert/six-alert.js +17 -22
- package/dist/collection/components/six-alert/six-alert.js.map +1 -1
- package/dist/collection/components/six-avatar/six-avatar.js +4 -7
- package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
- package/dist/collection/components/six-badge/six-badge.js +1 -1
- package/dist/collection/components/six-badge/six-badge.js.map +1 -1
- package/dist/collection/components/six-button/six-button.js +44 -40
- package/dist/collection/components/six-button/six-button.js.map +1 -1
- package/dist/collection/components/six-card/six-card.js +1 -1
- package/dist/collection/components/six-card/six-card.js.map +1 -1
- package/dist/collection/components/six-checkbox/six-checkbox.js +20 -128
- package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/day-selection.js +2 -2
- package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/month-selection.js +4 -3
- package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/components/year-selection.js +9 -6
- package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +186 -376
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- package/dist/collection/components/six-details/six-details.js +51 -50
- package/dist/collection/components/six-details/six-details.js.map +1 -1
- package/dist/collection/components/six-dialog/six-dialog.js +34 -38
- package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
- package/dist/collection/components/six-drawer/six-drawer.js +31 -35
- package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
- package/dist/collection/components/six-dropdown/six-dropdown.js +185 -173
- package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
- package/dist/collection/components/six-error-page/six-error-page.js +25 -27
- package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +3 -3
- package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
- package/dist/collection/components/six-file-upload/six-file-upload.js +32 -32
- package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
- package/dist/collection/components/six-group-label/six-group-label.js +12 -10
- package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
- package/dist/collection/components/six-header/six-header.js +64 -42
- package/dist/collection/components/six-header/six-header.js.map +1 -1
- package/dist/collection/components/six-icon-button/six-icon-button.js +8 -8
- package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
- package/dist/collection/components/six-input/six-input.js +77 -274
- package/dist/collection/components/six-input/six-input.js.map +1 -1
- package/dist/collection/components/six-item-picker/six-item-picker.js +65 -84
- package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +2 -2
- package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +10 -8
- package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
- package/dist/collection/components/six-main-container/six-main-container.js +1 -1
- package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
- package/dist/collection/components/six-menu/six-menu.js +29 -23
- package/dist/collection/components/six-menu/six-menu.js.map +1 -1
- package/dist/collection/components/six-menu-item/six-menu-item.js +7 -5
- package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
- package/dist/collection/components/six-picto/six-picto.js +5 -2
- package/dist/collection/components/six-picto/six-picto.js.map +1 -1
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +5 -4
- package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
- package/dist/collection/components/six-radio/six-radio.js +21 -76
- package/dist/collection/components/six-radio/six-radio.js.map +1 -1
- package/dist/collection/components/six-range/six-range.js +27 -119
- package/dist/collection/components/six-range/six-range.js.map +1 -1
- package/dist/collection/components/six-root/six-root.js +4 -4
- package/dist/collection/components/six-root/six-root.js.map +1 -1
- package/dist/collection/components/six-search-field/six-search-field.js +10 -5
- package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
- package/dist/collection/components/six-select/six-select.js +165 -294
- package/dist/collection/components/six-select/six-select.js.map +1 -1
- package/dist/collection/components/six-select/util.js.map +1 -1
- package/dist/collection/components/six-sidebar/six-sidebar.js +40 -19
- package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +12 -8
- package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
- package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +1 -1
- package/dist/collection/components/six-switch/six-switch.css +77 -0
- package/dist/collection/components/six-switch/six-switch.js +96 -133
- package/dist/collection/components/six-switch/six-switch.js.map +1 -1
- package/dist/collection/components/six-tab/six-tab.js +5 -3
- package/dist/collection/components/six-tab/six-tab.js.map +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.js +130 -112
- package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +2 -2
- package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
- package/dist/collection/components/six-tag/six-tag.js +4 -7
- package/dist/collection/components/six-tag/six-tag.js.map +1 -1
- package/dist/collection/components/six-textarea/six-textarea.js +72 -207
- package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
- package/dist/collection/components/six-tile/six-tile.js +17 -20
- package/dist/collection/components/six-tile/six-tile.js.map +1 -1
- package/dist/collection/components/six-timepicker/six-timepicker.js +153 -254
- package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.js +56 -59
- package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
- package/dist/collection/functional-components/form-control/form-control.js +8 -9
- package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/testUtil/delay.js.map +1 -1
- package/dist/collection/utils/date-util.js +25 -16
- package/dist/collection/utils/date-util.js.map +1 -1
- package/dist/collection/utils/error-messages.js +91 -0
- package/dist/collection/utils/error-messages.js.map +1 -0
- package/dist/collection/utils/event-listeners.js +22 -6
- package/dist/collection/utils/event-listeners.js.map +1 -1
- package/dist/collection/utils/execution-control.js +5 -4
- package/dist/collection/utils/execution-control.js.map +1 -1
- package/dist/collection/utils/focus-visible.js +2 -2
- package/dist/collection/utils/focus-visible.js.map +1 -1
- package/dist/collection/utils/form.js +15 -0
- package/dist/collection/utils/form.js.map +1 -0
- package/dist/collection/utils/modal.js +3 -2
- package/dist/collection/utils/modal.js.map +1 -1
- package/dist/collection/utils/popover.js +32 -18
- package/dist/collection/utils/popover.js.map +1 -1
- package/dist/collection/utils/popup.js +95 -0
- package/dist/collection/utils/popup.js.map +1 -0
- package/dist/collection/utils/slot.js +9 -24
- package/dist/collection/utils/slot.js.map +1 -1
- package/dist/collection/utils/tabbable.js +6 -6
- package/dist/collection/utils/tabbable.js.map +1 -1
- package/dist/collection/utils/time.util.js +48 -34
- package/dist/collection/utils/time.util.js.map +1 -1
- package/dist/collection/utils/type-check.js +0 -1
- package/dist/collection/utils/type-check.js.map +1 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js +3 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -1
- package/dist/components/event-listeners.js +22 -6
- package/dist/components/event-listeners.js.map +1 -1
- package/dist/components/execution-control.js +5 -2
- package/dist/components/execution-control.js.map +1 -1
- package/dist/components/focus-visible.js +2 -2
- package/dist/components/focus-visible.js.map +1 -1
- package/dist/components/form-control.js +8 -9
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.js +18 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/index.js +92 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/modal.js +3 -2
- package/dist/components/modal.js.map +1 -1
- package/dist/components/popover.js +38 -30
- package/dist/components/popover.js.map +1 -1
- package/dist/components/set-attributes2.js +3 -1
- package/dist/components/set-attributes2.js.map +1 -1
- package/dist/components/six-alert.js +17 -22
- package/dist/components/six-alert.js.map +1 -1
- package/dist/components/six-avatar.js +4 -7
- package/dist/components/six-avatar.js.map +1 -1
- package/dist/components/six-badge.js +1 -1
- package/dist/components/six-badge.js.map +1 -1
- package/dist/components/six-button.js +34 -32
- package/dist/components/six-button.js.map +1 -1
- package/dist/components/six-card.js.map +1 -1
- package/dist/components/six-checkbox.js +7 -50
- package/dist/components/six-checkbox.js.map +1 -1
- package/dist/components/six-datepicker.js +150 -281
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components/six-details2.js +46 -45
- package/dist/components/six-details2.js.map +1 -1
- package/dist/components/six-dialog.js +33 -37
- package/dist/components/six-dialog.js.map +1 -1
- package/dist/components/six-drawer.js +30 -34
- package/dist/components/six-drawer.js.map +1 -1
- package/dist/components/six-dropdown2.js +185 -173
- package/dist/components/six-dropdown2.js.map +1 -1
- package/dist/components/six-error-page.js +19 -21
- package/dist/components/six-error-page.js.map +1 -1
- package/dist/components/six-file-list-item.js +1 -1
- package/dist/components/six-file-list-item.js.map +1 -1
- package/dist/components/six-file-upload.js +20 -20
- package/dist/components/six-file-upload.js.map +1 -1
- package/dist/components/six-group-label.js +10 -9
- package/dist/components/six-group-label.js.map +1 -1
- package/dist/components/six-header.js +64 -42
- package/dist/components/six-header.js.map +1 -1
- package/dist/components/six-icon-button2.js +2 -2
- package/dist/components/six-icon-button2.js.map +1 -1
- package/dist/components/six-input2.js +30 -98
- package/dist/components/six-input2.js.map +1 -1
- package/dist/components/six-item-picker2.js +56 -75
- package/dist/components/six-item-picker2.js.map +1 -1
- package/dist/components/six-language-switcher.js +1 -1
- package/dist/components/six-language-switcher.js.map +1 -1
- package/dist/components/six-layout-grid.js +5 -3
- package/dist/components/six-layout-grid.js.map +1 -1
- package/dist/components/six-main-container.js.map +1 -1
- package/dist/components/six-menu-item2.js +7 -5
- package/dist/components/six-menu-item2.js.map +1 -1
- package/dist/components/six-menu2.js +25 -18
- package/dist/components/six-menu2.js.map +1 -1
- package/dist/components/six-picto2.js +4 -1
- package/dist/components/six-picto2.js.map +1 -1
- package/dist/components/six-progress-ring.js +3 -3
- package/dist/components/six-progress-ring.js.map +1 -1
- package/dist/components/six-radio.js +19 -28
- package/dist/components/six-radio.js.map +1 -1
- package/dist/components/six-range.js +8 -50
- package/dist/components/six-range.js.map +1 -1
- package/dist/components/six-root.js +1 -1
- package/dist/components/six-root.js.map +1 -1
- package/dist/components/six-search-field.js +8 -3
- package/dist/components/six-search-field.js.map +1 -1
- package/dist/components/six-select.js +129 -228
- package/dist/components/six-select.js.map +1 -1
- package/dist/components/six-sidebar-item-group.js +8 -4
- package/dist/components/six-sidebar-item-group.js.map +1 -1
- package/dist/components/six-sidebar.js +39 -18
- package/dist/components/six-sidebar.js.map +1 -1
- package/dist/components/six-spinner2.js.map +1 -1
- package/dist/components/six-switch.js +58 -68
- package/dist/components/six-switch.js.map +1 -1
- package/dist/components/six-tab-group.js +129 -111
- package/dist/components/six-tab-group.js.map +1 -1
- package/dist/components/six-tab-panel.js +1 -1
- package/dist/components/six-tab-panel.js.map +1 -1
- package/dist/components/six-tab.js +4 -2
- package/dist/components/six-tab.js.map +1 -1
- package/dist/components/six-tag2.js +4 -7
- package/dist/components/six-tag2.js.map +1 -1
- package/dist/components/six-textarea.js +29 -84
- package/dist/components/six-textarea.js.map +1 -1
- package/dist/components/six-tile.js +14 -17
- package/dist/components/six-tile.js.map +1 -1
- package/dist/components/six-timepicker.js +1 -1
- package/dist/components/six-timepicker2.js +247 -258
- package/dist/components/six-timepicker2.js.map +1 -1
- package/dist/components/six-tooltip2.js +52 -55
- package/dist/components/six-tooltip2.js.map +1 -1
- package/dist/components/slot.js +10 -9
- package/dist/components/slot.js.map +1 -1
- package/dist/components.json +494 -891
- package/dist/esm/event-listeners-535f3ad1.js +59 -0
- package/dist/esm/event-listeners-535f3ad1.js.map +1 -0
- package/dist/esm/{execution-control-1a60d709.js → execution-control-72cc50f4.js} +6 -3
- package/dist/esm/execution-control-72cc50f4.js.map +1 -0
- package/dist/esm/{focus-visible-97933ea9.js → focus-visible-fa7129a0.js} +3 -3
- package/dist/esm/focus-visible-fa7129a0.js.map +1 -0
- package/dist/esm/form-0b9c11cd.js +18 -0
- package/dist/esm/form-0b9c11cd.js.map +1 -0
- package/dist/esm/{form-control-3b440ea1.js → form-control-785c5f79.js} +9 -10
- package/dist/esm/form-control-785c5f79.js.map +1 -0
- package/dist/esm/index.js +91 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{modal-5ebdc320.js → modal-b1d96441.js} +4 -3
- package/dist/esm/modal-b1d96441.js.map +1 -0
- package/dist/esm/{popover-bd2c2fca.js → popover-2e72e7d8.js} +39 -31
- package/dist/esm/popover-2e72e7d8.js.map +1 -0
- package/dist/esm/popup-678b8592.js +98 -0
- package/dist/esm/popup-678b8592.js.map +1 -0
- package/dist/esm/set-attributes_2.entry.js +3 -1
- package/dist/esm/set-attributes_2.entry.js.map +1 -1
- package/dist/esm/six-alert.entry.js +17 -22
- package/dist/esm/six-alert.entry.js.map +1 -1
- package/dist/esm/six-avatar.entry.js +4 -7
- package/dist/esm/six-avatar.entry.js.map +1 -1
- package/dist/esm/six-badge.entry.js +1 -1
- package/dist/esm/six-badge.entry.js.map +1 -1
- package/dist/esm/six-button.entry.js +35 -33
- package/dist/esm/six-button.entry.js.map +1 -1
- package/dist/esm/six-card.entry.js.map +1 -1
- package/dist/esm/six-checkbox.entry.js +9 -47
- package/dist/esm/six-checkbox.entry.js.map +1 -1
- package/dist/esm/six-datepicker.entry.js +148 -276
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +47 -46
- package/dist/esm/six-details.entry.js.map +1 -1
- package/dist/esm/six-dialog.entry.js +35 -39
- package/dist/esm/six-dialog.entry.js.map +1 -1
- package/dist/esm/six-drawer.entry.js +32 -36
- package/dist/esm/six-drawer.entry.js.map +1 -1
- package/dist/esm/six-dropdown_2.entry.js +214 -195
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +19 -21
- package/dist/esm/six-error-page.entry.js.map +1 -1
- package/dist/esm/six-file-list-item.entry.js +1 -1
- package/dist/esm/six-file-list-item.entry.js.map +1 -1
- package/dist/esm/six-file-upload.entry.js +20 -20
- package/dist/esm/six-file-upload.entry.js.map +1 -1
- package/dist/esm/six-group-label.entry.js +11 -10
- package/dist/esm/six-group-label.entry.js.map +1 -1
- package/dist/esm/six-header.entry.js +65 -43
- package/dist/esm/six-header.entry.js.map +1 -1
- package/dist/esm/six-icon-button.entry.js +3 -3
- package/dist/esm/six-icon-button.entry.js.map +1 -1
- package/dist/esm/six-input.entry.js +28 -87
- package/dist/esm/six-input.entry.js.map +1 -1
- package/dist/esm/six-item-picker.entry.js +58 -77
- package/dist/esm/six-item-picker.entry.js.map +1 -1
- package/dist/esm/six-language-switcher.entry.js +1 -1
- package/dist/esm/six-language-switcher.entry.js.map +1 -1
- package/dist/esm/six-layout-grid.entry.js +4 -2
- package/dist/esm/six-layout-grid.entry.js.map +1 -1
- package/dist/esm/six-main-container.entry.js.map +1 -1
- package/dist/esm/six-menu-item.entry.js +8 -6
- package/dist/esm/six-menu-item.entry.js.map +1 -1
- package/dist/esm/six-picto.entry.js +4 -1
- package/dist/esm/six-picto.entry.js.map +1 -1
- package/dist/esm/six-progress-ring.entry.js +3 -3
- package/dist/esm/six-progress-ring.entry.js.map +1 -1
- package/dist/esm/six-radio.entry.js +17 -23
- package/dist/esm/six-radio.entry.js.map +1 -1
- package/dist/esm/six-range.entry.js +6 -44
- package/dist/esm/six-range.entry.js.map +1 -1
- package/dist/esm/six-root.entry.js +1 -1
- package/dist/esm/six-root.entry.js.map +1 -1
- package/dist/esm/six-search-field.entry.js +10 -5
- package/dist/esm/six-search-field.entry.js.map +1 -1
- package/dist/esm/six-select.entry.js +129 -222
- package/dist/esm/six-select.entry.js.map +1 -1
- package/dist/esm/six-sidebar-item-group.entry.js +9 -5
- package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
- package/dist/esm/six-sidebar.entry.js +39 -18
- package/dist/esm/six-sidebar.entry.js.map +1 -1
- package/dist/esm/six-spinner.entry.js.map +1 -1
- package/dist/esm/six-switch.entry.js +55 -63
- package/dist/esm/six-switch.entry.js.map +1 -1
- package/dist/esm/six-tab-group.entry.js +130 -112
- package/dist/esm/six-tab-group.entry.js.map +1 -1
- package/dist/esm/six-tab-panel.entry.js +1 -1
- package/dist/esm/six-tab-panel.entry.js.map +1 -1
- package/dist/esm/six-tab.entry.js +4 -2
- package/dist/esm/six-tab.entry.js.map +1 -1
- package/dist/esm/six-tag.entry.js +4 -7
- package/dist/esm/six-tag.entry.js.map +1 -1
- package/dist/esm/six-textarea.entry.js +27 -76
- package/dist/esm/six-textarea.entry.js.map +1 -1
- package/dist/esm/six-tile.entry.js +13 -16
- package/dist/esm/six-tile.entry.js.map +1 -1
- package/dist/esm/six-timepicker.entry.js +157 -213
- package/dist/esm/six-timepicker.entry.js.map +1 -1
- package/dist/esm/six-tooltip.entry.js +53 -56
- package/dist/esm/six-tooltip.entry.js.map +1 -1
- package/dist/esm/{slot-6f3984c7.js → slot-2e64df19.js} +11 -10
- package/dist/esm/slot-2e64df19.js.map +1 -0
- package/dist/esm/ui-library.js +1 -1
- package/dist/types/components/six-alert/six-alert.d.ts +5 -7
- package/dist/types/components/six-avatar/six-avatar.d.ts +1 -2
- package/dist/types/components/six-badge/six-badge.d.ts +0 -1
- package/dist/types/components/six-button/six-button.d.ts +8 -9
- package/dist/types/components/six-checkbox/six-checkbox.d.ts +5 -17
- package/dist/types/components/six-datepicker/components/day-selection.d.ts +9 -5
- package/dist/types/components/six-datepicker/components/month-selection.d.ts +8 -5
- package/dist/types/components/six-datepicker/components/year-selection.d.ts +7 -5
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +41 -52
- package/dist/types/components/six-details/six-details.d.ts +12 -12
- package/dist/types/components/six-dialog/six-dialog.d.ts +12 -13
- package/dist/types/components/six-drawer/six-drawer.d.ts +12 -13
- package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -32
- package/dist/types/components/six-error-page/six-error-page.d.ts +1 -1
- package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +3 -3
- package/dist/types/components/six-file-upload/six-file-upload.d.ts +11 -11
- package/dist/types/components/six-group-label/six-group-label.d.ts +5 -5
- package/dist/types/components/six-header/six-header.d.ts +16 -27
- package/dist/types/components/six-icon-button/six-icon-button.d.ts +4 -4
- package/dist/types/components/six-input/six-input.d.ts +9 -35
- package/dist/types/components/six-item-picker/six-item-picker.d.ts +13 -16
- package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +1 -1
- package/dist/types/components/six-menu/six-menu.d.ts +10 -11
- package/dist/types/components/six-menu-item/six-menu-item.d.ts +6 -6
- package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +2 -2
- package/dist/types/components/six-radio/six-radio.d.ts +5 -10
- package/dist/types/components/six-range/six-range.d.ts +6 -21
- package/dist/types/components/six-root/six-root.d.ts +3 -3
- package/dist/types/components/six-search-field/six-search-field.d.ts +4 -5
- package/dist/types/components/six-select/six-select.d.ts +19 -31
- package/dist/types/components/six-sidebar/six-sidebar.d.ts +5 -5
- package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +7 -6
- package/dist/types/components/six-spinner/six-spinner.d.ts +2 -2
- package/dist/types/components/six-switch/six-switch.d.ts +18 -21
- package/dist/types/components/six-tab/six-tab.d.ts +3 -3
- package/dist/types/components/six-tab-group/six-tab-group.d.ts +20 -21
- package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +1 -1
- package/dist/types/components/six-tag/six-tag.d.ts +1 -3
- package/dist/types/components/six-textarea/six-textarea.d.ts +9 -28
- package/dist/types/components/six-tile/six-tile.d.ts +2 -3
- package/dist/types/components/six-timepicker/six-timepicker.d.ts +26 -43
- package/dist/types/components/six-tooltip/six-tooltip.d.ts +19 -21
- package/dist/types/components.d.ts +190 -417
- package/dist/types/functional-components/form-control/form-control.d.ts +5 -6
- package/dist/types/index.d.ts +1 -0
- package/dist/types/testUtil/delay.d.ts +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types/utils/date-util.d.ts +18 -10
- package/dist/types/utils/error-messages.d.ts +42 -0
- package/dist/types/utils/event-listeners.d.ts +2 -1
- package/dist/types/utils/execution-control.d.ts +1 -3
- package/dist/types/utils/form.d.ts +1 -0
- package/dist/types/utils/modal.d.ts +2 -2
- package/dist/types/utils/popover.d.ts +5 -5
- package/dist/types/utils/popup.d.ts +9 -0
- package/dist/types/utils/slot.d.ts +2 -7
- package/dist/types/utils/tabbable.d.ts +1 -1
- package/dist/types/utils/time.util.d.ts +18 -9
- package/dist/types/utils/type-check.d.ts +3 -4
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +1 -1
- package/dist/ui-library/index.esm.js +1 -1
- package/dist/ui-library/index.esm.js.map +1 -1
- package/dist/ui-library/p-0108fe92.entry.js +2 -0
- package/dist/ui-library/p-0108fe92.entry.js.map +1 -0
- package/dist/ui-library/p-03a145f5.entry.js +2 -0
- package/dist/ui-library/p-03a145f5.entry.js.map +1 -0
- package/dist/ui-library/{p-3c635d0a.entry.js → p-087fdd96.entry.js} +2 -2
- package/dist/ui-library/p-087fdd96.entry.js.map +1 -0
- package/dist/ui-library/p-09779e47.entry.js +2 -0
- package/dist/ui-library/p-09779e47.entry.js.map +1 -0
- package/dist/ui-library/p-097cced4.entry.js.map +1 -1
- package/dist/ui-library/p-0b2c6348.js +2 -0
- package/dist/ui-library/p-0b2c6348.js.map +1 -0
- package/dist/ui-library/p-0cc08e91.js +2 -0
- package/dist/ui-library/p-0cc08e91.js.map +1 -0
- package/dist/ui-library/p-0fe78f9b.js +2 -0
- package/dist/ui-library/p-0fe78f9b.js.map +1 -0
- package/dist/ui-library/p-18e9f8b8.entry.js +2 -0
- package/dist/ui-library/p-18e9f8b8.entry.js.map +1 -0
- package/dist/ui-library/p-2761f908.js +2 -0
- package/dist/ui-library/p-2761f908.js.map +1 -0
- package/dist/ui-library/{p-19b50b5a.entry.js → p-28be55f0.entry.js} +2 -2
- package/dist/ui-library/p-28be55f0.entry.js.map +1 -0
- package/dist/ui-library/{p-c349d1d4.entry.js → p-3929b0af.entry.js} +2 -2
- package/dist/ui-library/p-3929b0af.entry.js.map +1 -0
- package/dist/ui-library/{p-9328e5bc.entry.js → p-445ba5b8.entry.js} +2 -2
- package/dist/ui-library/p-445ba5b8.entry.js.map +1 -0
- package/dist/ui-library/p-4d408fb4.js +2 -0
- package/dist/ui-library/p-4d408fb4.js.map +1 -0
- package/dist/ui-library/p-502ff3d3.entry.js +2 -0
- package/dist/ui-library/p-502ff3d3.entry.js.map +1 -0
- package/dist/ui-library/p-5a34c93e.entry.js +2 -0
- package/dist/ui-library/p-5a34c93e.entry.js.map +1 -0
- package/dist/ui-library/p-60621dc6.js +2 -0
- package/dist/ui-library/p-60621dc6.js.map +1 -0
- package/dist/ui-library/p-63703ba3.entry.js.map +1 -1
- package/dist/ui-library/p-66180e89.entry.js +2 -0
- package/dist/ui-library/p-66180e89.entry.js.map +1 -0
- package/dist/ui-library/p-686b12ec.entry.js +2 -0
- package/dist/ui-library/p-686b12ec.entry.js.map +1 -0
- package/dist/ui-library/p-71035abf.entry.js +2 -0
- package/dist/ui-library/p-71035abf.entry.js.map +1 -0
- package/dist/ui-library/{p-8a970a40.entry.js → p-724e154d.entry.js} +2 -2
- package/dist/ui-library/p-724e154d.entry.js.map +1 -0
- package/dist/ui-library/p-72ca96e1.entry.js +2 -0
- package/dist/ui-library/p-72ca96e1.entry.js.map +1 -0
- package/dist/ui-library/p-73597d13.entry.js.map +1 -1
- package/dist/ui-library/{p-c30f9e0b.entry.js → p-778cf804.entry.js} +2 -2
- package/dist/ui-library/p-778cf804.entry.js.map +1 -0
- package/dist/ui-library/p-87032e26.entry.js +2 -0
- package/dist/ui-library/p-87032e26.entry.js.map +1 -0
- package/dist/ui-library/p-8cf72af6.js +2 -0
- package/dist/ui-library/p-8cf72af6.js.map +1 -0
- package/dist/ui-library/p-8e0b6b7e.entry.js +2 -0
- package/dist/ui-library/p-8e0b6b7e.entry.js.map +1 -0
- package/dist/ui-library/p-912092c0.entry.js +2 -0
- package/dist/ui-library/p-912092c0.entry.js.map +1 -0
- package/dist/ui-library/p-92ca6a84.entry.js +2 -0
- package/dist/ui-library/p-92ca6a84.entry.js.map +1 -0
- package/dist/ui-library/{p-d5633a29.entry.js → p-9337cdd6.entry.js} +2 -2
- package/dist/ui-library/p-9337cdd6.entry.js.map +1 -0
- package/dist/ui-library/p-9461417e.entry.js +2 -0
- package/dist/ui-library/p-9461417e.entry.js.map +1 -0
- package/dist/ui-library/p-a1d4f6cf.entry.js.map +1 -1
- package/dist/ui-library/p-a49ae60a.entry.js +2 -0
- package/dist/ui-library/p-a49ae60a.entry.js.map +1 -0
- package/dist/ui-library/{p-611e1978.entry.js → p-a844cb72.entry.js} +2 -2
- package/dist/ui-library/{p-611e1978.entry.js.map → p-a844cb72.entry.js.map} +1 -1
- package/dist/ui-library/p-afcbe9da.entry.js +2 -0
- package/dist/ui-library/p-afcbe9da.entry.js.map +1 -0
- package/dist/ui-library/{p-97cc839c.entry.js → p-b3bff992.entry.js} +2 -2
- package/dist/ui-library/p-b3bff992.entry.js.map +1 -0
- package/dist/ui-library/p-b4547fb5.entry.js +2 -0
- package/dist/ui-library/p-b4547fb5.entry.js.map +1 -0
- package/dist/ui-library/{p-4f8394d7.js → p-ba74863a.js} +2 -2
- package/dist/ui-library/p-ba74863a.js.map +1 -0
- package/dist/ui-library/p-bd8f8eef.entry.js +2 -0
- package/dist/ui-library/p-bd8f8eef.entry.js.map +1 -0
- package/dist/ui-library/p-c57f16af.entry.js +2 -0
- package/dist/ui-library/p-c57f16af.entry.js.map +1 -0
- package/dist/ui-library/p-c5cdba08.entry.js +2 -0
- package/dist/ui-library/p-c5cdba08.entry.js.map +1 -0
- package/dist/ui-library/p-c87810b0.entry.js +2 -0
- package/dist/ui-library/p-c87810b0.entry.js.map +1 -0
- package/dist/ui-library/{p-af793d04.entry.js → p-cdcde4cd.entry.js} +2 -2
- package/dist/ui-library/p-cdcde4cd.entry.js.map +1 -0
- package/dist/ui-library/p-d6798d35.entry.js +2 -0
- package/dist/ui-library/p-d6798d35.entry.js.map +1 -0
- package/dist/ui-library/p-d87a6f4d.js +2 -0
- package/dist/ui-library/p-d87a6f4d.js.map +1 -0
- package/dist/ui-library/p-dc3f5996.entry.js +2 -0
- package/dist/ui-library/p-dc3f5996.entry.js.map +1 -0
- package/dist/ui-library/p-dcd7c547.entry.js +2 -0
- package/dist/ui-library/p-dcd7c547.entry.js.map +1 -0
- package/dist/ui-library/p-e07b3f0c.entry.js +2 -0
- package/dist/ui-library/p-e07b3f0c.entry.js.map +1 -0
- package/dist/ui-library/{p-19364560.entry.js → p-e8feb81f.entry.js} +2 -2
- package/dist/ui-library/{p-19364560.entry.js.map → p-e8feb81f.entry.js.map} +1 -1
- package/dist/ui-library/p-ef3936e5.entry.js +2 -0
- package/dist/ui-library/p-ef3936e5.entry.js.map +1 -0
- package/dist/ui-library/p-f0dd77e1.entry.js +2 -0
- package/dist/ui-library/p-f0dd77e1.entry.js.map +1 -0
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/event-listeners-74715e62.js +0 -45
- package/dist/cjs/event-listeners-74715e62.js.map +0 -1
- package/dist/cjs/execution-control-46f388e0.js.map +0 -1
- package/dist/cjs/focus-visible-0b352c74.js.map +0 -1
- package/dist/cjs/form-control-2c17c573.js.map +0 -1
- package/dist/cjs/modal-48d42228.js.map +0 -1
- package/dist/cjs/popover-f743f62b.js.map +0 -1
- package/dist/cjs/six-form.cjs.entry.js +0 -231
- package/dist/cjs/six-form.cjs.entry.js.map +0 -1
- package/dist/cjs/six-timepicker.types-c19ebff3.js +0 -56
- package/dist/cjs/six-timepicker.types-c19ebff3.js.map +0 -1
- package/dist/cjs/slot-ad537f24.js.map +0 -1
- package/dist/collection/components/six-form/six-form.css +0 -11
- package/dist/collection/components/six-form/six-form.js +0 -419
- package/dist/collection/components/six-form/six-form.js.map +0 -1
- package/dist/collection/components/six-timepicker/six-time-format.js +0 -15
- package/dist/collection/components/six-timepicker/six-time-format.js.map +0 -1
- package/dist/collection/components/six-timepicker/six-timepicker.types.js +0 -41
- package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +0 -1
- package/dist/collection/utils/as-array.js +0 -2
- package/dist/collection/utils/as-array.js.map +0 -1
- package/dist/collection/utils/matchers.js +0 -3
- package/dist/collection/utils/matchers.js.map +0 -1
- package/dist/collection/utils/testing.js +0 -39
- package/dist/collection/utils/testing.js.map +0 -1
- package/dist/components/six-form.d.ts +0 -11
- package/dist/components/six-form.js +0 -252
- package/dist/components/six-form.js.map +0 -1
- package/dist/esm/event-listeners-570a24ea.js +0 -43
- package/dist/esm/event-listeners-570a24ea.js.map +0 -1
- package/dist/esm/execution-control-1a60d709.js.map +0 -1
- package/dist/esm/focus-visible-97933ea9.js.map +0 -1
- package/dist/esm/form-control-3b440ea1.js.map +0 -1
- package/dist/esm/modal-5ebdc320.js.map +0 -1
- package/dist/esm/popover-bd2c2fca.js.map +0 -1
- package/dist/esm/six-form.entry.js +0 -227
- package/dist/esm/six-form.entry.js.map +0 -1
- package/dist/esm/six-timepicker.types-e161a447.js +0 -50
- package/dist/esm/six-timepicker.types-e161a447.js.map +0 -1
- package/dist/esm/slot-6f3984c7.js.map +0 -1
- package/dist/types/components/six-form/six-form.d.ts +0 -69
- package/dist/types/components/six-timepicker/six-time-format.d.ts +0 -13
- package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +0 -36
- package/dist/types/utils/as-array.d.ts +0 -1
- package/dist/types/utils/matchers.d.ts +0 -2
- package/dist/types/utils/popper.d.ts +0 -33
- package/dist/types/utils/testing.d.ts +0 -2
- package/dist/ui-library/p-054e12cc.entry.js +0 -2
- package/dist/ui-library/p-054e12cc.entry.js.map +0 -1
- package/dist/ui-library/p-0786fa7c.js +0 -2
- package/dist/ui-library/p-0786fa7c.js.map +0 -1
- package/dist/ui-library/p-163f2bb0.entry.js +0 -2
- package/dist/ui-library/p-163f2bb0.entry.js.map +0 -1
- package/dist/ui-library/p-18e5f772.entry.js +0 -2
- package/dist/ui-library/p-18e5f772.entry.js.map +0 -1
- package/dist/ui-library/p-18ea0c56.js +0 -2
- package/dist/ui-library/p-18ea0c56.js.map +0 -1
- package/dist/ui-library/p-19b50b5a.entry.js.map +0 -1
- package/dist/ui-library/p-2e48c8d2.entry.js +0 -2
- package/dist/ui-library/p-2e48c8d2.entry.js.map +0 -1
- package/dist/ui-library/p-308261c4.entry.js +0 -2
- package/dist/ui-library/p-308261c4.entry.js.map +0 -1
- package/dist/ui-library/p-33f7e22b.entry.js +0 -2
- package/dist/ui-library/p-33f7e22b.entry.js.map +0 -1
- package/dist/ui-library/p-394a2a12.entry.js +0 -2
- package/dist/ui-library/p-394a2a12.entry.js.map +0 -1
- package/dist/ui-library/p-3c635d0a.entry.js.map +0 -1
- package/dist/ui-library/p-4ae91795.entry.js +0 -2
- package/dist/ui-library/p-4ae91795.entry.js.map +0 -1
- package/dist/ui-library/p-4f8394d7.js.map +0 -1
- package/dist/ui-library/p-53a13db5.entry.js +0 -2
- package/dist/ui-library/p-53a13db5.entry.js.map +0 -1
- package/dist/ui-library/p-559c87f0.entry.js +0 -2
- package/dist/ui-library/p-559c87f0.entry.js.map +0 -1
- package/dist/ui-library/p-5a25d6fb.entry.js +0 -2
- package/dist/ui-library/p-5a25d6fb.entry.js.map +0 -1
- package/dist/ui-library/p-6403fd87.entry.js +0 -2
- package/dist/ui-library/p-6403fd87.entry.js.map +0 -1
- package/dist/ui-library/p-6433c0da.entry.js +0 -2
- package/dist/ui-library/p-6433c0da.entry.js.map +0 -1
- package/dist/ui-library/p-79eee01b.js +0 -2
- package/dist/ui-library/p-79eee01b.js.map +0 -1
- package/dist/ui-library/p-8a970a40.entry.js.map +0 -1
- package/dist/ui-library/p-90824648.entry.js +0 -2
- package/dist/ui-library/p-90824648.entry.js.map +0 -1
- package/dist/ui-library/p-9328e5bc.entry.js.map +0 -1
- package/dist/ui-library/p-97cc839c.entry.js.map +0 -1
- package/dist/ui-library/p-9a860acc.js +0 -2
- package/dist/ui-library/p-9a860acc.js.map +0 -1
- package/dist/ui-library/p-9d1d222f.entry.js +0 -2
- package/dist/ui-library/p-9d1d222f.entry.js.map +0 -1
- package/dist/ui-library/p-af793d04.entry.js.map +0 -1
- package/dist/ui-library/p-b0e5658f.entry.js +0 -2
- package/dist/ui-library/p-b0e5658f.entry.js.map +0 -1
- package/dist/ui-library/p-b1e66136.js +0 -2
- package/dist/ui-library/p-b1e66136.js.map +0 -1
- package/dist/ui-library/p-b4dfb7cf.js +0 -2
- package/dist/ui-library/p-b4dfb7cf.js.map +0 -1
- package/dist/ui-library/p-b997e43c.entry.js +0 -2
- package/dist/ui-library/p-b997e43c.entry.js.map +0 -1
- package/dist/ui-library/p-c0cb6436.entry.js +0 -2
- package/dist/ui-library/p-c0cb6436.entry.js.map +0 -1
- package/dist/ui-library/p-c30f9e0b.entry.js.map +0 -1
- package/dist/ui-library/p-c349d1d4.entry.js.map +0 -1
- package/dist/ui-library/p-c53a63f9.entry.js +0 -2
- package/dist/ui-library/p-c53a63f9.entry.js.map +0 -1
- package/dist/ui-library/p-c640c2d8.entry.js +0 -2
- package/dist/ui-library/p-c640c2d8.entry.js.map +0 -1
- package/dist/ui-library/p-c94d0b07.entry.js +0 -2
- package/dist/ui-library/p-c94d0b07.entry.js.map +0 -1
- package/dist/ui-library/p-d12c6092.js +0 -2
- package/dist/ui-library/p-d12c6092.js.map +0 -1
- package/dist/ui-library/p-d5633a29.entry.js.map +0 -1
- package/dist/ui-library/p-df655bc9.entry.js +0 -2
- package/dist/ui-library/p-df655bc9.entry.js.map +0 -1
- package/dist/ui-library/p-f18ba86f.entry.js +0 -2
- package/dist/ui-library/p-f18ba86f.entry.js.map +0 -1
- package/dist/ui-library/p-f4938771.entry.js +0 -2
- package/dist/ui-library/p-f4938771.entry.js.map +0 -1
- package/dist/ui-library/p-f604e067.entry.js +0 -2
- package/dist/ui-library/p-f604e067.entry.js.map +0 -1
- package/dist/ui-library/p-f70e2403.entry.js +0 -2
- package/dist/ui-library/p-f70e2403.entry.js.map +0 -1
- package/dist/ui-library/p-f9d345e0.entry.js +0 -2
- package/dist/ui-library/p-f9d345e0.entry.js.map +0 -1
- package/dist/ui-library/p-fed07a1f.entry.js +0 -2
- package/dist/ui-library/p-fed07a1f.entry.js.map +0 -1
- package/dist/ui-library/p-ff0257bf.entry.js +0 -2
- package/dist/ui-library/p-ff0257bf.entry.js.map +0 -1
|
@@ -25,11 +25,8 @@ export class SixTextarea {
|
|
|
25
25
|
this.labelId = `textarea-label-${id}`;
|
|
26
26
|
this.helpTextId = `textarea-help-text-${id}`;
|
|
27
27
|
this.errorTextId = `input-error-text-${id}`;
|
|
28
|
-
this.customErrorText = '';
|
|
29
|
-
this.customValidation = false;
|
|
30
28
|
this.eventListeners = new EventListeners();
|
|
31
|
-
|
|
32
|
-
this.defaultValue = '';
|
|
29
|
+
this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
|
|
33
30
|
this.handleChange = () => {
|
|
34
31
|
if (this.nativeTextarea != null) {
|
|
35
32
|
this.value = this.nativeTextarea.value;
|
|
@@ -39,7 +36,7 @@ export class SixTextarea {
|
|
|
39
36
|
this.handleInput = () => {
|
|
40
37
|
if (this.nativeTextarea != null) {
|
|
41
38
|
this.value = this.nativeTextarea.value;
|
|
42
|
-
this.setTextareaHeight(
|
|
39
|
+
this.setTextareaHeight();
|
|
43
40
|
this.sixInput.emit();
|
|
44
41
|
}
|
|
45
42
|
};
|
|
@@ -54,18 +51,14 @@ export class SixTextarea {
|
|
|
54
51
|
this.handleSlotChange = () => {
|
|
55
52
|
this.hasLabelSlot = hasSlot(this.host, 'label');
|
|
56
53
|
this.hasHelpTextSlot = hasSlot(this.host, 'help-text');
|
|
57
|
-
this.hasErrorTextSlot = hasSlot(this.host, 'error-text');
|
|
58
54
|
};
|
|
59
55
|
this.hasFocus = false;
|
|
60
56
|
this.hasHelpTextSlot = false;
|
|
61
|
-
this.hasErrorTextSlot = false;
|
|
62
57
|
this.hasLabelSlot = false;
|
|
63
58
|
this.size = 'medium';
|
|
64
59
|
this.name = '';
|
|
65
60
|
this.value = '';
|
|
66
|
-
this.label = '';
|
|
67
61
|
this.helpText = '';
|
|
68
|
-
this.errorText = '';
|
|
69
62
|
this.placeholder = undefined;
|
|
70
63
|
this.rows = 4;
|
|
71
64
|
this.resize = 'vertical';
|
|
@@ -74,6 +67,8 @@ export class SixTextarea {
|
|
|
74
67
|
this.minlength = undefined;
|
|
75
68
|
this.maxlength = undefined;
|
|
76
69
|
this.required = false;
|
|
70
|
+
this.label = '';
|
|
71
|
+
this.errorText = '';
|
|
77
72
|
this.invalid = false;
|
|
78
73
|
this.autocapitalize = 'off';
|
|
79
74
|
this.autocorrect = 'off';
|
|
@@ -81,15 +76,12 @@ export class SixTextarea {
|
|
|
81
76
|
this.autofocus = false;
|
|
82
77
|
this.spellcheck = false;
|
|
83
78
|
this.inputmode = undefined;
|
|
84
|
-
this.errorOnBlur = false;
|
|
85
79
|
}
|
|
86
80
|
handleLabelChange() {
|
|
87
81
|
this.handleSlotChange();
|
|
88
82
|
}
|
|
89
83
|
handleRowsChange() {
|
|
90
|
-
|
|
91
|
-
this.setTextareaHeight(this.nativeTextarea);
|
|
92
|
-
}
|
|
84
|
+
this.setTextareaHeight();
|
|
93
85
|
}
|
|
94
86
|
handleValueChange() {
|
|
95
87
|
this.value = this.getValue();
|
|
@@ -97,39 +89,31 @@ export class SixTextarea {
|
|
|
97
89
|
if (this.nativeTextarea.value !== this.value) {
|
|
98
90
|
this.nativeTextarea.value = this.value;
|
|
99
91
|
}
|
|
100
|
-
this.invalid = !this.nativeTextarea.checkValidity();
|
|
101
92
|
}
|
|
102
93
|
}
|
|
103
94
|
connectedCallback() {
|
|
104
95
|
var _a;
|
|
105
96
|
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('slotchange', this.handleSlotChange);
|
|
97
|
+
this.eventListeners.forward('six-textarea-input', 'input', this.host);
|
|
98
|
+
this.eventListeners.forward('six-textarea-change', 'change', this.host);
|
|
99
|
+
this.eventListeners.forward('six-textarea-focus', 'focus', this.host);
|
|
100
|
+
this.eventListeners.forward('six-textarea-blur', 'blur', this.host);
|
|
106
101
|
}
|
|
107
102
|
componentWillLoad() {
|
|
108
|
-
this.defaultValue = this.value || '';
|
|
109
103
|
this.handleSlotChange();
|
|
110
104
|
}
|
|
111
105
|
componentDidLoad() {
|
|
112
|
-
|
|
113
|
-
if (nativeTextarea
|
|
114
|
-
|
|
106
|
+
this.setTextareaHeight();
|
|
107
|
+
if (this.nativeTextarea != null) {
|
|
108
|
+
this.resizeObserver.observe(this.nativeTextarea);
|
|
115
109
|
}
|
|
116
|
-
this.setTextareaHeight(nativeTextarea);
|
|
117
|
-
this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight(nativeTextarea));
|
|
118
|
-
this.resizeObserver.observe(nativeTextarea);
|
|
119
|
-
this.eventListeners.add(nativeTextarea, 'invalid', (event) => {
|
|
120
|
-
this.invalid = true;
|
|
121
|
-
if (this.customValidation || (!this.hasErrorTextSlot && this.errorText === '' && this.customErrorText === '')) {
|
|
122
|
-
this.customErrorText = nativeTextarea.validationMessage;
|
|
123
|
-
}
|
|
124
|
-
event.preventDefault();
|
|
125
|
-
});
|
|
126
110
|
}
|
|
127
111
|
disconnectedCallback() {
|
|
128
|
-
var _a
|
|
112
|
+
var _a;
|
|
129
113
|
if (this.nativeTextarea != null) {
|
|
130
|
-
|
|
114
|
+
this.resizeObserver.unobserve(this.nativeTextarea);
|
|
131
115
|
}
|
|
132
|
-
(
|
|
116
|
+
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('slotchange', this.handleSlotChange);
|
|
133
117
|
this.eventListeners.removeAll();
|
|
134
118
|
}
|
|
135
119
|
/** Sets focus on the textarea. */
|
|
@@ -154,66 +138,33 @@ export class SixTextarea {
|
|
|
154
138
|
}
|
|
155
139
|
/** Replaces a range of text with a new string. */
|
|
156
140
|
async setRangeText(replacement, start, end, selectMode = 'preserve') {
|
|
157
|
-
if (this.nativeTextarea == null)
|
|
141
|
+
if (this.nativeTextarea == null)
|
|
158
142
|
return;
|
|
159
|
-
}
|
|
160
143
|
this.nativeTextarea.setRangeText(replacement, start, end, selectMode);
|
|
161
144
|
if (this.getValue() !== this.nativeTextarea.value) {
|
|
162
145
|
this.value = this.nativeTextarea.value;
|
|
163
|
-
this.setTextareaHeight(
|
|
146
|
+
this.setTextareaHeight();
|
|
164
147
|
this.sixChange.emit();
|
|
165
148
|
this.sixInput.emit();
|
|
166
149
|
}
|
|
167
150
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return (_a = this.nativeTextarea) === null || _a === void 0 ? void 0 : _a.reportValidity();
|
|
172
|
-
}
|
|
173
|
-
/** Checks for validity. */
|
|
174
|
-
async checkValidity() {
|
|
175
|
-
if (this.nativeTextarea == null) {
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
|
-
return this.nativeTextarea.validity.valid;
|
|
179
|
-
}
|
|
180
|
-
/** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */
|
|
181
|
-
async setCustomValidity(message) {
|
|
182
|
-
this.customErrorText = '';
|
|
183
|
-
this.customValidation = message !== '';
|
|
184
|
-
if (this.nativeTextarea != null) {
|
|
185
|
-
this.nativeTextarea.setCustomValidity(message);
|
|
186
|
-
this.invalid = !this.nativeTextarea.checkValidity();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
/** Resets the formcontrol */
|
|
190
|
-
async reset() {
|
|
191
|
-
var _a;
|
|
192
|
-
this.value = this.defaultValue;
|
|
193
|
-
this.customErrorText = '';
|
|
194
|
-
this.customValidation = false;
|
|
195
|
-
(_a = this.nativeTextarea) === null || _a === void 0 ? void 0 : _a.setCustomValidity('');
|
|
196
|
-
this.invalid = false;
|
|
197
|
-
}
|
|
198
|
-
setTextareaHeight(nativeTextarea) {
|
|
151
|
+
setTextareaHeight() {
|
|
152
|
+
if (this.nativeTextarea == null)
|
|
153
|
+
return;
|
|
199
154
|
if (this.resize === 'auto') {
|
|
200
|
-
nativeTextarea.style.height = 'auto';
|
|
201
|
-
|
|
202
|
-
nativeTextarea.style.height = height + 'px';
|
|
155
|
+
this.nativeTextarea.style.height = 'auto';
|
|
156
|
+
this.nativeTextarea.style.height = this.nativeTextarea.scrollHeight + 'px';
|
|
203
157
|
}
|
|
204
158
|
else {
|
|
205
|
-
nativeTextarea.style.height =
|
|
159
|
+
this.nativeTextarea.style.height = undefined;
|
|
206
160
|
}
|
|
207
161
|
}
|
|
208
|
-
displayError() {
|
|
209
|
-
return this.invalid && (!this.errorOnBlur || !this.hasFocus);
|
|
210
|
-
}
|
|
211
162
|
getValue() {
|
|
212
163
|
var _a;
|
|
213
164
|
return ((_a = this.value) !== null && _a !== void 0 ? _a : '').toString();
|
|
214
165
|
}
|
|
215
166
|
render() {
|
|
216
|
-
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.
|
|
167
|
+
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.errorText, size: this.size, disabled: this.disabled, required: this.required, displayError: this.invalid }, h("div", { part: "base", class: {
|
|
217
168
|
textarea: true,
|
|
218
169
|
// Sizes
|
|
219
170
|
'textarea--small': this.size === 'small',
|
|
@@ -298,24 +249,6 @@ export class SixTextarea {
|
|
|
298
249
|
"reflect": true,
|
|
299
250
|
"defaultValue": "''"
|
|
300
251
|
},
|
|
301
|
-
"label": {
|
|
302
|
-
"type": "string",
|
|
303
|
-
"mutable": false,
|
|
304
|
-
"complexType": {
|
|
305
|
-
"original": "string",
|
|
306
|
-
"resolved": "string",
|
|
307
|
-
"references": {}
|
|
308
|
-
},
|
|
309
|
-
"required": false,
|
|
310
|
-
"optional": false,
|
|
311
|
-
"docs": {
|
|
312
|
-
"tags": [],
|
|
313
|
-
"text": "The textarea's label. Alternatively, you can use the label slot."
|
|
314
|
-
},
|
|
315
|
-
"attribute": "label",
|
|
316
|
-
"reflect": false,
|
|
317
|
-
"defaultValue": "''"
|
|
318
|
-
},
|
|
319
252
|
"helpText": {
|
|
320
253
|
"type": "string",
|
|
321
254
|
"mutable": false,
|
|
@@ -334,30 +267,12 @@ export class SixTextarea {
|
|
|
334
267
|
"reflect": false,
|
|
335
268
|
"defaultValue": "''"
|
|
336
269
|
},
|
|
337
|
-
"errorText": {
|
|
338
|
-
"type": "string",
|
|
339
|
-
"mutable": false,
|
|
340
|
-
"complexType": {
|
|
341
|
-
"original": "string",
|
|
342
|
-
"resolved": "string",
|
|
343
|
-
"references": {}
|
|
344
|
-
},
|
|
345
|
-
"required": false,
|
|
346
|
-
"optional": false,
|
|
347
|
-
"docs": {
|
|
348
|
-
"tags": [],
|
|
349
|
-
"text": "The textarea's error text. Alternatively, you can use the error-text slot."
|
|
350
|
-
},
|
|
351
|
-
"attribute": "error-text",
|
|
352
|
-
"reflect": false,
|
|
353
|
-
"defaultValue": "''"
|
|
354
|
-
},
|
|
355
270
|
"placeholder": {
|
|
356
271
|
"type": "string",
|
|
357
272
|
"mutable": false,
|
|
358
273
|
"complexType": {
|
|
359
274
|
"original": "string",
|
|
360
|
-
"resolved": "string",
|
|
275
|
+
"resolved": "string | undefined",
|
|
361
276
|
"references": {}
|
|
362
277
|
},
|
|
363
278
|
"required": false,
|
|
@@ -446,7 +361,7 @@ export class SixTextarea {
|
|
|
446
361
|
"mutable": false,
|
|
447
362
|
"complexType": {
|
|
448
363
|
"original": "number",
|
|
449
|
-
"resolved": "number",
|
|
364
|
+
"resolved": "number | undefined",
|
|
450
365
|
"references": {}
|
|
451
366
|
},
|
|
452
367
|
"required": false,
|
|
@@ -463,7 +378,7 @@ export class SixTextarea {
|
|
|
463
378
|
"mutable": false,
|
|
464
379
|
"complexType": {
|
|
465
380
|
"original": "number",
|
|
466
|
-
"resolved": "number",
|
|
381
|
+
"resolved": "number | undefined",
|
|
467
382
|
"references": {}
|
|
468
383
|
},
|
|
469
384
|
"required": false,
|
|
@@ -487,15 +402,51 @@ export class SixTextarea {
|
|
|
487
402
|
"optional": false,
|
|
488
403
|
"docs": {
|
|
489
404
|
"tags": [],
|
|
490
|
-
"text": "
|
|
405
|
+
"text": "Set to true to show an asterisk beneath the label."
|
|
491
406
|
},
|
|
492
407
|
"attribute": "required",
|
|
493
|
-
"reflect":
|
|
408
|
+
"reflect": false,
|
|
494
409
|
"defaultValue": "false"
|
|
495
410
|
},
|
|
411
|
+
"label": {
|
|
412
|
+
"type": "string",
|
|
413
|
+
"mutable": false,
|
|
414
|
+
"complexType": {
|
|
415
|
+
"original": "string",
|
|
416
|
+
"resolved": "string",
|
|
417
|
+
"references": {}
|
|
418
|
+
},
|
|
419
|
+
"required": false,
|
|
420
|
+
"optional": false,
|
|
421
|
+
"docs": {
|
|
422
|
+
"tags": [],
|
|
423
|
+
"text": "The label text."
|
|
424
|
+
},
|
|
425
|
+
"attribute": "label",
|
|
426
|
+
"reflect": false,
|
|
427
|
+
"defaultValue": "''"
|
|
428
|
+
},
|
|
429
|
+
"errorText": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"mutable": false,
|
|
432
|
+
"complexType": {
|
|
433
|
+
"original": "string",
|
|
434
|
+
"resolved": "string",
|
|
435
|
+
"references": {}
|
|
436
|
+
},
|
|
437
|
+
"required": false,
|
|
438
|
+
"optional": false,
|
|
439
|
+
"docs": {
|
|
440
|
+
"tags": [],
|
|
441
|
+
"text": "The error message shown, if `invalid` is set to true."
|
|
442
|
+
},
|
|
443
|
+
"attribute": "error-text",
|
|
444
|
+
"reflect": false,
|
|
445
|
+
"defaultValue": "''"
|
|
446
|
+
},
|
|
496
447
|
"invalid": {
|
|
497
448
|
"type": "boolean",
|
|
498
|
-
"mutable":
|
|
449
|
+
"mutable": false,
|
|
499
450
|
"complexType": {
|
|
500
451
|
"original": "boolean",
|
|
501
452
|
"resolved": "boolean",
|
|
@@ -505,7 +456,7 @@ export class SixTextarea {
|
|
|
505
456
|
"optional": false,
|
|
506
457
|
"docs": {
|
|
507
458
|
"tags": [],
|
|
508
|
-
"text": "
|
|
459
|
+
"text": "If this property is set to true and an error message is provided by `errorText`, the error message is displayed."
|
|
509
460
|
},
|
|
510
461
|
"attribute": "invalid",
|
|
511
462
|
"reflect": true,
|
|
@@ -606,7 +557,7 @@ export class SixTextarea {
|
|
|
606
557
|
"mutable": false,
|
|
607
558
|
"complexType": {
|
|
608
559
|
"original": "'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'",
|
|
609
|
-
"resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\"",
|
|
560
|
+
"resolved": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\" | undefined",
|
|
610
561
|
"references": {}
|
|
611
562
|
},
|
|
612
563
|
"required": false,
|
|
@@ -617,24 +568,6 @@ export class SixTextarea {
|
|
|
617
568
|
},
|
|
618
569
|
"attribute": "inputmode",
|
|
619
570
|
"reflect": false
|
|
620
|
-
},
|
|
621
|
-
"errorOnBlur": {
|
|
622
|
-
"type": "boolean",
|
|
623
|
-
"mutable": false,
|
|
624
|
-
"complexType": {
|
|
625
|
-
"original": "boolean",
|
|
626
|
-
"resolved": "boolean",
|
|
627
|
-
"references": {}
|
|
628
|
-
},
|
|
629
|
-
"required": false,
|
|
630
|
-
"optional": false,
|
|
631
|
-
"docs": {
|
|
632
|
-
"tags": [],
|
|
633
|
-
"text": "Set to display the error text on blur and not when typing"
|
|
634
|
-
},
|
|
635
|
-
"attribute": "error-on-blur",
|
|
636
|
-
"reflect": false,
|
|
637
|
-
"defaultValue": "false"
|
|
638
571
|
}
|
|
639
572
|
};
|
|
640
573
|
}
|
|
@@ -642,7 +575,6 @@ export class SixTextarea {
|
|
|
642
575
|
return {
|
|
643
576
|
"hasFocus": {},
|
|
644
577
|
"hasHelpTextSlot": {},
|
|
645
|
-
"hasErrorTextSlot": {},
|
|
646
578
|
"hasLabelSlot": {}
|
|
647
579
|
};
|
|
648
580
|
}
|
|
@@ -771,14 +703,14 @@ export class SixTextarea {
|
|
|
771
703
|
},
|
|
772
704
|
"select": {
|
|
773
705
|
"complexType": {
|
|
774
|
-
"signature": "() => Promise<void>",
|
|
706
|
+
"signature": "() => Promise<void | undefined>",
|
|
775
707
|
"parameters": [],
|
|
776
708
|
"references": {
|
|
777
709
|
"Promise": {
|
|
778
710
|
"location": "global"
|
|
779
711
|
}
|
|
780
712
|
},
|
|
781
|
-
"return": "Promise<void>"
|
|
713
|
+
"return": "Promise<void | undefined>"
|
|
782
714
|
},
|
|
783
715
|
"docs": {
|
|
784
716
|
"text": "Selects all the text in the input.",
|
|
@@ -787,7 +719,7 @@ export class SixTextarea {
|
|
|
787
719
|
},
|
|
788
720
|
"setSelectionRange": {
|
|
789
721
|
"complexType": {
|
|
790
|
-
"signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void>",
|
|
722
|
+
"signature": "(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none') => Promise<void | undefined>",
|
|
791
723
|
"parameters": [{
|
|
792
724
|
"tags": [],
|
|
793
725
|
"text": ""
|
|
@@ -803,7 +735,7 @@ export class SixTextarea {
|
|
|
803
735
|
"location": "global"
|
|
804
736
|
}
|
|
805
737
|
},
|
|
806
|
-
"return": "Promise<void>"
|
|
738
|
+
"return": "Promise<void | undefined>"
|
|
807
739
|
},
|
|
808
740
|
"docs": {
|
|
809
741
|
"text": "Sets the start and end positions of the text selection (0-based).",
|
|
@@ -837,73 +769,6 @@ export class SixTextarea {
|
|
|
837
769
|
"text": "Replaces a range of text with a new string.",
|
|
838
770
|
"tags": []
|
|
839
771
|
}
|
|
840
|
-
},
|
|
841
|
-
"reportValidity": {
|
|
842
|
-
"complexType": {
|
|
843
|
-
"signature": "() => Promise<boolean>",
|
|
844
|
-
"parameters": [],
|
|
845
|
-
"references": {
|
|
846
|
-
"Promise": {
|
|
847
|
-
"location": "global"
|
|
848
|
-
}
|
|
849
|
-
},
|
|
850
|
-
"return": "Promise<boolean>"
|
|
851
|
-
},
|
|
852
|
-
"docs": {
|
|
853
|
-
"text": "Checks for validity and shows the browser's validation message if the control is invalid.",
|
|
854
|
-
"tags": []
|
|
855
|
-
}
|
|
856
|
-
},
|
|
857
|
-
"checkValidity": {
|
|
858
|
-
"complexType": {
|
|
859
|
-
"signature": "() => Promise<boolean>",
|
|
860
|
-
"parameters": [],
|
|
861
|
-
"references": {
|
|
862
|
-
"Promise": {
|
|
863
|
-
"location": "global"
|
|
864
|
-
}
|
|
865
|
-
},
|
|
866
|
-
"return": "Promise<boolean>"
|
|
867
|
-
},
|
|
868
|
-
"docs": {
|
|
869
|
-
"text": "Checks for validity.",
|
|
870
|
-
"tags": []
|
|
871
|
-
}
|
|
872
|
-
},
|
|
873
|
-
"setCustomValidity": {
|
|
874
|
-
"complexType": {
|
|
875
|
-
"signature": "(message: string) => Promise<void>",
|
|
876
|
-
"parameters": [{
|
|
877
|
-
"tags": [],
|
|
878
|
-
"text": ""
|
|
879
|
-
}],
|
|
880
|
-
"references": {
|
|
881
|
-
"Promise": {
|
|
882
|
-
"location": "global"
|
|
883
|
-
}
|
|
884
|
-
},
|
|
885
|
-
"return": "Promise<void>"
|
|
886
|
-
},
|
|
887
|
-
"docs": {
|
|
888
|
-
"text": "Sets a custom validation message. If `message` is not empty, the field will be considered invalid.",
|
|
889
|
-
"tags": []
|
|
890
|
-
}
|
|
891
|
-
},
|
|
892
|
-
"reset": {
|
|
893
|
-
"complexType": {
|
|
894
|
-
"signature": "() => Promise<void>",
|
|
895
|
-
"parameters": [],
|
|
896
|
-
"references": {
|
|
897
|
-
"Promise": {
|
|
898
|
-
"location": "global"
|
|
899
|
-
}
|
|
900
|
-
},
|
|
901
|
-
"return": "Promise<void>"
|
|
902
|
-
},
|
|
903
|
-
"docs": {
|
|
904
|
-
"text": "Resets the formcontrol",
|
|
905
|
-
"tags": []
|
|
906
|
-
}
|
|
907
772
|
}
|
|
908
773
|
};
|
|
909
774
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-textarea.js","sourceRoot":"","sources":["../../../src/components/six-textarea/six-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The textarea's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, textarea, and help text.\n * @part label - The textarea label.\n * @part textarea - The textarea control.\n * @part help-text - The textarea help text.\n */\n@Component({\n tag: 'six-textarea',\n styleUrl: 'six-textarea.scss',\n shadow: true,\n})\nexport class SixTextarea {\n private inputId = `textarea-${++id}`;\n private labelId = `textarea-label-${id}`;\n private helpTextId = `textarea-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeTextarea?: HTMLTextAreaElement;\n private customErrorText = '';\n private customValidation = false;\n private eventListeners = new EventListeners();\n private resizeObserver?: ResizeObserver;\n\n @Element() host!: HTMLSixTextareaElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasErrorTextSlot = false;\n @State() hasLabelSlot = false;\n\n /** The textarea's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The textarea's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The textarea's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** The textarea's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The textarea's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The textarea's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\n\n /** The textarea's placeholder text. */\n @Prop() placeholder?: string;\n\n /** The number of rows to display by default. */\n @Prop() rows = 4;\n\n /** Controls how the textarea can be resized. */\n @Prop() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Set to true to disable the textarea. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true for a readonly textarea. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength?: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength?: number;\n\n /** The textarea's required attribute. */\n @Prop({ reflect: true }) required = false;\n\n /**\n * This will be true when the control is in an invalid state. Validity is determined by props such as `required`,\n * `minlength`, and `maxlength` using the browser's constraint validation API.\n */\n @Prop({ mutable: true, reflect: true }) invalid = false;\n\n /** The textarea's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The textarea's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The textarea's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The textarea's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** The textarea's spellcheck attribute. */\n @Prop() spellcheck = false;\n\n /** The textarea's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Set to display the error text on blur and not when typing */\n @Prop() errorOnBlur = false;\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-textarea-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('rows')\n handleRowsChange() {\n if (this.nativeTextarea != null) {\n this.setTextareaHeight(this.nativeTextarea);\n }\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeTextarea != null) {\n if (this.nativeTextarea.value !== this.value) {\n this.nativeTextarea.value = this.value;\n }\n this.invalid = !this.nativeTextarea.checkValidity();\n }\n }\n\n /** default value the textarea will be reverted to when reset is executed */\n private defaultValue = '';\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n this.defaultValue = this.value || '';\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n const nativeTextarea = this.nativeTextarea;\n if (nativeTextarea == null) {\n return;\n }\n this.setTextareaHeight(nativeTextarea);\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight(nativeTextarea));\n this.resizeObserver.observe(nativeTextarea);\n this.eventListeners.add(nativeTextarea, 'invalid', (event) => {\n this.invalid = true;\n if (this.customValidation || (!this.hasErrorTextSlot && this.errorText === '' && this.customErrorText === '')) {\n this.customErrorText = nativeTextarea.validationMessage;\n }\n event.preventDefault();\n });\n }\n\n disconnectedCallback() {\n if (this.nativeTextarea != null) {\n this.resizeObserver?.unobserve(this.nativeTextarea);\n }\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the textarea. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeTextarea?.focus(options);\n }\n\n /** Removes focus fromt the textarea. */\n @Method()\n async removeFocus() {\n this.nativeTextarea?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeTextarea?.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.nativeTextarea?.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n if (this.nativeTextarea == null) {\n return;\n }\n this.nativeTextarea.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeTextarea.value) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight(this.nativeTextarea);\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n @Method()\n async reportValidity() {\n return this.nativeTextarea?.reportValidity();\n }\n\n /** Checks for validity. */\n @Method()\n async checkValidity() {\n if (this.nativeTextarea == null) {\n return true;\n }\n return this.nativeTextarea.validity.valid;\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n this.customErrorText = '';\n this.customValidation = message !== '';\n if (this.nativeTextarea != null) {\n this.nativeTextarea.setCustomValidity(message);\n this.invalid = !this.nativeTextarea.checkValidity();\n }\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.value = this.defaultValue;\n this.customErrorText = '';\n this.customValidation = false;\n this.nativeTextarea?.setCustomValidity('');\n this.invalid = false;\n }\n\n private handleChange = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight(this.nativeTextarea);\n this.sixInput.emit();\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleSlotChange = () => {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n private setTextareaHeight(nativeTextarea: HTMLTextAreaElement) {\n if (this.resize === 'auto') {\n nativeTextarea.style.height = 'auto';\n const height = nativeTextarea.scrollHeight + 1;\n nativeTextarea.style.height = height + 'px';\n } else {\n nativeTextarea.style.height = '';\n }\n }\n\n private displayError() {\n return this.invalid && (!this.errorOnBlur || !this.hasFocus);\n }\n\n private getValue(): string {\n return (this.value ?? '').toString();\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.customErrorText != null ? this.customErrorText : this.errorText}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.displayError()}\n >\n <div\n part=\"base\"\n class={{\n textarea: true,\n\n // Sizes\n 'textarea--small': this.size === 'small',\n 'textarea--medium': this.size === 'medium',\n 'textarea--large': this.size === 'large',\n\n // States\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': this.getValue().length === 0,\n 'textarea--invalid': this.invalid,\n\n // Modifiers\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n }}\n >\n <textarea\n part=\"textarea\"\n ref={(el) => (this.nativeTextarea = el)}\n id={this.inputId}\n class=\"textarea__control\"\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n rows={this.rows}\n minLength={this.minlength}\n maxLength={this.maxlength}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n </FormControl>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"six-textarea.js","sourceRoot":"","sources":["../../../src/components/six-textarea/six-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,WAAW,MAAM,uDAAuD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,IAAI,EAAE,GAAG,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The textarea's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, textarea, and help text.\n * @part label - The textarea label.\n * @part textarea - The textarea control.\n * @part help-text - The textarea help text.\n */\n@Component({\n tag: 'six-textarea',\n styleUrl: 'six-textarea.scss',\n shadow: true,\n})\nexport class SixTextarea {\n private inputId = `textarea-${++id}`;\n private labelId = `textarea-label-${id}`;\n private helpTextId = `textarea-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeTextarea?: HTMLTextAreaElement;\n private eventListeners = new EventListeners();\n private resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n\n @Element() host!: HTMLSixTextareaElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n\n /** The textarea's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The textarea's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The textarea's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** The textarea's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The textarea's placeholder text. */\n @Prop() placeholder?: string;\n\n /** The number of rows to display by default. */\n @Prop() rows = 4;\n\n /** Controls how the textarea can be resized. */\n @Prop() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Set to true to disable the textarea. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true for a readonly textarea. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength?: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength?: number;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The textarea's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The textarea's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The textarea's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The textarea's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** The textarea's spellcheck attribute. */\n @Prop() spellcheck = false;\n\n /** The textarea's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-textarea-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('rows')\n handleRowsChange() {\n this.setTextareaHeight();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeTextarea != null) {\n if (this.nativeTextarea.value !== this.value) {\n this.nativeTextarea.value = this.value;\n }\n }\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-textarea-input', 'input', this.host);\n this.eventListeners.forward('six-textarea-change', 'change', this.host);\n this.eventListeners.forward('six-textarea-focus', 'focus', this.host);\n this.eventListeners.forward('six-textarea-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n this.setTextareaHeight();\n if (this.nativeTextarea != null) {\n this.resizeObserver.observe(this.nativeTextarea);\n }\n }\n\n disconnectedCallback() {\n if (this.nativeTextarea != null) {\n this.resizeObserver.unobserve(this.nativeTextarea);\n }\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the textarea. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeTextarea?.focus(options);\n }\n\n /** Removes focus fromt the textarea. */\n @Method()\n async removeFocus() {\n this.nativeTextarea?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeTextarea?.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.nativeTextarea?.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n if (this.nativeTextarea == null) return;\n\n this.nativeTextarea.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeTextarea.value) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\n this.sixInput.emit();\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleSlotChange = () => {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n };\n\n private setTextareaHeight() {\n if (this.nativeTextarea == null) return;\n\n if (this.resize === 'auto') {\n this.nativeTextarea.style.height = 'auto';\n this.nativeTextarea.style.height = this.nativeTextarea.scrollHeight + 'px';\n } else {\n (this.nativeTextarea.style.height as string | undefined) = undefined;\n }\n }\n\n private getValue(): string {\n return (this.value ?? '').toString();\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n textarea: true,\n\n // Sizes\n 'textarea--small': this.size === 'small',\n 'textarea--medium': this.size === 'medium',\n 'textarea--large': this.size === 'large',\n\n // States\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': this.getValue().length === 0,\n 'textarea--invalid': this.invalid,\n\n // Modifiers\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n }}\n >\n <textarea\n part=\"textarea\"\n ref={(el) => (this.nativeTextarea = el)}\n id={this.inputId}\n class=\"textarea__control\"\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n rows={this.rows}\n minLength={this.minlength}\n maxLength={this.maxlength}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n </FormControl>\n );\n }\n}\n"]}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
import { hasSlot } from '../../utils/slot';
|
|
2
|
+
import { getSlot, hasSlot } from '../../utils/slot';
|
|
3
3
|
/**
|
|
4
4
|
* @since 1.0
|
|
5
5
|
* @status stable
|
|
6
6
|
*/
|
|
7
7
|
export class SixTile {
|
|
8
8
|
constructor() {
|
|
9
|
+
this.handleSlotChange = () => {
|
|
10
|
+
this.hasIconSlot = hasSlot(this.host, 'icon');
|
|
11
|
+
this.hasLabelSlot = hasSlot(this.host, 'label');
|
|
12
|
+
if (this.hasIconSlot) {
|
|
13
|
+
const slot = getSlot(this.host, 'icon');
|
|
14
|
+
slot === null || slot === void 0 ? void 0 : slot.addEventListener('click', this.handleClickEvent);
|
|
15
|
+
}
|
|
16
|
+
if (this.hasLabelSlot) {
|
|
17
|
+
const slot = getSlot(this.host, 'label');
|
|
18
|
+
slot === null || slot === void 0 ? void 0 : slot.addEventListener('click', this.handleClickEvent);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
9
21
|
this.handleCloseClickEvent = () => {
|
|
10
22
|
this.visible = false;
|
|
11
23
|
this.sixTileClose.emit();
|
|
@@ -32,24 +44,9 @@ export class SixTile {
|
|
|
32
44
|
async show() {
|
|
33
45
|
this.visible = true;
|
|
34
46
|
}
|
|
35
|
-
connectedCallback() {
|
|
36
|
-
this.handleSlotChange = this.handleSlotChange.bind(this);
|
|
37
|
-
}
|
|
38
47
|
componentWillLoad() {
|
|
39
48
|
this.handleSlotChange();
|
|
40
49
|
}
|
|
41
|
-
handleSlotChange() {
|
|
42
|
-
this.hasIconSlot = hasSlot(this.host, 'icon');
|
|
43
|
-
this.hasLabelSlot = hasSlot(this.host, 'label');
|
|
44
|
-
if (this.hasIconSlot) {
|
|
45
|
-
let slot = this.host.querySelector(`[slot="icon"]`);
|
|
46
|
-
slot.addEventListener('click', this.handleClickEvent);
|
|
47
|
-
}
|
|
48
|
-
if (this.hasLabelSlot) {
|
|
49
|
-
let slot = this.host.querySelector(`[slot="label"]`);
|
|
50
|
-
slot.addEventListener('click', this.handleClickEvent);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
50
|
render() {
|
|
54
51
|
return (h("six-tooltip", { disabled: this.disableTooltip || this.label === '', content: this.label }, h("div", { part: "base", class: {
|
|
55
52
|
tile: true,
|
|
@@ -101,15 +98,15 @@ export class SixTile {
|
|
|
101
98
|
"defaultValue": "''"
|
|
102
99
|
},
|
|
103
100
|
"iconName": {
|
|
104
|
-
"type": "
|
|
101
|
+
"type": "string",
|
|
105
102
|
"mutable": false,
|
|
106
103
|
"complexType": {
|
|
107
|
-
"original": "
|
|
108
|
-
"resolved": "
|
|
104
|
+
"original": "string",
|
|
105
|
+
"resolved": "string | undefined",
|
|
109
106
|
"references": {}
|
|
110
107
|
},
|
|
111
108
|
"required": false,
|
|
112
|
-
"optional":
|
|
109
|
+
"optional": true,
|
|
113
110
|
"docs": {
|
|
114
111
|
"tags": [],
|
|
115
112
|
"text": "The icon's name."
|