diff --git a/assets/css/admin/form-builder.css b/assets/css/admin/form-builder.css index 39a22d708..ed0dea820 100644 --- a/assets/css/admin/form-builder.css +++ b/assets/css/admin/form-builder.css @@ -819,6 +819,64 @@ html { --tw-contain-style: ; } +.wpuf-form-input,.wpuf-form-textarea,.wpuf-form-select,.wpuf-form-multiselect { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + border-radius: 0px; + padding-top: 0.5rem; + padding-right: 0.75rem; + padding-bottom: 0.5rem; + padding-left: 0.75rem; + font-size: 1rem; + line-height: 1.5rem; + --tw-shadow: 0 0 #0000; +} + +.wpuf-form-input:focus, .wpuf-form-textarea:focus, .wpuf-form-select:focus, .wpuf-form-multiselect:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #2563eb; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + border-color: #2563eb; +} + +.wpuf-form-input::-moz-placeholder, .wpuf-form-textarea::-moz-placeholder { + color: #6b7280; + opacity: 1; +} + +.wpuf-form-input::placeholder,.wpuf-form-textarea::placeholder { + color: #6b7280; + opacity: 1; +} + +.wpuf-form-input::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +.wpuf-form-input::-webkit-date-and-time-value { + min-height: 1.5em; + text-align: inherit; +} + +.wpuf-form-input::-webkit-datetime-edit { + display: inline-flex; +} + +.wpuf-form-input::-webkit-datetime-edit,.wpuf-form-input::-webkit-datetime-edit-year-field,.wpuf-form-input::-webkit-datetime-edit-month-field,.wpuf-form-input::-webkit-datetime-edit-day-field,.wpuf-form-input::-webkit-datetime-edit-hour-field,.wpuf-form-input::-webkit-datetime-edit-minute-field,.wpuf-form-input::-webkit-datetime-edit-second-field,.wpuf-form-input::-webkit-datetime-edit-millisecond-field,.wpuf-form-input::-webkit-datetime-edit-meridiem-field { + padding-top: 0; + padding-bottom: 0; +} + .wpuf-avatar { position: relative; display: inline-flex; @@ -932,6 +990,187 @@ html { content: var(--tw-content); } +.wpuf-chat-image { + grid-row: span 2 / span 2; + align-self: flex-end; +} + +.wpuf-chat-header { + grid-row-start: 1; + font-size: 0.875rem; + line-height: 1.25rem; +} + +.wpuf-chat-footer { + grid-row-start: 3; + font-size: 0.875rem; + line-height: 1.25rem; +} + +.wpuf-chat-bubble { + position: relative; + display: block; + width: -moz-fit-content; + width: fit-content; + padding-left: 1rem; + padding-right: 1rem; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + max-width: 90%; + border-radius: var(--rounded-box, 1rem); + min-height: 2.75rem; + min-width: 2.75rem; + --tw-bg-opacity: 1; + background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity))); + --tw-text-opacity: 1; + color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity))); +} + +.wpuf-chat-bubble:before { + position: absolute; + bottom: 0px; + height: 0.75rem; + width: 0.75rem; + background-color: inherit; + content: ""; + -webkit-mask-size: contain; + mask-size: contain; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + -webkit-mask-position: center; + mask-position: center; +} + +.wpuf-chat-start { + place-items: start; + grid-template-columns: auto 1fr; +} + +.wpuf-chat-start .wpuf-chat-header { + grid-column-start: 2; +} + +.wpuf-chat-start .wpuf-chat-footer { + grid-column-start: 2; +} + +.wpuf-chat-start .wpuf-chat-image { + grid-column-start: 1; +} + +.wpuf-chat-start .wpuf-chat-bubble { + grid-column-start: 2; + border-end-start-radius: 0px; +} + +.wpuf-chat-start .wpuf-chat-bubble:before { + -webkit-mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e"); + mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e"); + inset-inline-start: -0.749rem; +} + +[dir="rtl"] .wpuf-chat-start .wpuf-chat-bubble:before { + -webkit-mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 1 3 L 3 3 C 2 3 0 1 0 0'/%3e%3c/svg%3e"); + mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 1 3 L 3 3 C 2 3 0 1 0 0'/%3e%3c/svg%3e"); +} + +.wpuf-chat-end { + place-items: end; + grid-template-columns: 1fr auto; +} + +.wpuf-chat-end .wpuf-chat-header { + grid-column-start: 1; +} + +.wpuf-chat-end .wpuf-chat-footer { + grid-column-start: 1; +} + +.wpuf-chat-end .wpuf-chat-image { + grid-column-start: 2; +} + +.wpuf-chat-end .wpuf-chat-bubble { + grid-column-start: 1; + border-end-end-radius: 0px; +} + +.wpuf-chat-end .wpuf-chat-bubble:before { + -webkit-mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 1 3 L 3 3 C 2 3 0 1 0 0'/%3e%3c/svg%3e"); + mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 1 3 L 3 3 C 2 3 0 1 0 0'/%3e%3c/svg%3e"); + inset-inline-start: 99.9%; +} + +[dir="rtl"] .wpuf-chat-end .wpuf-chat-bubble:before { + -webkit-mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e"); + mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e"); +} + +.wpuf-collapse:not(td):not(tr):not(colgroup) { + visibility: visible; +} + +.wpuf-collapse { + position: relative; + display: grid; + overflow: hidden; + grid-template-rows: auto 0fr; + transition: grid-template-rows 0.2s; + width: 100%; + border-radius: var(--rounded-box, 1rem); +} + +.wpuf-collapse-title, +.wpuf-collapse > input[type="checkbox"], +.wpuf-collapse > input[type="radio"], +.wpuf-collapse-content { + grid-column-start: 1; + grid-row-start: 1; +} + +.wpuf-collapse > input[type="checkbox"], +.wpuf-collapse > input[type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + opacity: 0; +} + +.wpuf-collapse-content { + visibility: hidden; + grid-column-start: 1; + grid-row-start: 2; + min-height: 0px; + transition: visibility 0.2s; + transition: padding 0.2s ease-out, + background-color 0.2s ease-out; + padding-left: 1rem; + padding-right: 1rem; + cursor: unset; +} + +.wpuf-collapse[open], +.wpuf-collapse-open, +.wpuf-collapse:focus:not(.wpuf-collapse-close) { + grid-template-rows: auto 1fr; +} + +.wpuf-collapse:not(.wpuf-collapse-close):has(> input[type="checkbox"]:checked), +.wpuf-collapse:not(.wpuf-collapse-close):has(> input[type="radio"]:checked) { + grid-template-rows: auto 1fr; +} + +.wpuf-collapse[open] > .wpuf-collapse-content, +.wpuf-collapse-open > .wpuf-collapse-content, +.wpuf-collapse:focus:not(.wpuf-collapse-close) > .wpuf-collapse-content, +.wpuf-collapse:not(.wpuf-collapse-close) > input[type="checkbox"]:checked ~ .wpuf-collapse-content, +.wpuf-collapse:not(.wpuf-collapse-close) > input[type="radio"]:checked ~ .wpuf-collapse-content { + visibility: visible; + min-height: -moz-fit-content; + min-height: fit-content; +} + .wpuf-dropdown { position: relative; display: inline-block; @@ -1656,6 +1895,134 @@ input.wpuf-tab:checked + .wpuf-tab-content, } } +details.wpuf-collapse { + width: 100%; +} + +details.wpuf-collapse summary { + position: relative; + display: block; + outline: 2px solid transparent; + outline-offset: 2px; +} + +details.wpuf-collapse summary::-webkit-details-marker { + display: none; +} + +.wpuf-collapse:focus-visible { + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/1)); +} + +.wpuf-collapse:has(.wpuf-collapse-title:focus-visible), +.wpuf-collapse:has(> input[type="checkbox"]:focus-visible), +.wpuf-collapse:has(> input[type="radio"]:focus-visible) { + outline-style: solid; + outline-width: 2px; + outline-offset: 2px; + outline-color: var(--fallback-bc,oklch(var(--bc)/1)); +} + +.wpuf-collapse-arrow > .wpuf-collapse-title:after { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + position: absolute; + display: block; + height: 0.5rem; + width: 0.5rem; + --tw-translate-y: -100%; + --tw-rotate: 45deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-duration: 150ms; + transition-duration: 0.2s; + top: 1.9rem; + inset-inline-end: 1.4rem; + content: ""; + transform-origin: 75% 75%; + box-shadow: 2px 2px; + pointer-events: none; +} + +.wpuf-collapse-plus > .wpuf-collapse-title:after { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + position: absolute; + display: block; + height: 0.5rem; + width: 0.5rem; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + transition-duration: 300ms; + top: 0.9rem; + inset-inline-end: 1.4rem; + content: "+"; + pointer-events: none; +} + +.wpuf-collapse:not(.wpuf-collapse-open):not(.wpuf-collapse-close) > input[type="checkbox"], +.wpuf-collapse:not(.wpuf-collapse-open):not(.wpuf-collapse-close) > input[type="radio"]:not(:checked), +.wpuf-collapse:not(.wpuf-collapse-open):not(.wpuf-collapse-close) > .wpuf-collapse-title { + cursor: pointer; +} + +.wpuf-collapse:focus:not(.wpuf-collapse-open):not(.wpuf-collapse-close):not(.wpuf-collapse[open]) > .wpuf-collapse-title { + cursor: unset; +} + +.wpuf-collapse-title { + position: relative; +} + +:where(.wpuf-collapse > input[type="checkbox"]), +:where(.wpuf-collapse > input[type="radio"]) { + z-index: 1; +} + +.wpuf-collapse-title, +:where(.wpuf-collapse > input[type="checkbox"]), +:where(.wpuf-collapse > input[type="radio"]) { + width: 100%; + padding: 1rem; + padding-inline-end: 3rem; + min-height: 3.75rem; + transition: background-color 0.2s ease-out; +} + +.wpuf-collapse[open] > :where(.wpuf-collapse-content), +.wpuf-collapse-open > :where(.wpuf-collapse-content), +.wpuf-collapse:focus:not(.wpuf-collapse-close) > :where(.wpuf-collapse-content), +.wpuf-collapse:not(.wpuf-collapse-close) > :where(input[type="checkbox"]:checked ~ .wpuf-collapse-content), +.wpuf-collapse:not(.wpuf-collapse-close) > :where(input[type="radio"]:checked ~ .wpuf-collapse-content) { + padding-bottom: 1rem; + transition: padding 0.2s ease-out, + background-color 0.2s ease-out; +} + +.wpuf-collapse[open].wpuf-collapse-arrow > .wpuf-collapse-title:after, +.wpuf-collapse-open.wpuf-collapse-arrow > .wpuf-collapse-title:after, +.wpuf-collapse-arrow:focus:not(.wpuf-collapse-close) > .wpuf-collapse-title:after, +.wpuf-collapse-arrow:not(.wpuf-collapse-close) > input[type="checkbox"]:checked ~ .wpuf-collapse-title:after, +.wpuf-collapse-arrow:not(.wpuf-collapse-close) > input[type="radio"]:checked ~ .wpuf-collapse-title:after { + --tw-translate-y: -50%; + --tw-rotate: 225deg; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.wpuf-collapse[open].wpuf-collapse-plus > .wpuf-collapse-title:after, +.wpuf-collapse-open.wpuf-collapse-plus > .wpuf-collapse-title:after, +.wpuf-collapse-plus:focus:not(.wpuf-collapse-close) > .wpuf-collapse-title:after, +.wpuf-collapse-plus:not(.wpuf-collapse-close) > input[type="checkbox"]:checked ~ .wpuf-collapse-title:after, +.wpuf-collapse-plus:not(.wpuf-collapse-close) > input[type="radio"]:checked ~ .wpuf-collapse-title:after { + content: "−"; +} + .wpuf-dropdown.wpuf-dropdown-open .wpuf-dropdown-content, .wpuf-dropdown:focus .wpuf-dropdown-content, .wpuf-dropdown:focus-within .wpuf-dropdown-content { @@ -2468,6 +2835,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, pointer-events: none; } +.wpuf-collapse { + visibility: collapse; +} + .\!wpuf-static { position: static !important; } @@ -2513,6 +2884,14 @@ input.wpuf-tab:checked + .wpuf-tab-content, left: 0px; } +.wpuf-left-1 { + left: 0.25rem; +} + +.wpuf-left-1\/2 { + left: 50%; +} + .wpuf-left-\[-2\%\] { left: -2%; } @@ -2585,6 +2964,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, top: -40%; } +.wpuf-top-\[275px\] { + top: 275px; +} + .wpuf-top-\[50\%\] { top: 50%; } @@ -2593,6 +2976,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, top: 7%; } +.wpuf-top-\[93px\] { + top: 93px; +} + .wpuf-z-10 { z-index: 10; } @@ -2712,6 +3099,11 @@ input.wpuf-tab:checked + .wpuf-tab-content, margin-right: 1rem; } +.wpuf-mx-5 { + margin-left: 1.25rem; + margin-right: 1.25rem; +} + .wpuf-mx-auto { margin-left: auto; margin-right: auto; @@ -2825,6 +3217,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, margin-bottom: 3.5rem; } +.wpuf-mb-16 { + margin-bottom: 4rem; +} + .wpuf-mb-2 { margin-bottom: 0.5rem; } @@ -2849,6 +3245,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, margin-bottom: 1.5rem; } +.wpuf-mb-7 { + margin-bottom: 1.75rem; +} + .wpuf-mb-8 { margin-bottom: 2rem; } @@ -3064,6 +3464,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, height: 2.5rem; } +.wpuf-h-11 { + height: 2.75rem; +} + .wpuf-h-12 { height: 3rem; } @@ -3072,6 +3476,9 @@ input.wpuf-tab:checked + .wpuf-tab-content, height: 4rem; } +.wpuf-h-2 { + height: 0.5rem; +} .wpuf-h-24 { height: 6rem; } @@ -3100,6 +3507,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, height: 20rem; } +.wpuf-h-9 { + height: 2.25rem; +} + .wpuf-h-\[180\%\] { height: 180%; } @@ -3108,6 +3519,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, height: 50vh; } +.wpuf-h-\[60vh\] { + height: 60vh; +} + .wpuf-h-\[70vh\] { height: 70vh; } @@ -3116,6 +3531,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, height: 80vh; } +.wpuf-h-auto { + height: auto; +} + .wpuf-h-full { height: 100%; } @@ -3138,12 +3557,40 @@ input.wpuf-tab:checked + .wpuf-tab-content, height: 100svh; } +.wpuf-max-h-\[1072px\] { + max-height: 1072px; +} + +.wpuf-max-h-\[120px\] { + max-height: 120px; +} + +.wpuf-max-h-\[calc\(100vh-300px\)\] { + max-height: calc(100vh - 300px); +} + .wpuf-max-h-screen { max-height: 100vh; } -.wpuf-min-h-16 { - min-height: 4rem; +.wpuf-min-h-16 { + min-height: 4rem; +} + +.wpuf-min-h-\[100px\] { + min-height: 100px; +} + +.wpuf-min-h-\[416px\] { + min-height: 416px; +} + +.wpuf-min-h-\[44px\] { + min-height: 44px; +} + +.wpuf-min-h-\[672px\] { + min-height: 672px; } .wpuf-min-h-full { @@ -3200,6 +3647,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, width: 3rem; } +.wpuf-w-16 { + width: 4rem; +} + .wpuf-w-2 { width: 0.5rem; } @@ -3276,6 +3727,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, width: 20rem; } +.wpuf-w-9 { + width: 2.25rem; +} + .wpuf-w-\[104\%\] { width: 104%; } @@ -3318,6 +3773,14 @@ input.wpuf-tab:checked + .wpuf-tab-content, min-width: 0px; } +.wpuf-min-w-\[101px\] { + min-width: 101px; +} + +.wpuf-min-w-\[158px\] { + min-width: 158px; +} + .wpuf-min-w-full { min-width: 100%; } @@ -3338,6 +3801,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, max-width: 1400px; } +.wpuf-max-w-\[720px\] { + max-width: 720px; +} + .wpuf-max-w-\[768px\] { max-width: 768px; } @@ -3350,6 +3817,14 @@ input.wpuf-tab:checked + .wpuf-tab-content, max-width: 32rem; } +.wpuf-max-w-md { + max-width: 28rem; +} + +.wpuf-max-w-xl { + max-width: 36rem; +} + .wpuf-max-w-xs { max-width: 20rem; } @@ -3406,6 +3881,16 @@ input.wpuf-tab:checked + .wpuf-tab-content, transform-origin: top right; } +.wpuf--translate-x-1 { + --tw-translate-x: -0.25rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.wpuf--translate-x-1\/2 { + --tw-translate-x: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .wpuf--translate-x-\[50\%\] { --tw-translate-x: -50%; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); @@ -3467,6 +3952,26 @@ input.wpuf-tab:checked + .wpuf-tab-content, transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +@keyframes wpuf-pulse { + 50% { + opacity: .5; + } +} + +.wpuf-animate-pulse { + animation: wpuf-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; +} + +@keyframes wpuf-spin { + to { + transform: rotate(360deg); + } +} + +.wpuf-animate-spin { + animation: wpuf-spin 1s linear infinite; +} + .wpuf-cursor-not-allowed { cursor: not-allowed; } @@ -3479,6 +3984,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, cursor: wait; } +.wpuf-resize-none { + resize: none; +} + .wpuf-list-none { list-style-type: none; } @@ -3515,6 +4024,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, align-items: flex-start; } +.wpuf-items-end { + align-items: flex-end; +} + .wpuf-items-center { align-items: center; } @@ -3547,6 +4060,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, justify-content: space-evenly; } +.wpuf-justify-items-center { + justify-items: center; +} + .wpuf-gap-1 { gap: 0.25rem; } @@ -3571,10 +4088,18 @@ input.wpuf-tab:checked + .wpuf-tab-content, gap: 1rem; } +.wpuf-gap-5 { + gap: 1.25rem; +} + .wpuf-gap-6 { gap: 1.5rem; } +.wpuf-gap-8 { + gap: 2rem; +} + .wpuf-gap-x-1 { -moz-column-gap: 0.25rem; column-gap: 0.25rem; @@ -3691,6 +4216,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, border-radius: 6px !important; } +.\!wpuf-rounded-md { + border-radius: 0.375rem !important; +} + .wpuf-rounded { border-radius: 0.25rem; } @@ -3776,6 +4305,14 @@ input.wpuf-tab:checked + .wpuf-tab-content, border-top-right-radius: 0.75rem; } +.wpuf-rounded-bl { + border-bottom-left-radius: 0.25rem; +} + +.wpuf-rounded-br { + border-bottom-right-radius: 0.25rem; +} + .wpuf-rounded-tr-lg { border-top-right-radius: 0.5rem; } @@ -3873,6 +4410,15 @@ input.wpuf-tab:checked + .wpuf-tab-content, border-style: none !important; } +.wpuf-border-none { + border-style: none; +} + +.\!wpuf-border-emerald-600 { + --tw-border-opacity: 1 !important; + border-color: rgb(5 150 105 / var(--tw-border-opacity)) !important; +} + .\!wpuf-border-gray-300 { --tw-border-opacity: 1 !important; border-color: rgb(209 213 219 / var(--tw-border-opacity)) !important; @@ -3897,6 +4443,16 @@ input.wpuf-tab:checked + .wpuf-tab-content, border-color: transparent !important; } +.wpuf-border-blue-200 { + --tw-border-opacity: 1; + border-color: rgb(191 219 254 / var(--tw-border-opacity)); +} + +.wpuf-border-blue-300 { + --tw-border-opacity: 1; + border-color: rgb(147 197 253 / var(--tw-border-opacity)); +} + .wpuf-border-blue-500 { --tw-border-opacity: 1; border-color: rgb(59 130 246 / var(--tw-border-opacity)); @@ -3907,6 +4463,16 @@ input.wpuf-tab:checked + .wpuf-tab-content, border-color: rgb(167 243 208 / var(--tw-border-opacity)); } +.wpuf-border-emerald-500 { + --tw-border-opacity: 1; + border-color: rgb(16 185 129 / var(--tw-border-opacity)); +} + +.wpuf-border-emerald-600 { + --tw-border-opacity: 1; + border-color: rgb(5 150 105 / var(--tw-border-opacity)); +} + .wpuf-border-gray-100 { --tw-border-opacity: 1; border-color: rgb(243 244 246 / var(--tw-border-opacity)); @@ -3952,15 +4518,40 @@ input.wpuf-tab:checked + .wpuf-tab-content, border-color: rgb(5 150 105 / var(--tw-border-opacity)); } +.wpuf-border-purple-300 { + --tw-border-opacity: 1; + border-color: rgb(216 180 254 / var(--tw-border-opacity)); +} + +.wpuf-border-red-200 { + --tw-border-opacity: 1; + border-color: rgb(254 202 202 / var(--tw-border-opacity)); +} + .wpuf-border-red-500 { --tw-border-opacity: 1; border-color: rgb(239 68 68 / var(--tw-border-opacity)); } +.wpuf-border-slate-200 { + --tw-border-opacity: 1; + border-color: rgb(226 232 240 / var(--tw-border-opacity)); +} + +.wpuf-border-slate-300 { + --tw-border-opacity: 1; + border-color: rgb(203 213 225 / var(--tw-border-opacity)); +} + .wpuf-border-transparent { border-color: transparent; } +.wpuf-border-white { + --tw-border-opacity: 1; + border-color: rgb(255 255 255 / var(--tw-border-opacity)); +} + .wpuf-border-yellow-200 { --tw-border-opacity: 1; border-color: rgb(254 240 138 / var(--tw-border-opacity)); @@ -3981,6 +4572,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, border-color: rgb(212 212 216 / var(--tw-border-opacity)); } +.wpuf-border-t-transparent { + border-top-color: transparent; +} + .\!wpuf-bg-green-600 { --tw-bg-opacity: 1 !important; background-color: rgb(22 163 74 / var(--tw-bg-opacity)) !important; @@ -3996,6 +4591,11 @@ input.wpuf-tab:checked + .wpuf-tab-content, background-color: rgb(255 255 255 / var(--tw-bg-opacity)) !important; } +.wpuf-bg-\[\#ECFDF5\] { + --tw-bg-opacity: 1; + background-color: rgb(236 253 245 / var(--tw-bg-opacity)); +} + .wpuf-bg-amber-500 { --tw-bg-opacity: 1; background-color: rgb(245 158 11 / var(--tw-bg-opacity)); @@ -4010,11 +4610,30 @@ input.wpuf-tab:checked + .wpuf-tab-content, background-color: rgb(0 0 0 / 0.25); } +.wpuf-bg-blue-100 { + --tw-bg-opacity: 1; + background-color: rgb(219 234 254 / var(--tw-bg-opacity)); +} + +.wpuf-bg-blue-50 { + --tw-bg-opacity: 1; + background-color: rgb(239 246 255 / var(--tw-bg-opacity)); +} + .wpuf-bg-blue-500 { --tw-bg-opacity: 1; background-color: rgb(59 130 246 / var(--tw-bg-opacity)); } +.wpuf-bg-emerald-300 { + --tw-bg-opacity: 1; + background-color: rgb(110 231 183 / var(--tw-bg-opacity)); +} + +.wpuf-bg-emerald-400 { + --tw-bg-opacity: 1; + background-color: rgb(52 211 153 / var(--tw-bg-opacity)); +} .wpuf-bg-emerald-100 { --tw-bg-opacity: 1; background-color: rgb(209 250 229 / var(--tw-bg-opacity)); @@ -4025,11 +4644,21 @@ input.wpuf-tab:checked + .wpuf-tab-content, background-color: rgb(236 253 245 / var(--tw-bg-opacity)); } +.wpuf-bg-emerald-500 { + --tw-bg-opacity: 1; + background-color: rgb(16 185 129 / var(--tw-bg-opacity)); +} + .wpuf-bg-emerald-600 { --tw-bg-opacity: 1; background-color: rgb(5 150 105 / var(--tw-bg-opacity)); } +.wpuf-bg-emerald-700 { + --tw-bg-opacity: 1; + background-color: rgb(4 120 87 / var(--tw-bg-opacity)); +} + .wpuf-bg-emerald-900 { --tw-bg-opacity: 1; background-color: rgb(6 78 59 / var(--tw-bg-opacity)); @@ -4104,6 +4733,11 @@ input.wpuf-tab:checked + .wpuf-tab-content, background-color: rgb(16 185 129 / var(--tw-bg-opacity)); } +.wpuf-bg-purple-50 { + --tw-bg-opacity: 1; + background-color: rgb(250 245 255 / var(--tw-bg-opacity)); +} + .wpuf-bg-red-100 { --tw-bg-opacity: 1; background-color: rgb(254 226 226 / var(--tw-bg-opacity)); @@ -4153,10 +4787,18 @@ input.wpuf-tab:checked + .wpuf-tab-content, background-color: rgb(254 252 232 / var(--tw-bg-opacity)); } +.wpuf-bg-opacity-50 { + --tw-bg-opacity: 0.5; +} + .wpuf-bg-opacity-75 { --tw-bg-opacity: 0.75; } +.wpuf-bg-opacity-80 { + --tw-bg-opacity: 0.8; +} + .\!wpuf-stroke-primary { stroke: #059669 !important; } @@ -4173,6 +4815,16 @@ input.wpuf-tab:checked + .wpuf-tab-content, stroke: #6b7280; } +.wpuf-object-contain { + -o-object-fit: contain; + object-fit: contain; +} + +.wpuf-object-cover { + -o-object-fit: cover; + object-fit: cover; +} + .\!wpuf-p-0 { padding: 0px !important; } @@ -4225,6 +4877,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, padding: 2rem; } +.wpuf-p-9 { + padding: 2.25rem; +} + .wpuf-p-\[10px\] { padding: 10px; } @@ -4417,6 +5073,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, padding-bottom: 0px; } +.wpuf-pb-3 { + padding-bottom: 0.75rem; +} + .wpuf-pb-4 { padding-bottom: 1rem; } @@ -4433,6 +5093,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, padding-bottom: 2rem; } +.wpuf-pb-9 { + padding-bottom: 2.25rem; +} + .wpuf-pl-0 { padding-left: 0px; } @@ -4513,6 +5177,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, padding-top: 1.5rem; } +.wpuf-pt-9 { + padding-top: 2.25rem; +} + .wpuf-pt-\[40px\] { padding-top: 40px; } @@ -4537,6 +5205,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, vertical-align: middle; } +.wpuf-font-mono { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + .wpuf-font-sans { font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } @@ -4673,10 +5345,18 @@ input.wpuf-tab:checked + .wpuf-tab-content, line-height: 2rem; } +.wpuf-leading-9 { + line-height: 2.25rem; +} + .wpuf-leading-none { line-height: 1; } +.wpuf-tracking-normal { + letter-spacing: 0em; +} + .wpuf-tracking-tight { letter-spacing: -0.025em; } @@ -4686,6 +5366,11 @@ input.wpuf-tab:checked + .wpuf-tab-content, color: rgb(0 0 0 / var(--tw-text-opacity)) !important; } +.\!wpuf-text-emerald-200 { + --tw-text-opacity: 1 !important; + color: rgb(167 243 208 / var(--tw-text-opacity)) !important; +} + .\!wpuf-text-gray-700 { --tw-text-opacity: 1 !important; color: rgb(55 65 81 / var(--tw-text-opacity)) !important; @@ -4706,6 +5391,26 @@ input.wpuf-tab:checked + .wpuf-tab-content, color: rgb(0 0 0 / var(--tw-text-opacity)); } +.wpuf-text-blue-600 { + --tw-text-opacity: 1; + color: rgb(37 99 235 / var(--tw-text-opacity)); +} + +.wpuf-text-blue-800 { + --tw-text-opacity: 1; + color: rgb(30 64 175 / var(--tw-text-opacity)); +} + +.wpuf-text-emerald-200 { + --tw-text-opacity: 1; + color: rgb(167 243 208 / var(--tw-text-opacity)); +} + +.wpuf-text-emerald-600 { + --tw-text-opacity: 1; + color: rgb(5 150 105 / var(--tw-text-opacity)); +} + .wpuf-text-emerald-700 { --tw-text-opacity: 1; color: rgb(4 120 87 / var(--tw-text-opacity)); @@ -4716,6 +5421,11 @@ input.wpuf-tab:checked + .wpuf-tab-content, color: rgb(6 95 70 / var(--tw-text-opacity)); } +.wpuf-text-gray-300 { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + .wpuf-text-gray-400 { --tw-text-opacity: 1; color: rgb(156 163 175 / var(--tw-text-opacity)); @@ -4781,6 +5491,16 @@ input.wpuf-tab:checked + .wpuf-tab-content, color: rgb(5 150 105 / var(--tw-text-opacity)); } +.wpuf-text-purple-500 { + --tw-text-opacity: 1; + color: rgb(168 85 247 / var(--tw-text-opacity)); +} + +.wpuf-text-purple-600 { + --tw-text-opacity: 1; + color: rgb(147 51 234 / var(--tw-text-opacity)); +} + .wpuf-text-purple-800 { --tw-text-opacity: 1; color: rgb(107 33 168 / var(--tw-text-opacity)); @@ -4831,6 +5551,11 @@ input.wpuf-tab:checked + .wpuf-tab-content, color: rgb(234 179 8 / var(--tw-text-opacity)); } +.wpuf-text-yellow-600 { + --tw-text-opacity: 1; + color: rgb(202 138 4 / var(--tw-text-opacity)); +} + .wpuf-text-yellow-700 { --tw-text-opacity: 1; color: rgb(161 98 7 / var(--tw-text-opacity)); @@ -4853,10 +5578,22 @@ input.wpuf-tab:checked + .wpuf-tab-content, opacity: 1; } +.wpuf-opacity-25 { + opacity: 0.25; +} + +.wpuf-opacity-40 { + opacity: 0.4; +} + .wpuf-opacity-50 { opacity: 0.5; } +.wpuf-opacity-75 { + opacity: 0.75; +} + .\!wpuf-shadow-none { --tw-shadow: 0 0 #0000 !important; --tw-shadow-colored: 0 0 #0000 !important; @@ -4910,6 +5647,11 @@ input.wpuf-tab:checked + .wpuf-tab-content, --tw-shadow: var(--tw-shadow-colored); } +.wpuf-outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + .wpuf-outline { outline-style: solid; } @@ -4940,6 +5682,12 @@ input.wpuf-tab:checked + .wpuf-tab-content, box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } +.wpuf-ring-2 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + .wpuf-ring-inset { --tw-ring-inset: inset; } @@ -4958,6 +5706,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity)); } +.wpuf-ring-emerald-200 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(167 243 208 / var(--tw-ring-opacity)); +} .wpuf-ring-gray-200 { --tw-ring-opacity: 1; --tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity)); @@ -5059,6 +5811,10 @@ input.wpuf-tab:checked + .wpuf-tab-content, transition-duration: 200ms; } +.wpuf-duration-500 { + transition-duration: 500ms; +} + .wpuf-duration-300 { transition-duration: 300ms; } @@ -5707,11 +6463,21 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { border-color: rgb(29 78 216 / var(--tw-border-opacity)); } +.hover\:wpuf-border-emerald-600:hover { + --tw-border-opacity: 1; + border-color: rgb(5 150 105 / var(--tw-border-opacity)); +} + .hover\:wpuf-border-gray-300:hover { --tw-border-opacity: 1; border-color: rgb(209 213 219 / var(--tw-border-opacity)); } +.hover\:wpuf-border-gray-400:hover { + --tw-border-opacity: 1; + border-color: rgb(156 163 175 / var(--tw-border-opacity)); +} + .hover\:wpuf-border-primary:hover { --tw-border-opacity: 1; border-color: rgb(5 150 105 / var(--tw-border-opacity)); @@ -5727,6 +6493,11 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { border-color: rgb(14 165 233 / var(--tw-border-opacity)); } +.hover\:\!wpuf-bg-gray-50:hover { + --tw-bg-opacity: 1 !important; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)) !important; +} + .hover\:\!wpuf-bg-green-50:hover { --tw-bg-opacity: 1 !important; background-color: rgb(240 253 244 / var(--tw-bg-opacity)) !important; @@ -5742,6 +6513,16 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { background-color: rgb(29 78 216 / var(--tw-bg-opacity)); } +.hover\:wpuf-bg-emerald-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(4 120 87 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-emerald-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(6 95 70 / var(--tw-bg-opacity)); +} + .hover\:wpuf-bg-emerald-100:hover { --tw-bg-opacity: 1; background-color: rgb(209 250 229 / var(--tw-bg-opacity)); @@ -5792,6 +6573,11 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { background-color: rgb(185 28 28 / var(--tw-bg-opacity)); } +.hover\:wpuf-bg-red-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(153 27 27 / var(--tw-bg-opacity)); +} + .hover\:wpuf-bg-slate-100:hover { --tw-bg-opacity: 1; background-color: rgb(241 245 249 / var(--tw-bg-opacity)); @@ -5825,6 +6611,16 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { color: rgb(55 65 81 / var(--tw-text-opacity)) !important; } +.hover\:wpuf-text-emerald-200:hover { + --tw-text-opacity: 1; + color: rgb(167 243 208 / var(--tw-text-opacity)); +} + +.hover\:wpuf-text-emerald-700:hover { + --tw-text-opacity: 1; + color: rgb(4 120 87 / var(--tw-text-opacity)); +} + .hover\:wpuf-text-gray-500:hover { --tw-text-opacity: 1; color: rgb(107 114 128 / var(--tw-text-opacity)); @@ -5943,6 +6739,11 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { border-color: transparent !important; } +.focus\:wpuf-border-emerald-500:focus { + --tw-border-opacity: 1; + border-color: rgb(16 185 129 / var(--tw-border-opacity)); +} + .focus\:wpuf-border-primary:focus { --tw-border-opacity: 1; border-color: rgb(5 150 105 / var(--tw-border-opacity)); @@ -5979,12 +6780,23 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important; } +.focus\:wpuf-shadow-lg:focus { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + .focus\:wpuf-shadow-none:focus { --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } +.focus\:wpuf-shadow-emerald-100:focus { + --tw-shadow-color: #d1fae5; + --tw-shadow: var(--tw-shadow-colored); +} + .focus\:wpuf-shadow-primary:focus { --tw-shadow-color: #059669; --tw-shadow: var(--tw-shadow-colored); @@ -6027,6 +6839,11 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity)); } +.focus\:wpuf-ring-emerald-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(167 243 208 / var(--tw-ring-opacity)); +} + .focus\:wpuf-ring-gray-300:focus { --tw-ring-opacity: 1; --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); @@ -6131,6 +6948,15 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } +.disabled\:wpuf-cursor-not-allowed:disabled { + cursor: not-allowed; +} + +.disabled\:wpuf-bg-gray-400:disabled { + --tw-bg-opacity: 1; + background-color: rgb(156 163 175 / var(--tw-bg-opacity)); +} + .disabled\:wpuf-opacity-50:disabled { opacity: 0.5; } @@ -6240,10 +7066,19 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { margin-right: -1.5rem; } + .sm\:wpuf-mx-auto { + margin-left: auto; + margin-right: auto; + } + .sm\:wpuf-flex { display: flex; } + .sm\:wpuf-h-\[70vh\] { + height: 70vh; + } + .sm\:wpuf-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -6272,6 +7107,18 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { padding: 0px; } + .sm\:wpuf-p-5 { + padding: 1.25rem; + } + + .sm\:wpuf-p-6 { + padding: 1.5rem; + } + + .sm\:wpuf-p-9 { + padding: 2.25rem; + } + .sm\:wpuf-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; @@ -6306,6 +7153,10 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { display: inline-block; } + .md\:wpuf-h-\[75vh\] { + height: 75vh; + } + .md\:wpuf-w-3\/4 { width: 75%; } @@ -6325,6 +7176,20 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { margin-right: -2rem; } + .lg\:wpuf-h-\[80vh\] { + height: 80vh; + } + + .lg\:wpuf-flex-row { + flex-direction: row; + } + + .lg\:wpuf-p-8 { + padding: 2rem; + } + + .lg\:wpuf-p-9 { + padding: 2.25rem; .lg\:wpuf-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } @@ -6336,6 +7201,10 @@ button.swal2-cancel.swal2-styled.swal2-default-outline { } @media (min-width: 1280px) { + .xl\:wpuf-h-\[85vh\] { + height: 85vh; + } + .xl\:wpuf-mt-10 { margin-top: 2.5rem; } diff --git a/assets/js/wpuf-admin.js b/assets/js/wpuf-admin.js index 4a52e7e83..1da88f31a 100644 --- a/assets/js/wpuf-admin.js +++ b/assets/js/wpuf-admin.js @@ -217,4 +217,74 @@ jQuery(function($) { $('.wpuf-fields input[type="radio"][name="_downloadable"][value="no"]').prop('checked', true); } }); + + // AI Provider change event listener to filter AI Models + $('#wpuf_ai\\[ai_provider\\]').on('change', function() { + var selectedProvider = $(this).val(); + var aiModelSelect = $('#wpuf_ai\\[ai_model\\]'); + var $this = $(this); + + // If no provider selected, show all models + if (!selectedProvider) { + // Restore all options if stored + if (aiModelSelect.data('all-options')) { + aiModelSelect.empty().append(aiModelSelect.data('all-options')); + } + return; + } + + // Store all options for restoration if needed + if (!aiModelSelect.data('all-options')) { + aiModelSelect.data('all-options', aiModelSelect.find('option').clone()); + } + + // Get provider configuration via AJAX + $.ajax({ + url: wpuf_admin_script.ajaxurl, + type: 'POST', + data: { + action: 'wpuf_get_ai_provider_configs', + nonce: wpuf_admin_script.nonce + }, + success: function(response) { + if (response.success && response.data) { + var providerConfigs = response.data; + var selectedProviderConfig = providerConfigs[selectedProvider]; + + if (selectedProviderConfig && selectedProviderConfig.models) { + // Clear current options + aiModelSelect.empty(); + + // Add default option + aiModelSelect.append(''); + + // Add models for the selected provider + $.each(selectedProviderConfig.models, function(modelKey, modelName) { + aiModelSelect.append(''); + }); + + // Try to preserve current selection if it's valid for the selected provider + var currentDbValue = aiModelSelect.attr('data-current-value') || aiModelSelect.val(); + if (currentDbValue && selectedProviderConfig.models[currentDbValue]) { + aiModelSelect.val(currentDbValue); + } else { + // Set first available model as default + var firstModelKey = Object.keys(selectedProviderConfig.models)[0]; + if (firstModelKey) { + aiModelSelect.val(firstModelKey); + } + } + } + } else { + console.error('Failed to load AI provider configurations'); + } + }, + error: function() { + console.error('AJAX error loading AI provider configurations'); + } + }); + }); + + // Trigger change event on page load to filter models based on pre-selected provider + $('#wpuf_ai\\[ai_provider\\]').trigger('change'); }); diff --git a/includes/Admin/Posting.php b/includes/Admin/Posting.php index 0681a90ec..582888e62 100644 --- a/includes/Admin/Posting.php +++ b/includes/Admin/Posting.php @@ -461,10 +461,6 @@ public function render_form( $form_id, $post_id = null ) { if ( typeof wpuf_map_items === 'undefined' ) { wpuf_map_items = []; } - - // Test if field initialization script is loaded - console.log('Admin metabox script loaded'); - console.log('WPUF_Field_Initializer available:', typeof WPUF_Field_Initializer !== 'undefined'); register_ajax( 'wpuf_ajax_address', 'wpuf_ajax_get_states_field' ); $this->register_ajax( 'wpuf_update_billing_address', 'wpuf_update_billing_address' ); $this->register_ajax( 'wpuf_clear_schedule_lock', 'wpuf_clear_schedule_lock', $this->logged_in_only ); + $this->register_ajax( 'wpuf_get_ai_provider_configs', 'wpuf_get_ai_provider_configs_ajax', $this->logged_in_only ); } /** diff --git a/includes/class-frontend-render-form.php b/includes/class-frontend-render-form.php index 9d75b9b37..3c2cd8279 100644 --- a/includes/class-frontend-render-form.php +++ b/includes/class-frontend-render-form.php @@ -930,7 +930,7 @@ public function render_featured_field( $post_id = null ) {
[wpuf_edit] is located"
msgstr ""
-#: includes/functions/settings-options.php:203
+#: includes/functions/settings-options.php:208
msgid "Default Post Owner"
msgstr ""
-#: includes/functions/settings-options.php:204
+#: includes/functions/settings-options.php:209
msgid ""
"If guest post is enabled and user details are OFF, the posts are assigned "
"to this user"
msgstr ""
-#: includes/functions/settings-options.php:212
+#: includes/functions/settings-options.php:217
msgid "Custom Fields in post"
msgstr ""
-#: includes/functions/settings-options.php:213
+#: includes/functions/settings-options.php:218
msgid "Show custom fields on post content area"
msgstr ""
-#: includes/functions/settings-options.php:219
+#: includes/functions/settings-options.php:224
msgid "Insert Photo image size"
msgstr ""
-#: includes/functions/settings-options.php:220
+#: includes/functions/settings-options.php:225
msgid ""
"Default image size of \"Insert Photo\" button in post "
"content area"
msgstr ""
-#: includes/functions/settings-options.php:228
+#: includes/functions/settings-options.php:233
msgid "Insert Photo image type"
msgstr ""
-#: includes/functions/settings-options.php:229
+#: includes/functions/settings-options.php:234
msgid ""
"Default image type of \"Insert Photo\" button in post "
"content area"
msgstr ""
-#: includes/functions/settings-options.php:233
+#: includes/functions/settings-options.php:238
msgid "Image only"
msgstr ""
-#: includes/functions/settings-options.php:234
+#: includes/functions/settings-options.php:239
msgid "Image with link"
msgstr ""
-#: includes/functions/settings-options.php:240
+#: includes/functions/settings-options.php:245
msgid "Enable Image Caption"
msgstr ""
-#: includes/functions/settings-options.php:241
+#: includes/functions/settings-options.php:246
msgid "Allow users to update image/video title, caption and description"
msgstr ""
-#: includes/functions/settings-options.php:248
+#: includes/functions/settings-options.php:253
msgid "Default Post Form"
msgstr ""
-#: includes/functions/settings-options.php:249
+#: includes/functions/settings-options.php:254
msgid "Fallback form for post editing if no associated form found"
msgstr ""
-#: includes/functions/settings-options.php:257
+#: includes/functions/settings-options.php:262
msgid "Users can edit post?"
msgstr ""
-#: includes/functions/settings-options.php:258
+#: includes/functions/settings-options.php:263
msgid "Users will be able to edit their own posts"
msgstr ""
-#: includes/functions/settings-options.php:268
+#: includes/functions/settings-options.php:273
msgid "User can delete post?"
msgstr ""
-#: includes/functions/settings-options.php:269
+#: includes/functions/settings-options.php:274
msgid "Users will be able to delete their own posts"
msgstr ""
-#: includes/functions/settings-options.php:279
+#: includes/functions/settings-options.php:284
msgid "Pending Post Edit"
msgstr ""
-#: includes/functions/settings-options.php:280
+#: includes/functions/settings-options.php:285
msgid "Disable post editing while post in \"pending\" status"
msgstr ""
-#: includes/functions/settings-options.php:286
+#: includes/functions/settings-options.php:291
msgid "Editing Published Post"
msgstr ""
-#: includes/functions/settings-options.php:287
+#: includes/functions/settings-options.php:292
msgid "Disable post editing while post in \"publish\" status"
msgstr ""
-#: includes/functions/settings-options.php:293
+#: includes/functions/settings-options.php:298
msgid "Posts per page"
msgstr ""
-#: includes/functions/settings-options.php:294
+#: includes/functions/settings-options.php:299
msgid "How many posts will be listed in a page"
msgstr ""
-#: includes/functions/settings-options.php:300
+#: includes/functions/settings-options.php:305
msgid "Show user bio"
msgstr ""
-#: includes/functions/settings-options.php:301
+#: includes/functions/settings-options.php:306
msgid "Users biographical info will be shown"
msgstr ""
-#: includes/functions/settings-options.php:307
+#: includes/functions/settings-options.php:312
msgid "Show post count"
msgstr ""
-#: includes/functions/settings-options.php:308
+#: includes/functions/settings-options.php:313
msgid "Show how many posts are created by the user"
msgstr ""
-#: includes/functions/settings-options.php:314
+#: includes/functions/settings-options.php:319
msgid "Show Featured Image"
msgstr ""
-#: includes/functions/settings-options.php:315
+#: includes/functions/settings-options.php:320
msgid "Show featured image of the post (Overridden by Shortcode)"
msgstr ""
-#: includes/functions/settings-options.php:320
+#: includes/functions/settings-options.php:325
msgid "Show Payment Column"
msgstr ""
-#: includes/functions/settings-options.php:321
+#: includes/functions/settings-options.php:326
msgid "Enable if you want show payment column on posts table"
msgstr ""
-#: includes/functions/settings-options.php:327
+#: includes/functions/settings-options.php:332
msgid "Featured Image size"
msgstr ""
-#: includes/functions/settings-options.php:334
+#: includes/functions/settings-options.php:339
msgid "Not logged in users will see this message"
msgstr ""
-#: includes/functions/settings-options.php:341
+#: includes/functions/settings-options.php:346
msgid "Account Page"
msgstr ""
-#: includes/functions/settings-options.php:342
+#: includes/functions/settings-options.php:347
msgid "Select the page which contains [wpuf_account] shortcode"
msgstr ""
-#: includes/functions/settings-options.php:349
+#: includes/functions/settings-options.php:354
msgid "Select Custom Post For Account Page"
msgstr ""
-#: includes/functions/settings-options.php:350
+#: includes/functions/settings-options.php:355
msgid "Select the post types you want to show on user dashboard."
msgstr ""
-#: includes/functions/settings-options.php:356
+#: includes/functions/settings-options.php:361
msgid "Active Tab"
msgstr ""
-#: includes/functions/settings-options.php:357
+#: includes/functions/settings-options.php:362
msgid "Which tab should be set as active by default when opening the account page"
msgstr ""
-#: includes/functions/settings-options.php:364
+#: includes/functions/settings-options.php:369
msgid "Show Subscriptions"
msgstr ""
-#: includes/functions/settings-options.php:365
+#: includes/functions/settings-options.php:370
msgid ""
"Show Subscriptions tab in \"my account\" page where "
"[wpuf_account] is located"
msgstr ""
-#: includes/functions/settings-options.php:373
+#: includes/functions/settings-options.php:378
msgid "Show billing address in account page."
msgstr ""
-#: includes/functions/settings-options.php:404
+#: includes/functions/settings-options.php:409
msgid "Auto Login After Registration"
msgstr ""
-#: includes/functions/settings-options.php:405
+#: includes/functions/settings-options.php:410
msgid "If enabled, users after registration will be logged in to the system"
msgstr ""
-#: includes/functions/settings-options.php:412
+#: includes/functions/settings-options.php:417
msgid "Login/Registration override"
msgstr ""
-#: includes/functions/settings-options.php:413
+#: includes/functions/settings-options.php:418
msgid ""
"If enabled, default login and registration forms will be overridden by WPUF "
"with pages below"
msgstr ""
-#: includes/functions/settings-options.php:420
+#: includes/functions/settings-options.php:425
msgid "Registration Page"
msgstr ""
-#: includes/functions/settings-options.php:421
+#: includes/functions/settings-options.php:426
msgid ""
"Select the page you want to use as registration page override (should "
"have shortcode)"
msgstr ""
-#: includes/functions/settings-options.php:429
+#: includes/functions/settings-options.php:434
msgid "Select the page which contains [wpuf-login] shortcode"
msgstr ""
-#: includes/functions/settings-options.php:436
+#: includes/functions/settings-options.php:441
msgid "Redirect After Login"
msgstr ""
-#: includes/functions/settings-options.php:437
+#: includes/functions/settings-options.php:442
msgid "After successfull login, where the page will redirect to"
msgstr ""
-#: includes/functions/settings-options.php:443
+#: includes/functions/settings-options.php:448
msgid "Default Login Redirect"
msgstr ""
-#: includes/functions/settings-options.php:444
+#: includes/functions/settings-options.php:449
msgid ""
"If enabled, users who login using WordPress default login form will be "
"redirected to the selected page."
msgstr ""
-#: includes/functions/settings-options.php:451
+#: includes/functions/settings-options.php:456
msgid "reCAPTCHA in Login Form"
msgstr ""
-#: includes/functions/settings-options.php:452
+#: includes/functions/settings-options.php:457
msgid ""
"If enabled, users have to verify reCAPTCHA in login page. Also, make sure "
"that reCAPTCHA is configured properly from General Options"
msgstr ""
-#: includes/functions/settings-options.php:459
+#: includes/functions/settings-options.php:464
msgid "Turnstile in Login Form"
msgstr ""
-#: includes/functions/settings-options.php:460
+#: includes/functions/settings-options.php:465
msgid ""
"If enabled, users have to verify Cloudflare Turnstile in login page. Also, "
"make sure that Turnstile is configured properly from General Options"
msgstr ""
-#: includes/functions/settings-options.php:473
+#: includes/functions/settings-options.php:478
msgid "Enable payments on your site."
msgstr ""
-#: includes/functions/settings-options.php:479
+#: includes/functions/settings-options.php:484
msgid "Subscription Pack Page"
msgstr ""
-#: includes/functions/settings-options.php:480
+#: includes/functions/settings-options.php:485
msgid "Select the page where [wpuf_sub_pack] located."
msgstr ""
-#: includes/functions/settings-options.php:486
+#: includes/functions/settings-options.php:491
msgid "Subscription at registration"
msgstr ""
-#: includes/functions/settings-options.php:487
+#: includes/functions/settings-options.php:492
msgid "Registration time redirect to subscription page"
msgstr ""
-#: includes/functions/settings-options.php:492
+#: includes/functions/settings-options.php:497
msgid "Currency"
msgstr ""
-#: includes/functions/settings-options.php:499
+#: includes/functions/settings-options.php:504
msgid "Currency Position"
msgstr ""
-#: includes/functions/settings-options.php:503
+#: includes/functions/settings-options.php:508
msgid "Left"
msgstr ""
-#: includes/functions/settings-options.php:505
+#: includes/functions/settings-options.php:510
msgid "Right"
msgstr ""
-#: includes/functions/settings-options.php:507
+#: includes/functions/settings-options.php:512
msgid "Left with space"
msgstr ""
-#: includes/functions/settings-options.php:509
+#: includes/functions/settings-options.php:514
msgid "Right with space"
msgstr ""
-#: includes/functions/settings-options.php:515
+#: includes/functions/settings-options.php:520
msgid "Thousand Separator"
msgstr ""
-#: includes/functions/settings-options.php:516
+#: includes/functions/settings-options.php:521
msgid "This sets the thousand separator of displayed prices."
msgstr ""
-#: includes/functions/settings-options.php:524
+#: includes/functions/settings-options.php:529
msgid "Decimal Separator"
msgstr ""
-#: includes/functions/settings-options.php:525
+#: includes/functions/settings-options.php:530
msgid "This sets the decimal separator of displayed prices."
msgstr ""
-#: includes/functions/settings-options.php:531
+#: includes/functions/settings-options.php:536
msgid "Number of Decimals"
msgstr ""
-#: includes/functions/settings-options.php:532
+#: includes/functions/settings-options.php:537
msgid "This sets the number of decimal points shown in displayed prices."
msgstr ""
-#: includes/functions/settings-options.php:543
+#: includes/functions/settings-options.php:548
msgid "Enable demo/sandbox mode"
msgstr ""
-#: includes/functions/settings-options.php:544
+#: includes/functions/settings-options.php:549
msgid "When sandbox mode is active, all payment gateway will be used in demo mode"
msgstr ""
-#: includes/functions/settings-options.php:551
+#: includes/functions/settings-options.php:556
msgid "Payment Page"
msgstr ""
-#: includes/functions/settings-options.php:552
+#: includes/functions/settings-options.php:557
msgid "This page will be used to process payment options"
msgstr ""
-#: includes/functions/settings-options.php:565
+#: includes/functions/settings-options.php:570
msgid "Payment Gateways"
msgstr ""
-#: includes/functions/settings-options.php:566
+#: includes/functions/settings-options.php:571
msgid "Active payment gateways"
msgstr ""
-#: includes/functions/settings-options.php:572
+#: includes/functions/settings-options.php:577
msgid "Retry Failed Payment"
msgstr ""
-#: includes/functions/settings-options.php:573
+#: includes/functions/settings-options.php:578
msgid "How many times should retry for failed payment max is 4"
msgstr ""
-#: includes/functions/settings-options.php:587
+#: includes/functions/settings-options.php:592
msgid " Guest Email"
msgstr ""
-#: includes/functions/settings-options.php:595
+#: includes/functions/settings-options.php:600
msgid "Guest Email Notification"
msgstr ""
-#: includes/functions/settings-options.php:596
+#: includes/functions/settings-options.php:601
msgid "Enable Guest Email Notification ."
msgstr ""
-#: includes/functions/settings-options.php:602
+#: includes/functions/settings-options.php:607
msgid "Guest mail subject"
msgstr ""
-#: includes/functions/settings-options.php:603
+#: includes/functions/settings-options.php:608
msgid "This sets the subject of the emails sent to guest users"
msgstr ""
-#: includes/functions/settings-options.php:610
+#: includes/functions/settings-options.php:615
msgid "Guest mail body"
msgstr ""
-#: includes/functions/settings-options.php:611
+#: includes/functions/settings-options.php:616
msgid ""
"This sets the body of the emails sent to guest users. Please DON'T edit the "
"{activation_link} part, you can use {sitename} too."
msgstr ""
-#: includes/functions/settings-options.php:629
+#: includes/functions/settings-options.php:634
msgid "Post Types"
msgstr ""
-#: includes/functions/settings-options.php:630
+#: includes/functions/settings-options.php:635
msgid "Select the post types you will allow users to export."
msgstr ""
-#: includes/functions/settings-options.php:664
+#: includes/functions/settings-options.php:643
+msgid "AI Provider"
+msgstr ""
+
+#: includes/functions/settings-options.php:644
+msgid "Select the AI service provider you want to use."
+msgstr ""
+
+#: includes/functions/settings-options.php:652
+msgid "AI Model"
+msgstr ""
+
+#: includes/functions/settings-options.php:653
+msgid "Select the AI model to use for content generation."
+msgstr ""
+
+#: includes/functions/settings-options.php:661
+msgid "API Key"
+msgstr ""
+
+#: includes/functions/settings-options.php:662
+msgid "Enter your AI service API key. Keep this secure and never share it publicly."
+msgstr ""
+
+#: includes/functions/settings-options.php:696
msgid ""
"Select profile/registration forms for user roles. These forms will be used "
"to populate extra edit profile fields in backend."
@@ -8119,14 +8358,6 @@ msgid ""
"webmaster !"
msgstr ""
-#: templates/dashboard/billing-address.php:132
-msgid "Address Line 1"
-msgstr ""
-
-#: templates/dashboard/billing-address.php:140
-msgid "Address Line 2"
-msgstr ""
-
#: templates/dashboard/billing-address.php:155
#: templates/dashboard/billing-address.php:157
msgid "Postal/ZIP Code"
@@ -9220,11 +9451,11 @@ msgstr ""
msgid " or greater."
msgstr ""
-#: wpuf.php:256
+#: wpuf.php:260
msgid "Your WP User Frontend Pro is almost ready!"
msgstr ""
-#: wpuf.php:260
+#: wpuf.php:264
#. translators: 1: opening anchor tag, 2: closing anchor tag.
msgid ""
"We've pushed a major update on both WP User Frontend Free and WP "
diff --git a/wpuf-functions.php b/wpuf-functions.php
index ed62399e2..cea1e3e25 100644
--- a/wpuf-functions.php
+++ b/wpuf-functions.php
@@ -5706,3 +5706,117 @@ function wpuf_field_profile_photo_allowed_mimes() {
return apply_filters( 'wpuf_field_profile_photo_allowed_mimes', $profile_photo_mimes );
}
}
+
+/**
+ * Get AI provider configurations
+ *
+ * @since WPUF_SINCE
+ *
+ * @return array
+ */
+function wpuf_get_ai_provider_configs() {
+ $provider_configs = [
+ 'openai' => [
+ 'name' => 'OpenAI',
+ 'endpoint' => 'https://api.openai.com/v1/chat/completions',
+ 'models' => [
+ 'gpt-4o' => 'GPT-4o - Most Capable Multimodal',
+ 'gpt-4o-mini' => 'GPT-4o Mini - Efficient & Fast',
+ 'gpt-4-turbo' => 'GPT-4 Turbo - High Performance',
+ 'gpt-4' => 'GPT-4 - Advanced Reasoning',
+ 'gpt-3.5-turbo' => 'GPT-3.5 Turbo - Fast & Affordable',
+ ],
+ 'requires_key' => true,
+ ],
+ 'anthropic' => [
+ 'name' => 'Anthropic Claude',
+ 'endpoint' => 'https://api.anthropic.com/v1/messages',
+ 'models' => [
+ 'claude-4.1-opus' => 'Claude 4.1 Opus - Most Capable',
+ 'claude-4-opus' => 'Claude 4 Opus - Best Coding Model',
+ 'claude-4-sonnet' => 'Claude 4 Sonnet - Advanced Reasoning',
+ 'claude-3.7-sonnet' => 'Claude 3.7 Sonnet - Hybrid Reasoning',
+ 'claude-3-5-sonnet-20241022' => 'Claude 3.5 Sonnet Latest',
+ 'claude-3-5-sonnet-20240620' => 'Claude 3.5 Sonnet',
+ 'claude-3-5-haiku-20241022' => 'Claude 3.5 Haiku',
+ 'claude-3-opus-20240229' => 'Claude 3 Opus',
+ 'claude-3-sonnet-20240229' => 'Claude 3 Sonnet',
+ 'claude-3-haiku-20240307' => 'Claude 3 Haiku',
+ ],
+ 'requires_key' => true,
+ ],
+ 'google' => [
+ 'name' => 'Google Gemini',
+ 'endpoint' => 'https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent',
+ 'models' => [
+ 'gemini-2.0-flash-exp' => 'Gemini 2.0 Flash Experimental - Latest',
+ 'gemini-2.0-flash' => 'Gemini 2.0 Flash - Stable',
+ 'gemini-2.0-flash-001' => 'Gemini 2.0 Flash 001 - Stable Version',
+ 'gemini-2.0-flash-lite-001' => 'Gemini 2.0 Flash-Lite 001 - Lightweight',
+ 'gemini-2.0-flash-lite' => 'Gemini 2.0 Flash-Lite - Lightweight',
+ 'gemini-2.5-flash' => 'Gemini 2.5 Flash - Latest Stable',
+ 'gemini-2.5-pro' => 'Gemini 2.5 Pro - Most Capable',
+ 'gemini-2.5-flash-lite' => 'Gemini 2.5 Flash-Lite - Efficient',
+ 'gemini-flash-latest' => 'Gemini Flash Latest - Auto-Updated',
+ 'gemini-pro-latest' => 'Gemini Pro Latest - Auto-Updated',
+ ],
+ 'requires_key' => true,
+ ],
+ ];
+ return apply_filters( 'wpuf_ai_provider_configs', $provider_configs );
+}
+
+/**
+ * Get AI provider options for settings
+ *
+ * @since WPUF_SINCE
+ *
+ * @return array
+ */
+function wpuf_get_ai_provider_options() {
+ $configs = wpuf_get_ai_provider_configs();
+ $options = [];
+
+ foreach ( $configs as $key => $config ) {
+ $options[ $key ] = $config['name'];
+ }
+
+ return $options;
+}
+
+/**
+ * Get AI model options for settings
+ *
+ * @since WPUF_SINCE
+ * @return array
+ */
+function wpuf_get_ai_model_options() {
+ $configs = wpuf_get_ai_provider_configs();
+ $all_models = [];
+ foreach ( $configs as $provider_key => $config ) {
+ foreach ( $config['models'] as $model_key => $model_name ) {
+ $all_models[ $model_key ] = $model_name;
+ }
+ }
+
+ return apply_filters( 'wpuf_ai_model_options', $all_models );
+}
+
+/**
+ * AJAX handler to get AI provider configurations
+ *
+ * @since WPUF_SINCE
+ */
+function wpuf_get_ai_provider_configs_ajax() {
+ // Verify nonce for security
+ if ( ! wp_verify_nonce( $_POST['nonce'] ?? '', 'wpuf_nonce' ) ) {
+ wp_send_json_error( 'Invalid nonce' );
+ }
+ // Check user capabilities
+ if ( ! current_user_can( 'manage_options' ) ) {
+ wp_send_json_error( 'Insufficient permissions' );
+ }
+ // Get AI provider configurations
+ $configs = wpuf_get_ai_provider_configs();
+ wp_send_json_success( $configs );
+}