Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
# 0.0.13
### 0.0.14

- WdsSliverHeader.logo에 외부 로고 탭 콜백 추가

### 0.0.13

- WdsSlider > start, end clamp 함수 추가

### 0.0.12

- WdsOption > WdsOptionVaraint.normal 추가
- WdsButton > widget.child > Text.rich 대응 로직 추가
- WdsButton > widget.child > Text.rich 대응 로직 추가

### 0.0.11

- 메세지 UI (WdsToast, WdsSnackbar, WdsSectionMessage) 공통 컨트롤러 도입
- WdsHeader.search > widthFactor 수정
- WdsChip > leading 형변환 (WdsIcon > Widget)

### 0.0.10

- WdsTextArea > 최소 높이 60px / 최대 높이 320px 대응될 수 있게끔 개선
- WdsTextArea > 'label' 파라미터 String에서 Text로 형변환
- WdsTextArea > 'label' 파라미터 String에서 Text로 형변환

### 0.0.9

- WdsToolTip > 'message'에서 'label'로 변경
- WdsToolTip > 'message' 파라미터 String에서 Text로 형변환
- WdsChip > outline 'backgroundColor' > WdsColors.white로 변경
Expand Down
20 changes: 19 additions & 1 deletion packages/components/lib/src/header/wds_sliver_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class WdsSliverHeader extends StatelessWidget {
required this.hasCenterTitle,
required this.isLogo,
required this.isSearch,
required this.onLogoTap,
required this.pinned,
required this.floating,
required this.safeArea,
Expand All @@ -25,6 +26,7 @@ class WdsSliverHeader extends StatelessWidget {
/// Creates a logo header.
WdsSliverHeader.logo({
List<Widget> actions = const [],
VoidCallback? onLogoTap,
bool pinned = true,
bool floating = false,
bool safeArea = true,
Expand All @@ -36,6 +38,7 @@ class WdsSliverHeader extends StatelessWidget {
hasCenterTitle: false,
isLogo: true,
isSearch: false,
onLogoTap: onLogoTap,
pinned: pinned,
floating: floating,
safeArea: safeArea,
Expand All @@ -58,6 +61,7 @@ class WdsSliverHeader extends StatelessWidget {
hasCenterTitle: true,
isLogo: false,
isSearch: false,
onLogoTap: null,
pinned: pinned,
floating: floating,
safeArea: safeArea,
Expand All @@ -82,6 +86,7 @@ class WdsSliverHeader extends StatelessWidget {
hasCenterTitle: true,
isLogo: false,
isSearch: true,
onLogoTap: null,
pinned: pinned,
floating: floating,
safeArea: safeArea,
Expand All @@ -95,6 +100,7 @@ class WdsSliverHeader extends StatelessWidget {
final bool hasCenterTitle;
final bool isLogo;
final bool isSearch;
final VoidCallback? onLogoTap;

/// Whether the header should remain visible at the start of the scroll view.
final bool pinned;
Expand All @@ -121,6 +127,7 @@ class WdsSliverHeader extends StatelessWidget {
hasCenterTitle: hasCenterTitle,
isLogo: isLogo,
isSearch: isSearch,
onLogoTap: onLogoTap,
statusBarHeight: statusBarHeight,
),
);
Expand All @@ -135,6 +142,7 @@ class _WdsSliverHeaderDelegate extends SliverPersistentHeaderDelegate {
required this.hasCenterTitle,
required this.isLogo,
required this.isSearch,
required this.onLogoTap,
required this.statusBarHeight,
});

Expand All @@ -144,6 +152,7 @@ class _WdsSliverHeaderDelegate extends SliverPersistentHeaderDelegate {
final bool hasCenterTitle;
final bool isLogo;
final bool isSearch;
final VoidCallback? onLogoTap;
final double statusBarHeight;

@override
Expand Down Expand Up @@ -200,6 +209,14 @@ class _WdsSliverHeaderDelegate extends SliverPersistentHeaderDelegate {
.toList(),
);

final Widget logoTitleWidget = onLogoTap == null
? titleWidget
: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: onLogoTap,
child: titleWidget,
);

final Widget headerContent = SizedBox(
height: WdsHeader.fixedSize.height,
child: Padding(
Expand All @@ -225,7 +242,7 @@ class _WdsSliverHeaderDelegate extends SliverPersistentHeaderDelegate {
),
(false, true) => Padding(
padding: const EdgeInsets.only(left: 8),
child: titleWidget,
child: logoTitleWidget,
),
(false, false) => titleWidget,
},
Expand Down Expand Up @@ -256,6 +273,7 @@ class _WdsSliverHeaderDelegate extends SliverPersistentHeaderDelegate {
hasCenterTitle != oldDelegate.hasCenterTitle ||
isLogo != oldDelegate.isLogo ||
isSearch != oldDelegate.isSearch ||
onLogoTap != oldDelegate.onLogoTap ||
statusBarHeight != oldDelegate.statusBarHeight;
}
}
2 changes: 1 addition & 1 deletion packages/components/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wds_components
version: 0.1.3
version: 0.0.14
publish_to: none
description: WINC Design System components package
environment:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wds
version: 0.0.13
version: 0.0.14
publish_to: none
description: WINC Design System
environment:
Expand Down
Loading