Skip to content

Beautiful Open-Source Form Builder

Add transparent theme support for form components (#938)

Chirag Chhatrala9baa33f47642
diff --git a/api/app/Models/Forms/Form.php b/api/app/Models/Forms/Form.php
index 5fedc9a72..546524be6 100644
--- a/api/app/Models/Forms/Form.php
+++ b/api/app/Models/Forms/Form.php
@@ -36,7 +36,7 @@ class Form extends Model implements CachableAttributes
public const BORDER_RADIUS = ['none', 'small', 'full'];
- public const THEMES = ['default', 'simple', 'notion', 'minimal'];
+ public const THEMES = ['default', 'simple', 'notion', 'minimal', 'transparent'];
public const PRESENTATION_STYLES = ['classic', 'focused'];
diff --git a/client/components/forms/core/components/VSelect.vue b/client/components/forms/core/components/VSelect.vue
index 9d88d5b96..f0f534c4a 100644
--- a/client/components/forms/core/components/VSelect.vue
+++ b/client/components/forms/core/components/VSelect.vue
@@ -344,6 +344,7 @@ export default {
hasError: this.hasError,
disabled: this.disabled,
focused: this.isFocused,
+ isOpen: this.isOpen,
multiple: this.multiple,
searchable: this.isSearchable
})
diff --git a/client/components/forms/heavy/DateInput.vue b/client/components/forms/heavy/DateInput.vue
index 37482d6ee..70d2ec101 100644
--- a/client/components/forms/heavy/DateInput.vue
+++ b/client/components/forms/heavy/DateInput.vue
@@ -13,7 +13,7 @@
<button
ref="triggerButton"
class="overflow-hidden"
- :class="ui.input({ class: props.ui?.slots?.input })"
+ :class="ui.input({ class: props.ui?.slots?.input, isOpen: pickerOpen })"
:disabled="props.disabled"
:aria-expanded="pickerOpen"
:aria-haspopup="true"
@@ -47,7 +47,7 @@
</div>
<button
v-if="fromDate && !props.disabled"
- class="hover:bg-neutral-50 dark:hover:bg-neutral-900 ltr:border-l rtl:border-r px-2 flex items-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-form/100 focus-visible:ring-inset"
+ :class="ui.clearButton({ class: props.ui?.slots?.clearButton })"
:aria-label="'Clear date'"
@click.prevent="clear()"
@keydown="handleClearKeydown"
diff --git a/client/components/forms/heavy/MatrixInput.vue b/client/components/forms/heavy/MatrixInput.vue
index 92da158cf..ab8d90235 100644
--- a/client/components/forms/heavy/MatrixInput.vue
+++ b/client/components/forms/heavy/MatrixInput.vue
@@ -12,7 +12,7 @@
v-for="column in columns"
:key="column"
:class="[
- resolvedTheme === 'minimal' ? '' : 'ltr:border-l rtl:border-r rtl:!border-l-0',
+ ['minimal', 'transparent'].includes(resolvedTheme) ? '' : 'ltr:border-l rtl:border-r rtl:!border-l-0',
'max-w-24 overflow-hidden',
ui.cell({ class: props.ui?.slots?.cell })
]"
@@ -43,7 +43,7 @@
:tabindex="props.disabled ? -1 : 0"
:aria-checked="compVal && compVal[row] === column"
:class="[
- resolvedTheme === 'minimal' ? '' : 'ltr:border-l rtl:border-r rtl:!border-l-0',
+ ['minimal', 'transparent'].includes(resolvedTheme) ? '' : 'ltr:border-l rtl:border-r rtl:!border-l-0',
ui.cell({ class: props.ui?.slots?.cell }),
ui.cellHover({ class: props.ui?.slots?.cellHover }),
ui.option({ class: props.ui?.slots?.option })
diff --git a/client/components/forms/heavy/PhoneInput.vue b/client/components/forms/heavy/PhoneInput.vue
index ed9e2ba7c..0c4a6e10d 100644
--- a/client/components/forms/heavy/PhoneInput.vue
+++ b/client/components/forms/heavy/PhoneInput.vue
@@ -17,7 +17,7 @@
<v-select
class="min-w-0"
v-model="selectedCountryCode"
- input-class="ltr-only:rounded-r-none rtl:rounded-l-none!"
+ :input-class="resolvedTheme === 'transparent' ? '!rounded-none' : 'ltr-only:rounded-r-none rtl:rounded-l-none!'"
:data="countries"
:disabled="disabled || countries.length===1"
:searchable="true"
diff --git a/client/components/forms/heavy/RichTextAreaInput.client.vue b/client/components/forms/heavy/RichTextAreaInput.client.vue
index cdd27d6bd..a6ae78072 100644
--- a/client/components/forms/heavy/RichTextAreaInput.client.vue
+++ b/client/components/forms/heavy/RichTextAreaInput.client.vue
@@ -9,7 +9,10 @@
<div
class="rich-editor resize-y notranslate relative"
- :class="ui.container({ class: props.ui?.slots?.container })"
+ :class="[
+ ui.container({ class: props.ui?.slots?.container }),
+ { 'theme-transparent': resolvedTheme === 'transparent' }
+ ]"
:style="inputStyle"
>
<MentionDropdown
@@ -60,7 +63,11 @@
<!-- Editor Container for Fullscreen -->
<div class="flex-1 overflow-hidden">
- <div class="rich-editor h-full" style="resize: none;">
+ <div
+ class="rich-editor h-full"
+ :class="{ 'theme-transparent': resolvedTheme === 'transparent' }"
+ style="resize: none;"
+ >
<MentionDropdown
v-if="enableMentions && mentionState"
:mention-state="mentionState"
@@ -153,7 +160,7 @@ const props = defineProps({
})
const emit = defineEmits(['update:modelValue'])
-const { compVal, inputStyle, inputWrapperProps, ui } = useFormInput(props, { emit }, {
+const { compVal, inputStyle, inputWrapperProps, ui, resolvedTheme } = useFormInput(props, { emit }, {
variants: richTextAreaInputTheme,
additionalVariants: {
focused: true // focus style is handled via focus-within by CSS
@@ -304,6 +311,13 @@ const showCharLimit = computed(() => {
</script>
<style lang="scss">
+// Transparent theme specific styles
+.rich-editor.theme-transparent {
+ .ql-editor {
+ padding: 12px 0;
+ }
+}
+
.rich-editor {
.ql-container {
border-bottom: 0px !important;
diff --git a/client/components/open/forms/components/form-components/FormCustomization.vue b/client/components/open/forms/components/form-components/FormCustomization.vue
index fd4310852..b5648f4ab 100644
--- a/client/components/open/forms/components/form-components/FormCustomization.vue
+++ b/client/components/open/forms/components/form-components/FormCustomization.vue
@@ -16,6 +16,7 @@
{ name: 'Notion', value: 'notion' },
{ name: 'Simple (no shadows)', value: 'simple' },
{ name: 'Minimal', value: 'minimal' },
+ { name: 'Transparent', value: 'transparent' }
]"
:form="form"
label="Form Theme"
@@ -119,6 +120,7 @@
class="mb-4"
/>
<OptionSelectorInput
+ v-if="form.theme !== 'transparent'"
label="Input Roundness"
v-model="form.border_radius"
seamless
diff --git a/client/lib/forms/themes/checkbox-icon.theme.js b/client/lib/forms/themes/checkbox-icon.theme.js
index 9a5e5077c..a13bc4817 100644
--- a/client/lib/forms/themes/checkbox-icon.theme.js
+++ b/client/lib/forms/themes/checkbox-icon.theme.js
@@ -26,6 +26,9 @@ export const checkboxIconTheme = {
},
minimal: {
uncheckedIcon: 'text-neutral-400 dark:text-neutral-600'
+ },
+ transparent: {
+ uncheckedIcon: 'text-neutral-300 dark:text-neutral-600'
}
},
size: {
diff --git a/client/lib/forms/themes/code-input.theme.js b/client/lib/forms/themes/code-input.theme.js
index 3801840f7..8d1429081 100644
--- a/client/lib/forms/themes/code-input.theme.js
+++ b/client/lib/forms/themes/code-input.theme.js
@@ -11,7 +11,8 @@ export const codeInputTheme = {
theme: {
default: { container: 'border border-neutral-300 dark:border-neutral-600' },
minimal: { container: 'border-2 border-transparent bg-neutral-100 dark:bg-notion-dark-light' },
- notion: { container: 'border border-notion-input-border dark:border-notion-input-borderDark' }
+ notion: { container: 'border border-notion-input-border dark:border-notion-input-borderDark' },
+ transparent: { container: 'border-0 bg-transparent dark:bg-transparent !rounded-none shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)] transition-shadow duration-200 focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)]' }
},
size: {
xs: { container: 'rounded-none' },
diff --git a/client/lib/forms/themes/date-input.theme.js b/client/lib/forms/themes/date-input.theme.js
index ddb83ed6e..8d2371afb 100644
--- a/client/lib/forms/themes/date-input.theme.js
+++ b/client/lib/forms/themes/date-input.theme.js
@@ -8,6 +8,7 @@ export const dateInputTheme = {
'text-neutral-700 dark:text-neutral-300',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:border-transparent'
],
+ clearButton: 'hover:bg-neutral-50 dark:hover:bg-neutral-900 ltr:border-l rtl:border-r px-2 flex items-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-form/100 focus-visible:ring-inset',
inner: ''
},
variants: {
@@ -39,6 +40,25 @@ export const dateInputTheme = {
'text-neutral-700 dark:text-neutral-300',
'focus-visible:ring-0 focus-visible:border-form'
]
+ },
+ transparent: {
+ input: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus-visible:ring-0 focus-visible:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ],
+ clearButton: 'border-none',
+ inner: '!px-0'
+ }
+ },
+ // Open state styling used when popover is open (even if trigger is not focused)
+ isOpen: {
+ true: {
+ input: 'ring-2 ring-form/100 outline-none'
}
},
size: {
@@ -64,6 +84,14 @@ export const dateInputTheme = {
}
}
},
+ // Ensure transparent theme uses bottom-only highlight when open
+ compoundVariants: [
+ {
+ theme: 'transparent',
+ isOpen: true,
+ class: { input: 'ring-0 shadow-[inset_0_-2px_0_0_var(--color-form)] outline-none' }
+ }
+ ],
defaultVariants: {
theme: 'default',
size: 'md',
diff --git a/client/lib/forms/themes/file-input.theme.js b/client/lib/forms/themes/file-input.theme.js
index c1014839b..4963e38fc 100644
--- a/client/lib/forms/themes/file-input.theme.js
+++ b/client/lib/forms/themes/file-input.theme.js
@@ -17,6 +17,9 @@ export const fileInputTheme = {
minimal: { container: 'border-2 border-transparent bg-neutral-100 dark:bg-notion-dark-light text-neutral-700 dark:text-neutral-300 focus:ring-2 focus:ring-form/60' },
notion: {
container: 'border-notion-input-border dark:border-notion-input-borderDark bg-notion-input-background dark:bg-notion-dark-light text-neutral-900 dark:text-neutral-100'
+ },
+ transparent: {
+ container: '!rounded-none bg-transparent text-neutral-700 dark:text-neutral-300 border-neutral-300 dark:border-neutral-600 hover:bg-neutral-50 dark:hover:bg-notion-dark-light'
}
},
size: {
diff --git a/client/lib/forms/themes/flat-select-input.theme.js b/client/lib/forms/themes/flat-select-input.theme.js
index d04ab2c84..8de455e56 100644
--- a/client/lib/forms/themes/flat-select-input.theme.js
+++ b/client/lib/forms/themes/flat-select-input.theme.js
@@ -73,6 +73,25 @@ export const flatSelectInputTheme = {
'border-neutral-200 dark:border-neutral-700',
'gap-x-2'
]
+ },
+ transparent: {
+ container: [
+ 'relative overflow-hidden',
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ],
+ option: [
+ 'relative',
+ 'focus-visible:ring-2 focus-visible:ring-form/100 focus-visible:outline-none',
+ 'border-neutral-200 dark:border-neutral-700',
+ 'gap-x-2',
+ '!px-0'
+ ]
}
},
size: {
diff --git a/client/lib/forms/themes/image-input.theme.js b/client/lib/forms/themes/image-input.theme.js
index 057b7c3ff..0aba9c508 100644
--- a/client/lib/forms/themes/image-input.theme.js
+++ b/client/lib/forms/themes/image-input.theme.js
@@ -31,6 +31,17 @@ export const imageInputTheme = {
'bg-notion-input-background dark:bg-notion-dark-light',
'text-neutral-900 dark:text-neutral-100'
]
+ },
+ transparent: {
+ button: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus:ring-0 focus:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ]
}
},
size: {
diff --git a/client/lib/forms/themes/input-label.theme.js b/client/lib/forms/themes/input-label.theme.js
index 844a3a548..ccfb38ca0 100644
--- a/client/lib/forms/themes/input-label.theme.js
+++ b/client/lib/forms/themes/input-label.theme.js
@@ -30,6 +30,9 @@ export const inputLabelTheme = {
},
minimal: {
label: 'font-medium text-neutral-600 dark:text-neutral-400'
+ },
+ transparent: {
+ label: 'font-semibold'
}
},
size: {
diff --git a/client/lib/forms/themes/matrix-input.theme.js b/client/lib/forms/themes/matrix-input.theme.js
index 0dd3e381d..a4f061b5b 100644
--- a/client/lib/forms/themes/matrix-input.theme.js
+++ b/client/lib/forms/themes/matrix-input.theme.js
@@ -49,6 +49,20 @@ export const matrixInputTheme = {
cell: 'border-transparent',
cellHover: 'hover:bg-neutral-200/50 dark:hover:bg-neutral-900',
option: 'border-0 focus-visible:outline focus-visible:outline-2 focus-visible:outline-form focus-visible:outline-offset-[-2px] focus-visible:ring-0'
+ },
+ transparent: {
+ container: [
+ 'border-0',
+ 'bg-transparent',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ],
+ cell: 'border-transparent',
+ cellHover: 'hover:backdrop-brightness-[0.97] dark:hover:backdrop-brightness-90',
+ option: 'focus-visible:outline-none focus-visible:ring-0',
+ rowCell: '!px-0'
}
},
size: {
diff --git a/client/lib/forms/themes/mention-input.theme.js b/client/lib/forms/themes/mention-input.theme.js
index 3acafe850..a6350d1f1 100644
--- a/client/lib/forms/themes/mention-input.theme.js
+++ b/client/lib/forms/themes/mention-input.theme.js
@@ -24,6 +24,17 @@ export const mentionInputTheme = {
},
notion: {
input: 'border-notion-input-border dark:border-notion-input-borderDark bg-notion-input-background dark:bg-notion-dark-light text-neutral-900 dark:text-neutral-100'
+ },
+ transparent: {
+ input: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus:ring-0 focus:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ]
}
},
size: {
diff --git a/client/lib/forms/themes/option-selector-input.theme.js b/client/lib/forms/themes/option-selector-input.theme.js
index af6df15dd..4984bc07d 100644
--- a/client/lib/forms/themes/option-selector-input.theme.js
+++ b/client/lib/forms/themes/option-selector-input.theme.js
@@ -23,6 +23,9 @@ export const optionSelectorInputTheme = {
},
notion: {
option: ['border-notion-input-border dark:border-notion-input-borderDark', 'hover:backdrop-brightness-95']
+ },
+ transparent: {
+ option: ['border-neutral-300', 'bg-transparent', 'hover:bg-neutral-50']
}
},
size: {
diff --git a/client/lib/forms/themes/payment-input.theme.js b/client/lib/forms/themes/payment-input.theme.js
index 0ac0da3c5..60752de39 100644
--- a/client/lib/forms/themes/payment-input.theme.js
+++ b/client/lib/forms/themes/payment-input.theme.js
@@ -70,6 +70,22 @@ export const paymentInputTheme = {
'border border-notion-input-border dark:border-notion-input-borderDark',
'bg-notion-input-background dark:bg-notion-dark-light'
]
+ },
+ transparent: {
+ container: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ],
+ amountBar: [
+ 'border-0',
+ 'bg-transparent',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]'
+ ]
}
},
size: {
diff --git a/client/lib/forms/themes/phone-input.theme.js b/client/lib/forms/themes/phone-input.theme.js
index 72e3baef1..c8504847f 100644
--- a/client/lib/forms/themes/phone-input.theme.js
+++ b/client/lib/forms/themes/phone-input.theme.js
@@ -50,6 +50,17 @@ export const phoneInputTheme = {
'focus:ring-0 focus:border-form'
],
separator: 'ltr:border-l rtl:border-r border-neutral-200 dark:border-neutral-700'
+ },
+ transparent: {
+ input: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus:ring-0 focus:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ]
}
},
size: {
diff --git a/client/lib/forms/themes/radio-button-icon.theme.js b/client/lib/forms/themes/radio-button-icon.theme.js
index 45db98c74..53058a6ce 100644
--- a/client/lib/forms/themes/radio-button-icon.theme.js
+++ b/client/lib/forms/themes/radio-button-icon.theme.js
@@ -26,6 +26,9 @@ export const radioButtonIconTheme = {
},
minimal: {
uncheckedIcon: 'text-neutral-400 dark:text-neutral-600'
+ },
+ transparent: {
+ uncheckedIcon: 'text-neutral-300 dark:text-neutral-600'
}
},
size: {
diff --git a/client/lib/forms/themes/rich-text-area-input.theme.js b/client/lib/forms/themes/rich-text-area-input.theme.js
index 75992908e..01508acdf 100644
--- a/client/lib/forms/themes/rich-text-area-input.theme.js
+++ b/client/lib/forms/themes/rich-text-area-input.theme.js
@@ -35,6 +35,17 @@ export const richTextAreaInputTheme = {
'bg-neutral-100 dark:bg-notion-dark-light',
'text-neutral-700 dark:text-neutral-300',
]
+ },
+ transparent: {
+ container: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ]
}
},
size: {
@@ -58,6 +69,13 @@ export const richTextAreaInputTheme = {
true: { container: 'focus-within:ring-2 focus-within:ring-form/100 focus-within:border-transparent' }
}
},
+ compoundVariants: [
+ {
+ theme: 'transparent',
+ focused: true,
+ class: { container: 'focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)] outline-none' }
+ }
+ ],
defaultVariants: {
theme: 'default',
size: 'md',
diff --git a/client/lib/forms/themes/scale-input.theme.js b/client/lib/forms/themes/scale-input.theme.js
index dbde54abe..8af9fbef6 100644
--- a/client/lib/forms/themes/scale-input.theme.js
+++ b/client/lib/forms/themes/scale-input.theme.js
@@ -50,6 +50,19 @@ export const scaleInputTheme = {
'bg-neutral-100 dark:bg-notion-dark-light'
],
buttonHover: 'hover:bg-neutral-200/50 dark:hover:bg-neutral-900'
+ },
+ transparent: {
+ button: [
+ 'border-0',
+ '!rounded-none',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ 'transition-shadow duration-200',
+ 'focus:ring-0 focus:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ],
+ buttonUnselected: [
+ 'bg-transparent'
+ ],
+ buttonHover: 'hover:bg-neutral-50 dark:hover:bg-neutral-900'
}
},
size: {
diff --git a/client/lib/forms/themes/signature-input.theme.js b/client/lib/forms/themes/signature-input.theme.js
index 2fa2c40f1..eff1268b2 100644
--- a/client/lib/forms/themes/signature-input.theme.js
+++ b/client/lib/forms/themes/signature-input.theme.js
@@ -5,6 +5,7 @@ export const signatureInputTheme = {
slots: {
container: [
'flex flex-wrap items-center justify-center gap-4',
+ 'border border-dashed',
'focus:outline-hidden'
],
help: 'text-neutral-500'
@@ -36,6 +37,9 @@ export const signatureInputTheme = {
'bg-neutral-100 dark:bg-notion-dark-light',
'text-neutral-700 dark:text-neutral-300'
]
+ },
+ transparent: {
+ container: '!rounded-none bg-transparent text-neutral-700 dark:text-neutral-300 border-neutral-300 dark:border-neutral-600 hover:bg-neutral-50 dark:hover:bg-notion-dark-light'
}
},
size: {
diff --git a/client/lib/forms/themes/text-area-input.theme.js b/client/lib/forms/themes/text-area-input.theme.js
index c7bdb20cc..9d06a7dfe 100644
--- a/client/lib/forms/themes/text-area-input.theme.js
+++ b/client/lib/forms/themes/text-area-input.theme.js
@@ -45,6 +45,18 @@ export const textAreaInputTheme = {
'text-neutral-700 dark:text-neutral-300',
'focus:ring-0 focus:border-form'
]
+ },
+ transparent: {
+ input: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus:ring-0 focus:shadow-[inset_0_-2px_0_0_var(--color-form)]',
+ '!px-0'
+ ]
}
},
size: {
diff --git a/client/lib/forms/themes/text-input.theme.js b/client/lib/forms/themes/text-input.theme.js
index 7168829e2..2023ea2ef 100644
--- a/client/lib/forms/themes/text-input.theme.js
+++ b/client/lib/forms/themes/text-input.theme.js
@@ -46,6 +46,18 @@ export const textInputTheme = {
'text-neutral-700 dark:text-neutral-300',
'focus:ring-0 focus:border-form'
]
+ },
+ transparent: {
+ input: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus:ring-0 focus:shadow-[inset_0_-2px_0_0_var(--color-form)]',
+ '!px-0'
+ ]
}
},
size: {
diff --git a/client/lib/forms/themes/uploaded-file.theme.js b/client/lib/forms/themes/uploaded-file.theme.js
index 643ecd45f..d95c4fdc0 100644
--- a/client/lib/forms/themes/uploaded-file.theme.js
+++ b/client/lib/forms/themes/uploaded-file.theme.js
@@ -9,7 +9,8 @@ export const uploadedFileTheme = {
theme: {
default: { root: 'border-neutral-300 dark:border-neutral-600 dark:bg-notion-dark-light' },
minimal: { root: 'border-2 border-transparent bg-neutral-100 dark:bg-notion-dark-light' },
- notion: { root: 'border-notion-input-border dark:border-notion-input-borderDark dark:bg-notion-dark-light rounded-xs' }
+ notion: { root: 'border-notion-input-border dark:border-notion-input-borderDark dark:bg-notion-dark-light rounded-xs' },
+ transparent: { root: 'border-0 bg-transparent dark:bg-transparent shadow-none !rounded-none' }
}
},
defaultVariants: {
diff --git a/client/lib/forms/themes/v-select.theme.js b/client/lib/forms/themes/v-select.theme.js
index 87a77e80b..c8220645d 100644
--- a/client/lib/forms/themes/v-select.theme.js
+++ b/client/lib/forms/themes/v-select.theme.js
@@ -88,6 +88,26 @@ export const vSelectTheme = {
],
chevronGradient: 'bg-gradient-to-r from-transparent to-neutral-100 dark:to-notion-dark-light',
chevronContainer: 'bg-neutral-100 dark:bg-notion-dark-light'
+ },
+ transparent: {
+ anchor: [
+ 'border-0',
+ 'bg-transparent dark:bg-transparent',
+ 'text-neutral-700 dark:text-neutral-300',
+ 'shadow-[inset_0_-1px_0_0_rgb(212_212_212)] dark:shadow-[inset_0_-1px_0_0_rgb(82_82_82)]',
+ '!rounded-none',
+ 'transition-shadow duration-200',
+ 'focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)]'
+ ],
+ chevronGradient: 'bg-gradient-to-r from-transparent to-transparent',
+ chevronContainer: 'bg-transparent',
+ button: '!pl-0'
+ }
+ },
+ // Open state styling for when popover is open (even if not focused)
+ isOpen: {
+ true: {
+ anchor: 'ring-2 ring-form/100 outline-none'
}
},
size: {
@@ -166,6 +186,19 @@ export const vSelectTheme = {
}
}
},
+ // Ensure transparent theme uses bottom-only highlight when open
+ compoundVariants: [
+ {
+ theme: 'transparent',
+ isOpen: true,
+ class: { anchor: 'ring-0 shadow-[inset_0_-2px_0_0_var(--color-form)] outline-none' }
+ },
+ {
+ theme: 'transparent',
+ focused: true,
+ class: { anchor: 'focus-within:ring-0 focus-within:shadow-[inset_0_-2px_0_0_var(--color-form)] outline-none' }
+ }
+ ],
defaultVariants: {
theme: 'default',
size: 'md',