mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-23 12:49:24 +00:00

# Description of Changes - Added the OCR tool - Added language mappings file to map selected browser language -> OCR language and OCR language codes -> english display values. TODO: Use the translation function to translate the languages rather than mapping them to english be default - Added chevron icons to tool step to show expand and collapsed state more visibly - Added a re-usable dropdown picker with a footer component --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details. --------- Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
126 lines
2.8 KiB
CSS
126 lines
2.8 KiB
CSS
/* Language Picker Component */
|
|
.languagePicker {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center; /* Center align items vertically */
|
|
height: 32px;
|
|
border: 1px solid var(--border-default);
|
|
background-color: var(--mantine-color-white); /* Use Mantine color variable */
|
|
color: var(--text-secondary);
|
|
border-radius: var(--radius-sm);
|
|
padding: 4px 8px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
/* Dark mode background */
|
|
[data-mantine-color-scheme="dark"] .languagePicker {
|
|
background-color: var(--mantine-color-dark-6); /* Use Mantine dark color instead of hardcoded */
|
|
}
|
|
|
|
.languagePicker:hover {
|
|
border-color: var(--border-strong);
|
|
background-color: var(--mantine-color-gray-0); /* Light gray on hover for light mode */
|
|
}
|
|
|
|
/* Dark mode hover */
|
|
[data-mantine-color-scheme="dark"] .languagePicker:hover {
|
|
background-color: var(--mantine-color-dark-5); /* Use Mantine color variable */
|
|
}
|
|
|
|
.languagePicker:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.languagePickerIcon {
|
|
font-size: 16px;
|
|
color: var(--text-muted);
|
|
margin-left: auto;
|
|
display: flex;
|
|
align-items: center; /* Center the icon vertically */
|
|
}
|
|
|
|
.languagePickerDropdown {
|
|
background-color: var(--mantine-color-white); /* Use Mantine color variable */
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-sm);
|
|
padding: 4px;
|
|
}
|
|
|
|
/* Dark mode dropdown background */
|
|
[data-mantine-color-scheme="dark"] .languagePickerDropdown {
|
|
background-color: var(--mantine-color-dark-6);
|
|
}
|
|
|
|
.languagePickerOption {
|
|
padding: 6px 10px;
|
|
cursor: pointer;
|
|
border-radius: var(--radius-xs);
|
|
font-size: 13px;
|
|
color: var(--text-primary);
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.languagePickerOptionWithCheckbox {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.languagePickerCheckbox {
|
|
margin-left: auto;
|
|
}
|
|
|
|
.languagePickerOption:hover {
|
|
background-color: var(--mantine-color-gray-0); /* Light gray on hover for light mode */
|
|
}
|
|
|
|
/* Dark mode option hover */
|
|
[data-mantine-color-scheme="dark"] .languagePickerOption:hover {
|
|
background-color: var(--mantine-color-dark-5);
|
|
}
|
|
|
|
|
|
|
|
/* Additional helper classes for the component */
|
|
.languagePickerTarget {
|
|
width: 100%;
|
|
}
|
|
|
|
.languagePickerContent {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
}
|
|
|
|
.languagePickerText {
|
|
flex: 1;
|
|
text-align: left;
|
|
}
|
|
|
|
.languagePickerScrollArea {
|
|
max-height: 180px;
|
|
border-bottom: 1px solid var(--border-default);
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.languagePickerFooter {
|
|
padding: 8px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.languagePickerLink {
|
|
color: var(--mantine-color-blue-6);
|
|
text-decoration: underline;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Dark mode link */
|
|
[data-mantine-color-scheme="dark"] .languagePickerLink {
|
|
color: var(--mantine-color-blue-4);
|
|
} |