@paperless/core 1.11.2 → 1.12.1
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/CHANGELOG.md +24 -0
- package/dist/assets/icons/chevrons.svg +15 -0
- package/dist/assets/icons/deactivate.svg +14 -0
- package/dist/assets/icons/hashtag.svg +14 -0
- package/dist/{paperless/p-a2883f3f.entry.js → build/p-142d3a29.entry.js} +2 -2
- package/dist/build/p-142d3a29.entry.js.map +1 -0
- package/dist/build/p-440bcef4.entry.js +2 -0
- package/dist/build/p-440bcef4.entry.js.map +1 -0
- package/dist/build/p-477a27e2.entry.js +2 -0
- package/dist/build/p-477a27e2.entry.js.map +1 -0
- package/dist/build/p-f34e08ec.entry.js +2 -0
- package/dist/build/p-f34e08ec.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-avatar.cjs.entry.js +7 -2
- package/dist/cjs/p-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +52 -2
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-helper_3.cjs.entry.js +4 -0
- package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-label_3.cjs.entry.js +14 -6
- package/dist/cjs/p-label_3.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/assets/icons/chevrons.svg +15 -0
- package/dist/collection/assets/icons/deactivate.svg +14 -0
- package/dist/collection/assets/icons/hashtag.svg +14 -0
- package/dist/collection/components/atoms/avatar/avatar.component.css +1 -1
- package/dist/collection/components/atoms/avatar/avatar.component.js +27 -4
- package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -1
- package/dist/collection/components/atoms/button/button.component.css +1 -1
- package/dist/collection/components/atoms/button/button.component.js +21 -2
- package/dist/collection/components/atoms/button/button.component.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +1 -1
- package/dist/collection/components/atoms/icon/icon.component.js +1 -1
- package/dist/collection/components/atoms/label/label.component.css +1 -1
- package/dist/collection/components/atoms/label/label.component.js +24 -5
- package/dist/collection/components/atoms/label/label.component.js.map +1 -1
- package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -1
- package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -1
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +45 -2
- package/dist/collection/components/atoms/segment-item/segment-item.component.js.map +1 -1
- package/dist/collection/components/atoms/status/status.component.js +1 -1
- package/dist/collection/components/molecules/input-group/input-group.component.js +5 -1
- package/dist/collection/components/molecules/input-group/input-group.component.js.map +1 -1
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +1 -1
- package/dist/collection/components/molecules/select/select.component.js +1 -1
- package/dist/collection/components/molecules/table-header/table-header.component.js +1 -1
- package/dist/collection/components/molecules/toast/toast.component.js +1 -1
- package/dist/collection/components/organisms/table/table.component.js +1 -1
- package/dist/collection/utils/icons.js +6 -0
- package/dist/collection/utils/icons.js.map +1 -1
- package/dist/components/button.component.js +4 -2
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/icon.component.js +49 -0
- package/dist/components/icon.component.js.map +1 -1
- package/dist/components/input-group.component.js +4 -0
- package/dist/components/input-group.component.js.map +1 -1
- package/dist/components/label.component.js +5 -3
- package/dist/components/label.component.js.map +1 -1
- package/dist/components/p-avatar.js +10 -3
- package/dist/components/p-avatar.js.map +1 -1
- package/dist/components/segment-container.component.js +1 -1
- package/dist/components/segment-container.component.js.map +1 -1
- package/dist/components/segment-item.component.js +11 -2
- package/dist/components/segment-item.component.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-avatar.entry.js +7 -2
- package/dist/esm/p-avatar.entry.js.map +1 -1
- package/dist/esm/p-button_3.entry.js +52 -2
- package/dist/esm/p-button_3.entry.js.map +1 -1
- package/dist/esm/p-helper_3.entry.js +4 -0
- package/dist/esm/p-helper_3.entry.js.map +1 -1
- package/dist/esm/p-label_3.entry.js +15 -7
- package/dist/esm/p-label_3.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/{build/p-a2883f3f.entry.js → paperless/p-142d3a29.entry.js} +2 -2
- package/dist/paperless/p-142d3a29.entry.js.map +1 -0
- package/dist/paperless/p-440bcef4.entry.js +2 -0
- package/dist/paperless/p-440bcef4.entry.js.map +1 -0
- package/dist/paperless/p-477a27e2.entry.js +2 -0
- package/dist/paperless/p-477a27e2.entry.js.map +1 -0
- package/dist/paperless/p-f34e08ec.entry.js +2 -0
- package/dist/paperless/p-f34e08ec.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +6 -1
- package/dist/types/components/atoms/button/button.component.d.ts +4 -0
- package/dist/types/components/atoms/label/label.component.d.ts +5 -1
- package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +14 -0
- package/dist/types/components/molecules/input-group/input-group.component.d.ts +1 -0
- package/dist/types/components.d.ts +52 -2
- package/dist/types/utils/icons.d.ts +3 -0
- package/hydrate/index.js +85 -12
- package/package.json +1 -1
- package/dist/build/p-4fdbb588.entry.js +0 -2
- package/dist/build/p-4fdbb588.entry.js.map +0 -1
- package/dist/build/p-a2883f3f.entry.js.map +0 -1
- package/dist/build/p-c1e10b29.entry.js +0 -2
- package/dist/build/p-c1e10b29.entry.js.map +0 -1
- package/dist/build/p-e193e319.entry.js +0 -2
- package/dist/build/p-e193e319.entry.js.map +0 -1
- package/dist/paperless/p-4fdbb588.entry.js +0 -2
- package/dist/paperless/p-4fdbb588.entry.js.map +0 -1
- package/dist/paperless/p-a2883f3f.entry.js.map +0 -1
- package/dist/paperless/p-c1e10b29.entry.js +0 -2
- package/dist/paperless/p-c1e10b29.entry.js.map +0 -1
- package/dist/paperless/p-e193e319.entry.js +0 -2
- package/dist/paperless/p-e193e319.entry.js.map +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ const index = require('./index-1fde8b14.js');
|
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
9
|
-
return index.bootstrapLazy(JSON.parse("[[\"p-button_3.cjs\",[[4,\"p-button\",{\"variant\":[1],\"href\":[1],\"target\":[1],\"size\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table.cjs\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editButtonLoading\":[4,\"edit-button-loading\"],\"editButtonIcon\":[1,\"edit-button-icon\"],\"editButtonText\":[1,\"edit-button-text\"],\"editButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"_locales\":[32],\"_columns\":[32],\"_items\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"]],{\"items\":[\"_parseItems\"]}]]],[\"p-modal.cjs\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"padding\":[4],\"_closing\":[32]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"valueKey\":[1,\"value-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"keepQuery\":[4,\"keep-query\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_isAutoCompleting\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"]}]]],[\"p-datepicker.cjs\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer.cjs\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]}]]],[\"p-attachment.cjs\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar.cjs\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile.cjs\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast.cjs\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-divider.cjs\",[[1,\"p-divider\"]]],[\"p-accordion.cjs\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item.cjs\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header.cjs\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider.cjs\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-cropper.cjs\",[[1,\"p-cropper\",{\"variant\":[513],\"value\":[8],\"returnType\":[1,\"return-type\"],\"_loaded\":[32],\"_currentScale\":[32]},[[9,\"resize\",\"onResize\"]]]]],[\"p-info-panel.cjs\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status.cjs\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper-line.cjs\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-stepper.cjs\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"]},null,{\"activeStep\":[\"_generateSteps\"]}]]],[\"p-stepper-item.cjs\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-tab-group.cjs\",[[1,\"p-tab-group\"]]],[\"p-avatar.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"_src\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-avatar-group.cjs\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-card-body.cjs\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container.cjs\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout.cjs\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item.cjs\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column.cjs\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1540,\"is-last\"],\"sizes\":[1032]}]]],[\"p-toast-container.cjs\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar.cjs\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-counter.cjs\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator.cjs\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-drawer-body_3.cjs\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop.cjs\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4.cjs\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"rounded\":[4],\"padding\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3.cjs\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-dropdown-menu-container.cjs\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"scrollable\":[4]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[4],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3.cjs\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip.cjs\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]]]]],[\"p-helper_3.cjs\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"focusMethod\":[1,\"focus-method\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-illustration_6.cjs\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editLoading\":[4,\"edit-loading\"],\"editIcon\":[1,\"edit-icon\"],\"editText\":[1,\"edit-text\"],\"canEdit\":[1028,\"can-edit\"],\"editButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\"]]]]"), options);
|
|
9
|
+
return index.bootstrapLazy(JSON.parse("[[\"p-button_3.cjs\",[[4,\"p-button\",{\"variant\":[1],\"underline\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table.cjs\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editButtonLoading\":[4,\"edit-button-loading\"],\"editButtonIcon\":[1,\"edit-button-icon\"],\"editButtonText\":[1,\"edit-button-text\"],\"editButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"_locales\":[32],\"_columns\":[32],\"_items\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"]],{\"items\":[\"_parseItems\"]}]]],[\"p-modal.cjs\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"padding\":[4],\"_closing\":[32]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"valueKey\":[1,\"value-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"keepQuery\":[4,\"keep-query\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_isAutoCompleting\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"]}]]],[\"p-datepicker.cjs\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer.cjs\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]}]]],[\"p-attachment.cjs\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar.cjs\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile.cjs\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast.cjs\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-divider.cjs\",[[1,\"p-divider\"]]],[\"p-accordion.cjs\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item.cjs\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header.cjs\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider.cjs\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-cropper.cjs\",[[1,\"p-cropper\",{\"variant\":[513],\"value\":[8],\"returnType\":[1,\"return-type\"],\"_loaded\":[32],\"_currentScale\":[32]},[[9,\"resize\",\"onResize\"]]]]],[\"p-info-panel.cjs\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status.cjs\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper-line.cjs\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-stepper.cjs\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"]},null,{\"activeStep\":[\"_generateSteps\"]}]]],[\"p-stepper-item.cjs\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-tab-group.cjs\",[[1,\"p-tab-group\"]]],[\"p-avatar.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"letters\":[1],\"_src\":[32],\"_failed\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-avatar-group.cjs\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-card-body.cjs\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container.cjs\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout.cjs\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item.cjs\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column.cjs\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1540,\"is-last\"],\"sizes\":[1032]}]]],[\"p-toast-container.cjs\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar.cjs\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-counter.cjs\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator.cjs\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-drawer-body_3.cjs\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop.cjs\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4.cjs\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"rounded\":[4],\"padding\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3.cjs\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"iconPosition\":[1,\"icon-position\"],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"iconOnly\":[4,\"icon-only\"],\"size\":[513],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-dropdown-menu-container.cjs\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"scrollable\":[4]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[4],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3.cjs\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip.cjs\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]]]]],[\"p-helper_3.cjs\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"focusMethod\":[1,\"focus-method\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-illustration_6.cjs\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableEdit\":[4,\"enable-edit\"],\"editLoading\":[4,\"edit-loading\"],\"editIcon\":[1,\"edit-icon\"],\"editText\":[1,\"edit-text\"],\"canEdit\":[1028,\"can-edit\"],\"editButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\"]]]]"), options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1fde8b14.js');
|
|
6
6
|
|
|
7
|
-
const avatarComponentCss = ".inline-
|
|
7
|
+
const avatarComponentCss = ".inline-flex{display:inline-flex!important}.h-16{height:4rem!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-\\[3\\.125rem\\]{height:3.125rem!important}.h-\\[6\\.5rem\\]{height:6.5rem!important}.w-16{width:4rem!important}.w-6{width:1.5rem!important}.w-8{width:2rem!important}.w-\\[3\\.125rem\\]{width:3.125rem!important}.w-\\[6\\.5rem\\]{width:6.5rem!important}.flex-shrink-0{flex-shrink:0!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.overflow-hidden{overflow:hidden!important}.rounded{border-radius:.25rem!important}.object-cover{-o-object-fit:cover!important;object-fit:cover!important}.text-\\[0\\.625rem\\]{font-size:.625rem!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}*{box-sizing:border-box}p-avatar{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(176 178 203/var(--tw-text-opacity));display:inline-flex;flex-shrink:0;font-weight:600;justify-content:center;overflow:hidden;text-transform:uppercase}p-avatar>img{-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}p-avatar[size=xsmall]{font-size:.625rem}p-avatar[size=xsmall],p-avatar[size=xsmall]>img{height:1.5rem;width:1.5rem}p-avatar[size=small]{font-size:.75rem;line-height:1rem}p-avatar[size=small],p-avatar[size=small]>img{height:2rem;width:2rem}p-avatar[size=medium]{font-size:1rem;line-height:1.5rem}p-avatar[size=medium],p-avatar[size=medium]>img{height:3.125rem;width:3.125rem}p-avatar[size=large]{font-size:1rem;line-height:1.5rem}p-avatar[size=large],p-avatar[size=large]>img{height:4rem;width:4rem}p-avatar[size=xlarge]{font-size:1rem;line-height:1.5rem}p-avatar[size=xlarge],p-avatar[size=xlarge]>img{height:6.5rem;width:6.5rem}p-avatar[variant=company]{border-radius:.25rem}p-avatar[variant=company][size=large],p-avatar[variant=company][size=medium],p-avatar[variant=company][size=xlarge]{border-radius:.375rem}p-avatar[variant=user]{border-radius:100%}.static{position:static!important}";
|
|
8
8
|
|
|
9
9
|
const Avatar = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -13,9 +13,12 @@ const Avatar = class {
|
|
|
13
13
|
this.size = 'medium';
|
|
14
14
|
this.defaultImage = undefined;
|
|
15
15
|
this.src = undefined;
|
|
16
|
+
this.letters = undefined;
|
|
16
17
|
this._src = undefined;
|
|
18
|
+
this._failed = false;
|
|
17
19
|
}
|
|
18
20
|
onSrchChange(src) {
|
|
21
|
+
this._failed = false;
|
|
19
22
|
this._src = src;
|
|
20
23
|
}
|
|
21
24
|
componentWillLoad() {
|
|
@@ -25,10 +28,12 @@ const Avatar = class {
|
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
render() {
|
|
28
|
-
|
|
31
|
+
var _a;
|
|
32
|
+
return (index.h(index.Host, { class: "p-avatar" }, this._failed && ((_a = this.letters) === null || _a === void 0 ? void 0 : _a.length) ? (this.letters) : (index.h("img", { src: this._src, onError: () => this._setDefaultLink() }))));
|
|
29
33
|
}
|
|
30
34
|
_setDefaultLink() {
|
|
31
35
|
var _a;
|
|
36
|
+
this._failed = true;
|
|
32
37
|
this._src =
|
|
33
38
|
(_a = this.defaultImage) !== null && _a !== void 0 ? _a : (this.variant === 'user'
|
|
34
39
|
? '/assets/images/avatar/user-default.svg'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-avatar.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,
|
|
1
|
+
{"file":"p-avatar.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,qjEAAqjE;;MCOnkE,MAAM;;;mBAIwC,MAAM;gBAU5C,QAAQ;;;;;mBAkBW,KAAK;;EAGzC,YAAY,CAAC,GAAW;IACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;GACnB;EAED,iBAAiB;IACb,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACZ,IAAI,CAAC,eAAe,EAAE,CAAC;KAC1B;GACJ;EAED,MAAM;;IACF,QACIA,QAACC,UAAI,IAAC,KAAK,EAAC,UAAU,IACjB,IAAI,CAAC,OAAO,KAAI,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,CAAA,IACjC,IAAI,CAAC,OAAO,KAEZD,iBACI,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,GACvC,CACL,CACE,EACT;GACL;EAEO,eAAe;;IACnB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,IAAI;MACL,MAAA,IAAI,CAAC,YAAY,oCAChB,IAAI,CAAC,OAAO,KAAK,MAAM;UAClB,wCAAwC;UACxC,2CAA2C,CAAC,CAAC;GAC1D;;;;;;;;;","names":["h","Host"],"sources":["src/components/atoms/avatar/avatar.component.scss?tag=p-avatar","src/components/atoms/avatar/avatar.component.tsx"],"sourcesContent":["p-avatar {\n @apply inline-flex flex-shrink-0 items-center justify-center overflow-hidden bg-indigo-light;\n @apply font-semibold uppercase text-storm-light;\n\n > img {\n @apply object-cover object-center;\n }\n\n &[size='xsmall'] {\n @apply h-6 w-6 text-[0.625rem];\n\n > img {\n @apply h-6 w-6;\n }\n }\n\n &[size='small'] {\n @apply h-8 w-8 text-xs;\n\n > img {\n @apply h-8 w-8;\n }\n }\n\n &[size='medium'] {\n @apply h-[3.125rem] w-[3.125rem] text-base;\n\n > img {\n @apply h-[3.125rem] w-[3.125rem];\n }\n }\n\n &[size='large'] {\n @apply h-16 w-16 text-base;\n\n > img {\n @apply h-16 w-16;\n }\n }\n\n &[size='xlarge'] {\n @apply h-[6.5rem] w-[6.5rem] text-base;\n\n > img {\n @apply h-[6.5rem] w-[6.5rem];\n }\n }\n\n &[variant='company'] {\n @apply rounded;\n\n &[size='medium'],\n &[size='large'],\n &[size='xlarge'] {\n @apply rounded-large;\n }\n }\n\n &[variant='user'] {\n @apply rounded-round;\n }\n}\n","import { Component, h, Host, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'p-avatar',\n styleUrl: 'avatar.component.scss',\n // shadow: true,\n})\nexport class Avatar {\n /**\n * The variant of the avatar\n */\n @Prop({ reflect: true }) variant: 'user' | 'company' = 'user';\n\n /**\n * The size of the avatar\n */\n @Prop({ reflect: true }) size:\n | 'xsmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xlarge' = 'medium';\n\n /**\n * The default image to show on errors\n */\n @Prop() defaultImage: string;\n\n /**\n * The image used for the avatar\n */\n @Prop() src!: string;\n\n /**\n * The letters to show on the empty state variant\n */\n @Prop() letters: string;\n\n @State() private _src: string;\n @State() private _failed: boolean = false;\n\n @Watch('src')\n onSrchChange(src: string) {\n this._failed = false;\n this._src = src;\n }\n\n componentWillLoad() {\n this.onSrchChange(this.src);\n if (!this._src) {\n this._setDefaultLink();\n }\n }\n\n render() {\n return (\n <Host class=\"p-avatar\">\n {this._failed && this.letters?.length ? (\n this.letters\n ) : (\n <img\n src={this._src}\n onError={() => this._setDefaultLink()}\n />\n )}\n </Host>\n );\n }\n\n private _setDefaultLink() {\n this._failed = true;\n this._src =\n this.defaultImage ??\n (this.variant === 'user'\n ? '/assets/images/avatar/user-default.svg'\n : '/assets/images/avatar/company-default.svg');\n }\n}\n"],"version":3}
|
|
@@ -140,6 +140,22 @@ const chevron = `<?xml version="1.0" encoding="UTF-8"?>
|
|
|
140
140
|
</g>
|
|
141
141
|
</svg>`;
|
|
142
142
|
|
|
143
|
+
const chevrons = `<?xml version="1.0" encoding="UTF-8"?>
|
|
144
|
+
<svg width="1em" height="1em" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
145
|
+
<title>⚛️ Atoms/icons/Chevrons</title>
|
|
146
|
+
<defs>
|
|
147
|
+
<rect id="path-1" x="0" y="-4.54747351e-13" width="16" height="16"></rect>
|
|
148
|
+
</defs>
|
|
149
|
+
<g id="⚛️-Atoms/icons/Chevrons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
150
|
+
<mask id="mask-2" fill="white">
|
|
151
|
+
<use xlink:href="#path-1"></use>
|
|
152
|
+
</mask>
|
|
153
|
+
<g id="Bounding-box"></g>
|
|
154
|
+
<path d="M7.04443749,15.1075877 L3.71288307,11.9962056 C3.34547391,11.6530774 3.32579031,11.077073 3.66891852,10.7096639 C3.6832292,10.6943405 3.69806505,10.6795162 3.7133995,10.6652174 C4.11755563,10.2883575 4.74228617,10.2815126 5.15460242,10.6494268 L8,13.1884058 L8,13.1884058 L10.8453976,10.6494268 C11.2577138,10.2815126 11.8824444,10.2883575 12.2866005,10.6652174 C12.6542758,11.0080604 12.6744064,11.5840493 12.3315634,11.9517246 C12.3172646,11.9670591 12.3024403,11.9818949 12.2871169,11.9962056 L8.95556251,15.1075877 C8.41758445,15.6100124 7.58241555,15.6100124 7.04443749,15.1075877 Z" id="Chevron" fill="currentColor" fill-rule="nonzero" mask="url(#mask-2)"></path>
|
|
155
|
+
<path d="M7.04443749,5.10758771 L3.71288307,1.99620558 C3.34547391,1.65307738 3.32579031,1.07707303 3.66891852,0.709663874 C3.6832292,0.694340517 3.69806505,0.679516179 3.7133995,0.665217391 C4.11755563,0.288357469 4.74228617,0.281512603 5.15460242,0.649426839 L8,3.1884058 L8,3.1884058 L10.8453976,0.649426839 C11.2577138,0.281512603 11.8824444,0.288357469 12.2866005,0.665217391 C12.6542758,1.00806038 12.6744064,1.58404927 12.3315634,1.95172459 C12.3172646,1.96705905 12.3024403,1.9818949 12.2871169,1.99620558 L8.95556251,5.10758771 C8.41758445,5.61001243 7.58241555,5.61001243 7.04443749,5.10758771 Z" id="Chevron" fill="currentColor" fill-rule="nonzero" mask="url(#mask-2)" transform="translate(8, 3) scale(1, -1) translate(-8, -3)"></path>
|
|
156
|
+
</g>
|
|
157
|
+
</svg>`;
|
|
158
|
+
|
|
143
159
|
const clock = `<?xml version="1.0" encoding="UTF-8"?>
|
|
144
160
|
<svg width="1em" height="1em" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
145
161
|
<title>DA4F6F05-8E0E-4F99-8C04-325E1026BDED@1x</title>
|
|
@@ -224,6 +240,21 @@ const companies = `<?xml version="1.0" encoding="UTF-8"?>
|
|
|
224
240
|
</g>
|
|
225
241
|
</svg>`;
|
|
226
242
|
|
|
243
|
+
const deactivate = `<?xml version="1.0" encoding="UTF-8"?>
|
|
244
|
+
<svg width="1em" height="1em" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
245
|
+
<title>⚛️ Atoms/icons/deactivate</title>
|
|
246
|
+
<defs>
|
|
247
|
+
<rect id="path-1" x="0" y="-4.54747351e-13" width="16" height="16"></rect>
|
|
248
|
+
</defs>
|
|
249
|
+
<g id="⚛️-Atoms/icons/deactivate" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
250
|
+
<mask id="mask-2" fill="white">
|
|
251
|
+
<use xlink:href="#path-1"></use>
|
|
252
|
+
</mask>
|
|
253
|
+
<g id="Bounding-box"></g>
|
|
254
|
+
<path d="M4.46446609,3.28708828 C4.85499039,3.66987265 4.85499039,4.29048873 4.46446609,4.6732731 C3.53218703,5.58707504 3,6.82036922 3,8.13873517 C3,10.8454294 5.23857625,13.0396386 8,13.0396386 C10.7614237,13.0396386 13,10.8454294 13,8.13873517 C13,6.82036922 12.467813,5.58707504 11.5355339,4.6732731 C11.1450096,4.29048873 11.1450096,3.66987265 11.5355339,3.28708828 C11.9260582,2.90430391 12.5592232,2.90430391 12.9497475,3.28708828 C14.2533811,4.56488479 15,6.29510497 15,8.13873517 C15,11.9281071 11.8659932,15 8,15 C4.13400675,15 1,11.9281071 1,8.13873517 C1,6.29510497 1.7466189,4.56488479 3.05025253,3.28708828 C3.44077682,2.90430391 4.0739418,2.90430391 4.46446609,3.28708828 Z M8,1 C8.55228475,1 9,1.44771525 9,2 L9,7 C9,7.55228475 8.55228475,8 8,8 C7.44771525,8 7,7.55228475 7,7 L7,2 C7,1.44771525 7.44771525,1 8,1 Z" id="Combined-Shape" fill="currentColor" mask="url(#mask-2)"></path>
|
|
255
|
+
</g>
|
|
256
|
+
</svg>`;
|
|
257
|
+
|
|
227
258
|
const document = `<?xml version="1.0" encoding="UTF-8"?>
|
|
228
259
|
<svg width="1em" height="1em" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
229
260
|
<title>20D69539-7C20-49F0-9BCF-AE6F4D356668@1x</title>
|
|
@@ -387,6 +418,21 @@ const grid = `<?xml version="1.0" encoding="UTF-8"?>
|
|
|
387
418
|
</g>
|
|
388
419
|
</svg>`;
|
|
389
420
|
|
|
421
|
+
const hashtag = `<?xml version="1.0" encoding="UTF-8"?>
|
|
422
|
+
<svg width="1em" height="1em" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
423
|
+
<title>⚛️ Atoms/icons/hashtag</title>
|
|
424
|
+
<defs>
|
|
425
|
+
<rect id="path-1" x="0" y="-4.54747351e-13" width="16" height="16"></rect>
|
|
426
|
+
</defs>
|
|
427
|
+
<g id="⚛️-Atoms/icons/hashtag" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
428
|
+
<mask id="mask-2" fill="white">
|
|
429
|
+
<use xlink:href="#path-1"></use>
|
|
430
|
+
</mask>
|
|
431
|
+
<g id="Bounding-box"></g>
|
|
432
|
+
<path d="M12.2095291,0.0221975859 C12.7495545,0.137917306 13.0935221,0.669503727 12.9778024,1.20952909 L12.272,4.49979309 L15,4.5 C15.5522847,4.5 16,4.94771525 16,5.5 C16,6.05228475 15.5522847,6.5 15,6.5 L11.843,6.49979309 L11.2,9.49979309 L15,9.5 C15.5522847,9.5 16,9.94771525 16,10.5 C16,11.0522847 15.5522847,11.5 15,11.5 L10.772,11.4997931 L9.97780241,15.2095291 C9.86208269,15.7495545 9.33049627,16.0935221 8.79047091,15.9778024 C8.25044555,15.8620827 7.90647787,15.3304963 8.02219759,14.7904709 L8.727,11.4997931 L5.772,11.4997931 L4.97780241,15.2095291 C4.86208269,15.7495545 4.33049627,16.0935221 3.79047091,15.9778024 C3.25044555,15.8620827 2.90647787,15.3304963 3.02219759,14.7904709 L3.727,11.4997931 L1,11.5 C0.44771525,11.5 0,11.0522847 0,10.5 C0,9.94771525 0.44771525,9.5 1,9.5 L4.155,9.49979309 L4.798,6.49979309 L1,6.5 C0.44771525,6.5 0,6.05228475 0,5.5 C0,4.94771525 0.44771525,4.5 1,4.5 L5.227,4.49979309 L6.02219759,0.790470911 C6.13791731,0.25044555 6.66950373,-0.0935221344 7.20952909,0.0221975859 C7.74955445,0.137917306 8.09352213,0.669503727 7.97780241,1.20952909 L7.272,4.49979309 L10.227,4.49979309 L11.0221976,0.790470911 C11.1379173,0.25044555 11.6695037,-0.0935221344 12.2095291,0.0221975859 Z M9.798,6.49979309 L6.843,6.49979309 L6.2,9.49979309 L9.155,9.49979309 L9.798,6.49979309 Z" id="Combined-Shape" fill="currentColor" fill-rule="nonzero" mask="url(#mask-2)"></path>
|
|
433
|
+
</g>
|
|
434
|
+
</svg>`;
|
|
435
|
+
|
|
390
436
|
const headset = `<?xml version="1.0" encoding="UTF-8"?>
|
|
391
437
|
<svg width="1em" height="1em" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
392
438
|
<title>1B240603-203F-49BC-9F73-8609C2B2A397@1x</title>
|
|
@@ -958,11 +1004,13 @@ const icons = {
|
|
|
958
1004
|
checklist,
|
|
959
1005
|
checkmark,
|
|
960
1006
|
chevron,
|
|
1007
|
+
chevrons,
|
|
961
1008
|
clock,
|
|
962
1009
|
colleagues,
|
|
963
1010
|
cogs,
|
|
964
1011
|
comment,
|
|
965
1012
|
companies,
|
|
1013
|
+
deactivate,
|
|
966
1014
|
document,
|
|
967
1015
|
download,
|
|
968
1016
|
envelope,
|
|
@@ -974,6 +1022,7 @@ const icons = {
|
|
|
974
1022
|
folder,
|
|
975
1023
|
formula,
|
|
976
1024
|
grid,
|
|
1025
|
+
hashtag,
|
|
977
1026
|
headset,
|
|
978
1027
|
integration,
|
|
979
1028
|
list,
|
|
@@ -1009,13 +1058,14 @@ const icons = {
|
|
|
1009
1058
|
warning,
|
|
1010
1059
|
};
|
|
1011
1060
|
|
|
1012
|
-
const buttonComponentCss = ".flex{display:flex!important}.h-10{height:2.5rem!important}.h-full{height:100%!important}.w-auto{width:auto!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.rounded-large{border-radius:.375rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-indigo{background-color:rgb(82 138 250/var(--tw-bg-opacity))!important}.bg-indigo,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.font-semibold{font-weight:600!important}.outline{outline-style:solid!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}p-button{height:2.5rem;width:auto}p-button,p-button a,p-button button{display:flex;font-size:1rem;line-height:1.5rem}p-button a,p-button button{align-items:center;border:0;border-radius:.375rem!important;cursor:pointer;font-weight:600;height:100%;justify-content:center;outline:0;width:100%;will-change:filter}p-button a.icon-position-end>p-icon:not(.chevron),p-button a>p-loader,p-button button.icon-position-end>p-icon:not(.chevron),p-button button>p-loader{margin-left:.5rem}p-button a.icon-position-start>p-icon:not(.chevron),p-button button.icon-position-start>p-icon:not(.chevron){margin-right:.5rem}p-button a.variant-primary,p-button a.variant-secondary,p-button button.variant-primary,p-button button.variant-secondary{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);padding-left:1rem;padding-right:1rem}p-button a.variant-primary.active,p-button a.variant-primary:active,p-button a.variant-secondary.active,p-button a.variant-secondary:active,p-button button.variant-primary.active,p-button button.variant-primary:active,p-button button.variant-secondary.active,p-button button.variant-secondary:active{--tw-drop-shadow:drop-shadow(transparent);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}p-button a.variant-primary,p-button button.variant-primary{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity))}p-button a.variant-primary.active:not([disabled]),p-button a.variant-primary:active:not([disabled]),p-button button.variant-primary.active:not([disabled]),p-button button.variant-primary:active:not([disabled]){--tw-bg-opacity:1;background-color:rgb(44 75 169/var(--tw-bg-opacity))}@media (pointer:fine){p-button a.variant-primary:hover:not([disabled]),p-button button.variant-primary:hover:not([disabled]){--tw-drop-shadow:drop-shadow(0px 2px 4px rgba(44,75,169,.4));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}}p-button a.variant-secondary,p-button button.variant-secondary{--tw-border-opacity:1!important;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-style:solid!important;border-width:1px!important;color:rgb(81 83 107/var(--tw-text-opacity))}p-button a.variant-secondary.active:not([disabled]),p-button a.variant-secondary:active:not([disabled]),p-button button.variant-secondary.active:not([disabled]),p-button button.variant-secondary:active:not([disabled]){--tw-bg-opacity:1;background-color:rgb(247 250 252/var(--tw-bg-opacity))}@media (pointer:fine){p-button a.variant-secondary:hover:not([disabled]),p-button button.variant-secondary:hover:not([disabled]){--tw-drop-shadow:drop-shadow(0px 2px 4px rgba(176,178,203,.4));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}}p-button a.variant-text,p-button button.variant-text{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}p-button a.variant-text:hover:not([disabled]),p-button button.variant-text:hover:not([disabled]){--tw-text-opacity:1;color:rgb(44 75 169/var(--tw-text-opacity))}p-button a[disabled],p-button button[disabled]{opacity:.4}p-button a.should-inherit-text,p-button button.should-inherit-text{color:inherit!important;font-size:inherit!important;font-weight:inherit!important}p-button.has-chevron a.chevron-position-start,p-button.has-chevron button.chevron-position-start{padding-left:.5rem}p-button.has-chevron a.chevron-position-start>p-icon.chevron,p-button.has-chevron button.chevron-position-start>p-icon.chevron{margin-right:.5rem}p-button.has-chevron a.chevron-position-end,p-button.has-chevron button.chevron-position-end{padding-right:.5rem}p-button.has-chevron a.chevron-position-end>p-icon.chevron,p-button.has-chevron button.chevron-position-end>p-icon.chevron{margin-left:.5rem}p-button.has-chevron a.variant-secondary:hover:not([disabled]) p-icon:last-child,p-button.has-chevron button.variant-secondary:hover:not([disabled]) p-icon:last-child{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}p-button.has-icon-only{width:2.5rem}p-button.has-icon-only a,p-button.has-icon-only button{padding:0}p-button.has-icon-only a>p-icon:first-child,p-button.has-icon-only button>p-icon:first-child{margin-left:0;margin-right:0}p-button.has-icon-only a>p-loader,p-button.has-icon-only button>p-loader{margin-left:0}p-button.has-icon-only.has-chevron{width:auto}p-button.has-icon-only.has-chevron a.chevron-position-start,p-button.has-icon-only.has-chevron button.chevron-position-start{padding-right:.5rem}p-button.has-icon-only.has-chevron a.chevron-position-end,p-button.has-icon-only.has-chevron button.chevron-position-end{padding-left:.5rem}p-button.size-small{height:2rem}p-button.size-small a,p-button.size-small button{font-size:.875rem;line-height:1.25rem}p-button.size-small a>p-icon,p-button.size-small button>p-icon{font-size:1rem;line-height:1.5rem}p-button.size-small.has-icon-only{width:2rem}p-button.size-small.has-icon-only.has-chevron{width:auto}.static{position:static!important}";
|
|
1061
|
+
const buttonComponentCss = ".flex{display:flex!important}.h-10{height:2.5rem!important}.h-full{height:100%!important}.w-auto{width:auto!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.rounded-large{border-radius:.375rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-indigo{background-color:rgb(82 138 250/var(--tw-bg-opacity))!important}.bg-indigo,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.font-semibold{font-weight:600!important}.underline{text-decoration-line:underline!important}.outline{outline-style:solid!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}p-button{height:2.5rem;width:auto}p-button,p-button a,p-button button{display:flex;font-size:1rem;line-height:1.5rem}p-button a,p-button button{align-items:center;border:0;border-radius:.375rem!important;cursor:pointer;font-weight:600;height:100%;justify-content:center;outline:0;width:100%;will-change:filter}p-button a.icon-position-end>p-icon:not(.chevron),p-button a>p-loader,p-button button.icon-position-end>p-icon:not(.chevron),p-button button>p-loader{margin-left:.5rem}p-button a.icon-position-start>p-icon:not(.chevron),p-button button.icon-position-start>p-icon:not(.chevron){margin-right:.5rem}p-button a.variant-primary,p-button a.variant-secondary,p-button button.variant-primary,p-button button.variant-secondary{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);padding-left:1rem;padding-right:1rem}p-button a.variant-primary.active,p-button a.variant-primary:active,p-button a.variant-secondary.active,p-button a.variant-secondary:active,p-button button.variant-primary.active,p-button button.variant-primary:active,p-button button.variant-secondary.active,p-button button.variant-secondary:active{--tw-drop-shadow:drop-shadow(transparent);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}p-button a.variant-primary,p-button button.variant-primary{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity))}p-button a.variant-primary.active:not([disabled]),p-button a.variant-primary:active:not([disabled]),p-button button.variant-primary.active:not([disabled]),p-button button.variant-primary:active:not([disabled]){--tw-bg-opacity:1;background-color:rgb(44 75 169/var(--tw-bg-opacity))}@media (pointer:fine){p-button a.variant-primary:hover:not([disabled]),p-button button.variant-primary:hover:not([disabled]){--tw-drop-shadow:drop-shadow(0px 2px 4px rgba(44,75,169,.4));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}}p-button a.variant-secondary,p-button button.variant-secondary{--tw-border-opacity:1!important;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-style:solid!important;border-width:1px!important;color:rgb(81 83 107/var(--tw-text-opacity))}p-button a.variant-secondary.active:not([disabled]),p-button a.variant-secondary:active:not([disabled]),p-button button.variant-secondary.active:not([disabled]),p-button button.variant-secondary:active:not([disabled]){--tw-bg-opacity:1;background-color:rgb(247 250 252/var(--tw-bg-opacity))}@media (pointer:fine){p-button a.variant-secondary:hover:not([disabled]),p-button button.variant-secondary:hover:not([disabled]){--tw-drop-shadow:drop-shadow(0px 2px 4px rgba(176,178,203,.4));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}}p-button a.variant-text,p-button button.variant-text{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}p-button a.variant-text.has-underline,p-button button.variant-text.has-underline{text-decoration-line:underline;text-underline-offset:1px}p-button a.variant-text:hover:not([disabled]),p-button button.variant-text:hover:not([disabled]){--tw-text-opacity:1;color:rgb(44 75 169/var(--tw-text-opacity))}p-button a[disabled],p-button button[disabled]{opacity:.4}p-button a.should-inherit-text,p-button button.should-inherit-text{color:inherit!important;font-size:inherit!important;font-weight:inherit!important}p-button.has-chevron a.chevron-position-start,p-button.has-chevron button.chevron-position-start{padding-left:.5rem}p-button.has-chevron a.chevron-position-start>p-icon.chevron,p-button.has-chevron button.chevron-position-start>p-icon.chevron{margin-right:.5rem}p-button.has-chevron a.chevron-position-end,p-button.has-chevron button.chevron-position-end{padding-right:.5rem}p-button.has-chevron a.chevron-position-end>p-icon.chevron,p-button.has-chevron button.chevron-position-end>p-icon.chevron{margin-left:.5rem}p-button.has-chevron a.variant-secondary:hover:not([disabled]) p-icon:last-child,p-button.has-chevron button.variant-secondary:hover:not([disabled]) p-icon:last-child{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}p-button.has-icon-only{width:2.5rem}p-button.has-icon-only a,p-button.has-icon-only button{padding:0}p-button.has-icon-only a>p-icon:first-child,p-button.has-icon-only button>p-icon:first-child{margin-left:0;margin-right:0}p-button.has-icon-only a>p-loader,p-button.has-icon-only button>p-loader{margin-left:0}p-button.has-icon-only.has-chevron{width:auto}p-button.has-icon-only.has-chevron a.chevron-position-start,p-button.has-icon-only.has-chevron button.chevron-position-start{padding-right:.5rem}p-button.has-icon-only.has-chevron a.chevron-position-end,p-button.has-icon-only.has-chevron button.chevron-position-end{padding-left:.5rem}p-button.size-small{height:2rem}p-button.size-small a,p-button.size-small button{font-size:.875rem;line-height:1.25rem}p-button.size-small a>p-icon,p-button.size-small button>p-icon{font-size:1rem;line-height:1.5rem}p-button.size-small.has-icon-only{width:2rem}p-button.size-small.has-icon-only.has-chevron{width:auto}.static{position:static!important}";
|
|
1013
1062
|
|
|
1014
1063
|
const Button = class {
|
|
1015
1064
|
constructor(hostRef) {
|
|
1016
1065
|
index.registerInstance(this, hostRef);
|
|
1017
1066
|
this.onClick = index.createEvent(this, "onClick", 3);
|
|
1018
1067
|
this.variant = 'primary';
|
|
1068
|
+
this.underline = false;
|
|
1019
1069
|
this.href = undefined;
|
|
1020
1070
|
this.target = undefined;
|
|
1021
1071
|
this.size = 'medium';
|
|
@@ -1041,7 +1091,7 @@ const Button = class {
|
|
|
1041
1091
|
break;
|
|
1042
1092
|
}
|
|
1043
1093
|
const VariableTag = this.variant === 'text' ? 'a' : 'button';
|
|
1044
|
-
return (index.h(index.Host, { class: `p-button size-${this.size} ${this.iconOnly && 'has-icon-only'} ${this.chevron && 'has-chevron'}` }, index.h(VariableTag, { class: `variant-${this.variant} icon-position-${this.iconPosition} chevron-position-${this.chevronPosition} ${this.inheritText && 'should-inherit-text'}`, disabled: this.disabled, href: this.href, target: this.target }, this.chevron && this.chevronPosition === 'start' && (index.h("p-icon", { class: "chevron", variant: "chevron", rotate: this.chevron === 'up' ? 180 : 0 })), this.icon &&
|
|
1094
|
+
return (index.h(index.Host, { class: `p-button size-${this.size} ${this.iconOnly && 'has-icon-only'} ${this.chevron && 'has-chevron'}` }, index.h(VariableTag, { class: `variant-${this.variant} icon-position-${this.iconPosition} chevron-position-${this.chevronPosition} ${this.inheritText && 'should-inherit-text'} ${this.underline && 'has-underline'}`, disabled: this.disabled, href: this.href, target: this.target }, this.chevron && this.chevronPosition === 'start' && (index.h("p-icon", { class: "chevron", variant: "chevron", rotate: this.chevron === 'up' ? 180 : 0 })), this.icon &&
|
|
1045
1095
|
this.iconPosition === 'start' &&
|
|
1046
1096
|
!(this.iconOnly && this.loading) &&
|
|
1047
1097
|
this._getIcon(), index.h("slot", null), this.icon &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-button.p-icon.p-loader.ent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/button.component.scss?tag=p-button","src/components/atoms/button/button.component.tsx","src/components/atoms/icon/icon.component.scss?tag=p-icon","src/components/atoms/icon/icon.component.tsx","src/components/atoms/loader/loader.component.scss?tag=p-loader&encapsulation=shadow","src/components/atoms/loader/loader.component.tsx"],"sourcesContent":["import arrow from '../assets/icons/arrow.svg';\nimport attachment from '../assets/icons/attachment.svg';\nimport bread from '../assets/icons/bread.svg';\nimport calendar from '../assets/icons/calendar.svg';\nimport camera from '../assets/icons/camera.svg';\nimport car from '../assets/icons/car.svg';\nimport checklist from '../assets/icons/checklist.svg';\nimport checkmark from '../assets/icons/checkmark.svg';\nimport chevron from '../assets/icons/chevron.svg';\nimport clock from '../assets/icons/clock.svg';\nimport cogs from '../assets/icons/cogs.svg';\nimport colleagues from '../assets/icons/colleagues.svg';\nimport comment from '../assets/icons/comment.svg';\nimport companies from '../assets/icons/companies.svg';\nimport document from '../assets/icons/document.svg';\nimport download from '../assets/icons/download.svg';\nimport envelope from '../assets/icons/envelope.svg';\nimport explanation from '../assets/icons/explanation.svg';\nimport eye from '../assets/icons/eye.svg';\nimport faBuilding from '../assets/icons/fa/building.svg';\nimport faPiggy from '../assets/icons/fa/piggy.svg';\nimport filter from '../assets/icons/filter.svg';\nimport folder from '../assets/icons/folder.svg';\nimport formula from '../assets/icons/formula.svg';\nimport grid from '../assets/icons/grid.svg';\nimport headset from '../assets/icons/headset.svg';\nimport integration from '../assets/icons/integration.svg';\nimport list from '../assets/icons/list.svg';\nimport location from '../assets/icons/location.svg';\nimport megaphone from '../assets/icons/megaphone.svg';\nimport menu from '../assets/icons/menu.svg';\nimport minus from '../assets/icons/minus.svg';\nimport more from '../assets/icons/more.svg';\nimport negative from '../assets/icons/negative.svg';\nimport notification from '../assets/icons/notification.svg';\nimport pagination from '../assets/icons/pagination.svg';\nimport payment from '../assets/icons/payment.svg';\nimport pencil from '../assets/icons/pencil.svg';\nimport person from '../assets/icons/person.svg';\nimport plan from '../assets/icons/plan.svg';\nimport plus from '../assets/icons/plus.svg';\nimport question from '../assets/icons/question.svg';\nimport receipt from '../assets/icons/receipt.svg';\nimport reload from '../assets/icons/reload.svg';\nimport report from '../assets/icons/report.svg';\nimport search from '../assets/icons/search.svg';\nimport settings from '../assets/icons/settings.svg';\nimport sick from '../assets/icons/sick.svg';\nimport signout from '../assets/icons/signout.svg';\nimport switchIcon from '../assets/icons/switch.svg';\nimport tachometer from '../assets/icons/tachometer.svg';\nimport task from '../assets/icons/task.svg';\nimport template from '../assets/icons/template.svg';\nimport tool from '../assets/icons/tool.svg';\nimport trash from '../assets/icons/trash.svg';\nimport turn from '../assets/icons/turn.svg';\nimport upload from '../assets/icons/upload.svg';\nimport warning from '../assets/icons/warning.svg';\n\nexport default {\n arrow,\n attachment,\n bread,\n calendar,\n camera,\n car,\n checklist,\n checkmark,\n chevron,\n clock,\n colleagues,\n cogs,\n comment,\n companies,\n document,\n download,\n envelope,\n explanation,\n eye,\n faBuilding,\n faPiggy,\n filter,\n folder,\n formula,\n grid,\n headset,\n integration,\n list,\n location,\n megaphone,\n menu,\n minus,\n more,\n negative,\n notification,\n pagination,\n payment,\n pencil,\n person,\n plan,\n plus,\n question,\n reload,\n receipt,\n report,\n search,\n settings,\n sick,\n signout,\n switch: switchIcon,\n tachometer,\n task,\n template,\n tool,\n trash,\n turn,\n upload,\n warning,\n};\n","p-button {\n @apply flex h-10 w-auto text-base;\n\n button,\n a {\n outline: 0;\n border: 0;\n @apply h-full w-full;\n @apply rounded-large #{!important};\n @apply font-semibold leading-4;\n @apply flex items-center justify-center;\n @apply cursor-pointer text-base;\n\n will-change: filter;\n\n > p-loader {\n @apply ml-2;\n }\n\n // Icon positions\n &.icon-position-end {\n > p-icon:not(.chevron) {\n @apply ml-2;\n }\n }\n\n &.icon-position-start {\n > p-icon:not(.chevron) {\n @apply mr-2;\n }\n }\n\n // Variants\n &.variant-primary,\n &.variant-secondary {\n @apply px-4 filter;\n }\n\n &.variant-primary,\n &.variant-secondary {\n &:active,\n &.active {\n @apply drop-shadow-transparent;\n }\n }\n\n &.variant-primary {\n @apply bg-indigo text-white;\n\n &:active,\n &.active {\n &:not([disabled]) {\n @apply bg-indigo-dark;\n }\n }\n\n @media (pointer: fine) {\n &:hover:not([disabled]) {\n @apply drop-shadow-button-primary-hover;\n }\n }\n }\n\n &.variant-secondary {\n @apply border border-solid border-mystic-dark #{!important};\n @apply bg-white text-storm;\n\n &:active,\n &.active {\n &:not([disabled]) {\n @apply bg-mystic;\n }\n }\n\n @media (pointer: fine) {\n &:hover:not([disabled]) {\n @apply drop-shadow-button-secondary-hover;\n }\n }\n }\n\n &.variant-text {\n @apply text-indigo;\n\n &:hover:not([disabled]) {\n @apply text-indigo-dark;\n }\n }\n\n &[disabled] {\n @apply opacity-40;\n }\n\n &.should-inherit-text {\n color: inherit #{!important};\n font-size: inherit #{!important};\n font-weight: inherit #{!important};\n }\n }\n\n // chevron\n &.has-chevron {\n a,\n button {\n &.chevron-position-start {\n @apply pl-2;\n\n > p-icon.chevron {\n @apply mr-2;\n }\n }\n\n &.chevron-position-end {\n @apply pr-2;\n\n > p-icon.chevron {\n @apply ml-2;\n }\n }\n\n &.variant-secondary:hover:not([disabled]) p-icon:last-child {\n @apply text-indigo;\n }\n }\n }\n\n &.has-icon-only {\n @apply w-10;\n\n a,\n button {\n @apply p-0;\n\n > p-icon:first-child {\n @apply mx-0;\n }\n\n > p-loader {\n @apply ml-0;\n }\n }\n\n &.has-chevron {\n @apply w-auto;\n\n a,\n button {\n &.chevron-position-start {\n @apply pr-2;\n }\n\n &.chevron-position-end {\n @apply pl-2;\n }\n }\n }\n }\n\n // sizes\n &.size-small {\n @apply h-8;\n\n button,\n a {\n @apply text-sm;\n\n > p-icon {\n @apply text-base;\n }\n }\n\n &.has-icon-only {\n @apply w-8;\n\n &.has-chevron {\n @apply w-auto;\n }\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../icon/icon.component';\n\n@Component({\n tag: 'p-button',\n styleUrl: 'button.component.scss',\n // shadow: true,\n})\nexport class Button {\n /**\n * The variant of the button\n */\n @Prop() variant: 'primary' | 'secondary' | 'text' = 'primary';\n\n /**\n * Href in case of \"text\" version\n */\n @Prop() href: string;\n\n /**\n * Target in case of \"text\" version\n */\n @Prop() target: string;\n\n /**\n * The size of the button\n */\n @Prop() size: 'small' | 'medium' = 'medium';\n\n /**\n * Wether to show a loader or not\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether to show a chevron or not\n */\n @Prop() chevron: boolean | 'up' | 'down' = false;\n\n /**\n * Chevron position\n */\n @Prop() chevronPosition: 'start' | 'end' = 'end';\n\n /**\n * Wether the button is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Icon to show on the button\n */\n @Prop() icon: IconVariant;\n\n /**\n * Wether the button is icon only\n */\n @Prop() iconOnly: boolean = false;\n\n /**\n * Icon position\n */\n @Prop() iconPosition: 'start' | 'end' = 'end';\n\n /**\n * Icon flip\n */\n @Prop() iconFlip: IconFlipOptions;\n\n /**\n * Icon rotate\n */\n @Prop() iconRotate: RotateOptions;\n\n /**\n * Wether the button should inherit text styles\n */\n @Prop() inheritText: boolean = false;\n\n /**\n * Button click event\n */\n @Event({\n bubbles: false,\n })\n onClick: EventEmitter<MouseEvent>;\n\n render() {\n let loaderColor: 'white' | 'storm' | 'indigo' = 'white';\n switch (this.variant) {\n case 'secondary':\n loaderColor = 'storm';\n break;\n case 'text':\n loaderColor = 'indigo';\n break;\n }\n\n const VariableTag = this.variant === 'text' ? 'a' : 'button';\n\n return (\n <Host\n class={`p-button size-${this.size} ${\n this.iconOnly && 'has-icon-only'\n } ${this.chevron && 'has-chevron'}`}\n >\n <VariableTag\n class={`variant-${this.variant} icon-position-${\n this.iconPosition\n } chevron-position-${this.chevronPosition} ${\n this.inheritText && 'should-inherit-text'\n }`}\n disabled={this.disabled}\n href={this.href}\n target={this.target}\n >\n {this.chevron && this.chevronPosition === 'start' && (\n <p-icon\n class=\"chevron\"\n variant=\"chevron\"\n rotate={this.chevron === 'up' ? 180 : 0}\n />\n )}\n\n {this.icon &&\n this.iconPosition === 'start' &&\n !(this.iconOnly && this.loading) &&\n this._getIcon()}\n\n <slot />\n\n {this.icon &&\n this.iconPosition === 'end' &&\n !(this.iconOnly && this.loading) &&\n this._getIcon()}\n\n {this.loading && <p-loader color={loaderColor} />}\n\n {this.chevron && this.chevronPosition === 'end' && (\n <p-icon\n class=\"chevron\"\n variant=\"chevron\"\n rotate={this.chevron === 'up' ? 180 : 0}\n />\n )}\n </VariableTag>\n </Host>\n );\n }\n\n @Listen('click', { capture: true })\n handleClick(ev: MouseEvent) {\n if (this.loading || this.disabled) {\n ev.preventDefault();\n return;\n }\n\n this.onClick.emit(ev);\n }\n\n private _getIcon() {\n if (!this.icon) {\n return;\n }\n\n return (\n <p-icon\n variant={this.icon}\n flip={this.iconFlip}\n rotate={this.iconRotate}\n />\n );\n }\n}\n",":host {\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { RotateOptions, TextSizeOptions } from '../../../types/tailwind';\nimport icons from '../../../utils/icons';\n\nexport type IconVariant = keyof typeof icons;\nexport type IconFlipOptions = 'horizontal' | 'vertical';\n\n@Component({\n tag: 'p-icon',\n styleUrl: 'icon.component.scss',\n // shadow: true,\n})\nexport class Icon {\n /**\n * The icon the be displayed\n */\n @Prop() variant!: IconVariant;\n\n /**\n * The size of the icon, using tailwind sizes\n */\n @Prop() size: TextSizeOptions = 'auto';\n\n /**\n * Wether to rotate the icon x degrees\n */\n @Prop() rotate: RotateOptions = 0;\n\n /**\n * Wether to flip the icon horizontally or vertically\n */\n @Prop() flip: IconFlipOptions = null;\n\n render() {\n const icon = icons[this.variant];\n\n const styles = {\n 'p-icon flex': true,\n 'text-auto': this.size === 'auto',\n 'text-xxs': this.size === 'xxs',\n 'text-xs': this.size === 'xs',\n 'text-sm': this.size === 'sm',\n 'text-base': this.size === 'base',\n 'text-lg': this.size === 'lg',\n 'text-xl': this.size === 'xl',\n 'text-2xl': this.size === '2xl',\n 'text-3xl': this.size === '3xl',\n 'text-4xl': this.size === '4xl',\n 'text-5xl': this.size === '5xl',\n 'text-6xl': this.size === '6xl',\n transform: !!this.rotate || !!this.flip,\n 'scale-x-flip': this.flip === 'horizontal',\n 'scale-y-flip': this.flip === 'vertical',\n 'rotate-0': this.rotate === 0,\n 'rotate-25': this.rotate === 25,\n 'rotate-45': this.rotate === 45,\n 'rotate-90': this.rotate === 90,\n 'rotate-135': this.rotate === 135,\n 'rotate-180': this.rotate === 180,\n 'rotate-225': this.rotate === 225,\n 'rotate-270': this.rotate === 270,\n 'rotate-315': this.rotate === 315,\n '-rotate-0': this.rotate === -0,\n '-rotate-25': this.rotate === -25,\n '-rotate-45': this.rotate === -45,\n '-rotate-90': this.rotate === -90,\n '-rotate-135': this.rotate === -135,\n '-rotate-180': this.rotate === -180,\n '-rotate-225': this.rotate === -225,\n '-rotate-270': this.rotate === -270,\n '-rotate-315': this.rotate === -315,\n };\n\n return <Host class={styles} innerHTML={icon}></Host>;\n }\n}\n",":host {\n .loader {\n @apply inline-block h-[1em] w-[1em] rounded-round;\n @apply border-2 border-solid border-indigo-light border-t-indigo;\n animation: 500ms spin linear infinite;\n\n will-change: transform;\n\n &.color-storm {\n @apply border-storm-light/40 border-t-storm #{!important};\n }\n\n &.color-white {\n @apply border-indigo-light/40 border-t-white #{!important};\n }\n }\n\n .loading-screen {\n @apply w-screen-safe h-screen-safe fixed top-0 left-0;\n @apply flex items-center justify-center;\n @apply bg-mystic;\n\n z-index: 1001;\n\n .content {\n @apply max-w-xs;\n\n .loader-wrapper {\n @apply flex w-full justify-center;\n\n .loader {\n @apply text-4xl;\n }\n }\n }\n }\n}\n\n:host(.variant-ghost) {\n @apply box-border block;\n\n will-change: background, background-position-x, background-color;\n\n min-height: 1em;\n min-width: 1em;\n\n --loading-bg: #f7fafc;\n --loading-stripe: rgba(252, 253, 254, 1);\n\n background-color: var(--loading-bg);\n background: linear-gradient(\n 100deg,\n rgba(255, 255, 255, 0) 40%,\n var(--loading-stripe) 50%,\n rgba(255, 255, 255, 0) 60%\n )\n var(--loading-bg);\n background-size: 200% 100%;\n background-position-x: 180%;\n animation: 1s loading ease-in-out infinite;\n}\n\n@keyframes loading {\n to {\n background-position-x: -20%;\n }\n}\n\n@keyframes spin {\n 100% {\n transform: rotate(1turn);\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { Observable, Subscription } from 'rxjs';\n\n@Component({\n tag: 'p-loader',\n styleUrl: 'loader.component.scss',\n shadow: true,\n})\nexport class Loader {\n /**\n * Wether to show or hide the loader\n */\n @Prop() show: boolean | Observable<boolean> = true;\n\n /**\n * Variant of loader\n */\n @Prop() variant:\n | 'inline'\n | 'full-width'\n | 'full-screen'\n | 'modal'\n | 'ghost' = 'inline';\n\n /**\n * Color of the loader\n */\n @Prop() color: 'indigo' | 'white' | 'storm' = 'indigo';\n\n /**\n * !NOT IMPLEMENTED! Modal title for modal variant\n */\n @Prop() modalTitle: string;\n\n /**\n * !NOT IMPLEMENTED! Modal description for modal variant\n */\n @Prop() modalDescription: string;\n\n private _show = this.show;\n private _showSubscriber: Subscription;\n\n private _loader = (<div class={`loader color-${this.color}`}></div>);\n\n componentWillRender() {\n this._checkShow();\n }\n\n componentShouldUpdate() {\n this._checkShow();\n }\n\n render() {\n if (!this._show) {\n return;\n }\n\n if (this.variant === 'ghost') {\n return <Host class=\"p-loader variant-ghost\"></Host>;\n }\n\n if (this.variant === 'full-screen') {\n return (\n <Host class=\"p-loader variant-full-screen\">\n <div class=\"loading-screen\">\n <div class=\"content\">\n <slot />\n\n <div class=\"loader-wrapper\">{this._loader}</div>\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host\n class={`p-loader variant-default flex ${\n this.variant === 'full-width' &&\n 'w-full flex justify-center text-4xl'\n }`}\n >\n {this._loader}\n </Host>\n );\n }\n\n private _checkShow() {\n if (this._showSubscriber) {\n this._showSubscriber.unsubscribe();\n this._showSubscriber = null;\n }\n\n if (typeof this.show !== 'boolean') {\n this._showSubscriber = this.show?.subscribe(\n (show) => (this._show = show)\n );\n return;\n }\n\n this._show = this.show;\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-button.p-icon.p-loader.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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eAAe,GAAG,IAAI,CAAC;KAC/B;IAED,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;MAChC,IAAI,CAAC,eAAe,GAAG,MAAA,IAAI,CAAC,IAAI,0CAAE,SAAS,CACvC,CAAC,IAAI,MAAM,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAChC,CAAC;MACF,OAAO;KACV;IAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC;GAC1B;;;;;;;;","names":["h","Host"],"sources":["src/utils/icons.ts","src/components/atoms/button/button.component.scss?tag=p-button","src/components/atoms/button/button.component.tsx","src/components/atoms/icon/icon.component.scss?tag=p-icon","src/components/atoms/icon/icon.component.tsx","src/components/atoms/loader/loader.component.scss?tag=p-loader&encapsulation=shadow","src/components/atoms/loader/loader.component.tsx"],"sourcesContent":["import arrow from '../assets/icons/arrow.svg';\nimport attachment from '../assets/icons/attachment.svg';\nimport bread from '../assets/icons/bread.svg';\nimport calendar from '../assets/icons/calendar.svg';\nimport camera from '../assets/icons/camera.svg';\nimport car from '../assets/icons/car.svg';\nimport checklist from '../assets/icons/checklist.svg';\nimport checkmark from '../assets/icons/checkmark.svg';\nimport chevron from '../assets/icons/chevron.svg';\nimport chevrons from '../assets/icons/chevrons.svg';\nimport clock from '../assets/icons/clock.svg';\nimport cogs from '../assets/icons/cogs.svg';\nimport colleagues from '../assets/icons/colleagues.svg';\nimport comment from '../assets/icons/comment.svg';\nimport companies from '../assets/icons/companies.svg';\nimport deactivate from '../assets/icons/deactivate.svg';\nimport document from '../assets/icons/document.svg';\nimport download from '../assets/icons/download.svg';\nimport envelope from '../assets/icons/envelope.svg';\nimport explanation from '../assets/icons/explanation.svg';\nimport eye from '../assets/icons/eye.svg';\nimport faBuilding from '../assets/icons/fa/building.svg';\nimport faPiggy from '../assets/icons/fa/piggy.svg';\nimport filter from '../assets/icons/filter.svg';\nimport folder from '../assets/icons/folder.svg';\nimport formula from '../assets/icons/formula.svg';\nimport grid from '../assets/icons/grid.svg';\nimport hashtag from '../assets/icons/hashtag.svg';\nimport headset from '../assets/icons/headset.svg';\nimport integration from '../assets/icons/integration.svg';\nimport list from '../assets/icons/list.svg';\nimport location from '../assets/icons/location.svg';\nimport megaphone from '../assets/icons/megaphone.svg';\nimport menu from '../assets/icons/menu.svg';\nimport minus from '../assets/icons/minus.svg';\nimport more from '../assets/icons/more.svg';\nimport negative from '../assets/icons/negative.svg';\nimport notification from '../assets/icons/notification.svg';\nimport pagination from '../assets/icons/pagination.svg';\nimport payment from '../assets/icons/payment.svg';\nimport pencil from '../assets/icons/pencil.svg';\nimport person from '../assets/icons/person.svg';\nimport plan from '../assets/icons/plan.svg';\nimport plus from '../assets/icons/plus.svg';\nimport question from '../assets/icons/question.svg';\nimport receipt from '../assets/icons/receipt.svg';\nimport reload from '../assets/icons/reload.svg';\nimport report from '../assets/icons/report.svg';\nimport search from '../assets/icons/search.svg';\nimport settings from '../assets/icons/settings.svg';\nimport sick from '../assets/icons/sick.svg';\nimport signout from '../assets/icons/signout.svg';\nimport switchIcon from '../assets/icons/switch.svg';\nimport tachometer from '../assets/icons/tachometer.svg';\nimport task from '../assets/icons/task.svg';\nimport template from '../assets/icons/template.svg';\nimport tool from '../assets/icons/tool.svg';\nimport trash from '../assets/icons/trash.svg';\nimport turn from '../assets/icons/turn.svg';\nimport upload from '../assets/icons/upload.svg';\nimport warning from '../assets/icons/warning.svg';\n\nexport default {\n arrow,\n attachment,\n bread,\n calendar,\n camera,\n car,\n checklist,\n checkmark,\n chevron,\n chevrons,\n clock,\n colleagues,\n cogs,\n comment,\n companies,\n deactivate,\n document,\n download,\n envelope,\n explanation,\n eye,\n faBuilding,\n faPiggy,\n filter,\n folder,\n formula,\n grid,\n hashtag,\n headset,\n integration,\n list,\n location,\n megaphone,\n menu,\n minus,\n more,\n negative,\n notification,\n pagination,\n payment,\n pencil,\n person,\n plan,\n plus,\n question,\n reload,\n receipt,\n report,\n search,\n settings,\n sick,\n signout,\n switch: switchIcon,\n tachometer,\n task,\n template,\n tool,\n trash,\n turn,\n upload,\n warning,\n};\n","p-button {\n @apply flex h-10 w-auto text-base;\n\n button,\n a {\n outline: 0;\n border: 0;\n @apply h-full w-full;\n @apply rounded-large #{!important};\n @apply font-semibold leading-4;\n @apply flex items-center justify-center;\n @apply cursor-pointer text-base;\n\n will-change: filter;\n\n > p-loader {\n @apply ml-2;\n }\n\n // Icon positions\n &.icon-position-end {\n > p-icon:not(.chevron) {\n @apply ml-2;\n }\n }\n\n &.icon-position-start {\n > p-icon:not(.chevron) {\n @apply mr-2;\n }\n }\n\n // Variants\n &.variant-primary,\n &.variant-secondary {\n @apply px-4 filter;\n }\n\n &.variant-primary,\n &.variant-secondary {\n &:active,\n &.active {\n @apply drop-shadow-transparent;\n }\n }\n\n &.variant-primary {\n @apply bg-indigo text-white;\n\n &:active,\n &.active {\n &:not([disabled]) {\n @apply bg-indigo-dark;\n }\n }\n\n @media (pointer: fine) {\n &:hover:not([disabled]) {\n @apply drop-shadow-button-primary-hover;\n }\n }\n }\n\n &.variant-secondary {\n @apply border border-solid border-mystic-dark #{!important};\n @apply bg-white text-storm;\n\n &:active,\n &.active {\n &:not([disabled]) {\n @apply bg-mystic;\n }\n }\n\n @media (pointer: fine) {\n &:hover:not([disabled]) {\n @apply drop-shadow-button-secondary-hover;\n }\n }\n }\n\n &.variant-text {\n @apply text-indigo;\n\n &.has-underline {\n @apply underline underline-offset-1;\n }\n\n &:hover:not([disabled]) {\n @apply text-indigo-dark;\n }\n }\n\n &[disabled] {\n @apply opacity-40;\n }\n\n &.should-inherit-text {\n color: inherit #{!important};\n font-size: inherit #{!important};\n font-weight: inherit #{!important};\n }\n }\n\n // chevron\n &.has-chevron {\n a,\n button {\n &.chevron-position-start {\n @apply pl-2;\n\n > p-icon.chevron {\n @apply mr-2;\n }\n }\n\n &.chevron-position-end {\n @apply pr-2;\n\n > p-icon.chevron {\n @apply ml-2;\n }\n }\n\n &.variant-secondary:hover:not([disabled]) p-icon:last-child {\n @apply text-indigo;\n }\n }\n }\n\n &.has-icon-only {\n @apply w-10;\n\n a,\n button {\n @apply p-0;\n\n > p-icon:first-child {\n @apply mx-0;\n }\n\n > p-loader {\n @apply ml-0;\n }\n }\n\n &.has-chevron {\n @apply w-auto;\n\n a,\n button {\n &.chevron-position-start {\n @apply pr-2;\n }\n\n &.chevron-position-end {\n @apply pl-2;\n }\n }\n }\n }\n\n // sizes\n &.size-small {\n @apply h-8;\n\n button,\n a {\n @apply text-sm;\n\n > p-icon {\n @apply text-base;\n }\n }\n\n &.has-icon-only {\n @apply w-8;\n\n &.has-chevron {\n @apply w-auto;\n }\n }\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../icon/icon.component';\n\n@Component({\n tag: 'p-button',\n styleUrl: 'button.component.scss',\n // shadow: true,\n})\nexport class Button {\n /**\n * The variant of the button\n */\n @Prop() variant: 'primary' | 'secondary' | 'text' = 'primary';\n\n /**\n * Wether the text variant has underline\n */\n @Prop() underline: boolean = false;\n\n /**\n * Href in case of \"text\" version\n */\n @Prop() href: string;\n\n /**\n * Target in case of \"text\" version\n */\n @Prop() target: string;\n\n /**\n * The size of the button\n */\n @Prop() size: 'small' | 'medium' = 'medium';\n\n /**\n * Wether to show a loader or not\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether to show a chevron or not\n */\n @Prop() chevron: boolean | 'up' | 'down' = false;\n\n /**\n * Chevron position\n */\n @Prop() chevronPosition: 'start' | 'end' = 'end';\n\n /**\n * Wether the button is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Icon to show on the button\n */\n @Prop() icon: IconVariant;\n\n /**\n * Wether the button is icon only\n */\n @Prop() iconOnly: boolean = false;\n\n /**\n * Icon position\n */\n @Prop() iconPosition: 'start' | 'end' = 'end';\n\n /**\n * Icon flip\n */\n @Prop() iconFlip: IconFlipOptions;\n\n /**\n * Icon rotate\n */\n @Prop() iconRotate: RotateOptions;\n\n /**\n * Wether the button should inherit text styles\n */\n @Prop() inheritText: boolean = false;\n\n /**\n * Button click event\n */\n @Event({\n bubbles: false,\n })\n onClick: EventEmitter<MouseEvent>;\n\n render() {\n let loaderColor: 'white' | 'storm' | 'indigo' = 'white';\n switch (this.variant) {\n case 'secondary':\n loaderColor = 'storm';\n break;\n case 'text':\n loaderColor = 'indigo';\n break;\n }\n\n const VariableTag = this.variant === 'text' ? 'a' : 'button';\n\n return (\n <Host\n class={`p-button size-${this.size} ${\n this.iconOnly && 'has-icon-only'\n } ${this.chevron && 'has-chevron'}`}\n >\n <VariableTag\n class={`variant-${this.variant} icon-position-${\n this.iconPosition\n } chevron-position-${this.chevronPosition} ${\n this.inheritText && 'should-inherit-text'\n } ${\n this.underline && 'has-underline'\n }`}\n disabled={this.disabled}\n href={this.href}\n target={this.target}\n >\n {this.chevron && this.chevronPosition === 'start' && (\n <p-icon\n class=\"chevron\"\n variant=\"chevron\"\n rotate={this.chevron === 'up' ? 180 : 0}\n />\n )}\n\n {this.icon &&\n this.iconPosition === 'start' &&\n !(this.iconOnly && this.loading) &&\n this._getIcon()}\n\n <slot />\n\n {this.icon &&\n this.iconPosition === 'end' &&\n !(this.iconOnly && this.loading) &&\n this._getIcon()}\n\n {this.loading && <p-loader color={loaderColor} />}\n\n {this.chevron && this.chevronPosition === 'end' && (\n <p-icon\n class=\"chevron\"\n variant=\"chevron\"\n rotate={this.chevron === 'up' ? 180 : 0}\n />\n )}\n </VariableTag>\n </Host>\n );\n }\n\n @Listen('click', { capture: true })\n handleClick(ev: MouseEvent) {\n if (this.loading || this.disabled) {\n ev.preventDefault();\n return;\n }\n\n this.onClick.emit(ev);\n }\n\n private _getIcon() {\n if (!this.icon) {\n return;\n }\n\n return (\n <p-icon\n variant={this.icon}\n flip={this.iconFlip}\n rotate={this.iconRotate}\n />\n );\n }\n}\n",":host {\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { RotateOptions, TextSizeOptions } from '../../../types/tailwind';\nimport icons from '../../../utils/icons';\n\nexport type IconVariant = keyof typeof icons;\nexport type IconFlipOptions = 'horizontal' | 'vertical';\n\n@Component({\n tag: 'p-icon',\n styleUrl: 'icon.component.scss',\n // shadow: true,\n})\nexport class Icon {\n /**\n * The icon the be displayed\n */\n @Prop() variant!: IconVariant;\n\n /**\n * The size of the icon, using tailwind sizes\n */\n @Prop() size: TextSizeOptions = 'auto';\n\n /**\n * Wether to rotate the icon x degrees\n */\n @Prop() rotate: RotateOptions = 0;\n\n /**\n * Wether to flip the icon horizontally or vertically\n */\n @Prop() flip: IconFlipOptions = null;\n\n render() {\n const icon = icons[this.variant];\n\n const styles = {\n 'p-icon flex': true,\n 'text-auto': this.size === 'auto',\n 'text-xxs': this.size === 'xxs',\n 'text-xs': this.size === 'xs',\n 'text-sm': this.size === 'sm',\n 'text-base': this.size === 'base',\n 'text-lg': this.size === 'lg',\n 'text-xl': this.size === 'xl',\n 'text-2xl': this.size === '2xl',\n 'text-3xl': this.size === '3xl',\n 'text-4xl': this.size === '4xl',\n 'text-5xl': this.size === '5xl',\n 'text-6xl': this.size === '6xl',\n transform: !!this.rotate || !!this.flip,\n 'scale-x-flip': this.flip === 'horizontal',\n 'scale-y-flip': this.flip === 'vertical',\n 'rotate-0': this.rotate === 0,\n 'rotate-25': this.rotate === 25,\n 'rotate-45': this.rotate === 45,\n 'rotate-90': this.rotate === 90,\n 'rotate-135': this.rotate === 135,\n 'rotate-180': this.rotate === 180,\n 'rotate-225': this.rotate === 225,\n 'rotate-270': this.rotate === 270,\n 'rotate-315': this.rotate === 315,\n '-rotate-0': this.rotate === -0,\n '-rotate-25': this.rotate === -25,\n '-rotate-45': this.rotate === -45,\n '-rotate-90': this.rotate === -90,\n '-rotate-135': this.rotate === -135,\n '-rotate-180': this.rotate === -180,\n '-rotate-225': this.rotate === -225,\n '-rotate-270': this.rotate === -270,\n '-rotate-315': this.rotate === -315,\n };\n\n return <Host class={styles} innerHTML={icon}></Host>;\n }\n}\n",":host {\n .loader {\n @apply inline-block h-[1em] w-[1em] rounded-round;\n @apply border-2 border-solid border-indigo-light border-t-indigo;\n animation: 500ms spin linear infinite;\n\n will-change: transform;\n\n &.color-storm {\n @apply border-storm-light/40 border-t-storm #{!important};\n }\n\n &.color-white {\n @apply border-indigo-light/40 border-t-white #{!important};\n }\n }\n\n .loading-screen {\n @apply w-screen-safe h-screen-safe fixed top-0 left-0;\n @apply flex items-center justify-center;\n @apply bg-mystic;\n\n z-index: 1001;\n\n .content {\n @apply max-w-xs;\n\n .loader-wrapper {\n @apply flex w-full justify-center;\n\n .loader {\n @apply text-4xl;\n }\n }\n }\n }\n}\n\n:host(.variant-ghost) {\n @apply box-border block;\n\n will-change: background, background-position-x, background-color;\n\n min-height: 1em;\n min-width: 1em;\n\n --loading-bg: #f7fafc;\n --loading-stripe: rgba(252, 253, 254, 1);\n\n background-color: var(--loading-bg);\n background: linear-gradient(\n 100deg,\n rgba(255, 255, 255, 0) 40%,\n var(--loading-stripe) 50%,\n rgba(255, 255, 255, 0) 60%\n )\n var(--loading-bg);\n background-size: 200% 100%;\n background-position-x: 180%;\n animation: 1s loading ease-in-out infinite;\n}\n\n@keyframes loading {\n to {\n background-position-x: -20%;\n }\n}\n\n@keyframes spin {\n 100% {\n transform: rotate(1turn);\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { Observable, Subscription } from 'rxjs';\n\n@Component({\n tag: 'p-loader',\n styleUrl: 'loader.component.scss',\n shadow: true,\n})\nexport class Loader {\n /**\n * Wether to show or hide the loader\n */\n @Prop() show: boolean | Observable<boolean> = true;\n\n /**\n * Variant of loader\n */\n @Prop() variant:\n | 'inline'\n | 'full-width'\n | 'full-screen'\n | 'modal'\n | 'ghost' = 'inline';\n\n /**\n * Color of the loader\n */\n @Prop() color: 'indigo' | 'white' | 'storm' = 'indigo';\n\n /**\n * !NOT IMPLEMENTED! Modal title for modal variant\n */\n @Prop() modalTitle: string;\n\n /**\n * !NOT IMPLEMENTED! Modal description for modal variant\n */\n @Prop() modalDescription: string;\n\n private _show = this.show;\n private _showSubscriber: Subscription;\n\n private _loader = (<div class={`loader color-${this.color}`}></div>);\n\n componentWillRender() {\n this._checkShow();\n }\n\n componentShouldUpdate() {\n this._checkShow();\n }\n\n render() {\n if (!this._show) {\n return;\n }\n\n if (this.variant === 'ghost') {\n return <Host class=\"p-loader variant-ghost\"></Host>;\n }\n\n if (this.variant === 'full-screen') {\n return (\n <Host class=\"p-loader variant-full-screen\">\n <div class=\"loading-screen\">\n <div class=\"content\">\n <slot />\n\n <div class=\"loader-wrapper\">{this._loader}</div>\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host\n class={`p-loader variant-default flex ${\n this.variant === 'full-width' &&\n 'w-full flex justify-center text-4xl'\n }`}\n >\n {this._loader}\n </Host>\n );\n }\n\n private _checkShow() {\n if (this._showSubscriber) {\n this._showSubscriber.unsubscribe();\n this._showSubscriber = null;\n }\n\n if (typeof this.show !== 'boolean') {\n this._showSubscriber = this.show?.subscribe(\n (show) => (this._show = show)\n );\n return;\n }\n\n this._show = this.show;\n }\n}\n"],"version":3}
|
|
@@ -36,6 +36,7 @@ const inputGroupComponentCss = ".mb-\\[2px\\]{margin-bottom:2px!important}.box-b
|
|
|
36
36
|
const InputGroup = class {
|
|
37
37
|
constructor(hostRef) {
|
|
38
38
|
index.registerInstance(this, hostRef);
|
|
39
|
+
this._whitelistedTags = ['input', 'textarea'];
|
|
39
40
|
this.size = 'medium';
|
|
40
41
|
this.prefix = undefined;
|
|
41
42
|
this.suffix = undefined;
|
|
@@ -83,6 +84,9 @@ const InputGroup = class {
|
|
|
83
84
|
if (!input) {
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
87
|
+
if (this._whitelistedTags.indexOf(input.tagName) === -1) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
86
90
|
if (!input.classList.contains('p-input')) {
|
|
87
91
|
input.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names":["h","Host"],"sources":["src/components/atoms/helper/helper.component.scss?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx","src/components/molecules/input-error/input-error.component.tsx","src/components/molecules/input-group/input-group.component.scss?tag=p-input-group&encapsulation=shadow","src/components/molecules/input-group/input-group.component.tsx"],"sourcesContent":[":host {\n .helper {\n @apply inline-block cursor-pointer bg-no-repeat bg-center w-3 h-3;\n background-image: url(/assets/images/helper/helper.svg);\n\n &:hover {\n background-image: url(/assets/images/helper/helper-hover.svg);\n }\n }\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'p-helper',\n styleUrl: 'helper.component.scss',\n shadow: true,\n})\nexport class Helper {\n /**\n * The placement of the helper popover\n */\n @Prop() placement: Placement = 'top';\n\n render() {\n return (\n <Host class=\"p-helper\">\n <p-tooltip placement={this.placement}>\n <div slot=\"content\">\n <slot />\n </div>\n\n <div slot=\"trigger\" class=\"helper\"></div>\n </p-tooltip>\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'p-input-error',\n shadow: true,\n})\nexport class InputError {\n /**\n * The error to show\n */\n @Prop() error: string;\n\n /**\n * Wether to force show the tooltip\n */\n @Prop() forceShowTooltip = false;\n\n @State() private _showTooltip = false;\n\n render() {\n return (\n <Host class=\"p-input-error\">\n <p-tooltip\n variant=\"error\"\n content={this.error}\n show={this.forceShowTooltip}\n onIsOpen={(ev) => (this._showTooltip = ev.detail)}\n >\n <p-icon\n class={`${\n this._showTooltip\n ? 'text-negative'\n : 'text-negative-light'\n } hover:text-negative`}\n slot=\"trigger\"\n variant=\"explanation\"\n />\n </p-tooltip>\n </Host>\n );\n }\n}\n","@import '../../../style/form/mixins';\n\n@mixin slottedItems($prefix: false) {\n @include inputs($prefix, true) {\n @content;\n }\n}\n\n:host {\n @apply flex w-full flex-col;\n @apply outline-none #{!important};\n\n .input-label {\n @apply mb-[2px] text-xs font-semibold uppercase tracking-wider text-storm-vague;\n }\n\n .input-header {\n @apply mb-[2px] flex items-end gap-2;\n }\n\n .content {\n @apply flex w-full;\n\n .prefix,\n .suffix {\n @include inputDefaultState(false);\n @apply box-border flex-1 text-storm;\n @apply h-full;\n }\n\n .prefix {\n @apply rounded-br-none rounded-tr-none;\n @apply border-r-0 #{!important};\n @apply order-1;\n @apply pr-2;\n }\n\n .suffix {\n @apply rounded-bl-none rounded-tl-none;\n @apply order-3;\n @apply pl-2;\n @apply border-l-0 #{!important};\n }\n\n @include slottedItems() {\n @include inputDefaultState();\n @apply order-2;\n }\n\n @include slottedItems('.prefix') {\n @apply rounded-bl-none rounded-tl-none #{!important};\n @apply flex-auto;\n @apply border-l-0 pl-0 #{!important};\n }\n\n @include slottedItems('.suffix') {\n @apply rounded-br-none rounded-tr-none #{!important};\n @apply flex-auto;\n @apply border-r-0 pr-0 #{!important};\n }\n }\n}\n\n:host(.focused),\n:host([focused]),\n:host(:focus-within),\n:host(:focus) {\n @apply outline-none #{!important};\n\n .prefix,\n .suffix {\n @include inputFocusState();\n @apply text-indigo;\n }\n\n @include slottedItems() {\n @include inputFocusState();\n }\n}\n\n:host(.error),\n:host([error]) {\n .prefix,\n .suffix {\n @include inputErrorState();\n @apply text-negative;\n }\n\n .suffix {\n @apply items-start py-[calc(0.75rem-1px)];\n }\n\n @include slottedItems() {\n @include inputErrorState();\n\n &:focus,\n &:focus-within,\n &:focus-visible,\n &.focus,\n &[active],\n &.active {\n @include inputErrorState();\n }\n }\n}\n\n:host(.disabled),\n:host([disabled]) {\n .prefix,\n .suffix {\n @include inputDisabledState();\n }\n\n @include slottedItems() {\n @include inputDisabledState();\n pointer-events: none;\n }\n}\n\n:host(.size-small) {\n @include slottedItems() {\n @include inputSizeSmall();\n }\n}\n\n:host(.size-small.error),\n:host(.size-small[error]) {\n .suffix {\n @apply py-2;\n }\n}\n","import {\n Component,\n Element,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n tag: 'p-input-group',\n styleUrl: './input-group.component.scss',\n shadow: true,\n})\nexport class InputGroup {\n /**\n * The size of the input group\n */\n @Prop() size: 'small' | 'medium' = 'medium';\n\n /**\n * The prefix of the input group\n */\n @Prop() prefix: string;\n\n /**\n * The suffix of the input group\n */\n @Prop() suffix: string;\n\n /**\n * Icon of the input group\n */\n @Prop() icon: IconVariant;\n\n /**\n * Icon flip\n */\n @Prop() iconFlip: IconFlipOptions;\n\n /**\n * Icon rotate\n */\n @Prop() iconRotate: RotateOptions;\n\n /**\n * Icon position\n */\n @Prop() iconPosition: 'start' | 'end' = 'start';\n\n /**\n * The label of the input group\n */\n @Prop() label: string;\n\n /**\n * The helper of the input group\n */\n @Prop() helper: string;\n\n /**\n * Wether the field is required\n */\n @Prop({ reflect: true }) required: boolean;\n\n /**\n * The helper of the input group\n */\n @Prop({ reflect: true }) error: string;\n\n /**\n * Wether the input group is disabled\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Wether the input group is focused\n */\n @Prop({ reflect: true }) focused: boolean = false;\n\n /**\n * The method to use when focusing the input\n */\n @Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n @State() private _forceShowTooltip = false;\n\n componentWillRender() {\n this._setInputClasses();\n }\n\n render() {\n const {\n hasHeaderSlot,\n helper,\n label,\n prefix,\n suffix,\n errorAndErrorIsNotBoolean,\n errorVariant,\n } = this._getSlotInfo();\n\n return (\n <Host\n class={`p-input-group ${this.error?.length && 'error'} ${\n this.disabled && 'disabled'\n } ${this.focused && 'focused'} size-${this.size}`}\n >\n <div class=\"flex items-end justify-between\">\n {label && (\n <div\n class=\"input-label\"\n onClick={() => this._focusInput()}\n >\n {label}\n {this.required && (\n <span class=\"ml-1 text-negative\">*</span>\n )}\n </div>\n )}\n\n {(helper || hasHeaderSlot) && (\n <div class=\"input-header\">\n {hasHeaderSlot && <slot name=\"header\" />}\n {helper && (\n <p-helper\n class={`flex ${\n hasHeaderSlot ? 'ml-2' : ''\n }`}\n placement=\"top-end\"\n >\n {helper}\n </p-helper>\n )}\n </div>\n )}\n </div>\n <p-tooltip\n class=\"w-full\"\n variant=\"error-element\"\n content={this.error}\n show={\n errorAndErrorIsNotBoolean &&\n errorVariant === 'element' &&\n this._forceShowTooltip\n }\n enableUserInput={false}\n >\n <div class=\"content\" slot=\"trigger\">\n {(prefix ||\n (this.icon && this.iconPosition === 'start')) && (\n <div\n class={`prefix size-${this.size}`}\n onClick={() => this._focusInput()}\n >\n {this.icon && this.iconPosition === 'start' ? (\n <p-icon\n class=\"flex\"\n variant={this.icon}\n rotate={this.iconRotate}\n flip={this.iconFlip}\n />\n ) : (\n prefix\n )}\n </div>\n )}\n {(suffix ||\n (errorAndErrorIsNotBoolean &&\n errorVariant === 'icon') ||\n (this.icon && this.iconPosition === 'end')) && (\n <div\n class={`suffix size-${this.size}`}\n onClick={() => this._focusInput()}\n >\n {errorAndErrorIsNotBoolean &&\n errorVariant === 'icon' ? (\n <p-input-error\n error={this.error}\n forceShowTooltip={\n this._forceShowTooltip\n }\n />\n ) : this.icon && this.iconPosition === 'end' ? (\n <p-icon\n class=\"flex\"\n variant={this.icon}\n rotate={this.iconRotate}\n flip={this.iconFlip}\n />\n ) : (\n suffix\n )}\n </div>\n )}\n\n <slot name=\"input\" />\n </div>\n </p-tooltip>\n </Host>\n );\n }\n\n @Listen('focusin')\n handleFocusIn() {\n this._forceShowTooltip = true;\n }\n\n @Listen('focusout')\n handleFocusOut() {\n this._forceShowTooltip = false;\n }\n /* \n With this, we shall hack the system in ways no one would ever have thought.\n \n <div class=\"pl-0 pr-0 border-l-0 border-r-0 rounded-tl-none rounded-bl-none rounded-tr-none rounded-br-none\"></div>\n */\n private _setInputClasses() {\n const input = this._el.querySelector(':scope > [slot=\"input\"]');\n\n if (!input) {\n return;\n }\n\n if (!input.classList.contains('p-input')) {\n input.classList.add('p-input');\n }\n\n const { prefix, suffix, errorAndErrorIsNotBoolean, errorVariant } =\n this._getSlotInfo();\n\n if (\n suffix ||\n (errorAndErrorIsNotBoolean && errorVariant === 'icon') ||\n (this.icon && this.iconPosition === 'end')\n ) {\n input.classList.add(\n 'border-r-0',\n 'rounded-tr-none',\n 'rounded-br-none',\n 'pr-0'\n );\n } else {\n input.classList.remove(\n 'border-r-0',\n 'rounded-tr-none',\n 'rounded-br-none',\n 'pr-0'\n );\n }\n\n if (prefix || (this.icon && this.iconPosition === 'start')) {\n input.classList.add(\n 'border-l-0',\n 'rounded-tl-none',\n 'rounded-bl-none',\n 'pl-0'\n );\n } else {\n input.classList.remove(\n 'border-l-0',\n 'rounded-tl-none',\n 'rounded-bl-none',\n 'pl-0'\n );\n }\n\n if (this.size === 'small' && !input.classList.contains('size-small')) {\n input.classList.add('size-small');\n }\n\n if (this.size !== 'small' && input.classList.contains('size-small')) {\n input.classList.remove('size-small');\n }\n }\n\n private _getSlotInfo() {\n const hasHelperSlot = !!this._el.querySelector(\n ':scope > [slot=\"helper\"]'\n );\n const hasLabelSlot = !!this._el.querySelector(\n ':scope > [slot=\"label\"]'\n );\n const hasPrefixSlot = !!this._el.querySelector(\n ':scope > [slot=\"prefix\"]'\n );\n const hasSuffixSlot = !!this._el.querySelector(\n ':scope > [slot=\"suffix\"]'\n );\n const hasHeaderSlot = !!this._el.querySelector(\n ':scope > [slot=\"header\"]'\n );\n\n const helper = hasHelperSlot ? <slot name=\"helper\" /> : this.helper;\n const label = hasLabelSlot ? <slot name=\"label\" /> : this.label;\n const prefix = hasPrefixSlot ? <slot name=\"prefix\" /> : this.prefix;\n const suffix = hasSuffixSlot ? <slot name=\"suffix\" /> : this.suffix;\n\n const errorAndErrorIsNotBoolean =\n this.error &&\n typeof this.error === 'string' &&\n this.error !== 'true';\n\n return {\n hasHelperSlot,\n hasLabelSlot,\n hasPrefixSlot,\n hasSuffixSlot,\n hasHeaderSlot,\n helper,\n label,\n prefix,\n suffix,\n errorAndErrorIsNotBoolean,\n errorVariant: this._el.offsetWidth <= 72 ? 'element' : 'icon',\n };\n }\n\n private _focusInput() {\n const input = this._el.querySelector(':scope > [slot=\"input\"]');\n (input as HTMLElement)[this.focusMethod]();\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-helper.p-input-error.p-input-group.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,whBAAwhB;;MCQtiB,MAAM;;;qBAIgB,KAAK;;EAEpC,MAAM;IACF,QACIA,QAACC,UAAI,IAAC,KAAK,EAAC,UAAU,IAClBD,uBAAW,SAAS,EAAE,IAAI,CAAC,SAAS,IAChCA,iBAAK,IAAI,EAAC,SAAS,IACfA,qBAAQ,CACN,EAENA,iBAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,GAAO,CACjC,CACT,EACT;GACL;;;;MCpBQ,UAAU;;;;4BASQ,KAAK;wBAEA,KAAK;;EAErC,MAAM;IACF,QACIA,QAACC,UAAI,IAAC,KAAK,EAAC,eAAe,IACvBD,uBACI,OAAO,EAAC,OAAO,EACf,OAAO,EAAE,IAAI,CAAC,KAAK,EACnB,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAC3B,QAAQ,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,MAAM,CAAC,IAEjDA,oBACI,KAAK,EAAE,GACH,IAAI,CAAC,YAAY;UACX,eAAe;UACf,qBACV,sBAAsB,EACtB,IAAI,EAAC,SAAS,EACd,OAAO,EAAC,aAAa,GACvB,CACM,CACT,EACT;GACL;;;ACxCL,MAAM,sBAAsB,GAAG,gtlDAAgtlD;;MCiBlulD,UAAU;;;IA8EX,qBAAgB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBA1Ed,QAAQ;;;;;;wBA8BH,OAAO;;;;;oBAyBF,KAAK;mBAKN,KAAK;uBAKR,OAAO;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b,aAAa;MACb,MAAM;MACN,KAAK;MACL,MAAM;MACN,MAAM;MACN,yBAAyB;MACzB,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,GAAG,SAAS,GAAG,MAAM;KAChE,CAAC;GACL;EAEO,WAAW;IACf,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC/D,KAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;GAC9C;;;;;;;;;","names":["h","Host"],"sources":["src/components/atoms/helper/helper.component.scss?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx","src/components/molecules/input-error/input-error.component.tsx","src/components/molecules/input-group/input-group.component.scss?tag=p-input-group&encapsulation=shadow","src/components/molecules/input-group/input-group.component.tsx"],"sourcesContent":[":host {\n .helper {\n @apply inline-block cursor-pointer bg-no-repeat bg-center w-3 h-3;\n background-image: url(/assets/images/helper/helper.svg);\n\n &:hover {\n background-image: url(/assets/images/helper/helper-hover.svg);\n }\n }\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'p-helper',\n styleUrl: 'helper.component.scss',\n shadow: true,\n})\nexport class Helper {\n /**\n * The placement of the helper popover\n */\n @Prop() placement: Placement = 'top';\n\n render() {\n return (\n <Host class=\"p-helper\">\n <p-tooltip placement={this.placement}>\n <div slot=\"content\">\n <slot />\n </div>\n\n <div slot=\"trigger\" class=\"helper\"></div>\n </p-tooltip>\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'p-input-error',\n shadow: true,\n})\nexport class InputError {\n /**\n * The error to show\n */\n @Prop() error: string;\n\n /**\n * Wether to force show the tooltip\n */\n @Prop() forceShowTooltip = false;\n\n @State() private _showTooltip = false;\n\n render() {\n return (\n <Host class=\"p-input-error\">\n <p-tooltip\n variant=\"error\"\n content={this.error}\n show={this.forceShowTooltip}\n onIsOpen={(ev) => (this._showTooltip = ev.detail)}\n >\n <p-icon\n class={`${\n this._showTooltip\n ? 'text-negative'\n : 'text-negative-light'\n } hover:text-negative`}\n slot=\"trigger\"\n variant=\"explanation\"\n />\n </p-tooltip>\n </Host>\n );\n }\n}\n","@import '../../../style/form/mixins';\n\n@mixin slottedItems($prefix: false) {\n @include inputs($prefix, true) {\n @content;\n }\n}\n\n:host {\n @apply flex w-full flex-col;\n @apply outline-none #{!important};\n\n .input-label {\n @apply mb-[2px] text-xs font-semibold uppercase tracking-wider text-storm-vague;\n }\n\n .input-header {\n @apply mb-[2px] flex items-end gap-2;\n }\n\n .content {\n @apply flex w-full;\n\n .prefix,\n .suffix {\n @include inputDefaultState(false);\n @apply box-border flex-1 text-storm;\n @apply h-full;\n }\n\n .prefix {\n @apply rounded-br-none rounded-tr-none;\n @apply border-r-0 #{!important};\n @apply order-1;\n @apply pr-2;\n }\n\n .suffix {\n @apply rounded-bl-none rounded-tl-none;\n @apply order-3;\n @apply pl-2;\n @apply border-l-0 #{!important};\n }\n\n @include slottedItems() {\n @include inputDefaultState();\n @apply order-2;\n }\n\n @include slottedItems('.prefix') {\n @apply rounded-bl-none rounded-tl-none #{!important};\n @apply flex-auto;\n @apply border-l-0 pl-0 #{!important};\n }\n\n @include slottedItems('.suffix') {\n @apply rounded-br-none rounded-tr-none #{!important};\n @apply flex-auto;\n @apply border-r-0 pr-0 #{!important};\n }\n }\n}\n\n:host(.focused),\n:host([focused]),\n:host(:focus-within),\n:host(:focus) {\n @apply outline-none #{!important};\n\n .prefix,\n .suffix {\n @include inputFocusState();\n @apply text-indigo;\n }\n\n @include slottedItems() {\n @include inputFocusState();\n }\n}\n\n:host(.error),\n:host([error]) {\n .prefix,\n .suffix {\n @include inputErrorState();\n @apply text-negative;\n }\n\n .suffix {\n @apply items-start py-[calc(0.75rem-1px)];\n }\n\n @include slottedItems() {\n @include inputErrorState();\n\n &:focus,\n &:focus-within,\n &:focus-visible,\n &.focus,\n &[active],\n &.active {\n @include inputErrorState();\n }\n }\n}\n\n:host(.disabled),\n:host([disabled]) {\n .prefix,\n .suffix {\n @include inputDisabledState();\n }\n\n @include slottedItems() {\n @include inputDisabledState();\n pointer-events: none;\n }\n}\n\n:host(.size-small) {\n @include slottedItems() {\n @include inputSizeSmall();\n }\n}\n\n:host(.size-small.error),\n:host(.size-small[error]) {\n .suffix {\n @apply py-2;\n }\n}\n","import {\n Component,\n Element,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n tag: 'p-input-group',\n styleUrl: './input-group.component.scss',\n shadow: true,\n})\nexport class InputGroup {\n /**\n * The size of the input group\n */\n @Prop() size: 'small' | 'medium' = 'medium';\n\n /**\n * The prefix of the input group\n */\n @Prop() prefix: string;\n\n /**\n * The suffix of the input group\n */\n @Prop() suffix: string;\n\n /**\n * Icon of the input group\n */\n @Prop() icon: IconVariant;\n\n /**\n * Icon flip\n */\n @Prop() iconFlip: IconFlipOptions;\n\n /**\n * Icon rotate\n */\n @Prop() iconRotate: RotateOptions;\n\n /**\n * Icon position\n */\n @Prop() iconPosition: 'start' | 'end' = 'start';\n\n /**\n * The label of the input group\n */\n @Prop() label: string;\n\n /**\n * The helper of the input group\n */\n @Prop() helper: string;\n\n /**\n * Wether the field is required\n */\n @Prop({ reflect: true }) required: boolean;\n\n /**\n * The helper of the input group\n */\n @Prop({ reflect: true }) error: string;\n\n /**\n * Wether the input group is disabled\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Wether the input group is focused\n */\n @Prop({ reflect: true }) focused: boolean = false;\n\n /**\n * The method to use when focusing the input\n */\n @Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n @State() private _forceShowTooltip = false;\n\n private _whitelistedTags = ['input', 'textarea'];\n\n componentWillRender() {\n this._setInputClasses();\n }\n\n render() {\n const {\n hasHeaderSlot,\n helper,\n label,\n prefix,\n suffix,\n errorAndErrorIsNotBoolean,\n errorVariant,\n } = this._getSlotInfo();\n\n return (\n <Host\n class={`p-input-group ${this.error?.length && 'error'} ${\n this.disabled && 'disabled'\n } ${this.focused && 'focused'} size-${this.size}`}\n >\n <div class=\"flex items-end justify-between\">\n {label && (\n <div\n class=\"input-label\"\n onClick={() => this._focusInput()}\n >\n {label}\n {this.required && (\n <span class=\"ml-1 text-negative\">*</span>\n )}\n </div>\n )}\n\n {(helper || hasHeaderSlot) && (\n <div class=\"input-header\">\n {hasHeaderSlot && <slot name=\"header\" />}\n {helper && (\n <p-helper\n class={`flex ${\n hasHeaderSlot ? 'ml-2' : ''\n }`}\n placement=\"top-end\"\n >\n {helper}\n </p-helper>\n )}\n </div>\n )}\n </div>\n <p-tooltip\n class=\"w-full\"\n variant=\"error-element\"\n content={this.error}\n show={\n errorAndErrorIsNotBoolean &&\n errorVariant === 'element' &&\n this._forceShowTooltip\n }\n enableUserInput={false}\n >\n <div class=\"content\" slot=\"trigger\">\n {(prefix ||\n (this.icon && this.iconPosition === 'start')) && (\n <div\n class={`prefix size-${this.size}`}\n onClick={() => this._focusInput()}\n >\n {this.icon && this.iconPosition === 'start' ? (\n <p-icon\n class=\"flex\"\n variant={this.icon}\n rotate={this.iconRotate}\n flip={this.iconFlip}\n />\n ) : (\n prefix\n )}\n </div>\n )}\n {(suffix ||\n (errorAndErrorIsNotBoolean &&\n errorVariant === 'icon') ||\n (this.icon && this.iconPosition === 'end')) && (\n <div\n class={`suffix size-${this.size}`}\n onClick={() => this._focusInput()}\n >\n {errorAndErrorIsNotBoolean &&\n errorVariant === 'icon' ? (\n <p-input-error\n error={this.error}\n forceShowTooltip={\n this._forceShowTooltip\n }\n />\n ) : this.icon && this.iconPosition === 'end' ? (\n <p-icon\n class=\"flex\"\n variant={this.icon}\n rotate={this.iconRotate}\n flip={this.iconFlip}\n />\n ) : (\n suffix\n )}\n </div>\n )}\n\n <slot name=\"input\" />\n </div>\n </p-tooltip>\n </Host>\n );\n }\n\n @Listen('focusin')\n handleFocusIn() {\n this._forceShowTooltip = true;\n }\n\n @Listen('focusout')\n handleFocusOut() {\n this._forceShowTooltip = false;\n }\n /* \n With this, we shall hack the system in ways no one would ever have thought.\n \n <div class=\"pl-0 pr-0 border-l-0 border-r-0 rounded-tl-none rounded-bl-none rounded-tr-none rounded-br-none\"></div>\n */\n private _setInputClasses() {\n const input = this._el.querySelector(':scope > [slot=\"input\"]');\n\n if (!input) {\n return;\n }\n\n if (this._whitelistedTags.indexOf(input.tagName) === -1) {\n return;\n }\n\n if (!input.classList.contains('p-input')) {\n input.classList.add('p-input');\n }\n\n const { prefix, suffix, errorAndErrorIsNotBoolean, errorVariant } =\n this._getSlotInfo();\n\n if (\n suffix ||\n (errorAndErrorIsNotBoolean && errorVariant === 'icon') ||\n (this.icon && this.iconPosition === 'end')\n ) {\n input.classList.add(\n 'border-r-0',\n 'rounded-tr-none',\n 'rounded-br-none',\n 'pr-0'\n );\n } else {\n input.classList.remove(\n 'border-r-0',\n 'rounded-tr-none',\n 'rounded-br-none',\n 'pr-0'\n );\n }\n\n if (prefix || (this.icon && this.iconPosition === 'start')) {\n input.classList.add(\n 'border-l-0',\n 'rounded-tl-none',\n 'rounded-bl-none',\n 'pl-0'\n );\n } else {\n input.classList.remove(\n 'border-l-0',\n 'rounded-tl-none',\n 'rounded-bl-none',\n 'pl-0'\n );\n }\n\n if (this.size === 'small' && !input.classList.contains('size-small')) {\n input.classList.add('size-small');\n }\n\n if (this.size !== 'small' && input.classList.contains('size-small')) {\n input.classList.remove('size-small');\n }\n }\n\n private _getSlotInfo() {\n const hasHelperSlot = !!this._el.querySelector(\n ':scope > [slot=\"helper\"]'\n );\n const hasLabelSlot = !!this._el.querySelector(\n ':scope > [slot=\"label\"]'\n );\n const hasPrefixSlot = !!this._el.querySelector(\n ':scope > [slot=\"prefix\"]'\n );\n const hasSuffixSlot = !!this._el.querySelector(\n ':scope > [slot=\"suffix\"]'\n );\n const hasHeaderSlot = !!this._el.querySelector(\n ':scope > [slot=\"header\"]'\n );\n\n const helper = hasHelperSlot ? <slot name=\"helper\" /> : this.helper;\n const label = hasLabelSlot ? <slot name=\"label\" /> : this.label;\n const prefix = hasPrefixSlot ? <slot name=\"prefix\" /> : this.prefix;\n const suffix = hasSuffixSlot ? <slot name=\"suffix\" /> : this.suffix;\n\n const errorAndErrorIsNotBoolean =\n this.error &&\n typeof this.error === 'string' &&\n this.error !== 'true';\n\n return {\n hasHelperSlot,\n hasLabelSlot,\n hasPrefixSlot,\n hasSuffixSlot,\n hasHeaderSlot,\n helper,\n label,\n prefix,\n suffix,\n errorAndErrorIsNotBoolean,\n errorVariant: this._el.offsetWidth <= 72 ? 'element' : 'icon',\n };\n }\n\n private _focusInput() {\n const input = this._el.querySelector(':scope > [slot=\"input\"]');\n (input as HTMLElement)[this.focusMethod]();\n }\n}\n"],"version":3}
|