Skip to content

Commit

Permalink
fix: Button update (#42)
Browse files Browse the repository at this point in the history
* Component dialog (#18)

* create showZetaDialog

* finished dialog for DeviceType.mobilePortrait

* dialog variant for bigger screens

* create widgetbook; add Zeta parameter, also in ZetaButton

* useRootNavigator: false

* feat(main): AppBar (#19)

* feat(main): AppBar

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* Component dialog (#22)

* 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

* create showZetaDialog

* finished dialog for DeviceType.mobilePortrait

* 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

* dialog variant for bigger screens

* create widgetbook; add Zeta parameter, also in ZetaButton

* useRootNavigator: false

* add iconKnob in Dialog widgetbook

* final iconData = iconKnob

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* Component phone input (#21)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* restore main.dart in example (#23)

* Component phone input (#24)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

* don't use root navigator in widgetbook

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* Component phone input (#25)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

* don't use root navigator in widgetbook

* pass parameter useRootNavigator

* restore some missing countries in the list

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* Navigation rail (#27)

* create NavigationRail

* restore main.dart in example

* navigation rail example

* create widgetbook

* add SafeArea; rename parameter wordWrap

* add MouseRegion & SelectionContainer.disabled

* Component tooltip (#31)

* create tooltip

* create Widgetbook for ZetaTooltip

* add LayoutBuilder

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* feat(main): Segmented control (#26)

* feat(main): AppBar

* Add segmented control

* [automated commit] lint format and import sort

* Fix mouse cursor, disable selection container and tap area

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* Component phone input (#28)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

* don't use root navigator in widgetbook

* pass parameter useRootNavigator

* restore some missing countries in the list

* countries search

* add searchHint

* fix comments

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* use ZetaWidgetSize from enums.dart (#32)

* Component tooltip (#33)

* create tooltip

* create Widgetbook for ZetaTooltip

* add LayoutBuilder

* [automated commit] lint format and import sort

* fix text overflow when there is horizontal arrow and maxWidth is null

---------

Co-authored-by: github-actions <[email protected]>

* Component search bar (#29)

* create ZetaSearchBar with examples

* create Widgetbook for ZetaSearchBar

* rename callback

* full instead of stadium shape

* default hint Search

* add parameters showLeadingIcon & showSpeechToText

* fix comments

* use ZetaWidgetBorder & ZetaWidgetSize from enums.dart

* Component phone input (#34)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

* don't use root navigator in widgetbook

* pass parameter useRootNavigator

* restore some missing countries in the list

* countries search

* add searchHint

* fix comments

* use ZetaSearchBar in CountriesDialog

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* Select input (#35)

* create ZetaSelectInput

* add extra parameters; improve

* leading icon; error handling in example

* _MenuPosition

* widgetbook

* restore all menu items on each open

* fix setState

* initialize _menuSize with Size.zero

* Select input (#35)

* create ZetaSelectInput

* add extra parameters; improve

* leading icon; error handling in example

* _MenuPosition

* widgetbook

* restore all menu items on each open

* fix setState

* initialize _menuSize with Size.zero

* Filter Selection (#36)

* Filter Selection

* use divide

* ZetaScreenHeaderBar (#39)

* feat : Avatar update (#30)

* 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]>

* Component dialog (#18)

* create showZetaDialog

* finished dialog for DeviceType.mobilePortrait

* dialog variant for bigger screens

* create widgetbook; add Zeta parameter, also in ZetaButton

* useRootNavigator: false

* feat(main): AppBar (#19)

* feat(main): AppBar

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* Component dialog (#22)

* 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

* create showZetaDialog

* finished dialog for DeviceType.mobilePortrait

* 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

* dialog variant for bigger screens

* create widgetbook; add Zeta parameter, also in ZetaButton

* useRootNavigator: false

* add iconKnob in Dialog widgetbook

* final iconData = iconKnob

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* Merge

* Component phone input (#21)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* restore main.dart in example (#23)

* Component phone input (#24)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

* don't use root navigator in widgetbook

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* Component phone input (#25)

* 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

* ZetaPhoneInput initial commit

* complete ZetaPhoneInput; add flags

* create phoneInputUseCase in Widgetbook

* refactor phone input to use native alert dialog

* don't use root navigator in widgetbook

* pass parameter useRootNavigator

* restore some missing countries in the list

---------

Co-authored-by: Luke <[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: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* Update avatar

* Update avatar

* [automated commit] lint format and import sort

* Navigation rail (#27)

* create NavigationRail

* restore main.dart in example

* navigation rail example

* create widgetbook

* add SafeArea; rename parameter wordWrap

* add MouseRegion & SelectionContainer.disabled

* Respond to comments

* Component tooltip (#31)

* create tooltip

* create Widgetbook for ZetaTooltip

* add LayoutBuilder

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* feat(main): Segmented control (#26)

* feat(main): AppBar

* Add segmented control

* [automated commit] lint format and import sort

* Fix mouse cursor, disable selection container and tap area

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* [automated commit] lint format and import sort

* Add pill notifications

* [automated commit] lint format and import sort

* Remove notification border

* Change sizes

---------

Co-authored-by: Luke <[email protected]>
Co-authored-by: Osman <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: atanasyordanov21 <[email protected]>
Co-authored-by: sd-athlon <[email protected]>

* feat(main): Contact List (#40)

* feat(main): Contact List

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* feat(main): Chat Item (#37)

* feat(main): Chat Item

* [automated commit] lint format and import sort

* remove hard coded avatar

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <[email protected]>

* Update button with icons

* Change icon positions

* Add sizes

---------

Co-authored-by: atanasyordanov21 <[email protected]>
Co-authored-by: Luke <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Osman <[email protected]>
Co-authored-by: Luke Walton <[email protected]>
Co-authored-by: Simeon Dimitrov <[email protected]>
Co-authored-by: sd-athlon <[email protected]>
  • Loading branch information
8 people committed May 9, 2024
1 parent 2da6aec commit b25a469
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 31 deletions.
47 changes: 27 additions & 20 deletions example/widgetbook/pages/components/button_widgetbook.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,34 @@ import 'package:zeta_flutter/zeta_flutter.dart';
import '../../test/test_components.dart';
import '../../utils/utils.dart';

Widget buttonUseCase(BuildContext context) => WidgetbookTestWidget(
widget: ZetaButton(
label: context.knobs.string(label: 'Text', initialValue: 'Button'),
onPressed: context.knobs.boolean(label: 'Disabled') ? null : () {},
borderType: context.knobs.list(
label: 'Border type',
labelBuilder: enumLabelBuilder,
options: ZetaWidgetBorder.values,
),
size: context.knobs.list(
label: 'Size',
options: ZetaWidgetSize.values,
labelBuilder: enumLabelBuilder,
),
type: context.knobs.list(
label: 'Type',
options: ZetaButtonType.values,
labelBuilder: enumLabelBuilder,
),
Widget buttonUseCase(BuildContext context) {
final borderType = context.knobs.list(
label: 'Border type',
labelBuilder: enumLabelBuilder,
options: ZetaWidgetBorder.values,
);
return WidgetbookTestWidget(
widget: ZetaButton(
label: context.knobs.string(label: 'Text', initialValue: 'Button'),
onPressed: context.knobs.boolean(label: 'Disabled') ? null : () {},
borderType: borderType,
size: context.knobs.list(
label: 'Size',
options: ZetaWidgetSize.values,
labelBuilder: enumLabelBuilder,
),
);
type: context.knobs.list(
label: 'Type',
options: ZetaButtonType.values,
labelBuilder: enumLabelBuilder,
),
leadingIcon:
iconKnob(context, rounded: borderType != ZetaWidgetBorder.sharp, nullable: true, name: "Leading Icon"),
trailingIcon:
iconKnob(context, rounded: borderType != ZetaWidgetBorder.sharp, nullable: true, name: "Trailing Icon"),
),
);
}

Widget iconButtonUseCase(BuildContext context) {
final borderType = context.knobs.list(
Expand Down
74 changes: 66 additions & 8 deletions lib/src/components/buttons/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
});

Expand All @@ -23,6 +25,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
}) : type = ZetaButtonType.primary;

Expand All @@ -33,6 +37,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
}) : type = ZetaButtonType.secondary;

Expand All @@ -43,6 +49,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
}) : type = ZetaButtonType.positive;

Expand All @@ -53,6 +61,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
}) : type = ZetaButtonType.negative;

Expand All @@ -63,6 +73,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
}) : type = ZetaButtonType.outline;

Expand All @@ -73,6 +85,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
}) : type = ZetaButtonType.outlineSubtle;

Expand All @@ -83,6 +97,8 @@ class ZetaButton extends StatelessWidget {
this.size = ZetaWidgetSize.medium,
this.borderType = ZetaWidgetBorder.rounded,
this.zeta,
this.leadingIcon,
this.trailingIcon,
super.key,
}) : type = ZetaButtonType.text;

Expand All @@ -106,13 +122,21 @@ class ZetaButton extends StatelessWidget {
/// like for example from [showZetaDialog]
final Zeta? zeta;

/// Leading icon of button. Goes infront of button.
final IconData? leadingIcon;

/// Trailing icon of button. Goes behind button.
final IconData? trailingIcon;

/// Creates a clone.
ZetaButton copyWith({
String? label,
VoidCallback? onPressed,
ZetaButtonType? type,
ZetaWidgetSize? size,
ZetaWidgetBorder? borderType,
IconData? leadingIcon,
IconData? trailingIcon,
Key? key,
}) {
return ZetaButton(
Expand All @@ -122,6 +146,8 @@ class ZetaButton extends StatelessWidget {
size: size ?? this.size,
borderType: borderType ?? this.borderType,
zeta: zeta,
leadingIcon: leadingIcon ?? this.leadingIcon,
trailingIcon: trailingIcon ?? this.trailingIcon,
key: key ?? this.key,
);
}
Expand All @@ -136,12 +162,32 @@ class ZetaButton extends StatelessWidget {
onPressed: onPressed,
style: buttonStyle(colors, borderType, type, null),
child: SelectionContainer.disabled(
child: label.isEmpty
? const SizedBox()
: Text(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (leadingIcon != null)
Icon(
leadingIcon,
size: _iconSize,
),
if (label.isNotEmpty)
Text(
label,
style: _textStyle,
).paddingHorizontal(_textPadding),
),
if (trailingIcon != null)
Icon(
trailingIcon,
size: _iconSize,
),
]
.divide(
const SizedBox(
width: ZetaSpacing.x2,
),
)
.toList(),
).paddingHorizontal(_textPadding),
),
),
);
Expand All @@ -165,13 +211,23 @@ class ZetaButton extends StatelessWidget {
double get _textPadding {
switch (size) {
case ZetaWidgetSize.large:
return ZetaSpacing.m;
return ZetaSpacing.x4;

case ZetaWidgetSize.medium:
return ZetaSpacing.x3_5;
return ZetaSpacing.x3;

case ZetaWidgetSize.small:
return ZetaSpacing.x2_5;
return ZetaSpacing.x1;
}
}

double get _iconSize {
switch (size) {
case ZetaWidgetSize.large:
case ZetaWidgetSize.medium:
return ZetaSpacing.x5;
case ZetaWidgetSize.small:
return ZetaSpacing.x4;
}
}

Expand All @@ -183,6 +239,8 @@ class ZetaButton extends StatelessWidget {
..add(ObjectFlagProperty<VoidCallback?>.has('onPressed', onPressed))
..add(EnumProperty<ZetaButtonType>('type', type))
..add(EnumProperty<ZetaWidgetBorder>('borderType', borderType))
..add(EnumProperty<ZetaWidgetSize>('size', size));
..add(EnumProperty<ZetaWidgetSize>('size', size))
..add(DiagnosticsProperty<IconData?>('leadingIcon', leadingIcon))
..add(DiagnosticsProperty<IconData?>('trailingIcon', trailingIcon));
}
}
4 changes: 1 addition & 3 deletions lib/src/theme/colors_base.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';

import 'color_swatch.dart';
import 'colors.dart';
import '../../zeta_flutter.dart';

/// Default set of Zeta Colors that can be used to make a [ZetaColors] instance.
///
Expand Down

0 comments on commit b25a469

Please sign in to comment.