code-craft-studio
Version:
A comprehensive QR code and barcode scanning/generation library for React. Works with or without Capacitor. Supports 22+ QR data types and 14+ barcode formats (EAN, UPC, Code 128, etc.), with customizable designs, analytics, and React components. Provider
188 lines • 12.4 kB
JavaScript
import { QRType } from '../definitions';
export const qrFormFields = {
[]: [
{ label: 'URL', name: 'url', type: 'url', placeholder: 'https://example.com', required: true },
{ label: 'Title', name: 'title', type: 'text', placeholder: 'Optional page title' },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'Optional description' },
],
[]: [
{ label: 'PDF URL', name: 'url', type: 'url', placeholder: 'https://example.com/document.pdf', required: true },
{ label: 'Title', name: 'title', type: 'text', placeholder: 'Document title' },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'Document description' },
],
[]: [
{ label: 'Images', name: 'images', type: 'array', required: true },
{ label: 'Gallery Title', name: 'title', type: 'text', placeholder: 'My Image Gallery' },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'Gallery description' },
],
[]: [
{ label: 'Video URL', name: 'url', type: 'url', placeholder: 'https://youtube.com/watch?v=...', required: true },
{ label: 'Title', name: 'title', type: 'text', placeholder: 'Video title' },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'Video description' },
{ label: 'Thumbnail URL', name: 'thumbnail', type: 'url', placeholder: 'https://example.com/thumb.jpg' },
],
[]: [
{ label: 'Network Name (SSID)', name: 'ssid', type: 'text', placeholder: 'MyNetwork', required: true },
{
label: 'Security Type',
name: 'security',
type: 'select',
required: true,
options: [
{ value: 'WPA2', label: 'WPA2 (Recommended)' },
{ value: 'WPA3', label: 'WPA3' },
{ value: 'WPA', label: 'WPA' },
{ value: 'WEP', label: 'WEP' },
{ value: 'nopass', label: 'No Password' },
]
},
{ label: 'Password', name: 'password', type: 'password', placeholder: 'Network password' },
{ label: 'Hidden Network', name: 'hidden', type: 'checkbox' },
],
[]: [
{ label: 'Restaurant Name', name: 'restaurantName', type: 'text', required: true },
{ label: 'Categories', name: 'categories', type: 'array', required: true },
{
label: 'Currency',
name: 'currency',
type: 'select',
options: [
{ value: 'USD', label: '$ USD' },
{ value: 'EUR', label: '€ EUR' },
{ value: 'GBP', label: '£ GBP' },
{ value: 'JPY', label: '¥ JPY' },
{ value: 'CNY', label: '¥ CNY' },
]
},
],
[]: [
{ label: 'Business Name', name: 'name', type: 'text', required: true },
{ label: 'Industry', name: 'industry', type: 'text', placeholder: 'e.g., Restaurant, Retail, Services' },
{ label: 'Phone', name: 'phone', type: 'tel', placeholder: '+1234567890' },
{ label: 'Email', name: 'email', type: 'email', placeholder: 'contact@business.com' },
{ label: 'Website', name: 'website', type: 'url', placeholder: 'https://business.com' },
{ label: 'Address', name: 'address', type: 'textarea', placeholder: 'Full business address' },
{ label: 'Business Hours', name: 'hours', type: 'textarea', placeholder: 'Mon-Fri: 9AM-5PM' },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'About your business' },
{ label: 'Logo URL', name: 'logo', type: 'url', placeholder: 'https://example.com/logo.png' },
],
[]: [
{ label: 'First Name', name: 'firstName', type: 'text' },
{ label: 'Last Name', name: 'lastName', type: 'text' },
{ label: 'Organization', name: 'organization', type: 'text' },
{ label: 'Job Title', name: 'title', type: 'text' },
{ label: 'Phone', name: 'phone', type: 'tel', placeholder: '+1234567890' },
{ label: 'Mobile', name: 'mobile', type: 'tel', placeholder: '+1234567890' },
{ label: 'Email', name: 'email', type: 'email', placeholder: 'email@example.com' },
{ label: 'Website', name: 'website', type: 'url', placeholder: 'https://example.com' },
{ label: 'Address', name: 'address', type: 'textarea' },
{ label: 'Note', name: 'note', type: 'textarea' },
],
[]: [
{ label: 'Audio URL', name: 'url', type: 'url', placeholder: 'https://example.com/audio.mp3', required: true },
{ label: 'Title', name: 'title', type: 'text', placeholder: 'Song title' },
{ label: 'Artist', name: 'artist', type: 'text', placeholder: 'Artist name' },
{ label: 'Album', name: 'album', type: 'text', placeholder: 'Album name' },
{ label: 'Cover Art URL', name: 'coverArt', type: 'url', placeholder: 'https://example.com/cover.jpg' },
],
[]: [
{ label: 'App Store URL', name: 'appStoreUrl', type: 'url', placeholder: 'https://apps.apple.com/...' },
{ label: 'Play Store URL', name: 'playStoreUrl', type: 'url', placeholder: 'https://play.google.com/...' },
{ label: 'Windows Store URL', name: 'windowsStoreUrl', type: 'url', placeholder: 'https://microsoft.com/...' },
{ label: 'Custom URL', name: 'customUrl', type: 'url', placeholder: 'https://example.com/app' },
{ label: 'App Name', name: 'appName', type: 'text', placeholder: 'My Amazing App' },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'App description' },
{ label: 'Icon URL', name: 'icon', type: 'url', placeholder: 'https://example.com/icon.png' },
],
[]: [
{ label: 'List Title', name: 'title', type: 'text', placeholder: 'My Important Links' },
{ label: 'Links', name: 'links', type: 'array', required: true },
],
[]: [
{ label: 'Coupon Code', name: 'code', type: 'text', placeholder: 'SAVE20', required: true },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'Get 20% off your purchase' },
{ label: 'Discount', name: 'discount', type: 'text', placeholder: '20% OFF' },
{ label: 'Valid Until', name: 'validUntil', type: 'date' },
{ label: 'Terms & Conditions', name: 'terms', type: 'textarea', placeholder: 'Coupon terms' },
{ label: 'Logo URL', name: 'logo', type: 'url', placeholder: 'https://example.com/logo.png' },
],
[]: [
{ label: 'Facebook Page URL', name: 'pageUrl', type: 'url', placeholder: 'https://facebook.com/yourpage', required: true },
{ label: 'Page Name', name: 'pageName', type: 'text', placeholder: 'Your Page Name' },
],
[]: [
{ label: 'Instagram Profile URL', name: 'profileUrl', type: 'url', placeholder: 'https://instagram.com/username', required: true },
{ label: 'Username', name: 'username', type: 'text', placeholder: '@username' },
],
[]: [
{ label: 'Facebook', name: 'facebook', type: 'url', placeholder: 'https://facebook.com/...' },
{ label: 'Instagram', name: 'instagram', type: 'url', placeholder: 'https://instagram.com/...' },
{ label: 'Twitter/X', name: 'twitter', type: 'url', placeholder: 'https://twitter.com/...' },
{ label: 'LinkedIn', name: 'linkedin', type: 'url', placeholder: 'https://linkedin.com/...' },
{ label: 'YouTube', name: 'youtube', type: 'url', placeholder: 'https://youtube.com/...' },
{ label: 'TikTok', name: 'tiktok', type: 'url', placeholder: 'https://tiktok.com/...' },
{ label: 'Pinterest', name: 'pinterest', type: 'url', placeholder: 'https://pinterest.com/...' },
{ label: 'Snapchat', name: 'snapchat', type: 'url', placeholder: 'https://snapchat.com/...' },
{ label: 'Reddit', name: 'reddit', type: 'url', placeholder: 'https://reddit.com/...' },
],
[]: [
{ label: 'Phone Number', name: 'phoneNumber', type: 'tel', placeholder: '+1234567890', required: true, helper: 'Include country code' },
{ label: 'Pre-filled Message', name: 'message', type: 'textarea', placeholder: 'Hello! I found your contact through QR code...' },
],
[]: [
{ label: 'Text Content', name: 'text', type: 'textarea', placeholder: 'Enter your text here...', required: true, maxLength: 2000 },
],
[]: [
{ label: 'To Email', name: 'to', type: 'email', placeholder: 'recipient@example.com', required: true },
{ label: 'Subject', name: 'subject', type: 'text', placeholder: 'Email subject' },
{ label: 'Message', name: 'body', type: 'textarea', placeholder: 'Email message' },
{ label: 'CC', name: 'cc', type: 'email', placeholder: 'cc@example.com' },
{ label: 'BCC', name: 'bcc', type: 'email', placeholder: 'bcc@example.com' },
],
[]: [
{ label: 'Phone Number', name: 'phoneNumber', type: 'tel', placeholder: '+1234567890', required: true },
{ label: 'Message', name: 'message', type: 'textarea', placeholder: 'SMS message text' },
],
[]: [
{ label: 'Phone Number', name: 'phoneNumber', type: 'tel', placeholder: '+1234567890', required: true },
],
[]: [
{ label: 'Latitude', name: 'latitude', type: 'number', placeholder: '37.7749', required: true, min: '-90', max: '90' },
{ label: 'Longitude', name: 'longitude', type: 'number', placeholder: '-122.4194', required: true, min: '-180', max: '180' },
{ label: 'Location Name', name: 'name', type: 'text', placeholder: 'Golden Gate Bridge' },
{ label: 'Address', name: 'address', type: 'text', placeholder: 'Full address' },
],
[]: [
{ label: 'Event Title', name: 'title', type: 'text', placeholder: 'Annual Conference', required: true },
{ label: 'Location', name: 'location', type: 'text', placeholder: 'Conference Center, New York' },
{ label: 'Start Date & Time', name: 'startDate', type: 'datetime-local', required: true },
{ label: 'End Date & Time', name: 'endDate', type: 'datetime-local' },
{ label: 'Description', name: 'description', type: 'textarea', placeholder: 'Event details' },
{ label: 'Event URL', name: 'url', type: 'url', placeholder: 'https://example.com/event' },
],
};
export const qrTypeInfo = {
[]: { icon: '🌐', description: 'Link to any website URL' },
[]: { icon: '📄', description: 'Share a PDF document' },
[]: { icon: '🖼️', description: 'Share multiple images' },
[]: { icon: '🎥', description: 'Share a video' },
[]: { icon: '📶', description: 'Connect to a Wi-Fi network' },
[]: { icon: '🍽️', description: 'Create a restaurant menu' },
[]: { icon: '🏢', description: 'Share business information' },
[]: { icon: '👤', description: 'Share a digital business card' },
[]: { icon: '🎵', description: 'Share an audio file' },
[]: { icon: '📱', description: 'Redirect to app stores' },
[]: { icon: '🔗', description: 'Share multiple links' },
[]: { icon: '🎟️', description: 'Share a coupon or discount' },
[]: { icon: '👍', description: 'Share your Facebook page' },
[]: { icon: '📷', description: 'Share your Instagram profile' },
[]: { icon: '👥', description: 'Share all social channels' },
[]: { icon: '💬', description: 'Start a WhatsApp chat' },
[]: { icon: '📝', description: 'Share plain text' },
[]: { icon: '✉️', description: 'Send an email' },
[]: { icon: '💭', description: 'Send an SMS' },
[]: { icon: '📞', description: 'Make a phone call' },
[]: { icon: '📍', description: 'Share a location' },
[]: { icon: '📅', description: 'Share an event' },
};
//# sourceMappingURL=qr-forms.js.map