jebamo 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/index-d5fa9014.js +1722 -0
- package/dist/cjs/index-d5fa9014.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/je-alert_31.cjs.entry.js +4772 -0
- package/dist/cjs/je-alert_31.cjs.entry.js.map +1 -0
- package/dist/cjs/je-branch.cjs.entry.js +22 -0
- package/dist/cjs/je-branch.cjs.entry.js.map +1 -0
- package/dist/cjs/je-column-group.cjs.entry.js +29 -0
- package/dist/cjs/je-column-group.cjs.entry.js.map +1 -0
- package/dist/cjs/je-column.cjs.entry.js +73 -0
- package/dist/cjs/je-column.cjs.entry.js.map +1 -0
- package/dist/cjs/je-infinite.cjs.entry.js +45 -0
- package/dist/cjs/je-infinite.cjs.entry.js.map +1 -0
- package/dist/cjs/je-menu-option.cjs.entry.js +22 -0
- package/dist/cjs/je-menu-option.cjs.entry.js.map +1 -0
- package/dist/cjs/je-menu.cjs.entry.js +22 -0
- package/dist/cjs/je-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/je-tab.cjs.entry.js +22 -0
- package/dist/cjs/je-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/je-tabs.cjs.entry.js +22 -0
- package/dist/cjs/je-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/je-toast.cjs.entry.js +22 -0
- package/dist/cjs/je-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/je-tree.cjs.entry.js +22 -0
- package/dist/cjs/je-tree.cjs.entry.js.map +1 -0
- package/dist/cjs/jebamo.cjs.js +27 -0
- package/dist/cjs/jebamo.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +52 -0
- package/dist/collection/components/checkbox-group/je-checkbox-group/je-checkbox-group.css +10 -0
- package/dist/collection/components/checkbox-group/je-checkbox-group/je-checkbox-group.js +141 -0
- package/dist/collection/components/checkbox-group/je-checkbox-group/je-checkbox-group.js.map +1 -0
- package/dist/collection/components/checkbox-group/je-checkbox-option/je-checkbox-option.css +13 -0
- package/dist/collection/components/checkbox-group/je-checkbox-option/je-checkbox-option.js +153 -0
- package/dist/collection/components/checkbox-group/je-checkbox-option/je-checkbox-option.js.map +1 -0
- package/dist/collection/components/column/je-column/je-column.css +10 -0
- package/dist/collection/components/column/je-column/je-column.js +187 -0
- package/dist/collection/components/column/je-column/je-column.js.map +1 -0
- package/dist/collection/components/column/je-column-group/je-column-group.css +4 -0
- package/dist/collection/components/column/je-column-group/je-column-group.js +49 -0
- package/dist/collection/components/column/je-column-group/je-column-group.js.map +1 -0
- package/dist/collection/components/je-alert/je-alert.css +84 -0
- package/dist/collection/components/je-alert/je-alert.js +339 -0
- package/dist/collection/components/je-alert/je-alert.js.map +1 -0
- package/dist/collection/components/je-button/je-button.css +180 -0
- package/dist/collection/components/je-button/je-button.js +252 -0
- package/dist/collection/components/je-button/je-button.js.map +1 -0
- package/dist/collection/components/je-card/je-card.css +113 -0
- package/dist/collection/components/je-card/je-card.js +67 -0
- package/dist/collection/components/je-card/je-card.js.map +1 -0
- package/dist/collection/components/je-checkbox/je-checkbox.css +14 -0
- package/dist/collection/components/je-checkbox/je-checkbox.js +191 -0
- package/dist/collection/components/je-checkbox/je-checkbox.js.map +1 -0
- package/dist/collection/components/je-color/je-color.css +39 -0
- package/dist/collection/components/je-color/je-color.js +116 -0
- package/dist/collection/components/je-color/je-color.js.map +1 -0
- package/dist/collection/components/je-datepicker/je-datepicker.css +56 -0
- package/dist/collection/components/je-datepicker/je-datepicker.js +129 -0
- package/dist/collection/components/je-datepicker/je-datepicker.js.map +1 -0
- package/dist/collection/components/je-details/je-details.css +39 -0
- package/dist/collection/components/je-details/je-details.js +63 -0
- package/dist/collection/components/je-details/je-details.js.map +1 -0
- package/dist/collection/components/je-divider/je-divider.css +32 -0
- package/dist/collection/components/je-divider/je-divider.js +63 -0
- package/dist/collection/components/je-divider/je-divider.js.map +1 -0
- package/dist/collection/components/je-drawer/je-drawer.css +51 -0
- package/dist/collection/components/je-drawer/je-drawer.js +71 -0
- package/dist/collection/components/je-drawer/je-drawer.js.map +1 -0
- package/dist/collection/components/je-dropzone/je-dropzone.css +21 -0
- package/dist/collection/components/je-dropzone/je-dropzone.js +86 -0
- package/dist/collection/components/je-dropzone/je-dropzone.js.map +1 -0
- package/dist/collection/components/je-form/je-form.css +12 -0
- package/dist/collection/components/je-form/je-form.js +95 -0
- package/dist/collection/components/je-form/je-form.js.map +1 -0
- package/dist/collection/components/je-icon/je-icon.css +60 -0
- package/dist/collection/components/je-icon/je-icon.js +122 -0
- package/dist/collection/components/je-icon/je-icon.js.map +1 -0
- package/dist/collection/components/je-infinite/je-infinite.css +18 -0
- package/dist/collection/components/je-infinite/je-infinite.js +119 -0
- package/dist/collection/components/je-infinite/je-infinite.js.map +1 -0
- package/dist/collection/components/je-input/je-input.css +96 -0
- package/dist/collection/components/je-input/je-input.js +862 -0
- package/dist/collection/components/je-input/je-input.js.map +1 -0
- package/dist/collection/components/je-link/je-link.css +15 -0
- package/dist/collection/components/je-link/je-link.js +207 -0
- package/dist/collection/components/je-link/je-link.js.map +1 -0
- package/dist/collection/components/je-loading/je-loading.css +50 -0
- package/dist/collection/components/je-loading/je-loading.js +48 -0
- package/dist/collection/components/je-loading/je-loading.js.map +1 -0
- package/dist/collection/components/je-modal/je-modal.css +75 -0
- package/dist/collection/components/je-modal/je-modal.js +220 -0
- package/dist/collection/components/je-modal/je-modal.js.map +1 -0
- package/dist/collection/components/je-page/je-page.css +202 -0
- package/dist/collection/components/je-page/je-page.js +129 -0
- package/dist/collection/components/je-page/je-page.js.map +1 -0
- package/dist/collection/components/je-pill/je-pill.css +43 -0
- package/dist/collection/components/je-pill/je-pill.js +82 -0
- package/dist/collection/components/je-pill/je-pill.js.map +1 -0
- package/dist/collection/components/je-placeholder/je-placeholder.css +39 -0
- package/dist/collection/components/je-placeholder/je-placeholder.js +44 -0
- package/dist/collection/components/je-placeholder/je-placeholder.js.map +1 -0
- package/dist/collection/components/je-popover/je-popover.css +60 -0
- package/dist/collection/components/je-popover/je-popover.js +499 -0
- package/dist/collection/components/je-popover/je-popover.js.map +1 -0
- package/dist/collection/components/je-textarea/je-textarea.css +59 -0
- package/dist/collection/components/je-textarea/je-textarea.js +171 -0
- package/dist/collection/components/je-textarea/je-textarea.js.map +1 -0
- package/dist/collection/components/je-toast/je-toast.css +3 -0
- package/dist/collection/components/je-toast/je-toast.js +19 -0
- package/dist/collection/components/je-toast/je-toast.js.map +1 -0
- package/dist/collection/components/je-toggle/je-toggle.css +48 -0
- package/dist/collection/components/je-toggle/je-toggle.js +105 -0
- package/dist/collection/components/je-toggle/je-toggle.js.map +1 -0
- package/dist/collection/components/je-toolbar/je-toolbar.css +16 -0
- package/dist/collection/components/je-toolbar/je-toolbar.js +19 -0
- package/dist/collection/components/je-toolbar/je-toolbar.js.map +1 -0
- package/dist/collection/components/menu/je-menu/je-menu.css +3 -0
- package/dist/collection/components/menu/je-menu/je-menu.js +19 -0
- package/dist/collection/components/menu/je-menu/je-menu.js.map +1 -0
- package/dist/collection/components/menu/je-menu-option/je-menu-option.css +3 -0
- package/dist/collection/components/menu/je-menu-option/je-menu-option.js +19 -0
- package/dist/collection/components/menu/je-menu-option/je-menu-option.js.map +1 -0
- package/dist/collection/components/multiselect/je-multiselect/je-multiselect.css +79 -0
- package/dist/collection/components/multiselect/je-multiselect/je-multiselect.js +244 -0
- package/dist/collection/components/multiselect/je-multiselect/je-multiselect.js.map +1 -0
- package/dist/collection/components/multiselect/je-multiselect-option/je-multiselect-option.css +31 -0
- package/dist/collection/components/multiselect/je-multiselect-option/je-multiselect-option.js +122 -0
- package/dist/collection/components/multiselect/je-multiselect-option/je-multiselect-option.js.map +1 -0
- package/dist/collection/components/radio/je-radio/je-radio.css +13 -0
- package/dist/collection/components/radio/je-radio/je-radio.js +128 -0
- package/dist/collection/components/radio/je-radio/je-radio.js.map +1 -0
- package/dist/collection/components/radio/je-radio-group/je-radio-group.css +10 -0
- package/dist/collection/components/radio/je-radio-group/je-radio-group.js +172 -0
- package/dist/collection/components/radio/je-radio-group/je-radio-group.js.map +1 -0
- package/dist/collection/components/select/je-select/je-select.css +20 -0
- package/dist/collection/components/select/je-select/je-select.js +289 -0
- package/dist/collection/components/select/je-select/je-select.js.map +1 -0
- package/dist/collection/components/select/je-select-option/je-select-option.css +31 -0
- package/dist/collection/components/select/je-select-option/je-select-option.js +102 -0
- package/dist/collection/components/select/je-select-option/je-select-option.js.map +1 -0
- package/dist/collection/components/tabs/je-tab/je-tab.css +3 -0
- package/dist/collection/components/tabs/je-tab/je-tab.js +19 -0
- package/dist/collection/components/tabs/je-tab/je-tab.js.map +1 -0
- package/dist/collection/components/tabs/je-tabs/je-tabs.css +3 -0
- package/dist/collection/components/tabs/je-tabs/je-tabs.js +19 -0
- package/dist/collection/components/tabs/je-tabs/je-tabs.js.map +1 -0
- package/dist/collection/components/tree/je-branch/je-branch.css +3 -0
- package/dist/collection/components/tree/je-branch/je-branch.js +19 -0
- package/dist/collection/components/tree/je-branch/je-branch.js.map +1 -0
- package/dist/collection/components/tree/je-tree/je-tree.css +3 -0
- package/dist/collection/components/tree/je-tree/je-tree.js +19 -0
- package/dist/collection/components/tree/je-tree/je-tree.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/utils.js +18 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/je-alert.d.ts +11 -0
- package/dist/components/je-alert.js +146 -0
- package/dist/components/je-alert.js.map +1 -0
- package/dist/components/je-branch.d.ts +11 -0
- package/dist/components/je-branch.js +37 -0
- package/dist/components/je-branch.js.map +1 -0
- package/dist/components/je-button.d.ts +11 -0
- package/dist/components/je-button.js +8 -0
- package/dist/components/je-button.js.map +1 -0
- package/dist/components/je-card.d.ts +11 -0
- package/dist/components/je-card.js +8 -0
- package/dist/components/je-card.js.map +1 -0
- package/dist/components/je-checkbox-group.d.ts +11 -0
- package/dist/components/je-checkbox-group.js +90 -0
- package/dist/components/je-checkbox-group.js.map +1 -0
- package/dist/components/je-checkbox-option.d.ts +11 -0
- package/dist/components/je-checkbox-option.js +65 -0
- package/dist/components/je-checkbox-option.js.map +1 -0
- package/dist/components/je-checkbox.d.ts +11 -0
- package/dist/components/je-checkbox.js +83 -0
- package/dist/components/je-checkbox.js.map +1 -0
- package/dist/components/je-color.d.ts +11 -0
- package/dist/components/je-color.js +8 -0
- package/dist/components/je-color.js.map +1 -0
- package/dist/components/je-column-group.d.ts +11 -0
- package/dist/components/je-column-group.js +46 -0
- package/dist/components/je-column-group.js.map +1 -0
- package/dist/components/je-column.d.ts +11 -0
- package/dist/components/je-column.js +95 -0
- package/dist/components/je-column.js.map +1 -0
- package/dist/components/je-datepicker.d.ts +11 -0
- package/dist/components/je-datepicker.js +3249 -0
- package/dist/components/je-datepicker.js.map +1 -0
- package/dist/components/je-details.d.ts +11 -0
- package/dist/components/je-details.js +49 -0
- package/dist/components/je-details.js.map +1 -0
- package/dist/components/je-divider.d.ts +11 -0
- package/dist/components/je-divider.js +42 -0
- package/dist/components/je-divider.js.map +1 -0
- package/dist/components/je-drawer.d.ts +11 -0
- package/dist/components/je-drawer.js +60 -0
- package/dist/components/je-drawer.js.map +1 -0
- package/dist/components/je-dropzone.d.ts +11 -0
- package/dist/components/je-dropzone.js +55 -0
- package/dist/components/je-dropzone.js.map +1 -0
- package/dist/components/je-form.d.ts +11 -0
- package/dist/components/je-form.js +8 -0
- package/dist/components/je-form.js.map +1 -0
- package/dist/components/je-icon.d.ts +11 -0
- package/dist/components/je-icon.js +8 -0
- package/dist/components/je-icon.js.map +1 -0
- package/dist/components/je-infinite.d.ts +11 -0
- package/dist/components/je-infinite.js +64 -0
- package/dist/components/je-infinite.js.map +1 -0
- package/dist/components/je-input.d.ts +11 -0
- package/dist/components/je-input.js +8 -0
- package/dist/components/je-input.js.map +1 -0
- package/dist/components/je-link.d.ts +11 -0
- package/dist/components/je-link.js +62 -0
- package/dist/components/je-link.js.map +1 -0
- package/dist/components/je-loading.d.ts +11 -0
- package/dist/components/je-loading.js +66 -0
- package/dist/components/je-loading.js.map +1 -0
- package/dist/components/je-menu-option.d.ts +11 -0
- package/dist/components/je-menu-option.js +37 -0
- package/dist/components/je-menu-option.js.map +1 -0
- package/dist/components/je-menu.d.ts +11 -0
- package/dist/components/je-menu.js +37 -0
- package/dist/components/je-menu.js.map +1 -0
- package/dist/components/je-modal.d.ts +11 -0
- package/dist/components/je-modal.js +104 -0
- package/dist/components/je-modal.js.map +1 -0
- package/dist/components/je-multiselect-option.d.ts +11 -0
- package/dist/components/je-multiselect-option.js +62 -0
- package/dist/components/je-multiselect-option.js.map +1 -0
- package/dist/components/je-multiselect.d.ts +11 -0
- package/dist/components/je-multiselect.js +146 -0
- package/dist/components/je-multiselect.js.map +1 -0
- package/dist/components/je-page.d.ts +11 -0
- package/dist/components/je-page.js +61 -0
- package/dist/components/je-page.js.map +1 -0
- package/dist/components/je-pill.d.ts +11 -0
- package/dist/components/je-pill.js +8 -0
- package/dist/components/je-pill.js.map +1 -0
- package/dist/components/je-placeholder.d.ts +11 -0
- package/dist/components/je-placeholder.js +40 -0
- package/dist/components/je-placeholder.js.map +1 -0
- package/dist/components/je-popover.d.ts +11 -0
- package/dist/components/je-popover.js +8 -0
- package/dist/components/je-popover.js.map +1 -0
- package/dist/components/je-radio-group.d.ts +11 -0
- package/dist/components/je-radio-group.js +92 -0
- package/dist/components/je-radio-group.js.map +1 -0
- package/dist/components/je-radio.d.ts +11 -0
- package/dist/components/je-radio.js +68 -0
- package/dist/components/je-radio.js.map +1 -0
- package/dist/components/je-select-option.d.ts +11 -0
- package/dist/components/je-select-option.js +56 -0
- package/dist/components/je-select-option.js.map +1 -0
- package/dist/components/je-select.d.ts +11 -0
- package/dist/components/je-select.js +208 -0
- package/dist/components/je-select.js.map +1 -0
- package/dist/components/je-tab.d.ts +11 -0
- package/dist/components/je-tab.js +37 -0
- package/dist/components/je-tab.js.map +1 -0
- package/dist/components/je-tabs.d.ts +11 -0
- package/dist/components/je-tabs.js +37 -0
- package/dist/components/je-tabs.js.map +1 -0
- package/dist/components/je-textarea.d.ts +11 -0
- package/dist/components/je-textarea.js +55 -0
- package/dist/components/je-textarea.js.map +1 -0
- package/dist/components/je-toast.d.ts +11 -0
- package/dist/components/je-toast.js +37 -0
- package/dist/components/je-toast.js.map +1 -0
- package/dist/components/je-toggle.d.ts +11 -0
- package/dist/components/je-toggle.js +57 -0
- package/dist/components/je-toggle.js.map +1 -0
- package/dist/components/je-toolbar.d.ts +11 -0
- package/dist/components/je-toolbar.js +37 -0
- package/dist/components/je-toolbar.js.map +1 -0
- package/dist/components/je-tree.d.ts +11 -0
- package/dist/components/je-tree.js +37 -0
- package/dist/components/je-tree.js.map +1 -0
- package/dist/components/p-1f3759e7.js +41 -0
- package/dist/components/p-1f3759e7.js.map +1 -0
- package/dist/components/p-243cc91b.js +50 -0
- package/dist/components/p-243cc91b.js.map +1 -0
- package/dist/components/p-2df369c4.js +265 -0
- package/dist/components/p-2df369c4.js.map +1 -0
- package/dist/components/p-41492a72.js +1514 -0
- package/dist/components/p-41492a72.js.map +1 -0
- package/dist/components/p-4b8ae8ef.js +51 -0
- package/dist/components/p-4b8ae8ef.js.map +1 -0
- package/dist/components/p-5dee004d.js +246 -0
- package/dist/components/p-5dee004d.js.map +1 -0
- package/dist/components/p-8401b4e4.js +48 -0
- package/dist/components/p-8401b4e4.js.map +1 -0
- package/dist/components/p-94327b0d.js +39 -0
- package/dist/components/p-94327b0d.js.map +1 -0
- package/dist/components/p-aa4caa39.js +76 -0
- package/dist/components/p-aa4caa39.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/index-a65634db.js +1692 -0
- package/dist/esm/index-a65634db.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/je-alert_31.entry.js +4738 -0
- package/dist/esm/je-alert_31.entry.js.map +1 -0
- package/dist/esm/je-branch.entry.js +18 -0
- package/dist/esm/je-branch.entry.js.map +1 -0
- package/dist/esm/je-column-group.entry.js +25 -0
- package/dist/esm/je-column-group.entry.js.map +1 -0
- package/dist/esm/je-column.entry.js +69 -0
- package/dist/esm/je-column.entry.js.map +1 -0
- package/dist/esm/je-infinite.entry.js +41 -0
- package/dist/esm/je-infinite.entry.js.map +1 -0
- package/dist/esm/je-menu-option.entry.js +18 -0
- package/dist/esm/je-menu-option.entry.js.map +1 -0
- package/dist/esm/je-menu.entry.js +18 -0
- package/dist/esm/je-menu.entry.js.map +1 -0
- package/dist/esm/je-tab.entry.js +18 -0
- package/dist/esm/je-tab.entry.js.map +1 -0
- package/dist/esm/je-tabs.entry.js +18 -0
- package/dist/esm/je-tabs.entry.js.map +1 -0
- package/dist/esm/je-toast.entry.js +18 -0
- package/dist/esm/je-toast.entry.js.map +1 -0
- package/dist/esm/je-tree.entry.js +18 -0
- package/dist/esm/je-tree.entry.js.map +1 -0
- package/dist/esm/jebamo.js +22 -0
- package/dist/esm/jebamo.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/jebamo/index.esm.js +2 -0
- package/dist/jebamo/index.esm.js.map +1 -0
- package/dist/jebamo/jebamo.esm.js +2 -0
- package/dist/jebamo/jebamo.esm.js.map +1 -0
- package/dist/jebamo/p-0d0cb311.entry.js +2 -0
- package/dist/jebamo/p-0d0cb311.entry.js.map +1 -0
- package/dist/jebamo/p-254ac389.entry.js +2 -0
- package/dist/jebamo/p-254ac389.entry.js.map +1 -0
- package/dist/jebamo/p-286807aa.entry.js +2 -0
- package/dist/jebamo/p-286807aa.entry.js.map +1 -0
- package/dist/jebamo/p-44735e2f.entry.js +2 -0
- package/dist/jebamo/p-44735e2f.entry.js.map +1 -0
- package/dist/jebamo/p-456b52ee.js +3 -0
- package/dist/jebamo/p-456b52ee.js.map +1 -0
- package/dist/jebamo/p-5b8d9daf.entry.js +2 -0
- package/dist/jebamo/p-5b8d9daf.entry.js.map +1 -0
- package/dist/jebamo/p-c519a7a4.entry.js +2 -0
- package/dist/jebamo/p-c519a7a4.entry.js.map +1 -0
- package/dist/jebamo/p-c6111d19.entry.js +2 -0
- package/dist/jebamo/p-c6111d19.entry.js.map +1 -0
- package/dist/jebamo/p-c8615128.entry.js +2 -0
- package/dist/jebamo/p-c8615128.entry.js.map +1 -0
- package/dist/jebamo/p-e1255160.js +2 -0
- package/dist/jebamo/p-e1255160.js.map +1 -0
- package/dist/jebamo/p-e330c9bb.entry.js +2 -0
- package/dist/jebamo/p-e330c9bb.entry.js.map +1 -0
- package/dist/jebamo/p-f6e777be.entry.js +2 -0
- package/dist/jebamo/p-f6e777be.entry.js.map +1 -0
- package/dist/jebamo/p-ff27b55f.entry.js +2 -0
- package/dist/jebamo/p-ff27b55f.entry.js.map +1 -0
- package/dist/types/components/checkbox-group/je-checkbox-group/je-checkbox-group.d.ts +25 -0
- package/dist/types/components/checkbox-group/je-checkbox-option/je-checkbox-option.d.ts +30 -0
- package/dist/types/components/column/je-column/je-column.d.ts +31 -0
- package/dist/types/components/column/je-column-group/je-column-group.d.ts +9 -0
- package/dist/types/components/je-alert/je-alert.d.ts +77 -0
- package/dist/types/components/je-button/je-button.d.ts +28 -0
- package/dist/types/components/je-card/je-card.d.ts +6 -0
- package/dist/types/components/je-checkbox/je-checkbox.d.ts +38 -0
- package/dist/types/components/je-color/je-color.d.ts +12 -0
- package/dist/types/components/je-datepicker/je-datepicker.d.ts +18 -0
- package/dist/types/components/je-details/je-details.d.ts +6 -0
- package/dist/types/components/je-divider/je-divider.d.ts +5 -0
- package/dist/types/components/je-drawer/je-drawer.d.ts +10 -0
- package/dist/types/components/je-dropzone/je-dropzone.d.ts +10 -0
- package/dist/types/components/je-form/je-form.d.ts +12 -0
- package/dist/types/components/je-icon/je-icon.d.ts +15 -0
- package/dist/types/components/je-infinite/je-infinite.d.ts +25 -0
- package/dist/types/components/je-input/je-input.d.ts +155 -0
- package/dist/types/components/je-link/je-link.d.ts +22 -0
- package/dist/types/components/je-loading/je-loading.d.ts +22 -0
- package/dist/types/components/je-modal/je-modal.d.ts +28 -0
- package/dist/types/components/je-page/je-page.d.ts +12 -0
- package/dist/types/components/je-pill/je-pill.d.ts +6 -0
- package/dist/types/components/je-placeholder/je-placeholder.d.ts +7 -0
- package/dist/types/components/je-popover/je-popover.d.ts +70 -0
- package/dist/types/components/je-textarea/je-textarea.d.ts +11 -0
- package/dist/types/components/je-toast/je-toast.d.ts +3 -0
- package/dist/types/components/je-toggle/je-toggle.d.ts +18 -0
- package/dist/types/components/je-toolbar/je-toolbar.d.ts +3 -0
- package/dist/types/components/menu/je-menu/je-menu.d.ts +3 -0
- package/dist/types/components/menu/je-menu-option/je-menu-option.d.ts +3 -0
- package/dist/types/components/multiselect/je-multiselect/je-multiselect.d.ts +27 -0
- package/dist/types/components/multiselect/je-multiselect-option/je-multiselect-option.d.ts +11 -0
- package/dist/types/components/radio/je-radio/je-radio.d.ts +25 -0
- package/dist/types/components/radio/je-radio-group/je-radio-group.d.ts +32 -0
- package/dist/types/components/select/je-select/je-select.d.ts +23 -0
- package/dist/types/components/select/je-select-option/je-select-option.d.ts +10 -0
- package/dist/types/components/tabs/je-tab/je-tab.d.ts +3 -0
- package/dist/types/components/tabs/je-tabs/je-tabs.d.ts +3 -0
- package/dist/types/components/tree/je-branch/je-branch.d.ts +3 -0
- package/dist/types/components/tree/je-tree/je-tree.d.ts +3 -0
- package/dist/types/components.d.ts +1846 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/utils.d.ts +4 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +31 -26
- package/readme.md +114 -0
- package/README.md +0 -24
- package/esm2020/jebamo.mjs +0 -5
- package/esm2020/lib/jebamo.component.mjs +0 -19
- package/esm2020/lib/jebamo.module.mjs +0 -21
- package/esm2020/lib/jebamo.service.mjs +0 -14
- package/esm2020/public-api.mjs +0 -7
- package/fesm2015/jebamo.mjs +0 -60
- package/fesm2015/jebamo.mjs.map +0 -1
- package/fesm2020/jebamo.mjs +0 -60
- package/fesm2020/jebamo.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/jebamo.component.d.ts +0 -5
- package/lib/jebamo.module.d.ts +0 -7
- package/lib/jebamo.service.d.ts +0 -6
- package/public-api.d.ts +0 -3
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class JeRadioGroup {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = undefined;
|
|
5
|
+
this.value = undefined;
|
|
6
|
+
this.readonly = false;
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
}
|
|
9
|
+
componentWillLoad() {
|
|
10
|
+
if (this.label) {
|
|
11
|
+
this.el.setAttribute('name', this.label);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
componentDidLoad() {
|
|
15
|
+
this.originalValue = this.value;
|
|
16
|
+
if (this.value) {
|
|
17
|
+
const radios = this.getRadios();
|
|
18
|
+
for (let item of radios) {
|
|
19
|
+
if (item.value === this.value) {
|
|
20
|
+
item.selected = true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
formResetCallback() {
|
|
26
|
+
if (this.value !== this.originalValue) {
|
|
27
|
+
this.value = this.originalValue;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
getRadios() {
|
|
31
|
+
const elements = this.el.querySelectorAll('je-radio');
|
|
32
|
+
return Array.from(elements);
|
|
33
|
+
}
|
|
34
|
+
handleValueChange() {
|
|
35
|
+
this.valueChange.emit(this.value);
|
|
36
|
+
const radios = this.getRadios();
|
|
37
|
+
for (let radio of radios) {
|
|
38
|
+
if (radio.value !== this.value && radio.selected !== false)
|
|
39
|
+
radio.selected = false;
|
|
40
|
+
else if (radio.value === this.value && radio.selected !== true)
|
|
41
|
+
radio.selected = true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
handleNewValue(ev) {
|
|
45
|
+
this.value = ev.detail;
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
return (h(Host, { key: '70e9947ae0ea7b3747ef0470b0ce0e9491f43129' }, this.label && h("label", { key: 'db3fec8de716f25e8a8cf6dcbcd0d272417940f2' }, this.label), h("slot", { key: 'c2a03fa6a99928087f2815e51e47ab1eb61dcaa8' })));
|
|
49
|
+
}
|
|
50
|
+
static get is() { return "je-radio-group"; }
|
|
51
|
+
static get encapsulation() { return "shadow"; }
|
|
52
|
+
static get formAssociated() { return true; }
|
|
53
|
+
static get originalStyleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["je-radio-group.scss"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get styleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["je-radio-group.css"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get properties() {
|
|
64
|
+
return {
|
|
65
|
+
"label": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "string",
|
|
70
|
+
"resolved": "string",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": true,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": "Label that shows above the controls"
|
|
78
|
+
},
|
|
79
|
+
"attribute": "label",
|
|
80
|
+
"reflect": false
|
|
81
|
+
},
|
|
82
|
+
"value": {
|
|
83
|
+
"type": "any",
|
|
84
|
+
"mutable": true,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "any",
|
|
87
|
+
"resolved": "any",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": true,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "The currently selected value"
|
|
95
|
+
},
|
|
96
|
+
"attribute": "value",
|
|
97
|
+
"reflect": false
|
|
98
|
+
},
|
|
99
|
+
"readonly": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "boolean",
|
|
104
|
+
"resolved": "boolean",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "Shows readonly state for all the controls and prevents changes"
|
|
112
|
+
},
|
|
113
|
+
"attribute": "readonly",
|
|
114
|
+
"reflect": false,
|
|
115
|
+
"defaultValue": "false"
|
|
116
|
+
},
|
|
117
|
+
"disabled": {
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "boolean",
|
|
122
|
+
"resolved": "boolean",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "Shows disabled state for all the controls and prevents changes"
|
|
130
|
+
},
|
|
131
|
+
"attribute": "disabled",
|
|
132
|
+
"reflect": false,
|
|
133
|
+
"defaultValue": "false"
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get events() {
|
|
138
|
+
return [{
|
|
139
|
+
"method": "valueChange",
|
|
140
|
+
"name": "valueChange",
|
|
141
|
+
"bubbles": false,
|
|
142
|
+
"cancelable": true,
|
|
143
|
+
"composed": true,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": "Emits the selected value whenever it changes"
|
|
147
|
+
},
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "any",
|
|
150
|
+
"resolved": "any",
|
|
151
|
+
"references": {}
|
|
152
|
+
}
|
|
153
|
+
}];
|
|
154
|
+
}
|
|
155
|
+
static get elementRef() { return "el"; }
|
|
156
|
+
static get watchers() {
|
|
157
|
+
return [{
|
|
158
|
+
"propName": "value",
|
|
159
|
+
"methodName": "handleValueChange"
|
|
160
|
+
}];
|
|
161
|
+
}
|
|
162
|
+
static get listeners() {
|
|
163
|
+
return [{
|
|
164
|
+
"name": "radioSelect",
|
|
165
|
+
"method": "handleNewValue",
|
|
166
|
+
"target": undefined,
|
|
167
|
+
"capture": false,
|
|
168
|
+
"passive": false
|
|
169
|
+
}];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=je-radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"je-radio-group.js","sourceRoot":"","sources":["../../../../src/components/radio/je-radio-group/je-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAgB,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAQtG,MAAM,OAAO,YAAY;;;;wBAiBJ,KAAK;wBAKL,KAAK;;IAOxB,iBAAiB;QACf,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,EAAE,CA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1B,CAAC;IACH,CAAC;IAGD,cAAc,CAAC,EAAoB;QACjC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACF,IAAI,CAAC,KAAK,IAAI,gEAAQ,IAAI,CAAC,KAAK,CAAS;YAC1C,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, EventEmitter, Prop, Event, Watch, Listen } from '@stencil/core';\n\n@Component({\n tag: 'je-radio-group',\n styleUrl: 'je-radio-group.scss',\n shadow: true,\n formAssociated: true\n})\nexport class JeRadioGroup {\n @Element() el!: HTMLJeRadioGroupElement;\n private originalValue?: any;\n\n /**\n * Label that shows above the controls\n */\n @Prop() label?: string;\n\n /**\n * The currently selected value\n */\n @Prop({ mutable: true }) value?: any;\n\n /**\n * Shows readonly state for all the controls and prevents changes\n */\n @Prop() readonly = false;\n\n /**\n * Shows disabled state for all the controls and prevents changes\n */\n @Prop() disabled = false;\n\n /**\n * Emits the selected value whenever it changes\n */\n @Event({ bubbles: false }) valueChange: EventEmitter<any>;\n\n componentWillLoad() {\n if (this.label) {\n this.el.setAttribute('name', this.label)\n }\n }\n\n componentDidLoad() {\n this.originalValue = this.value;\n if (this.value) {\n const radios = this.getRadios();\n for (let item of radios) {\n if (item.value === this.value) {\n item.selected = true;\n }\n }\n }\n }\n\n formResetCallback() {\n if (this.value !== this.originalValue) {\n this.value = this.originalValue;\n }\n }\n\n private getRadios() {\n const elements = this.el.querySelectorAll('je-radio');\n return Array.from(elements);\n }\n\n @Watch('value')\n handleValueChange() {\n this.valueChange.emit(this.value);\n const radios = this.getRadios();\n for (let radio of radios) {\n if (radio.value !== this.value && radio.selected !== false)\n radio.selected = false;\n else if (radio.value === this.value && radio.selected !== true)\n radio.selected = true;\n }\n }\n\n @Listen('radioSelect')\n handleNewValue(ev: CustomEvent<any>) {\n this.value = ev.detail;\n }\n\n render() {\n return (\n <Host>\n {this.label && <label>{this.label}</label>}\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: fit-content;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
je-input::part(native-input) {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host([expand]) {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
je-icon {
|
|
15
|
+
transition: transform 250ms ease;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
je-icon.open {
|
|
19
|
+
transform: rotate(180deg);
|
|
20
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class JeSelect {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.open = false;
|
|
5
|
+
this.label = undefined;
|
|
6
|
+
this.placeholder = undefined;
|
|
7
|
+
this.value = undefined;
|
|
8
|
+
this.expand = undefined;
|
|
9
|
+
this.required = undefined;
|
|
10
|
+
}
|
|
11
|
+
componentDidLoad() {
|
|
12
|
+
this.originalValue = this.value;
|
|
13
|
+
}
|
|
14
|
+
componentWillLoad() {
|
|
15
|
+
if (!this.el.getAttribute('name') && this.label) {
|
|
16
|
+
this.el.setAttribute('name', this.label);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
formResetCallback() {
|
|
20
|
+
this.value = this.originalValue;
|
|
21
|
+
const options = Array.from(this.el.querySelectorAll('je-select-option'));
|
|
22
|
+
if (!options.some(t => t.value === this.value)) {
|
|
23
|
+
this.inputEl.value = '';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
handlePopoverPresent() {
|
|
27
|
+
this.open = true;
|
|
28
|
+
}
|
|
29
|
+
handlePopoverDismiss() {
|
|
30
|
+
this.open = false;
|
|
31
|
+
const options = this.el.querySelectorAll('je-select-option');
|
|
32
|
+
options.forEach(option => option.classList.remove('focus'));
|
|
33
|
+
}
|
|
34
|
+
handleOptionSelected(event) {
|
|
35
|
+
this.value = event.detail;
|
|
36
|
+
}
|
|
37
|
+
handleValueChange() {
|
|
38
|
+
const options = this.el.querySelectorAll('je-select-option');
|
|
39
|
+
options.forEach(option => {
|
|
40
|
+
if (option.value === this.value) {
|
|
41
|
+
option.selected = true;
|
|
42
|
+
this.inputEl.value = option.textContent || option.value;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
option.selected = false;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
focusOption(option) {
|
|
50
|
+
option.classList.add('focus');
|
|
51
|
+
}
|
|
52
|
+
blurOption(option) {
|
|
53
|
+
option.classList.remove('focus');
|
|
54
|
+
}
|
|
55
|
+
hasFocus(option) {
|
|
56
|
+
return option.classList.contains('focus');
|
|
57
|
+
}
|
|
58
|
+
handleKeyDown(event) {
|
|
59
|
+
var _a;
|
|
60
|
+
if (this.open || (event.key !== 'Tab' && event.key !== 'Enter')) {
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
event.stopPropagation();
|
|
63
|
+
}
|
|
64
|
+
const options = Array.from(this.el.querySelectorAll('je-select-option'));
|
|
65
|
+
if (event.key == 'Enter' && this.open) {
|
|
66
|
+
options.forEach(option => {
|
|
67
|
+
if (this.hasFocus(option)) {
|
|
68
|
+
this.value = option.value;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
this.inputEl.dismissDropdown();
|
|
72
|
+
}
|
|
73
|
+
else if (event.key == 'Escape') {
|
|
74
|
+
this.inputEl.dismissDropdown();
|
|
75
|
+
}
|
|
76
|
+
else if ((event.key == 'ArrowDown' || event.key == 'ArrowUp') && !this.open) {
|
|
77
|
+
this.inputEl.shadowRoot.querySelector("[part='outer-container']").click();
|
|
78
|
+
}
|
|
79
|
+
else if ((event.key == 'ArrowDown' || event.key == 'ArrowUp') && this.open) {
|
|
80
|
+
if (!options.some(t => this.hasFocus(t))) {
|
|
81
|
+
const indexToFocus = options.findIndex(t => t.selected);
|
|
82
|
+
if (indexToFocus > -1) {
|
|
83
|
+
this.focusOption(options[indexToFocus]);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.focusOption(options[0]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
if (event.key == 'ArrowUp') {
|
|
91
|
+
options.forEach(option => {
|
|
92
|
+
if (this.hasFocus(option)) {
|
|
93
|
+
const prevOption = option.previousElementSibling;
|
|
94
|
+
if (prevOption) {
|
|
95
|
+
this.blurOption(option);
|
|
96
|
+
this.focusOption(prevOption);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const optionToFocus = (_a = options.find(t => this.hasFocus(t))) === null || _a === void 0 ? void 0 : _a.nextElementSibling;
|
|
103
|
+
if (optionToFocus) {
|
|
104
|
+
this.blurOption(options.find(t => this.hasFocus(t)));
|
|
105
|
+
this.focusOption(optionToFocus);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else if (event.key.length == 1) {
|
|
111
|
+
const currentFocusedOption = options.find(t => this.hasFocus(t));
|
|
112
|
+
const optionsWithKey = options.filter(t => t.textContent.toLowerCase().startsWith(event.key.toLowerCase()));
|
|
113
|
+
if (optionsWithKey.length) {
|
|
114
|
+
const currentFocuedIndex = optionsWithKey.findIndex(t => this.hasFocus(t));
|
|
115
|
+
if (currentFocuedIndex > -1) {
|
|
116
|
+
if (currentFocuedIndex < optionsWithKey.length - 1) {
|
|
117
|
+
this.blurOption(optionsWithKey[currentFocuedIndex]);
|
|
118
|
+
this.focusOption(optionsWithKey[currentFocuedIndex + 1]);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.blurOption(optionsWithKey[currentFocuedIndex]);
|
|
122
|
+
this.focusOption(optionsWithKey[0]);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
if (currentFocusedOption)
|
|
127
|
+
this.blurOption(currentFocusedOption);
|
|
128
|
+
this.focusOption(optionsWithKey[0]);
|
|
129
|
+
}
|
|
130
|
+
if (!this.open) {
|
|
131
|
+
options.forEach(option => {
|
|
132
|
+
if (this.hasFocus(option)) {
|
|
133
|
+
this.value = option.value;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else if (currentFocusedOption) {
|
|
139
|
+
this.blurOption(currentFocusedOption);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return (h(Host, { key: '66d25d96c778ac0183742b03ba55b104fb542191' }, h("je-input", { key: '01768d4f45c8431cbaee327edba4c97e727df9a9', ref: el => this.inputEl = el, exportparts: 'outer-container, start-container, end-container, native-input, content', dropdown: true, label: this.label, placeholder: this.placeholder, noTyping: true, expand: this.expand, dismissOnClick: true, required: this.required }, h("slot", { key: 'e31cfa87c8148c8ecda310b99ffd668c510a2149', onSlotchange: () => this.handleValueChange(), slot: 'dropdown' }), h("je-icon", { key: 'c3336499f1c8d8ba5150b5c91bb994ece0140c74', slot: 'end', icon: 'expand_more', class: { open: this.open } }))));
|
|
145
|
+
}
|
|
146
|
+
static get is() { return "je-select"; }
|
|
147
|
+
static get encapsulation() { return "shadow"; }
|
|
148
|
+
static get delegatesFocus() { return true; }
|
|
149
|
+
static get formAssociated() { return true; }
|
|
150
|
+
static get originalStyleUrls() {
|
|
151
|
+
return {
|
|
152
|
+
"$": ["je-select.scss"]
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
static get styleUrls() {
|
|
156
|
+
return {
|
|
157
|
+
"$": ["je-select.css"]
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
static get properties() {
|
|
161
|
+
return {
|
|
162
|
+
"label": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "string",
|
|
167
|
+
"resolved": "string",
|
|
168
|
+
"references": {}
|
|
169
|
+
},
|
|
170
|
+
"required": false,
|
|
171
|
+
"optional": true,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": ""
|
|
175
|
+
},
|
|
176
|
+
"attribute": "label",
|
|
177
|
+
"reflect": false
|
|
178
|
+
},
|
|
179
|
+
"placeholder": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "string",
|
|
184
|
+
"resolved": "string",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": true,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": ""
|
|
192
|
+
},
|
|
193
|
+
"attribute": "placeholder",
|
|
194
|
+
"reflect": false
|
|
195
|
+
},
|
|
196
|
+
"value": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"mutable": true,
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "string",
|
|
201
|
+
"resolved": "string",
|
|
202
|
+
"references": {}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": true,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": ""
|
|
209
|
+
},
|
|
210
|
+
"attribute": "value",
|
|
211
|
+
"reflect": false
|
|
212
|
+
},
|
|
213
|
+
"expand": {
|
|
214
|
+
"type": "boolean",
|
|
215
|
+
"mutable": false,
|
|
216
|
+
"complexType": {
|
|
217
|
+
"original": "boolean",
|
|
218
|
+
"resolved": "boolean",
|
|
219
|
+
"references": {}
|
|
220
|
+
},
|
|
221
|
+
"required": false,
|
|
222
|
+
"optional": true,
|
|
223
|
+
"docs": {
|
|
224
|
+
"tags": [],
|
|
225
|
+
"text": ""
|
|
226
|
+
},
|
|
227
|
+
"attribute": "expand",
|
|
228
|
+
"reflect": false
|
|
229
|
+
},
|
|
230
|
+
"required": {
|
|
231
|
+
"type": "boolean",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "boolean",
|
|
235
|
+
"resolved": "boolean",
|
|
236
|
+
"references": {}
|
|
237
|
+
},
|
|
238
|
+
"required": false,
|
|
239
|
+
"optional": true,
|
|
240
|
+
"docs": {
|
|
241
|
+
"tags": [],
|
|
242
|
+
"text": ""
|
|
243
|
+
},
|
|
244
|
+
"attribute": "required",
|
|
245
|
+
"reflect": false
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
static get states() {
|
|
250
|
+
return {
|
|
251
|
+
"open": {}
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
static get elementRef() { return "el"; }
|
|
255
|
+
static get watchers() {
|
|
256
|
+
return [{
|
|
257
|
+
"propName": "value",
|
|
258
|
+
"methodName": "handleValueChange"
|
|
259
|
+
}];
|
|
260
|
+
}
|
|
261
|
+
static get listeners() {
|
|
262
|
+
return [{
|
|
263
|
+
"name": "didPresent",
|
|
264
|
+
"method": "handlePopoverPresent",
|
|
265
|
+
"target": undefined,
|
|
266
|
+
"capture": false,
|
|
267
|
+
"passive": false
|
|
268
|
+
}, {
|
|
269
|
+
"name": "didDismiss",
|
|
270
|
+
"method": "handlePopoverDismiss",
|
|
271
|
+
"target": undefined,
|
|
272
|
+
"capture": false,
|
|
273
|
+
"passive": false
|
|
274
|
+
}, {
|
|
275
|
+
"name": "optionSelected",
|
|
276
|
+
"method": "handleOptionSelected",
|
|
277
|
+
"target": undefined,
|
|
278
|
+
"capture": false,
|
|
279
|
+
"passive": false
|
|
280
|
+
}, {
|
|
281
|
+
"name": "keydown",
|
|
282
|
+
"method": "handleKeyDown",
|
|
283
|
+
"target": undefined,
|
|
284
|
+
"capture": true,
|
|
285
|
+
"passive": false
|
|
286
|
+
}];
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
//# sourceMappingURL=je-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"je-select.js","sourceRoot":"","sources":["../../../../src/components/select/je-select/je-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAUxF,MAAM,OAAO,QAAQ;;oBAIH,KAAK;;;;;;;IAOrB,gBAAgB;QACd,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC;IAClC,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChD,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC;QAChC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/C,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC;IAGD,oBAAoB;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACn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AC,MAAM,CAAC,EAAE,CAAC;4BAC1B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;wBAC5B,CAAC;oBACH,CAAC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;iBAAM,IAAI,oBAAoB,EAAE,CAAC;gBAChC,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,iEAAU,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,EACpC,WAAW,EAAC,wEAAwE,EACpF,QAAQ,EAAE,IAAI,EACd,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,EACd,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,cAAc,EAAE,IAAI,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBAEvB,6DAAM,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAC,UAAU,GAAG;gBACtE,gEAAS,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,aAAa,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAI,CAC5D,CACN,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, State, Listen, Watch } from '@stencil/core';\n\n@Component({\n tag: 'je-select',\n styleUrl: 'je-select.scss',\n shadow: {\n delegatesFocus: true\n },\n formAssociated: true\n})\nexport class JeSelect {\n @Element() el: HTMLElement;\n private inputEl!: HTMLJeInputElement;\n private originalValue?: string;\n @State() open = false;\n @Prop() label?: string;\n @Prop() placeholder?: string;\n @Prop({ mutable: true }) value?: string;\n @Prop() expand?: boolean;\n @Prop() required?: boolean;\n\n componentDidLoad() {\n this.originalValue = this.value;\n }\n\n componentWillLoad() {\n if (!this.el.getAttribute('name') && this.label) {\n this.el.setAttribute('name', this.label);\n }\n }\n\n formResetCallback() {\n this.value = this.originalValue;\n const options = Array.from(this.el.querySelectorAll('je-select-option'));\n if (!options.some(t => t.value === this.value)) {\n this.inputEl.value = '';\n }\n }\n\n @Listen('didPresent')\n handlePopoverPresent() {\n this.open = true;\n }\n\n @Listen('didDismiss')\n handlePopoverDismiss() {\n this.open = false;\n const options = this.el.querySelectorAll('je-select-option');\n options.forEach(option => option.classList.remove('focus'));\n }\n\n @Listen('optionSelected')\n handleOptionSelected(event: CustomEvent<string>) {\n this.value = event.detail;\n }\n\n @Watch('value')\n handleValueChange() {\n const options = this.el.querySelectorAll('je-select-option');\n options.forEach(option => {\n if (option.value === this.value) {\n option.selected = true;\n this.inputEl.value = option.textContent || option.value;\n } else {\n option.selected = false;\n }\n });\n }\n\n private focusOption(option: HTMLJeSelectOptionElement) {\n option.classList.add('focus')\n }\n\n private blurOption(option: HTMLJeSelectOptionElement) {\n option.classList.remove('focus')\n }\n\n private hasFocus(option: HTMLJeSelectOptionElement) {\n return option.classList.contains('focus');\n }\n\n @Listen('keydown', { capture: true })\n handleKeyDown(event: KeyboardEvent) {\n if (this.open || (event.key !== 'Tab' && event.key !== 'Enter')) {\n event.preventDefault();\n event.stopPropagation();\n }\n const options = Array.from(this.el.querySelectorAll('je-select-option'));\n if (event.key == 'Enter' && this.open) {\n options.forEach(option => {\n if (this.hasFocus(option)) {\n this.value = option.value;\n }\n });\n this.inputEl.dismissDropdown();\n } else if (event.key == 'Escape') {\n this.inputEl.dismissDropdown()\n } else if ((event.key == 'ArrowDown' || event.key == 'ArrowUp') && !this.open) {\n (this.inputEl.shadowRoot.querySelector(\"[part='outer-container']\") as HTMLElement).click();\n } else if ((event.key == 'ArrowDown' || event.key == 'ArrowUp') && this.open) {\n if (!options.some(t => this.hasFocus(t))) {\n const indexToFocus = options.findIndex(t => t.selected)\n if (indexToFocus > -1) {\n this.focusOption(options[indexToFocus]);\n } else {\n this.focusOption(options[0]);\n }\n } else {\n if (event.key == 'ArrowUp') {\n options.forEach(option => {\n if (this.hasFocus(option)) {\n const prevOption = option.previousElementSibling as HTMLJeSelectOptionElement;\n if (prevOption) {\n this.blurOption(option);\n this.focusOption(prevOption);\n }\n }\n });\n } else {\n const optionToFocus = options.find(t => this.hasFocus(t))?.nextElementSibling;\n if (optionToFocus) {\n this.blurOption(options.find(t => this.hasFocus(t)));\n this.focusOption(optionToFocus as HTMLJeSelectOptionElement);\n }\n }\n }\n } else if (event.key.length == 1) {\n const currentFocusedOption = options.find(t => this.hasFocus(t));\n const optionsWithKey = options.filter(t => t.textContent.toLowerCase().startsWith(event.key.toLowerCase()))\n if (optionsWithKey.length) {\n const currentFocuedIndex = optionsWithKey.findIndex(t => this.hasFocus(t));\n if (currentFocuedIndex > -1) {\n if (currentFocuedIndex < optionsWithKey.length - 1) {\n this.blurOption(optionsWithKey[currentFocuedIndex]);\n this.focusOption(optionsWithKey[currentFocuedIndex + 1]);\n } else {\n this.blurOption(optionsWithKey[currentFocuedIndex]);\n this.focusOption(optionsWithKey[0]);\n }\n } else {\n if (currentFocusedOption) this.blurOption(currentFocusedOption);\n this.focusOption(optionsWithKey[0]);\n }\n if (!this.open) {\n options.forEach(option => {\n if (this.hasFocus(option)) {\n this.value = option.value;\n }\n });\n }\n } else if (currentFocusedOption) {\n this.blurOption(currentFocusedOption);\n }\n }\n }\n\n render() {\n return (\n <Host>\n <je-input ref={el => this.inputEl = el}\n exportparts='outer-container, start-container, end-container, native-input, content'\n dropdown={true}\n label={this.label}\n placeholder={this.placeholder}\n noTyping={true}\n expand={this.expand}\n dismissOnClick={true}\n required={this.required}\n >\n <slot onSlotchange={() => this.handleValueChange()} slot='dropdown' />\n <je-icon slot='end' icon='expand_more' class={{ open: this.open }} />\n </je-input>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
--je-option-hover-color: var(--je-primary-100);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host([darkmode]) {
|
|
8
|
+
--je-option-hover-color: var(--je-medium-850);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host(:hover) span[part=container], :host(.focus) span[part=container] {
|
|
12
|
+
background-color: var(--je-option-hover-color);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
span[part=container] {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: var(--je-spacing-2xs);
|
|
19
|
+
user-select: none;
|
|
20
|
+
-webkit-user-select: none;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
width: 100%;
|
|
23
|
+
padding: var(--je-spacing-xs, 10px);
|
|
24
|
+
background-color: transparent;
|
|
25
|
+
color: inherit;
|
|
26
|
+
transition: background-color 75ms ease-in;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
je-icon {
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class JeSelectOption {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.value = undefined;
|
|
5
|
+
this.selected = false;
|
|
6
|
+
}
|
|
7
|
+
handleClick() {
|
|
8
|
+
this.optionSelected.emit(this.value);
|
|
9
|
+
}
|
|
10
|
+
handleThemeChange(e) {
|
|
11
|
+
this.hostEl.toggleAttribute('darkmode', e.detail == 'dark');
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h("span", { key: '2aea5751eefe77f3ad5f1aadd76e5582f1481121', part: 'container' }, h("je-icon", { key: 'e03092f2bb061d9954df0503ca924bf287b683e9', icon: this.selected ? 'radio_button_checked' : 'radio_button_unchecked' }), h("slot", { key: '485755645a3bfa06eb79f4d6fc42501541da1712' })));
|
|
15
|
+
}
|
|
16
|
+
static get is() { return "je-select-option"; }
|
|
17
|
+
static get encapsulation() { return "shadow"; }
|
|
18
|
+
static get originalStyleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["je-select-option.scss"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static get styleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["je-select-option.css"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get properties() {
|
|
29
|
+
return {
|
|
30
|
+
"value": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"mutable": false,
|
|
33
|
+
"complexType": {
|
|
34
|
+
"original": "string",
|
|
35
|
+
"resolved": "string",
|
|
36
|
+
"references": {}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": ""
|
|
43
|
+
},
|
|
44
|
+
"attribute": "value",
|
|
45
|
+
"reflect": false
|
|
46
|
+
},
|
|
47
|
+
"selected": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "boolean",
|
|
52
|
+
"resolved": "boolean",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": ""
|
|
60
|
+
},
|
|
61
|
+
"attribute": "selected",
|
|
62
|
+
"reflect": true,
|
|
63
|
+
"defaultValue": "false"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static get events() {
|
|
68
|
+
return [{
|
|
69
|
+
"method": "optionSelected",
|
|
70
|
+
"name": "optionSelected",
|
|
71
|
+
"bubbles": true,
|
|
72
|
+
"cancelable": true,
|
|
73
|
+
"composed": true,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": ""
|
|
77
|
+
},
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
}
|
|
83
|
+
}];
|
|
84
|
+
}
|
|
85
|
+
static get elementRef() { return "hostEl"; }
|
|
86
|
+
static get listeners() {
|
|
87
|
+
return [{
|
|
88
|
+
"name": "click",
|
|
89
|
+
"method": "handleClick",
|
|
90
|
+
"target": undefined,
|
|
91
|
+
"capture": false,
|
|
92
|
+
"passive": false
|
|
93
|
+
}, {
|
|
94
|
+
"name": "themeChange",
|
|
95
|
+
"method": "handleThemeChange",
|
|
96
|
+
"target": "body",
|
|
97
|
+
"capture": false,
|
|
98
|
+
"passive": false
|
|
99
|
+
}];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=je-select-option.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"je-select-option.js","sourceRoot":"","sources":["../../../../src/components/select/je-select-option/je-select-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzF,MAAM,OAAO,cAAc;;;wBAGW,KAAK;;IAIzC,WAAW;QACT,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAGD,iBAAiB,CAAC,CAAgC;QAChD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAA;IAC7D,CAAC;IAED,MAAM;QACJ,OAAO,CACL,6DAAM,IAAI,EAAC,WAAW;YACpB,gEAAS,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,wBAAwB,GAAG;YACnF,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Listen, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'je-select-option',\n styleUrl: 'je-select-option.scss',\n shadow: true,\n})\nexport class JeSelectOption {\n @Element() hostEl!: HTMLElement;\n @Prop() value: string;\n @Prop({ reflect: true }) selected = false;\n @Event() optionSelected: EventEmitter<string>;\n\n @Listen('click')\n handleClick() {\n this.optionSelected.emit(this.value);\n }\n\n @Listen('themeChange', { target: 'body' })\n handleThemeChange(e: CustomEvent<'light' | 'dark'>) {\n this.hostEl.toggleAttribute('darkmode', e.detail == 'dark')\n }\n\n render() {\n return (\n <span part='container'>\n <je-icon icon={this.selected ? 'radio_button_checked' : 'radio_button_unchecked'}/>\n <slot></slot>\n </span>\n );\n }\n}\n"]}
|