From 4bf69eb46ccbb69515d54105d1370f0722bdae3c Mon Sep 17 00:00:00 2001 From: Munawwirul Jamal Date: Wed, 26 Nov 2025 08:16:58 +0700 Subject: [PATCH] feat/things-munaja: added content header --- .../my-ui/content-header/content-header.vue | 132 ++++++++++++++++++ .../pub/my-ui/content-header/index.ts | 57 ++++++++ 2 files changed, 189 insertions(+) create mode 100644 app/components/pub/my-ui/content-header/content-header.vue create mode 100644 app/components/pub/my-ui/content-header/index.ts diff --git a/app/components/pub/my-ui/content-header/content-header.vue b/app/components/pub/my-ui/content-header/content-header.vue new file mode 100644 index 00000000..0d3eae73 --- /dev/null +++ b/app/components/pub/my-ui/content-header/content-header.vue @@ -0,0 +1,132 @@ + + + diff --git a/app/components/pub/my-ui/content-header/index.ts b/app/components/pub/my-ui/content-header/index.ts new file mode 100644 index 00000000..8648959d --- /dev/null +++ b/app/components/pub/my-ui/content-header/index.ts @@ -0,0 +1,57 @@ +export type ComponentWithProps = { component: Component, props: Record } + +export interface ButtonNav { + variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' + classVal?: string + classValExt?: string + icon?: string + label: string + onClick?: () => void +} + +// can type directly +export interface QuickSearchNav { + modelValue?: string + placeholder?: string + inputClass?: string + inputPlaceHolder?: string + minLength?: number + btnClass?: string + btnIcon?: string + btnLabel?: string + showValidationFeedback?: boolean + debounceDuration?: number + searchParams: object + onSubmit?: (searchParams: object) => void + onClear: () => void +} + +// callback on event +export interface RefSearchNav { + modelValue?: string + placeholder?: string + inputClass?: string + inputPlaceHolder?: string + btnClass?: string + btnIcon?: string + onInput: (val: string) => void + onClick: () => void + onClear: () => void +} + +export interface RefExportNav { + onExportPdf?: () => void + onExportCsv?: () => void + onExportExcel?: () => void +} + +export interface ContentHeader { + title?: string + icon?: string + components?: ComponentWithProps[] + quickSearchNav?: QuickSearchNav + refSearchNav?: RefSearchNav // either ref or quick + filterNav?: ButtonNav + addNav?: ButtonNav + printNav?: ButtonNav +}