@xplortech/apollo-core 1.0.0-beta.8 → 2.4.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/.typings/apollo-components.html-data.json +4396 -0
- package/README.md +57 -25
- package/build/style.css +4374 -3359
- package/dist/apollo-core/apollo-core.css +50 -24
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-0ac33b3a.entry.js +1 -0
- package/dist/apollo-core/p-23ef2717.entry.js +6 -0
- package/dist/apollo-core/p-31461db7.entry.js +1 -0
- package/dist/apollo-core/p-3b5f8989.entry.js +1 -0
- package/dist/apollo-core/p-4fab8172.entry.js +1 -0
- package/dist/apollo-core/p-576ce90f.entry.js +1 -0
- package/dist/apollo-core/p-5ec45742.entry.js +1 -0
- package/dist/apollo-core/p-7b7db57a.entry.js +1 -0
- package/dist/apollo-core/p-7f8e5cd0.entry.js +1 -0
- package/dist/apollo-core/p-812bb0e4.entry.js +1 -0
- package/dist/apollo-core/p-845eef0d.entry.js +1 -0
- package/dist/apollo-core/p-8c1f73ea.entry.js +1 -0
- package/dist/apollo-core/p-94209785.entry.js +1 -0
- package/dist/apollo-core/p-9853028c.entry.js +1 -0
- package/dist/apollo-core/p-9d65ece7.entry.js +1 -0
- package/dist/apollo-core/p-CH4yJ6Qx.js +1 -0
- package/dist/apollo-core/p-Cqlsd6nf.js +1 -0
- package/dist/apollo-core/p-DQuL1Twl.js +1 -0
- package/dist/apollo-core/p-DhZas3eX.js +2 -0
- package/dist/apollo-core/p-b1f4604d.entry.js +1 -0
- package/dist/apollo-core/p-be292555.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +15 -13
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/{esm/xpl-input.entry.js → cjs/index-BvmWjxWc.js} +2 -94
- package/dist/cjs/index-D__N_vw2.js +2160 -0
- package/dist/cjs/loader.cjs.js +6 -15
- package/dist/cjs/{v4-14140ff3.js → v4-D4KzFnn8.js} +1 -11
- package/dist/cjs/xpl-accordion.cjs.entry.js +73 -0
- package/dist/cjs/xpl-application-shell.cjs.entry.js +41 -46
- package/dist/cjs/xpl-avatar_41.cjs.entry.js +5521 -0
- package/dist/cjs/xpl-button-row.cjs.entry.js +13 -18
- package/dist/cjs/xpl-calendar.cjs.entry.js +66 -0
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +33 -0
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +37 -0
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +64 -0
- package/dist/cjs/xpl-grid-item.cjs.entry.js +16 -18
- package/dist/cjs/xpl-grid.cjs.entry.js +29 -28
- package/dist/cjs/xpl-large-card.cjs.entry.js +27 -0
- package/dist/cjs/xpl-list.cjs.entry.js +23 -30
- package/dist/cjs/xpl-main-nav.cjs.entry.js +18 -20
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +57 -0
- package/dist/cjs/xpl-table-header.cjs.entry.js +14 -0
- package/dist/cjs/xpl-toggle.cjs.entry.js +22 -30
- package/dist/cjs/xpl-toolbar.cjs.entry.js +28 -0
- package/dist/collection/collection-manifest.json +59 -32
- package/dist/collection/components/xpl-accordion/accordion.stories.js +76 -0
- package/dist/collection/components/xpl-accordion/xpl-accordion.js +236 -0
- package/dist/collection/components/xpl-application-shell/application-shell.stories.js +733 -0
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +163 -158
- package/dist/collection/components/xpl-avatar/avatar.stories.js +128 -0
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +171 -162
- package/dist/collection/components/xpl-backdrop/backdrop.stories.js +20 -0
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +39 -37
- package/dist/collection/components/xpl-badge/badge.stories.js +48 -0
- package/dist/collection/components/xpl-badge/xpl-badge.js +52 -52
- package/dist/collection/components/xpl-breadcrumbs/breadcrumbs.stories.js +130 -0
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +8 -12
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +5 -8
- package/dist/collection/components/xpl-button/button.stories.js +133 -0
- package/dist/collection/components/xpl-button/xpl-button.js +272 -245
- package/dist/collection/components/xpl-button-row/button-row.stories.js +69 -0
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +119 -116
- package/dist/collection/components/xpl-calendar/calendar.stories.js +59 -0
- package/dist/collection/components/xpl-calendar/xpl-calendar.js +224 -0
- package/dist/collection/components/xpl-checkbox/checkbox.stories.js +79 -0
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +226 -193
- package/dist/collection/components/xpl-choicelist/choicelist.stories.js +134 -0
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +220 -154
- package/dist/collection/components/xpl-content-area/content-area.stories.js +55 -0
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +35 -33
- package/dist/collection/components/xpl-dashboard/dashboard.stories.js +48 -0
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +7 -0
- package/dist/collection/components/xpl-data-card/data-card.stories.js +111 -0
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +316 -0
- package/dist/collection/components/xpl-divider/divider.stories.js +32 -0
- package/dist/collection/components/xpl-divider/xpl-divider.js +30 -31
- package/dist/collection/components/xpl-dropdown/dropdown.stories.js +383 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +68 -66
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +28 -29
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +148 -114
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +438 -256
- package/dist/collection/components/xpl-dynamic-table/dynamic-table.stories.js +161 -0
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +97 -0
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +52 -0
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +81 -0
- package/dist/{stories → collection/components/xpl-grid}/grid.stories.js +44 -68
- package/dist/collection/components/xpl-grid/xpl-grid.js +27 -24
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +100 -92
- package/dist/collection/components/xpl-header-accordion/header-accordion.stories.js +48 -0
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +200 -0
- package/dist/collection/components/xpl-icon/icons.stories.js +107 -0
- package/dist/collection/components/xpl-icon/xpl-icon.css +5 -0
- package/dist/collection/components/xpl-icon/xpl-icon.js +101 -0
- package/dist/collection/components/xpl-input/input.stories.js +531 -0
- package/dist/collection/components/xpl-input/xpl-input-color/color-utils.js +167 -0
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +387 -0
- package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +377 -0
- package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +276 -0
- package/dist/collection/components/xpl-input/xpl-input-time/time-utils.js +63 -0
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +425 -0
- package/dist/collection/components/xpl-input/xpl-input.js +729 -460
- package/dist/collection/components/xpl-large-card/large-card.stories.js +127 -0
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +81 -0
- package/dist/collection/components/xpl-list/list.stories.js +148 -0
- package/dist/collection/components/xpl-list/xpl-list.js +51 -53
- package/dist/collection/components/xpl-main-nav/main-nav.stories.js +307 -0
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +65 -63
- package/dist/collection/components/xpl-modal/modal.stories.js +87 -0
- package/dist/collection/components/xpl-modal/xpl-modal.js +139 -0
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +63 -61
- package/dist/collection/components/xpl-pagination/pagination.stories.js +35 -0
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +217 -172
- package/dist/collection/components/xpl-popover/popover.stories.js +164 -0
- package/dist/collection/components/xpl-popover/xpl-popover.js +346 -0
- package/dist/collection/components/xpl-progress/progress.stories.js +102 -0
- package/dist/collection/components/xpl-progress/xpl-progress.js +60 -0
- package/dist/collection/components/xpl-radio/radio.stories.js +91 -0
- package/dist/collection/components/xpl-radio/xpl-radio.js +188 -175
- package/dist/collection/components/xpl-secondary-nav/secondary-nav.stories.js +78 -0
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +5 -5
- package/dist/collection/components/xpl-select/select.stories.js +293 -0
- package/dist/collection/components/xpl-select/xpl-select.js +660 -308
- package/dist/collection/components/xpl-skeleton/skeleton.stories.js +67 -0
- package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +175 -0
- package/dist/collection/components/xpl-slideout/slideout.stories.js +103 -0
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +150 -0
- package/dist/collection/components/xpl-tab/xpl-tab.js +77 -0
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +56 -0
- package/dist/collection/components/xpl-table/table.stories.js +143 -0
- package/dist/collection/components/xpl-table/xpl-table.js +379 -214
- package/dist/collection/components/xpl-table-header/table-header.stories.js +122 -0
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +7 -0
- package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +71 -0
- package/dist/collection/components/xpl-table-header-cell/xpl-table-header-cell.js +198 -0
- package/dist/collection/components/xpl-tabs/tabs.stories.js +77 -0
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +206 -0
- package/dist/collection/components/xpl-tag/xpl-tag.js +27 -27
- package/dist/collection/components/xpl-toast/toast.stories.js +82 -0
- package/dist/collection/components/xpl-toast/xpl-toast.js +162 -0
- package/dist/collection/components/xpl-toggle/toggle.stories.js +84 -0
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +165 -157
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +56 -0
- package/dist/collection/components/xpl-tooltip/tooltip-arrow.js +2 -0
- package/dist/collection/components/xpl-tooltip/tooltip.stories.js +85 -0
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +75 -0
- package/dist/collection/components/xpl-utility-bar/utility-bar.stories.js +87 -0
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +89 -93
- package/dist/components/_commonjsHelpers.js +1 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +1 -0
- package/dist/components/index3.js +1 -0
- package/dist/components/v4.js +1 -0
- package/dist/components/xpl-accordion.d.ts +11 -0
- package/dist/components/xpl-accordion.js +1 -0
- package/dist/components/xpl-application-shell.d.ts +11 -0
- package/dist/components/xpl-application-shell.js +1 -0
- package/dist/components/xpl-avatar.d.ts +11 -0
- package/dist/components/xpl-avatar.js +1 -0
- package/dist/components/xpl-avatar2.js +1 -0
- package/dist/components/xpl-backdrop.d.ts +11 -0
- package/dist/components/xpl-backdrop.js +1 -0
- package/dist/components/xpl-backdrop2.js +1 -0
- package/dist/components/xpl-badge.d.ts +11 -0
- package/dist/components/xpl-badge.js +1 -0
- package/dist/components/xpl-badge2.js +1 -0
- package/dist/components/xpl-breadcrumb-item.d.ts +11 -0
- package/dist/components/xpl-breadcrumb-item.js +1 -0
- package/dist/components/xpl-breadcrumbs.d.ts +11 -0
- package/dist/components/xpl-breadcrumbs.js +1 -0
- package/dist/components/xpl-button-row.d.ts +11 -0
- package/dist/components/xpl-button-row.js +1 -0
- package/dist/components/xpl-button.d.ts +11 -0
- package/dist/components/xpl-button.js +1 -0
- package/dist/components/xpl-button2.js +1 -0
- package/dist/components/xpl-calendar.d.ts +11 -0
- package/dist/components/xpl-calendar.js +1 -0
- package/dist/components/xpl-checkbox.d.ts +11 -0
- package/dist/components/xpl-checkbox.js +1 -0
- package/dist/components/xpl-checkbox2.js +1 -0
- package/dist/components/xpl-choicelist.d.ts +11 -0
- package/dist/components/xpl-choicelist.js +1 -0
- package/dist/components/xpl-content-area.d.ts +11 -0
- package/dist/components/xpl-content-area.js +1 -0
- package/dist/components/xpl-dashboard.d.ts +11 -0
- package/dist/components/xpl-dashboard.js +1 -0
- package/dist/components/xpl-data-card.d.ts +11 -0
- package/dist/components/xpl-data-card.js +1 -0
- package/dist/components/xpl-divider.d.ts +11 -0
- package/dist/components/xpl-divider.js +1 -0
- package/dist/components/xpl-divider2.js +1 -0
- package/dist/components/xpl-dropdown-group.d.ts +11 -0
- package/dist/components/xpl-dropdown-group.js +1 -0
- package/dist/components/xpl-dropdown-group2.js +1 -0
- package/dist/components/xpl-dropdown-heading.d.ts +11 -0
- package/dist/components/xpl-dropdown-heading.js +1 -0
- package/dist/components/xpl-dropdown-heading2.js +1 -0
- package/dist/components/xpl-dropdown-option.d.ts +11 -0
- package/dist/components/xpl-dropdown-option.js +1 -0
- package/dist/components/xpl-dropdown-option2.js +1 -0
- package/dist/components/xpl-dropdown.d.ts +11 -0
- package/dist/components/xpl-dropdown.js +1 -0
- package/dist/components/xpl-dropdown2.js +1 -0
- package/dist/components/xpl-dynamic-table-cell.d.ts +11 -0
- package/dist/components/xpl-dynamic-table-cell.js +1 -0
- package/dist/components/xpl-dynamic-table-row.d.ts +11 -0
- package/dist/components/xpl-dynamic-table-row.js +1 -0
- package/dist/components/xpl-dynamic-table.d.ts +11 -0
- package/dist/components/xpl-dynamic-table.js +1 -0
- package/dist/components/xpl-grid-item.d.ts +11 -0
- package/dist/components/xpl-grid-item.js +1 -0
- package/dist/components/xpl-grid.d.ts +11 -0
- package/dist/components/xpl-grid.js +1 -0
- package/dist/components/xpl-header-accordion.d.ts +11 -0
- package/dist/components/xpl-header-accordion.js +1 -0
- package/dist/components/xpl-icon.d.ts +11 -0
- package/dist/components/xpl-icon.js +1 -0
- package/dist/components/xpl-icon2.js +6 -0
- package/dist/components/xpl-input-color.d.ts +11 -0
- package/dist/components/xpl-input-color.js +1 -0
- package/dist/components/xpl-input-date.d.ts +11 -0
- package/dist/components/xpl-input-date.js +1 -0
- package/dist/components/xpl-input-date2.js +1 -0
- package/dist/components/xpl-input-file.d.ts +11 -0
- package/dist/components/xpl-input-file.js +1 -0
- package/dist/components/xpl-input-file2.js +1 -0
- package/dist/components/xpl-input-time.d.ts +11 -0
- package/dist/components/xpl-input-time.js +1 -0
- package/dist/components/xpl-input.d.ts +11 -0
- package/dist/components/xpl-input.js +1 -0
- package/dist/components/xpl-input2.js +1 -0
- package/dist/components/xpl-large-card.d.ts +11 -0
- package/dist/components/xpl-large-card.js +1 -0
- package/dist/components/xpl-list.d.ts +11 -0
- package/dist/components/xpl-list.js +1 -0
- package/dist/components/xpl-main-nav.d.ts +11 -0
- package/dist/components/xpl-main-nav.js +1 -0
- package/dist/components/xpl-modal.d.ts +11 -0
- package/dist/components/xpl-modal.js +1 -0
- package/dist/components/xpl-nav-item.d.ts +11 -0
- package/dist/components/xpl-nav-item.js +1 -0
- package/dist/components/xpl-pagination.d.ts +11 -0
- package/dist/components/xpl-pagination.js +1 -0
- package/dist/components/xpl-popover.d.ts +11 -0
- package/dist/components/xpl-popover.js +1 -0
- package/dist/components/xpl-popover2.js +1 -0
- package/dist/components/xpl-progress.d.ts +11 -0
- package/dist/components/xpl-progress.js +1 -0
- package/dist/components/xpl-radio.d.ts +11 -0
- package/dist/components/xpl-radio.js +1 -0
- package/dist/components/xpl-radio2.js +1 -0
- package/dist/components/xpl-secondary-nav.d.ts +11 -0
- package/dist/components/xpl-secondary-nav.js +1 -0
- package/dist/components/xpl-select.d.ts +11 -0
- package/dist/components/xpl-select.js +1 -0
- package/dist/components/xpl-select2.js +1 -0
- package/dist/components/xpl-skeleton.d.ts +11 -0
- package/dist/components/xpl-skeleton.js +1 -0
- package/dist/components/xpl-slideout.d.ts +11 -0
- package/dist/components/xpl-slideout.js +1 -0
- package/dist/components/xpl-tab-panel.d.ts +11 -0
- package/dist/components/xpl-tab-panel.js +1 -0
- package/dist/components/xpl-tab.d.ts +11 -0
- package/dist/components/xpl-tab.js +1 -0
- package/dist/components/xpl-table-header-cell.d.ts +11 -0
- package/dist/components/xpl-table-header-cell.js +1 -0
- package/dist/components/xpl-table-header.d.ts +11 -0
- package/dist/components/xpl-table-header.js +1 -0
- package/dist/components/xpl-table.d.ts +11 -0
- package/dist/components/xpl-table.js +1 -0
- package/dist/components/xpl-tabs.d.ts +11 -0
- package/dist/components/xpl-tabs.js +1 -0
- package/dist/components/xpl-tag.d.ts +11 -0
- package/dist/components/xpl-tag.js +1 -0
- package/dist/components/xpl-tag2.js +1 -0
- package/dist/components/xpl-toast.d.ts +11 -0
- package/dist/components/xpl-toast.js +1 -0
- package/dist/components/xpl-toggle.d.ts +11 -0
- package/dist/components/xpl-toggle.js +1 -0
- package/dist/components/xpl-toolbar.d.ts +11 -0
- package/dist/components/xpl-toolbar.js +1 -0
- package/dist/components/xpl-tooltip.d.ts +11 -0
- package/dist/components/xpl-tooltip.js +1 -0
- package/dist/components/xpl-tooltip2.js +1 -0
- package/dist/components/xpl-utility-bar.d.ts +11 -0
- package/dist/components/xpl-utility-bar.js +1 -0
- package/dist/css/typography.stories.js +144 -0
- package/dist/esm/apollo-core.js +15 -12
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/{cjs/xpl-input.cjs.entry.js → esm/index-CH4yJ6Qx.js} +1 -99
- package/dist/esm/index-DhZas3eX.js +2132 -0
- package/dist/esm/loader.js +7 -14
- package/dist/esm/{v4-929670b7.js → v4-Cqlsd6nf.js} +1 -11
- package/dist/esm/xpl-accordion.entry.js +71 -0
- package/dist/esm/xpl-application-shell.entry.js +41 -44
- package/dist/esm/xpl-avatar_41.entry.js +5479 -0
- package/dist/esm/xpl-button-row.entry.js +13 -16
- package/dist/esm/xpl-calendar.entry.js +64 -0
- package/dist/esm/xpl-dynamic-table-cell.entry.js +31 -0
- package/dist/esm/xpl-dynamic-table-row.entry.js +35 -0
- package/dist/esm/xpl-dynamic-table.entry.js +62 -0
- package/dist/esm/xpl-grid-item.entry.js +16 -16
- package/dist/esm/xpl-grid.entry.js +29 -26
- package/dist/esm/xpl-large-card.entry.js +25 -0
- package/dist/esm/xpl-list.entry.js +23 -28
- package/dist/esm/xpl-main-nav.entry.js +18 -18
- package/dist/esm/xpl-table-header-cell.entry.js +55 -0
- package/dist/esm/xpl-table-header.entry.js +12 -0
- package/dist/esm/xpl-toggle.entry.js +22 -28
- package/dist/esm/xpl-toolbar.entry.js +26 -0
- package/dist/types/components/xpl-accordion/accordion.stories.d.ts +37 -0
- package/dist/types/components/xpl-accordion/xpl-accordion.d.ts +16 -0
- package/dist/types/components/xpl-application-shell/application-shell.stories.d.ts +60 -0
- package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +12 -27
- package/dist/types/components/xpl-avatar/avatar.stories.d.ts +75 -0
- package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +9 -9
- package/dist/types/components/xpl-backdrop/backdrop.stories.d.ts +17 -0
- package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +2 -6
- package/dist/types/components/xpl-badge/badge.stories.d.ts +44 -0
- package/dist/types/components/xpl-badge/xpl-badge.d.ts +3 -3
- package/dist/types/components/xpl-breadcrumbs/breadcrumbs.stories.d.ts +53 -0
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.d.ts +2 -5
- package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.d.ts +1 -4
- package/dist/types/components/xpl-button/button.stories.d.ts +92 -0
- package/dist/types/components/xpl-button/xpl-button.d.ts +14 -43
- package/dist/types/components/xpl-button-row/button-row.stories.d.ts +45 -0
- package/dist/types/components/xpl-button-row/xpl-button-row.d.ts +10 -32
- package/dist/types/components/xpl-calendar/calendar.stories.d.ts +58 -0
- package/dist/types/components/xpl-calendar/xpl-calendar.d.ts +18 -0
- package/dist/types/components/xpl-checkbox/checkbox.stories.d.ts +65 -0
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +13 -13
- package/dist/types/components/xpl-choicelist/choice.d.ts +5 -4
- package/dist/types/components/xpl-choicelist/choicelist.stories.d.ts +40 -0
- package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +16 -32
- package/dist/types/components/xpl-content-area/content-area.stories.d.ts +13 -0
- package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +2 -5
- package/dist/types/components/xpl-dashboard/dashboard.stories.d.ts +31 -0
- package/dist/types/components/xpl-dashboard/xpl-dashboard.d.ts +3 -0
- package/dist/types/components/xpl-data-card/data-card.stories.d.ts +114 -0
- package/dist/types/components/xpl-data-card/xpl-data-card.d.ts +21 -0
- package/dist/types/components/xpl-divider/divider.stories.d.ts +37 -0
- package/dist/types/components/xpl-divider/xpl-divider.d.ts +2 -7
- package/dist/types/components/xpl-dropdown/dropdown-option.d.ts +12 -0
- package/dist/types/components/xpl-dropdown/dropdown.stories.d.ts +25 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +4 -6
- package/dist/types/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.d.ts +2 -3
- package/dist/types/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.d.ts +13 -14
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +34 -35
- package/dist/types/components/xpl-dynamic-table/dynamic-table.stories.d.ts +41 -0
- package/dist/types/components/xpl-dynamic-table/xpl-dynamic-table.d.ts +14 -0
- package/dist/types/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.d.ts +9 -0
- package/dist/types/components/xpl-dynamic-table-row/xpl-dynamic-table-row.d.ts +11 -0
- package/dist/types/components/xpl-grid/grid.stories.d.ts +133 -0
- package/dist/types/components/xpl-grid/xpl-grid.d.ts +3 -3
- package/dist/types/components/xpl-grid-item/xpl-grid-item.d.ts +5 -5
- package/dist/types/components/xpl-header-accordion/header-accordion.stories.d.ts +44 -0
- package/dist/types/components/xpl-header-accordion/xpl-header-accordion.d.ts +20 -0
- package/dist/types/components/xpl-icon/icons.stories.d.ts +54 -0
- package/dist/types/components/xpl-icon/xpl-icon.d.ts +8 -0
- package/dist/types/components/xpl-input/input.stories.d.ts +206 -0
- package/dist/types/components/xpl-input/xpl-input-color/color-utils.d.ts +41 -0
- package/dist/types/components/xpl-input/xpl-input-color/xpl-input-color.d.ts +30 -0
- package/dist/types/components/xpl-input/xpl-input-date/xpl-input-date.d.ts +30 -0
- package/dist/types/components/xpl-input/xpl-input-file/xpl-input-file.d.ts +24 -0
- package/dist/types/components/xpl-input/xpl-input-time/time-utils.d.ts +5 -0
- package/dist/types/components/xpl-input/xpl-input-time/xpl-input-time.d.ts +39 -0
- package/dist/types/components/xpl-input/xpl-input.d.ts +45 -85
- package/dist/types/components/xpl-large-card/large-card.stories.d.ts +71 -0
- package/dist/types/components/xpl-large-card/xpl-large-card.d.ts +8 -0
- package/dist/types/components/xpl-list/list.stories.d.ts +63 -0
- package/dist/types/components/xpl-list/listitem.d.ts +14 -14
- package/dist/types/components/xpl-list/xpl-list.d.ts +2 -26
- package/dist/types/components/xpl-main-nav/main-nav.stories.d.ts +13 -0
- package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +6 -13
- package/dist/types/components/xpl-modal/modal.stories.d.ts +99 -0
- package/dist/types/components/xpl-modal/xpl-modal.d.ts +15 -0
- package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +4 -10
- package/dist/types/components/xpl-pagination/pagination.stories.d.ts +35 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +19 -22
- package/dist/types/components/xpl-popover/popover.stories.d.ts +12 -0
- package/dist/types/components/xpl-popover/xpl-popover.d.ts +24 -0
- package/dist/types/components/xpl-progress/progress.stories.d.ts +34 -0
- package/dist/types/components/xpl-progress/xpl-progress.d.ts +6 -0
- package/dist/types/components/xpl-radio/radio.stories.d.ts +79 -0
- package/dist/types/components/xpl-radio/xpl-radio.d.ts +11 -11
- package/dist/types/components/xpl-secondary-nav/secondary-nav.stories.d.ts +5 -0
- package/dist/types/components/xpl-secondary-nav/xpl-secondary-nav.d.ts +1 -1
- package/dist/types/components/xpl-select/select.stories.d.ts +164 -0
- package/dist/types/components/xpl-select/xpl-select.d.ts +59 -55
- package/dist/types/components/xpl-skeleton/skeleton.stories.d.ts +26 -0
- package/dist/types/components/xpl-skeleton/xpl-skeleton.d.ts +10 -0
- package/dist/types/components/xpl-slideout/slideout.stories.d.ts +114 -0
- package/dist/types/components/xpl-slideout/xpl-slideout.d.ts +14 -0
- package/dist/types/components/xpl-tab/xpl-tab.d.ts +8 -0
- package/dist/types/components/xpl-tab-panel/xpl-tab-panel.d.ts +5 -0
- package/dist/types/components/xpl-table/table.stories.d.ts +84 -0
- package/dist/types/components/xpl-table/xpl-table.d.ts +37 -23
- package/dist/types/components/xpl-table-header/table-header.stories.d.ts +103 -0
- package/dist/types/components/xpl-table-header/xpl-table-header.d.ts +3 -0
- package/dist/types/components/xpl-table-header-cell/table-header-cell.stories.d.ts +55 -0
- package/dist/types/components/xpl-table-header-cell/xpl-table-header-cell.d.ts +14 -0
- package/dist/types/components/xpl-tabs/tabs.stories.d.ts +40 -0
- package/dist/types/components/xpl-tabs/xpl-tabs.d.ts +28 -0
- package/dist/types/components/xpl-tag/xpl-tag.d.ts +2 -2
- package/dist/types/components/xpl-toast/toast.stories.d.ts +62 -0
- package/dist/types/components/xpl-toast/xpl-toast.d.ts +14 -0
- package/dist/types/components/xpl-toggle/toggle.stories.d.ts +67 -0
- package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +9 -21
- package/dist/types/components/xpl-toolbar/xpl-toolbar.d.ts +7 -0
- package/dist/types/components/xpl-tooltip/tooltip-arrow.d.ts +2 -0
- package/dist/types/components/xpl-tooltip/tooltip.stories.d.ts +39 -0
- package/dist/types/components/xpl-tooltip/xpl-tooltip.d.ts +6 -0
- package/dist/types/components/xpl-utility-bar/utility-bar.stories.d.ts +20 -0
- package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +7 -17
- package/dist/types/components.d.ts +3060 -498
- package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/css/typography.stories.d.ts +90 -0
- package/dist/types/stencil-public-runtime.d.ts +236 -34
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +5 -2
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/package.json +110 -61
- package/CHANGELOG.md +0 -106
- package/dist/apollo-core/p-10f00380.entry.js +0 -1
- package/dist/apollo-core/p-26ec64fe.entry.js +0 -1
- package/dist/apollo-core/p-2f90296c.js +0 -10
- package/dist/apollo-core/p-31acfdb4.entry.js +0 -1
- package/dist/apollo-core/p-4184ac44.entry.js +0 -1
- package/dist/apollo-core/p-4fa14839.entry.js +0 -1
- package/dist/apollo-core/p-55b87345.js +0 -2
- package/dist/apollo-core/p-63a6c98a.entry.js +0 -1
- package/dist/apollo-core/p-68c33b77.entry.js +0 -1
- package/dist/apollo-core/p-78d07caf.entry.js +0 -1
- package/dist/apollo-core/p-796957d3.entry.js +0 -1
- package/dist/apollo-core/p-88160d68.entry.js +0 -1
- package/dist/apollo-core/p-9ec318bb.entry.js +0 -1
- package/dist/apollo-core/p-a2a34e44.entry.js +0 -1
- package/dist/apollo-core/p-ad90fe4d.js +0 -1
- package/dist/apollo-core/p-beea2502.entry.js +0 -1
- package/dist/apollo-core/p-d499e43f.entry.js +0 -1
- package/dist/apollo-core/p-d8a3d94c.entry.js +0 -1
- package/dist/apollo-core/p-e047b446.entry.js +0 -1
- package/dist/cjs/index-2ab4832e.js +0 -2003
- package/dist/cjs/regular-872f5226.js +0 -16043
- package/dist/cjs/xpl-avatar_12.cjs.entry.js +0 -362
- package/dist/cjs/xpl-backdrop.cjs.entry.js +0 -21
- package/dist/cjs/xpl-choicelist.cjs.entry.js +0 -50
- package/dist/cjs/xpl-divider.cjs.entry.js +0 -19
- package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +0 -113
- package/dist/cjs/xpl-dropdown_2.cjs.entry.js +0 -121
- package/dist/cjs/xpl-pagination.cjs.entry.js +0 -79
- package/dist/cjs/xpl-select.cjs.entry.js +0 -610
- package/dist/collection/components/xpl-select/selectchoice.js +0 -1
- package/dist/custom-elements/index.d.ts +0 -219
- package/dist/custom-elements/index.js +0 -20353
- package/dist/esm/index-392b5b96.js +0 -1973
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/regular-86225e9d.js +0 -16041
- package/dist/esm/xpl-avatar_12.entry.js +0 -347
- package/dist/esm/xpl-backdrop.entry.js +0 -17
- package/dist/esm/xpl-choicelist.entry.js +0 -46
- package/dist/esm/xpl-divider.entry.js +0 -15
- package/dist/esm/xpl-dropdown-group_3.entry.js +0 -107
- package/dist/esm/xpl-dropdown_2.entry.js +0 -116
- package/dist/esm/xpl-pagination.entry.js +0 -75
- package/dist/esm/xpl-select.entry.js +0 -606
- package/dist/stories/application-shell.stories.js +0 -776
- package/dist/stories/avatar.stories.js +0 -173
- package/dist/stories/backdrop.stories.js +0 -18
- package/dist/stories/badge.stories.js +0 -48
- package/dist/stories/breadcrumbs.stories.js +0 -117
- package/dist/stories/button-row.stories.js +0 -68
- package/dist/stories/button.stories.js +0 -122
- package/dist/stories/checkbox.stories.js +0 -78
- package/dist/stories/choicelist.stories.js +0 -112
- package/dist/stories/content-area.stories.js +0 -53
- package/dist/stories/divider.stories.js +0 -34
- package/dist/stories/dropdown.stories.js +0 -377
- package/dist/stories/input.stories.js +0 -268
- package/dist/stories/list.stories.js +0 -154
- package/dist/stories/main-nav.stories.js +0 -308
- package/dist/stories/pagination.stories.js +0 -84
- package/dist/stories/radio.stories.js +0 -68
- package/dist/stories/secondary-nav.stories.js +0 -76
- package/dist/stories/select.stories.js +0 -119
- package/dist/stories/table.stories.js +0 -107
- package/dist/stories/tabs.stories.js +0 -24
- package/dist/stories/toggle.stories.js +0 -84
- package/dist/stories/utility-bar.stories.js +0 -94
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/application-shell.stories.d.ts +0 -71
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/avatar.stories.d.ts +0 -91
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/backdrop.stories.d.ts +0 -16
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/badge.stories.d.ts +0 -48
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -53
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/button-row.stories.d.ts +0 -49
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/button.stories.d.ts +0 -91
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/checkbox.stories.d.ts +0 -72
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/choicelist.stories.d.ts +0 -41
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/content-area.stories.d.ts +0 -29
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/divider.stories.d.ts +0 -40
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/dropdown.stories.d.ts +0 -135
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/grid.stories.d.ts +0 -150
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/input.stories.d.ts +0 -190
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/list.stories.d.ts +0 -71
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/main-nav.stories.d.ts +0 -30
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/radio.stories.d.ts +0 -64
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -16
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/select.stories.d.ts +0 -74
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/table.stories.d.ts +0 -49
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/toggle.stories.d.ts +0 -74
- package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -20
- package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +0 -10
- package/dist/types/components/xpl-select/selectchoice.d.ts +0 -4
- package/loader/package.json +0 -11
- /package/dist/collection/components/xpl-dropdown/{dropdownoption.js → dropdown-option.js} +0 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import flatpickr from "flatpickr";
|
|
3
|
+
const arrowSvg = (rotate = false) => `<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="${rotate
|
|
4
|
+
? 'M0.557948 5.6813L6.06209 0.132167C6.23831 -0.0440556 6.52327 -0.0440556 6.69949 0.132167L7.44187 0.874551C7.61809 1.05077 7.61809 1.33573 7.44187 1.51195L2.99882 6L7.44187 10.488C7.61809 10.6643 7.61809 10.9492 7.44187 11.1254L6.69949 11.8678C6.52327 12.0441 6.23831 12.0441 6.06209 11.8678L0.557948 6.3187C0.381726 6.14248 0.381726 5.85752 0.557948 5.6813Z'
|
|
5
|
+
: 'M7.44187 6.3187L1.93773 11.8678C1.76151 12.0441 1.47655 12.0441 1.30033 11.8678L0.557948 11.1254C0.381726 10.9492 0.381726 10.6643 0.557948 10.488L5.001 6L0.557948 1.51195C0.381726 1.33573 0.381726 1.05077 0.557948 0.874551L1.30033 0.132167C1.47655 -0.0440556 1.76151 -0.0440556 1.93773 0.132167L7.44187 5.6813C7.6181 5.85752 7.6181 6.14248 7.44187 6.3187Z'}" /></svg>`;
|
|
6
|
+
export class XplInputDate {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.dateFormat = 'Y-m-d';
|
|
9
|
+
this.mode = 'single';
|
|
10
|
+
this.valueChanged = (event) => {
|
|
11
|
+
const target = event.target;
|
|
12
|
+
this.valueChange.emit(target.value);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
onHasErrorStateChanged(newValue) {
|
|
16
|
+
this.hasErrorStateChanged.emit(newValue);
|
|
17
|
+
}
|
|
18
|
+
onValueChanged(newValue) {
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = this.flatpickrInstance) === null || _a === void 0 ? void 0 : _a.setDate(newValue);
|
|
21
|
+
}
|
|
22
|
+
componentDidLoad() {
|
|
23
|
+
this.flatpickrInstance = flatpickr(this.input, {
|
|
24
|
+
allowInput: true,
|
|
25
|
+
dateFormat: this.dateFormat,
|
|
26
|
+
defaultDate: this.value,
|
|
27
|
+
maxDate: this.max,
|
|
28
|
+
minDate: this.min,
|
|
29
|
+
mode: this.mode,
|
|
30
|
+
nextArrow: arrowSvg(),
|
|
31
|
+
prevArrow: arrowSvg(true),
|
|
32
|
+
onClose: (selectedDates) => {
|
|
33
|
+
const minRequiredDates = !this.required ? 0 : this.mode === 'single' ? 1 : 2;
|
|
34
|
+
this.hasErrorState = selectedDates.length < minRequiredDates ? 'required' : null;
|
|
35
|
+
if (selectedDates.length === 2) {
|
|
36
|
+
const [start, end] = selectedDates;
|
|
37
|
+
this.rangeSelected.emit({
|
|
38
|
+
start,
|
|
39
|
+
end,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return (h(Host, { key: '6024246dd7a92cc6396c634e8e87d614b1d860e3', class: {
|
|
47
|
+
'xpl-input-date': true,
|
|
48
|
+
[`xpl-input-date--mode-${this.mode}`]: true,
|
|
49
|
+
'xpl-input-date--error': !!this.hasErrorState,
|
|
50
|
+
} }, h("div", { key: '0c8fe7b8057715618ae040b64ee2ae6506051200', class: "xpl-input-wrapper" }, this.pre && (h("label", { key: 'd0d1048313962c7381b9fc4e2d07b107d42f86d1', class: "xpl-input-pre", htmlFor: this.inputId }, this.pre)), h("input", { key: '3daca1a28baf14701e4b7a9761d2ff91be8dcd96', type: "date", id: this.inputId, disabled: this.disabled, name: this.name, required: this.required, readonly: this.readonly, placeholder: this.placeholder, max: this.max, min: this.min, ref: (el) => {
|
|
51
|
+
this.input = el;
|
|
52
|
+
}, onChange: (event) => {
|
|
53
|
+
this.valueChanged(event);
|
|
54
|
+
} }), h("xpl-icon", { key: '82c57c4694c088debfb710e37bd90b5132fa3339', class: "xpl-input-calendar", icon: "calendar-month", size: 24 }), this.post && (h("label", { key: '553fa633312ed0adf1fd38352f40142e2b48eeaa', class: "xpl-input-post", htmlFor: this.inputId }, this.post)))));
|
|
55
|
+
}
|
|
56
|
+
static get is() { return "xpl-input-date"; }
|
|
57
|
+
static get properties() {
|
|
58
|
+
return {
|
|
59
|
+
"inputId": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "string",
|
|
64
|
+
"resolved": "string",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": true,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": "The `inputId` is used to associate the input with a label."
|
|
72
|
+
},
|
|
73
|
+
"getter": false,
|
|
74
|
+
"setter": false,
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"attribute": "input-id"
|
|
77
|
+
},
|
|
78
|
+
"disabled": {
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "boolean",
|
|
83
|
+
"resolved": "boolean",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": true,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "Whether the field is disabled"
|
|
91
|
+
},
|
|
92
|
+
"getter": false,
|
|
93
|
+
"setter": false,
|
|
94
|
+
"reflect": false,
|
|
95
|
+
"attribute": "disabled"
|
|
96
|
+
},
|
|
97
|
+
"name": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "string",
|
|
102
|
+
"resolved": "string",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": true,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": "Most inputs are used in forms, and should have a\n`name` associated with the input for handling form data.\n\nApplies to all input types."
|
|
110
|
+
},
|
|
111
|
+
"getter": false,
|
|
112
|
+
"setter": false,
|
|
113
|
+
"reflect": false,
|
|
114
|
+
"attribute": "name"
|
|
115
|
+
},
|
|
116
|
+
"required": {
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "boolean",
|
|
121
|
+
"resolved": "boolean",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": true,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": "Whether the input is required"
|
|
129
|
+
},
|
|
130
|
+
"getter": false,
|
|
131
|
+
"setter": false,
|
|
132
|
+
"reflect": false,
|
|
133
|
+
"attribute": "required"
|
|
134
|
+
},
|
|
135
|
+
"readonly": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "boolean",
|
|
140
|
+
"resolved": "boolean",
|
|
141
|
+
"references": {}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": true,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": "Whether the input is editable"
|
|
148
|
+
},
|
|
149
|
+
"getter": false,
|
|
150
|
+
"setter": false,
|
|
151
|
+
"reflect": false,
|
|
152
|
+
"attribute": "readonly"
|
|
153
|
+
},
|
|
154
|
+
"value": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string",
|
|
160
|
+
"references": {}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": true,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": "Including a `value` will pre-populate the input\nwith the given string."
|
|
167
|
+
},
|
|
168
|
+
"getter": false,
|
|
169
|
+
"setter": false,
|
|
170
|
+
"reflect": false,
|
|
171
|
+
"attribute": "value"
|
|
172
|
+
},
|
|
173
|
+
"placeholder": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"mutable": false,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "string",
|
|
178
|
+
"resolved": "string",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": true,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": "Placeholder text that appears when the field has no value\n\nApplies to text, password, number, and date inputs."
|
|
186
|
+
},
|
|
187
|
+
"getter": false,
|
|
188
|
+
"setter": false,
|
|
189
|
+
"reflect": false,
|
|
190
|
+
"attribute": "placeholder"
|
|
191
|
+
},
|
|
192
|
+
"post": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"mutable": false,
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "string",
|
|
197
|
+
"resolved": "string",
|
|
198
|
+
"references": {}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": true,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": "A string (recommended max 3 characters) that gets shown\nvisually to the left of (before) the input."
|
|
205
|
+
},
|
|
206
|
+
"getter": false,
|
|
207
|
+
"setter": false,
|
|
208
|
+
"reflect": false,
|
|
209
|
+
"attribute": "post"
|
|
210
|
+
},
|
|
211
|
+
"pre": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "string",
|
|
216
|
+
"resolved": "string",
|
|
217
|
+
"references": {}
|
|
218
|
+
},
|
|
219
|
+
"required": false,
|
|
220
|
+
"optional": true,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": "A string (recommended max 8 characters) that gets shown\nvisually to the right of (after) the input."
|
|
224
|
+
},
|
|
225
|
+
"getter": false,
|
|
226
|
+
"setter": false,
|
|
227
|
+
"reflect": false,
|
|
228
|
+
"attribute": "pre"
|
|
229
|
+
},
|
|
230
|
+
"max": {
|
|
231
|
+
"type": "any",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "number | string",
|
|
235
|
+
"resolved": "number | string",
|
|
236
|
+
"references": {}
|
|
237
|
+
},
|
|
238
|
+
"required": false,
|
|
239
|
+
"optional": true,
|
|
240
|
+
"docs": {
|
|
241
|
+
"tags": [],
|
|
242
|
+
"text": "Maximum value for the input."
|
|
243
|
+
},
|
|
244
|
+
"getter": false,
|
|
245
|
+
"setter": false,
|
|
246
|
+
"reflect": false,
|
|
247
|
+
"attribute": "max"
|
|
248
|
+
},
|
|
249
|
+
"min": {
|
|
250
|
+
"type": "any",
|
|
251
|
+
"mutable": false,
|
|
252
|
+
"complexType": {
|
|
253
|
+
"original": "number | string",
|
|
254
|
+
"resolved": "number | string",
|
|
255
|
+
"references": {}
|
|
256
|
+
},
|
|
257
|
+
"required": false,
|
|
258
|
+
"optional": true,
|
|
259
|
+
"docs": {
|
|
260
|
+
"tags": [],
|
|
261
|
+
"text": "The minimum value for the input."
|
|
262
|
+
},
|
|
263
|
+
"getter": false,
|
|
264
|
+
"setter": false,
|
|
265
|
+
"reflect": false,
|
|
266
|
+
"attribute": "min"
|
|
267
|
+
},
|
|
268
|
+
"dateFormat": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "string",
|
|
273
|
+
"resolved": "string",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": true,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": "The date format to use for the datepicker input.\nThis is used by flatpickr to format the date.\nDefault is 'Y-m-d' (e.g., 2023-10-01).\n\nSee https://flatpickr.js.org/formatting/ for more details."
|
|
281
|
+
},
|
|
282
|
+
"getter": false,
|
|
283
|
+
"setter": false,
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"attribute": "date-format",
|
|
286
|
+
"defaultValue": "'Y-m-d'"
|
|
287
|
+
},
|
|
288
|
+
"mode": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"mutable": false,
|
|
291
|
+
"complexType": {
|
|
292
|
+
"original": "'single' | /* \"multiple\" | */ 'range'",
|
|
293
|
+
"resolved": "\"range\" | \"single\"",
|
|
294
|
+
"references": {}
|
|
295
|
+
},
|
|
296
|
+
"required": false,
|
|
297
|
+
"optional": true,
|
|
298
|
+
"docs": {
|
|
299
|
+
"tags": [],
|
|
300
|
+
"text": "For datepicker inputs, whether to allow only a single\ndate or a range of dates. (Multiple non-consecutive\ndates planned to be supported in the future.)"
|
|
301
|
+
},
|
|
302
|
+
"getter": false,
|
|
303
|
+
"setter": false,
|
|
304
|
+
"reflect": false,
|
|
305
|
+
"attribute": "mode",
|
|
306
|
+
"defaultValue": "'single'"
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
static get states() {
|
|
311
|
+
return {
|
|
312
|
+
"hasErrorState": {}
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
static get events() {
|
|
316
|
+
return [{
|
|
317
|
+
"method": "valueChange",
|
|
318
|
+
"name": "valueChange",
|
|
319
|
+
"bubbles": true,
|
|
320
|
+
"cancelable": true,
|
|
321
|
+
"composed": true,
|
|
322
|
+
"docs": {
|
|
323
|
+
"tags": [],
|
|
324
|
+
"text": "Event that emits the current value of the input"
|
|
325
|
+
},
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "string",
|
|
328
|
+
"resolved": "string",
|
|
329
|
+
"references": {}
|
|
330
|
+
}
|
|
331
|
+
}, {
|
|
332
|
+
"method": "hasErrorStateChanged",
|
|
333
|
+
"name": "hasErrorStateChanged",
|
|
334
|
+
"bubbles": true,
|
|
335
|
+
"cancelable": true,
|
|
336
|
+
"composed": true,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": "Event that is emitted when the hasErrorState state changes."
|
|
340
|
+
},
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "string | null",
|
|
343
|
+
"resolved": "string",
|
|
344
|
+
"references": {}
|
|
345
|
+
}
|
|
346
|
+
}, {
|
|
347
|
+
"method": "rangeSelected",
|
|
348
|
+
"name": "rangeSelected",
|
|
349
|
+
"bubbles": true,
|
|
350
|
+
"cancelable": true,
|
|
351
|
+
"composed": true,
|
|
352
|
+
"docs": {
|
|
353
|
+
"tags": [],
|
|
354
|
+
"text": "Event that emits the selected date range when the mode is 'range'.\nThe emitted value is an object with `start` and `end` properties."
|
|
355
|
+
},
|
|
356
|
+
"complexType": {
|
|
357
|
+
"original": "{ start: Date; end: Date }",
|
|
358
|
+
"resolved": "{ start: Date; end: Date; }",
|
|
359
|
+
"references": {
|
|
360
|
+
"Date": {
|
|
361
|
+
"location": "global",
|
|
362
|
+
"id": "global::Date"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}];
|
|
367
|
+
}
|
|
368
|
+
static get watchers() {
|
|
369
|
+
return [{
|
|
370
|
+
"propName": "hasErrorState",
|
|
371
|
+
"methodName": "onHasErrorStateChanged"
|
|
372
|
+
}, {
|
|
373
|
+
"propName": "value",
|
|
374
|
+
"methodName": "onValueChanged"
|
|
375
|
+
}];
|
|
376
|
+
}
|
|
377
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
export class XplInputFile {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.accept = '';
|
|
5
|
+
this.multiple = false;
|
|
6
|
+
this.hideTriggerOnSelect = false;
|
|
7
|
+
this.hideFileNames = false;
|
|
8
|
+
this.hideAcceptText = false;
|
|
9
|
+
this.files = null;
|
|
10
|
+
this.openFileDialog = () => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (this.disabled) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
(_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.click();
|
|
16
|
+
};
|
|
17
|
+
this.handleFileChange = (event) => {
|
|
18
|
+
const target = event.target;
|
|
19
|
+
this.files = Array.from(target.files);
|
|
20
|
+
};
|
|
21
|
+
this.onRemoveFileByIndex = (fileIndex) => {
|
|
22
|
+
this.files = this.files.filter((_, i) => i !== fileIndex);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
onFilesChange(newFiles) {
|
|
26
|
+
this.inputChange.emit({
|
|
27
|
+
type: 'file',
|
|
28
|
+
value: newFiles,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async removeFileByIndex(fileIndex) {
|
|
32
|
+
this.onRemoveFileByIndex(fileIndex);
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
return (h(Host, { key: '984964735a57f0c1ae83b7a6e9ad548b8b732694', class: {
|
|
37
|
+
'xpl-input-file': true,
|
|
38
|
+
'xpl-input-file--hide-trigger-on-select': this.hideTriggerOnSelect,
|
|
39
|
+
'xpl-input-file--disabled': this.disabled,
|
|
40
|
+
} }, h("span", { key: '20da96646dda47226058869a6a3c188aa602ae7b', class: {
|
|
41
|
+
'xpl-input-file__trigger-wrapper': true,
|
|
42
|
+
'xpl-input-file__trigger-wrapper--hidden': this.hideTriggerOnSelect && ((_a = this.files) === null || _a === void 0 ? void 0 : _a.length) > 0,
|
|
43
|
+
}, role: "button", tabIndex: 0, onClick: this.openFileDialog }, h("slot", { key: 'd6355378f46c6a6edd193839e3ff24bd241db9b6', name: "trigger" })), ((_b = this.files) === null || _b === void 0 ? void 0 : _b.length) > 0 && !this.hideFileNames && (h("ul", { key: '48a7c3ff9668c7a7ad3e1f719c05f0439db0eb98', class: "xpl-input-file__file-list" }, this.files.map((file, fileIndex) => (h("li", { class: "xpl-input-file__file-item" }, h("span", { class: "xpl-text-callout" }, file.name), h("xpl-icon", { icon: "x-circle", size: 24, onClick: (e) => {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
this.onRemoveFileByIndex(fileIndex);
|
|
47
|
+
}, class: "xpl-input-file__remove-icon" })))))), this.accept && !this.hideAcceptText && (h("span", { key: '81a892b3c7cac161c4fe893b9e627055d43a13c8', class: "xpl-input-file__accept xpl-text-caption" }, "Accepted file types: ", this.accept)), h("input", { key: 'bb3e89c64ae62748b3e4afd5f80fcede37ae7b3a', onChange: this.handleFileChange, type: "file", ref: (el) => {
|
|
48
|
+
this.fileInput = el;
|
|
49
|
+
}, hidden: true, accept: this.accept, multiple: this.multiple, name: this.name })));
|
|
50
|
+
}
|
|
51
|
+
static get is() { return "xpl-input-file"; }
|
|
52
|
+
static get properties() {
|
|
53
|
+
return {
|
|
54
|
+
"disabled": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"mutable": false,
|
|
57
|
+
"complexType": {
|
|
58
|
+
"original": "boolean",
|
|
59
|
+
"resolved": "boolean",
|
|
60
|
+
"references": {}
|
|
61
|
+
},
|
|
62
|
+
"required": false,
|
|
63
|
+
"optional": true,
|
|
64
|
+
"docs": {
|
|
65
|
+
"tags": [],
|
|
66
|
+
"text": "Whether the field is disabled"
|
|
67
|
+
},
|
|
68
|
+
"getter": false,
|
|
69
|
+
"setter": false,
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"attribute": "disabled"
|
|
72
|
+
},
|
|
73
|
+
"name": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "string",
|
|
78
|
+
"resolved": "string",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": true,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Most inputs are used in forms, and should have a\n`name` associated with the input for handling form data."
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false,
|
|
89
|
+
"reflect": false,
|
|
90
|
+
"attribute": "name"
|
|
91
|
+
},
|
|
92
|
+
"_id": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "string",
|
|
97
|
+
"resolved": "string",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": true,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": "Because `id` is a reserved HTMLElement attribute,\nwe prefix it with an underscore here so that it\ndoesn't get automatically applied to the outer container."
|
|
105
|
+
},
|
|
106
|
+
"getter": false,
|
|
107
|
+
"setter": false,
|
|
108
|
+
"reflect": false,
|
|
109
|
+
"attribute": "_id"
|
|
110
|
+
},
|
|
111
|
+
"accept": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"mutable": false,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "string",
|
|
116
|
+
"resolved": "string",
|
|
117
|
+
"references": {}
|
|
118
|
+
},
|
|
119
|
+
"required": false,
|
|
120
|
+
"optional": true,
|
|
121
|
+
"docs": {
|
|
122
|
+
"tags": [],
|
|
123
|
+
"text": "The accepted file types for the file input.\nCorresponds to the `accept` attribute on the input element.\nExample: 'image/*' for all image types, '.pdf' for PDF files, etc."
|
|
124
|
+
},
|
|
125
|
+
"getter": false,
|
|
126
|
+
"setter": false,
|
|
127
|
+
"reflect": false,
|
|
128
|
+
"attribute": "accept",
|
|
129
|
+
"defaultValue": "''"
|
|
130
|
+
},
|
|
131
|
+
"multiple": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "boolean",
|
|
136
|
+
"resolved": "boolean",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": true,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": "Whether the user can select multiple files at once.\nCorresponds to the `multiple` attribute on the input element."
|
|
144
|
+
},
|
|
145
|
+
"getter": false,
|
|
146
|
+
"setter": false,
|
|
147
|
+
"reflect": false,
|
|
148
|
+
"attribute": "multiple",
|
|
149
|
+
"defaultValue": "false"
|
|
150
|
+
},
|
|
151
|
+
"hideTriggerOnSelect": {
|
|
152
|
+
"type": "boolean",
|
|
153
|
+
"mutable": false,
|
|
154
|
+
"complexType": {
|
|
155
|
+
"original": "boolean",
|
|
156
|
+
"resolved": "boolean",
|
|
157
|
+
"references": {}
|
|
158
|
+
},
|
|
159
|
+
"required": false,
|
|
160
|
+
"optional": true,
|
|
161
|
+
"docs": {
|
|
162
|
+
"tags": [],
|
|
163
|
+
"text": "Hides the trigger element when a file is selected."
|
|
164
|
+
},
|
|
165
|
+
"getter": false,
|
|
166
|
+
"setter": false,
|
|
167
|
+
"reflect": false,
|
|
168
|
+
"attribute": "hide-trigger-on-select",
|
|
169
|
+
"defaultValue": "false"
|
|
170
|
+
},
|
|
171
|
+
"hideFileNames": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "boolean",
|
|
176
|
+
"resolved": "boolean",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": true,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Hides the file names in the file upload component"
|
|
184
|
+
},
|
|
185
|
+
"getter": false,
|
|
186
|
+
"setter": false,
|
|
187
|
+
"reflect": false,
|
|
188
|
+
"attribute": "hide-file-names",
|
|
189
|
+
"defaultValue": "false"
|
|
190
|
+
},
|
|
191
|
+
"hideAcceptText": {
|
|
192
|
+
"type": "boolean",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "boolean",
|
|
196
|
+
"resolved": "boolean",
|
|
197
|
+
"references": {}
|
|
198
|
+
},
|
|
199
|
+
"required": false,
|
|
200
|
+
"optional": true,
|
|
201
|
+
"docs": {
|
|
202
|
+
"tags": [],
|
|
203
|
+
"text": "Hides the \"Accept\" text that indicates the accepted file types"
|
|
204
|
+
},
|
|
205
|
+
"getter": false,
|
|
206
|
+
"setter": false,
|
|
207
|
+
"reflect": false,
|
|
208
|
+
"attribute": "hide-accept-text",
|
|
209
|
+
"defaultValue": "false"
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
static get states() {
|
|
214
|
+
return {
|
|
215
|
+
"files": {}
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
static get events() {
|
|
219
|
+
return [{
|
|
220
|
+
"method": "inputChange",
|
|
221
|
+
"name": "inputChange",
|
|
222
|
+
"bubbles": true,
|
|
223
|
+
"cancelable": true,
|
|
224
|
+
"composed": true,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": "Event emitted when a file is selected.\nThe event detail contains the FileList object."
|
|
228
|
+
},
|
|
229
|
+
"complexType": {
|
|
230
|
+
"original": "{\n type: string;\n value: File[] | null;\n }",
|
|
231
|
+
"resolved": "{ type: string; value: File[]; }",
|
|
232
|
+
"references": {
|
|
233
|
+
"File": {
|
|
234
|
+
"location": "global",
|
|
235
|
+
"id": "global::File"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}];
|
|
240
|
+
}
|
|
241
|
+
static get methods() {
|
|
242
|
+
return {
|
|
243
|
+
"removeFileByIndex": {
|
|
244
|
+
"complexType": {
|
|
245
|
+
"signature": "(fileIndex: number) => Promise<void>",
|
|
246
|
+
"parameters": [{
|
|
247
|
+
"name": "fileIndex",
|
|
248
|
+
"type": "number",
|
|
249
|
+
"docs": "The index of the file to remove."
|
|
250
|
+
}],
|
|
251
|
+
"references": {
|
|
252
|
+
"Promise": {
|
|
253
|
+
"location": "global",
|
|
254
|
+
"id": "global::Promise"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"return": "Promise<void>"
|
|
258
|
+
},
|
|
259
|
+
"docs": {
|
|
260
|
+
"text": "Removes a file from the selected files by its index.",
|
|
261
|
+
"tags": [{
|
|
262
|
+
"name": "param",
|
|
263
|
+
"text": "fileIndex The index of the file to remove."
|
|
264
|
+
}]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
static get elementRef() { return "el"; }
|
|
270
|
+
static get watchers() {
|
|
271
|
+
return [{
|
|
272
|
+
"propName": "files",
|
|
273
|
+
"methodName": "onFilesChange"
|
|
274
|
+
}];
|
|
275
|
+
}
|
|
276
|
+
}
|