-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update contributing * fix: Fix button group immutability (#1) * Fix errors * fix copywith function * [automated commit] lint format and import sort --------- Co-authored-by: Osman <[email protected]> Co-authored-by: github-actions <[email protected]> * [automated commit] lint format and import sort * update on-main to push to firebase (#3) * ci: move firebase to flutter main host for qa (#4) * feat: Add List Item (#5) * feat: Add List Item * [automated commit] lint format and import sort --------- Co-authored-by: Simeon Dimitrov <[email protected]> Co-authored-by: github-actions <[email protected]> * fix(main): ListItem disabled color (#8) * fix(main): ListItem disabled color * [automated commit] lint format and import sort --------- Co-authored-by: github-actions <[email protected]> * feat : Dropdown menu (#7) * Create dropdown * Add sizes * create stoyrybook and add size * Fix errrs and respond to comments * Fix issues * [automated commit] lint format and import sort * Alter isLarge * Fix spacing * [automated commit] lint format and import sort * Alter leading styles * [automated commit] lint format and import sort --------- Co-authored-by: Osman <[email protected]> Co-authored-by: github-actions <[email protected]> * Component ZetaSwitch (#6) * create ZetaSwitch * ZetaSwitch using MaterialSwitch * widgetbook for ZetaSwitch * remove hover; fix initState * add showHover parameter * add comments 'Zeta change' in material_switch.dart * remove size parameter and factory constructors * fix example and widgetbook * Component Zeta Radio Button (#9) * create component Zeta Radio Button * remove hover color * fix label line height * feat(main): SnackBar (#10) * add snackbar example * Add snackbar widgetbook * feat(main): SnackBar * [automated commit] lint format and import sort * remove view icon * Add view icon * Add widgetbook icon helper * [automated commit] lint format and import sort * fix alphabetical imports * Fix delete and error background color --------- Co-authored-by: github-actions <[email protected]> * feat(main): Tabs (#11) * feat(main): Tabs * [automated commit] lint format and import sort --------- Co-authored-by: github-actions <[email protected]> * chore: Update text styles (#13) * fix: switch on web (#14) * Component date input (#12) * create ZetaDateInput * create different ZetaDateInput variants * fix show error style * date validation and input mask; documentation for ZetaDateInput properties * create widgetbook * changes according to comments * Component date input (#16) * create ZetaDateInput * create different ZetaDateInput variants * fix show error style * date validation and input mask; documentation for ZetaDateInput properties * create widgetbook * changes according to comments * fix Typography of Date Input * restore * remove text line height * feat(main): Stepper (#17) * feat(main): Stepper * Add optional content, remove listview and fix inkwell * [automated commit] lint format and import sort --------- Co-authored-by: github-actions <[email protected]> --------- Co-authored-by: ahmed-osman3 <[email protected]> Co-authored-by: Osman <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Simeon Dimitrov <[email protected]> Co-authored-by: sd-athlon <[email protected]> Co-authored-by: atanasyordanov21 <[email protected]>
- Loading branch information
1 parent
819c5fc
commit 0e6394b
Showing
58 changed files
with
4,884 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
{ | ||
"projects": { | ||
"default": "zeta-ds" | ||
}, | ||
"targets": { | ||
"zeta-ds": { | ||
"hosting": { | ||
"flutter": [ | ||
"zeta-flutter-main" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Getting Involved | ||
|
||
Thank you for your interest in this project. We'd love to see your contributions. There are just few small guidelines you need to follow. | ||
Please note we have a code of conduct, please follow it in all your interactions with the project. | ||
|
||
## Opening an issue | ||
|
||
If you've noticed a bug or you have a suggestion for a new feature, please go ahead and open an issue in this project. Please do include as much information as possible. | ||
|
||
Please file issues before doing substantial work; this will ensure that others don't duplicate the work and that there's a chance to discuss any design issues. | ||
|
||
## Making a code change | ||
|
||
We're always open to pull requests, but these should be small and clearly described so that we can understand what you're trying to do. | ||
|
||
When you're ready to start coding, fork the needed repository to your own GitHub account and make your changes in a new branch. Once you're happy, open a pull request and explain what the change is and why you think we should include it in our project. | ||
|
||
If the change is a bug fix, try to create a test that aligns with the bug. | ||
|
||
### Creating a new component | ||
|
||
We want the designs to be the source of truth for this repository, so new components will only be accepted if they are with the design files. | ||
|
||
New components should use all tokens matching the design, and should not use hardcoded values for color, spacing, or radius. This ensures that changes made to these fundamental tokens are reflected throughout the library. | ||
|
||
All components should have inline [dartdoc](https://dart.dev/tools/dart-doc) documentation on public functions and variables. This is enforced by the lint rules. | ||
|
||
To demonstrate a component, we need to create 2 examples: firstly in the zeta_flutter example app and secondly in widgetbook. | ||
|
||
Example app should show basic examples to compare against the designs and is typically used by developers whilst building out components. | ||
|
||
The widgetbook is used by the wider team to review components. We should attempt to show the full functionality of a component in a single Widgetbook instance. We have some helper functions for building knobs for icons and rounded bool in [utils.dart](./example/widgetbook/utils/utils.dart). | ||
For more information on widgetbook, [read the docs](https://docs.widgetbook.io/). | ||
|
||
We should also create a test for each widget created. | ||
|
||
## Code reviews | ||
|
||
All submissions, including submissions by project members, require review. We use GitHub pull requests (PRs) for this purpose. Consult [GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) for more information on using pull requests. | ||
|
||
Before a PR can be reviewed, ensure you have done the following, and fixed any issues that may arise: | ||
|
||
- Ensure branch is up to date `git rebase main` | ||
- Check formatting: `flutter format .` | ||
- Run static analyses: `flutter analyze` | ||
- Run unit-tests: `flutter test` | ||
|
||
All PRs should be titled according to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), as the branch will be squashed, so the PR title will become the commit message. | ||
Examples: | ||
|
||
- `feat(X):` for new features | ||
- `fix(x):` for bug fixes | ||
- `chore(x):` for admin / chores. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:zeta_example/widgets.dart'; | ||
import 'package:zeta_flutter/zeta_flutter.dart'; | ||
|
||
class DateInputExample extends StatefulWidget { | ||
static const String name = 'DateInput'; | ||
|
||
const DateInputExample({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<DateInputExample> createState() => _DateInputExampleState(); | ||
} | ||
|
||
class _DateInputExampleState extends State<DateInputExample> { | ||
String? _errorText; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ExampleScaffold( | ||
name: 'Date Input', | ||
child: SingleChildScrollView( | ||
child: Column( | ||
children: [ | ||
Padding( | ||
padding: const EdgeInsets.only(top: 20), | ||
child: Text('Rounded', style: ZetaTextStyles.titleMedium), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(20), | ||
child: ZetaDateInput( | ||
label: 'Birthdate', | ||
hint: 'Enter birthdate', | ||
hasError: _errorText != null, | ||
errorText: _errorText ?? 'Invalid date', | ||
onChanged: (value) { | ||
if (value == null) return setState(() => _errorText = null); | ||
final now = DateTime.now(); | ||
setState( | ||
() => _errorText = value.difference(DateTime(now.year, now.month, now.day)).inDays > 0 | ||
? 'Birthdate cannot be in the future' | ||
: null, | ||
); | ||
}, | ||
), | ||
), | ||
Divider(color: Colors.grey[200]), | ||
Padding( | ||
padding: const EdgeInsets.only(top: 20), | ||
child: Text('Sharp', style: ZetaTextStyles.titleMedium), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(20), | ||
child: ZetaDateInput( | ||
label: 'Label', | ||
hint: 'Default hint text', | ||
errorText: 'Oops! Error hint text', | ||
rounded: false, | ||
datePattern: 'yyyy-MM-dd', | ||
), | ||
), | ||
Divider(color: Colors.grey[200]), | ||
Padding( | ||
padding: const EdgeInsets.only(top: 20), | ||
child: Text('Disabled', style: ZetaTextStyles.titleMedium), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(20), | ||
child: ZetaDateInput( | ||
label: 'Label', | ||
hint: 'Default hint text', | ||
enabled: false, | ||
), | ||
), | ||
Divider(color: Colors.grey[200]), | ||
Padding( | ||
padding: const EdgeInsets.only(top: 20), | ||
child: Text('Medium', style: ZetaTextStyles.titleMedium), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(20), | ||
child: ZetaDateInput( | ||
label: 'Label', | ||
hint: 'Default hint text', | ||
errorText: 'Oops! Error hint text', | ||
size: ZetaDateInputSize.medium, | ||
), | ||
), | ||
Divider(color: Colors.grey[200]), | ||
Padding( | ||
padding: const EdgeInsets.only(top: 20), | ||
child: Text('Small', style: ZetaTextStyles.titleMedium), | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(20), | ||
child: ZetaDateInput( | ||
label: 'Label', | ||
hint: 'Default hint text', | ||
errorText: 'Oops! Error hint text', | ||
size: ZetaDateInputSize.small, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:zeta_example/widgets.dart'; | ||
import 'package:zeta_flutter/zeta_flutter.dart'; | ||
|
||
class DropdownExample extends StatefulWidget { | ||
static const String name = "Dropdown"; | ||
const DropdownExample({super.key}); | ||
|
||
@override | ||
State<DropdownExample> createState() => _DropdownExampleState(); | ||
} | ||
|
||
class _DropdownExampleState extends State<DropdownExample> { | ||
ZetaDropdownItem selectedItem = ZetaDropdownItem( | ||
value: "Item 1", | ||
leadingIcon: Icon(ZetaIcons.star_round), | ||
); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ExampleScaffold( | ||
name: "Dropdown", | ||
child: Center( | ||
child: SingleChildScrollView( | ||
child: SizedBox( | ||
width: 320, | ||
child: Column(children: [ | ||
ZetaDropdown( | ||
leadingType: LeadingStyle.checkbox, | ||
onChange: (value) { | ||
setState(() { | ||
selectedItem = value; | ||
}); | ||
}, | ||
selectedItem: selectedItem, | ||
items: [ | ||
ZetaDropdownItem( | ||
value: "Item 1", | ||
leadingIcon: Icon(ZetaIcons.star_round), | ||
), | ||
ZetaDropdownItem( | ||
value: "Item 2", | ||
leadingIcon: Icon(ZetaIcons.star_half_round), | ||
), | ||
ZetaDropdownItem( | ||
value: "Item 3", | ||
) | ||
], | ||
), | ||
Text('Selected item : ${selectedItem.value}') | ||
])), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.