Skip to content

Commit

Permalink
add field config new icons (#6996)
Browse files Browse the repository at this point in the history
  • Loading branch information
anamarn authored Sep 13, 2024
1 parent 7fd86a8 commit cf8b116
Show file tree
Hide file tree
Showing 45 changed files with 703 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import {
IconCalendarEvent,
IconCalendarTime,
IconCheck,
IconCoins,
IconComponent,
IconCreativeCommonsSa,
IconFilePencil,
IconJson,
IconKey,
IconLink,
IconMail,
IconMap,
IconNumbers,
IconPhone,
IconRelationManyToMany,
IconTag,
IconTags,
IconTextSize,
IconTwentyStar,
IconUser,
IllustrationIconCalendarEvent,
IllustrationIconCalendarTime,
IllustrationIconCurrency,
IllustrationIconJson,
IllustrationIconLink,
IllustrationIconMail,
IllustrationIconMap,
IllustrationIconNumbers,
IllustrationIconOneToMany,
IllustrationIconPhone,
IllustrationIconSetting,
IllustrationIconStar,
IllustrationIconTag,
IllustrationIconTags,
IllustrationIconText,
IllustrationIconToggle,
IllustrationIconUid,
IllustrationIconUser,
} from 'twenty-ui';

import { CurrencyCode } from '@/object-record/record-field/types/CurrencyCode';
Expand All @@ -39,100 +38,100 @@ export type SettingsFieldTypeConfig = {
export const SETTINGS_FIELD_TYPE_CONFIGS = {
[FieldMetadataType.Uuid]: {
label: 'Unique ID',
Icon: IconKey,
Icon: IllustrationIconUid,
exampleValue: '00000000-0000-0000-0000-000000000000',
category: 'Advanced',
},
[FieldMetadataType.Text]: {
label: 'Text',
Icon: IconTextSize,
Icon: IllustrationIconText,
exampleValue:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum magna enim, dapibus non enim in, lacinia faucibus nunc. Sed interdum ante sed felis facilisis, eget ultricies neque molestie. Mauris auctor, justo eu volutpat cursus, libero erat tempus nulla, non sodales lorem lacus a est.',
category: 'Basic',
},
[FieldMetadataType.Numeric]: {
label: 'Numeric',
Icon: IconNumbers,
Icon: IllustrationIconNumbers,
exampleValue: 2000,
category: 'Basic',
},
[FieldMetadataType.Number]: {
label: 'Number',
Icon: IconNumbers,
Icon: IllustrationIconNumbers,
exampleValue: 2000,
category: 'Basic',
},
[FieldMetadataType.Link]: {
label: 'Link',
Icon: IconLink,
Icon: IllustrationIconLink,
exampleValue: { url: 'www.twenty.com', label: '' },
category: 'Basic',
},
[FieldMetadataType.Links]: {
label: 'Links',
Icon: IconLink,
Icon: IllustrationIconLink,
exampleValue: { primaryLinkUrl: 'twenty.com', primaryLinkLabel: '' },
category: 'Basic',
},
[FieldMetadataType.Boolean]: {
label: 'True/False',
Icon: IconCheck,
Icon: IllustrationIconToggle,
exampleValue: true,
category: 'Basic',
},
[FieldMetadataType.DateTime]: {
label: 'Date and Time',
Icon: IconCalendarTime,
Icon: IllustrationIconCalendarTime,
exampleValue: DEFAULT_DATE_VALUE.toISOString(),
category: 'Basic',
},
[FieldMetadataType.Date]: {
label: 'Date',
Icon: IconCalendarEvent,
Icon: IllustrationIconCalendarEvent,
exampleValue: DEFAULT_DATE_VALUE.toISOString(),
category: 'Basic',
},
[FieldMetadataType.Select]: {
label: 'Select',
Icon: IconTag,
Icon: IllustrationIconTag,
category: 'Basic',
},
[FieldMetadataType.MultiSelect]: {
label: 'Multi-select',
Icon: IconTags,
Icon: IllustrationIconTags,
category: 'Basic',
},
[FieldMetadataType.Currency]: {
label: 'Currency',
Icon: IconCoins,
Icon: IllustrationIconCurrency,
exampleValue: { amountMicros: 2000000000, currencyCode: CurrencyCode.USD },
category: 'Basic',
},
[FieldMetadataType.Relation]: {
label: 'Relation',
Icon: IconRelationManyToMany,
Icon: IllustrationIconOneToMany,
category: 'Relation',
},
[FieldMetadataType.Email]: {
label: 'Email',
Icon: IconMail,
Icon: IllustrationIconMail,
category: 'Basic',
},
[FieldMetadataType.Emails]: {
label: 'Emails',
Icon: IconMail,
Icon: IllustrationIconMail,
exampleValue: { primaryEmail: '[email protected]' },
category: 'Basic',
},
[FieldMetadataType.Phone]: {
label: 'Phone',
Icon: IconPhone,
Icon: IllustrationIconPhone,
exampleValue: '+1234-567-890',
category: 'Basic',
},
[FieldMetadataType.Phones]: {
label: 'Phones',
Icon: IconPhone,
Icon: IllustrationIconPhone,
exampleValue: {
primaryPhoneNumber: '234-567-890',
primaryPhoneCountryCode: '+1',
Expand All @@ -141,19 +140,19 @@ export const SETTINGS_FIELD_TYPE_CONFIGS = {
},
[FieldMetadataType.Rating]: {
label: 'Rating',
Icon: IconTwentyStar,
Icon: IllustrationIconStar,
exampleValue: '3',
category: 'Basic',
},
[FieldMetadataType.FullName]: {
label: 'Full Name',
Icon: IconUser,
Icon: IllustrationIconUser,
exampleValue: { firstName: 'John', lastName: 'Doe' },
category: 'Advanced',
},
[FieldMetadataType.Address]: {
label: 'Address',
Icon: IconMap,
Icon: IllustrationIconMap,
exampleValue: {
addressStreet1: '456 Oak Street',
addressStreet2: 'Unit 3B',
Expand All @@ -168,20 +167,20 @@ export const SETTINGS_FIELD_TYPE_CONFIGS = {
},
[FieldMetadataType.RawJson]: {
label: 'JSON',
Icon: IconJson,
Icon: IllustrationIconJson,
exampleValue: { key: 'value' },

category: 'Basic',
},
[FieldMetadataType.RichText]: {
label: 'Rich Text',
Icon: IconFilePencil,
Icon: IllustrationIconSetting,
exampleValue: { key: 'value' },
category: 'Basic',
},
[FieldMetadataType.Actor]: {
label: 'Actor',
Icon: IconCreativeCommonsSa,
Icon: IllustrationIconSetting,
category: 'Basic',
},
} as const satisfies Record<
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions packages/twenty-ui/src/display/icon/assets/illustration-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions packages/twenty-ui/src/display/icon/assets/illustration-mail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions packages/twenty-ui/src/display/icon/assets/illustration-map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit cf8b116

Please sign in to comment.