xv-webcomponents 0.1.43 → 0.1.46
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 +129 -129
- package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/index-BE3kw7I4.js +36 -0
- package/dist/cjs/index-BE3kw7I4.js.map +1 -0
- package/dist/cjs/index-MLh9SbX2.js +1917 -0
- package/dist/cjs/index-MLh9SbX2.js.map +1 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +16 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/xv-accordion-v2_34.cjs.entry.js +3542 -0
- package/dist/cjs/xv-accordion-v2_34.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +20 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.entry.cjs.js.map +1 -0
- package/dist/cjs/xv-webcomponents.cjs.js +28 -0
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-brands-400.svg +3717 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-duotone-900.svg +15326 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-light-300.svg +12420 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-regular-400.svg +11323 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-solid-900.svg +9653 -0
- package/dist/collection/collection-manifest.json +46 -0
- package/dist/collection/components/xv-accordion/xv-accordion.css +98 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js +163 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js.map +1 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.css +163 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +132 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js.map +1 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.css +98 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +19 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js.map +1 -0
- package/dist/collection/components/xv-button/xv-button-v2.css +268 -0
- package/dist/collection/components/xv-button/xv-button.js +229 -0
- package/dist/collection/components/xv-button/xv-button.js.map +1 -0
- package/dist/collection/components/xv-card/xv-card.css +158 -0
- package/dist/collection/components/xv-card/xv-card.js +122 -0
- package/dist/collection/components/xv-card/xv-card.js.map +1 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +233 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +402 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -0
- package/dist/collection/components/xv-data-table/_vars.js +3 -0
- package/dist/collection/components/xv-data-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.css +185 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +206 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.css +102 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +101 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.css +168 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +360 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table.css +214 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js +133 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js.map +1 -0
- package/dist/collection/components/xv-dropdown/_vars.js +2 -0
- package/dist/collection/components/xv-dropdown/_vars.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.css +109 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +153 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +327 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +443 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -0
- package/dist/collection/components/xv-file-uploader/_vars.js +6 -0
- package/dist/collection/components/xv-file-uploader/_vars.js.map +1 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.css +233 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +514 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js.map +1 -0
- package/dist/collection/components/xv-footer/xv-footer.css +325 -0
- package/dist/collection/components/xv-footer/xv-footer.js +37 -0
- package/dist/collection/components/xv-footer/xv-footer.js.map +1 -0
- package/dist/collection/components/xv-header/xv-header.css +22682 -0
- package/dist/collection/components/xv-header/xv-header.js +54 -0
- package/dist/collection/components/xv-header/xv-header.js.map +1 -0
- package/dist/collection/components/xv-link/xv-link.css +162 -0
- package/dist/collection/components/xv-link/xv-link.js +132 -0
- package/dist/collection/components/xv-link/xv-link.js.map +1 -0
- package/dist/collection/components/xv-loader/xv-loader.css +160 -0
- package/dist/collection/components/xv-loader/xv-loader.js +106 -0
- package/dist/collection/components/xv-loader/xv-loader.js.map +1 -0
- package/dist/collection/components/xv-login-modal/xv-login-modal.css +22670 -0
- package/dist/collection/components/xv-login-modal/xv-login-modal.js +146 -0
- package/dist/collection/components/xv-login-modal/xv-login-modal.js.map +1 -0
- package/dist/collection/components/xv-modal/xv-modal.css +210 -0
- package/dist/collection/components/xv-modal/xv-modal.js +245 -0
- package/dist/collection/components/xv-modal/xv-modal.js.map +1 -0
- package/dist/collection/components/xv-notification/_vars.js +8 -0
- package/dist/collection/components/xv-notification/_vars.js.map +1 -0
- package/dist/collection/components/xv-notification/xv-notification.css +208 -0
- package/dist/collection/components/xv-notification/xv-notification.js +118 -0
- package/dist/collection/components/xv-notification/xv-notification.js.map +1 -0
- package/dist/collection/components/xv-number-input/xv-number-input.css +223 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js +373 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js +6 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css +140 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +137 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +200 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +202 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js.map +1 -0
- package/dist/{xv-webcomponents/_vars-IZ3lIQzL.js → collection/components/xv-progress-indicator/_vars.js} +3 -7
- package/dist/collection/components/xv-progress-indicator/_vars.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.css +191 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +54 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.css +140 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +157 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -0
- package/dist/collection/components/xv-table/_vars.js +3 -0
- package/dist/collection/components/xv-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +188 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +160 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +153 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +76 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +134 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +333 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table.css +232 -0
- package/dist/collection/components/xv-table/xv-table.js +159 -0
- package/dist/collection/components/xv-table/xv-table.js.map +1 -0
- package/dist/collection/components/xv-tabs/_vars.js +11 -0
- package/dist/collection/components/xv-tabs/_vars.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.css +105 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +106 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tabs.css +228 -0
- package/dist/collection/components/xv-tabs/xv-tabs.js +221 -0
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -0
- package/dist/collection/components/xv-tag/xv-tag.css +192 -0
- package/dist/collection/components/xv-tag/xv-tag.js +158 -0
- package/dist/collection/components/xv-tag/xv-tag.js.map +1 -0
- package/dist/collection/components/xv-text-input/xv-text-input.css +242 -0
- package/dist/collection/components/xv-text-input/xv-text-input.js +343 -0
- package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.css +190 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +201 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js.map +1 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +107 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +162 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -0
- package/dist/collection/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/scss/xv/images/xv-sprite.svg +1 -0
- package/dist/collection/scss/xv/sprite/images/xv-sprite.svg +1 -0
- package/dist/collection/types/enum.js +15 -0
- package/dist/collection/types/enum.js.map +1 -0
- package/dist/{xv-webcomponents/utils-1tk8kwKx.js → collection/utils/utils.js} +7 -11
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +6 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/index-DLYJiP99.js +1907 -0
- package/dist/esm/index-DLYJiP99.js.map +1 -0
- package/dist/esm/index-NvoCloOY.js +31 -0
- package/dist/esm/index-NvoCloOY.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +14 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/xv-accordion-v2_34.entry.js +3507 -0
- package/dist/esm/xv-accordion-v2_34.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +18 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js.map +1 -0
- package/dist/esm/xv-webcomponents.js +24 -0
- package/dist/esm/xv-webcomponents.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/xv-button/xv-button.d.ts +21 -12
- package/dist/types/components/xv-data-table/_vars.d.ts +11 -0
- package/dist/types/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.d.ts +15 -0
- package/dist/types/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.d.ts +9 -0
- package/dist/types/components/xv-data-table/xv-data-table-row/xv-data-table-row.d.ts +25 -0
- package/dist/types/components/xv-data-table/xv-data-table.d.ts +10 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +1 -0
- package/dist/types/components/xv-file-uploader/_vars.d.ts +4 -0
- package/dist/types/components/xv-file-uploader/xv-file-uploader.d.ts +39 -0
- package/dist/types/components/xv-header/xv-header.d.ts +0 -2
- package/dist/types/components/xv-modal/xv-modal.d.ts +4 -0
- package/dist/types/components/xv-number-input/xv-number-input.d.ts +26 -0
- package/dist/types/components/xv-table/_vars.d.ts +1 -5
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +2 -1
- package/dist/types/components/xv-text-input/xv-text-input.d.ts +11 -11
- package/dist/types/components/xv-toggle-tip/xv-toggle-tip.d.ts +19 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +12 -8
- package/dist/types/components.d.ts +537 -105
- package/dist/types/stencil-public-runtime.d.ts +1 -1
- package/dist/types/types/enum.d.ts +5 -0
- package/dist/xv-webcomponents/index.esm.js +1 -13
- package/dist/xv-webcomponents/index.esm.js.map +1 -1
- package/dist/xv-webcomponents/loader.esm.js.map +1 -1
- package/dist/xv-webcomponents/p-851c4716.entry.js +2 -0
- package/dist/xv-webcomponents/p-851c4716.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-DLYJiP99.js +3 -0
- package/dist/xv-webcomponents/p-DLYJiP99.js.map +1 -0
- package/dist/xv-webcomponents/p-DQuL1Twl.js +2 -0
- package/dist/xv-webcomponents/p-DQuL1Twl.js.map +1 -0
- package/dist/xv-webcomponents/p-NvoCloOY.js +2 -0
- package/dist/xv-webcomponents/p-NvoCloOY.js.map +1 -0
- package/dist/xv-webcomponents/p-d96c1b6a.entry.js +2 -0
- package/dist/xv-webcomponents/p-d96c1b6a.entry.js.map +1 -0
- package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.esm.js.map +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -49
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- 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/package.json +53 -53
- package/dist/types/components/xv-text-input/_vars.d.ts +0 -5
- package/dist/types/components/xv-user-menu/interfaces/MenuItem.d.ts +0 -0
- package/dist/types/components/xv-user-menu/xv-user-menu.d.ts +0 -41
- package/dist/xv-webcomponents/_vars-FbbDWn6g.js +0 -13
- package/dist/xv-webcomponents/_vars-FbbDWn6g.js.map +0 -1
- package/dist/xv-webcomponents/_vars-IZ3lIQzL.js.map +0 -1
- package/dist/xv-webcomponents/enum-DTBL51oP.js +0 -13
- package/dist/xv-webcomponents/enum-DTBL51oP.js.map +0 -1
- package/dist/xv-webcomponents/index-rZAC0WRb.js +0 -4238
- package/dist/xv-webcomponents/index-rZAC0WRb.js.map +0 -1
- package/dist/xv-webcomponents/utils-1tk8kwKx.js.map +0 -1
- package/dist/xv-webcomponents/xv-accordion-v2-item.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-accordion-v2-item.entry.js +0 -36
- package/dist/xv-webcomponents/xv-accordion-v2-item.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-accordion-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-accordion-v2.entry.js +0 -41
- package/dist/xv-webcomponents/xv-accordion-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.js +0 -18
- package/dist/xv-webcomponents/xv-breadcrumbs-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-button-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-button-v2.entry.js +0 -35
- package/dist/xv-webcomponents/xv-button-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-card-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-card-v2.entry.js +0 -19
- package/dist/xv-webcomponents/xv-card-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.js +0 -106
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.js +0 -36
- package/dist/xv-webcomponents/xv-dropdown-v2-item.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-dropdown-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-dropdown-v2.entry.js +0 -136
- package/dist/xv-webcomponents/xv-dropdown-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-footer.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-footer.entry.js +0 -30
- package/dist/xv-webcomponents/xv-footer.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-header.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-header.entry.js +0 -81
- package/dist/xv-webcomponents/xv-header.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-link-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-link-v2.entry.js +0 -27
- package/dist/xv-webcomponents/xv-link-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-loader-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-loader-v2.entry.js +0 -33
- package/dist/xv-webcomponents/xv-loader-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-login-modal.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-login-modal.entry.js +0 -89
- package/dist/xv-webcomponents/xv-login-modal.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-modal-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-modal-v2.entry.js +0 -78
- package/dist/xv-webcomponents/xv-modal-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-notification-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-notification-v2.entry.js +0 -50
- package/dist/xv-webcomponents/xv-notification-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.js +0 -32
- package/dist/xv-webcomponents/xv-overflow-menu-v2-item.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.js +0 -74
- package/dist/xv-webcomponents/xv-overflow-menu-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.js +0 -21
- package/dist/xv-webcomponents/xv-progress-indicator-v2-item.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.js +0 -75
- package/dist/xv-webcomponents/xv-progress-indicator-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-tab-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-tab-v2.entry.js +0 -21
- package/dist/xv-webcomponents/xv-tab-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2-cell.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2-cell.entry.js +0 -41
- package/dist/xv-webcomponents/xv-table-v2-cell.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2-expand.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2-expand.entry.js +0 -29
- package/dist/xv-webcomponents/xv-table-v2-expand.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2-row.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2-row.entry.js +0 -66
- package/dist/xv-webcomponents/xv-table-v2-row.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-table-v2.entry.js +0 -53
- package/dist/xv-webcomponents/xv-table-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-tabs-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-tabs-v2.entry.js +0 -109
- package/dist/xv-webcomponents/xv-tabs-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-tag-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-tag-v2.entry.js +0 -29
- package/dist/xv-webcomponents/xv-tag-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-text-input-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-text-input-v2.entry.js +0 -65
- package/dist/xv-webcomponents/xv-text-input-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-tooltip-v2.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-tooltip-v2.entry.js +0 -24
- package/dist/xv-webcomponents/xv-tooltip-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-user-menu.entry.esm.js.map +0 -1
- package/dist/xv-webcomponents/xv-user-menu.entry.js +0 -43
- package/dist/xv-webcomponents/xv-user-menu.entry.js.map +0 -1
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { TAB_TAGS, TABS_VATIANT } from "./_vars";
|
|
3
|
+
import { SIZE_VAR } from "../../types/enum";
|
|
4
|
+
export class XvTabs {
|
|
5
|
+
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* Index of active tab
|
|
8
|
+
*/
|
|
9
|
+
this.active = 0;
|
|
10
|
+
/**
|
|
11
|
+
* Variant of tabs from TABS_VATIANT enum
|
|
12
|
+
*/
|
|
13
|
+
this.variant = TABS_VATIANT.DEFAULT;
|
|
14
|
+
/**
|
|
15
|
+
* local variable for tab labels collection
|
|
16
|
+
*/
|
|
17
|
+
this.tabElements = [];
|
|
18
|
+
/**
|
|
19
|
+
* Is show arrows for scroll
|
|
20
|
+
*/
|
|
21
|
+
this.showArrows = false;
|
|
22
|
+
this.collectTabs = () => {
|
|
23
|
+
if (!this.tabElements.length) {
|
|
24
|
+
this.tabElements = Array.from(this.el.querySelectorAll(TAB_TAGS.TAB));
|
|
25
|
+
this.tabElements.forEach((tab) => {
|
|
26
|
+
if (tab.hasAttribute('name') && !this.active) {
|
|
27
|
+
this.active = tab.getAttribute('name');
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
setTimeout(() => this.updateArrowVisibility(), 100);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
updateArrowVisibility() {
|
|
35
|
+
var _a;
|
|
36
|
+
const container = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.tab-headers_container');
|
|
37
|
+
if (!container)
|
|
38
|
+
return;
|
|
39
|
+
this.showArrows = container.scrollWidth > container.clientWidth;
|
|
40
|
+
}
|
|
41
|
+
updateTabClasses() {
|
|
42
|
+
this.tabElements.forEach((tab, i) => {
|
|
43
|
+
tab.classList.toggle('active', (tab.getAttribute('name') || `${i}`) === `${this.active}`);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
handleTabClick(active) {
|
|
47
|
+
if (active === this.active)
|
|
48
|
+
return;
|
|
49
|
+
this.active = active;
|
|
50
|
+
this.activeChange.emit(Number(this.active) || this.active);
|
|
51
|
+
this.scrollToActiveTab();
|
|
52
|
+
}
|
|
53
|
+
scrollToActiveTab() {
|
|
54
|
+
if (!this.showArrows)
|
|
55
|
+
return;
|
|
56
|
+
// wait next JS tik
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
this.el.shadowRoot
|
|
59
|
+
.querySelector('.tab-headers_tab.active')
|
|
60
|
+
.scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'nearest' });
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
setTab(count = 1) {
|
|
64
|
+
const currentIdx = this.tabElements.findIndex((tab, i) => (tab.getAttribute('name') || `${i}`) === `${this.active}`);
|
|
65
|
+
const nextIdx = currentIdx + count;
|
|
66
|
+
if (nextIdx < 0 || nextIdx >= this.tabElements.length)
|
|
67
|
+
return;
|
|
68
|
+
const nextTab = this.tabElements[nextIdx];
|
|
69
|
+
if (!nextTab || nextTab.hasAttribute('disabled'))
|
|
70
|
+
return;
|
|
71
|
+
this.handleTabClick(nextTab.getAttribute('name') || nextIdx);
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
if (this.loading) {
|
|
76
|
+
return (h(Host, { class: "xv-tabs", variant: this.variant }, h("xv-loader-v2", { size: SIZE_VAR.XL })));
|
|
77
|
+
}
|
|
78
|
+
return (h(Host, { class: "xv-tabs", variant: this.variant }, h("div", { class: "tab-headers", role: "tablist" }, h("button", { hidden: !this.showArrows || !((_a = this.tabElements) === null || _a === void 0 ? void 0 : _a.length), "aria-label": "Previous", class: "tab-headers_btn prev", onClick: () => this.setTab(-1) }), h("div", { class: "tab-headers_container" }, ((_b = this.tabElements) === null || _b === void 0 ? void 0 : _b.length) ? this.tabElements.map((tab, index) => (h("button", { role: "tab", disabled: !!tab.getAttribute('disabled') || !!(tab === null || tab === void 0 ? void 0 : tab.disabled), class: {
|
|
79
|
+
'tab-headers_tab': true,
|
|
80
|
+
active: (tab.getAttribute('name') || `${index}`) === `${this.active}`,
|
|
81
|
+
}, onClick: () => this.handleTabClick(tab.getAttribute('name') || `${index}`) }, tab.getAttribute('label') || `Tab ${index + 1}`))) : this.emptyMessage && h("p", { class: "xv-tabs_empty" }, this.emptyMessage)), h("button", { "aria-label": "Next", hidden: !this.showArrows || !((_c = this.tabElements) === null || _c === void 0 ? void 0 : _c.length), class: "tab-headers_btn next", onClick: () => this.setTab(1) })), h("div", { class: "tab-content-wrapper", role: "tabpanel", tabindex: -1 }, h("slot", { onSlotchange: this.collectTabs }))));
|
|
82
|
+
}
|
|
83
|
+
componentDidRender() {
|
|
84
|
+
this.updateTabClasses();
|
|
85
|
+
}
|
|
86
|
+
static get is() { return "xv-tabs-v2"; }
|
|
87
|
+
static get encapsulation() { return "shadow"; }
|
|
88
|
+
static get originalStyleUrls() {
|
|
89
|
+
return {
|
|
90
|
+
"$": ["xv-tabs.scss"]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get styleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["xv-tabs.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get properties() {
|
|
99
|
+
return {
|
|
100
|
+
"active": {
|
|
101
|
+
"type": "any",
|
|
102
|
+
"attribute": "active",
|
|
103
|
+
"mutable": true,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "number | string",
|
|
106
|
+
"resolved": "number | string",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": false,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": "Index of active tab"
|
|
114
|
+
},
|
|
115
|
+
"getter": false,
|
|
116
|
+
"setter": false,
|
|
117
|
+
"reflect": true,
|
|
118
|
+
"defaultValue": "0"
|
|
119
|
+
},
|
|
120
|
+
"loading": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"attribute": "loading",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "boolean",
|
|
126
|
+
"resolved": "boolean",
|
|
127
|
+
"references": {}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": true,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [],
|
|
133
|
+
"text": "Show loader"
|
|
134
|
+
},
|
|
135
|
+
"getter": false,
|
|
136
|
+
"setter": false,
|
|
137
|
+
"reflect": true
|
|
138
|
+
},
|
|
139
|
+
"variant": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"attribute": "variant",
|
|
142
|
+
"mutable": false,
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "TABS_VATIANT",
|
|
145
|
+
"resolved": "TABS_VATIANT",
|
|
146
|
+
"references": {
|
|
147
|
+
"TABS_VATIANT": {
|
|
148
|
+
"location": "import",
|
|
149
|
+
"path": "./_vars",
|
|
150
|
+
"id": "src/components/xv-tabs/_vars.ts::TABS_VATIANT"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "Variant of tabs from TABS_VATIANT enum"
|
|
159
|
+
},
|
|
160
|
+
"getter": false,
|
|
161
|
+
"setter": false,
|
|
162
|
+
"reflect": false,
|
|
163
|
+
"defaultValue": "TABS_VATIANT.DEFAULT"
|
|
164
|
+
},
|
|
165
|
+
"emptyMessage": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"attribute": "empty-message",
|
|
168
|
+
"mutable": false,
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "string",
|
|
171
|
+
"resolved": "string",
|
|
172
|
+
"references": {}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": true,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": "Message when have no tabs"
|
|
179
|
+
},
|
|
180
|
+
"getter": false,
|
|
181
|
+
"setter": false,
|
|
182
|
+
"reflect": false
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
static get states() {
|
|
187
|
+
return {
|
|
188
|
+
"tabElements": {},
|
|
189
|
+
"showArrows": {}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
static get events() {
|
|
193
|
+
return [{
|
|
194
|
+
"method": "activeChange",
|
|
195
|
+
"name": "activeChange",
|
|
196
|
+
"bubbles": true,
|
|
197
|
+
"cancelable": true,
|
|
198
|
+
"composed": true,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "Emit event to outside"
|
|
202
|
+
},
|
|
203
|
+
"complexType": {
|
|
204
|
+
"original": "number | string",
|
|
205
|
+
"resolved": "number | string",
|
|
206
|
+
"references": {}
|
|
207
|
+
}
|
|
208
|
+
}];
|
|
209
|
+
}
|
|
210
|
+
static get elementRef() { return "el"; }
|
|
211
|
+
static get listeners() {
|
|
212
|
+
return [{
|
|
213
|
+
"name": "resize",
|
|
214
|
+
"method": "updateArrowVisibility",
|
|
215
|
+
"target": "window",
|
|
216
|
+
"capture": false,
|
|
217
|
+
"passive": true
|
|
218
|
+
}];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=xv-tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-tabs.js","sourceRoot":"","sources":["../../../src/components/xv-tabs/xv-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO5C,MAAM,OAAO,MAAM;IALnB;QAOE;;WAEG;QACqC,WAAM,GAAoB,CAAC,CAAC;QASpE;;WAEG;QACK,YAAO,GAAiB,YAAY,CAAC,OAAO,CAAC;QAKrD;;WAEG;QACM,gBAAW,GAAkB,EAAE,CAAC;QACzC;;WAEG;QACM,eAAU,GAAY,KAAK,CAAC;QAU7B,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;gBAC7B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;gBACtE,IAAI,CAA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AC,UAAU,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAA,EACrD,KAAK,EAAC,sBAAsB,EAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAC7B,CACE;YAEN,WACE,KAAK,EAAC,qBAAqB,EAC3B,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC;gBAEZ,YAAM,YAAY,EAAE,IAAI,CAAC,WAAW,GAAI,CACpC,CACD,CACR,CAAC;IACJ,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop, Event, EventEmitter, State, Listen } from '@stencil/core';\nimport { TAB_TAGS, TABS_VATIANT } from './_vars';\nimport { SIZE_VAR } from '../../types/enum';\n\n@Component({\n tag: 'xv-tabs-v2',\n styleUrl: 'xv-tabs.scss',\n shadow: true,\n})\nexport class XvTabs {\n @Element() el: HTMLElement;\n /**\n * Index of active tab\n */\n @Prop({ reflect: true, mutable: true }) active: number | string = 0;\n /**\n * Emit event to outside\n */\n @Event() activeChange: EventEmitter<number | string>;\n /**\n * Show loader\n */\n @Prop({ reflect: true }) loading?: boolean;\n /**\n * Variant of tabs from TABS_VATIANT enum\n */\n @Prop() variant: TABS_VATIANT = TABS_VATIANT.DEFAULT;\n /**\n * Message when have no tabs\n */\n @Prop() emptyMessage?: string;\n /**\n * local variable for tab labels collection\n */\n @State() tabElements: HTMLElement[] = [];\n /**\n * Is show arrows for scroll\n */\n @State() showArrows: boolean = false;\n\n @Listen('resize', { target: 'window' })\n updateArrowVisibility() {\n const container = this.el.shadowRoot?.querySelector('.tab-headers_container') as HTMLElement | null;\n if (!container) return;\n\n this.showArrows = container.scrollWidth > container.clientWidth;\n }\n\n private collectTabs = () => {\n if (!this.tabElements.length) {\n this.tabElements = Array.from(this.el.querySelectorAll(TAB_TAGS.TAB));\n this.tabElements.forEach((tab) => {\n if (tab.hasAttribute('name') && !this.active) {\n this.active = tab.getAttribute('name');\n }\n })\n\n setTimeout(() => this.updateArrowVisibility(), 100);\n }\n }\n\n private updateTabClasses() {\n this.tabElements.forEach((tab, i) => {\n tab.classList.toggle(\n 'active',\n (tab.getAttribute('name') || `${i}`) === `${this.active}`\n );\n });\n }\n\n private handleTabClick(active: string | number) {\n if (active === this.active) return;\n\n this.active = active;\n this.activeChange.emit(Number(this.active) || this.active);\n this.scrollToActiveTab();\n }\n\n private scrollToActiveTab() {\n if (!this.showArrows) return;\n\n // wait next JS tik\n setTimeout(() => {\n this.el.shadowRoot\n .querySelector('.tab-headers_tab.active')\n .scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'nearest' });\n });\n }\n\n private setTab(count: number = 1) {\n const currentIdx = this.tabElements.findIndex(\n (tab, i) =>\n (tab.getAttribute('name') || `${i}`) === `${this.active}`\n );\n const nextIdx = currentIdx + count;\n\n if (nextIdx < 0 || nextIdx >= this.tabElements.length) return;\n\n const nextTab = this.tabElements[nextIdx];\n\n if (!nextTab || nextTab.hasAttribute('disabled')) return;\n\n this.handleTabClick(nextTab.getAttribute('name') || nextIdx);\n }\n\n render() {\n if (this.loading) {\n return (\n <Host class=\"xv-tabs\" variant={this.variant}>\n <xv-loader-v2 size={SIZE_VAR.XL} />\n </Host>\n )\n }\n\n return (\n <Host class=\"xv-tabs\" variant={this.variant}>\n <div class=\"tab-headers\" role=\"tablist\">\n <button\n hidden={!this.showArrows || !this.tabElements?.length}\n aria-label=\"Previous\"\n class=\"tab-headers_btn prev\"\n onClick={() => this.setTab(-1)}\n />\n <div class=\"tab-headers_container\">\n {this.tabElements?.length ? this.tabElements.map((tab, index) => (\n <button\n role=\"tab\"\n disabled={!!tab.getAttribute('disabled') || !!(tab as any)?.disabled}\n class={{\n 'tab-headers_tab': true,\n active: (tab.getAttribute('name') || `${index}`) === `${this.active}`,\n }}\n onClick={() => this.handleTabClick(tab.getAttribute('name') || `${index}`)}\n >\n {tab.getAttribute('label') || `Tab ${index + 1}`}\n </button>\n )) : this.emptyMessage && <p class=\"xv-tabs_empty\">{this.emptyMessage}</p>}\n </div>\n <button\n aria-label=\"Next\"\n hidden={!this.showArrows || !this.tabElements?.length}\n class=\"tab-headers_btn next\"\n onClick={() => this.setTab(1)}\n />\n </div>\n\n <div\n class=\"tab-content-wrapper\"\n role=\"tabpanel\"\n tabindex={-1}\n >\n <slot onSlotchange={this.collectTabs} />\n </div>\n </Host>\n );\n }\n\n componentDidRender() {\n this.updateTabClasses();\n }\n}\n"]}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.xv-tooltip[role=tooltip] {
|
|
3
|
+
position: absolute;
|
|
4
|
+
background-color: var(--background-inverse, #333333);
|
|
5
|
+
color: var(--text-on-color);
|
|
6
|
+
padding: var(--spacing-03) var(--spacing-04);
|
|
7
|
+
border-radius: 3px;
|
|
8
|
+
font-size: var(--fz-sm);
|
|
9
|
+
z-index: 999;
|
|
10
|
+
min-width: min(150px, 90vw);
|
|
11
|
+
max-width: min(400px, 90vw);
|
|
12
|
+
}
|
|
13
|
+
.xv-tooltip[role=tooltip]::after {
|
|
14
|
+
content: "";
|
|
15
|
+
position: absolute;
|
|
16
|
+
width: 0;
|
|
17
|
+
height: 0;
|
|
18
|
+
border-style: solid;
|
|
19
|
+
}
|
|
20
|
+
.xv-tooltip[role=tooltip][data-popper-placement=top]::after {
|
|
21
|
+
bottom: -5px;
|
|
22
|
+
left: 50%;
|
|
23
|
+
transform: translateX(-50%);
|
|
24
|
+
border-width: 5px 5px 0 5px;
|
|
25
|
+
border-color: var(--background-inverse, black) transparent transparent transparent;
|
|
26
|
+
}
|
|
27
|
+
.xv-tooltip[role=tooltip][data-popper-placement=top-start]::after {
|
|
28
|
+
bottom: -5px;
|
|
29
|
+
left: 12px;
|
|
30
|
+
border-width: 5px 5px 0 5px;
|
|
31
|
+
border-color: var(--background-inverse, black) transparent transparent transparent;
|
|
32
|
+
}
|
|
33
|
+
.xv-tooltip[role=tooltip][data-popper-placement=top-end]::after {
|
|
34
|
+
bottom: -5px;
|
|
35
|
+
right: 12px;
|
|
36
|
+
border-width: 5px 5px 0 5px;
|
|
37
|
+
border-color: var(--background-inverse, black) transparent transparent transparent;
|
|
38
|
+
}
|
|
39
|
+
.xv-tooltip[role=tooltip][data-popper-placement=bottom]::after {
|
|
40
|
+
top: -5px;
|
|
41
|
+
left: 50%;
|
|
42
|
+
transform: translateX(-50%);
|
|
43
|
+
border-width: 0 5px 5px 5px;
|
|
44
|
+
border-color: transparent transparent var(--background-inverse, black) transparent;
|
|
45
|
+
}
|
|
46
|
+
.xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after {
|
|
47
|
+
top: -5px;
|
|
48
|
+
left: 12px;
|
|
49
|
+
border-width: 0 5px 5px 5px;
|
|
50
|
+
border-color: transparent transparent var(--background-inverse, black) transparent;
|
|
51
|
+
}
|
|
52
|
+
.xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after {
|
|
53
|
+
top: -5px;
|
|
54
|
+
right: 12px;
|
|
55
|
+
border-width: 0 5px 5px 5px;
|
|
56
|
+
border-color: transparent transparent var(--background-inverse, black) transparent;
|
|
57
|
+
}
|
|
58
|
+
.xv-tooltip[role=tooltip][data-popper-placement=left]::after {
|
|
59
|
+
top: 50%;
|
|
60
|
+
right: -5px;
|
|
61
|
+
transform: translateY(-50%);
|
|
62
|
+
border-width: 5px 0 5px 5px;
|
|
63
|
+
border-color: transparent transparent transparent var(--background-inverse, black);
|
|
64
|
+
}
|
|
65
|
+
.xv-tooltip[role=tooltip][data-popper-placement=left-start]::after {
|
|
66
|
+
top: 12px;
|
|
67
|
+
right: -5px;
|
|
68
|
+
border-width: 5px 0 5px 5px;
|
|
69
|
+
border-color: transparent transparent transparent var(--background-inverse, black);
|
|
70
|
+
}
|
|
71
|
+
.xv-tooltip[role=tooltip][data-popper-placement=left-end]::after {
|
|
72
|
+
bottom: 12px;
|
|
73
|
+
right: -5px;
|
|
74
|
+
border-width: 5px 0 5px 5px;
|
|
75
|
+
border-color: transparent transparent transparent var(--background-inverse, black);
|
|
76
|
+
}
|
|
77
|
+
.xv-tooltip[role=tooltip][data-popper-placement=right]::after {
|
|
78
|
+
top: 50%;
|
|
79
|
+
left: -5px;
|
|
80
|
+
transform: translateY(-50%);
|
|
81
|
+
border-width: 5px 5px 5px 0;
|
|
82
|
+
border-color: transparent var(--background-inverse, black) transparent transparent;
|
|
83
|
+
}
|
|
84
|
+
.xv-tooltip[role=tooltip][data-popper-placement=right-start]::after {
|
|
85
|
+
top: 12px;
|
|
86
|
+
left: -5px;
|
|
87
|
+
border-width: 5px 5px 5px 0;
|
|
88
|
+
border-color: transparent var(--background-inverse, black) transparent transparent;
|
|
89
|
+
}
|
|
90
|
+
.xv-tooltip[role=tooltip][data-popper-placement=right-end]::after {
|
|
91
|
+
bottom: 12px;
|
|
92
|
+
left: -5px;
|
|
93
|
+
border-width: 5px 5px 5px 0;
|
|
94
|
+
border-color: transparent var(--background-inverse, black) transparent transparent;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
border-radius: 1000px;
|
|
102
|
+
background-color: var(--background);
|
|
103
|
+
color: var(--text-primary);
|
|
104
|
+
font-family: var(--ff-body, inherit);
|
|
105
|
+
}
|
|
106
|
+
:host .xv-tag_content {
|
|
107
|
+
padding-left: 8px;
|
|
108
|
+
padding-right: 8px;
|
|
109
|
+
color: inherit;
|
|
110
|
+
font-family: var(--ff-body);
|
|
111
|
+
font-style: normal;
|
|
112
|
+
font-weight: 400;
|
|
113
|
+
line-height: 16px;
|
|
114
|
+
letter-spacing: 0.32px;
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
text-overflow: ellipsis;
|
|
118
|
+
}
|
|
119
|
+
:host .xv-tag_close {
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
border: none;
|
|
123
|
+
background-color: inherit;
|
|
124
|
+
outline: none;
|
|
125
|
+
border-spacing: 0;
|
|
126
|
+
list-style: none outside none;
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
display: inline-flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
border-radius: 62px;
|
|
133
|
+
width: 15px;
|
|
134
|
+
height: 15px;
|
|
135
|
+
text-align: left;
|
|
136
|
+
color: inherit;
|
|
137
|
+
text-indent: 0;
|
|
138
|
+
transition: opacity 300ms ease-in-out, filter 300ms ease-in-out;
|
|
139
|
+
}
|
|
140
|
+
:host .xv-tag_close:hover {
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
filter: brightness(80%);
|
|
143
|
+
}
|
|
144
|
+
:host .xv-tag_close:active {
|
|
145
|
+
opacity: 0.7;
|
|
146
|
+
}
|
|
147
|
+
:host .xv-tag_close:focus {
|
|
148
|
+
outline: 1px solid currentColor;
|
|
149
|
+
}
|
|
150
|
+
:host .xv-tag_close:after {
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
width: inherit;
|
|
153
|
+
height: inherit;
|
|
154
|
+
color: inherit;
|
|
155
|
+
font-size: 16px;
|
|
156
|
+
display: inline-flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
content: "×";
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host(.sm) {
|
|
163
|
+
font-size: var(--fz-sm);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host(.md) {
|
|
167
|
+
font-size: var(--fz-md);
|
|
168
|
+
}
|
|
169
|
+
:host(.md) .xv-tag_content {
|
|
170
|
+
line-height: 24px;
|
|
171
|
+
}
|
|
172
|
+
:host(.md) .xv-tag_close {
|
|
173
|
+
height: 24px;
|
|
174
|
+
width: 24px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host(.lg) {
|
|
178
|
+
font-size: var(--fz-lg);
|
|
179
|
+
}
|
|
180
|
+
:host(.lg) .xv-tag_content {
|
|
181
|
+
line-height: 26px;
|
|
182
|
+
}
|
|
183
|
+
:host(.lg) .xv-tag_close {
|
|
184
|
+
height: 26px;
|
|
185
|
+
width: 26px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:host(.disabled) {
|
|
189
|
+
pointer-events: none;
|
|
190
|
+
background-color: var(--layer-01);
|
|
191
|
+
color: var(--text-disabled);
|
|
192
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class XvTag {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.size = 'md';
|
|
5
|
+
this.color = '';
|
|
6
|
+
this.bg = '';
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
this.closeable = false;
|
|
9
|
+
}
|
|
10
|
+
closeHandler(e) {
|
|
11
|
+
if (this.disabled)
|
|
12
|
+
return;
|
|
13
|
+
this.closeClick.emit(e);
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { key: '67eb8b7fb0f2735ffdbad22b136e166d81e8804e', style: { color: this.color, background: this.bg }, class: `xv-tag ${this.disabled ? 'disabled' : ''} ${this.size}` }, h("div", { key: '946299b4189045b668b971d008d4f06425f45cca', class: "xv-tag_content" }, h("slot", { key: '594a1a18c2566df555415326d45b9753b5c8a13f' })), this.closeable && (h("button", { key: 'b4d5460c42d5269089f27a7a179e3f0e8692f94e', onClick: this.closeHandler.bind(this), class: "xv-tag_close" }))));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "xv-tag-v2"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["xv-tag.scss"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get styleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["xv-tag.css"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get properties() {
|
|
31
|
+
return {
|
|
32
|
+
"size": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"attribute": "size",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "'sm' | 'md' | 'lg'",
|
|
38
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": ""
|
|
46
|
+
},
|
|
47
|
+
"getter": false,
|
|
48
|
+
"setter": false,
|
|
49
|
+
"reflect": false,
|
|
50
|
+
"defaultValue": "'md'"
|
|
51
|
+
},
|
|
52
|
+
"color": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"attribute": "color",
|
|
55
|
+
"mutable": false,
|
|
56
|
+
"complexType": {
|
|
57
|
+
"original": "string",
|
|
58
|
+
"resolved": "string",
|
|
59
|
+
"references": {}
|
|
60
|
+
},
|
|
61
|
+
"required": false,
|
|
62
|
+
"optional": false,
|
|
63
|
+
"docs": {
|
|
64
|
+
"tags": [],
|
|
65
|
+
"text": ""
|
|
66
|
+
},
|
|
67
|
+
"getter": false,
|
|
68
|
+
"setter": false,
|
|
69
|
+
"reflect": false,
|
|
70
|
+
"defaultValue": "''"
|
|
71
|
+
},
|
|
72
|
+
"bg": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"attribute": "bg",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "string",
|
|
78
|
+
"resolved": "string",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": ""
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false,
|
|
89
|
+
"reflect": false,
|
|
90
|
+
"defaultValue": "''"
|
|
91
|
+
},
|
|
92
|
+
"disabled": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"attribute": "disabled",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "boolean",
|
|
98
|
+
"resolved": "boolean",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": ""
|
|
106
|
+
},
|
|
107
|
+
"getter": false,
|
|
108
|
+
"setter": false,
|
|
109
|
+
"reflect": false,
|
|
110
|
+
"defaultValue": "false"
|
|
111
|
+
},
|
|
112
|
+
"closeable": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"attribute": "closeable",
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "boolean",
|
|
118
|
+
"resolved": "boolean",
|
|
119
|
+
"references": {}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": ""
|
|
126
|
+
},
|
|
127
|
+
"getter": false,
|
|
128
|
+
"setter": false,
|
|
129
|
+
"reflect": false,
|
|
130
|
+
"defaultValue": "false"
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
static get events() {
|
|
135
|
+
return [{
|
|
136
|
+
"method": "closeClick",
|
|
137
|
+
"name": "closeClick",
|
|
138
|
+
"bubbles": true,
|
|
139
|
+
"cancelable": true,
|
|
140
|
+
"composed": true,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "PointerEvent",
|
|
147
|
+
"resolved": "PointerEvent",
|
|
148
|
+
"references": {
|
|
149
|
+
"PointerEvent": {
|
|
150
|
+
"location": "global",
|
|
151
|
+
"id": "global::PointerEvent"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=xv-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-tag.js","sourceRoot":"","sources":["../../../src/components/xv-tag/xv-tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAO9E,MAAM,OAAO,KAAK;IALlB;QAMU,SAAI,GAAuB,IAAI,CAAC;QAChC,UAAK,GAAW,EAAE,CAAC;QACnB,OAAE,GAAW,EAAE,CAAC;QAChB,aAAQ,GAAY,KAAK,CAAC;QAC1B,cAAS,GAAY,KAAK,CAAC;KAwBpC;IArBC,YAAY,CAAC,CAAe;QAC1B,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAE1B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,EACjD,KAAK,EAAE,UAAU,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE;YAE/D,4DAAK,KAAK,EAAC,gBAAgB;gBACzB,8DAAa,CACT;YACL,IAAI,CAAC,SAAS,IAAI,CACjB,+DAAQ,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,cAAc,GAAU,CAC9E,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'xv-tag-v2',\n styleUrl: 'xv-tag.scss',\n shadow: true,\n})\nexport class XvTag {\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\n @Prop() color: string = '';\n @Prop() bg: string = '';\n @Prop() disabled: boolean = false;\n @Prop() closeable: boolean = false;\n @Event() closeClick: EventEmitter<PointerEvent>;\n\n closeHandler(e: PointerEvent) {\n if (this.disabled) return;\n\n this.closeClick.emit(e);\n }\n\n render() {\n return (\n <Host\n style={{ color: this.color, background: this.bg }}\n class={`xv-tag ${this.disabled ? 'disabled' : ''} ${this.size}`}\n >\n <div class=\"xv-tag_content\">\n <slot></slot>\n </div>\n {this.closeable && (\n <button onClick={this.closeHandler.bind(this)} class=\"xv-tag_close\"></button>\n )}\n </Host>\n );\n }\n}\n"]}
|