@seedgrid/fe-components 2026.3.5 → 2026.3.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.
- package/dist/buttons/SgFloatActionButton.d.ts +2 -3
- package/dist/buttons/SgFloatActionButton.d.ts.map +1 -1
- package/dist/buttons/SgFloatActionButton.js +3 -3
- package/dist/buttons/SgSplitButton.d.ts +1 -0
- package/dist/buttons/SgSplitButton.d.ts.map +1 -1
- package/dist/buttons/SgSplitButton.js +2 -2
- package/dist/commons/SgBadge.d.ts +2 -1
- package/dist/commons/SgBadge.d.ts.map +1 -1
- package/dist/commons/SgBadge.js +8 -7
- package/dist/commons/SgBadgeOverlay.d.ts +1 -0
- package/dist/commons/SgBadgeOverlay.d.ts.map +1 -1
- package/dist/commons/SgBadgeOverlay.js +2 -2
- package/dist/commons/SgToastHost.d.ts +17 -0
- package/dist/commons/SgToastHost.d.ts.map +1 -0
- package/dist/commons/SgToastHost.js +45 -0
- package/dist/commons/SgToaster.d.ts +3 -1
- package/dist/commons/SgToaster.d.ts.map +1 -1
- package/dist/commons/SgToaster.js +13 -0
- package/dist/commons/sgToastHostRegistry.d.ts +7 -0
- package/dist/commons/sgToastHostRegistry.d.ts.map +1 -0
- package/dist/commons/sgToastHostRegistry.js +41 -0
- package/dist/gadgets/clock/SgClock.d.ts +2 -1
- package/dist/gadgets/clock/SgClock.d.ts.map +1 -1
- package/dist/gadgets/clock/SgClock.js +15 -15
- package/dist/gadgets/string-animator/SgStringAnimator.d.ts +1 -1
- package/dist/gadgets/string-animator/SgStringAnimator.d.ts.map +1 -1
- package/dist/gadgets/string-animator/SgStringAnimator.js +1 -1
- package/dist/i18n/en-US.d.ts.map +1 -1
- package/dist/i18n/en-US.js +16 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +16 -1
- package/dist/i18n/pt-BR.d.ts.map +1 -1
- package/dist/i18n/pt-BR.js +16 -1
- package/dist/i18n/pt-PT.d.ts.map +1 -1
- package/dist/i18n/pt-PT.js +16 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/inputs/SgCheckboxGroup.d.ts +46 -0
- package/dist/inputs/SgCheckboxGroup.d.ts.map +1 -0
- package/dist/inputs/SgCheckboxGroup.js +158 -0
- package/dist/inputs/{SgCurrencyEdit.d.ts → SgInputCurrency.d.ts} +5 -3
- package/dist/inputs/SgInputCurrency.d.ts.map +1 -0
- package/dist/inputs/{SgCurrencyEdit.js → SgInputCurrency.js} +7 -5
- package/dist/inputs/SgOrderList.d.ts +52 -0
- package/dist/inputs/SgOrderList.d.ts.map +1 -0
- package/dist/inputs/SgOrderList.js +316 -0
- package/dist/inputs/SgPickList.d.ts +71 -0
- package/dist/inputs/SgPickList.d.ts.map +1 -0
- package/dist/inputs/SgPickList.js +362 -0
- package/dist/inputs/SgRadioGroup.d.ts +1 -2
- package/dist/inputs/SgRadioGroup.d.ts.map +1 -1
- package/dist/inputs/SgRadioGroup.js +5 -49
- package/dist/inputs/SgRating.d.ts +2 -0
- package/dist/inputs/SgRating.d.ts.map +1 -1
- package/dist/inputs/SgRating.js +2 -2
- package/dist/inputs/SgTextEditor.d.ts +2 -0
- package/dist/inputs/SgTextEditor.d.ts.map +1 -1
- package/dist/inputs/SgTextEditor.js +2 -2
- package/dist/layout/SgCard.d.ts +1 -1
- package/dist/layout/SgCard.d.ts.map +1 -1
- package/dist/layout/SgCard.js +4 -4
- package/dist/layout/SgCarousel.d.ts +2 -0
- package/dist/layout/SgCarousel.d.ts.map +1 -1
- package/dist/layout/SgCarousel.js +2 -2
- package/dist/layout/SgDockLayout.d.ts +1 -0
- package/dist/layout/SgDockLayout.d.ts.map +1 -1
- package/dist/layout/SgDockLayout.js +2 -2
- package/dist/layout/SgDockZone.d.ts +1 -0
- package/dist/layout/SgDockZone.d.ts.map +1 -1
- package/dist/layout/SgDockZone.js +2 -2
- package/dist/layout/SgGroupBox.d.ts +1 -0
- package/dist/layout/SgGroupBox.d.ts.map +1 -1
- package/dist/layout/SgGroupBox.js +3 -2
- package/dist/layout/SgMenu.d.ts +2 -2
- package/dist/layout/SgMenu.d.ts.map +1 -1
- package/dist/layout/SgMenu.js +22 -22
- package/dist/layout/SgPageControl.d.ts +2 -1
- package/dist/layout/SgPageControl.d.ts.map +1 -1
- package/dist/layout/SgPageControl.js +4 -4
- package/dist/layout/SgToolBar.d.ts +2 -0
- package/dist/layout/SgToolBar.d.ts.map +1 -1
- package/dist/layout/SgToolBar.js +4 -3
- package/dist/layout/SgTreeView.d.ts +1 -0
- package/dist/layout/SgTreeView.d.ts.map +1 -1
- package/dist/layout/SgTreeView.js +2 -2
- package/dist/others/SgPlayground.d.ts +2 -0
- package/dist/others/SgPlayground.d.ts.map +1 -1
- package/dist/others/SgPlayground.js +4 -4
- package/dist/overlay/SgDialog.d.ts +1 -0
- package/dist/overlay/SgDialog.d.ts.map +1 -1
- package/dist/overlay/SgDialog.js +2 -2
- package/dist/sandbox.cjs +96 -78
- package/dist/wizard/SgWizard.d.ts +2 -0
- package/dist/wizard/SgWizard.d.ts.map +1 -1
- package/dist/wizard/SgWizard.js +2 -2
- package/package.json +1 -1
- package/dist/inputs/SgCurrencyEdit.d.ts.map +0 -1
package/dist/i18n/es.js
CHANGED
|
@@ -80,6 +80,21 @@ const es = {
|
|
|
80
80
|
"components.actions.confirm": "Confirmar",
|
|
81
81
|
"components.rating.required": "Por favor, proporcione una calificación",
|
|
82
82
|
"components.rating.cancel": "Cancelar calificación",
|
|
83
|
-
"components.radiogroup.cancel": "Ninguna opción"
|
|
83
|
+
"components.radiogroup.cancel": "Ninguna opción",
|
|
84
|
+
"components.checkboxgroup.checkAll": "Seleccionar todos",
|
|
85
|
+
"components.orderlist.moveTop": "Mover al inicio",
|
|
86
|
+
"components.orderlist.moveUp": "Mover hacia arriba",
|
|
87
|
+
"components.orderlist.moveDown": "Mover hacia abajo",
|
|
88
|
+
"components.orderlist.moveBottom": "Mover al final",
|
|
89
|
+
"components.orderlist.empty": "No hay elementos disponibles.",
|
|
90
|
+
"components.picklist.moveToTarget": "Mover seleccionados al destino",
|
|
91
|
+
"components.picklist.moveAllToTarget": "Mover todos al destino",
|
|
92
|
+
"components.picklist.moveToSource": "Mover seleccionados al origen",
|
|
93
|
+
"components.picklist.moveAllToSource": "Mover todos al origen",
|
|
94
|
+
"components.picklist.sourceHeader": "Origen",
|
|
95
|
+
"components.picklist.targetHeader": "Destino",
|
|
96
|
+
"components.picklist.sourceFilterPlaceholder": "Buscar en origen",
|
|
97
|
+
"components.picklist.targetFilterPlaceholder": "Buscar en destino",
|
|
98
|
+
"components.picklist.empty": "No hay elementos disponibles."
|
|
84
99
|
};
|
|
85
100
|
export default es;
|
package/dist/i18n/pt-BR.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/i18n/pt-BR.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/i18n/pt-BR.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkGhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/dist/i18n/pt-BR.js
CHANGED
|
@@ -80,6 +80,21 @@ const ptBR = {
|
|
|
80
80
|
"components.actions.confirm": "Confirmar",
|
|
81
81
|
"components.rating.required": "Por favor, forneça uma avaliação",
|
|
82
82
|
"components.rating.cancel": "Cancelar avaliação",
|
|
83
|
-
"components.radiogroup.cancel": "Nenhuma opção"
|
|
83
|
+
"components.radiogroup.cancel": "Nenhuma opção",
|
|
84
|
+
"components.checkboxgroup.checkAll": "Selecionar todos",
|
|
85
|
+
"components.orderlist.moveTop": "Mover para o topo",
|
|
86
|
+
"components.orderlist.moveUp": "Mover para cima",
|
|
87
|
+
"components.orderlist.moveDown": "Mover para baixo",
|
|
88
|
+
"components.orderlist.moveBottom": "Mover para o fim",
|
|
89
|
+
"components.orderlist.empty": "Nenhum item disponivel.",
|
|
90
|
+
"components.picklist.moveToTarget": "Mover selecionado para destino",
|
|
91
|
+
"components.picklist.moveAllToTarget": "Mover todos para destino",
|
|
92
|
+
"components.picklist.moveToSource": "Mover selecionado para origem",
|
|
93
|
+
"components.picklist.moveAllToSource": "Mover todos para origem",
|
|
94
|
+
"components.picklist.sourceHeader": "Origem",
|
|
95
|
+
"components.picklist.targetHeader": "Destino",
|
|
96
|
+
"components.picklist.sourceFilterPlaceholder": "Buscar na origem",
|
|
97
|
+
"components.picklist.targetFilterPlaceholder": "Buscar no destino",
|
|
98
|
+
"components.picklist.empty": "Nenhum item disponivel."
|
|
84
99
|
};
|
|
85
100
|
export default ptBR;
|
package/dist/i18n/pt-PT.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt-PT.d.ts","sourceRoot":"","sources":["../../src/i18n/pt-PT.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pt-PT.d.ts","sourceRoot":"","sources":["../../src/i18n/pt-PT.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkGhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/dist/i18n/pt-PT.js
CHANGED
|
@@ -80,6 +80,21 @@ const ptPT = {
|
|
|
80
80
|
"components.actions.confirm": "Confirmar",
|
|
81
81
|
"components.rating.required": "Por favor, forneça uma avaliação",
|
|
82
82
|
"components.rating.cancel": "Cancelar avaliação",
|
|
83
|
-
"components.radiogroup.cancel": "Nenhuma opção"
|
|
83
|
+
"components.radiogroup.cancel": "Nenhuma opção",
|
|
84
|
+
"components.checkboxgroup.checkAll": "Selecionar todos",
|
|
85
|
+
"components.orderlist.moveTop": "Mover para o topo",
|
|
86
|
+
"components.orderlist.moveUp": "Mover para cima",
|
|
87
|
+
"components.orderlist.moveDown": "Mover para baixo",
|
|
88
|
+
"components.orderlist.moveBottom": "Mover para o fim",
|
|
89
|
+
"components.orderlist.empty": "Nenhum item disponivel.",
|
|
90
|
+
"components.picklist.moveToTarget": "Mover selecionado para destino",
|
|
91
|
+
"components.picklist.moveAllToTarget": "Mover todos para destino",
|
|
92
|
+
"components.picklist.moveToSource": "Mover selecionado para origem",
|
|
93
|
+
"components.picklist.moveAllToSource": "Mover todos para origem",
|
|
94
|
+
"components.picklist.sourceHeader": "Origem",
|
|
95
|
+
"components.picklist.targetHeader": "Destino",
|
|
96
|
+
"components.picklist.sourceFilterPlaceholder": "Pesquisar na origem",
|
|
97
|
+
"components.picklist.targetFilterPlaceholder": "Pesquisar no destino",
|
|
98
|
+
"components.picklist.empty": "Nenhum item disponivel."
|
|
84
99
|
};
|
|
85
100
|
export default ptPT;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { SgInputText } from "./inputs/SgInputText";
|
|
|
2
2
|
export type { SgInputTextProps } from "./inputs/SgInputText";
|
|
3
3
|
export { SgInputNumber } from "./inputs/SgInputNumber";
|
|
4
4
|
export type { SgInputNumberProps } from "./inputs/SgInputNumber";
|
|
5
|
-
export { SgCurrencyEdit } from "./inputs/
|
|
6
|
-
export type { SgCurrencyEditProps } from "./inputs/
|
|
5
|
+
export { SgInputCurrency, SgCurrencyEdit } from "./inputs/SgInputCurrency";
|
|
6
|
+
export type { SgInputCurrencyProps, SgCurrencyEditProps } from "./inputs/SgInputCurrency";
|
|
7
7
|
export { SgInputTextArea } from "./inputs/SgInputTextArea";
|
|
8
8
|
export type { SgInputTextAreaProps } from "./inputs/SgInputTextArea";
|
|
9
9
|
export { SgInputSelect } from "./inputs/SgInputSelect";
|
|
@@ -40,16 +40,24 @@ export { SgRating } from "./inputs/SgRating";
|
|
|
40
40
|
export type { SgRatingProps, SgRatingSize } from "./inputs/SgRating";
|
|
41
41
|
export { SgRadioGroup } from "./inputs/SgRadioGroup";
|
|
42
42
|
export type { SgRadioGroupProps, SgRadioGroupOption, SgRadioGroupOrientation, SgRadioGroupSelectionStyle } from "./inputs/SgRadioGroup";
|
|
43
|
+
export { SgCheckboxGroup } from "./inputs/SgCheckboxGroup";
|
|
44
|
+
export type { SgCheckboxGroupProps, SgCheckboxGroupOption, SgCheckboxGroupOrientation, SgCheckboxGroupSelectionStyle, SgCheckboxGroupRef } from "./inputs/SgCheckboxGroup";
|
|
45
|
+
export { SgOrderList } from "./inputs/SgOrderList";
|
|
46
|
+
export type { SgOrderListProps, SgOrderListItem, SgOrderListSelectionMode, SgOrderListControlsPosition, SgOrderListRef } from "./inputs/SgOrderList";
|
|
47
|
+
export { SgPickList } from "./inputs/SgPickList";
|
|
48
|
+
export type { SgPickListProps, SgPickListItem, SgPickListListName, SgPickListSelectionMode, SgPickListFilterMatchMode, SgPickListChangeType, SgPickListValue, SgPickListChangeEvent, SgPickListRef } from "./inputs/SgPickList";
|
|
43
49
|
export { SgButton } from "./buttons/SgButton";
|
|
44
50
|
export type { SgButtonProps, SgButtonCustomColors } from "./buttons/SgButton";
|
|
45
51
|
export { SgSplitButton } from "./buttons/SgSplitButton";
|
|
46
52
|
export type { SgSplitButtonProps, SgSplitButtonItem } from "./buttons/SgSplitButton";
|
|
47
53
|
export { SgFloatActionButton } from "./buttons/SgFloatActionButton";
|
|
48
|
-
export type { SgFloatActionButtonProps, SgFABAction, FABPosition, FABSeverity,
|
|
54
|
+
export type { SgFloatActionButtonProps, SgFABAction, FABPosition, FABSeverity, FABSize, FABShape, FABElevation, FABAnimation, FABAnimationTrigger, FABLayoutType } from "./buttons/SgFloatActionButton";
|
|
49
55
|
export { SgDockMenu } from "./menus/SgDockMenu";
|
|
50
56
|
export type { SgDockMenuProps, SgDockMenuItem, SgDockMenuPosition, SgDockMenuOrientation } from "./menus/SgDockMenu";
|
|
51
57
|
export { SgToaster } from "./commons/SgToaster";
|
|
52
58
|
export type { SgToasterProps, SgToasterPosition, SgToasterTypeColors, SgToasterCustomColors } from "./commons/SgToaster";
|
|
59
|
+
export { SgToastHost } from "./commons/SgToastHost";
|
|
60
|
+
export type { SgToastHostProps } from "./commons/SgToastHost";
|
|
53
61
|
export { SgPopup } from "./overlay/SgPopup";
|
|
54
62
|
export type { SgPopupProps, SgPopupAction, SgPopupPlacement, SgPopupPreferPlacement, SgPopupAlign, SgPopupSeverity } from "./overlay/SgPopup";
|
|
55
63
|
export { SgDialog } from "./overlay/SgDialog";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,YAAY,EAAE,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BAAiB,EACjB,CAAC,IAAI,WAAW,EAChB,aAAa,IAAI,uBAAuB,EACxC,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,+BAA+B,EAChC,MAAM,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { SgInputText } from "./inputs/SgInputText";
|
|
2
2
|
export { SgInputNumber } from "./inputs/SgInputNumber";
|
|
3
|
-
export { SgCurrencyEdit } from "./inputs/
|
|
3
|
+
export { SgInputCurrency, SgCurrencyEdit } from "./inputs/SgInputCurrency";
|
|
4
4
|
export { SgInputTextArea } from "./inputs/SgInputTextArea";
|
|
5
5
|
export { SgInputSelect } from "./inputs/SgInputSelect";
|
|
6
6
|
export { SgInputCPF } from "./inputs/SgInputCPF";
|
|
@@ -21,11 +21,15 @@ export { SgCombobox } from "./inputs/SgCombobox";
|
|
|
21
21
|
export { SgTextEditor } from "./inputs/SgTextEditor";
|
|
22
22
|
export { SgRating } from "./inputs/SgRating";
|
|
23
23
|
export { SgRadioGroup } from "./inputs/SgRadioGroup";
|
|
24
|
+
export { SgCheckboxGroup } from "./inputs/SgCheckboxGroup";
|
|
25
|
+
export { SgOrderList } from "./inputs/SgOrderList";
|
|
26
|
+
export { SgPickList } from "./inputs/SgPickList";
|
|
24
27
|
export { SgButton } from "./buttons/SgButton";
|
|
25
28
|
export { SgSplitButton } from "./buttons/SgSplitButton";
|
|
26
29
|
export { SgFloatActionButton } from "./buttons/SgFloatActionButton";
|
|
27
30
|
export { SgDockMenu } from "./menus/SgDockMenu";
|
|
28
31
|
export { SgToaster } from "./commons/SgToaster";
|
|
32
|
+
export { SgToastHost } from "./commons/SgToastHost";
|
|
29
33
|
export { SgPopup } from "./overlay/SgPopup";
|
|
30
34
|
export { SgDialog } from "./overlay/SgDialog";
|
|
31
35
|
export { SgBadge } from "./commons/SgBadge";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UseFormRegister, FieldValues } from "react-hook-form";
|
|
3
|
+
import { type SgGroupBoxProps } from "../layout/SgGroupBox";
|
|
4
|
+
export type SgCheckboxGroupOrientation = "horizontal" | "vertical";
|
|
5
|
+
export type SgCheckboxGroupSelectionStyle = "checkbox" | "highlight";
|
|
6
|
+
export interface SgCheckboxGroupOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string | number;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type SgCheckboxGroupRef = {
|
|
14
|
+
getChecked: () => (string | number)[];
|
|
15
|
+
setChecked: (values: (string | number)[]) => void;
|
|
16
|
+
checkAll: () => void;
|
|
17
|
+
clearAll: () => void;
|
|
18
|
+
};
|
|
19
|
+
export interface SgCheckboxGroupProps {
|
|
20
|
+
id?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
source: SgCheckboxGroupOption[];
|
|
23
|
+
value?: (string | number)[];
|
|
24
|
+
orientation?: SgCheckboxGroupOrientation;
|
|
25
|
+
selectionStyle?: SgCheckboxGroupSelectionStyle;
|
|
26
|
+
iconOnly?: boolean;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
required?: boolean;
|
|
30
|
+
onChange?: (value: (string | number)[]) => void;
|
|
31
|
+
showCheckAll?: boolean;
|
|
32
|
+
checkAllLabel?: string;
|
|
33
|
+
checkAllIcon?: React.ReactNode;
|
|
34
|
+
name?: string;
|
|
35
|
+
control?: any;
|
|
36
|
+
register?: UseFormRegister<FieldValues>;
|
|
37
|
+
error?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
style?: React.CSSProperties;
|
|
40
|
+
optionClassName?: string;
|
|
41
|
+
groupBoxProps?: Omit<Partial<SgGroupBoxProps>, "children" | "title"> & {
|
|
42
|
+
title?: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export declare const SgCheckboxGroup: React.ForwardRefExoticComponent<SgCheckboxGroupProps & React.RefAttributes<SgCheckboxGroupRef>>;
|
|
46
|
+
//# sourceMappingURL=SgCheckboxGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SgCheckboxGroup.d.ts","sourceRoot":"","sources":["../../src/inputs/SgCheckboxGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,WAAW,EAAc,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGxE,MAAM,MAAM,0BAA0B,GAAG,YAAY,GAAG,UAAU,CAAC;AACnE,MAAM,MAAM,6BAA6B,GAAG,UAAU,GAAG,WAAW,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACtC,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC,cAAc,CAAC,EAAE,6BAA6B,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;IAGhD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAG/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,QAAQ,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3F;AAiWD,eAAO,MAAM,eAAe,iGAE3B,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Controller } from "react-hook-form";
|
|
5
|
+
import { SgGroupBox } from "../layout/SgGroupBox";
|
|
6
|
+
import { t, useComponentsI18n } from "../i18n";
|
|
7
|
+
function deriveInitialValue(source) {
|
|
8
|
+
return source.filter((opt) => opt.checked).map((opt) => opt.value);
|
|
9
|
+
}
|
|
10
|
+
// Internal component — plain function, no forwardRef, safe for self-reference inside Controller
|
|
11
|
+
function SgCheckboxGroupBase(props, imperativeRef) {
|
|
12
|
+
const i18n = useComponentsI18n();
|
|
13
|
+
const { id, title, source, value: controlledValue, orientation = "vertical", selectionStyle = "checkbox", iconOnly = false, disabled = false, readOnly = false, required = false, onChange, showCheckAll = false, checkAllLabel, checkAllIcon, name, control, register, error, className = "", style, optionClassName = "", groupBoxProps = {} } = props;
|
|
14
|
+
const resolvedCheckAllLabel = checkAllLabel ?? t(i18n, "components.checkboxgroup.checkAll") ?? "Selecionar todos";
|
|
15
|
+
const resolvedGroupBoxTitle = (() => {
|
|
16
|
+
const baseTitle = groupBoxProps.title ?? title ?? "";
|
|
17
|
+
if (!required || !baseTitle.trim())
|
|
18
|
+
return baseTitle;
|
|
19
|
+
return baseTitle.includes("*") ? baseTitle : `${baseTitle} *`;
|
|
20
|
+
})();
|
|
21
|
+
const [internalValue, setInternalValue] = React.useState(() => controlledValue ?? deriveInitialValue(source));
|
|
22
|
+
const isControlled = controlledValue !== undefined;
|
|
23
|
+
const currentValue = isControlled ? controlledValue : internalValue;
|
|
24
|
+
const isHighlightSelection = selectionStyle === "highlight";
|
|
25
|
+
const handleChange = (optionValue) => {
|
|
26
|
+
if (disabled || readOnly)
|
|
27
|
+
return;
|
|
28
|
+
const next = currentValue.includes(optionValue)
|
|
29
|
+
? currentValue.filter((v) => v !== optionValue)
|
|
30
|
+
: [...currentValue, optionValue];
|
|
31
|
+
if (!isControlled)
|
|
32
|
+
setInternalValue(next);
|
|
33
|
+
onChange?.(next);
|
|
34
|
+
};
|
|
35
|
+
const handleCheckAll = () => {
|
|
36
|
+
if (disabled || readOnly)
|
|
37
|
+
return;
|
|
38
|
+
const enabledValues = source.filter((opt) => !opt.disabled).map((opt) => opt.value);
|
|
39
|
+
const next = currentValue.length === enabledValues.length ? [] : enabledValues;
|
|
40
|
+
if (!isControlled)
|
|
41
|
+
setInternalValue(next);
|
|
42
|
+
onChange?.(next);
|
|
43
|
+
};
|
|
44
|
+
React.useImperativeHandle(imperativeRef, () => ({
|
|
45
|
+
getChecked: () => currentValue,
|
|
46
|
+
setChecked: (values) => {
|
|
47
|
+
if (!isControlled)
|
|
48
|
+
setInternalValue(values);
|
|
49
|
+
onChange?.(values);
|
|
50
|
+
},
|
|
51
|
+
checkAll: () => {
|
|
52
|
+
const enabledValues = source.filter((opt) => !opt.disabled).map((opt) => opt.value);
|
|
53
|
+
if (!isControlled)
|
|
54
|
+
setInternalValue(enabledValues);
|
|
55
|
+
onChange?.(enabledValues);
|
|
56
|
+
},
|
|
57
|
+
clearAll: () => {
|
|
58
|
+
if (!isControlled)
|
|
59
|
+
setInternalValue([]);
|
|
60
|
+
onChange?.([]);
|
|
61
|
+
}
|
|
62
|
+
}));
|
|
63
|
+
// Check all state
|
|
64
|
+
const enabledValues = source.filter((opt) => !opt.disabled).map((opt) => opt.value);
|
|
65
|
+
const checkedEnabledCount = enabledValues.filter((v) => currentValue.includes(v)).length;
|
|
66
|
+
const allChecked = enabledValues.length > 0 && checkedEnabledCount === enabledValues.length;
|
|
67
|
+
const someChecked = checkedEnabledCount > 0 && !allChecked;
|
|
68
|
+
const checkAllRef = React.useRef(null);
|
|
69
|
+
React.useEffect(() => {
|
|
70
|
+
if (checkAllRef.current) {
|
|
71
|
+
checkAllRef.current.indeterminate = someChecked;
|
|
72
|
+
}
|
|
73
|
+
}, [someChecked]);
|
|
74
|
+
const renderOption = (option, index) => {
|
|
75
|
+
const isSelected = currentValue.includes(option.value);
|
|
76
|
+
const isDisabled = disabled || option.disabled;
|
|
77
|
+
const inputClassName = isHighlightSelection
|
|
78
|
+
? "sr-only"
|
|
79
|
+
: "w-4 h-4 rounded text-[rgb(var(--sg-primary-500))] border-[rgb(var(--sg-border))] focus:ring-[rgb(var(--sg-ring))] focus:ring-2 cursor-pointer disabled:cursor-not-allowed";
|
|
80
|
+
if (isHighlightSelection) {
|
|
81
|
+
return (_jsxs("label", { className: `
|
|
82
|
+
flex items-center gap-2 border px-3 py-2 transition-all duration-150 select-none
|
|
83
|
+
${orientation === "vertical" ? "w-full -mt-px rounded-none first:mt-0 first:rounded-t-md last:rounded-b-md" : "inline-flex rounded-md"}
|
|
84
|
+
${iconOnly ? "justify-center" : ""}
|
|
85
|
+
${isSelected
|
|
86
|
+
? "relative z-10 translate-y-px rounded-md border-[rgb(var(--sg-primary-300))] bg-[rgb(var(--sg-primary-100))] ring-1 ring-[rgb(var(--sg-primary-200))] shadow-[inset_0_2px_4px_rgba(15,23,42,0.18),inset_0_1px_0_rgba(255,255,255,0.75),0_1px_2px_rgba(15,23,42,0.08)]"
|
|
87
|
+
: "border-[rgb(var(--sg-primary-200))] bg-[rgb(var(--sg-primary-50))] shadow-[0_2px_0_rgba(148,163,184,0.32),0_6px_10px_rgba(15,23,42,0.07)]"}
|
|
88
|
+
${isDisabled
|
|
89
|
+
? "cursor-not-allowed opacity-50"
|
|
90
|
+
: readOnly
|
|
91
|
+
? "cursor-default"
|
|
92
|
+
: `cursor-pointer ${isSelected ? "hover:bg-[rgb(var(--sg-primary-200))]" : "hover:-translate-y-px hover:bg-[rgb(var(--sg-primary-100))] hover:shadow-[0_3px_0_rgba(148,163,184,0.32),0_10px_14px_rgba(15,23,42,0.1)]"}`}
|
|
93
|
+
focus-within:outline-none
|
|
94
|
+
focus-within:ring-2
|
|
95
|
+
focus-within:ring-[rgb(var(--sg-ring))]
|
|
96
|
+
${optionClassName}
|
|
97
|
+
`, children: [_jsx("input", { type: "checkbox", name: name || id, value: option.value, checked: isSelected, disabled: isDisabled || readOnly, onChange: () => handleChange(option.value), className: inputClassName }), option.icon ? (_jsx("span", { className: `
|
|
98
|
+
flex items-center justify-center transition-transform duration-150
|
|
99
|
+
${isSelected ? "scale-110" : "scale-100"}
|
|
100
|
+
`, children: option.icon })) : null, !iconOnly ? (_jsx("span", { className: `
|
|
101
|
+
text-[rgb(var(--sg-text))] transition-[font-size] duration-150
|
|
102
|
+
${isSelected ? "text-[15px] font-medium" : "text-sm"}
|
|
103
|
+
`, children: option.label })) : null] }, `${option.value}-${index}`));
|
|
104
|
+
}
|
|
105
|
+
return (_jsxs("label", { className: `
|
|
106
|
+
inline-flex items-center gap-2 cursor-pointer select-none
|
|
107
|
+
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
108
|
+
${readOnly ? "cursor-default" : ""}
|
|
109
|
+
${optionClassName}
|
|
110
|
+
`, children: [_jsx("input", { type: "checkbox", name: name || id, value: option.value, checked: isSelected, disabled: isDisabled || readOnly, onChange: () => handleChange(option.value), className: inputClassName }), option.icon && (_jsx("span", { className: "flex items-center justify-center", children: option.icon })), !iconOnly && (_jsx("span", { className: "text-sm text-[rgb(var(--sg-text))]", children: option.label }))] }, `${option.value}-${index}`));
|
|
111
|
+
};
|
|
112
|
+
const checkAllNode = showCheckAll ? (_jsxs("div", { className: `${isHighlightSelection ? "px-3 pt-1 pb-2" : "pb-2"}`, children: [_jsxs("label", { className: `
|
|
113
|
+
inline-flex items-center gap-2 select-none font-medium
|
|
114
|
+
${disabled ? "opacity-50 cursor-not-allowed" : readOnly ? "cursor-default" : "cursor-pointer"}
|
|
115
|
+
`, children: [_jsx("input", { ref: checkAllRef, type: "checkbox", checked: allChecked, disabled: disabled || readOnly, onChange: handleCheckAll, className: "w-4 h-4 rounded text-[rgb(var(--sg-primary-500))] border-[rgb(var(--sg-border))] focus:ring-[rgb(var(--sg-ring))] focus:ring-2 cursor-pointer disabled:cursor-not-allowed" }), checkAllIcon ? (_jsx("span", { className: "flex items-center justify-center", children: checkAllIcon })) : null, _jsx("span", { className: "text-sm text-[rgb(var(--sg-text))]", children: resolvedCheckAllLabel })] }), _jsx("hr", { className: "mt-2 border-[rgb(var(--sg-border))]" })] })) : null;
|
|
116
|
+
const groupContent = (_jsxs(_Fragment, { children: [checkAllNode, _jsx("div", { className: `
|
|
117
|
+
flex ${isHighlightSelection ? "gap-0" : "gap-4"}
|
|
118
|
+
${orientation === "vertical" ? "flex-col" : "flex-row flex-wrap"}
|
|
119
|
+
`, role: "group", "aria-disabled": disabled || undefined, "aria-readonly": readOnly || undefined, "aria-required": required || undefined, children: source.map((option, index) => renderOption(option, index)) })] }));
|
|
120
|
+
// React Hook Form — Controller
|
|
121
|
+
if (control && name) {
|
|
122
|
+
return (_jsx(Controller, { name: name, control: control, rules: { required: required ? t(i18n, "components.inputs.required") : false }, render: ({ field, fieldState }) => SgCheckboxGroupBase({
|
|
123
|
+
...props,
|
|
124
|
+
value: field.value ?? [],
|
|
125
|
+
onChange: (val) => {
|
|
126
|
+
field.onChange(val);
|
|
127
|
+
onChange?.(val);
|
|
128
|
+
},
|
|
129
|
+
error: fieldState.error?.message,
|
|
130
|
+
control: undefined
|
|
131
|
+
}, undefined) }));
|
|
132
|
+
}
|
|
133
|
+
// React Hook Form — register
|
|
134
|
+
if (register && name) {
|
|
135
|
+
const registration = register(name, {
|
|
136
|
+
required: required ? t(i18n, "components.inputs.required") : false
|
|
137
|
+
});
|
|
138
|
+
return (_jsxs("div", { className: className, style: style, children: [_jsxs(SgGroupBox, { ...groupBoxProps, title: resolvedGroupBoxTitle || " ", children: [checkAllNode, _jsx("div", { className: `
|
|
139
|
+
flex ${isHighlightSelection ? "gap-0" : "gap-4"}
|
|
140
|
+
${orientation === "vertical" ? "flex-col" : "flex-row flex-wrap"}
|
|
141
|
+
${showCheckAll && !isHighlightSelection ? "mt-1" : ""}
|
|
142
|
+
`, role: "group", "aria-disabled": disabled || undefined, "aria-readonly": readOnly || undefined, "aria-required": required || undefined, children: source.map((option, index) => {
|
|
143
|
+
const isSelected = currentValue.includes(option.value);
|
|
144
|
+
const isDisabled = disabled || option.disabled;
|
|
145
|
+
return (_jsxs("label", { className: `
|
|
146
|
+
inline-flex items-center gap-2 cursor-pointer select-none
|
|
147
|
+
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
148
|
+
${readOnly ? "cursor-default" : ""}
|
|
149
|
+
${optionClassName}
|
|
150
|
+
`, children: [_jsx("input", { type: "checkbox", ...registration, value: option.value, checked: isSelected, disabled: isDisabled || readOnly, onChange: (event) => {
|
|
151
|
+
registration.onChange(event);
|
|
152
|
+
handleChange(option.value);
|
|
153
|
+
}, className: "w-4 h-4 rounded text-[rgb(var(--sg-primary-500))] border-[rgb(var(--sg-border))] focus:ring-[rgb(var(--sg-ring))] focus:ring-2 cursor-pointer disabled:cursor-not-allowed" }), option.icon && (_jsx("span", { className: "flex items-center justify-center", children: option.icon })), !iconOnly && (_jsx("span", { className: "text-sm text-[rgb(var(--sg-text))]", children: option.label }))] }, `${option.value}-${index}`));
|
|
154
|
+
}) })] }), error && (_jsx("div", { className: "mt-1 text-sm text-red-500", children: error }))] }));
|
|
155
|
+
}
|
|
156
|
+
return (_jsxs("div", { className: className, style: style, children: [_jsx(SgGroupBox, { ...groupBoxProps, title: resolvedGroupBoxTitle || " ", className: groupBoxProps.className || "", children: groupContent }), error && (_jsx("div", { className: "mt-1 text-sm text-red-500", children: error }))] }));
|
|
157
|
+
}
|
|
158
|
+
export const SgCheckboxGroup = React.forwardRef((props, ref) => SgCheckboxGroupBase(props, ref));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { FieldValues, RegisterOptions, UseFormRegister } from "react-hook-form";
|
|
3
3
|
import type { RhfFieldProps } from "../rhf";
|
|
4
|
-
export type
|
|
4
|
+
export type SgInputCurrencyProps = {
|
|
5
5
|
id: string;
|
|
6
6
|
label?: string;
|
|
7
7
|
labelText?: string;
|
|
@@ -52,5 +52,7 @@ export type SgCurrencyEditProps = {
|
|
|
52
52
|
register?: UseFormRegister<FieldValues>;
|
|
53
53
|
rules?: RegisterOptions<FieldValues>;
|
|
54
54
|
} & RhfFieldProps;
|
|
55
|
-
export declare function
|
|
56
|
-
|
|
55
|
+
export declare function SgInputCurrency(props: SgInputCurrencyProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare const SgCurrencyEdit: typeof SgInputCurrency;
|
|
57
|
+
export type SgCurrencyEditProps = SgInputCurrencyProps;
|
|
58
|
+
//# sourceMappingURL=SgInputCurrency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SgInputCurrency.d.ts","sourceRoot":"","sources":["../../src/inputs/SgInputCurrency.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAGV,WAAW,EACX,eAAe,EACf,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5C,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,QAAQ,GAAG,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,E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AAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC9C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;CACtC,GAAG,aAAa,CAAC;AAomBlB,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAuD1D;AAGD,eAAO,MAAM,cAAc,wBAAkB,CAAC;AAC9C,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC"}
|
|
@@ -149,7 +149,7 @@ function combineAffix(symbol, extra, placement) {
|
|
|
149
149
|
return symbol;
|
|
150
150
|
return placement === "prefix" ? `${symbol} ${extra}` : `${extra} ${symbol}`;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function SgInputCurrencyBase(props) {
|
|
153
153
|
const i18n = useComponentsI18n();
|
|
154
154
|
const allowNegative = props.allowNegative ?? true;
|
|
155
155
|
const emptyValue = props.emptyValue ?? "zero";
|
|
@@ -467,11 +467,11 @@ function SgCurrencyEditBase(props) {
|
|
|
467
467
|
props.labelClassName ?? ""
|
|
468
468
|
].join(" "), style: prefixPaddingStyle ? { left: prefixPaddingStyle } : undefined, children: [_jsx("span", { children: labelText }), props.required ? (_jsx("span", { className: "ml-1 text-[hsl(var(--destructive))]", "aria-hidden": "true", children: "*" })) : null] }), hasSuffix ? (_jsxs("span", { className: "absolute right-2 top-1/2 flex -translate-y-1/2 items-center gap-1", style: clearRightStyle ? { right: clearRightStyle } : undefined, children: [canShowClear ? (_jsx("button", { type: "button", onClick: handleClear, className: "rounded px-1 text-xs text-foreground/60 hover:text-foreground", "aria-label": t(i18n, "components.actions.clear"), children: _jsx(X, { size: 16 }) })) : null, props.iconButtons?.map((node, index) => (_jsx("span", { children: node }, index)))] })) : null] }), _jsx("div", { className: "mt-1 flex items-center justify-between gap-2", children: _jsx(ErrorText, { message: props.error ?? internalError ?? undefined }) })] }));
|
|
469
469
|
}
|
|
470
|
-
export function
|
|
470
|
+
export function SgInputCurrency(props) {
|
|
471
471
|
const { control, name, register, rules, ...rest } = props;
|
|
472
472
|
if (name && register) {
|
|
473
473
|
const reg = register(name, rules);
|
|
474
|
-
return (_jsx(
|
|
474
|
+
return (_jsx(SgInputCurrencyBase, { ...rest, onExternalChange: (value) => {
|
|
475
475
|
reg.onChange({ target: { name, value } });
|
|
476
476
|
}, inputProps: {
|
|
477
477
|
...rest.inputProps,
|
|
@@ -484,7 +484,7 @@ export function SgCurrencyEdit(props) {
|
|
|
484
484
|
} }));
|
|
485
485
|
}
|
|
486
486
|
if (control && name) {
|
|
487
|
-
return (_jsx(Controller, { name: name, control: control, render: ({ field, fieldState }) => (_jsx(
|
|
487
|
+
return (_jsx(Controller, { name: name, control: control, render: ({ field, fieldState }) => (_jsx(SgInputCurrencyBase, { ...rest, externalValue: field.value, onExternalChange: (value) => field.onChange(value), error: rest.error ?? fieldState.error?.message, inputProps: {
|
|
488
488
|
...rest.inputProps,
|
|
489
489
|
onBlur: (event) => {
|
|
490
490
|
field.onBlur();
|
|
@@ -492,5 +492,7 @@ export function SgCurrencyEdit(props) {
|
|
|
492
492
|
}
|
|
493
493
|
} })) }));
|
|
494
494
|
}
|
|
495
|
-
return _jsx(
|
|
495
|
+
return _jsx(SgInputCurrencyBase, { ...rest });
|
|
496
496
|
}
|
|
497
|
+
// Backward compatibility aliases.
|
|
498
|
+
export const SgCurrencyEdit = SgInputCurrency;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type SgGroupBoxProps } from "../layout/SgGroupBox";
|
|
3
|
+
export interface SgOrderListItem {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
data?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type SgOrderListSelectionMode = "single" | "multiple";
|
|
11
|
+
export type SgOrderListControlsPosition = "left" | "right";
|
|
12
|
+
export type SgOrderListRef = {
|
|
13
|
+
getItems: () => SgOrderListItem[];
|
|
14
|
+
setItems: (items: SgOrderListItem[]) => void;
|
|
15
|
+
getSelection: () => (string | number)[];
|
|
16
|
+
setSelection: (values: (string | number)[]) => void;
|
|
17
|
+
moveTop: () => void;
|
|
18
|
+
moveUp: () => void;
|
|
19
|
+
moveDown: () => void;
|
|
20
|
+
moveBottom: () => void;
|
|
21
|
+
clearSelection: () => void;
|
|
22
|
+
};
|
|
23
|
+
export interface SgOrderListProps {
|
|
24
|
+
id?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
source: SgOrderListItem[];
|
|
27
|
+
value?: SgOrderListItem[];
|
|
28
|
+
onChange?: (items: SgOrderListItem[]) => void;
|
|
29
|
+
selectedValues?: (string | number)[];
|
|
30
|
+
onSelectionChange?: (values: (string | number)[]) => void;
|
|
31
|
+
selectionMode?: SgOrderListSelectionMode;
|
|
32
|
+
showControls?: boolean;
|
|
33
|
+
controlsPosition?: SgOrderListControlsPosition;
|
|
34
|
+
draggable?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
emptyMessage?: string;
|
|
38
|
+
itemTemplate?: (item: SgOrderListItem, state: {
|
|
39
|
+
index: number;
|
|
40
|
+
selected: boolean;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
}) => React.ReactNode;
|
|
43
|
+
className?: string;
|
|
44
|
+
style?: React.CSSProperties;
|
|
45
|
+
listClassName?: string;
|
|
46
|
+
itemClassName?: string;
|
|
47
|
+
groupBoxProps?: Omit<Partial<SgGroupBoxProps>, "children" | "title"> & {
|
|
48
|
+
title?: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export declare const SgOrderList: React.ForwardRefExoticComponent<SgOrderListProps & React.RefAttributes<Sg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