@rkosafo/cai.components 0.0.74 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types/index.d.ts
CHANGED
|
@@ -568,7 +568,7 @@ export interface TableSortInfo {
|
|
|
568
568
|
id: string;
|
|
569
569
|
order: 'asc' | 'desc';
|
|
570
570
|
}
|
|
571
|
-
export type TableColor = 'green' | 'orange' | 'white' | 'purple' | 'sky' | 'blue';
|
|
571
|
+
export type TableColor = 'green' | 'orange' | 'white' | 'purple' | 'sky' | 'blue' | 'red' | 'pink';
|
|
572
572
|
export type HeaderTextColor = 'black' | 'white' | 'gray';
|
|
573
573
|
export interface TableProps {
|
|
574
574
|
data?: any[];
|
|
@@ -810,6 +810,7 @@ export interface BreadcrumbProps {
|
|
|
810
810
|
options: IBreadcrumb[];
|
|
811
811
|
activeBreadCrumb: string;
|
|
812
812
|
onclik?: (val: IBreadcrumbClick) => void;
|
|
813
|
+
activeClass?: 'pink' | 'blue' | 'red' | 'indigo' | 'purple' | 'black' | 'amber' | 'orange';
|
|
813
814
|
}
|
|
814
815
|
export interface IBreadcrumbClick {
|
|
815
816
|
title: string;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { IconifyIcon, type BreadcrumbProps } from '../../index.js';
|
|
3
3
|
|
|
4
|
-
let {
|
|
4
|
+
let {
|
|
5
|
+
options = [],
|
|
6
|
+
activeBreadCrumb = '',
|
|
7
|
+
onclik,
|
|
8
|
+
activeClass = 'blue'
|
|
9
|
+
}: BreadcrumbProps = $props();
|
|
5
10
|
</script>
|
|
6
11
|
|
|
7
12
|
<ul class="flex items-center gap-1">
|
|
@@ -10,8 +15,14 @@
|
|
|
10
15
|
<button
|
|
11
16
|
onclick={() => onclik?.({ title, path, index })}
|
|
12
17
|
class="capitalize"
|
|
13
|
-
class:text-blue-500={activeBreadCrumb === title}
|
|
14
|
-
class:text-
|
|
18
|
+
class:text-blue-500={activeBreadCrumb === title && activeClass === 'blue'}
|
|
19
|
+
class:text-red-500={activeBreadCrumb === title && activeClass === 'red'}
|
|
20
|
+
class:text-pink-500={activeBreadCrumb === title && activeClass === 'pink'}
|
|
21
|
+
class:text-indigo-500={activeBreadCrumb === title && activeClass === 'indigo'}
|
|
22
|
+
class:text-purple-500={activeBreadCrumb === title && activeClass === 'purple'}
|
|
23
|
+
class:text-black={activeBreadCrumb === title && activeClass === 'black'}
|
|
24
|
+
class:text-amber-500={activeBreadCrumb === title && activeClass === 'amber'}
|
|
25
|
+
class:text-orange-500={activeBreadCrumb === title && activeClass === 'orange'}
|
|
15
26
|
class:hover:text-gray-400={activeBreadCrumb !== title}
|
|
16
27
|
class:cursor-default={activeBreadCrumb === title}>{title}</button
|
|
17
28
|
>
|
|
@@ -130,6 +130,8 @@
|
|
|
130
130
|
class:bg-[#CF9B14]={headerColor === 'orange'}
|
|
131
131
|
class:bg-[#cbc3fa]={headerColor === 'purple'}
|
|
132
132
|
class:bg-blue-300={headerColor === 'blue'}
|
|
133
|
+
class:bg-red-300={headerColor === 'red'}
|
|
134
|
+
class:bg-pink-300={headerColor === 'pink'}
|
|
133
135
|
class:bg-white={headerColor === 'white'}
|
|
134
136
|
class:text-gray-700={headerTextColor === 'gray'}
|
|
135
137
|
class:text-white={headerTextColor === 'white'}
|