@dnncommunity/dnn-elements 0.14.1 → 0.15.0-beta.3
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/LICENSE +21 -21
- package/README.md +24 -24
- package/dist/.storybook/utilities.js +16 -0
- package/dist/.storybook/utilities.js.map +1 -0
- package/dist/cjs/{css-shim-3bfdba4f.js → css-shim-aaf4fec9.js} +3 -3
- package/dist/cjs/css-shim-aaf4fec9.js.map +1 -0
- package/dist/cjs/{debounce-1de79bc7.js → debounce-901e1f0c.js} +18 -18
- package/dist/cjs/{debounce-1de79bc7.js.map → debounce-901e1f0c.js.map} +1 -1
- package/dist/cjs/dnn-button.cjs.entry.js +80 -76
- package/dist/cjs/dnn-button.cjs.entry.js.map +1 -1
- package/dist/cjs/{dnn-button_16.cjs.entry.js → dnn-button_17.cjs.entry.js} +2024 -1710
- package/dist/cjs/dnn-button_17.cjs.entry.js.map +1 -0
- package/dist/cjs/dnn-checkbox.cjs.entry.js +47 -47
- package/dist/cjs/dnn-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-chevron.cjs.entry.js +22 -22
- package/dist/cjs/dnn-chevron.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-collapsible.cjs.entry.js +57 -54
- package/dist/cjs/dnn-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-color-picker.cjs.entry.js +494 -494
- package/dist/cjs/dnn-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-dropzone.cjs.entry.js +141 -141
- package/dist/cjs/dnn-dropzone.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-image-cropper.cjs.entry.js +394 -394
- package/dist/cjs/dnn-image-cropper.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-modal.cjs.entry.js +53 -50
- package/dist/cjs/dnn-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-permissions-grid.cjs.entry.js +320 -0
- package/dist/cjs/dnn-permissions-grid.cjs.entry.js.map +1 -0
- package/dist/cjs/dnn-searchbox.cjs.entry.js +54 -54
- package/dist/cjs/dnn-searchbox.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-sort-icon.cjs.entry.js +32 -32
- package/dist/cjs/dnn-sort-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-tab.cjs.entry.js +19 -19
- package/dist/cjs/dnn-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-tabs.cjs.entry.js +40 -40
- package/dist/cjs/dnn-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-toggle.cjs.entry.js +26 -26
- package/dist/cjs/dnn-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-treeview-item.cjs.entry.js +56 -56
- package/dist/cjs/dnn-treeview-item.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-vertical-overflow-menu.cjs.entry.js +113 -111
- package/dist/cjs/dnn-vertical-overflow-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-vertical-splitview.cjs.entry.js +121 -121
- package/dist/cjs/dnn-vertical-splitview.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn.cjs.js +8 -4
- package/dist/cjs/dnn.cjs.js.map +1 -1
- package/dist/cjs/{dom-8ac1ad03.js → dom-14886762.js} +2 -2
- package/dist/cjs/{dom-8ac1ad03.js.map → dom-14886762.js.map} +1 -1
- package/dist/cjs/{index-7505bd72.js → index-514ef6dd.js} +32 -2
- package/dist/cjs/index-514ef6dd.js.map +1 -0
- package/dist/cjs/{index-aff4d89a.js → index-d53702a3.js} +30 -4
- package/dist/cjs/index-d53702a3.js.map +1 -0
- package/dist/cjs/index.cjs.js +41 -41
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{mouseUtilities-75be531a.js → mouseUtilities-ecd5ecf7.js} +19 -19
- package/dist/cjs/{mouseUtilities-75be531a.js.map → mouseUtilities-ecd5ecf7.js.map} +1 -1
- package/dist/cjs/{shadow-css-41d9783d.js → shadow-css-c44ea13a.js} +2 -2
- package/dist/cjs/{shadow-css-41d9783d.js.map → shadow-css-c44ea13a.js.map} +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/dnn-button/dnn-button.js +275 -271
- package/dist/collection/components/dnn-button/dnn-button.js.map +1 -1
- package/dist/collection/components/dnn-button/dnn-button.stories.js +72 -0
- package/dist/collection/components/dnn-button/dnn-button.stories.js.map +1 -0
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.css +6 -0
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.js +151 -139
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.js.map +1 -1
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js +39 -0
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js.map +1 -0
- package/dist/collection/components/dnn-chevron/dnn-chevron.js +106 -106
- package/dist/collection/components/dnn-chevron/dnn-chevron.js.map +1 -1
- package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js +38 -0
- package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js.map +1 -0
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.js +145 -142
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.js.map +1 -1
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js +39 -0
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js.map +1 -0
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.js +433 -433
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.js.map +1 -1
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js +33 -0
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js.map +1 -0
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.js +265 -265
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.js.map +1 -1
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js +48 -0
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js.map +1 -0
- package/dist/collection/components/dnn-image-cropper/CornerType.js +8 -8
- package/dist/collection/components/dnn-image-cropper/CornerType.js.map +1 -1
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js +522 -522
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js.map +1 -1
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js +60 -0
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js.map +1 -0
- package/dist/collection/components/dnn-modal/dnn-modal.js +190 -172
- package/dist/collection/components/dnn-modal/dnn-modal.js.map +1 -1
- package/dist/collection/components/dnn-modal/dnn-modal.stories.js +47 -0
- package/dist/collection/components/dnn-modal/dnn-modal.stories.js.map +1 -0
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.css +83 -0
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js +531 -0
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js.map +1 -0
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js +273 -0
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js.map +1 -0
- package/dist/collection/components/dnn-permissions-grid/localization-interface.js +3 -0
- package/dist/collection/components/dnn-permissions-grid/localization-interface.js.map +1 -0
- package/dist/collection/components/dnn-permissions-grid/permissions-interface.js +3 -0
- package/dist/collection/components/dnn-permissions-grid/permissions-interface.js.map +1 -0
- package/dist/collection/components/dnn-permissions-grid/role-group-interface.js +2 -0
- package/dist/collection/components/dnn-permissions-grid/role-group-interface.js.map +1 -0
- package/dist/collection/components/dnn-permissions-grid/role-interface.js +2 -0
- package/dist/collection/components/dnn-permissions-grid/role-interface.js.map +1 -0
- package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js +2 -0
- package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js.map +1 -0
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.js +136 -136
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.js.map +1 -1
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js +26 -0
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js.map +1 -0
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.css +6 -3
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js +80 -80
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js.map +1 -1
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js +58 -0
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js.map +1 -0
- package/dist/collection/components/dnn-tab/dnn-tab.js +83 -83
- package/dist/collection/components/dnn-tab/dnn-tab.js.map +1 -1
- package/dist/collection/components/dnn-tab/dnn-tab.stories.js +25 -0
- package/dist/collection/components/dnn-tab/dnn-tab.stories.js.map +1 -0
- package/dist/collection/components/dnn-tabs/dnn-tabs.js +54 -54
- package/dist/collection/components/dnn-tabs/dnn-tabs.js.map +1 -1
- package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js +48 -0
- package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js.map +1 -0
- package/dist/collection/components/dnn-toggle/dnn-toggle.css +1 -1
- package/dist/collection/components/dnn-toggle/dnn-toggle.js +93 -93
- package/dist/collection/components/dnn-toggle/dnn-toggle.js.map +1 -1
- package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js +53 -0
- package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js.map +1 -0
- package/dist/collection/components/dnn-toggle/toggle-interface.js +1 -1
- package/dist/collection/components/dnn-toggle/toggle-interface.js.map +1 -1
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js +130 -126
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js.map +1 -1
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js +36 -0
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js.map +1 -0
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.css +6 -7
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +133 -131
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js.map +1 -1
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js +60 -0
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js.map +1 -0
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.css +4 -2
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +233 -233
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js.map +1 -1
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js +75 -0
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js.map +1 -0
- package/dist/collection/index.js +2 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utilities/colorInfo.js +190 -190
- package/dist/collection/utilities/colorInfo.js.map +1 -1
- package/dist/collection/utilities/debounce.js +18 -18
- package/dist/collection/utilities/debounce.js.map +1 -1
- package/dist/collection/utilities/dnnServicesFramework.js +41 -41
- package/dist/collection/utilities/dnnServicesFramework.js.map +1 -1
- package/dist/collection/utilities/mouseUtilities.js +19 -19
- package/dist/collection/utilities/mouseUtilities.js.map +1 -1
- package/dist/{esm/css-shim-20dbffa5.js → dnn/css-shim-091f949f.js} +3 -3
- package/dist/dnn/css-shim-091f949f.js.map +1 -0
- package/dist/dnn/{css-shim-856c55de.system.js → css-shim-c5bffe6b.system.js} +2 -2
- package/dist/dnn/css-shim-c5bffe6b.system.js.map +1 -0
- package/dist/{esm/debounce-06f55268.js → dnn/debounce-6be67abd.js} +18 -18
- package/dist/dnn/{debounce-06f55268.js.map → debounce-6be67abd.js.map} +1 -1
- package/dist/dnn/{debounce-eef81bf7.system.js → debounce-db438a09.system.js} +1 -1
- package/dist/dnn/{debounce-eef81bf7.system.js.map → debounce-db438a09.system.js.map} +0 -0
- package/dist/dnn/dnn-button.entry.js +80 -76
- package/dist/dnn/dnn-button.entry.js.map +1 -1
- package/dist/dnn/dnn-button.system.entry.js +1 -1
- package/dist/dnn/dnn-button.system.entry.js.map +1 -1
- package/dist/dnn/dnn-checkbox.entry.js +47 -47
- package/dist/dnn/dnn-checkbox.entry.js.map +1 -1
- package/dist/dnn/dnn-checkbox.system.entry.js +1 -1
- package/dist/dnn/dnn-checkbox.system.entry.js.map +1 -1
- package/dist/dnn/dnn-chevron.entry.js +22 -22
- package/dist/dnn/dnn-chevron.entry.js.map +1 -1
- package/dist/dnn/dnn-chevron.system.entry.js +1 -1
- package/dist/dnn/dnn-chevron.system.entry.js.map +1 -1
- package/dist/dnn/dnn-collapsible.entry.js +57 -54
- package/dist/dnn/dnn-collapsible.entry.js.map +1 -1
- package/dist/dnn/dnn-collapsible.system.entry.js +1 -1
- package/dist/dnn/dnn-collapsible.system.entry.js.map +1 -1
- package/dist/dnn/dnn-color-picker.entry.js +494 -494
- package/dist/dnn/dnn-color-picker.entry.js.map +1 -1
- package/dist/dnn/dnn-color-picker.system.entry.js +2 -2
- package/dist/dnn/dnn-color-picker.system.entry.js.map +1 -1
- package/dist/dnn/dnn-dropzone.entry.js +141 -141
- package/dist/dnn/dnn-dropzone.entry.js.map +1 -1
- package/dist/dnn/dnn-dropzone.system.entry.js +1 -1
- package/dist/dnn/dnn-dropzone.system.entry.js.map +1 -1
- package/dist/dnn/dnn-image-cropper.entry.js +394 -394
- package/dist/dnn/dnn-image-cropper.entry.js.map +1 -1
- package/dist/dnn/dnn-image-cropper.system.entry.js +1 -1
- package/dist/dnn/dnn-image-cropper.system.entry.js.map +1 -1
- package/dist/dnn/dnn-modal.entry.js +53 -50
- package/dist/dnn/dnn-modal.entry.js.map +1 -1
- package/dist/dnn/dnn-modal.system.entry.js +1 -1
- package/dist/dnn/dnn-modal.system.entry.js.map +1 -1
- package/dist/dnn/dnn-permissions-grid.entry.js +316 -0
- package/dist/dnn/dnn-permissions-grid.entry.js.map +1 -0
- package/dist/dnn/dnn-permissions-grid.system.entry.js +2 -0
- package/dist/dnn/dnn-permissions-grid.system.entry.js.map +1 -0
- package/dist/dnn/dnn-searchbox.entry.js +54 -54
- package/dist/dnn/dnn-searchbox.entry.js.map +1 -1
- package/dist/dnn/dnn-searchbox.system.entry.js +1 -1
- package/dist/dnn/dnn-searchbox.system.entry.js.map +1 -1
- package/dist/dnn/dnn-sort-icon.entry.js +32 -32
- package/dist/dnn/dnn-sort-icon.entry.js.map +1 -1
- package/dist/dnn/dnn-sort-icon.system.entry.js +1 -1
- package/dist/dnn/dnn-sort-icon.system.entry.js.map +1 -1
- package/dist/dnn/dnn-tab.entry.js +19 -19
- package/dist/dnn/dnn-tab.entry.js.map +1 -1
- package/dist/dnn/dnn-tab.system.entry.js +1 -1
- package/dist/dnn/dnn-tabs.entry.js +40 -40
- package/dist/dnn/dnn-tabs.entry.js.map +1 -1
- package/dist/dnn/dnn-tabs.system.entry.js +1 -1
- package/dist/dnn/dnn-tabs.system.entry.js.map +1 -1
- package/dist/dnn/dnn-toggle.entry.js +26 -26
- package/dist/dnn/dnn-toggle.entry.js.map +1 -1
- package/dist/dnn/dnn-toggle.system.entry.js +1 -1
- package/dist/dnn/dnn-toggle.system.entry.js.map +1 -1
- package/dist/dnn/dnn-treeview-item.entry.js +56 -56
- package/dist/dnn/dnn-treeview-item.entry.js.map +1 -1
- package/dist/dnn/dnn-treeview-item.system.entry.js +1 -1
- package/dist/dnn/dnn-treeview-item.system.entry.js.map +1 -1
- package/dist/dnn/dnn-vertical-overflow-menu.entry.js +113 -111
- package/dist/dnn/dnn-vertical-overflow-menu.entry.js.map +1 -1
- package/dist/dnn/dnn-vertical-overflow-menu.system.entry.js +1 -1
- package/dist/dnn/dnn-vertical-overflow-menu.system.entry.js.map +1 -1
- package/dist/dnn/dnn-vertical-splitview.entry.js +121 -121
- package/dist/dnn/dnn-vertical-splitview.entry.js.map +1 -1
- package/dist/dnn/dnn-vertical-splitview.system.entry.js +1 -1
- package/dist/dnn/dnn-vertical-splitview.system.entry.js.map +1 -1
- package/dist/dnn/dnn.esm.js +8 -4
- package/dist/dnn/dnn.esm.js.map +1 -1
- package/dist/dnn/dnn.system.js +1 -1
- package/dist/dnn/dnn.system.js.map +1 -1
- package/dist/dnn/{dom-938307ec.system.js → dom-99eb7b76.system.js} +1 -1
- package/dist/dnn/{dom-938307ec.system.js.map → dom-99eb7b76.system.js.map} +1 -1
- package/dist/dnn/{dom-c5ed0ba5.js → dom-a385e381.js} +2 -2
- package/dist/{esm/dom-c5ed0ba5.js.map → dnn/dom-a385e381.js.map} +1 -1
- package/dist/dnn/{index-b5a28c1d.js → index-20e42ad7.js} +30 -4
- package/dist/dnn/index-20e42ad7.js.map +1 -0
- package/dist/dnn/index-c3cc3b5b.system.js +2 -0
- package/dist/dnn/index-c3cc3b5b.system.js.map +1 -0
- package/dist/dnn/index.esm.js +41 -41
- package/dist/dnn/index.system.js +1 -1
- package/dist/dnn/{mouseUtilities-e7e4e78f.system.js → mouseUtilities-233ad7e3.system.js} +1 -1
- package/dist/dnn/{mouseUtilities-e7e4e78f.system.js.map → mouseUtilities-233ad7e3.system.js.map} +0 -0
- package/dist/{esm/mouseUtilities-817973b4.js → dnn/mouseUtilities-b261ca4f.js} +19 -19
- package/dist/dnn/{mouseUtilities-817973b4.js.map → mouseUtilities-b261ca4f.js.map} +1 -1
- package/dist/dnn/{p-646cfb1b.system.js → p-1e26a4e1.system.js} +1 -1
- package/dist/dnn/{p-646cfb1b.system.js.map → p-1e26a4e1.system.js.map} +0 -0
- package/dist/dnn/p-31dc68a7.system.entry.js +11 -0
- package/dist/dnn/p-31dc68a7.system.entry.js.map +1 -0
- package/dist/dnn/p-5bcf3629.system.js +2 -0
- package/dist/dnn/p-5bcf3629.system.js.map +1 -0
- package/dist/dnn/{p-fb637662.system.js → p-78561bb1.system.js} +2 -2
- package/dist/dnn/{p-fb637662.system.js.map → p-78561bb1.system.js.map} +0 -0
- package/dist/dnn/p-7ffdbed1.js +2 -0
- package/dist/dnn/p-7ffdbed1.js.map +1 -0
- package/dist/dnn/{p-0e94f5ee.js → p-9b8731a9.js} +1 -1
- package/dist/dnn/{p-0e94f5ee.js.map → p-9b8731a9.js.map} +0 -0
- package/dist/dnn/p-b8064287.system.js +2 -0
- package/dist/dnn/p-b8064287.system.js.map +1 -0
- package/dist/dnn/p-c222c8b7.entry.js +11 -0
- package/dist/dnn/p-c222c8b7.entry.js.map +1 -0
- package/dist/dnn/shadow-css-27708fdd.system.js +14 -0
- package/dist/dnn/shadow-css-27708fdd.system.js.map +1 -0
- package/dist/dnn/{shadow-css-8c625855.js → shadow-css-ef431969.js} +2 -2
- package/dist/{esm/shadow-css-8c625855.js.map → dnn/shadow-css-ef431969.js.map} +1 -1
- package/dist/{dnn/css-shim-20dbffa5.js → esm/css-shim-091f949f.js} +3 -3
- package/dist/esm/css-shim-091f949f.js.map +1 -0
- package/dist/{dnn/debounce-06f55268.js → esm/debounce-6be67abd.js} +18 -18
- package/dist/esm/{debounce-06f55268.js.map → debounce-6be67abd.js.map} +1 -1
- package/dist/esm/dnn-button.entry.js +80 -76
- package/dist/esm/dnn-button.entry.js.map +1 -1
- package/dist/esm/{dnn-button_16.entry.js → dnn-button_17.entry.js} +2024 -1711
- package/dist/esm/dnn-button_17.entry.js.map +1 -0
- package/dist/esm/dnn-checkbox.entry.js +47 -47
- package/dist/esm/dnn-checkbox.entry.js.map +1 -1
- package/dist/esm/dnn-chevron.entry.js +22 -22
- package/dist/esm/dnn-chevron.entry.js.map +1 -1
- package/dist/esm/dnn-collapsible.entry.js +57 -54
- package/dist/esm/dnn-collapsible.entry.js.map +1 -1
- package/dist/esm/dnn-color-picker.entry.js +494 -494
- package/dist/esm/dnn-color-picker.entry.js.map +1 -1
- package/dist/esm/dnn-dropzone.entry.js +141 -141
- package/dist/esm/dnn-dropzone.entry.js.map +1 -1
- package/dist/esm/dnn-image-cropper.entry.js +394 -394
- package/dist/esm/dnn-image-cropper.entry.js.map +1 -1
- package/dist/esm/dnn-modal.entry.js +53 -50
- package/dist/esm/dnn-modal.entry.js.map +1 -1
- package/dist/esm/dnn-permissions-grid.entry.js +316 -0
- package/dist/esm/dnn-permissions-grid.entry.js.map +1 -0
- package/dist/esm/dnn-searchbox.entry.js +54 -54
- package/dist/esm/dnn-searchbox.entry.js.map +1 -1
- package/dist/esm/dnn-sort-icon.entry.js +32 -32
- package/dist/esm/dnn-sort-icon.entry.js.map +1 -1
- package/dist/esm/dnn-tab.entry.js +19 -19
- package/dist/esm/dnn-tab.entry.js.map +1 -1
- package/dist/esm/dnn-tabs.entry.js +40 -40
- package/dist/esm/dnn-tabs.entry.js.map +1 -1
- package/dist/esm/dnn-toggle.entry.js +26 -26
- package/dist/esm/dnn-toggle.entry.js.map +1 -1
- package/dist/esm/dnn-treeview-item.entry.js +56 -56
- package/dist/esm/dnn-treeview-item.entry.js.map +1 -1
- package/dist/esm/dnn-vertical-overflow-menu.entry.js +113 -111
- package/dist/esm/dnn-vertical-overflow-menu.entry.js.map +1 -1
- package/dist/esm/dnn-vertical-splitview.entry.js +121 -121
- package/dist/esm/dnn-vertical-splitview.entry.js.map +1 -1
- package/dist/esm/dnn.js +8 -4
- package/dist/esm/dnn.js.map +1 -1
- package/dist/esm/{dom-c5ed0ba5.js → dom-a385e381.js} +2 -2
- package/dist/{dnn/dom-c5ed0ba5.js.map → esm/dom-a385e381.js.map} +1 -1
- package/dist/esm/{index-b5a28c1d.js → index-20e42ad7.js} +30 -4
- package/dist/esm/index-20e42ad7.js.map +1 -0
- package/dist/esm/{index-cdbad319.js → index-59e0950f.js} +32 -2
- package/dist/esm/index-59e0950f.js.map +1 -0
- package/dist/esm/index.js +41 -41
- package/dist/esm/loader.js +4 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/{dnn/mouseUtilities-817973b4.js → esm/mouseUtilities-b261ca4f.js} +19 -19
- package/dist/esm/{mouseUtilities-817973b4.js.map → mouseUtilities-b261ca4f.js.map} +1 -1
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- 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/{shadow-css-8c625855.js → shadow-css-ef431969.js} +2 -2
- package/dist/{dnn/shadow-css-8c625855.js.map → esm/shadow-css-ef431969.js.map} +1 -1
- package/dist/esm-es5/{debounce-06f55268.js → debounce-6be67abd.js} +1 -1
- package/dist/esm-es5/{debounce-06f55268.js.map → debounce-6be67abd.js.map} +0 -0
- package/dist/esm-es5/dnn-button_17.entry.js +11 -0
- package/dist/esm-es5/dnn-button_17.entry.js.map +1 -0
- package/dist/esm-es5/dnn.js +1 -1
- package/dist/esm-es5/dnn.js.map +1 -1
- package/dist/esm-es5/index-59e0950f.js +2 -0
- package/dist/esm-es5/index-59e0950f.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/components/dnn-button/dnn-button.d.ts +56 -55
- package/dist/types/components/dnn-button/dnn-button.stories.d.ts +4 -0
- package/dist/types/components/dnn-checkbox/dnn-checkbox.d.ts +20 -16
- package/dist/types/components/dnn-checkbox/dnn-checkbox.stories.d.ts +4 -0
- package/dist/types/components/dnn-chevron/dnn-chevron.d.ts +13 -13
- package/dist/types/components/dnn-chevron/dnn-chevron.stories.d.ts +4 -0
- package/dist/types/components/dnn-collapsible/dnn-collapsible.d.ts +19 -18
- package/dist/types/components/dnn-collapsible/dnn-collapsible.stories.d.ts +4 -0
- package/dist/types/components/dnn-color-picker/dnn-color-picker.d.ts +46 -46
- package/dist/types/components/dnn-color-picker/dnn-color-picker.stories.d.ts +4 -0
- package/dist/types/components/dnn-dropzone/dnn-dropzone.d.ts +45 -45
- package/dist/types/components/dnn-dropzone/dnn-dropzone.stories.d.ts +4 -0
- package/dist/types/components/dnn-image-cropper/CornerType.d.ts +6 -6
- package/dist/types/components/dnn-image-cropper/dnn-image-cropper.d.ts +61 -61
- package/dist/types/components/dnn-image-cropper/dnn-image-cropper.stories.d.ts +4 -0
- package/dist/types/components/dnn-modal/dnn-modal.d.ts +38 -35
- package/dist/types/components/dnn-modal/dnn-modal.stories.d.ts +4 -0
- package/dist/types/components/dnn-permissions-grid/dnn-permissions-grid.d.ts +47 -0
- package/dist/types/components/dnn-permissions-grid/dnn-permissions-grid.stories.d.ts +4 -0
- package/dist/types/components/dnn-permissions-grid/localization-interface.d.ts +11 -0
- package/dist/types/components/dnn-permissions-grid/permissions-interface.d.ts +26 -0
- package/dist/types/components/dnn-permissions-grid/role-group-interface.d.ts +6 -0
- package/dist/types/components/dnn-permissions-grid/role-interface.d.ts +6 -0
- package/dist/types/components/dnn-permissions-grid/searched-user-interface.d.ts +4 -0
- package/dist/types/components/dnn-searchbox/dnn-searchbox.d.ts +22 -22
- package/dist/types/components/dnn-searchbox/dnn-searchbox.stories.d.ts +4 -0
- package/dist/types/components/dnn-sort-icon/dnn-sort-icon.d.ts +9 -9
- package/dist/types/components/dnn-sort-icon/dnn-sort-icon.stories.d.ts +4 -0
- package/dist/types/components/dnn-tab/dnn-tab.d.ts +11 -11
- package/dist/types/components/dnn-tab/dnn-tab.stories.d.ts +4 -0
- package/dist/types/components/dnn-tabs/dnn-tabs.d.ts +11 -11
- package/dist/types/components/dnn-tabs/dnn-tabs.stories.d.ts +4 -0
- package/dist/types/components/dnn-toggle/dnn-toggle.d.ts +13 -13
- package/dist/types/components/dnn-toggle/dnn-toggle.stories.d.ts +4 -0
- package/dist/types/components/dnn-toggle/toggle-interface.d.ts +3 -3
- package/dist/types/components/dnn-treeview-item/dnn-treeview-item.d.ts +28 -24
- package/dist/types/components/dnn-treeview-item/dnn-treeview-item.stories.d.ts +4 -0
- package/dist/types/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.d.ts +16 -16
- package/dist/types/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.d.ts +4 -0
- package/dist/types/components/dnn-vertical-splitview/dnn-vertical-splitview.d.ts +28 -28
- package/dist/types/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.d.ts +4 -0
- package/dist/types/components.d.ts +108 -34
- package/dist/types/global.d.ts +1 -0
- package/dist/types/home/runner/work/dnn-elements/dnn-elements/.stencil/.storybook/utilities.d.ts +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utilities/colorInfo.d.ts +52 -52
- package/dist/types/utilities/debounce.d.ts +5 -5
- package/dist/types/utilities/dnnServicesFramework.d.ts +19 -19
- package/dist/types/utilities/mouseUtilities.d.ts +4 -4
- package/package.json +63 -48
- package/dist/cjs/css-shim-3bfdba4f.js.map +0 -1
- package/dist/cjs/dnn-button_16.cjs.entry.js.map +0 -1
- package/dist/cjs/index-7505bd72.js.map +0 -1
- package/dist/cjs/index-aff4d89a.js.map +0 -1
- package/dist/dnn/css-shim-20dbffa5.js.map +0 -1
- package/dist/dnn/css-shim-856c55de.system.js.map +0 -1
- package/dist/dnn/index-a3a55419.system.js +0 -2
- package/dist/dnn/index-a3a55419.system.js.map +0 -1
- package/dist/dnn/index-b5a28c1d.js.map +0 -1
- package/dist/dnn/p-058ba146.system.js +0 -2
- package/dist/dnn/p-058ba146.system.js.map +0 -1
- package/dist/dnn/p-45ce2139.js +0 -2
- package/dist/dnn/p-45ce2139.js.map +0 -1
- package/dist/dnn/p-755d047d.system.entry.js +0 -11
- package/dist/dnn/p-755d047d.system.entry.js.map +0 -1
- package/dist/dnn/p-8ec1f3a8.entry.js +0 -11
- package/dist/dnn/p-8ec1f3a8.entry.js.map +0 -1
- package/dist/dnn/p-f91193e2.system.js +0 -2
- package/dist/dnn/p-f91193e2.system.js.map +0 -1
- package/dist/dnn/shadow-css-d573707f.system.js +0 -14
- package/dist/dnn/shadow-css-d573707f.system.js.map +0 -1
- package/dist/esm/css-shim-20dbffa5.js.map +0 -1
- package/dist/esm/dnn-button_16.entry.js.map +0 -1
- package/dist/esm/index-b5a28c1d.js.map +0 -1
- package/dist/esm/index-cdbad319.js.map +0 -1
- package/dist/esm-es5/dnn-button_16.entry.js +0 -11
- package/dist/esm-es5/dnn-button_16.entry.js.map +0 -1
- package/dist/esm-es5/index-cdbad319.js +0 -2
- package/dist/esm-es5/index-cdbad319.js.map +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
import readme from "./readme.md";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Elements/Searchbox",
|
|
5
|
+
component: "dnn-searchbox",
|
|
6
|
+
parameters: {
|
|
7
|
+
notes: readme,
|
|
8
|
+
actions: {
|
|
9
|
+
handles: ['queryChanged'],
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const Template = (args) => html `
|
|
14
|
+
<dnn-searchbox
|
|
15
|
+
?debounced=${args.debounced}
|
|
16
|
+
placeholder=${args.placeholder}
|
|
17
|
+
query=${args.query}
|
|
18
|
+
/>
|
|
19
|
+
`;
|
|
20
|
+
export const Searchbox = Template.bind({});
|
|
21
|
+
Searchbox.args = {
|
|
22
|
+
debounced: true,
|
|
23
|
+
placeholder: "Search",
|
|
24
|
+
query: "",
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=dnn-searchbox.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dnn-searchbox.stories.js","sourceRoot":"","sources":["../../../../src/components/dnn-searchbox/dnn-searchbox.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,eAAe;EACX,KAAK,EAAE,oBAAoB;EAC3B,SAAS,EAAE,eAAe;EAC1B,UAAU,EAAE;IACR,KAAK,EAAE,MAAM;IACb,OAAO,EAAE;MACL,OAAO,EAAE,CAAC,cAAc,CAAC;KAC5B;GACJ;CACI,CAAC;AAEV,MAAM,QAAQ,GAAG,CAAC,IAIjB,EAAE,EAAE,CACD,IAAI,CAAA;;yBAEiB,IAAI,CAAC,SAAS;0BACb,IAAI,CAAC,WAAW;oBACtB,IAAI,CAAC,KAAK;;KAEzB,CAAC;AAEN,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;EACb,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,QAAQ;EACrB,KAAK,EAAE,EAAE;CACZ,CAAA","sourcesContent":["import { html } from \"lit-html\";\r\nimport { Meta } from \"@storybook/web-components\";\r\nimport readme from \"./readme.md\";\r\n\r\nexport default {\r\n title: \"Elements/Searchbox\",\r\n component: \"dnn-searchbox\",\r\n parameters: {\r\n notes: readme,\r\n actions: {\r\n handles: ['queryChanged'],\r\n }\r\n }\r\n} as Meta;\r\n\r\nconst Template = (args : {\r\n debounced: boolean,\r\n placeholder: string,\r\n query: string,\r\n}) =>\r\n html`\r\n <dnn-searchbox\r\n ?debounced=${args.debounced}\r\n placeholder=${args.placeholder}\r\n query=${args.query}\r\n />\r\n `;\r\n\r\nexport const Searchbox = Template.bind({});\r\nSearchbox.args = {\r\n debounced: true,\r\n placeholder: \"Search\",\r\n query: \"\",\r\n}"]}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* @prop --color-sorted: Color of the sorted sort icon.
|
|
5
5
|
* @prop --color-hover: Color of the icons when hovered.
|
|
6
6
|
*/
|
|
7
|
+
--color: #888;
|
|
8
|
+
--color-sorted: var(--dnn-color-primary, rgb(2,139,255));
|
|
9
|
+
--color-hover: var(--dnn-color-primary-light, #36a1ff);
|
|
7
10
|
display: inline-block;
|
|
8
11
|
}
|
|
9
12
|
|
|
@@ -22,11 +25,11 @@ button {
|
|
|
22
25
|
button svg {
|
|
23
26
|
height: 1.5em;
|
|
24
27
|
width: auto;
|
|
25
|
-
fill: var(--color
|
|
28
|
+
fill: var(--color);
|
|
26
29
|
}
|
|
27
30
|
button.active svg {
|
|
28
|
-
fill: var(--color-sorted
|
|
31
|
+
fill: var(--color-sorted);
|
|
29
32
|
}
|
|
30
33
|
button:hover svg, button:focus svg {
|
|
31
|
-
fill: var(--color-hover
|
|
34
|
+
fill: var(--color-hover);
|
|
32
35
|
}
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, Event } from '@stencil/core';
|
|
2
|
-
export class DnnSortIcon {
|
|
3
|
-
constructor() {
|
|
4
|
-
/** Defines the current sort direction */
|
|
5
|
-
this.sortDirection = "none";
|
|
6
|
-
}
|
|
7
|
-
changeSort() {
|
|
8
|
-
switch (this.sortDirection) {
|
|
9
|
-
case "asc":
|
|
10
|
-
this.sortDirection = "desc";
|
|
11
|
-
break;
|
|
12
|
-
case "desc":
|
|
13
|
-
this.sortDirection = "asc";
|
|
14
|
-
break;
|
|
15
|
-
case "none":
|
|
16
|
-
this.sortDirection = "asc";
|
|
17
|
-
break;
|
|
18
|
-
default:
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
this.sortChanged.emit(this.sortDirection);
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
return (h(Host, null,
|
|
25
|
-
h("button", { class: { "active": this.sortDirection != "none" }, onClick: () => this.changeSort() },
|
|
26
|
-
this.sortDirection == "none" &&
|
|
27
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 16" },
|
|
28
|
-
h("path", { d: "M 0 7 H 12 L 6 0 Z M 0 9 H 12 L 6 16 Z" })),
|
|
29
|
-
this.sortDirection == "asc" &&
|
|
30
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 16" },
|
|
31
|
-
h("path", { d: "M 0 7 H 12 L 6 0 Z" })),
|
|
32
|
-
this.sortDirection == "desc" &&
|
|
33
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 16" },
|
|
34
|
-
h("path", { d: "M 0 9 H 12 L 6 16 Z" })))));
|
|
35
|
-
}
|
|
36
|
-
static get is() { return "dnn-sort-icon"; }
|
|
37
|
-
static get encapsulation() { return "shadow"; }
|
|
38
|
-
static get originalStyleUrls() { return {
|
|
39
|
-
"$": ["dnn-sort-icon.scss"]
|
|
40
|
-
}; }
|
|
41
|
-
static get styleUrls() { return {
|
|
42
|
-
"$": ["dnn-sort-icon.css"]
|
|
43
|
-
}; }
|
|
44
|
-
static get properties() { return {
|
|
45
|
-
"sortDirection": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"mutable": false,
|
|
48
|
-
"complexType": {
|
|
49
|
-
"original": "\"asc\" | \"desc\" | \"none\"",
|
|
50
|
-
"resolved": "\"asc\" | \"desc\" | \"none\"",
|
|
51
|
-
"references": {}
|
|
52
|
-
},
|
|
53
|
-
"required": false,
|
|
54
|
-
"optional": false,
|
|
55
|
-
"docs": {
|
|
56
|
-
"tags": [],
|
|
57
|
-
"text": "Defines the current sort direction"
|
|
58
|
-
},
|
|
59
|
-
"attribute": "sort-direction",
|
|
60
|
-
"reflect": false,
|
|
61
|
-
"defaultValue": "\"none\""
|
|
62
|
-
}
|
|
63
|
-
}; }
|
|
64
|
-
static get events() { return [{
|
|
65
|
-
"method": "sortChanged",
|
|
66
|
-
"name": "sortChanged",
|
|
67
|
-
"bubbles": true,
|
|
68
|
-
"cancelable": true,
|
|
69
|
-
"composed": true,
|
|
70
|
-
"docs": {
|
|
71
|
-
"tags": [],
|
|
72
|
-
"text": "Emitted when the sort is changed."
|
|
73
|
-
},
|
|
74
|
-
"complexType": {
|
|
75
|
-
"original": "\"asc\"|\"desc\"|\"none\"",
|
|
76
|
-
"resolved": "\"asc\" | \"desc\" | \"none\"",
|
|
77
|
-
"references": {}
|
|
78
|
-
}
|
|
79
|
-
}]; }
|
|
80
|
-
}
|
|
1
|
+
import { Component, Host, h, Prop, Event } from '@stencil/core';
|
|
2
|
+
export class DnnSortIcon {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Defines the current sort direction */
|
|
5
|
+
this.sortDirection = "none";
|
|
6
|
+
}
|
|
7
|
+
changeSort() {
|
|
8
|
+
switch (this.sortDirection) {
|
|
9
|
+
case "asc":
|
|
10
|
+
this.sortDirection = "desc";
|
|
11
|
+
break;
|
|
12
|
+
case "desc":
|
|
13
|
+
this.sortDirection = "asc";
|
|
14
|
+
break;
|
|
15
|
+
case "none":
|
|
16
|
+
this.sortDirection = "asc";
|
|
17
|
+
break;
|
|
18
|
+
default:
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
this.sortChanged.emit(this.sortDirection);
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return (h(Host, null,
|
|
25
|
+
h("button", { class: { "active": this.sortDirection != "none" }, onClick: () => this.changeSort() },
|
|
26
|
+
this.sortDirection == "none" &&
|
|
27
|
+
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 16" },
|
|
28
|
+
h("path", { d: "M 0 7 H 12 L 6 0 Z M 0 9 H 12 L 6 16 Z" })),
|
|
29
|
+
this.sortDirection == "asc" &&
|
|
30
|
+
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 16" },
|
|
31
|
+
h("path", { d: "M 0 7 H 12 L 6 0 Z" })),
|
|
32
|
+
this.sortDirection == "desc" &&
|
|
33
|
+
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 16" },
|
|
34
|
+
h("path", { d: "M 0 9 H 12 L 6 16 Z" })))));
|
|
35
|
+
}
|
|
36
|
+
static get is() { return "dnn-sort-icon"; }
|
|
37
|
+
static get encapsulation() { return "shadow"; }
|
|
38
|
+
static get originalStyleUrls() { return {
|
|
39
|
+
"$": ["dnn-sort-icon.scss"]
|
|
40
|
+
}; }
|
|
41
|
+
static get styleUrls() { return {
|
|
42
|
+
"$": ["dnn-sort-icon.css"]
|
|
43
|
+
}; }
|
|
44
|
+
static get properties() { return {
|
|
45
|
+
"sortDirection": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "\"asc\" | \"desc\" | \"none\"",
|
|
50
|
+
"resolved": "\"asc\" | \"desc\" | \"none\"",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": false,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": "Defines the current sort direction"
|
|
58
|
+
},
|
|
59
|
+
"attribute": "sort-direction",
|
|
60
|
+
"reflect": false,
|
|
61
|
+
"defaultValue": "\"none\""
|
|
62
|
+
}
|
|
63
|
+
}; }
|
|
64
|
+
static get events() { return [{
|
|
65
|
+
"method": "sortChanged",
|
|
66
|
+
"name": "sortChanged",
|
|
67
|
+
"bubbles": true,
|
|
68
|
+
"cancelable": true,
|
|
69
|
+
"composed": true,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": "Emitted when the sort is changed."
|
|
73
|
+
},
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "\"asc\"|\"desc\"|\"none\"",
|
|
76
|
+
"resolved": "\"asc\" | \"desc\" | \"none\"",
|
|
77
|
+
"references": {}
|
|
78
|
+
}
|
|
79
|
+
}]; }
|
|
80
|
+
}
|
|
81
81
|
//# sourceMappingURL=dnn-sort-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dnn-sort-icon.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"dnn-sort-icon.js","sourceRoot":"","sources":["../../../../src/components/dnn-sort-icon/dnn-sort-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAO9E,MAAM,OAAO,WAAW;EALxB;IAME,yCAAyC;IACjC,kBAAa,GAA4B,MAAM,CAAC;GA2CzD;EAtCS,UAAU;IAChB,QAAQ,IAAI,CAAC,aAAa,EAAE;MAC1B,KAAK,KAAK;QACR,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;QAC5B,MAAM;MACR,KAAK,MAAM;QACT,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,MAAM;MACR,KAAK,MAAM;QACT,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,MAAM;MACR;QACE,MAAM;KACT;IAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;EAC5C,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,cACE,KAAK,EAAE,EAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,IAAI,MAAM,EAAC,EAC/C,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE;QAE/B,IAAI,CAAC,aAAa,IAAI,MAAM;UAC3B,WAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW;YAAC,YAAM,CAAC,EAAC,wCAAwC,GAAQ,CAAM;QAE3H,IAAI,CAAC,aAAa,IAAI,KAAK;UAC1B,WAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW;YAAC,YAAM,CAAC,EAAC,oBAAoB,GAAQ,CAAM;QAEvG,IAAI,CAAC,aAAa,IAAI,MAAM;UAC3B,WAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW;YAAC,YAAM,CAAC,EAAC,qBAAqB,GAAQ,CAAM,CAElG,CACJ,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'dnn-sort-icon',\n styleUrl: 'dnn-sort-icon.scss',\n shadow: true\n})\nexport class DnnSortIcon {\n /** Defines the current sort direction */\n @Prop() sortDirection: \"asc\" | \"desc\" | \"none\" = \"none\";\n\n /** Emitted when the sort is changed. */\n @Event() sortChanged!: EventEmitter<\"asc\"|\"desc\"|\"none\">;\n \n private changeSort(): void {\n switch (this.sortDirection) {\n case \"asc\":\n this.sortDirection = \"desc\";\n break;\n case \"desc\":\n this.sortDirection = \"asc\";\n break;\n case \"none\":\n this.sortDirection = \"asc\";\n break;\n default:\n break;\n }\n\n this.sortChanged.emit(this.sortDirection);\n }\n\n render() {\n return (\n <Host>\n <button\n class={{\"active\": this.sortDirection != \"none\"}}\n onClick={() => this.changeSort()}\n >\n {this.sortDirection == \"none\" &&\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 16\"><path d=\"M 0 7 H 12 L 6 0 Z M 0 9 H 12 L 6 16 Z\"></path></svg>\n }\n {this.sortDirection == \"asc\" &&\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 16\"><path d=\"M 0 7 H 12 L 6 0 Z\"></path></svg>\n }\n {this.sortDirection == \"desc\" &&\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 16\"><path d=\"M 0 9 H 12 L 6 16 Z\"></path></svg>\n }\n </button>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
import readme from "./readme.md";
|
|
3
|
+
import { ifDefined } from "lit-html/directives/if-defined";
|
|
4
|
+
import { injectStyles } from "../../../.storybook/utilities";
|
|
5
|
+
export default {
|
|
6
|
+
title: "Elements/Sort Icon",
|
|
7
|
+
component: 'dnn-sort-icon',
|
|
8
|
+
parameters: {
|
|
9
|
+
notes: readme,
|
|
10
|
+
actions: {
|
|
11
|
+
handles: ['sortChanged'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
'sortDirection': {
|
|
16
|
+
options: ['asc', 'desc', 'none'],
|
|
17
|
+
control: {
|
|
18
|
+
type: 'radio',
|
|
19
|
+
},
|
|
20
|
+
defaultValue: "none",
|
|
21
|
+
},
|
|
22
|
+
'sort-direction': {
|
|
23
|
+
options: ['asc', 'desc', 'none'],
|
|
24
|
+
control: {
|
|
25
|
+
type: 'radio',
|
|
26
|
+
},
|
|
27
|
+
defaultValue: "none",
|
|
28
|
+
},
|
|
29
|
+
'--color': {
|
|
30
|
+
control: {
|
|
31
|
+
type: 'color'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
'--color-hover': {
|
|
35
|
+
control: {
|
|
36
|
+
type: 'color'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
'--color-sorted': {
|
|
40
|
+
control: {
|
|
41
|
+
type: 'color'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
const Template = (args, context) => {
|
|
47
|
+
return html `
|
|
48
|
+
<dnn-sort-icon
|
|
49
|
+
style=${ifDefined(injectStyles(args, context))}
|
|
50
|
+
.sortDirection=${ifDefined(args.sortDirection)}
|
|
51
|
+
/>
|
|
52
|
+
`;
|
|
53
|
+
};
|
|
54
|
+
export const SortIcon = Template.bind({});
|
|
55
|
+
SortIcon.args = {
|
|
56
|
+
sortDirection: "none",
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=dnn-sort-icon.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dnn-sort-icon.stories.js","sourceRoot":"","sources":["../../../../src/components/dnn-sort-icon/dnn-sort-icon.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,eAAe;EACX,KAAK,EAAE,oBAAoB;EAC3B,SAAS,EAAE,eAAe;EAC1B,UAAU,EAAE;IACR,KAAK,EAAE,MAAM;IACb,OAAO,EAAE;MACL,OAAO,EAAE,CAAC,aAAa,CAAC;KAC3B;GACJ;EACD,QAAQ,EAAE;IACN,eAAe,EAAE;MACb,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;MAChC,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;OAChB;MACD,YAAY,EAAE,MAAM;KACvB;IACD,gBAAgB,EAAE;MACd,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;MAChC,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;OAChB;MACD,YAAY,EAAE,MAAM;KACvB;IACD,SAAS,EAAE;MACP,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;OAChB;KACJ;IACD,eAAe,EAAE;MACb,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;OAChB;KACJ;IACD,gBAAgB,EAAE;MACd,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;OAChB;KACJ;GACJ;CACI,CAAC;AAEV,MAAM,QAAQ,GAAG,CAAC,IAGjB,EAAE,OAAO,EAAE,EAAE;EAEN,OAAO,IAAI,CAAA;;wBAEK,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;iCAC7B,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC;;SAErD,CAAC;AACN,CAAC,CAAA;AAEL,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG;EACZ,aAAa,EAAE,MAAM;CACxB,CAAC","sourcesContent":["import { html } from \"lit-html\";\r\nimport { Meta } from \"@storybook/web-components\";\r\nimport readme from \"./readme.md\";\r\nimport { ifDefined } from \"lit-html/directives/if-defined\";\r\nimport { injectStyles } from \"../../../.storybook/utilities\";\r\n\r\nexport default {\r\n title: \"Elements/Sort Icon\",\r\n component: 'dnn-sort-icon',\r\n parameters: {\r\n notes: readme,\r\n actions: {\r\n handles: ['sortChanged'],\r\n },\r\n },\r\n argTypes: {\r\n 'sortDirection': {\r\n options: ['asc', 'desc', 'none'],\r\n control: {\r\n type: 'radio',\r\n },\r\n defaultValue: \"none\",\r\n },\r\n 'sort-direction': {\r\n options: ['asc', 'desc', 'none'],\r\n control: {\r\n type: 'radio',\r\n },\r\n defaultValue: \"none\",\r\n },\r\n '--color': {\r\n control: {\r\n type: 'color'\r\n }\r\n },\r\n '--color-hover': {\r\n control: {\r\n type: 'color'\r\n }\r\n },\r\n '--color-sorted': {\r\n control: {\r\n type: 'color'\r\n }\r\n },\r\n },\r\n} as Meta;\r\n\r\nconst Template = (args: {\r\n sortDirection: \"asc\" | \"desc\" | \"none\",\r\n color: string;\r\n}, context) =>\r\n {\r\n return html`\r\n <dnn-sort-icon\r\n style=${ifDefined(injectStyles(args, context))}\r\n .sortDirection=${ifDefined(args.sortDirection)}\r\n />\r\n `;\r\n }\r\n\r\nexport const SortIcon = Template.bind({});\r\nSortIcon.args = {\r\n sortDirection: \"none\",\r\n};"]}
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, State, Method } from "@stencil/core";
|
|
2
|
-
/** Represents a single tab and must be used inside a dnn-tabs element. */
|
|
3
|
-
export class DnnTab {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.visible = false;
|
|
6
|
-
}
|
|
7
|
-
/** Shows the tab. */
|
|
8
|
-
async show() {
|
|
9
|
-
this.visible = true;
|
|
10
|
-
}
|
|
11
|
-
/** Hides the modal */
|
|
12
|
-
async hide() {
|
|
13
|
-
this.visible = false;
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return (h(Host, null, this.visible &&
|
|
17
|
-
h("slot", null)));
|
|
18
|
-
}
|
|
19
|
-
static get is() { return "dnn-tab"; }
|
|
20
|
-
static get encapsulation() { return "shadow"; }
|
|
21
|
-
static get originalStyleUrls() { return {
|
|
22
|
-
"$": ["dnn-tab.scss"]
|
|
23
|
-
}; }
|
|
24
|
-
static get styleUrls() { return {
|
|
25
|
-
"$": ["dnn-tab.css"]
|
|
26
|
-
}; }
|
|
27
|
-
static get properties() { return {
|
|
28
|
-
"tabTitle": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"mutable": false,
|
|
31
|
-
"complexType": {
|
|
32
|
-
"original": "string",
|
|
33
|
-
"resolved": "string",
|
|
34
|
-
"references": {}
|
|
35
|
-
},
|
|
36
|
-
"required": true,
|
|
37
|
-
"optional": false,
|
|
38
|
-
"docs": {
|
|
39
|
-
"tags": [],
|
|
40
|
-
"text": "Defines the tab title."
|
|
41
|
-
},
|
|
42
|
-
"attribute": "tab-title",
|
|
43
|
-
"reflect": false
|
|
44
|
-
}
|
|
45
|
-
}; }
|
|
46
|
-
static get states() { return {
|
|
47
|
-
"visible": {}
|
|
48
|
-
}; }
|
|
49
|
-
static get methods() { return {
|
|
50
|
-
"show": {
|
|
51
|
-
"complexType": {
|
|
52
|
-
"signature": "() => Promise<void>",
|
|
53
|
-
"parameters": [],
|
|
54
|
-
"references": {
|
|
55
|
-
"Promise": {
|
|
56
|
-
"location": "global"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"return": "Promise<void>"
|
|
60
|
-
},
|
|
61
|
-
"docs": {
|
|
62
|
-
"text": "Shows the tab.",
|
|
63
|
-
"tags": []
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"hide": {
|
|
67
|
-
"complexType": {
|
|
68
|
-
"signature": "() => Promise<void>",
|
|
69
|
-
"parameters": [],
|
|
70
|
-
"references": {
|
|
71
|
-
"Promise": {
|
|
72
|
-
"location": "global"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"return": "Promise<void>"
|
|
76
|
-
},
|
|
77
|
-
"docs": {
|
|
78
|
-
"text": "Hides the modal",
|
|
79
|
-
"tags": []
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}; }
|
|
83
|
-
}
|
|
1
|
+
import { Component, Host, h, Prop, State, Method } from "@stencil/core";
|
|
2
|
+
/** Represents a single tab and must be used inside a dnn-tabs element. */
|
|
3
|
+
export class DnnTab {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.visible = false;
|
|
6
|
+
}
|
|
7
|
+
/** Shows the tab. */
|
|
8
|
+
async show() {
|
|
9
|
+
this.visible = true;
|
|
10
|
+
}
|
|
11
|
+
/** Hides the modal */
|
|
12
|
+
async hide() {
|
|
13
|
+
this.visible = false;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, null, this.visible &&
|
|
17
|
+
h("slot", null)));
|
|
18
|
+
}
|
|
19
|
+
static get is() { return "dnn-tab"; }
|
|
20
|
+
static get encapsulation() { return "shadow"; }
|
|
21
|
+
static get originalStyleUrls() { return {
|
|
22
|
+
"$": ["dnn-tab.scss"]
|
|
23
|
+
}; }
|
|
24
|
+
static get styleUrls() { return {
|
|
25
|
+
"$": ["dnn-tab.css"]
|
|
26
|
+
}; }
|
|
27
|
+
static get properties() { return {
|
|
28
|
+
"tabTitle": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"mutable": false,
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "string",
|
|
33
|
+
"resolved": "string",
|
|
34
|
+
"references": {}
|
|
35
|
+
},
|
|
36
|
+
"required": true,
|
|
37
|
+
"optional": false,
|
|
38
|
+
"docs": {
|
|
39
|
+
"tags": [],
|
|
40
|
+
"text": "Defines the tab title."
|
|
41
|
+
},
|
|
42
|
+
"attribute": "tab-title",
|
|
43
|
+
"reflect": false
|
|
44
|
+
}
|
|
45
|
+
}; }
|
|
46
|
+
static get states() { return {
|
|
47
|
+
"visible": {}
|
|
48
|
+
}; }
|
|
49
|
+
static get methods() { return {
|
|
50
|
+
"show": {
|
|
51
|
+
"complexType": {
|
|
52
|
+
"signature": "() => Promise<void>",
|
|
53
|
+
"parameters": [],
|
|
54
|
+
"references": {
|
|
55
|
+
"Promise": {
|
|
56
|
+
"location": "global"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"return": "Promise<void>"
|
|
60
|
+
},
|
|
61
|
+
"docs": {
|
|
62
|
+
"text": "Shows the tab.",
|
|
63
|
+
"tags": []
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"hide": {
|
|
67
|
+
"complexType": {
|
|
68
|
+
"signature": "() => Promise<void>",
|
|
69
|
+
"parameters": [],
|
|
70
|
+
"references": {
|
|
71
|
+
"Promise": {
|
|
72
|
+
"location": "global"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"return": "Promise<void>"
|
|
76
|
+
},
|
|
77
|
+
"docs": {
|
|
78
|
+
"text": "Hides the modal",
|
|
79
|
+
"tags": []
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}; }
|
|
83
|
+
}
|
|
84
84
|
//# sourceMappingURL=dnn-tab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dnn-tab.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"dnn-tab.js","sourceRoot":"","sources":["../../../../src/components/dnn-tab/dnn-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAExE,0EAA0E;AAM1E,MAAM,OAAO,MAAM;EALnB;IASa,YAAO,GAAY,KAAK,CAAC;GAuBrC;EArBG,qBAAqB;EAErB,KAAK,CAAC,IAAI;IACN,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;EACxB,CAAC;EAED,sBAAsB;EAEtB,KAAK,CAAC,IAAI;IACN,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;EACzB,CAAC;EAED,MAAM;IACF,OAAO,CACH,EAAC,IAAI,QACA,IAAI,CAAC,OAAO;MACT,eAAa,CAEd,CACV,CAAC;EACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Host, h, Prop, State, Method } from \"@stencil/core\";\r\n\r\n/** Represents a single tab and must be used inside a dnn-tabs element. */\r\n@Component({\r\n tag: 'dnn-tab',\r\n styleUrl: 'dnn-tab.scss',\r\n shadow: true,\r\n})\r\nexport class DnnTab {\r\n /** Defines the tab title. */\r\n @Prop() tabTitle!: string;\r\n\r\n @State() visible: boolean = false;\r\n\r\n /** Shows the tab. */\r\n @Method()\r\n async show(){\r\n this.visible = true;\r\n }\r\n\r\n /** Hides the modal */\r\n @Method()\r\n async hide(){\r\n this.visible = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n {this.visible &&\r\n <slot></slot>\r\n }\r\n </Host>\r\n );\r\n }\r\n}"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
+
import readme from './readme.md';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Elements/Tab',
|
|
6
|
+
component: 'dnn-tab',
|
|
7
|
+
parameters: {
|
|
8
|
+
notes: readme,
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
'tab-title': {
|
|
12
|
+
control: 'text',
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const Template = (args) => html `
|
|
17
|
+
<dnn-tab
|
|
18
|
+
tab-title=${ifDefined(args.tabTitle)}>
|
|
19
|
+
</dnn-tab>
|
|
20
|
+
`;
|
|
21
|
+
export const Tab = Template.bind({});
|
|
22
|
+
Tab.args = {
|
|
23
|
+
tabTitle: 'My Tab',
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=dnn-tab.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dnn-tab.stories.js","sourceRoot":"","sources":["../../../../src/components/dnn-tab/dnn-tab.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,eAAe;EACX,KAAK,EAAE,cAAc;EACrB,SAAS,EAAE,SAAS;EACpB,UAAU,EAAE;IACR,KAAK,EAAG,MAAM;GACjB;EACD,QAAQ,EAAE;IACN,WAAW,EAAE;MACT,OAAO,EAAE,MAAM;KAClB;GACJ;CACI,CAAC;AAEV,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,CACtB,IAAI,CAAA;;wBAEgB,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;;KAE3C,CAAC;AAEN,MAAM,CAAC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrC,GAAG,CAAC,IAAI,GAAG;EACP,QAAQ,EAAE,QAAQ;CACrB,CAAC","sourcesContent":["import { html } from \"lit-html\";\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { Meta } from \"@storybook/web-components\";\nimport readme from './readme.md';\n\nexport default {\n title: 'Elements/Tab',\n component: 'dnn-tab',\n parameters: {\n notes: readme,\n },\n argTypes: {\n 'tab-title': {\n control: 'text',\n },\n }\n} as Meta;\n\nconst Template = (args) =>\n html`\n <dnn-tab\n tab-title=${ifDefined(args.tabTitle)}>\n </dnn-tab>\n `;\n\nexport const Tab = Template.bind({});\nTab.args = {\n tabTitle: 'My Tab',\n};\n"]}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { Component, Host, h, State } from "@stencil/core";
|
|
2
|
-
export class DnnTabs {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.tabTitles = [];
|
|
5
|
-
this.selectedTabTitle = "";
|
|
6
|
-
}
|
|
7
|
-
componentDidLoad() {
|
|
8
|
-
requestAnimationFrame(() => {
|
|
9
|
-
this.updateTitles();
|
|
10
|
-
this.showFirstTab();
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
getTabs() {
|
|
14
|
-
return this.component.shadowRoot.querySelector("slot").assignedElements();
|
|
15
|
-
}
|
|
16
|
-
updateTitles() {
|
|
17
|
-
const tabs = this.getTabs();
|
|
18
|
-
tabs.forEach(tab => this.tabTitles = [...this.tabTitles, tab.tabTitle]);
|
|
19
|
-
}
|
|
20
|
-
showFirstTab() {
|
|
21
|
-
const tab = this.getTabs()[0];
|
|
22
|
-
tab.show();
|
|
23
|
-
this.selectedTabTitle = tab.tabTitle;
|
|
24
|
-
}
|
|
25
|
-
showTab(tabTitle) {
|
|
26
|
-
const tabs = this.getTabs();
|
|
27
|
-
tabs.forEach(tab => {
|
|
28
|
-
if (tab.tabTitle == tabTitle) {
|
|
29
|
-
tab.show();
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
tab.hide();
|
|
33
|
-
});
|
|
34
|
-
this.selectedTabTitle = tabTitle;
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return (h(Host, { ref: el => this.component = el },
|
|
38
|
-
h("div", { class: "tabTitles" }, this.tabTitles.map(tabTitle => h("button", { class: this.selectedTabTitle == tabTitle ? "visible" : "", onClick: () => this.showTab(tabTitle) }, tabTitle))),
|
|
39
|
-
h("div", { class: "currentTab" },
|
|
40
|
-
h("slot", null))));
|
|
41
|
-
}
|
|
42
|
-
static get is() { return "dnn-tabs"; }
|
|
43
|
-
static get encapsulation() { return "shadow"; }
|
|
44
|
-
static get originalStyleUrls() { return {
|
|
45
|
-
"$": ["dnn-tabs.scss"]
|
|
46
|
-
}; }
|
|
47
|
-
static get styleUrls() { return {
|
|
48
|
-
"$": ["dnn-tabs.css"]
|
|
49
|
-
}; }
|
|
50
|
-
static get states() { return {
|
|
51
|
-
"tabTitles": {},
|
|
52
|
-
"selectedTabTitle": {}
|
|
53
|
-
}; }
|
|
54
|
-
}
|
|
1
|
+
import { Component, Host, h, State } from "@stencil/core";
|
|
2
|
+
export class DnnTabs {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.tabTitles = [];
|
|
5
|
+
this.selectedTabTitle = "";
|
|
6
|
+
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
requestAnimationFrame(() => {
|
|
9
|
+
this.updateTitles();
|
|
10
|
+
this.showFirstTab();
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
getTabs() {
|
|
14
|
+
return this.component.shadowRoot.querySelector("slot").assignedElements();
|
|
15
|
+
}
|
|
16
|
+
updateTitles() {
|
|
17
|
+
const tabs = this.getTabs();
|
|
18
|
+
tabs.forEach(tab => this.tabTitles = [...this.tabTitles, tab.tabTitle]);
|
|
19
|
+
}
|
|
20
|
+
showFirstTab() {
|
|
21
|
+
const tab = this.getTabs()[0];
|
|
22
|
+
tab.show();
|
|
23
|
+
this.selectedTabTitle = tab.tabTitle;
|
|
24
|
+
}
|
|
25
|
+
showTab(tabTitle) {
|
|
26
|
+
const tabs = this.getTabs();
|
|
27
|
+
tabs.forEach(tab => {
|
|
28
|
+
if (tab.tabTitle == tabTitle) {
|
|
29
|
+
tab.show();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
tab.hide();
|
|
33
|
+
});
|
|
34
|
+
this.selectedTabTitle = tabTitle;
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (h(Host, { ref: el => this.component = el },
|
|
38
|
+
h("div", { class: "tabTitles" }, this.tabTitles.map(tabTitle => h("button", { class: this.selectedTabTitle == tabTitle ? "visible" : "", onClick: () => this.showTab(tabTitle) }, tabTitle))),
|
|
39
|
+
h("div", { class: "currentTab" },
|
|
40
|
+
h("slot", null))));
|
|
41
|
+
}
|
|
42
|
+
static get is() { return "dnn-tabs"; }
|
|
43
|
+
static get encapsulation() { return "shadow"; }
|
|
44
|
+
static get originalStyleUrls() { return {
|
|
45
|
+
"$": ["dnn-tabs.scss"]
|
|
46
|
+
}; }
|
|
47
|
+
static get styleUrls() { return {
|
|
48
|
+
"$": ["dnn-tabs.css"]
|
|
49
|
+
}; }
|
|
50
|
+
static get states() { return {
|
|
51
|
+
"tabTitles": {},
|
|
52
|
+
"selectedTabTitle": {}
|
|
53
|
+
}; }
|
|
54
|
+
}
|
|
55
55
|
//# sourceMappingURL=dnn-tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dnn-tabs.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"dnn-tabs.js","sourceRoot":"","sources":["../../../../src/components/dnn-tabs/dnn-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAO1D,MAAM,OAAO,OAAO;EALpB;IAQa,cAAS,GAAa,EAAE,CAAC;IACzB,qBAAgB,GAAW,EAAE,CAAC;GAwD1C;EAtDG,gBAAgB;IACZ,qBAAqB,CAAC,GAAG,EAAE;MACvB,IAAI,CAAC,YAAY,EAAE,CAAC;MACpB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;EACP,CAAC;EAEO,OAAO;IACX,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAyB,CAAC;EACrG,CAAC;EAEO,YAAY;IAChB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;EAC5E,CAAC;EAEO,YAAY;IAChB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9B,GAAG,CAAC,IAAI,EAAE,CAAC;IACX,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC,QAAQ,CAAC;EACzC,CAAC;EAEO,OAAO,CAAC,QAAgB;IAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;MACf,IAAI,GAAG,CAAC,QAAQ,IAAI,QAAQ,EAAC;QACzB,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,OAAO;OACV;MAED,GAAG,CAAC,IAAI,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;EACrC,CAAC;EAED,MAAM;IACF,OAAO,CACH,EAAC,IAAI,IAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE;MAChC,WAAK,KAAK,EAAC,WAAW,IACjB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAC3B,cACI,KAAK,EAAE,IAAI,CAAC,gBAAgB,IAAI,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAA,CAAC,CAAC,EAAE,EACxD,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAEpC,QAAQ,CACJ,CACZ,CACC;MACN,WAAK,KAAK,EAAC,YAAY;QACnB,eAAa,CACX,CACH,CACV,CAAC;EACN,CAAC;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Host, h, State } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: 'dnn-tabs',\r\n styleUrl: 'dnn-tabs.scss',\r\n shadow: true,\r\n})\r\nexport class DnnTabs {\r\n private component: HTMLElement;\r\n\r\n @State() tabTitles: string[] = [];\r\n @State() selectedTabTitle: string = \"\";\r\n\r\n componentDidLoad(){\r\n requestAnimationFrame(() => {\r\n this.updateTitles();\r\n this.showFirstTab();\r\n });\r\n }\r\n\r\n private getTabs() {\r\n return this.component.shadowRoot.querySelector(\"slot\").assignedElements() as HTMLDnnTabElement[];\r\n }\r\n\r\n private updateTitles(){\r\n const tabs = this.getTabs();\r\n tabs.forEach(tab => this.tabTitles = [...this.tabTitles, tab.tabTitle]);\r\n }\r\n\r\n private showFirstTab(){\r\n const tab = this.getTabs()[0];\r\n tab.show();\r\n this.selectedTabTitle = tab.tabTitle;\r\n }\r\n\r\n private showTab(tabTitle: string) {\r\n const tabs = this.getTabs();\r\n tabs.forEach(tab => {\r\n if (tab.tabTitle == tabTitle){\r\n tab.show();\r\n return;\r\n }\r\n\r\n tab.hide();\r\n });\r\n this.selectedTabTitle = tabTitle;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host ref={el => this.component = el}>\r\n <div class=\"tabTitles\">\r\n {this.tabTitles.map(tabTitle =>\r\n <button\r\n class={this.selectedTabTitle == tabTitle ? \"visible\": \"\"}\r\n onClick={() => this.showTab(tabTitle)}\r\n >\r\n {tabTitle}\r\n </button>\r\n )}\r\n </div>\r\n <div class=\"currentTab\">\r\n <slot></slot>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}"]}
|