Skip to content

Commit

Permalink
Merge pull request #53 from tarkalabs/rajiv/to-adhere-pub-dev-standards
Browse files Browse the repository at this point in the history
To adhere pub dev standards
  • Loading branch information
rajivmanivannan committed Feb 24, 2024
2 parents 914ee5f + 60c6a6e commit 49f76d8
Show file tree
Hide file tree
Showing 56 changed files with 551 additions and 584 deletions.
41 changes: 6 additions & 35 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,9 @@
## 1.1.2 - 2024-02-24

* Fixes: Adhere to pub.dev package standards and updated documentation.

## 1.1.1 - 2024-02-24

* Added components:
TUIAccordion
TUIAnchor
TUIAppTopBar
TUIAttachmentUpload
TUIAvatar
TUIBadge
TUIBreadCrumb
TUIButton
TUICheckBox
TUICheckBoxRow
TUIChip
TUIDivider
TUIDraggableCard
TUIEmailField
TUIEmailSubjectField
TUIFloatingActionButton
TUIIconButton
TUIInputField
TUIMediaThumbnail
TUIMenuItem
TUIMobileButtonBlock
TUIMobileOverlayHeader
TUIMobileOverlayFooter
TUINavigationRow
TUIRadioButton
TUIRangeSlider
TUISearchBar
TUISelectionCard
TUISlider
TUISnackBar
TUISuccessCheckMark
TUIToggleSwitch
TUITag
TUIToggleRow
* Initial release of the Tarka UI library with 33 components.


2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Expand Down
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and the Flutter guide for
-->

# Tarka UI Kit Flutter
Tarka UI Kit is a reusable component library for building Flutter apps, based on a design system using Atomic Design principles
Tarka UI Kit is a pre-built component library for building Flutter apps. It is based on our design system, utilizing Atomic Design principles.

# List of components
- TUIAccordion
Expand Down Expand Up @@ -50,17 +50,6 @@ Tarka UI Kit is a reusable component library for building Flutter apps, based on
- TUITag
- TUIToggleRow


## How to use this package in your project?

```
# Add this below package in the dependencies section of the pubspec.yaml file
tarka_ui:
git:
url: git@github.com:tarkalabs/tarka-ui-kit-flutter.git
ref: v1.1.0
```

## How to run the kitchen sink app?

### From Android Studio
Expand Down
14 changes: 1 addition & 13 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
# example

Tarka Kit Flutter example project
Tarka UI Kit Flutter example project

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
2 changes: 1 addition & 1 deletion example/lib/styles/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ class AppColors {
static const Color errorHover = Color(0xffDF2036);
static const Color warningHover = Color(0xffFFAD14);
static const Color disabledBackgroundHover = Color(0x331A1B1F);
}
}
1 change: 1 addition & 0 deletions example/lib/symbol.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum Symbol {
sync(FluentIcons.arrow_sync_circle_24_regular),
tabs(FluentIcons.tabs_24_regular),
hamburgerMenu(FluentIcons.line_horizontal_3_20_filled);

final IconData value;

const Symbol(this.value);
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.1.1+1"
term_glyph:
dependency: transitive
description:
Expand Down
16 changes: 8 additions & 8 deletions lib/components/accordion/accordion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import 'package:tarka_ui/styles/default_colors.dart';
import 'package:tarka_ui/styles/theme.dart';

/// TUIAccordion is a widget that allows you to show and hide content.
/*
Example:
```dart
TUIAccordion(
title: 'Accordion Title',
subtitle: 'Accordion Subtitle',
),```
*/
///
/// Example:
/// ```dart
/// TUIAccordion(
/// title: 'Accordion Title',
/// subtitle: 'Accordion Subtitle',
/// )
/// ```
class TUIAccordion extends StatefulWidget {
final String title;
final String subtitle;
Expand Down
21 changes: 10 additions & 11 deletions lib/components/anchor/anchor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ import 'package:flutter/material.dart';
import 'package:tarka_ui/styles/theme.dart';

/// TUIAnchor is a component that is used to create a clickable anchor.
/*
Example:
```dart
TUIAnchor(
title: 'Anchor',
onPressed: () {
print('Anchor pressed');
},
)
```
*/
///
/// Example:
/// ```dart
/// TUIAnchor(
/// title: 'Anchor',
/// onPressed: () {
/// print('Anchor pressed');
/// },
/// )
/// ```
class TUIAnchor extends StatefulWidget {
const TUIAnchor({
super.key,
Expand Down
29 changes: 15 additions & 14 deletions lib/components/app_bar/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ import 'package:flutter/material.dart';
import 'package:tarka_ui/styles/theme.dart';

/// TUIAppTopBar is a widget that allows you to create a top bar.
/*
Example:
```dart
TUIAppTopBar(
items: [
TUIAppBarItem(iconData: Icons.home, label: "Home", tooltip: "Home"),
TUIAppBarItem(iconData: Icons.search, label: "Search", tooltip: "Search"),
TUIAppBarItem(iconData: Icons.person, label: "Profile", tooltip: "Profile"),
],
onTap: (index) {
print("TUIAppTopBar: $index");
},
currentIndex: 0,
*/
///
/// Example:
/// ```dart
/// TUIAppTopBar(
/// items: [
/// TUIAppBarItem(iconData: Icons.home, label: "Home", tooltip: "Home"),
/// TUIAppBarItem(iconData: Icons.search, label: "Search", tooltip: "Search"),
/// TUIAppBarItem(iconData: Icons.person, label: "Profile", tooltip: "Profile"),
/// ],
/// onTap: (index) {
/// print("TUIAppTopBar: $index");
/// },
/// currentIndex: 0,
/// )
/// ```
class TUIAppTopBar extends StatefulWidget {
final List<TUIAppBarItem> items;
final List<BottomNavigationBarItem> _bnbItems;
Expand Down
32 changes: 16 additions & 16 deletions lib/components/attachment_upload/attachment_upload.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import 'package:tarka_ui/styles/theme.dart';
import 'package:tarka_ui/subcomponents/image.dart';

/// TUIAttachmentUpload widget to display an attachment upload with title, description and action buttons.
/*
Example:
```dart
TUIAttachmentUpload(
title: "Attachment 1",
isIconUsed: true,
icon: FluentIcons.attach_12_regular,
description: "Description of attachment 1",
downloadTapped: () {
print("Download tapped");
},
deleteTapped: () {
print("Delete tapped");
},
*/
///
/// Example:
/// ```dart
/// TUIAttachmentUpload(
/// title: "Attachment 1",
/// isIconUsed: true,
/// icon: FluentIcons.attach_12_regular,
/// description: "Description of attachment 1",
/// downloadTapped: () {
/// print("Download tapped");
/// },
/// deleteTapped: () {
/// print("Delete tapped");
/// },
/// )
/// ```
class TUIAttachmentUpload extends StatelessWidget {
final String title;
final bool isIconUsed;
Expand Down
29 changes: 15 additions & 14 deletions lib/components/avatar/avatar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ import 'package:tarka_ui/styles/text_style.dart';
import 'package:tarka_ui/subcomponents/image.dart';

/// TUIAvatar is used to create a Avatar with content, size and badge flag.
/*
Example:
```dart
TUIAvatar(
avatarSize: TUIAvatarSize.xs,
avatarContent: TUIAvatarContent(
type: TUIAvatarContentType.image,
image: TUIImage(
imageUrl: 'https://picsum.photos/200/300',
),
),
isBadged: true,
),```
*/
///
/// Example:
/// ```dart
/// TUIAvatar(
/// avatarSize: TUIAvatarSize.xs,
/// avatarContent: TUIAvatarContent(
/// type: TUIAvatarContentType.image,
/// image: TUIImage(
/// imageUrl: 'https://picsum.photos/200/300',
/// ),
/// ),
/// isBadged: true,
/// )
/// ```
class TUIAvatar extends StatelessWidget {
final TUIAvatarSize avatarSize;
final TUIAvatarContent avatarContent;
Expand Down
21 changes: 10 additions & 11 deletions lib/components/badge/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,15 @@ enum TUIBadgeSize {
}

/// TUIBadge is used to create a Badge with content, size and badge flag.
/*
Example:
```dart
TUIBadge(
badgeSize: TUIBadgeSize.xs,
content: '1',
isNumbered: true,
),
```
*/
///
/// Example:
/// ```dart
/// TUIBadge(
/// badgeSize: TUIBadgeSize.xs,
/// content: '1',
/// isNumbered: true,
/// ),
/// ```
class TUIBadge extends StatelessWidget {
final TUIBadgeSize badgeSize;
final String? content;
Expand Down Expand Up @@ -114,4 +113,4 @@ class TUIBadge extends StatelessWidget {
);
}
}
}
}
20 changes: 10 additions & 10 deletions lib/components/breadcrumb/breadcrumb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import 'package:tarka_ui/styles/default_colors.dart';
import 'package:tarka_ui/styles/theme.dart';

/// TUIBreadCrumb is used to create a BreadCrumb with titles and onTap function.
/*
Example:
```dart
TUIBreadCrumb(
titles: ['Home', 'Library', 'Data'],
onTap: (index) {
print('Tapped on index: $index');
},
),```
*/
///
/// Example:
/// ```dart
/// TUIBreadCrumb(
/// titles: ['Home', 'Library', 'Data'],
/// onTap: (index) {
/// print('Tapped on index: $index');
/// },
/// )
/// ```
class TUIBreadCrumb extends StatelessWidget {
final Function(int) onTap;
final List<String> titles;
Expand Down
24 changes: 12 additions & 12 deletions lib/components/button/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import 'package:tarka_ui/components/button/style.dart';
import 'package:tarka_ui/styles/theme.dart';

/// TUIButton is used to create a button with label, icon and button type.
/*
Example:
```dart
TUIButton(
type: TUIButtonType.primary,
size: TUIButtonSize.m,
label: 'Primary',
onPressed: () {},
),
```
*/
///
/// Example:
/// ```dart
/// TUIButton(
/// type: TUIButtonType.primary,
/// size: TUIButtonSize.m,
/// label: 'Primary',
/// onPressed: () {},
/// )
/// ```
class TUIButton extends StatelessWidget {
const TUIButton({
super.key,
Expand All @@ -25,7 +25,7 @@ class TUIButton extends StatelessWidget {
required this.onPressed,
this.onLongPress,
this.height,
}) : assert(label != null || iconData != null);
}) : assert(label != null || iconData != null);

final TUIButtonType type;
final TUIButtonSize size;
Expand Down
Loading

0 comments on commit 49f76d8

Please sign in to comment.