@skalfa/skalfa-component 1.0.2 → 1.0.3

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.
Files changed (168) hide show
  1. package/dist/accordion/Accordion.component.d.ts +1 -1
  2. package/dist/breadcrumb/Breadcrumb.component.d.ts +1 -1
  3. package/dist/button/Button.component.d.ts +1 -1
  4. package/dist/card/AlertCard.component.d.ts +1 -1
  5. package/dist/card/Card.component.d.ts +1 -1
  6. package/dist/card/DashboardCard.component.d.ts +1 -1
  7. package/dist/card/GalleryCard.component.d.ts +1 -1
  8. package/dist/card/ProductCard.component.d.ts +1 -1
  9. package/dist/card/ProfileCard.component.d.ts +1 -1
  10. package/dist/carousel/Carousel.component.d.ts +1 -1
  11. package/dist/chip/Chip.component.d.ts +1 -1
  12. package/dist/input/Checkbox.component.d.ts +1 -1
  13. package/dist/input/Input.component.d.ts +1 -1
  14. package/dist/input/InputCheckbox.component.d.ts +1 -1
  15. package/dist/input/InputCurrency.component.d.ts +1 -1
  16. package/dist/input/InputDate.component.d.ts +1 -1
  17. package/dist/input/InputDate.component.js +4 -4
  18. package/dist/input/InputDatetime.component.d.ts +1 -1
  19. package/dist/input/InputDocument.component.d.ts +1 -1
  20. package/dist/input/InputMap.component.d.ts +1 -1
  21. package/dist/input/InputNumber.component.d.ts +1 -1
  22. package/dist/input/InputPassword.component.d.ts +1 -1
  23. package/dist/input/InputRadio.component.d.ts +1 -1
  24. package/dist/input/InputTime.component.d.ts +1 -1
  25. package/dist/input/InputValues.component.d.ts +1 -1
  26. package/dist/input/Radio.component.d.ts +1 -1
  27. package/dist/input/Select.component.d.ts +1 -1
  28. package/dist/modal/FloatingPage.component.d.ts +1 -1
  29. package/dist/modal/Modal.component.d.ts +1 -1
  30. package/dist/modal/ModalConfirm.component.d.ts +1 -1
  31. package/dist/modal/Toast.component.d.ts +1 -1
  32. package/dist/nav/Bottombar.component.d.ts +1 -1
  33. package/dist/nav/Footer.component.d.ts +1 -1
  34. package/dist/nav/Headbar.component.d.ts +4 -11
  35. package/dist/nav/Headbar.component.js +3 -23
  36. package/dist/nav/Navbar.component.d.ts +1 -1
  37. package/dist/nav/Sidebar.component.d.ts +2 -2
  38. package/dist/nav/Tabbar.component.d.ts +1 -1
  39. package/dist/nav/Wizard.component.d.ts +1 -1
  40. package/dist/supervision/FormSupervision.component.d.ts +1 -1
  41. package/dist/supervision/TableSupervision.component.d.ts +1 -1
  42. package/dist/table/ControlBar.component.d.ts +1 -1
  43. package/dist/table/FilterComponent.d.ts +2 -2
  44. package/dist/table/Pagination.component.d.ts +1 -1
  45. package/dist/table/Table.component.d.ts +1 -1
  46. package/dist/typography/TypographyArticle.component.d.ts +1 -1
  47. package/dist/typography/TypographyColumn.component.d.ts +1 -1
  48. package/dist/typography/TypographyContent.component.d.ts +1 -1
  49. package/dist/typography/TypographyTips.component.d.ts +1 -1
  50. package/dist/wrap/Image.component.d.ts +1 -1
  51. package/dist/wrap/ScrollContainer.component.d.ts +1 -1
  52. package/dist/wrap/ShortcutProvider.d.ts +1 -1
  53. package/dist/wrap/Swipe.component.d.ts +1 -1
  54. package/package.json +2 -2
  55. package/dist/src/accordion/Accordion.component.d.ts +0 -13
  56. package/dist/src/accordion/Accordion.component.js +0 -25
  57. package/dist/src/breadcrumb/Breadcrumb.component.d.ts +0 -14
  58. package/dist/src/breadcrumb/Breadcrumb.component.js +0 -21
  59. package/dist/src/button/Button.component.d.ts +0 -21
  60. package/dist/src/button/Button.component.js +0 -19
  61. package/dist/src/card/AlertCard.component.d.ts +0 -11
  62. package/dist/src/card/AlertCard.component.js +0 -9
  63. package/dist/src/card/Card.component.d.ts +0 -5
  64. package/dist/src/card/Card.component.js +0 -9
  65. package/dist/src/card/DashboardCard.component.d.ts +0 -9
  66. package/dist/src/card/DashboardCard.component.js +0 -13
  67. package/dist/src/card/GalleryCard.component.d.ts +0 -7
  68. package/dist/src/card/GalleryCard.component.js +0 -13
  69. package/dist/src/card/ProductCard.component.d.ts +0 -9
  70. package/dist/src/card/ProductCard.component.js +0 -13
  71. package/dist/src/card/ProfileCard.component.d.ts +0 -10
  72. package/dist/src/card/ProfileCard.component.js +0 -13
  73. package/dist/src/carousel/Carousel.component.d.ts +0 -13
  74. package/dist/src/carousel/Carousel.component.js +0 -37
  75. package/dist/src/chip/Chip.component.d.ts +0 -6
  76. package/dist/src/chip/Chip.component.js +0 -12
  77. package/dist/src/index.d.ts +0 -13
  78. package/dist/src/index.js +0 -29
  79. package/dist/src/input/Checkbox.component.d.ts +0 -13
  80. package/dist/src/input/Checkbox.component.js +0 -23
  81. package/dist/src/input/Input.component.d.ts +0 -23
  82. package/dist/src/input/Input.component.js +0 -134
  83. package/dist/src/input/InputCheckbox.component.d.ts +0 -27
  84. package/dist/src/input/InputCheckbox.component.js +0 -53
  85. package/dist/src/input/InputCurrency.component.d.ts +0 -21
  86. package/dist/src/input/InputCurrency.component.js +0 -30
  87. package/dist/src/input/InputDate.component.d.ts +0 -24
  88. package/dist/src/input/InputDate.component.js +0 -107
  89. package/dist/src/input/InputDatetime.component.d.ts +0 -17
  90. package/dist/src/input/InputDatetime.component.js +0 -75
  91. package/dist/src/input/InputDocument.component.d.ts +0 -22
  92. package/dist/src/input/InputDocument.component.js +0 -88
  93. package/dist/src/input/InputImage.component.d.ts +0 -23
  94. package/dist/src/input/InputImage.component.js +0 -260
  95. package/dist/src/input/InputMap.component.d.ts +0 -25
  96. package/dist/src/input/InputMap.component.js +0 -101
  97. package/dist/src/input/InputNumber.component.d.ts +0 -19
  98. package/dist/src/input/InputNumber.component.js +0 -40
  99. package/dist/src/input/InputOtp.component.d.ts +0 -14
  100. package/dist/src/input/InputOtp.component.js +0 -65
  101. package/dist/src/input/InputPassword.component.d.ts +0 -17
  102. package/dist/src/input/InputPassword.component.js +0 -59
  103. package/dist/src/input/InputRadio.component.d.ts +0 -27
  104. package/dist/src/input/InputRadio.component.js +0 -56
  105. package/dist/src/input/InputTime.component.d.ts +0 -23
  106. package/dist/src/input/InputTime.component.js +0 -73
  107. package/dist/src/input/InputValues.component.d.ts +0 -9
  108. package/dist/src/input/InputValues.component.js +0 -19
  109. package/dist/src/input/Radio.component.d.ts +0 -12
  110. package/dist/src/input/Radio.component.js +0 -22
  111. package/dist/src/input/Select.component.d.ts +0 -47
  112. package/dist/src/input/Select.component.js +0 -275
  113. package/dist/src/modal/BottomSheet.component.d.ts +0 -12
  114. package/dist/src/modal/BottomSheet.component.js +0 -161
  115. package/dist/src/modal/FloatingPage.component.d.ts +0 -12
  116. package/dist/src/modal/FloatingPage.component.js +0 -27
  117. package/dist/src/modal/Modal.component.d.ts +0 -12
  118. package/dist/src/modal/Modal.component.js +0 -27
  119. package/dist/src/modal/ModalConfirm.component.d.ts +0 -26
  120. package/dist/src/modal/ModalConfirm.component.js +0 -68
  121. package/dist/src/modal/Toast.component.d.ts +0 -11
  122. package/dist/src/modal/Toast.component.js +0 -58
  123. package/dist/src/nav/Bottombar.component.d.ts +0 -12
  124. package/dist/src/nav/Bottombar.component.js +0 -32
  125. package/dist/src/nav/Footer.component.d.ts +0 -37
  126. package/dist/src/nav/Footer.component.js +0 -49
  127. package/dist/src/nav/Headbar.component.d.ts +0 -14
  128. package/dist/src/nav/Headbar.component.js +0 -32
  129. package/dist/src/nav/Navbar.component.d.ts +0 -22
  130. package/dist/src/nav/Navbar.component.js +0 -26
  131. package/dist/src/nav/Sidebar.component.d.ts +0 -33
  132. package/dist/src/nav/Sidebar.component.js +0 -87
  133. package/dist/src/nav/Tabbar.component.d.ts +0 -13
  134. package/dist/src/nav/Tabbar.component.js +0 -17
  135. package/dist/src/nav/Wizard.component.d.ts +0 -9
  136. package/dist/src/nav/Wizard.component.js +0 -24
  137. package/dist/src/supervision/FormSupervision.component.d.ts +0 -93
  138. package/dist/src/supervision/FormSupervision.component.js +0 -168
  139. package/dist/src/supervision/TableSupervision.component.d.ts +0 -78
  140. package/dist/src/supervision/TableSupervision.component.js +0 -273
  141. package/dist/src/table/ControlBar.component.d.ts +0 -34
  142. package/dist/src/table/ControlBar.component.js +0 -205
  143. package/dist/src/table/FilterComponent.d.ts +0 -45
  144. package/dist/src/table/FilterComponent.js +0 -132
  145. package/dist/src/table/Pagination.component.d.ts +0 -8
  146. package/dist/src/table/Pagination.component.js +0 -32
  147. package/dist/src/table/Table.component.d.ts +0 -61
  148. package/dist/src/table/Table.component.js +0 -101
  149. package/dist/src/typography/TypographyArticle.component.d.ts +0 -8
  150. package/dist/src/typography/TypographyArticle.component.js +0 -7
  151. package/dist/src/typography/TypographyColumn.component.d.ts +0 -6
  152. package/dist/src/typography/TypographyColumn.component.js +0 -7
  153. package/dist/src/typography/TypographyContent.component.d.ts +0 -6
  154. package/dist/src/typography/TypographyContent.component.js +0 -7
  155. package/dist/src/typography/TypographyTips.component.d.ts +0 -6
  156. package/dist/src/typography/TypographyTips.component.js +0 -7
  157. package/dist/src/wrap/Draggable.component.d.ts +0 -34
  158. package/dist/src/wrap/Draggable.component.js +0 -214
  159. package/dist/src/wrap/Image.component.d.ts +0 -2
  160. package/dist/src/wrap/Image.component.js +0 -13
  161. package/dist/src/wrap/OutsideClick.component.d.ts +0 -6
  162. package/dist/src/wrap/OutsideClick.component.js +0 -34
  163. package/dist/src/wrap/ScrollContainer.component.d.ts +0 -10
  164. package/dist/src/wrap/ScrollContainer.component.js +0 -54
  165. package/dist/src/wrap/ShortcutProvider.d.ts +0 -1
  166. package/dist/src/wrap/ShortcutProvider.js +0 -42
  167. package/dist/src/wrap/Swipe.component.d.ts +0 -14
  168. package/dist/src/wrap/Swipe.component.js +0 -61
@@ -10,4 +10,4 @@ export interface AccordionProps {
10
10
  }
11
11
  export declare function AccordionComponent({ items, setActive, horizontal,
12
12
  /** Use custom class with: "container::", "head::", "active::". */
13
- className, }: AccordionProps): import("react").JSX.Element;
13
+ className, }: AccordionProps): import("@types/react").JSX.Element;
@@ -11,4 +11,4 @@ export interface BreadcrumbProps {
11
11
  /** Use custom class with: "container::", "active::". */
12
12
  className?: string;
13
13
  }
14
- export declare function BreadcrumbComponent({ items, className, square, separatorContent, }: BreadcrumbProps): import("react").JSX.Element;
14
+ export declare function BreadcrumbComponent({ items, className, square, separatorContent, }: BreadcrumbProps): import("@types/react").JSX.Element;
@@ -18,4 +18,4 @@ export interface ButtonProps {
18
18
  /** Use custom class with: "icon::", "loading::". */
19
19
  className?: string;
20
20
  }
21
- export declare function ButtonComponent({ type, label, variant, paint, rounded, block, disabled, size, onClick, href, icon, loading, tips, title, className, }: ButtonProps): import("react").JSX.Element;
21
+ export declare function ButtonComponent({ type, label, variant, paint, rounded, block, disabled, size, onClick, href, icon, loading, tips, title, className, }: ButtonProps): import("@types/react").JSX.Element;
@@ -8,4 +8,4 @@ export interface AlertCardProps {
8
8
  /** Use custom class with: "badge::", "title::". */
9
9
  className?: string;
10
10
  }
11
- export declare function AlertCardComponent({ title, leftContent, badge, content, footer, className, }: AlertCardProps): import("react").JSX.Element;
11
+ export declare function AlertCardComponent({ title, leftContent, badge, content, footer, className, }: AlertCardProps): import("@types/react").JSX.Element;
@@ -2,4 +2,4 @@ export interface CardProps {
2
2
  children: React.ReactNode;
3
3
  className?: string;
4
4
  }
5
- export declare function CardComponent({ children, className, }: CardProps): import("react").JSX.Element;
5
+ export declare function CardComponent({ children, className, }: CardProps): import("@types/react").JSX.Element;
@@ -6,4 +6,4 @@ export interface DashboardCardProps {
6
6
  path?: string;
7
7
  className?: string;
8
8
  }
9
- export declare function DashboardCardComponent({ content, title, rightContent, path, className, }: DashboardCardProps): import("react").JSX.Element;
9
+ export declare function DashboardCardComponent({ content, title, rightContent, path, className, }: DashboardCardProps): import("@types/react").JSX.Element;
@@ -4,4 +4,4 @@ export interface GalleryCardProps {
4
4
  /** Use custom class with: "label::", "image::". */
5
5
  className?: string;
6
6
  }
7
- export declare function GalleryCardComponent({ src, alt, className, }: GalleryCardProps): import("react").JSX.Element;
7
+ export declare function GalleryCardComponent({ src, alt, className, }: GalleryCardProps): import("@types/react").JSX.Element;
@@ -6,4 +6,4 @@ export interface ProductCardProps {
6
6
  /** Use custom class with: "image::", "content::". */
7
7
  className?: string;
8
8
  }
9
- export declare function ProductCardComponent({ image, name, price, description, className, }: ProductCardProps): import("react").JSX.Element;
9
+ export declare function ProductCardComponent({ image, name, price, description, className, }: ProductCardProps): import("@types/react").JSX.Element;
@@ -7,4 +7,4 @@ export interface ProfileCardProps {
7
7
  /** Use custom class with: "image::", "content::". */
8
8
  className?: string;
9
9
  }
10
- export declare function ProfileCardComponent({ image, name, short, description, footer, className, }: ProfileCardProps): import("react").JSX.Element;
10
+ export declare function ProfileCardComponent({ image, name, short, description, footer, className, }: ProfileCardProps): import("@types/react").JSX.Element;
@@ -9,5 +9,5 @@ interface CarouselProps {
9
9
  /** Use custom class with: "item::", "prev-button::", "next-button::", "navigation::". */
10
10
  className?: string;
11
11
  }
12
- export declare function CarouselComponent({ items, className, noButton, noNavigation, }: CarouselProps): import("react").JSX.Element;
12
+ export declare function CarouselComponent({ items, className, noButton, noNavigation, }: CarouselProps): import("@types/react").JSX.Element;
13
13
  export {};
@@ -3,4 +3,4 @@ export declare function ChipComponent({ items, onClick, onDelete, className, }:
3
3
  onClick?: (item: any, index: number) => void;
4
4
  onDelete?: (item: any, index: number) => void;
5
5
  className?: string;
6
- }): import("react").JSX.Element;
6
+ }): import("@types/react").JSX.Element;
@@ -10,4 +10,4 @@ export type CheckboxProps = {
10
10
  /** Use custom class with: "label::", "checked::", "error::". */
11
11
  className?: string;
12
12
  };
13
- export declare function CheckboxComponent({ name, label, value, disabled, checked, invalid, onChange, className, }: CheckboxProps): import("react").JSX.Element;
13
+ export declare function CheckboxComponent({ name, label, value, disabled, checked, invalid, onChange, className, }: CheckboxProps): import("@types/react").JSX.Element;
@@ -20,4 +20,4 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
20
20
  /** Use custom class with: "label::", "tip::", "error::", "icon::", "suggest::", "suggest-item::". */
21
21
  className?: string;
22
22
  }
23
- export declare function InputComponent({ label, tip, leftIcon, rightIcon, className, value, invalid, suggestions, validations, onlyAlphabet, uppercase, lowercase, multiple, register, unregister, onChange, ref, ...props }: InputProps): import("react").JSX.Element;
23
+ export declare function InputComponent({ label, tip, leftIcon, rightIcon, className, value, invalid, suggestions, validations, onlyAlphabet, uppercase, lowercase, multiple, register, unregister, onChange, ref, ...props }: InputProps): import("@types/react").JSX.Element;
@@ -24,4 +24,4 @@ export interface InputCheckboxProps {
24
24
  /** Use custom class with: "label::", "checked::", "error::". */
25
25
  classNameCheckbox?: string;
26
26
  }
27
- export declare function InputCheckboxComponent({ name, label, tip, vertical, className, classNameCheckbox, value, disabled, invalid, options, serverOptionControl, customOptions, validations, register, unregister, onChange, }: InputCheckboxProps): import("react").JSX.Element;
27
+ export declare function InputCheckboxComponent({ name, label, tip, vertical, className, classNameCheckbox, value, disabled, invalid, options, serverOptionControl, customOptions, validations, register, unregister, onChange, }: InputCheckboxProps): import("@types/react").JSX.Element;
@@ -18,4 +18,4 @@ export interface InputCurrencyProps extends Omit<InputHTMLAttributes<HTMLInputEl
18
18
  /** Use custom class with: "label::", "tip::", "error::", "icon::". */
19
19
  className?: string;
20
20
  }
21
- export declare function InputCurrencyComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, format, register, unregister, onChange, className, ...props }: InputCurrencyProps): import("react").JSX.Element;
21
+ export declare function InputCurrencyComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, format, register, unregister, onChange, className, ...props }: InputCurrencyProps): import("@types/react").JSX.Element;
@@ -14,7 +14,7 @@ export interface InputDateProps extends Omit<InputHTMLAttributes<HTMLInputElemen
14
14
  /** Use custom class with: "label::", "tip::", "error::", "icon::". */
15
15
  className?: string;
16
16
  }
17
- export declare function InputDateComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputDateProps): import("react").JSX.Element;
17
+ export declare function InputDateComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputDateProps): import("@types/react").JSX.Element;
18
18
  export interface InputDatePickerProps {
19
19
  onChange?: (date: string) => void;
20
20
  minDate?: string;
@@ -75,10 +75,10 @@ const InputDatePickerComponent = ({ onChange, minDate, maxDate, rightElement, })
75
75
  while (day.isBefore(endDate) || day.isSame(endDate, "day")) {
76
76
  for (let i = 0; i < 7; i++) {
77
77
  const cloneDay = (0, moment_1.default)(day);
78
- days.push((0, jsx_runtime_1.jsx)("div", { className: `w-8 aspect-square flex items-center justify-center text-center rounded-lg transition-all
79
- ${day.isSame(currentDate, "month") ? "text-foreground" : "text-light-foreground"}
80
- ${day.isSame(selectedDate, "day") ? "bg-primary text-background" : "hover:bg-light-primary"}
81
- ${day.isSame((0, moment_1.default)(), "day") ? "border !border-primary" : "hover:bg-light-primary"}
78
+ days.push((0, jsx_runtime_1.jsx)("div", { className: `w-8 aspect-square flex items-center justify-center text-center rounded-lg transition-all
79
+ ${day.isSame(currentDate, "month") ? "text-foreground" : "text-light-foreground"}
80
+ ${day.isSame(selectedDate, "day") ? "bg-primary text-background" : "hover:bg-light-primary"}
81
+ ${day.isSame((0, moment_1.default)(), "day") ? "border !border-primary" : "hover:bg-light-primary"}
82
82
  ${(minDate && day.isBefore((0, moment_1.default)(minDate))) || (maxDate && day.isAfter((0, moment_1.default)(maxDate))) ? "opacity-10 cursor-not-allowed" : "cursor-pointer"}`, onClick: () => handleDateClick(cloneDay), children: day.format("D") }, day.toString()));
83
83
  day.add(1, "day");
84
84
  }
@@ -14,4 +14,4 @@ export interface InputDateTimeProps extends Omit<InputHTMLAttributes<HTMLInputEl
14
14
  /** Use custom class with: "label::", "tip::", "error::", "icon::", "suggest::", "suggest-item::". */
15
15
  className?: string;
16
16
  }
17
- export declare function InputDatetimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputDateTimeProps): import("react").JSX.Element;
17
+ export declare function InputDatetimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputDateTimeProps): import("@types/react").JSX.Element;
@@ -14,7 +14,7 @@ export interface InputDocumentProps extends Omit<InputHTMLAttributes<HTMLInputEl
14
14
  /** Use custom class with: "label::", "tip::", "error::", "icon::", "suggest::", "suggest-item::". */
15
15
  className?: string;
16
16
  }
17
- export declare function InputDocumentComponent({ label, tip, leftIcon, rightIcon, className, value, invalid, validations, register, unregister, onChange, ...props }: InputDocumentProps): import("react").JSX.Element;
17
+ export declare function InputDocumentComponent({ label, tip, leftIcon, rightIcon, className, value, invalid, validations, register, unregister, onChange, ...props }: InputDocumentProps): import("@types/react").JSX.Element;
18
18
  export interface InputDocumentPickerProps {
19
19
  value?: any[];
20
20
  onChange?: (value: any[]) => void;
@@ -17,7 +17,7 @@ export interface InputMapProps extends Omit<React.InputHTMLAttributes<HTMLInputE
17
17
  unregister?: (name: string) => void;
18
18
  className?: string;
19
19
  }
20
- export declare function InputMapComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputMapProps): import("react").JSX.Element;
20
+ export declare function InputMapComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputMapProps): import("@types/react").JSX.Element;
21
21
  export interface MapPickerProps {
22
22
  value?: any;
23
23
  onChange?: (value: any) => any;
@@ -16,4 +16,4 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
16
16
  /** Use custom class with: "label::", "tip::", "error::", "icon::", "suggest::", "suggest-item::". */
17
17
  className?: string;
18
18
  }
19
- export declare function InputNumberComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, min, max, onChange, register, unregister, className, ...props }: InputNumberProps): import("react").JSX.Element;
19
+ export declare function InputNumberComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, min, max, onChange, register, unregister, className, ...props }: InputNumberProps): import("@types/react").JSX.Element;
@@ -14,4 +14,4 @@ export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputEl
14
14
  /** Use custom class with: "label::", "tip::", "error::", "icon::". */
15
15
  className?: string;
16
16
  }
17
- export declare function InputPasswordComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputPasswordProps): import("react").JSX.Element;
17
+ export declare function InputPasswordComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputPasswordProps): import("@types/react").JSX.Element;
@@ -24,4 +24,4 @@ export type InputRadioProps = {
24
24
  /** Use custom class with: "label::", "checked::", "error::". */
25
25
  classNameCheckbox?: string;
26
26
  };
27
- export declare function InputRadioComponent({ name, label, tip, vertical, value, disabled, invalid, options, serverOptionControl, customOptions, validations, onChange, register, unregister, className, classNameCheckbox, }: InputRadioProps): import("react").JSX.Element;
27
+ export declare function InputRadioComponent({ name, label, tip, vertical, value, disabled, invalid, options, serverOptionControl, customOptions, validations, onChange, register, unregister, className, classNameCheckbox, }: InputRadioProps): import("@types/react").JSX.Element;
@@ -14,7 +14,7 @@ export interface InputTimeProps extends Omit<InputHTMLAttributes<HTMLInputElemen
14
14
  /** Use custom class with: "label::", "tip::", "error::", "icon::". */
15
15
  className?: string;
16
16
  }
17
- export declare function InputTimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputTimeProps): import("react").JSX.Element;
17
+ export declare function InputTimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputTimeProps): import("@types/react").JSX.Element;
18
18
  interface InputTimePickerProps {
19
19
  onChange?: (time: string) => void;
20
20
  rightElement?: ReactNode;
@@ -6,4 +6,4 @@ export declare function InputValues({ value, className, onDelete, isFocus, onFoc
6
6
  isFocus?: boolean;
7
7
  onFocus?: () => void;
8
8
  style?: CSSProperties;
9
- }): import("react").JSX.Element;
9
+ }): import("@types/react").JSX.Element;
@@ -9,4 +9,4 @@ export interface RadioProps {
9
9
  /** Use custom class with: "label::", "checked::", "error::". */
10
10
  className?: string;
11
11
  }
12
- export declare function RadioComponent({ name, label, value, disabled, checked, invalid, onChange, className, }: RadioProps): import("react").JSX.Element;
12
+ export declare function RadioComponent({ name, label, value, disabled, checked, invalid, onChange, className, }: RadioProps): import("@types/react").JSX.Element;
@@ -44,4 +44,4 @@ export interface SelectProps {
44
44
  /** Use custom class with: "label::", "tip::", "error::", "icon::", "suggest::", "suggest-item::". */
45
45
  className?: string;
46
46
  }
47
- export declare function SelectComponent({ name, label, placeholder, tip, leftIcon, rightIcon, value, invalid, disabled, validations, multiple, autoFocus, clearable, options, searchable, serverOptionControl, idbOptionControl, serverSearchable, includedOptions, exceptOptions, tempOptions, newOption, maxShowOption, register, unregister, onChange, onFocus, onBlur, className, }: SelectProps): import("react").JSX.Element;
47
+ export declare function SelectComponent({ name, label, placeholder, tip, leftIcon, rightIcon, value, invalid, disabled, validations, multiple, autoFocus, clearable, options, searchable, serverOptionControl, idbOptionControl, serverSearchable, includedOptions, exceptOptions, tempOptions, newOption, maxShowOption, register, unregister, onChange, onFocus, onBlur, className, }: SelectProps): import("@types/react").JSX.Element;
@@ -9,4 +9,4 @@ export interface FloatingPageProps {
9
9
  /** Use custom class with: "backdrop::", "header::", "footer::". */
10
10
  className?: string;
11
11
  }
12
- export declare function FloatingPageComponent({ show, onClose, title, children, tip, footer, className, }: FloatingPageProps): import("react").JSX.Element;
12
+ export declare function FloatingPageComponent({ show, onClose, title, children, tip, footer, className, }: FloatingPageProps): import("@types/react").JSX.Element;
@@ -9,4 +9,4 @@ export interface ModalProps {
9
9
  /** Use custom class with: "backdrop::", "header::", "footer::". */
10
10
  className?: string;
11
11
  }
12
- export declare function ModalComponent({ show, onClose, title, children, tip, footer, className, }: ModalProps): import("react").JSX.Element;
12
+ export declare function ModalComponent({ show, onClose, title, children, tip, footer, className, }: ModalProps): import("@types/react").JSX.Element;
@@ -22,5 +22,5 @@ export interface ModalConfirmProps {
22
22
  /** Use custom class with: "backdrop::", "header::", "footer::". */
23
23
  className?: string;
24
24
  }
25
- export declare function ModalConfirmComponent({ show, title, children, icon, footer, submitControl, onClose, className, }: ModalConfirmProps): import("react").JSX.Element;
25
+ export declare function ModalConfirmComponent({ show, title, children, icon, footer, submitControl, onClose, className, }: ModalConfirmProps): import("@types/react").JSX.Element;
26
26
  export {};
@@ -8,4 +8,4 @@ export interface ToastProps {
8
8
  /** Use custom class with: "backdrop::", "header::", "footer::". */
9
9
  className?: string;
10
10
  }
11
- export declare function ToastComponent({ show, onClose, title, children, footer, className, }: ToastProps): import("react").JSX.Element;
11
+ export declare function ToastComponent({ show, onClose, title, children, footer, className, }: ToastProps): import("@types/react").JSX.Element;
@@ -9,4 +9,4 @@ export interface BottombarProps {
9
9
  items?: BottombarItemProps[];
10
10
  className?: string;
11
11
  }
12
- export declare function BottombarComponent({ className, active, items, }: BottombarProps): import("react").JSX.Element;
12
+ export declare function BottombarComponent({ className, active, items, }: BottombarProps): import("@types/react").JSX.Element;
@@ -34,4 +34,4 @@ export interface FooterProps {
34
34
  path: string;
35
35
  };
36
36
  }
37
- export declare function FooterComponent({ brandTitle, brandSubtitle, address, phone, email, supportHours, socials, columns, copyrightLink, }: FooterProps): import("react").JSX.Element;
37
+ export declare function FooterComponent({ brandTitle, brandSubtitle, address, phone, email, supportHours, socials, columns, copyrightLink, }: FooterProps): import("@types/react").JSX.Element;
@@ -1,14 +1,7 @@
1
1
  import { ReactNode } from "react";
2
- export interface HeadbarUserProps {
3
- name: string;
4
- role: string;
5
- avatar?: any;
6
- }
7
2
  export interface HeadbarProps {
8
- children?: ReactNode;
9
- user?: HeadbarUserProps;
10
- onLogout?: () => void;
11
- onEditProfile?: () => void;
12
- className?: string;
3
+ title?: string;
4
+ backHref?: string | boolean;
5
+ rightContent?: ReactNode;
13
6
  }
14
- export declare function HeadbarComponent({ children, user, onLogout, onEditProfile, className, }: HeadbarProps): import("react").JSX.Element;
7
+ export declare function HeadbarComponent({ title, backHref, rightContent }: HeadbarProps): import("@types/react").JSX.Element;
@@ -3,31 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.HeadbarComponent = HeadbarComponent;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const react_1 = require("react");
7
6
  const navigation_1 = require("next/navigation");
8
7
  const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
9
8
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
10
- const Image_component_1 = require("../wrap/Image.component");
11
- const OutsideClick_component_1 = require("../wrap/OutsideClick.component");
12
- const _utils_1 = require("@utils");
13
- const defaultUser = {
14
- name: "Jhon Duck",
15
- role: "Admin",
16
- };
17
- function HeadbarComponent({ children, user = defaultUser, onLogout, onEditProfile, className = "", }) {
9
+ ;
10
+ function HeadbarComponent({ title, backHref, rightContent }) {
18
11
  const router = (0, navigation_1.useRouter)();
19
- const [profile, setProfile] = (0, react_1.useState)(false);
20
- const handleLogout = () => {
21
- if (onLogout) {
22
- onLogout();
23
- }
24
- else {
25
- _utils_1.auth.deleteAccessToken();
26
- router.push("/");
27
- }
28
- };
29
- const styles = {
30
- base: (0, _utils_1.cn)("headbar-base", className),
31
- };
32
- return ((0, jsx_runtime_1.jsxs)("div", { className: styles.base, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-full ", children: children }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-right-controls", children: [(0, jsx_runtime_1.jsx)("div", { className: "headbar-icon-button", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faHistory }) }), (0, jsx_runtime_1.jsx)("div", { className: "headbar-icon-button", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faBell }) }), (0, jsx_runtime_1.jsx)("div", { className: "headbar-divider" }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-user-profile-trigger", onClick: () => setProfile(!profile), children: [(0, jsx_runtime_1.jsx)("div", { className: "headbar-user-avatar-wrapper", children: user.avatar ? ((0, jsx_runtime_1.jsx)(Image_component_1.ImageComponent, { src: user.avatar, alt: user.name, className: "w-full h-full object-cover" })) : ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUser })) }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-user-info", children: [(0, jsx_runtime_1.jsx)("h6", { className: "headbar-user-name", children: user.name }), (0, jsx_runtime_1.jsx)("h6", { className: "headbar-user-role", children: user.role })] })] })] }), (0, jsx_runtime_1.jsx)(OutsideClick_component_1.OutsideClickComponent, { onOutsideClick: () => setProfile(false), children: (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("headbar-dropdown", profile ? "scale-y-100" : "scale-y-0"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-header", children: [(0, jsx_runtime_1.jsx)("div", { className: "headbar-dropdown-avatar-wrapper", children: user.avatar ? ((0, jsx_runtime_1.jsx)(Image_component_1.ImageComponent, { src: user.avatar, alt: user.name, className: "w-full h-full object-cover" })) : ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUser, className: "text-2xl text-light-foreground" })) }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-user-info", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-lg font-bold line-clamp-1", children: user.name }), (0, jsx_runtime_1.jsx)("h6", { className: "text-xs -mt-1 font-semibold line-clamp-1", children: user.role })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-body", children: [(0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-item", onClick: onEditProfile, children: [(0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUserCog }), (0, jsx_runtime_1.jsx)("label", { className: "cursor-pointer font-semibold", children: "Edit Profile" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-item-danger", onClick: handleLogout, children: [(0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faPowerOff }), (0, jsx_runtime_1.jsx)("label", { className: "cursor-pointer font-semibold", children: "Keluar" })] })] })] }) })] }));
12
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between w-full items-center mt-2 mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [backHref && ((0, jsx_runtime_1.jsx)("div", { className: "w-8 aspect-square flex justify-center items-center cursor-pointer", onClick: () => typeof backHref != "boolean" ? router.push(backHref) : router.back(), children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faChevronLeft, className: "text-secondary text-xl" }) })), (0, jsx_runtime_1.jsx)("p", { className: "text-lg font-bold px-2", children: title })] }), rightContent && (0, jsx_runtime_1.jsx)("div", { children: rightContent })] }));
33
13
  }
@@ -19,4 +19,4 @@ export interface NavbarProps {
19
19
  onProfile?: () => void;
20
20
  className?: string;
21
21
  }
22
- export declare function NavbarComponent({ logoTitle, logoSubtitle, logoPath, specialLink, items, isLoggedIn, onLogin, onRegister, onProfile, className, }: NavbarProps): import("react").JSX.Element;
22
+ export declare function NavbarComponent({ logoTitle, logoSubtitle, logoPath, specialLink, items, isLoggedIn, onLogin, onRegister, onProfile, className, }: NavbarProps): import("@types/react").JSX.Element;
@@ -27,7 +27,7 @@ export interface sidebarProps {
27
27
  /** Use custom class with: "backdrop::", "head-item::", "item::", "child-item::". */
28
28
  className?: string;
29
29
  }
30
- export declare function SidebarComponent({ head, items, basePath, toggle, onToggleChange, className, }: sidebarProps): import("react").JSX.Element;
30
+ export declare function SidebarComponent({ head, items, basePath, toggle, onToggleChange, className, }: sidebarProps): import("@types/react").JSX.Element;
31
31
  export declare function SidebarContentComponent({ children }: {
32
32
  children: ReactNode;
33
- }): import("react").JSX.Element;
33
+ }): import("@types/react").JSX.Element;
@@ -10,4 +10,4 @@ export interface TabbarProps {
10
10
  }
11
11
  export declare function TabbarComponent({ items, onChange, active,
12
12
  /** Use custom class with: "item::", "active::". */
13
- className, }: TabbarProps): import("react").JSX.Element;
13
+ className, }: TabbarProps): import("@types/react").JSX.Element;
@@ -6,4 +6,4 @@ export interface WizardProps {
6
6
  }[];
7
7
  active: number;
8
8
  }
9
- export declare function WizardComponent({ items, active }: WizardProps): import("react").JSX.Element;
9
+ export declare function WizardComponent({ items, active }: WizardProps): import("@types/react").JSX.Element;
@@ -101,5 +101,5 @@ export interface formSupervisionProps {
101
101
  onError?: (code: number) => void;
102
102
  className?: string;
103
103
  }
104
- export declare function FormSupervisionComponent({ title, fields, submitControl, confirmation, defaultValue, onSuccess, onError, footerControl, payload, className, }: formSupervisionProps): import("react").JSX.Element;
104
+ export declare function FormSupervisionComponent({ title, fields, submitControl, confirmation, defaultValue, onSuccess, onError, footerControl, payload, className, }: formSupervisionProps): import("@types/react").JSX.Element;
105
105
  export {};
@@ -80,4 +80,4 @@ export type TableSupervisionProps = {
80
80
  };
81
81
  importControl?: FetchControlType;
82
82
  };
83
- export declare function TableSupervisionComponent({ title, id, fetchControl, columnControl, formControl, detailControl, actionControl, actionBulkingControl, block, controlBar, noIndex, responsiveControl, urlParam, importControl, }: TableSupervisionProps): import("react").JSX.Element;
83
+ export declare function TableSupervisionComponent({ title, id, fetchControl, columnControl, formControl, detailControl, actionControl, actionBulkingControl, block, controlBar, noIndex, responsiveControl, urlParam, importControl, }: TableSupervisionProps): import("@types/react").JSX.Element;
@@ -31,4 +31,4 @@ export interface ControlBarProps {
31
31
  filter?: ApiFilterType[];
32
32
  onRefresh?: () => void;
33
33
  }
34
- export declare function ControlBarComponent({ id, options, className, search, onSearch, searchableOptions, searchable, onSearchable, selectableOptions, selectable, onSelectable, sortableOptions, sort, onSort, filterableColumns, onFilter, filter, onRefresh }: ControlBarProps): import("react").JSX.Element;
34
+ export declare function ControlBarComponent({ id, options, className, search, onSearch, searchableOptions, searchable, onSearchable, selectableOptions, selectable, onSelectable, sortableOptions, sort, onSort, filterableColumns, onFilter, filter, onRefresh }: ControlBarProps): import("@types/react").JSX.Element;
@@ -26,7 +26,7 @@ export interface AdvancedFilterProps {
26
26
  /** Use custom class with: "title::". */
27
27
  className?: string;
28
28
  }
29
- export declare function FilterComponent({ columns, onChange, value, onMinimize, className, }: AdvancedFilterProps): import("react").JSX.Element;
29
+ export declare function FilterComponent({ columns, onChange, value, onMinimize, className, }: AdvancedFilterProps): import("@types/react").JSX.Element;
30
30
  interface FilterInputProps {
31
31
  type?: string | null;
32
32
  name: string;
@@ -41,5 +41,5 @@ interface FilterInputProps {
41
41
  between?: boolean;
42
42
  multiple?: boolean;
43
43
  }
44
- export declare function InputFilterValueComponent({ type, name, value, onChange, options, placeholder, className, between, multiple, }: FilterInputProps): import("react").JSX.Element;
44
+ export declare function InputFilterValueComponent({ type, name, value, onChange, options, placeholder, className, between, multiple, }: FilterInputProps): import("@types/react").JSX.Element;
45
45
  export {};
@@ -5,4 +5,4 @@ export interface PaginationProps {
5
5
  onChange?: (totalRow: number, paginate: number, page: number) => void;
6
6
  className?: string;
7
7
  }
8
- export declare function PaginationComponent({ paginate, page, totalRow, onChange, className, }: PaginationProps): import("react").JSX.Element;
8
+ export declare function PaginationComponent({ paginate, page, totalRow, onChange, className, }: PaginationProps): import("@types/react").JSX.Element;
@@ -60,4 +60,4 @@ export interface TableProps {
60
60
  /** Use custom class with: "controller-bar::", "head-column::", "column::", "floating-action::", "row::". */
61
61
  className?: string;
62
62
  }
63
- export declare function TableComponent({ id, controlBar, columns, data, pagination, loading, sortBy, onChangeSortBy, search, onChangeSearch, searchableColumn, onChangeSearchableColumn, filter, onChangeFilter, checks, onChangeChecks, actionBulking, focus, onRowClick, onRefresh, block, noIndex, responsiveControl, className, }: TableProps): import("react").JSX.Element;
63
+ export declare function TableComponent({ id, controlBar, columns, data, pagination, loading, sortBy, onChangeSortBy, search, onChangeSearch, searchableColumn, onChangeSearchableColumn, filter, onChangeFilter, checks, onChangeChecks, actionBulking, focus, onRowClick, onRefresh, block, noIndex, responsiveControl, className, }: TableProps): import("@types/react").JSX.Element;
@@ -5,4 +5,4 @@ export interface TypographyArticleProps {
5
5
  header?: string | ReactNode;
6
6
  footer?: string | ReactNode;
7
7
  }
8
- export declare function TypographyArticleComponent({ title, content, header, footer, }: TypographyArticleProps): import("react").JSX.Element;
8
+ export declare function TypographyArticleComponent({ title, content, header, footer, }: TypographyArticleProps): import("@types/react").JSX.Element;
@@ -3,4 +3,4 @@ export interface TypographyColumnProps {
3
3
  title: string | ReactNode;
4
4
  content: string | ReactNode;
5
5
  }
6
- export declare function TypographyColumnComponent({ title, content, }: TypographyColumnProps): import("react").JSX.Element;
6
+ export declare function TypographyColumnComponent({ title, content, }: TypographyColumnProps): import("@types/react").JSX.Element;
@@ -3,4 +3,4 @@ export interface TypographyContentProps {
3
3
  title: string | ReactNode;
4
4
  content: string | ReactNode;
5
5
  }
6
- export declare function TypographyContentComponent({ title, content, }: TypographyContentProps): import("react").JSX.Element;
6
+ export declare function TypographyContentComponent({ title, content, }: TypographyContentProps): import("@types/react").JSX.Element;
@@ -3,4 +3,4 @@ export interface TypographyTipsProps {
3
3
  title: string | ReactNode;
4
4
  content: string | ReactNode;
5
5
  }
6
- export declare function TypographyTipsComponent({ title, content, }: TypographyTipsProps): import("react").JSX.Element;
6
+ export declare function TypographyTipsComponent({ title, content, }: TypographyTipsProps): import("@types/react").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ImageProps } from "next/image";
2
- export declare function ImageComponent(props: ImageProps): import("react").JSX.Element;
2
+ export declare function ImageComponent(props: ImageProps): import("@types/react").JSX.Element;
@@ -7,4 +7,4 @@ export interface ScrollContainerProps {
7
7
  /** Use custom class with: "container::", "floating-scroll::"". */
8
8
  className?: string;
9
9
  }
10
- export declare function ScrollContainerComponent({ children, footer, className, scrollFloating, onScroll, }: ScrollContainerProps): import("react").JSX.Element;
10
+ export declare function ScrollContainerComponent({ children, footer, className, scrollFloating, onScroll, }: ScrollContainerProps): import("@types/react").JSX.Element;
@@ -1 +1 @@
1
- export declare function ShortcutProvider(): import("react").JSX.Element;
1
+ export declare function ShortcutProvider(): import("@types/react").JSX.Element;
@@ -11,4 +11,4 @@ export type SwipeProps = {
11
11
  children?: ReactNode;
12
12
  className?: string;
13
13
  };
14
- export declare function SwipeComponent({ leftActionControl, rightActionControl, children, className, }: SwipeProps): import("react").JSX.Element;
14
+ export declare function SwipeComponent({ leftActionControl, rightActionControl, children, className, }: SwipeProps): import("@types/react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skalfa/skalfa-component",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Core reusable UI components for Skalfa applications.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "license": "MIT",
21
21
  "peerDependencies": {
22
22
  "@fortawesome/react-fontawesome": "^0.2.2",
23
- "@skalfa/skalfa-app-core": "^1.0.0",
23
+ "@skalfa/skalfa-app-core": "^1.0.11",
24
24
  "next": "^15.0.0 || ^16.0.0",
25
25
  "react": "^19.0.0",
26
26
  "react-dom": "^19.0.0"
@@ -1,13 +0,0 @@
1
- import { ReactNode } from "react";
2
- export interface AccordionProps {
3
- setActive?: number | null;
4
- items: {
5
- head: ReactNode;
6
- content: ReactNode;
7
- }[];
8
- horizontal?: boolean;
9
- className?: string;
10
- }
11
- export declare function AccordionComponent({ items, setActive, horizontal,
12
- /** Use custom class with: "container::", "head::", "active::". */
13
- className, }: AccordionProps): import("react").JSX.Element;
@@ -1,25 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AccordionComponent = AccordionComponent;
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const react_1 = require("react");
7
- const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
8
- const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
9
- const _utils_1 = require("@utils");
10
- ;
11
- function AccordionComponent({ items, setActive = null, horizontal = false,
12
- /** Use custom class with: "container::", "head::", "active::". */
13
- className = "", }) {
14
- const [isActive, setIsActive] = (0, react_1.useState)(setActive);
15
- (0, react_1.useEffect)(() => {
16
- setIsActive(setActive);
17
- }, [setActive]);
18
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("accordion", horizontal ? "accordion-horizontal" : "accordion-vertical", (0, _utils_1.pcn)(className, "container")), children: items.map(({ head, content }, key) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("accordion-item", horizontal ? "accordion-item-horizontal" : "accordion-item-vertical"), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("accordion-head", horizontal ? "accordion-head-horizontal" : "accordion-head-vertical", (0, _utils_1.pcn)(className, "head")), onClick: () => setIsActive(isActive === key ? null : key), children: [(0, jsx_runtime_1.jsx)("div", { children: head }), (0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("w-min transition-transform", isActive !== key && "rotate-180"), children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: horizontal ? free_solid_svg_icons_1.faChevronLeft : free_solid_svg_icons_1.faChevronDown }) })] }), (0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("accordion-content", horizontal
19
- ? isActive === key
20
- ? "accordion-content-horizontal-active"
21
- : "accordion-content-horizontal-inactive"
22
- : isActive === key
23
- ? "accordion-content-vertical-active"
24
- : "accordion-content-vertical-inactive", (0, _utils_1.pcn)(className, "base"), isActive === key && (0, _utils_1.pcn)(className, "active")), children: content })] }, key))) }));
25
- }
@@ -1,14 +0,0 @@
1
- import { ReactNode } from "react";
2
- export interface BreadcrumbItemProps {
3
- path: string;
4
- label: string;
5
- className?: string;
6
- }
7
- export interface BreadcrumbProps {
8
- items: BreadcrumbItemProps[];
9
- square?: boolean;
10
- separatorContent?: string | ReactNode;
11
- /** Use custom class with: "container::", "active::". */
12
- className?: string;
13
- }
14
- export declare function BreadcrumbComponent({ items, className, square, separatorContent, }: BreadcrumbProps): import("react").JSX.Element;
@@ -1,21 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.BreadcrumbComponent = BreadcrumbComponent;
8
- const jsx_runtime_1 = require("react/jsx-runtime");
9
- const react_1 = require("react");
10
- const link_1 = __importDefault(require("next/link"));
11
- const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
12
- const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
13
- const _utils_1 = require("@utils");
14
- ;
15
- ;
16
- function BreadcrumbComponent({ items, className = "", square = false, separatorContent, }) {
17
- return ((0, jsx_runtime_1.jsx)("nav", { className: (0, _utils_1.cn)("breadcrumb", (0, _utils_1.pcn)(className, "container")), children: (0, jsx_runtime_1.jsx)("ol", { className: "breadcrumb-list", children: items.map((item, index) => {
18
- const isActive = index === items.length - 1;
19
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(link_1.default, { href: item.path, className: (0, _utils_1.cn)("breadcrumb-link", square && "breadcrumb-link-square", isActive && !square && "breadcrumb-link-active", isActive && square && "breadcrumb-link-square-active", (0, _utils_1.pcn)(className, "base"), isActive && (0, _utils_1.pcn)(className, "active")), children: item.label }) }), !isActive && ((0, jsx_runtime_1.jsx)("li", { className: "breadcrumb-separator", children: separatorContent || ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faChevronRight })) }))] }, item.path));
20
- }) }) }));
21
- }