|
7 | 7 | import { api } from '../api.js'; |
8 | 8 | import { Plus, Trash2, Pencil, Type, AlignLeft, ListChecks, ToggleLeft, AlertTriangle, Search, X } from '@lucide/svelte'; |
9 | 9 | import Button from '../components/Button.svelte'; |
| 10 | + import Input from '../components/Input.svelte'; |
10 | 11 | import Spinner from '../components/Spinner.svelte'; |
| 12 | + import Textarea from '../components/Textarea.svelte'; |
11 | 13 | import PortalModal from './PortalModal.svelte'; |
12 | 14 | import DropIndicator from '../layout/DropIndicator.svelte'; |
13 | 15 | import { t } from '../stores/i18n.svelte.js'; |
|
630 | 632 | </p> |
631 | 633 | </div> |
632 | 634 | </div> |
633 | | - <input |
| 635 | + <Input |
634 | 636 | id="rtfb-title-template" |
635 | 637 | type="text" |
636 | 638 | bind:value={titleTemplate} |
637 | 639 | oninput={scheduleTitleTemplateSave} |
638 | 640 | onblur={saveTitleTemplate} |
639 | 641 | placeholder={'Request: {{type.name}} from {{requester.name}}'} |
640 | | - class="w-full px-3 py-2 rounded border text-sm focus:outline-none focus:ring-2" |
641 | | - style="background-color: var(--ds-background-input); color: var(--ds-text); border-color: var(--ds-border); --tw-ring-color: var(--ds-interactive);" |
| 642 | + size="small" |
642 | 643 | /> |
643 | 644 | {#if titleTemplateError} |
644 | 645 | <p class="text-xs mt-1" style="color: var(--ds-status-error);">{titleTemplateError}</p> |
|
770 | 771 | <label for="virtual-field-name" class="block text-sm font-medium mb-2" style="color: var(--ds-text);"> |
771 | 772 | {t('requestTypeFields.fieldName')} |
772 | 773 | </label> |
773 | | - <input |
| 774 | + <Input |
774 | 775 | id="virtual-field-name" |
775 | 776 | type="text" |
776 | 777 | bind:value={virtualFieldName} |
777 | 778 | placeholder={t('requestTypeFields.fieldNamePlaceholder')} |
778 | | - class="w-full px-3 py-2 rounded border focus:outline-none focus:ring-2 text-sm" |
779 | | - style="background-color: var(--ds-background-input); color: var(--ds-text); border-color: var(--ds-border); --tw-ring-color: var(--ds-interactive);" |
| 779 | + size="small" |
780 | 780 | /> |
781 | 781 | </div> |
782 | 782 |
|
|
811 | 811 | <div class="space-y-2" role="group" aria-labelledby="virtual-field-options-label"> |
812 | 812 | {#each virtualFieldOptions as option, i} |
813 | 813 | <div class="flex gap-2"> |
814 | | - <input |
| 814 | + <Input |
815 | 815 | type="text" |
816 | 816 | bind:value={option.value} |
817 | 817 | placeholder={t('requestTypeFields.value')} |
818 | | - class="flex-1 px-2 py-1.5 rounded border focus:outline-none focus:ring-2 text-sm" |
819 | | - style="background-color: var(--ds-background-input); color: var(--ds-text); border-color: var(--ds-border); --tw-ring-color: var(--ds-interactive);" |
| 818 | + size="small" |
| 819 | + class="flex-1" |
820 | 820 | /> |
821 | | - <input |
| 821 | + <Input |
822 | 822 | type="text" |
823 | 823 | bind:value={option.label} |
824 | 824 | placeholder={t('requestTypeFields.label')} |
825 | | - class="flex-1 px-2 py-1.5 rounded border focus:outline-none focus:ring-2 text-sm" |
826 | | - style="background-color: var(--ds-background-input); color: var(--ds-text); border-color: var(--ds-border); --tw-ring-color: var(--ds-interactive);" |
| 825 | + size="small" |
| 826 | + class="flex-1" |
827 | 827 | /> |
828 | 828 | <button |
829 | 829 | onclick={() => removeVirtualFieldOption(i)} |
|
894 | 894 | <div class="p-2 border-b" style="border-color: var(--ds-border);"> |
895 | 895 | <div class="relative"> |
896 | 896 | <Search class="w-4 h-4 absolute left-2 top-1/2 -translate-y-1/2" style="color: var(--ds-text-subtle);" /> |
897 | | - <input |
898 | | - bind:this={addFieldSearchEl} |
| 897 | + <Input |
| 898 | + bind:inputRef={addFieldSearchEl} |
899 | 899 | type="text" |
900 | 900 | bind:value={addFieldQuery} |
901 | 901 | placeholder={t('requestTypeFields.searchFields')} |
902 | | - class="w-full pl-8 pr-2 py-1.5 rounded border text-sm focus:outline-none focus:ring-2" |
903 | | - style="background-color: var(--ds-background-input); color: var(--ds-text); border-color: var(--ds-border); --tw-ring-color: var(--ds-interactive);" |
| 902 | + size="small" |
| 903 | + class="pl-8" |
904 | 904 | /> |
905 | 905 | </div> |
906 | 906 | </div> |
|
945 | 945 | <label for="edit-field-display-name" class="block text-sm font-medium mb-2" style="color: var(--ds-text);"> |
946 | 946 | {t('requestTypeFields.displayName')} |
947 | 947 | </label> |
948 | | - <input |
| 948 | + <Input |
949 | 949 | id="edit-field-display-name" |
950 | 950 | type="text" |
951 | 951 | bind:value={editDisplayName} |
952 | 952 | placeholder={editingField.field_name || editingField.field_identifier} |
953 | | - class="w-full px-3 py-2 rounded border focus:outline-none focus:ring-2" |
954 | | - style="background-color: var(--ds-background-input); color: var(--ds-text); border-color: var(--ds-border); --tw-ring-color: var(--ds-interactive);" |
| 953 | + size="small" |
955 | 954 | /> |
956 | 955 | <DescriptionText> |
957 | 956 | {t('requestTypeFields.overrideLabel')} |
|
962 | 961 | <label for="edit-field-description" class="block text-sm font-medium mb-2" style="color: var(--ds-text);"> |
963 | 962 | {t('requestTypeFields.descriptionHelpText')} |
964 | 963 | </label> |
965 | | - <textarea |
| 964 | + <Textarea |
966 | 965 | id="edit-field-description" |
967 | 966 | bind:value={editDescription} |
968 | 967 | placeholder={t('requestTypeFields.helpTextPlaceholder')} |
969 | | - rows="3" |
970 | | - class="w-full px-3 py-2 rounded border focus:outline-none focus:ring-2" |
971 | | - style="background-color: var(--ds-background-input); color: var(--ds-text); border-color: var(--ds-border); --tw-ring-color: var(--ds-interactive);" |
972 | | - ></textarea> |
| 968 | + rows={3} |
| 969 | + size="small" |
| 970 | + /> |
973 | 971 | </div> |
974 | 972 |
|
975 | 973 | <div class="flex gap-2 pt-2"> |
|
0 commit comments