From 63151b30d65cb5bed28ce4241da535af02a461d5 Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Mon, 7 Oct 2024 17:59:26 +0600 Subject: [PATCH 01/21] initial header style --- Gruntfile.js | 46 +- admin/form-builder/views/form-builder-old.php | 120 + admin/form-builder/views/form-builder.php | 244 +- assets/css/admin/form-builder.css | 2987 +++++++++++++++++ includes/Admin/Forms/Admin_Form.php | 4 +- .../Forms/Post/Templates/Form_Template.php | 1 + includes/Admin/Posting.php | 2 + includes/Assets.php | 6 +- languages/wp-user-frontend.pot | 66 +- package-lock.json | 125 + package.json | 6 +- src/css/admin/form-builder.css | 3 + tailwind.config.js | 2 +- temp.svg | 5 - 14 files changed, 3463 insertions(+), 154 deletions(-) create mode 100644 admin/form-builder/views/form-builder-old.php create mode 100644 assets/css/admin/form-builder.css create mode 100644 src/css/admin/form-builder.css delete mode 100644 temp.svg diff --git a/Gruntfile.js b/Gruntfile.js index 5d5d6ae4c..813a472b6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,9 @@ 'use strict'; -module.exports = function(grunt) { +module.exports = function( grunt) { + const tailwindFileMap = { + 'admin/form-builder/views/form-builder.php': 'admin/form-builder.css', + } + var formBuilderAssets = require('./admin/form-builder/assets/js/form-builder-assets.js'); var pkg = grunt.file.readJSON('package.json'); @@ -112,7 +116,15 @@ module.exports = function(grunt) { tasks: [ 'shell:npm_build' ] - } + }, + + tailwind: { + files: ['src/css/**/*.css', 'admin/form-builder/views/*.php', 'includes/Admin/views/*.php'], + tasks: ['shell:tailwind'], + options: { + spawn: false + } + }, }, // Clean up build directory @@ -221,6 +233,11 @@ module.exports = function(grunt) { shell: { npm_build: { command: 'npm run build', + }, + tailwind: { + command: function ( input, output ) { + return `npx tailwindcss -i ${input} -o ${output}`; + } } } }); @@ -238,6 +255,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks( 'grunt-notify' ); grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' ); grunt.loadNpmTasks( 'grunt-shell' ); + grunt.loadNpmTasks( 'grunt-postcss' ); grunt.registerTask( 'default', [ 'less', 'concat', 'uglify', 'i18n' ] ); @@ -248,4 +266,28 @@ module.exports = function(grunt) { // build stuff grunt.registerTask( 'release', [ 'less', 'concat', 'uglify', 'i18n', 'readme' ] ); grunt.registerTask( 'zip', [ 'clean', 'copy', 'compress' ] ); + + grunt.event.on('watch', function(action, filepath, target) { + if (target === 'tailwind') { + grunt.task.run('tailwind'); + } + }); + + grunt.registerTask('tailwind', function() { + const done = this.async(); + + // Process each file mapping + Object.entries(tailwindFileMap).forEach(([phpFile, cssFile]) => { + const inputFile = `src/css/${cssFile}`; + const outputFile = `assets/css/${cssFile}`; + + // Ensure the input file exists + if (grunt.file.exists(inputFile)) { + // Run the tailwind command + grunt.task.run(`shell:tailwind:${inputFile}:${outputFile}`); + } + }); + + done(); + }); }; diff --git a/admin/form-builder/views/form-builder-old.php b/admin/form-builder/views/form-builder-old.php new file mode 100644 index 000000000..1e3381f98 --- /dev/null +++ b/admin/form-builder/views/form-builder-old.php @@ -0,0 +1,120 @@ +
+
+ + +
+
+
+
+ {{ post.post_title }} + + + + + + + + 1 && isset( $shortcodes[0]['type'] ) ) { + foreach ( $shortcodes as $shortcode ) { + /* translators: %s: form id */ + printf( " %s: #{{ post.ID }}", sprintf( esc_html( __( 'Click to copy %s shortcode', 'wp-user-frontend' ) ), esc_attr( $shortcode['type'] ) ), sprintf( '[%s type="%s" id="%s"]', esc_attr( $shortcode['name'] ), esc_attr( $shortcode['type'] ), esc_attr( $form_id ) ), esc_attr( ucwords( $shortcode['type'] ) ), esc_attr( $shortcode['type'] ) ); + } + } else { + printf( " #{{ post.ID }}", esc_html( __( 'Click to copy shortcode', 'wp-user-frontend' ) ), '[' . esc_attr( $shortcodes[0]['name'] ) . ' id="' . esc_attr( $form_id ) . '"]' ); + } + ?> +
+ + + +
+
+ +
+
+
+ +
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+ + +
+ +
+
+
+ + +
+ + + + + + + + +
+
diff --git a/admin/form-builder/views/form-builder.php b/admin/form-builder/views/form-builder.php index ed6271c7b..547a811e7 100644 --- a/admin/form-builder/views/form-builder.php +++ b/admin/form-builder/views/form-builder.php @@ -1,17 +1,138 @@
-
- - -
-
-
-
- {{ post.post_title }} - - - - - - - - 1 && isset( $shortcodes[0]['type'] ) ) { - foreach ( $shortcodes as $shortcode ) { - /* translators: %s: form id */ - printf( " %s: #{{ post.ID }}", sprintf( esc_html( __( 'Click to copy %s shortcode', 'wp-user-frontend' ) ), esc_attr( $shortcode['type'] ) ), sprintf( '[%s type="%s" id="%s"]', esc_attr( $shortcode['name'] ), esc_attr( $shortcode['type'] ), esc_attr( $form_id ) ), esc_attr( ucwords( $shortcode['type'] ) ), esc_attr( $shortcode['type'] ) ); - } - } else { - printf( " #{{ post.ID }}", esc_html( __( 'Click to copy shortcode', 'wp-user-frontend' ) ), '[' . esc_attr( $shortcodes[0]['name'] ) . ' id="' . esc_attr( $form_id ) . '"]' ); - } - ?> -
- - - -
-
- -
-
-
- -
-
- -
- -
-
- -
-
-
-
- -
-
- - -
- -
-
-
- - +
- - - - - - - - -
-
+ + diff --git a/assets/css/admin/form-builder.css b/assets/css/admin/form-builder.css new file mode 100644 index 000000000..4666c7689 --- /dev/null +++ b/assets/css/admin/form-builder.css @@ -0,0 +1,2987 @@ +/* +! tailwindcss v3.4.11 | MIT License | https://tailwindcss.com +*/ + +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; + /* 1 */ + border-width: 0; + /* 2 */ + border-style: solid; + /* 2 */ + border-color: #e5e7eb; + /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -moz-tab-size: 4; + /* 3 */ + -o-tab-size: 4; + tab-size: 4; + /* 3 */ + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + /* 4 */ + font-feature-settings: normal; + /* 5 */ + font-variation-settings: normal; + /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; + /* 1 */ + line-height: inherit; + /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; + /* 1 */ + color: inherit; + /* 2 */ + border-top-width: 1px; + /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + /* 1 */ + font-feature-settings: normal; + /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; + /* 1 */ + border-color: inherit; + /* 2 */ + border-collapse: collapse; + /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + font-weight: inherit; + /* 1 */ + line-height: inherit; + /* 1 */ + letter-spacing: inherit; + /* 1 */ + color: inherit; + /* 1 */ + margin: 0; + /* 2 */ + padding: 0; + /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { + -webkit-appearance: button; + /* 1 */ + background-color: transparent; + /* 2 */ + background-image: none; + /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ + +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + /* 1 */ + vertical-align: middle; + /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden] { + display: none; +} + +[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { + -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; +} + +[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select: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; +} + +input::-moz-placeholder, textarea::-moz-placeholder { + color: #6b7280; + opacity: 1; +} + +input::placeholder,textarea::placeholder { + color: #6b7280; + opacity: 1; +} + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +::-webkit-date-and-time-value { + min-height: 1.5em; + text-align: inherit; +} + +::-webkit-datetime-edit { + display: inline-flex; +} + +::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field { + padding-top: 0; + padding-bottom: 0; +} + +select { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); + background-position: right 0.5rem center; + background-repeat: no-repeat; + background-size: 1.5em 1.5em; + padding-right: 2.5rem; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; +} + +[multiple],[size]:where(select:not([size="1"])) { + background-image: initial; + background-position: initial; + background-repeat: unset; + background-size: initial; + padding-right: 0.75rem; + -webkit-print-color-adjust: unset; + print-color-adjust: unset; +} + +[type='checkbox'],[type='radio'] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + display: inline-block; + vertical-align: middle; + background-origin: border-box; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + flex-shrink: 0; + height: 1rem; + width: 1rem; + color: #2563eb; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + --tw-shadow: 0 0 #0000; +} + +[type='checkbox'] { + border-radius: 0px; +} + +[type='radio'] { + border-radius: 100%; +} + +[type='checkbox']:focus,[type='radio']:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); + --tw-ring-offset-width: 2px; + --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(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); +} + +[type='checkbox']:checked,[type='radio']:checked { + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; +} + +[type='checkbox']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); +} + +@media (forced-colors: active) { + [type='checkbox']:checked { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + +[type='radio']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); +} + +@media (forced-colors: active) { + [type='radio']:checked { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + +[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus { + border-color: transparent; + background-color: currentColor; +} + +[type='checkbox']:indeterminate { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; +} + +@media (forced-colors: active) { + [type='checkbox']:indeterminate { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + +[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { + border-color: transparent; + background-color: currentColor; +} + +[type='file'] { + background: unset; + border-color: inherit; + border-width: 0; + border-radius: 0; + padding: 0; + font-size: unset; + line-height: inherit; +} + +[type='file']:focus { + outline: 1px solid ButtonText; + outline: 1px auto -webkit-focus-ring-color; +} + +:root, +[data-theme] { + background-color: var(--fallback-b1,oklch(var(--b1)/1)); + color: var(--fallback-bc,oklch(var(--bc)/1)); +} + +@supports not (color: oklch(0% 0 0)) { + :root { + color-scheme: light; + --fallback-p: #491eff; + --fallback-pc: #d4dbff; + --fallback-s: #ff41c7; + --fallback-sc: #fff9fc; + --fallback-a: #00cfbd; + --fallback-ac: #00100d; + --fallback-n: #2b3440; + --fallback-nc: #d7dde4; + --fallback-b1: #ffffff; + --fallback-b2: #e5e6e6; + --fallback-b3: #e5e6e6; + --fallback-bc: #1f2937; + --fallback-in: #00b3f0; + --fallback-inc: #000000; + --fallback-su: #00ca92; + --fallback-suc: #000000; + --fallback-wa: #ffc22d; + --fallback-wac: #000000; + --fallback-er: #ff6f70; + --fallback-erc: #000000; + } + + @media (prefers-color-scheme: dark) { + :root { + color-scheme: dark; + --fallback-p: #7582ff; + --fallback-pc: #050617; + --fallback-s: #ff71cf; + --fallback-sc: #190211; + --fallback-a: #00c7b5; + --fallback-ac: #000e0c; + --fallback-n: #2a323c; + --fallback-nc: #a6adbb; + --fallback-b1: #1d232a; + --fallback-b2: #191e24; + --fallback-b3: #15191e; + --fallback-bc: #a6adbb; + --fallback-in: #00b3f0; + --fallback-inc: #000000; + --fallback-su: #00ca92; + --fallback-suc: #000000; + --fallback-wa: #ffc22d; + --fallback-wac: #000000; + --fallback-er: #ff6f70; + --fallback-erc: #000000; + } + } +} + +html { + -webkit-tap-highlight-color: transparent; +} + +* { + scrollbar-color: color-mix(in oklch, currentColor 35%, transparent) transparent; +} + +*:hover { + scrollbar-color: color-mix(in oklch, currentColor 60%, transparent) transparent; +} + +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +.wpuf-avatar { + position: relative; + display: inline-flex; +} + +.wpuf-avatar > div { + display: block; + aspect-ratio: 1 / 1; + overflow: hidden; +} + +.wpuf-avatar img { + height: 100%; + width: 100%; + -o-object-fit: cover; + object-fit: cover; +} + +.wpuf-avatar.wpuf-placeholder > div { + display: flex; + align-items: center; + justify-content: center; +} + +.wpuf-avatar-group :where(.wpuf-avatar) { + overflow: hidden; + border-radius: 9999px; + border-width: 4px; + --tw-border-opacity: 1; + border-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-border-opacity))); +} + +@keyframes button-pop { + 0% { + transform: scale(var(--btn-focus-scale, 0.98)); + } + + 40% { + transform: scale(1.02); + } + + 100% { + transform: scale(1); + } +} + +@keyframes checkmark { + 0% { + background-position-y: 5px; + } + + 50% { + background-position-y: -2px; + } + + 100% { + background-position-y: 0; + } +} + +.wpuf-loading { + pointer-events: none; + display: inline-block; + aspect-ratio: 1 / 1; + width: 1.5rem; + background-color: currentColor; + -webkit-mask-size: 100%; + mask-size: 100%; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + -webkit-mask-position: center; + mask-position: center; + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} + +@keyframes modal-pop { + 0% { + opacity: 0; + } +} + +@keyframes progress-loading { + 50% { + background-position-x: -115%; + } +} + +@keyframes radiomark { + 0% { + box-shadow: 0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset, + 0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset; + } + + 50% { + box-shadow: 0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset, + 0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset; + } + + 100% { + box-shadow: 0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset, + 0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset; + } +} + +@keyframes rating-pop { + 0% { + transform: translateY(-0.125em); + } + + 40% { + transform: translateY(-0.125em); + } + + 100% { + transform: translateY(0); + } +} + +@keyframes skeleton { + from { + background-position: 150%; + } + + to { + background-position: -50%; + } +} + +@keyframes toast-pop { + 0% { + transform: scale(0.9); + opacity: 0; + } + + 100% { + transform: scale(1); + opacity: 1; + } +} + +.wpuf-tooltip { + position: relative; + display: inline-block; + --tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px)); +} + +.wpuf-tooltip:before { + position: absolute; + pointer-events: none; + z-index: 1; + content: var(--tw-content); + --tw-content: attr(data-tip); +} + +.wpuf-tooltip:before, .wpuf-tooltip-top:before { + transform: translateX(-50%); + top: auto; + left: 50%; + right: auto; + bottom: var(--tooltip-offset); +} + +.wpuf-avatar.wpuf-online:before { + content: ""; + position: absolute; + z-index: 10; + display: block; + border-radius: 9999px; + --tw-bg-opacity: 1; + background-color: var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity))); + outline-style: solid; + outline-width: 2px; + outline-color: var(--fallback-b1,oklch(var(--b1)/1)); + width: 15%; + height: 15%; + top: 7%; + right: 7%; +} + +.wpuf-avatar.wpuf-offline:before { + content: ""; + position: absolute; + z-index: 10; + display: block; + border-radius: 9999px; + --tw-bg-opacity: 1; + background-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity))); + outline-style: solid; + outline-width: 2px; + outline-color: var(--fallback-b1,oklch(var(--b1)/1)); + width: 15%; + height: 15%; + top: 7%; + right: 7%; +} + +.wpuf-tooltip { + position: relative; + display: inline-block; + text-align: center; + --tooltip-tail: 0.1875rem; + --tooltip-color: var(--fallback-n,oklch(var(--n)/1)); + --tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1)); + --tooltip-tail-offset: calc(100% + 0.0625rem - var(--tooltip-tail)); +} + +.wpuf-tooltip:before, +.wpuf-tooltip:after { + opacity: 0; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-delay: 100ms; + transition-duration: 200ms; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +.wpuf-tooltip:after { + position: absolute; + content: ""; + border-style: solid; + border-width: var(--tooltip-tail, 0); + width: 0; + height: 0; + display: block; +} + +.wpuf-tooltip:before { + max-width: 20rem; + white-space: normal; + border-radius: 0.25rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; + font-size: 0.875rem; + line-height: 1.25rem; + background-color: var(--tooltip-color); + color: var(--tooltip-text-color); + width: -moz-max-content; + width: max-content; +} + +.wpuf-tooltip.wpuf-tooltip-open:before { + opacity: 1; + transition-delay: 75ms; +} + +.wpuf-tooltip.wpuf-tooltip-open:after { + opacity: 1; + transition-delay: 75ms; +} + +.wpuf-tooltip:hover:before { + opacity: 1; + transition-delay: 75ms; +} + +.wpuf-tooltip:hover:after { + opacity: 1; + transition-delay: 75ms; +} + +.wpuf-tooltip:has(:focus-visible):after, +.wpuf-tooltip:has(:focus-visible):before { + opacity: 1; + transition-delay: 75ms; +} + +.wpuf-tooltip:not([data-tip]):hover:before, +.wpuf-tooltip:not([data-tip]):hover:after { + visibility: hidden; + opacity: 0; +} + +.wpuf-tooltip:after, .wpuf-tooltip-top:after { + transform: translateX(-50%); + border-color: var(--tooltip-color) transparent transparent transparent; + top: auto; + left: 50%; + right: auto; + bottom: var(--tooltip-tail-offset); +} + +.wpuf-sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.wpuf-pointer-events-none { + pointer-events: none; +} + +.wpuf-fixed { + position: fixed; +} + +.wpuf-absolute { + position: absolute; +} + +.wpuf-relative { + position: relative; +} + +.wpuf-inset-0 { + inset: 0px; +} + +.wpuf-inset-y-0 { + top: 0px; + bottom: 0px; +} + +.wpuf--left-20 { + left: -5rem; +} + +.wpuf-left-0 { + left: 0px; +} + +.wpuf-left-\[-2\%\] { + left: -2%; +} + +.wpuf-left-\[-20px\] { + left: -20px; +} + +.wpuf-left-\[calc\(50\%-5rem\)\] { + left: calc(50% - 5rem); +} + +.wpuf-right-0 { + right: 0px; +} + +.wpuf-right-4 { + right: 1rem; +} + +.wpuf-right-6 { + right: 1.5rem; +} + +.wpuf-right-8 { + right: 2rem; +} + +.wpuf-top-0 { + top: 0px; +} + +.wpuf-top-1\/3 { + top: 33.333333%; +} + +.wpuf-top-20 { + top: 5rem; +} + +.wpuf-top-4 { + top: 1rem; +} + +.wpuf-top-\[-40\%\] { + top: -40%; +} + +.wpuf-top-\[40px\] { + top: 40px; +} + +.wpuf-z-10 { + z-index: 10; +} + +.wpuf-z-20 { + z-index: 20; +} + +.wpuf-z-40 { + z-index: 40; +} + +.wpuf-z-50 { + z-index: 50; +} + +.wpuf-col-span-2 { + grid-column: span 2 / span 2; +} + +.wpuf-m-0 { + margin: 0px; +} + +.wpuf--mx-1\.5 { + margin-left: -0.375rem; + margin-right: -0.375rem; +} + +.wpuf--my-1\.5 { + margin-top: -0.375rem; + margin-bottom: -0.375rem; +} + +.wpuf-mx-auto { + margin-left: auto; + margin-right: auto; +} + +.wpuf-my-0 { + margin-top: 0px; + margin-bottom: 0px; +} + +.wpuf-my-8 { + margin-top: 2rem; + margin-bottom: 2rem; +} + +.wpuf--mb-px { + margin-bottom: -1px; +} + +.wpuf--ml-3 { + margin-left: -0.75rem; +} + +.wpuf--ml-px { + margin-left: -1px; +} + +.wpuf--mr-3 { + margin-right: -0.75rem; +} + +.wpuf-mb-0 { + margin-bottom: 0px; +} + +.wpuf-mb-1 { + margin-bottom: 0.25rem; +} + +.wpuf-mb-4 { + margin-bottom: 1rem; +} + +.wpuf-mb-5 { + margin-bottom: 1.25rem; +} + +.wpuf-me-2 { + margin-inline-end: 0.5rem; +} + +.wpuf-ml-1 { + margin-left: 0.25rem; +} + +.wpuf-ml-2 { + margin-left: 0.5rem; +} + +.wpuf-ml-3 { + margin-left: 0.75rem; +} + +.wpuf-ml-4 { + margin-left: 1rem; +} + +.wpuf-ml-\[-20px\] { + margin-left: -20px; +} + +.wpuf-mr-1 { + margin-right: 0.25rem; +} + +.wpuf-mr-2 { + margin-right: 0.5rem; +} + +.wpuf-mr-4 { + margin-right: 1rem; +} + +.wpuf-mr-\[10px\] { + margin-right: 10px; +} + +.wpuf-mr-\[16px\] { + margin-right: 16px; +} + +.wpuf-mt-0 { + margin-top: 0px; +} + +.wpuf-mt-1 { + margin-top: 0.25rem; +} + +.wpuf-mt-12 { + margin-top: 3rem; +} + +.wpuf-mt-16 { + margin-top: 4rem; +} + +.wpuf-mt-2 { + margin-top: 0.5rem; +} + +.wpuf-mt-4 { + margin-top: 1rem; +} + +.wpuf-mt-5 { + margin-top: 1.25rem; +} + +.wpuf-mt-8 { + margin-top: 2rem; +} + +.wpuf-mt-\[1px\] { + margin-top: 1px; +} + +.wpuf-mt-\[32px\] { + margin-top: 32px; +} + +.wpuf-mt-\[40px\] { + margin-top: 40px; +} + +.wpuf-block { + display: block; +} + +.wpuf-inline-block { + display: inline-block; +} + +.wpuf-flex { + display: flex; +} + +.wpuf-inline-flex { + display: inline-flex; +} + +.wpuf-grid { + display: grid; +} + +.wpuf-hidden { + display: none; +} + +.wpuf-h-10 { + height: 2.5rem; +} + +.wpuf-h-12 { + height: 3rem; +} + +.wpuf-h-3 { + height: 0.75rem; +} + +.wpuf-h-3\.5 { + height: 0.875rem; +} + +.wpuf-h-5 { + height: 1.25rem; +} + +.wpuf-h-6 { + height: 1.5rem; +} + +.wpuf-h-8 { + height: 2rem; +} + +.wpuf-h-80 { + height: 20rem; +} + +.wpuf-h-\[180\%\] { + height: 180%; +} + +.wpuf-h-\[50vh\] { + height: 50vh; +} + +.wpuf-h-full { + height: 100%; +} + +.wpuf-h-max { + height: -moz-max-content; + height: max-content; +} + +.wpuf-h-screen { + height: 100vh; +} + +.wpuf-h-svh { + height: 100svh; +} + +.wpuf-min-h-full { + min-height: 100%; +} + +.wpuf-min-h-max { + min-height: -moz-max-content; + min-height: max-content; +} + +.wpuf-w-1\/2 { + width: 50%; +} + +.wpuf-w-1\/3 { + width: 33.333333%; +} + +.wpuf-w-10 { + width: 2.5rem; +} + +.wpuf-w-11 { + width: 2.75rem; +} + +.wpuf-w-12 { + width: 3rem; +} + +.wpuf-w-2\/4 { + width: 50%; +} + +.wpuf-w-2\/5 { + width: 40%; +} + +.wpuf-w-3 { + width: 0.75rem; +} + +.wpuf-w-3\.5 { + width: 0.875rem; +} + +.wpuf-w-3\/4 { + width: 75%; +} + +.wpuf-w-44 { + width: 11rem; +} + +.wpuf-w-5 { + width: 1.25rem; +} + +.wpuf-w-6 { + width: 1.5rem; +} + +.wpuf-w-8 { + width: 2rem; +} + +.wpuf-w-\[104\%\] { + width: 104%; +} + +.wpuf-w-\[calc\(100\%\+40px\)\] { + width: calc(100% + 40px); +} + +.wpuf-w-\[calc\(100\%-2rem\)\] { + width: calc(100% - 2rem); +} + +.wpuf-w-auto { + width: auto; +} + +.wpuf-w-fit { + width: -moz-fit-content; + width: fit-content; +} + +.wpuf-w-full { + width: 100%; +} + +.wpuf-w-max { + width: -moz-max-content; + width: max-content; +} + +.wpuf-w-screen { + width: 100vw; +} + +.wpuf-min-w-0 { + min-width: 0px; +} + +.\!wpuf-max-w-full { + max-width: 100% !important; +} + +.wpuf-max-w-lg { + max-width: 32rem; +} + +.wpuf-max-w-xs { + max-width: 20rem; +} + +.wpuf-flex-1 { + flex: 1 1 0%; +} + +.wpuf-flex-none { + flex: none; +} + +.wpuf-flex-shrink { + flex-shrink: 1; +} + +.wpuf-flex-shrink-0 { + flex-shrink: 0; +} + +.wpuf-flex-grow { + flex-grow: 1; +} + +.wpuf-basis-1\/5 { + flex-basis: 20%; +} + +.wpuf-basis-4\/5 { + flex-basis: 80%; +} + +.wpuf-origin-top-right { + transform-origin: top right; +} + +.wpuf-translate-x-0 { + --tw-translate-x: 0px; + 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-5 { + --tw-translate-x: 1.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-rotate-180 { + --tw-rotate: 180deg; + 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-rotate-90 { + --tw-rotate: 90deg; + 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-scale-100 { + --tw-scale-x: 1; + --tw-scale-y: 1; + 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-scale-95 { + --tw-scale-x: .95; + --tw-scale-y: .95; + 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-transform { + 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-cursor-not-allowed { + cursor: not-allowed; +} + +.wpuf-cursor-pointer { + cursor: pointer; +} + +.wpuf-grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); +} + +.wpuf-grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.wpuf-grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +.wpuf-flex-row-reverse { + flex-direction: row-reverse; +} + +.wpuf-flex-col { + flex-direction: column; +} + +.wpuf-flex-wrap { + flex-wrap: wrap; +} + +.wpuf-items-start { + align-items: flex-start; +} + +.wpuf-items-center { + align-items: center; +} + +.wpuf-items-baseline { + align-items: baseline; +} + +.wpuf-items-stretch { + align-items: stretch; +} + +.wpuf-justify-start { + justify-content: flex-start; +} + +.wpuf-justify-end { + justify-content: flex-end; +} + +.wpuf-justify-center { + justify-content: center; +} + +.wpuf-justify-between { + justify-content: space-between; +} + +.wpuf-justify-around { + justify-content: space-around; +} + +.wpuf-gap-3 { + gap: 0.75rem; +} + +.wpuf-gap-4 { + gap: 1rem; +} + +.wpuf-gap-x-1\.5 { + -moz-column-gap: 0.375rem; + column-gap: 0.375rem; +} + +.wpuf-gap-x-3 { + -moz-column-gap: 0.75rem; + column-gap: 0.75rem; +} + +.wpuf--space-x-px > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(-1px * var(--tw-space-x-reverse)); + margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse))); +} + +.wpuf-space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +} + +.wpuf-space-x-8 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(2rem * var(--tw-space-x-reverse)); + margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); +} + +.wpuf-space-y-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); +} + +.wpuf-overflow-hidden { + overflow: hidden; +} + +.wpuf-overflow-y-auto { + overflow-y: auto; +} + +.wpuf-whitespace-nowrap { + white-space: nowrap; +} + +.wpuf-text-wrap { + text-wrap: wrap; +} + +.\!wpuf-rounded-none { + border-radius: 0px !important; +} + +.wpuf-rounded { + border-radius: 0.25rem; +} + +.wpuf-rounded-full { + border-radius: 9999px; +} + +.wpuf-rounded-lg { + border-radius: 0.5rem; +} + +.wpuf-rounded-md { + border-radius: 0.375rem; +} + +.wpuf-rounded-xl { + border-radius: 0.75rem; +} + +.\!wpuf-rounded-l-md { + border-top-left-radius: 0.375rem !important; + border-bottom-left-radius: 0.375rem !important; +} + +.wpuf-rounded-b-md { + border-bottom-right-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; +} + +.wpuf-rounded-b-xl { + border-bottom-right-radius: 0.75rem; + border-bottom-left-radius: 0.75rem; +} + +.wpuf-rounded-e-lg { + border-start-end-radius: 0.5rem; + border-end-end-radius: 0.5rem; +} + +.wpuf-rounded-l-md { + border-top-left-radius: 0.375rem; + border-bottom-left-radius: 0.375rem; +} + +.wpuf-rounded-r-md { + border-top-right-radius: 0.375rem; + border-bottom-right-radius: 0.375rem; +} + +.wpuf-rounded-s-lg { + border-start-start-radius: 0.5rem; + border-end-start-radius: 0.5rem; +} + +.wpuf-rounded-t-lg { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; +} + +.wpuf-rounded-t-md { + border-top-left-radius: 0.375rem; + border-top-right-radius: 0.375rem; +} + +.wpuf-rounded-t-xl { + border-top-left-radius: 0.75rem; + border-top-right-radius: 0.75rem; +} + +.\!wpuf-border-0 { + border-width: 0px !important; +} + +.wpuf-border { + border-width: 1px; +} + +.wpuf-border-2 { + border-width: 2px; +} + +.wpuf-border-b { + border-bottom-width: 1px; +} + +.wpuf-border-b-2 { + border-bottom-width: 2px; +} + +.wpuf-border-r-2 { + border-right-width: 2px; +} + +.wpuf-border-t { + border-top-width: 1px; +} + +.wpuf-border-dashed { + border-style: dashed; +} + +.\!wpuf-border-gray-300 { + --tw-border-opacity: 1 !important; + border-color: rgb(209 213 219 / var(--tw-border-opacity)) !important; +} + +.\!wpuf-border-red-500 { + --tw-border-opacity: 1 !important; + border-color: rgb(239 68 68 / var(--tw-border-opacity)) !important; +} + +.wpuf-border-blue-500 { + --tw-border-opacity: 1; + border-color: rgb(59 130 246 / var(--tw-border-opacity)); +} + +.wpuf-border-blue-600 { + --tw-border-opacity: 1; + border-color: rgb(37 99 235 / var(--tw-border-opacity)); +} + +.wpuf-border-gray-100 { + --tw-border-opacity: 1; + border-color: rgb(243 244 246 / var(--tw-border-opacity)); +} + +.wpuf-border-gray-200 { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity)); +} + +.wpuf-border-indigo-500 { + --tw-border-opacity: 1; + border-color: rgb(99 102 241 / var(--tw-border-opacity)); +} + +.wpuf-border-indigo-600 { + --tw-border-opacity: 1; + border-color: rgb(79 70 229 / 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-bg-amber-500 { + --tw-bg-opacity: 1; + background-color: rgb(245 158 11 / var(--tw-bg-opacity)); +} + +.wpuf-bg-amber-600 { + --tw-bg-opacity: 1; + background-color: rgb(217 119 6 / var(--tw-bg-opacity)); +} + +.wpuf-bg-black\/25 { + background-color: rgb(0 0 0 / 0.25); +} + +.wpuf-bg-blue-500 { + --tw-bg-opacity: 1; + background-color: rgb(59 130 246 / var(--tw-bg-opacity)); +} + +.wpuf-bg-gray-100 { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.wpuf-bg-gray-200 { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity)); +} + +.wpuf-bg-gray-50 { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.wpuf-bg-gray-500 { + --tw-bg-opacity: 1; + background-color: rgb(107 114 128 / var(--tw-bg-opacity)); +} + +.wpuf-bg-green-100 { + --tw-bg-opacity: 1; + background-color: rgb(220 252 231 / var(--tw-bg-opacity)); +} + +.wpuf-bg-green-50 { + --tw-bg-opacity: 1; + background-color: rgb(240 253 244 / var(--tw-bg-opacity)); +} + +.wpuf-bg-indigo-600 { + --tw-bg-opacity: 1; + background-color: rgb(79 70 229 / var(--tw-bg-opacity)); +} + +.wpuf-bg-indigo-700 { + --tw-bg-opacity: 1; + background-color: rgb(67 56 202 / var(--tw-bg-opacity)); +} + +.wpuf-bg-orange-50 { + --tw-bg-opacity: 1; + background-color: rgb(255 247 237 / var(--tw-bg-opacity)); +} + +.wpuf-bg-red-100 { + --tw-bg-opacity: 1; + background-color: rgb(254 226 226 / var(--tw-bg-opacity)); +} + +.wpuf-bg-red-50 { + --tw-bg-opacity: 1; + background-color: rgb(254 242 242 / var(--tw-bg-opacity)); +} + +.wpuf-bg-red-500 { + --tw-bg-opacity: 1; + background-color: rgb(239 68 68 / var(--tw-bg-opacity)); +} + +.wpuf-bg-red-600 { + --tw-bg-opacity: 1; + background-color: rgb(220 38 38 / var(--tw-bg-opacity)); +} + +.wpuf-bg-slate-100 { + --tw-bg-opacity: 1; + background-color: rgb(241 245 249 / var(--tw-bg-opacity)); +} + +.wpuf-bg-slate-50 { + --tw-bg-opacity: 1; + background-color: rgb(248 250 252 / var(--tw-bg-opacity)); +} + +.wpuf-bg-transparent { + background-color: transparent; +} + +.wpuf-bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.wpuf-bg-yellow-100 { + --tw-bg-opacity: 1; + background-color: rgb(254 249 195 / var(--tw-bg-opacity)); +} + +.wpuf-bg-yellow-50 { + --tw-bg-opacity: 1; + background-color: rgb(254 252 232 / var(--tw-bg-opacity)); +} + +.wpuf-bg-opacity-75 { + --tw-bg-opacity: 0.75; +} + +.wpuf-p-0 { + padding: 0px; +} + +.wpuf-p-1 { + padding: 0.25rem; +} + +.wpuf-p-1\.5 { + padding: 0.375rem; +} + +.wpuf-p-2 { + padding: 0.5rem; +} + +.wpuf-p-4 { + padding: 1rem; +} + +.wpuf-p-5 { + padding: 1.25rem; +} + +.wpuf-p-6 { + padding: 1.5rem; +} + +.wpuf-p-\[10px\] { + padding: 10px; +} + +.\!wpuf-px-4 { + padding-left: 1rem !important; + padding-right: 1rem !important; +} + +.\!wpuf-py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.wpuf-px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.wpuf-px-12 { + padding-left: 3rem; + padding-right: 3rem; +} + +.wpuf-px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.wpuf-px-2\.5 { + padding-left: 0.625rem; + padding-right: 0.625rem; +} + +.wpuf-px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.wpuf-px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.wpuf-px-5 { + padding-left: 1.25rem; + padding-right: 1.25rem; +} + +.wpuf-px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} + +.wpuf-px-\[20px\] { + padding-left: 20px; + padding-right: 20px; +} + +.wpuf-py-0\.5 { + padding-top: 0.125rem; + padding-bottom: 0.125rem; +} + +.wpuf-py-1 { + padding-top: 0.25rem; + padding-bottom: 0.25rem; +} + +.wpuf-py-1\.5 { + padding-top: 0.375rem; + padding-bottom: 0.375rem; +} + +.wpuf-py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.wpuf-py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} + +.wpuf-py-4 { + padding-top: 1rem; + padding-bottom: 1rem; +} + +.wpuf-py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; +} + +.wpuf-py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} + +.\!wpuf-pl-10 { + padding-left: 2.5rem !important; +} + +.wpuf-pb-4 { + padding-bottom: 1rem; +} + +.wpuf-pb-6 { + padding-bottom: 1.5rem; +} + +.wpuf-pl-1 { + padding-left: 0.25rem; +} + +.wpuf-pl-2 { + padding-left: 0.5rem; +} + +.wpuf-pl-3 { + padding-left: 0.75rem; +} + +.wpuf-pl-\[20px\] { + padding-left: 20px; +} + +.wpuf-pl-\[48px\] { + padding-left: 48px; +} + +.wpuf-pr-10 { + padding-right: 2.5rem; +} + +.wpuf-pr-2 { + padding-right: 0.5rem; +} + +.wpuf-pr-3 { + padding-right: 0.75rem; +} + +.wpuf-pr-4 { + padding-right: 1rem; +} + +.wpuf-pr-\[20px\] { + padding-right: 20px; +} + +.wpuf-pr-\[48px\] { + padding-right: 48px; +} + +.wpuf-pt-1 { + padding-top: 0.25rem; +} + +.wpuf-pt-4 { + padding-top: 1rem; +} + +.wpuf-pt-5 { + padding-top: 1.25rem; +} + +.wpuf-pt-\[40px\] { + padding-top: 40px; +} + +.wpuf-text-left { + text-align: left; +} + +.wpuf-text-center { + text-align: center; +} + +.wpuf-text-end { + text-align: end; +} + +.wpuf-text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + +.wpuf-text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} + +.wpuf-text-\[11px\] { + font-size: 11px; +} + +.wpuf-text-\[24px\] { + font-size: 24px; +} + +.wpuf-text-base { + font-size: 1rem; + line-height: 1.5rem; +} + +.wpuf-text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + +.wpuf-text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.wpuf-text-xs { + font-size: 0.75rem; + line-height: 1rem; +} + +.wpuf-font-bold { + font-weight: 700; +} + +.wpuf-font-medium { + font-weight: 500; +} + +.wpuf-font-normal { + font-weight: 400; +} + +.wpuf-font-semibold { + font-weight: 600; +} + +.wpuf-italic { + font-style: italic; +} + +.wpuf-leading-10 { + line-height: 2.5rem; +} + +.wpuf-leading-6 { + line-height: 1.5rem; +} + +.wpuf-leading-none { + line-height: 1; +} + +.wpuf-tracking-tight { + letter-spacing: -0.025em; +} + +.\!wpuf-text-red-900 { + --tw-text-opacity: 1 !important; + color: rgb(127 29 29 / var(--tw-text-opacity)) !important; +} + +.wpuf-text-blue-600 { + --tw-text-opacity: 1; + color: rgb(37 99 235 / var(--tw-text-opacity)); +} + +.wpuf-text-blue-700 { + --tw-text-opacity: 1; + color: rgb(29 78 216 / var(--tw-text-opacity)); +} + +.wpuf-text-gray-400 { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +.wpuf-text-gray-500 { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.wpuf-text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +.wpuf-text-gray-700 { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} + +.wpuf-text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.wpuf-text-green-500 { + --tw-text-opacity: 1; + color: rgb(34 197 94 / var(--tw-text-opacity)); +} + +.wpuf-text-green-700 { + --tw-text-opacity: 1; + color: rgb(21 128 61 / var(--tw-text-opacity)); +} + +.wpuf-text-indigo-600 { + --tw-text-opacity: 1; + color: rgb(79 70 229 / var(--tw-text-opacity)); +} + +.wpuf-text-orange-700 { + --tw-text-opacity: 1; + color: rgb(194 65 12 / var(--tw-text-opacity)); +} + +.wpuf-text-red-500 { + --tw-text-opacity: 1; + color: rgb(239 68 68 / var(--tw-text-opacity)); +} + +.wpuf-text-red-600 { + --tw-text-opacity: 1; + color: rgb(220 38 38 / var(--tw-text-opacity)); +} + +.wpuf-text-red-700 { + --tw-text-opacity: 1; + color: rgb(185 28 28 / var(--tw-text-opacity)); +} + +.wpuf-text-slate-700 { + --tw-text-opacity: 1; + color: rgb(51 65 85 / var(--tw-text-opacity)); +} + +.wpuf-text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.wpuf-text-yellow-400 { + --tw-text-opacity: 1; + color: rgb(250 204 21 / var(--tw-text-opacity)); +} + +.wpuf-text-yellow-500 { + --tw-text-opacity: 1; + color: rgb(234 179 8 / var(--tw-text-opacity)); +} + +.wpuf-text-yellow-700 { + --tw-text-opacity: 1; + color: rgb(161 98 7 / var(--tw-text-opacity)); +} + +.wpuf-opacity-0 { + opacity: 0; +} + +.wpuf-opacity-100 { + opacity: 1; +} + +.wpuf-shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.wpuf-shadow-lg { + --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); +} + +.wpuf-shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.wpuf-shadow-xl { + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.\!wpuf-ring-1 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important; + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important; + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important; +} + +.wpuf-ring-0 { + --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(0px + 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-1 { + --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, 0 0 #0000); +} + +.\!wpuf-ring-inset { + --tw-ring-inset: inset !important; +} + +.wpuf-ring-inset { + --tw-ring-inset: inset; +} + +.\!wpuf-ring-gray-300 { + --tw-ring-opacity: 1 !important; + --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)) !important; +} + +.wpuf-ring-blue-200 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity)); +} + +.wpuf-ring-gray-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); +} + +.wpuf-ring-gray-900\/5 { + --tw-ring-color: rgb(17 24 39 / 0.05); +} + +.wpuf-ring-green-600\/20 { + --tw-ring-color: rgb(22 163 74 / 0.2); +} + +.wpuf-ring-indigo-600 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity)); +} + +.wpuf-ring-orange-600\/10 { + --tw-ring-color: rgb(234 88 12 / 0.1); +} + +.wpuf-ring-red-300 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity)); +} + +.wpuf-ring-red-500 { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); +} + +.wpuf-ring-red-600\/10 { + --tw-ring-color: rgb(220 38 38 / 0.1); +} + +.wpuf-ring-slate-600\/10 { + --tw-ring-color: rgb(71 85 105 / 0.1); +} + +.wpuf-ring-yellow-600\/10 { + --tw-ring-color: rgb(202 138 4 / 0.1); +} + +.wpuf-blur { + --tw-blur: blur(8px); + 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); +} + +.wpuf-transition { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.wpuf-transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.wpuf-transition-colors { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.wpuf-transition-opacity { + transition-property: opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.wpuf-duration-100 { + transition-duration: 100ms; +} + +.wpuf-duration-200 { + transition-duration: 200ms; +} + +.wpuf-duration-75 { + transition-duration: 75ms; +} + +.wpuf-ease-in { + transition-timing-function: cubic-bezier(0.4, 0, 1, 1); +} + +.wpuf-ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +.wpuf-ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); +} + +.placeholder\:wpuf-text-gray-400::-moz-placeholder { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +.placeholder\:wpuf-text-gray-400::placeholder { + --tw-text-opacity: 1; + color: rgb(156 163 175 / var(--tw-text-opacity)); +} + +.placeholder\:wpuf-text-red-300::-moz-placeholder { + --tw-text-opacity: 1; + color: rgb(252 165 165 / var(--tw-text-opacity)); +} + +.placeholder\:wpuf-text-red-300::placeholder { + --tw-text-opacity: 1; + color: rgb(252 165 165 / var(--tw-text-opacity)); +} + +.before\:wpuf-absolute::before { + content: var(--tw-content); + position: absolute; +} + +.before\:wpuf--top-6::before { + content: var(--tw-content); + top: -1.5rem; +} + +.before\:wpuf-mt-3::before { + content: var(--tw-content); + margin-top: 0.75rem; +} + +.before\:wpuf-h-3::before { + content: var(--tw-content); + height: 0.75rem; +} + +.before\:wpuf-bg-gray-700::before { + content: var(--tw-content); + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +.before\:wpuf-text-zinc-50::before { + content: var(--tw-content); + --tw-text-opacity: 1; + color: rgb(250 250 250 / var(--tw-text-opacity)); +} + +.after\:wpuf-absolute::after { + content: var(--tw-content); + position: absolute; +} + +.after\:wpuf-border::after { + content: var(--tw-content); + border-width: 1px; +} + +.after\:wpuf-border-b-0::after { + content: var(--tw-content); + border-bottom-width: 0px; +} + +.after\:wpuf-border-r-0::after { + content: var(--tw-content); + border-right-width: 0px; +} + +.after\:wpuf-border-x-transparent::after { + content: var(--tw-content); + border-left-color: transparent; + border-right-color: transparent; +} + +.after\:wpuf-border-t-gray-700::after { + content: var(--tw-content); + --tw-border-opacity: 1; + border-top-color: rgb(55 65 81 / var(--tw-border-opacity)); +} + +.after\:wpuf-bg-white::after { + content: var(--tw-content); + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.focus-within\:wpuf-z-10:focus-within { + z-index: 10; +} + +.hover\:wpuf-block:hover { + display: block; +} + +.hover\:wpuf-cursor-pointer:hover { + cursor: pointer; +} + +.hover\:wpuf-border-b-2:hover { + border-bottom-width: 2px; +} + +.hover\:wpuf-border-blue-600:hover { + --tw-border-opacity: 1; + border-color: rgb(37 99 235 / var(--tw-border-opacity)); +} + +.hover\:wpuf-border-blue-700:hover { + --tw-border-opacity: 1; + border-color: rgb(29 78 216 / 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-red-700:hover { + --tw-border-opacity: 1; + border-color: rgb(185 28 28 / var(--tw-border-opacity)); +} + +.hover\:wpuf-bg-amber-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(217 119 6 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-blue-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(29 78 216 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-gray-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-gray-50:hover { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-indigo-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(99 102 241 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-indigo-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(67 56 202 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-indigo-800:hover { + --tw-bg-opacity: 1; + background-color: rgb(55 48 163 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-red-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(239 68 68 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-red-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(185 28 28 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-bg-slate-100:hover { + --tw-bg-opacity: 1; + background-color: rgb(241 245 249 / var(--tw-bg-opacity)); +} + +.hover\:wpuf-text-blue-600:hover { + --tw-text-opacity: 1; + color: rgb(37 99 235 / var(--tw-text-opacity)); +} + +.hover\:wpuf-text-gray-500:hover { + --tw-text-opacity: 1; + color: rgb(107 114 128 / var(--tw-text-opacity)); +} + +.hover\:wpuf-text-gray-700:hover { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); +} + +.hover\:wpuf-text-gray-900:hover { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.hover\:wpuf-text-indigo-600:hover { + --tw-text-opacity: 1; + color: rgb(79 70 229 / var(--tw-text-opacity)); +} + +.hover\:wpuf-text-white:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.hover\:wpuf-shadow-none:hover { + --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-z-20:focus { + z-index: 20; +} + +.focus\:\!wpuf-border-indigo-500:focus { + --tw-border-opacity: 1 !important; + border-color: rgb(99 102 241 / var(--tw-border-opacity)) !important; +} + +.focus\:wpuf-bg-amber-600:focus { + --tw-bg-opacity: 1; + background-color: rgb(217 119 6 / var(--tw-bg-opacity)); +} + +.focus\:wpuf-bg-indigo-500:focus { + --tw-bg-opacity: 1; + background-color: rgb(99 102 241 / var(--tw-bg-opacity)); +} + +.focus\:wpuf-bg-slate-100:focus { + --tw-bg-opacity: 1; + background-color: rgb(241 245 249 / var(--tw-bg-opacity)); +} + +.focus\:wpuf-text-white:focus { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.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-outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus\:wpuf-ring:focus { + --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(3px + 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); +} + +.focus\:wpuf-ring-1:focus { + --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, 0 0 #0000); +} + +.focus\:wpuf-ring-2:focus { + --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); +} + +.focus\:wpuf-ring-inset:focus { + --tw-ring-inset: inset; +} + +.focus\:wpuf-ring-blue-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(191 219 254 / 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)); +} + +.focus\:wpuf-ring-indigo-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); +} + +.focus\:wpuf-ring-indigo-600:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity)); +} + +.focus\:wpuf-ring-red-200:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity)); +} + +.focus\:wpuf-ring-red-500:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); +} + +.focus-visible\:wpuf-outline:focus-visible { + outline-style: solid; +} + +.focus-visible\:wpuf-outline-2:focus-visible { + outline-width: 2px; +} + +.focus-visible\:wpuf-outline-offset-2:focus-visible { + outline-offset: 2px; +} + +.focus-visible\:wpuf-outline-indigo-600:focus-visible { + outline-color: #4f46e5; +} + +.active\:wpuf-shadow-none:active { + --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); +} + +.disabled\:wpuf-cursor-pointer:disabled { + cursor: pointer; +} + +.wpuf-group:hover .group-hover\:wpuf-flex { + display: flex; +} + +.wpuf-group:hover .group-hover\:wpuf-cursor-pointer { + cursor: pointer; +} + +.wpuf-peer:hover ~ .peer-hover\:wpuf-block { + display: block; +} + +@media (min-width: 640px) { + .sm\:wpuf-p-0 { + padding: 0px; + } + + .sm\:wpuf-text-sm { + font-size: 0.875rem; + line-height: 1.25rem; + } + + .sm\:wpuf-leading-6 { + line-height: 1.5rem; + } +} + +.rtl\:wpuf-left-auto:where([dir="rtl"], [dir="rtl"] *) { + left: auto; +} + +.rtl\:wpuf-right-0:where([dir="rtl"], [dir="rtl"] *) { + right: 0px; +} + +.rtl\:wpuf-ml-1:where([dir="rtl"], [dir="rtl"] *) { + margin-left: 0.25rem; +} + +.rtl\:wpuf-mr-0:where([dir="rtl"], [dir="rtl"] *) { + margin-right: 0px; +} + +.rtl\:wpuf-pl-0:where([dir="rtl"], [dir="rtl"] *) { + padding-left: 0px; +} + +.rtl\:wpuf-pr-2:where([dir="rtl"], [dir="rtl"] *) { + padding-right: 0.5rem; +} + +.rtl\:wpuf-text-right:where([dir="rtl"], [dir="rtl"] *) { + text-align: right; +} + +@media (prefers-color-scheme: dark) { + .dark\:wpuf-text-blue-500 { + --tw-text-opacity: 1; + color: rgb(59 130 246 / var(--tw-text-opacity)); + } +} diff --git a/includes/Admin/Forms/Admin_Form.php b/includes/Admin/Forms/Admin_Form.php index e2bd4de98..052480386 100644 --- a/includes/Admin/Forms/Admin_Form.php +++ b/includes/Admin/Forms/Admin_Form.php @@ -261,11 +261,9 @@ public function add_settings_tabs() { */ public function add_primary_tabs() { ?> - - + - WPUF_ASSET_URI . '/vendor/tooltip/tooltip.css', 'version' => '3.3.7', ], - 'form-builder' => [ + 'form-builder-classic' => [ 'src' => WPUF_ASSET_URI . '/css/wpuf-form-builder.css', 'deps' => $this->form_builder_css_deps, ], + 'form-builder' => [ + 'src' => WPUF_ASSET_URI . '/css/admin/form-builder.css', + 'deps' => [ 'wpuf-form-builder-classic' ], + ], 'admin' => [ 'src' => WPUF_ASSET_URI . '/css/admin.css', ], diff --git a/languages/wp-user-frontend.pot b/languages/wp-user-frontend.pot index 680211bb5..dcd6c7ce5 100644 --- a/languages/wp-user-frontend.pot +++ b/languages/wp-user-frontend.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: WP User Frontend 4.0.11\n" "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n" -"POT-Creation-Date: 2024-09-17 09:28:09+00:00\n" +"POT-Creation-Date: 2024-10-04 06:51:00+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -136,7 +136,7 @@ msgid "Help" msgstr "" #: admin/class-admin-settings.php:119 admin/class-admin-settings.php:167 -#: admin/form-builder/views/form-builder.php:9 +#: admin/form-builder/views/form-builder.php:13 #: includes/Admin/Admin_Settings.php:68 includes/Admin/Menu.php:91 #: includes/Admin/Menu.php:358 includes/Setup_Wizard.php:154 msgid "Settings" @@ -307,43 +307,43 @@ msgstr "" msgid "— Select —" msgstr "" -#: admin/form-builder/views/form-builder.php:5 +#: admin/form-builder/views/form-builder.php:9 msgid "Form Editor" msgstr "" -#: admin/form-builder/views/form-builder.php:15 +#: admin/form-builder/views/form-builder.php:19 #: admin/html/form-settings-post.php:23 templates/dashboard/posts.php:165 msgid "Preview" msgstr "" -#: admin/form-builder/views/form-builder.php:18 +#: admin/form-builder/views/form-builder.php:22 msgid "Save Form" msgstr "" -#: admin/form-builder/views/form-builder.php:22 +#: admin/form-builder/views/form-builder.php:26 msgid "Saving Form Data" msgstr "" -#: admin/form-builder/views/form-builder.php:25 -#: admin/form-builder/views/form-builder.php:77 +#: admin/form-builder/views/form-builder.php:29 +#: admin/form-builder/views/form-builder.php:81 msgid "Add Fields" msgstr "" -#: admin/form-builder/views/form-builder.php:26 +#: admin/form-builder/views/form-builder.php:30 msgid "Show Form" msgstr "" -#: admin/form-builder/views/form-builder.php:47 +#: admin/form-builder/views/form-builder.php:51 #. translators: %s: form id msgid "Click to copy %s shortcode" msgstr "" -#: admin/form-builder/views/form-builder.php:50 +#: admin/form-builder/views/form-builder.php:54 #: includes/Admin/Forms/Admin_Form_Builder.php:289 msgid "Click to copy shortcode" msgstr "" -#: admin/form-builder/views/form-builder.php:83 +#: admin/form-builder/views/form-builder.php:87 msgid "Field Options" msgstr "" @@ -930,85 +930,85 @@ msgid "Sample Form" msgstr "" #: admin/posting.php:74 class/render-form.php:1688 -#: includes/Admin/Posting.php:61 includes/Admin.php:107 +#: includes/Admin/Posting.php:63 includes/Admin.php:107 #: includes/Fields/Field_Contract.php:931 includes/Frontend.php:72 #: includes/Render_Form.php:1545 msgid "Are you sure?" msgstr "" #: admin/posting.php:75 includes/Admin/Forms/Admin_Form_Builder.php:272 -#: includes/Admin/Posting.php:62 includes/Admin.php:108 +#: includes/Admin/Posting.php:64 includes/Admin.php:108 #: includes/Fields/Field_Contract.php:932 includes/Frontend.php:73 msgid "Yes, delete it" msgstr "" #: admin/posting.php:76 includes/Admin/Forms/Admin_Form_Builder.php:273 -#: includes/Admin/Posting.php:63 includes/Admin.php:109 +#: includes/Admin/Posting.php:65 includes/Admin.php:109 #: includes/Fields/Field_Contract.php:933 includes/Frontend.php:74 msgid "No, cancel it" msgstr "" -#: admin/posting.php:82 includes/Admin/Posting.php:69 includes/Admin.php:117 +#: admin/posting.php:82 includes/Admin/Posting.php:71 includes/Admin.php:117 #: includes/Fields/Field_Contract.php:943 includes/Frontend.php:84 msgid "Allowed Files" msgstr "" -#: admin/posting.php:85 includes/Admin/Posting.php:72 includes/Admin.php:123 +#: admin/posting.php:85 includes/Admin/Posting.php:74 includes/Admin.php:123 #: includes/Fields/Field_Contract.php:949 includes/Frontend.php:90 msgid "Maximum number of files reached!" msgstr "" -#: admin/posting.php:86 includes/Admin/Posting.php:73 includes/Admin.php:124 +#: admin/posting.php:86 includes/Admin/Posting.php:75 includes/Admin.php:124 #: includes/Fields/Field_Contract.php:950 includes/Frontend.php:91 msgid "The file you have uploaded exceeds the file size limit. Please try again." msgstr "" -#: admin/posting.php:87 includes/Admin/Posting.php:74 includes/Admin.php:125 +#: admin/posting.php:87 includes/Admin/Posting.php:76 includes/Admin.php:125 #: includes/Fields/Field_Contract.php:954 includes/Frontend.php:95 msgid "You have uploaded an incorrect file type. Please try again." msgstr "" -#: admin/posting.php:106 includes/Admin/Posting.php:93 +#: admin/posting.php:106 includes/Admin/Posting.php:95 msgid "WPUF Form" msgstr "" -#: admin/posting.php:134 includes/Admin/Posting.php:121 +#: admin/posting.php:134 includes/Admin/Posting.php:123 msgid "Learn more" msgstr "" -#: admin/posting.php:181 includes/Admin/Posting.php:168 +#: admin/posting.php:181 includes/Admin/Posting.php:170 msgid "WPUF Lock User" msgstr "" -#: admin/posting.php:207 includes/Admin/Posting.php:194 +#: admin/posting.php:207 includes/Admin/Posting.php:196 msgid "" "Post is locked, to allow user to edit this post Click here" msgstr "" -#: admin/posting.php:214 includes/Admin/Posting.php:201 +#: admin/posting.php:214 includes/Admin/Posting.php:203 msgid "" "Frontend edit access for this post will be automatically locked after %s, " "Clear Lock Or," msgstr "" -#: admin/posting.php:235 includes/Admin/Posting.php:222 +#: admin/posting.php:235 includes/Admin/Posting.php:224 msgid "Lock Post Permanently" msgstr "" -#: admin/posting.php:240 includes/Admin/Posting.php:227 +#: admin/posting.php:240 includes/Admin/Posting.php:229 msgid "Lock user from editing this post from the frontend dashboard" msgstr "" -#: admin/posting.php:291 includes/Admin/Posting.php:278 +#: admin/posting.php:291 includes/Admin/Posting.php:280 msgid "WPUF Custom Fields" msgstr "" -#: admin/posting.php:348 includes/Admin/Posting.php:335 +#: admin/posting.php:348 includes/Admin/Posting.php:337 msgid "No custom fields found." msgstr "" -#: admin/posting.php:543 includes/Admin/Posting.php:530 +#: admin/posting.php:543 includes/Admin/Posting.php:532 #: includes/Admin/Promotion.php:216 includes/Admin/Promotion.php:220 #: includes/Admin/Promotion.php:224 includes/Admin/Promotion.php:301 #: includes/Admin/Promotion.php:305 includes/Admin/Promotion.php:309 @@ -2612,19 +2612,19 @@ msgstr "" msgid "Payment type not selected for this form. Please contact admin." msgstr "" -#: includes/Admin/Forms/Post/Templates/Form_Template.php:102 +#: includes/Admin/Forms/Post/Templates/Form_Template.php:103 msgid "Want a new integration? Let us know." msgstr "" -#: includes/Admin/Forms/Post/Templates/Form_Template.php:214 +#: includes/Admin/Forms/Post/Templates/Form_Template.php:215 msgid "Form Template" msgstr "" -#: includes/Admin/Forms/Post/Templates/Form_Template.php:217 +#: includes/Admin/Forms/Post/Templates/Form_Template.php:218 msgid "— No Template —" msgstr "" -#: includes/Admin/Forms/Post/Templates/Form_Template.php:226 +#: includes/Admin/Forms/Post/Templates/Form_Template.php:227 msgid "" "If selected a form template, it will try to execute that integration " "options when new post created and updated." diff --git a/package-lock.json b/package-lock.json index c4ed49639..4611ca20c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "devDependencies": { "@tailwindcss/forms": "^0.5.7", "@vitejs/plugin-vue": "^5.0.4", + "autoprefixer": "^10.4.16", "daisyui": "^4.12.2", "grunt": "^1.5.3", "grunt-contrib-clean": "~1.0.0", @@ -36,13 +37,16 @@ "grunt-contrib-watch": "^1.0.0", "grunt-notify": "^0.4.5", "grunt-phplint": "0.0.8", + "grunt-postcss": "^0.9.0", "grunt-shell": "^4.0.0", "grunt-text-replace": "^0.4.0", "grunt-wp-i18n": "^1.0.3", "grunt-wp-readme-to-markdown": "^2.0.1", "jshint-stylish": "^2.2.1", + "postcss": "^8.4.31", "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.11", + "tailwindcss": "^3.3.5", "vitawind": "^2.3.0", "vite": "^5.1.4" } @@ -3118,6 +3122,16 @@ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "dev": true }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -5539,6 +5553,107 @@ "which": "bin/which" } }, + "node_modules/grunt-postcss": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/grunt-postcss/-/grunt-postcss-0.9.0.tgz", + "integrity": "sha512-lglLcVaoOIqH0sFv7RqwUKkEFGQwnlqyAKbatxZderwZGV1nDyKHN7gZS9LUiTx1t5GOvRBx0BEalHMyVwFAIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.1.0", + "diff": "^3.0.0", + "postcss": "^6.0.11" + }, + "engines": { + "node": ">= 0.12.0" + }, + "peerDependencies": { + "grunt": ">=0.4.5" + } + }, + "node_modules/grunt-postcss/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/grunt-postcss/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/grunt-postcss/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/grunt-postcss/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/grunt-postcss/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/grunt-postcss/node_modules/postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/grunt-postcss/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/grunt-shell": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/grunt-shell/-/grunt-shell-4.0.0.tgz", @@ -9575,6 +9690,16 @@ "node": ">=0.8.0" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", diff --git a/package.json b/package.json index 2de1ce9c7..8b49f9a13 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "grunt-contrib-watch": "^1.0.0", "grunt-notify": "^0.4.5", "grunt-phplint": "0.0.8", + "grunt-postcss": "^0.9.0", "grunt-shell": "^4.0.0", "grunt-text-replace": "^0.4.0", "grunt-wp-i18n": "^1.0.3", @@ -34,7 +35,10 @@ "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.11", "vitawind": "^2.3.0", - "vite": "^5.1.4" + "vite": "^5.1.4", + "tailwindcss": "^3.3.5", + "autoprefixer": "^10.4.16", + "postcss": "^8.4.31" }, "dependencies": { "@heroicons/vue": "^2.1.1", diff --git a/src/css/admin/form-builder.css b/src/css/admin/form-builder.css new file mode 100644 index 000000000..b5c61c956 --- /dev/null +++ b/src/css/admin/form-builder.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/tailwind.config.js b/tailwind.config.js index 48f8c62d0..d5992a54e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,7 @@ /** @type {import('tailwindcss').Config} */ module.exports = { prefix: 'wpuf-', - content: ["./assets/**/*.{js,jsx,ts,tsx,vue,html}", "./includes/Admin/views/*.php"], + content: ['./assets/**/*.{js,jsx,ts,tsx,vue,html}', './includes/Admin/views/*.php', './admin/form-builder/views/*.php'], theme: { extend: {}, }, diff --git a/temp.svg b/temp.svg deleted file mode 100644 index afbd87342..000000000 --- a/temp.svg +++ /dev/null @@ -1,5 +0,0 @@ - - menu - - From 787c08251c5b7432ea72bdb145c622d4578f4972 Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Mon, 7 Oct 2024 20:38:03 +0600 Subject: [PATCH 02/21] preview and save buttons --- admin/form-builder/assets/js/form-builder.js | 10 +- admin/form-builder/views/form-builder.php | 255 +++++++++--------- assets/css/admin/form-builder.css | 13 + assets/js/wpuf-form-builder.js | 10 +- .../Forms/Post/Templates/Form_Template.php | 4 +- includes/Admin/views/post-form.php | 4 +- includes/Assets.php | 1 - 7 files changed, 153 insertions(+), 144 deletions(-) diff --git a/admin/form-builder/assets/js/form-builder.js b/admin/form-builder/assets/js/form-builder.js index 8349eb77a..1d3239731 100644 --- a/admin/form-builder/assets/js/form-builder.js +++ b/admin/form-builder/assets/js/form-builder.js @@ -899,11 +899,11 @@ // on DOM ready $(function() { - resizeBuilderContainer(); - - $("#collapse-menu").click(function () { - resizeBuilderContainer(); - }); + // resizeBuilderContainer(); + // + // $("#collapse-menu").click(function () { + // resizeBuilderContainer(); + // }); function resizeBuilderContainer() { if ($(document.body).hasClass('folded')) { diff --git a/admin/form-builder/views/form-builder.php b/admin/form-builder/views/form-builder.php index 547a811e7..cf1720ba1 100644 --- a/admin/form-builder/views/form-builder.php +++ b/admin/form-builder/views/form-builder.php @@ -1,148 +1,147 @@ -
-
-
-
- WPUF Icon - +
+
+ 1 && isset( $shortcodes[0]['type'] ) ) { - foreach ( $shortcodes as $shortcode ) { - /* translators: %s: form id */ - printf( " %s: #{{ post.ID }}", sprintf( esc_html( __( 'Click to copy %s shortcode', 'wp-user-frontend' ) ), esc_attr( $shortcode['type'] ) ), sprintf( '[%s type="%s" id="%s"]', esc_attr( $shortcode['name'] ), esc_attr( $shortcode['type'] ), esc_attr( $form_id ) ), esc_attr( ucwords( $shortcode['type'] ) ), esc_attr( $shortcode['type'] ) ); - } - } else { - printf( - "#{{ post.ID }} - - - - - - - - - ", - esc_html( __( 'Click to copy shortcode', 'wp-user-frontend' ) ), - '[' . esc_attr( $shortcodes[0]['name'] ) . ' id="' . esc_attr( $form_id ) . '"]' - ); - ?> - - 1 && isset( $shortcodes[0]['type'] ) ) { + foreach ( $shortcodes as $shortcode ) { + /* translators: %s: form id */ + printf( " %s: #{{ post.ID }}", sprintf( esc_html( __( 'Click to copy %s shortcode', 'wp-user-frontend' ) ), esc_attr( $shortcode['type'] ) ), sprintf( '[%s type="%s" id="%s"]', esc_attr( $shortcode['name'] ), esc_attr( $shortcode['type'] ), esc_attr( $form_id ) ), esc_attr( ucwords( $shortcode['type'] ) ), esc_attr( $shortcode['type'] ) ); } + } else { + printf( + "#{{ post.ID }} + + + + + + + + + ", + esc_html( __( 'Click to copy shortcode', 'wp-user-frontend' ) ), + '[' . esc_attr( $shortcodes[0]['name'] ) . ' id="' . esc_attr( $form_id ) . '"]' + ); ?> + + + - - - + - -
+
-
diff --git a/assets/css/admin/form-builder.css b/assets/css/admin/form-builder.css index 4666c7689..d9a0e75ae 100644 --- a/assets/css/admin/form-builder.css +++ b/assets/css/admin/form-builder.css @@ -1520,6 +1520,10 @@ html { width: 104%; } +.wpuf-w-\[calc\(100\%\+20px\)\] { + width: calc(100% + 20px); +} + .wpuf-w-\[calc\(100\%\+40px\)\] { width: calc(100% + 40px); } @@ -1642,6 +1646,10 @@ html { cursor: pointer; } +.wpuf-cursor-wait { + cursor: wait; +} + .wpuf-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } @@ -2109,6 +2117,11 @@ html { padding-right: 0.75rem; } +.wpuf-px-3\.5 { + padding-left: 0.875rem; + padding-right: 0.875rem; +} + .wpuf-px-4 { padding-left: 1rem; padding-right: 1rem; diff --git a/assets/js/wpuf-form-builder.js b/assets/js/wpuf-form-builder.js index 8349eb77a..1d3239731 100644 --- a/assets/js/wpuf-form-builder.js +++ b/assets/js/wpuf-form-builder.js @@ -899,11 +899,11 @@ // on DOM ready $(function() { - resizeBuilderContainer(); - - $("#collapse-menu").click(function () { - resizeBuilderContainer(); - }); + // resizeBuilderContainer(); + // + // $("#collapse-menu").click(function () { + // resizeBuilderContainer(); + // }); function resizeBuilderContainer() { if ($(document.body).hasClass('folded')) { diff --git a/includes/Admin/Forms/Post/Templates/Form_Template.php b/includes/Admin/Forms/Post/Templates/Form_Template.php index d28f06ab5..b79db5e2c 100644 --- a/includes/Admin/Forms/Post/Templates/Form_Template.php +++ b/includes/Admin/Forms/Post/Templates/Form_Template.php @@ -16,7 +16,7 @@ public function __construct() { add_action( 'admin_enqueue_scripts', [ $this, 'deregister_scripts' ], 99 ); // post form templates - add_action( 'admin_footer', [ $this, 'render_post_form_templates' ] ); + // add_action( 'admin_footer', [ $this, 'render_post_form_templates' ] ); // form settings add_action( 'wpuf_form_setting', [ $this, 'post_form_settings' ], 8, 2 ); @@ -82,7 +82,7 @@ public function enqueue_scripts() { wp_enqueue_style( $deps ); } - wp_enqueue_style( 'wpuf-form-builder-classic' ); + // wp_enqueue_style( 'wpuf-form-builder-classic' ); wp_enqueue_style( 'wpuf-form-builder' ); } diff --git a/includes/Admin/views/post-form.php b/includes/Admin/views/post-form.php index deff992f9..1640ef008 100644 --- a/includes/Admin/views/post-form.php +++ b/includes/Admin/views/post-form.php @@ -1,3 +1 @@ -
- -
+ diff --git a/includes/Assets.php b/includes/Assets.php index aa4a543d3..630e6816f 100644 --- a/includes/Assets.php +++ b/includes/Assets.php @@ -154,7 +154,6 @@ public function get_styles() { ], 'form-builder' => [ 'src' => WPUF_ASSET_URI . '/css/admin/form-builder.css', - 'deps' => [ 'wpuf-form-builder-classic' ], ], 'admin' => [ 'src' => WPUF_ASSET_URI . '/css/admin.css', From a7c5fe738750d4fb178014110fd8d4debc64d41c Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Wed, 9 Oct 2024 11:32:32 +0600 Subject: [PATCH 03/21] dropdown effect enhanced --- .../form-checkbox_field/template.php | 44 +++++- .../form-dropdown_field/template.php | 7 +- .../components/form-post_title/template.php | 6 +- .../components/form-radio_field/template.php | 31 ++-- .../js/components/form-taxonomy/template.php | 15 +- .../components/form-text_field/template.php | 6 +- .../form-textarea_field/template.php | 12 +- admin/form-builder/assets/js/form-builder.js | 2 +- admin/form-builder/views/form-builder.php | 111 ++++++-------- assets/css/admin/form-builder.css | 141 +++++++----------- assets/js-templates/form-components.php | 121 ++++++++++----- assets/js/wpuf-form-builder.js | 2 +- src/css/admin/form-builder.css | 27 ++++ 13 files changed, 295 insertions(+), 230 deletions(-) diff --git a/admin/form-builder/assets/js/components/form-checkbox_field/template.php b/admin/form-builder/assets/js/components/form-checkbox_field/template.php index 0111026b0..e59ce0d70 100644 --- a/admin/form-builder/assets/js/components/form-checkbox_field/template.php +++ b/admin/form-builder/assets/js/components/form-checkbox_field/template.php @@ -1,16 +1,44 @@
-
    -
  • -
  • -
+ class="wpuf-h-4 wpuf-w-4 wpuf-rounded wpuf-border-gray-300 wpuf-text-indigo-600 focus:wpuf-ring-indigo-600"> +
+
+ +
+ + - +
+
+
+ +
+
+ +
+
+
+ +

diff --git a/admin/form-builder/assets/js/components/form-dropdown_field/template.php b/admin/form-builder/assets/js/components/form-dropdown_field/template.php index 691c46644..c174dafbe 100644 --- a/admin/form-builder/assets/js/components/form-dropdown_field/template.php +++ b/admin/form-builder/assets/js/components/form-dropdown_field/template.php @@ -1,9 +1,9 @@
- - +

diff --git a/admin/form-builder/assets/js/components/form-post_title/template.php b/admin/form-builder/assets/js/components/form-post_title/template.php index 63564e1fd..a221c62bb 100644 --- a/admin/form-builder/assets/js/components/form-post_title/template.php +++ b/admin/form-builder/assets/js/components/form-post_title/template.php @@ -1,10 +1,12 @@
- +

diff --git a/admin/form-builder/assets/js/components/form-radio_field/template.php b/admin/form-builder/assets/js/components/form-radio_field/template.php index c674d2cf9..33ba69243 100644 --- a/admin/form-builder/assets/js/components/form-radio_field/template.php +++ b/admin/form-builder/assets/js/components/form-radio_field/template.php @@ -1,16 +1,21 @@
-
    -
  • - -
  • -
+
+
+ + +
+
- +

diff --git a/admin/form-builder/assets/js/components/form-taxonomy/template.php b/admin/form-builder/assets/js/components/form-taxonomy/template.php index 0aaf5565c..51d8edac6 100644 --- a/admin/form-builder/assets/js/components/form-taxonomy/template.php +++ b/admin/form-builder/assets/js/components/form-taxonomy/template.php @@ -1,9 +1,11 @@
@@ -34,11 +36,14 @@ - +

diff --git a/admin/form-builder/assets/js/components/form-text_field/template.php b/admin/form-builder/assets/js/components/form-text_field/template.php index 63564e1fd..a221c62bb 100644 --- a/admin/form-builder/assets/js/components/form-text_field/template.php +++ b/admin/form-builder/assets/js/components/form-text_field/template.php @@ -1,10 +1,12 @@
- +

diff --git a/admin/form-builder/assets/js/components/form-textarea_field/template.php b/admin/form-builder/assets/js/components/form-textarea_field/template.php index 4e3d2f262..b366f3912 100644 --- a/admin/form-builder/assets/js/components/form-textarea_field/template.php +++ b/admin/form-builder/assets/js/components/form-textarea_field/template.php @@ -1,14 +1,18 @@
+ :class="class_names('textareafield')" + class="wpuf-block wpuf-w-full wpuf-rounded-md wpuf-border-0 wpuf-py-1.5 wpuf-text-gray-900 wpuf-shadow-sm wpuf-ring-1 wpuf-ring-inset wpuf-ring-gray-300 placeholder:wpuf-text-gray-400 focus:wpuf-ring-2 focus:wpuf-ring-inset focus:wpuf-ring-indigo-600 sm:wpuf-text-sm sm:wpuf-leading-6">{{ field.default }} + - + - +

diff --git a/admin/form-builder/assets/js/form-builder.js b/admin/form-builder/assets/js/form-builder.js index 1d3239731..97a4d4cbe 100644 --- a/admin/form-builder/assets/js/form-builder.js +++ b/admin/form-builder/assets/js/form-builder.js @@ -408,7 +408,7 @@ data: { is_form_saving: false, is_form_saved: false, - is_form_switcher: false, + isDropDownShowing: false, post_title_editing: false, isDirty: false }, diff --git a/admin/form-builder/views/form-builder.php b/admin/form-builder/views/form-builder.php index cf1720ba1..51fd9831b 100644 --- a/admin/form-builder/views/form-builder.php +++ b/admin/form-builder/views/form-builder.php @@ -1,9 +1,9 @@
+ class="wpuf-w-[calc(100%+20px)] wpuf-ml-[-20px] wpuf-form-builder-" method="post" action="" @submit.prevent="save_form_builder" v-cloak> +
WPUF Icon
@@ -96,44 +81,27 @@ class="wpuf-absolute wpuf-left-0 wpuf-z-10 wpuf-mt-2 wpuf-w-max wpuf-origin-top- } else { printf( "#{{ post.ID }} - - - - - - - - - ", + + + + + + + + + ", esc_html( __( 'Click to copy shortcode', 'wp-user-frontend' ) ), '[' . esc_attr( $shortcodes[0]['name'] ) . ' id="' . esc_attr( $form_id ) . '"]' ); ?> -
+
+
+
+ +
+
Field attributes
+
diff --git a/assets/css/admin/form-builder.css b/assets/css/admin/form-builder.css index d9a0e75ae..587fdac7a 100644 --- a/assets/css/admin/form-builder.css +++ b/assets/css/admin/form-builder.css @@ -1145,6 +1145,10 @@ html { left: -5rem; } +.wpuf--left-40 { + left: -10rem; +} + .wpuf-left-0 { left: 0px; } @@ -1193,12 +1197,12 @@ html { top: 1rem; } -.wpuf-top-\[-40\%\] { - top: -40%; +.wpuf-top-9 { + top: 2.25rem; } -.wpuf-top-\[40px\] { - top: 40px; +.wpuf-top-\[-40\%\] { + top: -40%; } .wpuf-z-10 { @@ -1460,6 +1464,10 @@ html { min-height: max-content; } +.wpuf-min-h-screen { + min-height: 100vh; +} + .wpuf-w-1\/2 { width: 50%; } @@ -1480,6 +1488,10 @@ html { width: 3rem; } +.wpuf-w-2\/3 { + width: 66.666667%; +} + .wpuf-w-2\/4 { width: 50%; } @@ -1622,18 +1634,6 @@ html { 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-scale-100 { - --tw-scale-x: 1; - --tw-scale-y: 1; - 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-scale-95 { - --tw-scale-x: .95; - --tw-scale-y: .95; - 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-transform { 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)); } @@ -1807,26 +1807,21 @@ html { border-bottom-left-radius: 0.75rem; } -.wpuf-rounded-e-lg { - border-start-end-radius: 0.5rem; - border-end-end-radius: 0.5rem; -} - .wpuf-rounded-l-md { border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; } +.wpuf-rounded-r-lg { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; +} + .wpuf-rounded-r-md { border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; } -.wpuf-rounded-s-lg { - border-start-start-radius: 0.5rem; - border-end-start-radius: 0.5rem; -} - .wpuf-rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; @@ -1842,8 +1837,8 @@ html { border-top-right-radius: 0.75rem; } -.\!wpuf-border-0 { - border-width: 0px !important; +.\!wpuf-border { + border-width: 1px !important; } .wpuf-border { @@ -1862,6 +1857,10 @@ html { border-bottom-width: 2px; } +.wpuf-border-l-0 { + border-left-width: 0px; +} + .wpuf-border-r-2 { border-right-width: 2px; } @@ -1904,6 +1903,11 @@ html { border-color: rgb(229 231 235 / var(--tw-border-opacity)); } +.wpuf-border-gray-300 { + --tw-border-opacity: 1; + border-color: rgb(209 213 219 / var(--tw-border-opacity)); +} + .wpuf-border-indigo-500 { --tw-border-opacity: 1; border-color: rgb(99 102 241 / var(--tw-border-opacity)); @@ -2152,11 +2156,6 @@ html { padding-bottom: 0.25rem; } -.wpuf-py-1\.5 { - padding-top: 0.375rem; - padding-bottom: 0.375rem; -} - .wpuf-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; @@ -2182,10 +2181,6 @@ html { padding-bottom: 1.5rem; } -.\!wpuf-pl-10 { - padding-left: 2.5rem !important; -} - .wpuf-pb-4 { padding-bottom: 1rem; } @@ -2266,6 +2261,11 @@ html { text-align: end; } +.\!wpuf-text-sm { + font-size: 0.875rem !important; + line-height: 1.25rem !important; +} + .wpuf-text-2xl { font-size: 1.5rem; line-height: 2rem; @@ -2440,14 +2440,6 @@ html { color: rgb(161 98 7 / var(--tw-text-opacity)); } -.wpuf-opacity-0 { - opacity: 0; -} - -.wpuf-opacity-100 { - opacity: 1; -} - .wpuf-shadow { --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); @@ -2472,12 +2464,6 @@ html { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } -.\!wpuf-ring-1 { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important; - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important; - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important; -} - .wpuf-ring-0 { --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(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); @@ -2490,19 +2476,10 @@ html { box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } -.\!wpuf-ring-inset { - --tw-ring-inset: inset !important; -} - .wpuf-ring-inset { --tw-ring-inset: inset; } -.\!wpuf-ring-gray-300 { - --tw-ring-opacity: 1 !important; - --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)) !important; -} - .wpuf-ring-blue-200 { --tw-ring-opacity: 1; --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity)); @@ -2583,28 +2560,37 @@ html { transition-duration: 150ms; } -.wpuf-duration-100 { - transition-duration: 100ms; -} - .wpuf-duration-200 { transition-duration: 200ms; } -.wpuf-duration-75 { - transition-duration: 75ms; +.wpuf-ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } -.wpuf-ease-in { - transition-timing-function: cubic-bezier(0.4, 0, 1, 1); +.wpuf-transition-all { + transition-property: all; } -.wpuf-ease-in-out { +/* Transition styles */ + +.wpuf-dropdown-item { + --tw-scale-x: .75; + --tw-scale-y: .75; + 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)); + opacity: 0; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-property: all; + transition-duration: 100ms; + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); } -.wpuf-ease-out { - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); +.wpuf-dropdown-container:hover .wpuf-dropdown-item { + --tw-scale-x: 1; + --tw-scale-y: 1; + 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)); + opacity: 1; + transform: scale(1); } .placeholder\:wpuf-text-gray-400::-moz-placeholder { @@ -2877,10 +2863,6 @@ html { box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } -.focus\:wpuf-ring-inset:focus { - --tw-ring-inset: inset; -} - .focus\:wpuf-ring-blue-200:focus { --tw-ring-opacity: 1; --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity)); @@ -2896,11 +2878,6 @@ html { --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); } -.focus\:wpuf-ring-indigo-600:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity)); -} - .focus\:wpuf-ring-red-200:focus { --tw-ring-opacity: 1; --tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity)); @@ -2933,10 +2910,6 @@ html { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } -.disabled\:wpuf-cursor-pointer:disabled { - cursor: pointer; -} - .wpuf-group:hover .group-hover\:wpuf-flex { display: flex; } diff --git a/assets/js-templates/form-components.php b/assets/js-templates/form-components.php index ca68db439..ef030095d 100644 --- a/assets/js-templates/form-components.php +++ b/assets/js-templates/form-components.php @@ -421,20 +421,48 @@ class="option-chooser-radio" @@ -507,10 +535,10 @@ class="option-chooser-radio" @@ -703,32 +730,39 @@ class="button" @@ -758,9 +792,11 @@ class="button"
@@ -791,26 +827,31 @@ class="button" - +

@@ -818,16 +859,20 @@ class="textfield"
+ :class="class_names('textareafield')" + class="wpuf-block wpuf-w-full wpuf-rounded-md wpuf-border-0 wpuf-py-1.5 wpuf-text-gray-900 wpuf-shadow-sm wpuf-ring-1 wpuf-ring-inset wpuf-ring-gray-300 placeholder:wpuf-text-gray-400 focus:wpuf-ring-2 focus:wpuf-ring-inset focus:wpuf-ring-indigo-600 sm:wpuf-text-sm sm:wpuf-leading-6">{{ field.default }} - - + + +

diff --git a/assets/js/wpuf-form-builder.js b/assets/js/wpuf-form-builder.js index 1d3239731..97a4d4cbe 100644 --- a/assets/js/wpuf-form-builder.js +++ b/assets/js/wpuf-form-builder.js @@ -408,7 +408,7 @@ data: { is_form_saving: false, is_form_saved: false, - is_form_switcher: false, + isDropDownShowing: false, post_title_editing: false, isDirty: false }, diff --git a/src/css/admin/form-builder.css b/src/css/admin/form-builder.css index b5c61c956..ab0aba63d 100644 --- a/src/css/admin/form-builder.css +++ b/src/css/admin/form-builder.css @@ -1,3 +1,30 @@ @tailwind base; @tailwind components; @tailwind utilities; + +@layer utilities { + .wpuf-transition-all { + transition-property: all; + } + .wpuf-duration-100 { + transition-duration: 100ms; + } + .wpuf-ease-out { + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + .wpuf-scale-95 { + transform: scale(.95); + } + .wpuf-scale-100 { + transform: scale(1); + } +} + +/* Transition styles */ +.wpuf-dropdown-item { + @apply wpuf-transition-all wpuf-duration-100 wpuf-ease-out wpuf-opacity-0 wpuf-scale-75; +} + +.wpuf-dropdown-container:hover .wpuf-dropdown-item { + @apply wpuf-opacity-100 wpuf-scale-100; +} From d008e8a1a37569a6f25fe94c6f20abfae00f749c Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Wed, 9 Oct 2024 12:48:07 +0600 Subject: [PATCH 04/21] shortcode copy icon enhanced --- admin/form-builder/assets/js/form-builder.js | 8 +++-- admin/form-builder/views/form-builder.php | 30 ++++++++--------- assets/css/admin/form-builder.css | 34 +++++++++++++------- assets/js/wpuf-form-builder.js | 8 +++-- 4 files changed, 47 insertions(+), 33 deletions(-) diff --git a/admin/form-builder/assets/js/form-builder.js b/admin/form-builder/assets/js/form-builder.js index 97a4d4cbe..a8f04243e 100644 --- a/admin/form-builder/assets/js/form-builder.js +++ b/admin/form-builder/assets/js/form-builder.js @@ -410,7 +410,8 @@ is_form_saved: false, isDropDownShowing: false, post_title_editing: false, - isDirty: false + isDirty: false, + shortcodeCopied: false, }, computed: { @@ -491,13 +492,16 @@ clipboard.on('success', function(e) { // Show copied tooltip $(e.trigger) - .attr('data-original-title', 'Copied!') + .attr('data-original-title', 'Shortcode copied!') .tooltip('show'); + self.shortcodeCopied = true; + // Reset the copied tooltip setTimeout(function() { $(e.trigger).tooltip('hide') .attr('data-original-title', self.i18n.copy_shortcode); + self.shortcodeCopied = false; }, 1000); e.clearSelection(); diff --git a/admin/form-builder/views/form-builder.php b/admin/form-builder/views/form-builder.php index 51fd9831b..eb8c9a3d7 100644 --- a/admin/form-builder/views/form-builder.php +++ b/admin/form-builder/views/form-builder.php @@ -79,27 +79,22 @@ class="wpuf-dropdown-container wpuf-relative wpuf--ml-px wpuf-inline-flex wpuf-i printf( " %s: #{{ post.ID }}", sprintf( esc_html( __( 'Click to copy %s shortcode', 'wp-user-frontend' ) ), esc_attr( $shortcode['type'] ) ), sprintf( '[%s type="%s" id="%s"]', esc_attr( $shortcode['name'] ), esc_attr( $shortcode['type'] ), esc_attr( $form_id ) ), esc_attr( ucwords( $shortcode['type'] ) ), esc_attr( $shortcode['type'] ) ); } } else { - printf( - "#{{ post.ID }} - - - - - - - - - ", - esc_html( __( 'Click to copy shortcode', 'wp-user-frontend' ) ), - '[' . esc_attr( $shortcodes[0]['name'] ) . ' id="' . esc_attr( $form_id ) . '"]' - ); ?> + ">#{{ post.ID }} + + + + -
diff --git a/assets/css/admin/form-builder.css b/assets/css/admin/form-builder.css index 587fdac7a..1d20c223f 100644 --- a/assets/css/admin/form-builder.css +++ b/assets/css/admin/form-builder.css @@ -1629,6 +1629,11 @@ html { 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-rotate-6 { + --tw-rotate: 6deg; + 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-rotate-90 { --tw-rotate: 90deg; 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)); @@ -2054,6 +2059,14 @@ html { --tw-bg-opacity: 0.75; } +.\!wpuf-fill-blue-500 { + fill: #3b82f6 !important; +} + +.wpuf-fill-gray-300 { + fill: #d1d5db; +} + .wpuf-p-0 { padding: 0px; } @@ -2350,11 +2363,6 @@ html { color: rgb(37 99 235 / var(--tw-text-opacity)); } -.wpuf-text-blue-700 { - --tw-text-opacity: 1; - color: rgb(29 78 216 / var(--tw-text-opacity)); -} - .wpuf-text-gray-400 { --tw-text-opacity: 1; color: rgb(156 163 175 / var(--tw-text-opacity)); @@ -2914,10 +2922,19 @@ html { display: flex; } +.wpuf-group:hover .group-hover\:wpuf-rotate-6 { + --tw-rotate: 6deg; + 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-group:hover .group-hover\:wpuf-cursor-pointer { cursor: pointer; } +.wpuf-group:hover .group-hover\:wpuf-fill-gray-500 { + fill: #6b7280; +} + .wpuf-peer:hover ~ .peer-hover\:wpuf-block { display: block; } @@ -2964,10 +2981,3 @@ html { .rtl\:wpuf-text-right:where([dir="rtl"], [dir="rtl"] *) { text-align: right; } - -@media (prefers-color-scheme: dark) { - .dark\:wpuf-text-blue-500 { - --tw-text-opacity: 1; - color: rgb(59 130 246 / var(--tw-text-opacity)); - } -} diff --git a/assets/js/wpuf-form-builder.js b/assets/js/wpuf-form-builder.js index 97a4d4cbe..a8f04243e 100644 --- a/assets/js/wpuf-form-builder.js +++ b/assets/js/wpuf-form-builder.js @@ -410,7 +410,8 @@ is_form_saved: false, isDropDownShowing: false, post_title_editing: false, - isDirty: false + isDirty: false, + shortcodeCopied: false, }, computed: { @@ -491,13 +492,16 @@ clipboard.on('success', function(e) { // Show copied tooltip $(e.trigger) - .attr('data-original-title', 'Copied!') + .attr('data-original-title', 'Shortcode copied!') .tooltip('show'); + self.shortcodeCopied = true; + // Reset the copied tooltip setTimeout(function() { $(e.trigger).tooltip('hide') .attr('data-original-title', self.i18n.copy_shortcode); + self.shortcodeCopied = false; }, 1000); e.clearSelection(); From c96afbf27157f377e2ec9393642f30bae4344cdf Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Thu, 10 Oct 2024 11:41:08 +0600 Subject: [PATCH 05/21] backward compatibility added for old wpuf pro --- admin/form-builder/assets/js/form-builder.js | 2 +- admin/form-builder/views/form-builder.php | 6 +-- assets/js/wpuf-form-builder.js | 2 +- includes/Admin/Forms/Admin_Form_Builder.php | 17 +++++-- .../Forms/Post/Templates/Form_Template.php | 9 ++-- includes/Admin/Posting.php | 6 ++- includes/Admin/views/post-form.php | 12 ++++- includes/Assets.php | 46 +++++++++---------- 8 files changed, 64 insertions(+), 36 deletions(-) diff --git a/admin/form-builder/assets/js/form-builder.js b/admin/form-builder/assets/js/form-builder.js index a8f04243e..f8b14f944 100644 --- a/admin/form-builder/assets/js/form-builder.js +++ b/admin/form-builder/assets/js/form-builder.js @@ -408,7 +408,7 @@ data: { is_form_saving: false, is_form_saved: false, - isDropDownShowing: false, + is_form_switcher: false, post_title_editing: false, isDirty: false, shortcodeCopied: false, diff --git a/admin/form-builder/views/form-builder.php b/admin/form-builder/views/form-builder.php index eb8c9a3d7..3fcee6474 100644 --- a/admin/form-builder/views/form-builder.php +++ b/admin/form-builder/views/form-builder.php @@ -17,11 +17,11 @@ class="wpuf-block wpuf-w-full !wpuf-rounded-none !wpuf-rounded-l-md !wpuf-py-1 !
+ @@ -535,9 +547,8 @@ class="wpuf-h-4 wpuf-w-4 wpuf-rounded wpuf-border-gray-300 wpuf-text-indigo-600 @@ -567,7 +578,7 @@ class="wpuf-block wpuf-w-full !wpuf-max-w-full wpuf-rounded-md wpuf-border-0 wpu @@ -638,7 +649,7 @@ class="button" @@ -657,6 +668,7 @@ class="button"
+ :class="builder_class_names('textareafield')">{{ field.default }} - +

diff --git a/assets/js/wpuf-form-builder-mixins.js b/assets/js/wpuf-form-builder-mixins.js index ef8d9bbee..7d26e917c 100644 --- a/assets/js/wpuf-form-builder-mixins.js +++ b/assets/js/wpuf-form-builder-mixins.js @@ -49,6 +49,12 @@ wpuf_mixins.add_form_field = { this.$store.commit('add_form_field_element', payload); }, }, + + computed: { + action_button_classes: function() { + return 'wpuf-p-2 wpuf-bg-slate-800 wpuf-text-white hover:wpuf-cursor-pointer hover:wpuf-bg-indigo-600'; + } + }, }; /** @@ -86,6 +92,32 @@ wpuf_mixins.form_field_mixin = { ]; }, + builder_class_names: function(type_class) { + var commonClasses = ''; + + switch (type_class) { + case 'text': + case 'url': + case 'email': + case 'textareafield': + case 'textfield': + case 'select': + commonClasses = 'wpuf-block wpuf-min-w-full wpuf-rounded-md wpuf-py-1.5 wpuf-text-gray-900 wpuf-shadow-sm placeholder:wpuf-text-gray-400 sm:wpuf-text-sm sm:wpuf-leading-6 wpuf-border !wpuf-border-gray-300'; + break; + + case 'upload_btn': + commonClasses = 'file-selector wpuf-rounded-md wpuf-bg-indigo-600 wpuf-px-3 wpuf-py-2 wpuf-text-sm wpuf-font-semibold wpuf-text-white wpuf-shadow-sm hover:wpuf-bg-indigo-500 hover:wpuf-text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600'; + break; + } + + return [ + type_class, + this.required_class(), + 'wpuf_' + this.field.name + '_' + this.form_id, + commonClasses + ]; + }, + required_class: function () { return ('yes' === this.required) ? 'required' : ''; }, diff --git a/assets/js/wpuf-form-builder.js b/assets/js/wpuf-form-builder.js index 519a0140a..de09f3c48 100644 --- a/assets/js/wpuf-form-builder.js +++ b/assets/js/wpuf-form-builder.js @@ -414,6 +414,7 @@ enableMultistep: false, shortcodeCopied: false, active_tab: 'form-editor', + logoUrl: wpuf_form_builder.assetUrl + '/images/wpuf-icon-circle.svg' }, computed: { diff --git a/assets/less/admin.less b/assets/less/admin.less index f275ba4d8..8ad900821 100644 --- a/assets/less/admin.less +++ b/assets/less/admin.less @@ -763,8 +763,6 @@ ul.wpuf-form{ position: relative; ul.wpuf-column-fields-sortable-list{ - border: 1px dashed #ffb900; - background: rgba(255, 185, 0, 0.08); margin: 0; padding: 0 0 50px 0; diff --git a/assets/less/frontend-forms.less b/assets/less/frontend-forms.less index 6954c3b8a..7b3f97a34 100644 --- a/assets/less/frontend-forms.less +++ b/assets/less/frontend-forms.less @@ -5,9 +5,6 @@ @mediaMD: 1200px; /* DivTable.com */ body { -#wpfooter { - position: fixed !important -} .has-error { background: #FFE4E4; padding: 10px; diff --git a/includes/Admin/Forms/Admin_Form_Builder.php b/includes/Admin/Forms/Admin_Form_Builder.php index 8e9c2b77b..da4582a4e 100644 --- a/includes/Admin/Forms/Admin_Form_Builder.php +++ b/includes/Admin/Forms/Admin_Form_Builder.php @@ -154,6 +154,7 @@ public function admin_enqueue_scripts() { 'i18n' => $this->i18n(), 'post' => $post, 'form_fields' => wpuf_get_form_fields( $post->ID ), + 'assetUrl' => WPUF_ASSET_URI, 'panel_sections' => wpuf()->fields->get_field_groups(), 'field_settings' => wpuf()->fields->get_js_settings(), 'form_settings' => wpuf_get_form_settings( $post->ID ), diff --git a/includes/Fields/Form_Field_SectionBreak.php b/includes/Fields/Form_Field_SectionBreak.php index 24e9a069e..3718529c1 100755 --- a/includes/Fields/Form_Field_SectionBreak.php +++ b/includes/Fields/Form_Field_SectionBreak.php @@ -2,7 +2,6 @@ namespace WeDevs\Wpuf\Fields; - /** * Section Break Field Class */ @@ -81,15 +80,16 @@ public function get_options_settings() { */ public function get_field_props() { $props = [ - 'input_type' => 'section_break', - 'template' => $this->get_type(), - 'label' => $this->get_name(), - 'description' => __( 'Some description about this section', 'wp-user-frontend' ), - 'id' => 0, - 'is_new' => true, - 'show_in_post' => 'yes', - 'hide_field_label' => 'no', - 'wpuf_cond' => null, + 'input_type' => 'section_break', + 'template' => $this->get_type(), + 'label' => $this->get_name(), + 'description' => __( 'Some description about this section adshfdsh', 'wp-user-frontend' ), + 'id' => 0, + 'is_new' => true, + 'show_in_post' => 'yes', + 'hide_field_label' => 'no', + 'wpuf_cond' => null, + 'divider' => 'regular', ]; return $props; diff --git a/includes/Fields/Form_Field_reCaptcha.php b/includes/Fields/Form_Field_reCaptcha.php index 02703023e..7e5c76bdc 100755 --- a/includes/Fields/Form_Field_reCaptcha.php +++ b/includes/Fields/Form_Field_reCaptcha.php @@ -2,7 +2,6 @@ namespace WeDevs\Wpuf\Fields; - /** * Recaptcha Field Class */ @@ -188,6 +187,15 @@ public function get_options_settings() { return $settings; } + /** + * It's a full width block + * + * @return bool + */ + public function is_full_width() { + return true; + } + /** * Get the field props * diff --git a/includes/Fields/Form_Pro_Upgrade_Fields.php b/includes/Fields/Form_Pro_Upgrade_Fields.php index ab4dcee1a..1e5996116 100755 --- a/includes/Fields/Form_Pro_Upgrade_Fields.php +++ b/includes/Fields/Form_Pro_Upgrade_Fields.php @@ -10,6 +10,8 @@ public function __construct() { $this->fields['repeat_field'] = new Form_Field_Repeat(); $this->fields['country_list_field'] = new Form_Field_Country(); $this->fields['date_field'] = new Form_Field_Date(); + $this->fields['time_field'] = new Form_Field_Time(); + $this->fields['phone_field'] = new Form_Field_Phone(); $this->fields['embed'] = new Form_Field_Embed(); $this->fields['file_upload'] = new Form_Field_File(); $this->fields['google_map'] = new Form_Field_GMap(); @@ -61,6 +63,32 @@ public function __construct() { } } +/** + * Time Field Class + * + * @since WPUF_SINCE + */ +class Form_Field_Time extends Form_Field_Pro { + public function __construct() { + $this->name = __( 'Time', 'wp-user-frontend' ); + $this->input_type = 'time_field'; + $this->icon = 'clock-o'; + } +} + +/** + * Phone Field Class + * + * @since WPUF_SINCE + */ +class Form_Field_Phone extends Form_Field_Pro { + public function __construct() { + $this->name = __( 'Phone Field', 'wpuf-pro' ); + $this->input_type = 'phone_field'; + $this->icon = 'phone'; + } +} + class Form_Field_Embed extends Form_Field_Pro { public function __construct() { $this->name = __( 'Embed', 'wp-user-frontend' ); diff --git a/includes/Setup_Wizard.php b/includes/Setup_Wizard.php index 02df40b71..70a702e95 100644 --- a/includes/Setup_Wizard.php +++ b/includes/Setup_Wizard.php @@ -37,10 +37,6 @@ public function __construct() { * @return void */ public function custom_admin_bar_styles() { - if ( ! is_admin_bar_showing() ) { - return; - } - if ( function_exists( 'wp_enqueue_admin_bar_header_styles' ) ) { wp_enqueue_admin_bar_header_styles(); } else { diff --git a/src/css/admin/form-builder.css b/src/css/admin/form-builder.css index 793f26f1d..77a7fc7d6 100644 --- a/src/css/admin/form-builder.css +++ b/src/css/admin/form-builder.css @@ -46,3 +46,9 @@ .wpuf-dropdown-container:hover .wpuf-dropdown-item { @apply wpuf-opacity-100 wpuf-scale-100; } + +.wpuf-pattern-1 { + border: 1px dashed #ddd; + opacity: 0.5; + background: repeating-linear-gradient( -45deg, #ddd, #ddd 2px, #fff 2px, #fff 10px ); +} diff --git a/tailwind.config.js b/tailwind.config.js index a85931cd3..9301f90f4 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,12 @@ /** @type {import('tailwindcss').Config} */ module.exports = { prefix: 'wpuf-', - content: ['./assets/**/*.{js,jsx,ts,tsx,vue,html}', './includes/Admin/views/*.php', './admin/form-builder/views/*.php'], + content: [ + './assets/**/*.{js,jsx,ts,tsx,vue,html}', + './includes/Admin/views/*.php', + './admin/form-builder/views/*.php', + './admin/form-builder/assets/js/components/**/*.php' + ], theme: { extend: { colors: { From dbef1af381eacaf7d4d6e5246dd6cdc8c32e5667 Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Tue, 12 Nov 2024 13:35:24 +0600 Subject: [PATCH 11/21] initial design --- Gruntfile.js | 5 +- .../js/components/builder-stage/template.php | 196 +++++++------- .../assets/js/mixins/add-form-field.js | 2 +- .../assets/js/mixins/form-field.js | 4 +- admin/form-builder/views/form-builder.php | 53 +--- assets/css/admin/form-builder.css | 241 ++++++++++-------- assets/css/frontend-forms.css | 25 -- assets/js-templates/form-components.php | 196 +++++++------- assets/js/wpuf-form-builder-mixins.js | 6 +- assets/less/frontend-forms.less | 25 -- src/css/admin/form-builder.css | 4 + tailwind.config.js | 3 +- 12 files changed, 369 insertions(+), 391 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index e6d8a44be..d7588e8a5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -122,8 +122,9 @@ module.exports = function( grunt) { files: [ 'src/css/**/*.css', 'admin/form-builder/views/*.php', - 'includes/Admin/views/*.php', - 'admin/form-builder/assets/js/**/*' + 'admin/form-builder/assets/js/**/*.php', + 'admin/form-builder/assets/js/**/*.js', + 'includes/Admin/**/*.php', ], tasks: ['shell:tailwind'], options: { diff --git a/admin/form-builder/assets/js/components/builder-stage/template.php b/admin/form-builder/assets/js/components/builder-stage/template.php index 0f2671b3e..9384c7686 100644 --- a/admin/form-builder/assets/js/components/builder-stage/template.php +++ b/admin/form-builder/assets/js/components/builder-stage/template.php @@ -2,97 +2,117 @@

- -
- -
  • -
     
    - - -
  • - -
    -

    - -
      +
      • - : {{ field.name }} | : {{ field.meta_value }} + v-for="(field, index) in form_fields" + :key="field.id" + :data-index="index" + data-source="stage" + :class="[ + 'field-items', 'wpuf-el', field.name, field.css, 'form-field-' + field.template, + field.width ? 'field-size-' + field.width : '', + ('custom_hidden_field' === field.template) ? 'hidden-field' : '', + parseInt(editing_form_id) === parseInt(field.id) ? 'current-editing' : '' + ]" + class="wpuf-group wpuf-rounded-lg hover:wpuf-bg-green-50 wpuf-transition wpuf-duration-150 wpuf-ease-out !wpuf-m-0 !wpuf-p-0"> +
        +
        + +
        + +
        +
        +
        + + + + + Remove + + + + + + + + +
        +
      -
    +
  • +
     
    + +
  • +
    +

    + +
      +
    • + : {{ field.name }} | : {{ field.meta_value }} +
    • +
    +
    diff --git a/admin/form-builder/assets/js/mixins/add-form-field.js b/admin/form-builder/assets/js/mixins/add-form-field.js index a827cdfe7..4e9442130 100644 --- a/admin/form-builder/assets/js/mixins/add-form-field.js +++ b/admin/form-builder/assets/js/mixins/add-form-field.js @@ -49,7 +49,7 @@ wpuf_mixins.add_form_field = { computed: { action_button_classes: function() { - return 'wpuf-p-2 wpuf-bg-slate-800 wpuf-text-white hover:wpuf-cursor-pointer hover:wpuf-bg-indigo-600'; + return 'wpuf-p-2 hover:wpuf-cursor-pointer hover:wpuf-text-white'; } }, }; diff --git a/admin/form-builder/assets/js/mixins/form-field.js b/admin/form-builder/assets/js/mixins/form-field.js index 9cc5e859a..8e99606ac 100644 --- a/admin/form-builder/assets/js/mixins/form-field.js +++ b/admin/form-builder/assets/js/mixins/form-field.js @@ -43,11 +43,11 @@ wpuf_mixins.form_field_mixin = { case 'textareafield': case 'textfield': case 'select': - commonClasses = 'wpuf-block wpuf-min-w-full wpuf-rounded-md wpuf-py-1.5 wpuf-text-gray-900 wpuf-shadow-sm placeholder:wpuf-text-gray-400 sm:wpuf-text-sm sm:wpuf-leading-6 wpuf-border !wpuf-border-gray-300'; + commonClasses = 'wpuf-block wpuf-min-w-full wpuf-rounded-md wpuf-py-1.5 wpuf-text-gray-900 !wpuf-shadow-sm placeholder:wpuf-text-gray-400 sm:wpuf-text-sm sm:wpuf-leading-6 wpuf-border !wpuf-border-gray-300'; break; case 'upload_btn': - commonClasses = 'file-selector wpuf-rounded-md wpuf-bg-indigo-600 wpuf-px-3 wpuf-py-2 wpuf-text-sm wpuf-font-semibold wpuf-text-white wpuf-shadow-sm hover:wpuf-bg-indigo-500 hover:wpuf-text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600'; + commonClasses = 'file-selector wpuf-rounded-md wpuf-btn-secondary'; break; } diff --git a/admin/form-builder/views/form-builder.php b/admin/form-builder/views/form-builder.php index ed0c3fb7c..f3a207d15 100644 --- a/admin/form-builder/views/form-builder.php +++ b/admin/form-builder/views/form-builder.php @@ -1,57 +1,12 @@
    -
    + class="wpuf-w-[calc(100%+20px)] wpuf-ml-[-20px] wpuf-form-builder-" method="post" action="" @submit.prevent="save_form_builder" v-cloak> +
    WPUF Icon