@skalfa/skalfa-component 1.0.8 → 1.0.9

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 (87) hide show
  1. package/dist/accordion/Accordion.component.js +2 -3
  2. package/dist/breadcrumb/Breadcrumb.component.js +2 -3
  3. package/dist/button/Button.component.d.ts +2 -1
  4. package/dist/button/Button.component.js +2 -2
  5. package/dist/carousel/Carousel.component.js +2 -3
  6. package/dist/chip/Chip.component.js +2 -3
  7. package/dist/contexts-mock.d.ts +2 -0
  8. package/dist/contexts-mock.js +10 -0
  9. package/dist/input/Checkbox.component.js +2 -3
  10. package/dist/input/Input.component.d.ts +3 -2
  11. package/dist/input/Input.component.js +3 -3
  12. package/dist/input/InputCheckbox.component.js +1 -1
  13. package/dist/input/InputCurrency.component.d.ts +3 -2
  14. package/dist/input/InputCurrency.component.js +3 -3
  15. package/dist/input/InputDate.component.js +4 -5
  16. package/dist/input/InputDatetime.component.d.ts +3 -2
  17. package/dist/input/InputDatetime.component.js +3 -3
  18. package/dist/input/InputDocument.component.js +7 -8
  19. package/dist/input/InputImage.component.js +3 -4
  20. package/dist/input/InputNumber.component.js +3 -4
  21. package/dist/input/InputPassword.component.js +3 -3
  22. package/dist/input/InputRadio.component.js +1 -1
  23. package/dist/input/InputTime.component.js +3 -3
  24. package/dist/input/InputValues.component.js +3 -4
  25. package/dist/input/Select.component.js +6 -7
  26. package/dist/modal/FloatingPage.component.d.ts +3 -1
  27. package/dist/modal/FloatingPage.component.js +7 -3
  28. package/dist/modal/Modal.component.js +1 -2
  29. package/dist/modal/ModalConfirm.component.d.ts +2 -2
  30. package/dist/modal/ModalConfirm.component.js +14 -12
  31. package/dist/modal/Toast.component.js +1 -2
  32. package/dist/nav/Bottombar.component.d.ts +2 -2
  33. package/dist/nav/Bottombar.component.js +7 -8
  34. package/dist/nav/Footer.component.d.ts +2 -2
  35. package/dist/nav/Footer.component.js +6 -7
  36. package/dist/nav/Headbar.component.js +2 -3
  37. package/dist/nav/Navbar.component.d.ts +2 -2
  38. package/dist/nav/Navbar.component.js +3 -4
  39. package/dist/nav/Sidebar.component.d.ts +3 -7
  40. package/dist/nav/Sidebar.component.js +14 -17
  41. package/dist/supervision/FormSupervision.component.d.ts +4 -29
  42. package/dist/supervision/FormSupervision.component.js +84 -136
  43. package/dist/supervision/TableSupervision.component.d.ts +17 -26
  44. package/dist/supervision/TableSupervision.component.js +207 -193
  45. package/dist/table/ControlBar.component.js +15 -16
  46. package/dist/table/FilterComponent.js +4 -6
  47. package/dist/table/Pagination.component.js +2 -3
  48. package/dist/table/Table.component.js +3 -4
  49. package/dist/wrap/Swipe.component.js +2 -2
  50. package/package.json +18 -10
  51. package/src/accordion/Accordion.component.tsx +3 -3
  52. package/src/breadcrumb/Breadcrumb.component.tsx +4 -4
  53. package/src/button/Button.component.tsx +3 -3
  54. package/src/carousel/Carousel.component.tsx +4 -4
  55. package/src/chip/Chip.component.tsx +3 -4
  56. package/src/contexts-mock.ts +6 -0
  57. package/src/input/Checkbox.component.tsx +3 -3
  58. package/src/input/Input.component.tsx +6 -6
  59. package/src/input/InputCheckbox.component.tsx +1 -1
  60. package/src/input/InputCurrency.component.tsx +6 -6
  61. package/src/input/InputDate.component.tsx +6 -7
  62. package/src/input/InputDatetime.component.tsx +6 -6
  63. package/src/input/InputDocument.component.tsx +9 -9
  64. package/src/input/InputImage.component.tsx +4 -5
  65. package/src/input/InputNumber.component.tsx +7 -8
  66. package/src/input/InputPassword.component.tsx +4 -4
  67. package/src/input/InputRadio.component.tsx +1 -1
  68. package/src/input/InputTime.component.tsx +4 -4
  69. package/src/input/InputValues.component.tsx +5 -6
  70. package/src/input/Select.component.tsx +10 -10
  71. package/src/modal/FloatingPage.component.tsx +33 -3
  72. package/src/modal/Modal.component.tsx +1 -2
  73. package/src/modal/ModalConfirm.component.tsx +34 -49
  74. package/src/modal/Toast.component.tsx +1 -2
  75. package/src/nav/Bottombar.component.tsx +9 -10
  76. package/src/nav/Footer.component.tsx +8 -9
  77. package/src/nav/Headbar.component.tsx +3 -3
  78. package/src/nav/Navbar.component.tsx +9 -10
  79. package/src/nav/Sidebar.component.tsx +55 -46
  80. package/src/supervision/FormSupervision.component.tsx +203 -224
  81. package/src/supervision/TableSupervision.component.tsx +420 -455
  82. package/src/table/ControlBar.component.tsx +16 -16
  83. package/src/table/FilterComponent.tsx +9 -11
  84. package/src/table/Pagination.component.tsx +6 -6
  85. package/src/table/Table.component.tsx +5 -5
  86. package/src/wrap/Swipe.component.tsx +3 -3
  87. package/src/types.d.ts +0 -7
@@ -2,8 +2,7 @@
2
2
 
3
3
  import { InputHTMLAttributes, ReactNode, useEffect, useMemo, useRef, useState } from "react";
4
4
  import moment from "moment";
5
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
6
- import { faChevronLeft, faChevronRight } from "@fortawesome/free-solid-svg-icons";
5
+ import { Icon } from "@skalfa/skalfa-icon";
7
6
  import { cn, pcn, useInputHandler, useInputRandomId, useResponsive, useValidation, validation, ValidationRules } from "@utils";
8
7
  import { BottomSheetComponent } from "../modal/BottomSheet.component";
9
8
  import { ButtonComponent } from "../button/Button.component";
@@ -55,7 +54,7 @@ export function InputDateComponent({
55
54
  // =========================>
56
55
  // ## Initial
57
56
  // =========================>
58
- const inputHandler = useInputHandler(props.name, value, validations, register, unregister, false)
57
+ const inputHandler = useInputHandler(props.name, value, validations, register, false)
59
58
  const randomId = useInputRandomId()
60
59
 
61
60
 
@@ -127,7 +126,7 @@ export function InputDateComponent({
127
126
  />
128
127
 
129
128
  {leftIcon && (
130
- <FontAwesomeIcon
129
+ <Icon
131
130
  className={cn(
132
131
  "input-icon",
133
132
  "input-icon-left",
@@ -142,7 +141,7 @@ export function InputDateComponent({
142
141
  )}
143
142
 
144
143
  {rightIcon && (
145
- <FontAwesomeIcon
144
+ <Icon
146
145
  className={cn(
147
146
  "input-icon",
148
147
  "input-icon-right",
@@ -336,14 +335,14 @@ export const InputDatePickerComponent: React.FC<InputDatePickerProps> = ({
336
335
  onClick={handlePrevMonth}
337
336
  className="w-8 text-sm aspect-square rounded-full cursor-pointer"
338
337
  >
339
- <FontAwesomeIcon icon={faChevronLeft} />
338
+ <Icon icon="solid/chevron-left" />
340
339
  </button>
341
340
  <h2 className="font-semibold">{currentDate.format("MMMM")}</h2>
342
341
  <button
343
342
  onClick={handleNextMonth}
344
343
  className="w-8 text-sm aspect-square rounded-full cursor-pointer"
345
344
  >
346
- <FontAwesomeIcon icon={faChevronRight} />
345
+ <Icon icon="solid/chevron-right" />
347
346
  </button>
348
347
  </div>
349
348
  <div className="grid grid-cols-7 gap-1 mb-2">{renderDays()}</div>
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import { InputHTMLAttributes, ReactNode, useEffect, useState } from "react";
4
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
+ import { Icon, type IconName } from "@skalfa/skalfa-icon";
5
5
  import { cn, pcn, useInputHandler, useInputRandomId, useResponsive, useValidation, validation, ValidationRules } from "@utils";
6
6
  import { OutsideClickComponent } from "../wrap/OutsideClick.component";
7
7
  import { InputDatePickerComponent } from "./InputDate.component";
@@ -17,8 +17,8 @@ type CT = "label" | "tip" | "error" | "input" | "icon";
17
17
  export interface InputDateTimeProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange"> {
18
18
  label ?: string;
19
19
  tip ?: string | ReactNode;
20
- leftIcon ?: any;
21
- rightIcon ?: any;
20
+ leftIcon ?: IconName;
21
+ rightIcon ?: IconName;
22
22
 
23
23
  value ?: string;
24
24
  invalid ?: string;
@@ -61,7 +61,7 @@ export function InputDatetimeComponent({
61
61
  // =========================>
62
62
  // ## Initial
63
63
  // =========================>
64
- const inputHandler = useInputHandler(props.name, value, validations, register, unregister, false)
64
+ const inputHandler = useInputHandler(props.name, value, validations, register, false)
65
65
  const randomId = useInputRandomId()
66
66
 
67
67
 
@@ -143,7 +143,7 @@ export function InputDatetimeComponent({
143
143
  />
144
144
 
145
145
  {leftIcon && (
146
- <FontAwesomeIcon
146
+ <Icon
147
147
  className={cn(
148
148
  "input-icon",
149
149
  "input-icon-left",
@@ -156,7 +156,7 @@ export function InputDatetimeComponent({
156
156
  )}
157
157
 
158
158
  {rightIcon && (
159
- <FontAwesomeIcon
159
+ <Icon
160
160
  className={cn(
161
161
  "input-icon",
162
162
  "input-icon-right",
@@ -1,8 +1,8 @@
1
1
  "use client"
2
+ import { Icon, type IconName } from "@skalfa/skalfa-icon";
3
+
2
4
 
3
5
  import { useState, useRef, InputHTMLAttributes, ReactNode } from "react";
4
- import { faPlus, faTimes } from "@fortawesome/free-solid-svg-icons";
5
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
6
6
  import { cn, pcn, registry, useInputHandler, useInputRandomId, useResponsive, useValidation, validation, ValidationRules } from "@utils";
7
7
  import { ButtonComponent } from "../button/Button.component";
8
8
  import { FloatingPageComponent } from "../modal/FloatingPage.component";
@@ -73,7 +73,7 @@ export function InputDocumentComponent({
73
73
  // =========================>
74
74
  // ## Initial
75
75
  // =========================>
76
- const inputHandler = useInputHandler(props.name, value, validations, register, unregister, props.type == "file")
76
+ const inputHandler = useInputHandler(props.name, value, validations, register, props.type == "file")
77
77
  const randomId = useInputRandomId()
78
78
 
79
79
  // =========================>
@@ -152,7 +152,7 @@ export function InputDocumentComponent({
152
152
  key={f.id}
153
153
  className="input-document-value-item"
154
154
  >
155
- <FontAwesomeIcon icon={DocumentViewerIcon(f.file.name.split(".").pop()?.toLowerCase())} className="text-light-foreground" />
155
+ <Icon icon={DocumentViewerIcon(f.file.name.split(".").pop()?.toLowerCase())} className="text-light-foreground" />
156
156
  <span className="line-clamp-1">{f.file.name}</span>
157
157
  </span>
158
158
  )
@@ -161,7 +161,7 @@ export function InputDocumentComponent({
161
161
  )}
162
162
 
163
163
  {leftIcon && (
164
- <FontAwesomeIcon
164
+ <Icon
165
165
  className={cn(
166
166
  "input-icon",
167
167
  "input-icon-left",
@@ -176,7 +176,7 @@ export function InputDocumentComponent({
176
176
  )}
177
177
 
178
178
  {rightIcon && (
179
- <FontAwesomeIcon
179
+ <Icon
180
180
  className={cn(
181
181
  "input-icon",
182
182
  "input-icon-right",
@@ -306,7 +306,7 @@ export const InputDocumentPicker: React.FC<InputDocumentPickerProps> = ({ value,
306
306
  />
307
307
  ) : (
308
308
  <div className="input-document-empty-box" onClick={() => fileInputRef.current?.click()}>
309
- <FontAwesomeIcon icon={faPlus} className="text-3xl" />
309
+ <Icon icon="solid/plus" className="text-3xl" />
310
310
  <p className="text-lg">Tambah Dokumen</p>
311
311
  </div>
312
312
  )}
@@ -338,7 +338,7 @@ export const InputDocumentPicker: React.FC<InputDocumentPickerProps> = ({ value,
338
338
  />
339
339
 
340
340
  <ButtonComponent
341
- icon={faTimes}
341
+ icon="solid/times"
342
342
  onClick={() => removeFile(f.id)}
343
343
  variant="light"
344
344
  paint="danger"
@@ -350,7 +350,7 @@ export const InputDocumentPicker: React.FC<InputDocumentPickerProps> = ({ value,
350
350
  })}
351
351
 
352
352
  <div className="input-document-upload-box" onClick={() => fileInputRef.current?.click()}>
353
- <FontAwesomeIcon icon={faPlus} />
353
+ <Icon icon="solid/plus" />
354
354
  <p className="text-[10px] text-center">Tambah Dokumen</p>
355
355
  </div>
356
356
  </div>
@@ -1,8 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import { useEffect, useRef, useState } from "react";
4
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5
- import { faHandHolding, faImages, faTimes } from "@fortawesome/free-solid-svg-icons";
4
+ import { Icon } from "@skalfa/skalfa-icon";
6
5
  import { cn, pcn, useInputHandler, useInputRandomId, useResponsive, useValidation, validation, ValidationRules } from "@utils";
7
6
  import { BottomSheetComponent } from "../modal/BottomSheet.component";
8
7
  import { ButtonComponent } from "../button/Button.component";
@@ -57,7 +56,7 @@ export const InputImageComponent: React.FC<InputImageProps> = ({
57
56
  const [cropSrc, setCropSrc] = useState<string | null>(null);
58
57
  const [openCrop, setOpenCrop] = useState(false);
59
58
 
60
- const inputHandler = useInputHandler(name, value, validations, register, unregister, true);
59
+ const inputHandler = useInputHandler(name, value, validations, register, true);
61
60
  const [invalidMessage, setInvalidMessage] = useValidation(inputHandler.value, validations, invalid, inputHandler.idle);
62
61
 
63
62
  useEffect(() => {
@@ -172,7 +171,7 @@ export const InputImageComponent: React.FC<InputImageProps> = ({
172
171
  onDrop={onDropFile}
173
172
  >
174
173
  <div className="input-image-dropzone-content">
175
- <FontAwesomeIcon icon={drag ? faHandHolding : faImages} className="text-3xl" />
174
+ <Icon icon={drag ? "solid/hand-holding" : "solid/images"} className="text-3xl" />
176
175
  <p className="input-image-dropzone-text">{drag ? "Letakkan di sini" : preview ? "Klik atau seret untuk ganti Gambar" : "Klik atau seret gambar"}</p>
177
176
  </div>
178
177
 
@@ -190,7 +189,7 @@ export const InputImageComponent: React.FC<InputImageProps> = ({
190
189
 
191
190
  {preview && !disabled && (
192
191
  <ButtonComponent
193
- icon={faTimes}
192
+ icon="solid/times"
194
193
  paint="danger"
195
194
  size="sm"
196
195
  className="absolute top-10 right-4"
@@ -1,8 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import React, { InputHTMLAttributes, ReactNode } from "react";
4
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5
- import { faSortDown, faSortUp } from "@fortawesome/free-solid-svg-icons";
4
+ import { Icon } from "@skalfa/skalfa-icon";
6
5
  import { cn, pcn, useInputHandler, useInputRandomId, useValidation, validation, ValidationRules } from "@utils";
7
6
 
8
7
 
@@ -54,7 +53,7 @@ export function InputNumberComponent({
54
53
  // =========================>
55
54
  // ## Initial
56
55
  // =========================>
57
- const inputHandler = useInputHandler(props.name, value, validations, register, unregister, false)
56
+ const inputHandler = useInputHandler(props.name, value, validations, register, false)
58
57
  const randomId = useInputRandomId()
59
58
 
60
59
 
@@ -144,7 +143,7 @@ export function InputNumberComponent({
144
143
  />
145
144
 
146
145
  {leftIcon && (
147
- <FontAwesomeIcon
146
+ <Icon
148
147
  className={cn(
149
148
  "input-icon",
150
149
  "input-icon-left",
@@ -171,14 +170,14 @@ export function InputNumberComponent({
171
170
  )}
172
171
  >
173
172
  <div className="input-number-sort-container">
174
- <FontAwesomeIcon
173
+ <Icon
175
174
  className="input-number-sort-up"
176
- icon={faSortUp}
175
+ icon="solid/chevron-up"
177
176
  onClick={() => inputHandler.setValue(String(Number(inputHandler.value) + 1))}
178
177
  />
179
- <FontAwesomeIcon
178
+ <Icon
180
179
  className="input-number-sort-down"
181
- icon={faSortDown}
180
+ icon="solid/chevron-down"
182
181
  onClick={() => inputHandler.setValue(String(Number(inputHandler.value) - 1))}
183
182
  />
184
183
  </div>
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import { InputHTMLAttributes, ReactNode, useEffect, useState } from "react";
4
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
+ import { Icon } from "@skalfa/skalfa-icon";
5
5
  import { cn, pcn, useInputHandler, useInputRandomId, useValidation, validation, ValidationRules } from "@utils";
6
6
 
7
7
 
@@ -53,7 +53,7 @@ export function InputPasswordComponent({
53
53
  // =========================>
54
54
  // ## Initial
55
55
  // =========================>
56
- const inputHandler = useInputHandler(props.name, value, validations, register, unregister, false)
56
+ const inputHandler = useInputHandler(props.name, value, validations, register, false)
57
57
  const randomId = useInputRandomId()
58
58
  const randomConfirmId = useInputRandomId()
59
59
 
@@ -145,7 +145,7 @@ export function InputPasswordComponent({
145
145
  />
146
146
 
147
147
  {leftIcon && (
148
- <FontAwesomeIcon
148
+ <Icon
149
149
  className={cn(
150
150
  "input-icon",
151
151
  "input-icon-left",
@@ -155,7 +155,7 @@ export function InputPasswordComponent({
155
155
  />
156
156
  )}
157
157
  {rightIcon && (
158
- <FontAwesomeIcon
158
+ <Icon
159
159
  className={cn(
160
160
  "input-icon",
161
161
  "input-icon-right",
@@ -68,7 +68,7 @@ export function InputRadioComponent({
68
68
  // =========================>
69
69
  // ## Initial
70
70
  // =========================>
71
- const inputHandler = useInputHandler(name, value, validations, register, unregister, false)
71
+ const inputHandler = useInputHandler(name, value, validations, register, false)
72
72
 
73
73
 
74
74
  // =========================>
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import { FC, InputHTMLAttributes, ReactNode, useEffect, useMemo, useState } from "react";
4
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
+ import { Icon } from "@skalfa/skalfa-icon";
5
5
  import { cn, pcn, useInputHandler, useInputRandomId, useResponsive, useValidation, validation, ValidationRules } from "@utils";
6
6
  import { BottomSheetComponent } from "../modal/BottomSheet.component";
7
7
  import { ButtonComponent } from "../button/Button.component";
@@ -53,7 +53,7 @@ export function InputTimeComponent({
53
53
  // =========================>
54
54
  // ## Initial
55
55
  // =========================>
56
- const inputHandler = useInputHandler(props.name, value, validations, register, unregister, false)
56
+ const inputHandler = useInputHandler(props.name, value, validations, register, false)
57
57
  const randomId = useInputRandomId()
58
58
 
59
59
 
@@ -117,7 +117,7 @@ export function InputTimeComponent({
117
117
  />
118
118
 
119
119
  {leftIcon && (
120
- <FontAwesomeIcon
120
+ <Icon
121
121
  className={cn(
122
122
  "input-icon",
123
123
  "input-icon-left",
@@ -130,7 +130,7 @@ export function InputTimeComponent({
130
130
  )}
131
131
 
132
132
  {rightIcon && (
133
- <FontAwesomeIcon
133
+ <Icon
134
134
  className={cn(
135
135
  "input-icon",
136
136
  "input-icon-right",
@@ -1,6 +1,5 @@
1
+ import { Icon, type IconName } from "@skalfa/skalfa-icon";
1
2
  import { CSSProperties } from 'react';
2
- import { faTimes } from '@fortawesome/free-solid-svg-icons';
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
3
  import { cn } from '@utils';
5
4
 
6
5
  export function InputValues({
@@ -30,8 +29,8 @@ export function InputValues({
30
29
  return (
31
30
  <div key={key} className="input-values-item">
32
31
  <span className="">{item}</span>
33
- <FontAwesomeIcon
34
- icon={faTimes}
32
+ <Icon
33
+ icon="solid/times"
35
34
  className="input-values-delete"
36
35
  onClick={() => onDelete?.(item, key)}
37
36
  />
@@ -55,8 +54,8 @@ export function InputValues({
55
54
  return (
56
55
  <div key={key} className="input-values-item">
57
56
  <span>{item}</span>
58
- <FontAwesomeIcon
59
- icon={faTimes}
57
+ <Icon
58
+ icon="solid/times"
60
59
  className="input-values-delete"
61
60
  onClick={() => onDelete?.(item, key)}
62
61
  />
@@ -1,8 +1,8 @@
1
1
  "use client"
2
+ import { Icon, type IconName } from "@skalfa/skalfa-icon";
3
+
2
4
 
3
5
  import { ReactNode, useEffect, useState } from "react";
4
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5
- import { faCheck, faChevronDown, faTimes,} from "@fortawesome/free-solid-svg-icons";
6
6
  import { api, ApiType, cavity, cn, pcn, registry, useInputHandler, useInputRandomId, useLazySearch, useValidation, validation, ValidationRules,} from "@utils";
7
7
 
8
8
 
@@ -105,7 +105,7 @@ export function SelectComponent({
105
105
  // =========================>
106
106
  // ## Initial
107
107
  // =========================>
108
- const inputHandler = useInputHandler(name, value, validations, register, unregister, false)
108
+ const inputHandler = useInputHandler(name, value, validations, register, false)
109
109
  const randomId = useInputRandomId()
110
110
 
111
111
 
@@ -403,8 +403,8 @@ export function SelectComponent({
403
403
  return (
404
404
  <div key={key} className="input-values-item">
405
405
  <span>{dataOptions?.find((option) => option.value == item)?.label}</span>
406
- <FontAwesomeIcon
407
- icon={faTimes}
406
+ <Icon
407
+ icon="solid/times"
408
408
  className="input-values-delete"
409
409
  onClick={() => {
410
410
  const values = Array().concat(inputHandler.value);
@@ -428,7 +428,7 @@ export function SelectComponent({
428
428
 
429
429
 
430
430
  {leftIcon && (
431
- <FontAwesomeIcon
431
+ <Icon
432
432
  className={cn(
433
433
  "input-icon",
434
434
  "input-icon-left",
@@ -457,7 +457,7 @@ export function SelectComponent({
457
457
  onChange?.("");
458
458
  }}
459
459
  >
460
- <FontAwesomeIcon icon={faTimes} />
460
+ <Icon icon="solid/times" />
461
461
  </div>
462
462
  )}
463
463
 
@@ -472,7 +472,7 @@ export function SelectComponent({
472
472
  disabled && pcn<CT>(className, "icon", "disabled")
473
473
  )}
474
474
  >
475
- <FontAwesomeIcon icon={faChevronDown} />
475
+ <Icon icon="solid/chevron-down" />
476
476
  </label>
477
477
  </div>
478
478
 
@@ -535,8 +535,8 @@ export function SelectComponent({
535
535
  }}
536
536
  >
537
537
  {selected && (
538
- <FontAwesomeIcon
539
- icon={faCheck}
538
+ <Icon
539
+ icon="solid/check"
540
540
  className="select-suggest-check"
541
541
  />
542
542
  )}
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
 
3
3
  import { ReactNode, useEffect } from "react";
4
- import { faTimes } from "@fortawesome/free-solid-svg-icons";
5
4
  import { ButtonComponent } from "../button/Button.component";
6
- import { cn, pcn, shortcut } from "@utils";
5
+ import { cn, pcn, shortcut, useResponsive } from "@utils";
6
+ import { BottomSheetComponent } from "./BottomSheet.component";
7
7
 
8
8
 
9
9
 
@@ -16,9 +16,12 @@ export interface FloatingPageProps {
16
16
  children ?: any;
17
17
  tip ?: string | ReactNode;
18
18
  footer ?: string | ReactNode;
19
+ size ?: string | number;
20
+ maxSize ?: string | number;
19
21
 
20
22
  /** Use custom class with: "backdrop::", "header::", "footer::". */
21
23
  className ?: string;
24
+
22
25
  };
23
26
 
24
27
 
@@ -31,7 +34,10 @@ export function FloatingPageComponent({
31
34
  tip,
32
35
  footer,
33
36
  className = "",
37
+ size,
38
+ maxSize,
34
39
  }: FloatingPageProps) {
40
+ const { isSm } = useResponsive();
35
41
 
36
42
  useEffect(() => {
37
43
  if (show) {
@@ -50,6 +56,30 @@ export function FloatingPageComponent({
50
56
  }
51
57
  }, [show]);
52
58
 
59
+ if (isSm) {
60
+ return (
61
+ <BottomSheetComponent
62
+ show={show}
63
+ onClose={onClose}
64
+ size={size}
65
+ maxSize={maxSize}
66
+ footer={footer}
67
+ className={className}
68
+ >
69
+ <div className={cn("modal-header", pcn<CT>(className, "header"))}>
70
+ {title && (
71
+ <div>
72
+ <h6 className="modal-title">{title}</h6>
73
+ {tip && <p className="modal-tip">{tip}</p>}
74
+ </div>
75
+ )}
76
+ </div>
77
+
78
+ {show && children}
79
+ </BottomSheetComponent>
80
+ );
81
+ }
82
+
53
83
  return (
54
84
  <>
55
85
  <div
@@ -77,7 +107,7 @@ export function FloatingPageComponent({
77
107
  )}
78
108
 
79
109
  <ButtonComponent
80
- icon={faTimes}
110
+ icon="solid/times"
81
111
  variant="simple"
82
112
  paint="danger"
83
113
  onClick={() => onClose()}
@@ -1,7 +1,6 @@
1
1
  "use client"
2
2
 
3
3
  import { ReactNode, useEffect } from "react";
4
- import { faTimes } from "@fortawesome/free-solid-svg-icons";
5
4
  import { cn, pcn, shortcut } from "@utils";
6
5
  import { ButtonComponent } from "../button/Button.component";
7
6
 
@@ -74,7 +73,7 @@ export function ModalComponent({
74
73
  </div>
75
74
 
76
75
  <ButtonComponent
77
- icon={faTimes}
76
+ icon="solid/times"
78
77
  variant="simple"
79
78
  paint="danger"
80
79
  onClick={() => onClose()}