@headless-adminapp/fluent 1.4.25 → 1.4.26
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/App/AppHeaderContianer.js +33 -16
- package/App/LayoutProvider.d.ts +2 -1
- package/App/LayoutProvider.js +3 -2
- package/App/Navigation/NavCategoryItemComponent.js +4 -1
- package/App/Navigation/NavItemComponent.js +4 -1
- package/App/Navigation/NavMiniCategoryMenu.js +3 -2
- package/App/QuickActionItem.js +5 -4
- package/CommandBar/Button.js +2 -3
- package/CommandBar/IconButton.js +2 -1
- package/CommandBar/Label.js +2 -2
- package/CommandBar/MenuButton.js +5 -2
- package/CommandBar/MenuItem.js +3 -2
- package/CommandBar/MenuList.js +2 -1
- package/CommandBar/Wrapper.js +1 -0
- package/DataGrid/CustomFilter/ColumnFilterItem.js +4 -2
- package/DataGrid/CustomFilter/CustomFilter.js +2 -1
- package/DataGrid/CustomizeColumns/AddColumns.js +5 -5
- package/DataGrid/CustomizeColumns/ColumnItem.js +4 -3
- package/DataGrid/CustomizeColumns/CustomizeColumns.js +4 -3
- package/DataGrid/FormSubgridViewSelector.js +3 -2
- package/DataGrid/GridColumnHeader/FilterForm.js +2 -1
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +4 -3
- package/DataGrid/GridHeaderDesktop.js +3 -2
- package/DataGrid/GridHeaderDesktopV2.js +8 -7
- package/DataGrid/GridHeaderMobile.js +3 -2
- package/DataGrid/GridListContainer.js +6 -5
- package/DataGrid/MobileHeaderTitleContainer.js +3 -2
- package/DataGrid/TableCell/TableCellAction.js +3 -2
- package/DataGrid/TableCell/TableCellCheckbox.js +2 -1
- package/DataGrid/useTableColumns.js +10 -1
- package/DialogContainer/AlertDialog.js +2 -1
- package/DialogContainer/ConfirmDialog.js +3 -2
- package/DialogContainer/ErrorDialog.js +3 -2
- package/DialogContainer/PromptDialog.js +4 -3
- package/Header/MobileHeaderCommandContainer.js +11 -10
- package/Header/MobileHeaderQuickActionButton.js +2 -2
- package/Insights/Header.js +7 -2
- package/Insights/InsightsContainer.js +22 -20
- package/Insights/WidgetDataGridContainer.js +8 -5
- package/Insights/WidgetSection.js +2 -1
- package/Insights/WidgetTileContainer.js +2 -1
- package/OverflowCommandBar/OverflowMenu.js +2 -1
- package/PageBoard/BoardColumnCard.js +2 -1
- package/PageBoard/BoardColumnUI.js +3 -2
- package/PageBoard/BoardingColumnCardLoading.js +2 -1
- package/PageBoard/Header.js +2 -1
- package/PageBoard/PageBoard.js +2 -1
- package/PageCalendar/CalendarSection.js +3 -2
- package/PageCalendar/EventDialog/EventDialog.js +2 -1
- package/PageCalendar/EventDialog/EventFormBody.js +3 -2
- package/PageCalendar/Header.js +4 -2
- package/PageCalendar/TitleSelector.js +3 -2
- package/PageCalendar/ViewSelector.js +2 -1
- package/PageCalendar/renderEventContent.js +5 -4
- package/PageEntityForm/EditableGridControl/CardUi.js +4 -4
- package/PageEntityForm/EditableGridControl/EditableGridControl.js +2 -1
- package/PageEntityForm/EditableGridControl/TableUi.js +3 -2
- package/PageEntityForm/FormTabRelated.js +2 -1
- package/PageEntityForm/PageCustomEntityForm.js +2 -0
- package/PageEntityForm/PageEntityFormDesktopContainer.js +8 -4
- package/PageEntityForm/RecordSetNavigatorContainer.js +2 -1
- package/PageEntityForm/RelatedViewSelector.js +2 -2
- package/PageEntityForm/TabContainer.js +5 -1
- package/PageEntityForm/UploadImageDialog.js +6 -5
- package/PageEntityView/FormSubgridContainer.js +3 -2
- package/PageEntityView/PageEntityViewDesktopFrame.js +3 -2
- package/PageEntityView/PageEntityViewDesktopFrameV2.js +2 -1
- package/PageEntityView/PageEntityViewMobileFrame.js +2 -1
- package/ProgressIndicatorContainer/index.js +2 -1
- package/QuickCreateContainer/FormContainer.js +2 -1
- package/components/ComponentErrorBoundary.d.ts +1 -1
- package/components/DialogLogin.js +2 -1
- package/components/DrawerHeader.js +3 -2
- package/components/LoginForm.js +2 -1
- package/components/PageBroken.js +2 -1
- package/components/PageLogin.js +2 -1
- package/components/fluent/Button.d.ts +4 -0
- package/components/fluent/Button.js +38 -0
- package/components/fluent/Checkbox.d.ts +4 -0
- package/components/fluent/Checkbox.js +18 -0
- package/components/fluent/Combobox.d.ts +4 -0
- package/components/fluent/Combobox.js +22 -0
- package/components/fluent/DialogSurface.d.ts +4 -0
- package/components/fluent/DialogSurface.js +16 -0
- package/components/fluent/Dropdown.d.ts +4 -0
- package/components/fluent/Dropdown.js +43 -0
- package/components/fluent/FluentProvider.d.ts +12 -0
- package/components/fluent/FluentProvider.js +179 -0
- package/components/fluent/Input.d.ts +4 -0
- package/components/fluent/Input.js +43 -0
- package/components/fluent/MenuItem.d.ts +4 -0
- package/components/fluent/MenuItem.js +17 -0
- package/components/fluent/MenuPopover.d.ts +4 -0
- package/components/fluent/MenuPopover.js +17 -0
- package/components/fluent/Option.d.ts +4 -0
- package/components/fluent/Option.js +17 -0
- package/components/fluent/PopoverSurface.d.ts +4 -0
- package/components/fluent/PopoverSurface.js +16 -0
- package/components/fluent/SearchBox.d.ts +4 -0
- package/components/fluent/SearchBox.js +42 -0
- package/components/fluent/SpinButton.d.ts +4 -0
- package/components/fluent/SpinButton.js +17 -0
- package/components/fluent/Tag.d.ts +4 -0
- package/components/fluent/Tag.js +16 -0
- package/components/fluent/Textarea.d.ts +4 -0
- package/components/fluent/Textarea.js +30 -0
- package/components/fluent/ToolbarButton.d.ts +6 -0
- package/components/fluent/ToolbarButton.js +22 -0
- package/components/fluent/index.d.ts +17 -0
- package/components/fluent/index.js +38 -0
- package/components/fluent/tokens.d.ts +29 -0
- package/components/fluent/tokens.js +32 -0
- package/form/controls/AttachmentControl.js +9 -8
- package/form/controls/AttachmentsControl.js +6 -2
- package/form/controls/CurrencyControl.js +2 -2
- package/form/controls/DateControl.js +7 -0
- package/form/controls/DateRangeControl/DateRangeControl.js +3 -2
- package/form/controls/DateRangeControl/PopoverContent.js +3 -2
- package/form/controls/DateTimeControl.js +17 -2
- package/form/controls/DecimalControl.js +2 -2
- package/form/controls/DurationControl.js +8 -2
- package/form/controls/EmailControl.js +3 -2
- package/form/controls/IntegerControl.js +2 -2
- package/form/controls/LookupControl.js +10 -4
- package/form/controls/MultiSelectControl.js +11 -2
- package/form/controls/MultiSelectLookupControl.js +12 -5
- package/form/controls/PasswordControl.js +6 -2
- package/form/controls/RegardingControl.js +7 -5
- package/form/controls/SelectControl.js +12 -2
- package/form/controls/SkeletonControl.js +6 -1
- package/form/controls/TelephoneControl.js +3 -2
- package/form/controls/TextAreaControl.js +2 -2
- package/form/controls/TextControl.js +6 -5
- package/form/controls/TimeControl/TimeControl.js +8 -1
- package/form/controls/UrlControl.js +3 -2
- package/form/layout/FormSection/FormSection.js +2 -2
- package/package.json +2 -2
- package/styles.css +1 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuPopover = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
fontWeight: react_components_1.tokens.fontWeightRegular,
|
|
11
|
+
borderRadius: tokens_1.extendedTokens.paperBorderRadius,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
exports.MenuPopover = (0, react_1.forwardRef)(function MenuPopover({ className, ...rest }, ref) {
|
|
15
|
+
const styles = useStyles();
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.MenuPopover, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root), ref: ref }));
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Option = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
borderRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
11
|
+
paddingBlock: tokens_1.extendedTokens.optionPaddingVertical,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
exports.Option = (0, react_1.forwardRef)(function Option({ className, ...rest }, ref) {
|
|
15
|
+
const styles = useStyles();
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Option, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root), ref: ref }));
|
|
17
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PopoverSurface = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
borderRadius: tokens_1.extendedTokens.paperBorderRadius,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.PopoverSurface = (0, react_1.forwardRef)(function PopoverSurface({ className, ...rest }, ref) {
|
|
14
|
+
const styles = useStyles();
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.PopoverSurface, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root), ref: ref }));
|
|
16
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchBox = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
borderRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
11
|
+
'&::after': {
|
|
12
|
+
borderBottomLeftRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
13
|
+
borderBottomRightRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
14
|
+
left: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
15
|
+
right: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
readonly: {
|
|
19
|
+
'&::after': {
|
|
20
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStrokeDisabled,
|
|
21
|
+
},
|
|
22
|
+
'&:focus-within:active::after': {
|
|
23
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStrokeDisabled,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
outlined: {
|
|
27
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1,
|
|
28
|
+
'&:hover': {
|
|
29
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Hover,
|
|
30
|
+
},
|
|
31
|
+
'&:active': {
|
|
32
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Pressed,
|
|
33
|
+
},
|
|
34
|
+
'&:focus-within': {
|
|
35
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Pressed,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
exports.SearchBox = (0, react_1.forwardRef)(function SearchBox({ className, ...rest }, ref) {
|
|
40
|
+
const styles = useStyles();
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.SearchBox, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root, rest.readOnly && styles.readonly, rest.appearance === 'outline' && styles.outlined), ref: ref }));
|
|
42
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpinButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
borderRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
11
|
+
minHeight: tokens_1.extendedTokens.controlMinHeightM,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
exports.SpinButton = (0, react_1.forwardRef)(function SpinButton({ className, ...rest }, ref) {
|
|
15
|
+
const styles = useStyles();
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.SpinButton, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root), ref: ref }));
|
|
17
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tag = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
borderRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.Tag = (0, react_1.forwardRef)(function Tag({ className, ...rest }, ref) {
|
|
14
|
+
const styles = useStyles();
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Tag, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root), ref: ref }));
|
|
16
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Textarea = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
borderRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
11
|
+
'&::after': {
|
|
12
|
+
borderBottomLeftRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
13
|
+
borderBottomRightRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
14
|
+
left: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
15
|
+
right: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
readonly: {
|
|
19
|
+
'&::after': {
|
|
20
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStrokeDisabled,
|
|
21
|
+
},
|
|
22
|
+
'&:focus-within:active::after': {
|
|
23
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStrokeDisabled,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
exports.Textarea = (0, react_1.forwardRef)(function Textarea({ className, ...rest }, ref) {
|
|
28
|
+
const styles = useStyles();
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Textarea, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root, rest.readOnly && styles.readonly), ref: ref }));
|
|
30
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ButtonProps, ForwardRefComponent, ToolbarButtonProps } from '@fluentui/react-components';
|
|
2
|
+
type ExtendedToolbarButtonProps = ToolbarButtonProps & {
|
|
3
|
+
iconPosition?: ButtonProps['iconPosition'];
|
|
4
|
+
};
|
|
5
|
+
export declare const ToolbarButton: ForwardRefComponent<ExtendedToolbarButtonProps>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolbarButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const tokens_1 = require("./tokens");
|
|
8
|
+
const useStyles = (0, react_components_1.makeStyles)({
|
|
9
|
+
root: {
|
|
10
|
+
fontWeight: react_components_1.tokens.fontWeightRegular,
|
|
11
|
+
borderRadius: tokens_1.extendedTokens.buttonBorderRadius,
|
|
12
|
+
minHeight: tokens_1.extendedTokens.buttonMinHeightM,
|
|
13
|
+
'&[data-icon-only="true"]': {
|
|
14
|
+
minWidth: tokens_1.extendedTokens.buttonMinHeightM,
|
|
15
|
+
maxWidth: tokens_1.extendedTokens.buttonMinHeightM,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
exports.ToolbarButton = (0, react_1.forwardRef)(function ToolbarButton({ className, ...rest }, ref) {
|
|
20
|
+
const styles = useStyles();
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.ToolbarButton, { ...rest, className: (0, react_components_1.mergeClasses)(className, styles.root), "data-icon-only": !rest.children && !!rest.icon ? 'true' : undefined, ref: ref }));
|
|
22
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { Button } from './Button';
|
|
2
|
+
export { Input } from './Input';
|
|
3
|
+
export { Textarea } from './Textarea';
|
|
4
|
+
export { Combobox } from './Combobox';
|
|
5
|
+
export { Tag } from './Tag';
|
|
6
|
+
export { Dropdown } from './Dropdown';
|
|
7
|
+
export { SpinButton } from './SpinButton';
|
|
8
|
+
export { ToolbarButton } from './ToolbarButton';
|
|
9
|
+
export { MenuPopover } from './MenuPopover';
|
|
10
|
+
export { SearchBox } from './SearchBox';
|
|
11
|
+
export { FluentProvider } from './FluentProvider';
|
|
12
|
+
export { extendedTokens, tokens } from './tokens';
|
|
13
|
+
export { Option } from './Option';
|
|
14
|
+
export { Checkbox } from './Checkbox';
|
|
15
|
+
export { MenuItem } from './MenuItem';
|
|
16
|
+
export { PopoverSurface } from './PopoverSurface';
|
|
17
|
+
export { DialogSurface } from './DialogSurface';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogSurface = exports.PopoverSurface = exports.MenuItem = exports.Checkbox = exports.Option = exports.tokens = exports.extendedTokens = exports.FluentProvider = exports.SearchBox = exports.MenuPopover = exports.ToolbarButton = exports.SpinButton = exports.Dropdown = exports.Tag = exports.Combobox = exports.Textarea = exports.Input = exports.Button = void 0;
|
|
4
|
+
var Button_1 = require("./Button");
|
|
5
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
6
|
+
var Input_1 = require("./Input");
|
|
7
|
+
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return Input_1.Input; } });
|
|
8
|
+
var Textarea_1 = require("./Textarea");
|
|
9
|
+
Object.defineProperty(exports, "Textarea", { enumerable: true, get: function () { return Textarea_1.Textarea; } });
|
|
10
|
+
var Combobox_1 = require("./Combobox");
|
|
11
|
+
Object.defineProperty(exports, "Combobox", { enumerable: true, get: function () { return Combobox_1.Combobox; } });
|
|
12
|
+
var Tag_1 = require("./Tag");
|
|
13
|
+
Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return Tag_1.Tag; } });
|
|
14
|
+
var Dropdown_1 = require("./Dropdown");
|
|
15
|
+
Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return Dropdown_1.Dropdown; } });
|
|
16
|
+
var SpinButton_1 = require("./SpinButton");
|
|
17
|
+
Object.defineProperty(exports, "SpinButton", { enumerable: true, get: function () { return SpinButton_1.SpinButton; } });
|
|
18
|
+
var ToolbarButton_1 = require("./ToolbarButton");
|
|
19
|
+
Object.defineProperty(exports, "ToolbarButton", { enumerable: true, get: function () { return ToolbarButton_1.ToolbarButton; } });
|
|
20
|
+
var MenuPopover_1 = require("./MenuPopover");
|
|
21
|
+
Object.defineProperty(exports, "MenuPopover", { enumerable: true, get: function () { return MenuPopover_1.MenuPopover; } });
|
|
22
|
+
var SearchBox_1 = require("./SearchBox");
|
|
23
|
+
Object.defineProperty(exports, "SearchBox", { enumerable: true, get: function () { return SearchBox_1.SearchBox; } });
|
|
24
|
+
var FluentProvider_1 = require("./FluentProvider");
|
|
25
|
+
Object.defineProperty(exports, "FluentProvider", { enumerable: true, get: function () { return FluentProvider_1.FluentProvider; } });
|
|
26
|
+
var tokens_1 = require("./tokens");
|
|
27
|
+
Object.defineProperty(exports, "extendedTokens", { enumerable: true, get: function () { return tokens_1.extendedTokens; } });
|
|
28
|
+
Object.defineProperty(exports, "tokens", { enumerable: true, get: function () { return tokens_1.tokens; } });
|
|
29
|
+
var Option_1 = require("./Option");
|
|
30
|
+
Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return Option_1.Option; } });
|
|
31
|
+
var Checkbox_1 = require("./Checkbox");
|
|
32
|
+
Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return Checkbox_1.Checkbox; } });
|
|
33
|
+
var MenuItem_1 = require("./MenuItem");
|
|
34
|
+
Object.defineProperty(exports, "MenuItem", { enumerable: true, get: function () { return MenuItem_1.MenuItem; } });
|
|
35
|
+
var PopoverSurface_1 = require("./PopoverSurface");
|
|
36
|
+
Object.defineProperty(exports, "PopoverSurface", { enumerable: true, get: function () { return PopoverSurface_1.PopoverSurface; } });
|
|
37
|
+
var DialogSurface_1 = require("./DialogSurface");
|
|
38
|
+
Object.defineProperty(exports, "DialogSurface", { enumerable: true, get: function () { return DialogSurface_1.DialogSurface; } });
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ExtendedTokens = {
|
|
2
|
+
buttonBorderRadius: string;
|
|
3
|
+
buttonVerticalPaddingS?: string;
|
|
4
|
+
buttonVerticalPaddingM?: string;
|
|
5
|
+
buttonVerticalPaddingL?: string;
|
|
6
|
+
buttonHorizontalPaddingS?: string;
|
|
7
|
+
buttonHorizontalPaddingM?: string;
|
|
8
|
+
buttonHorizontalPaddingL?: string;
|
|
9
|
+
buttonMinWidthS?: string;
|
|
10
|
+
buttonMinWidthM?: string;
|
|
11
|
+
buttonMinWidthL?: string;
|
|
12
|
+
checkboxBorderRadius: string;
|
|
13
|
+
controlBorderRadius: string;
|
|
14
|
+
paperBorderRadius: string;
|
|
15
|
+
controlBottomBorderMargin: string;
|
|
16
|
+
dialogBorderRadius: string;
|
|
17
|
+
buttonMinHeightS: string;
|
|
18
|
+
buttonMinHeightM: string;
|
|
19
|
+
buttonMinHeightL: string;
|
|
20
|
+
controlMinHeightS: string;
|
|
21
|
+
controlMinHeightM: string;
|
|
22
|
+
controlMinHeightL: string;
|
|
23
|
+
menuItemPaddingVertical: string;
|
|
24
|
+
optionPaddingVertical: string;
|
|
25
|
+
appBarHeight: string;
|
|
26
|
+
navItempaddingVertical: string;
|
|
27
|
+
};
|
|
28
|
+
export { tokens } from '@fluentui/react-components';
|
|
29
|
+
export declare const extendedTokens: ExtendedTokens;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extendedTokens = exports.tokens = void 0;
|
|
4
|
+
var react_components_1 = require("@fluentui/react-components");
|
|
5
|
+
Object.defineProperty(exports, "tokens", { enumerable: true, get: function () { return react_components_1.tokens; } });
|
|
6
|
+
exports.extendedTokens = {
|
|
7
|
+
buttonBorderRadius: 'var(--buttonBorderRadius)',
|
|
8
|
+
checkboxBorderRadius: 'var(--checkboxBorderRadius)',
|
|
9
|
+
controlBorderRadius: 'var(--controlBorderRadius)',
|
|
10
|
+
paperBorderRadius: 'var(--paperBorderRadius)',
|
|
11
|
+
controlBottomBorderMargin: 'var(--controlBottomBorderMargin)',
|
|
12
|
+
dialogBorderRadius: 'var(--dialogBorderRadius)',
|
|
13
|
+
buttonVerticalPaddingS: 'var(--buttonVerticalPaddingS)',
|
|
14
|
+
buttonVerticalPaddingM: 'var(--buttonVerticalPaddingM)',
|
|
15
|
+
buttonVerticalPaddingL: 'var(--buttonVerticalPaddingL)',
|
|
16
|
+
buttonHorizontalPaddingS: 'var(--buttonHorizontalPaddingS)',
|
|
17
|
+
buttonHorizontalPaddingM: 'var(--buttonHorizontalPaddingM)',
|
|
18
|
+
buttonHorizontalPaddingL: 'var(--buttonHorizontalPaddingL)',
|
|
19
|
+
buttonMinWidthS: 'var(--buttonMinWidthS)',
|
|
20
|
+
buttonMinWidthM: 'var(--buttonMinWidthM)',
|
|
21
|
+
buttonMinWidthL: 'var(--buttonMinWidthL)',
|
|
22
|
+
buttonMinHeightS: 'var(--buttonMinHeightS)',
|
|
23
|
+
buttonMinHeightM: 'var(--buttonMinHeightM)',
|
|
24
|
+
buttonMinHeightL: 'var(--buttonMinHeightL)',
|
|
25
|
+
controlMinHeightS: 'var(--controlMinHeightS)',
|
|
26
|
+
controlMinHeightM: 'var(--controlMinHeightM)',
|
|
27
|
+
controlMinHeightL: 'var(--controlMinHeightL)',
|
|
28
|
+
menuItemPaddingVertical: 'var(--menuItemPaddingVertical)',
|
|
29
|
+
optionPaddingVertical: 'var(--optionPaddingVertical)',
|
|
30
|
+
appBarHeight: 'var(--appBarHeight)',
|
|
31
|
+
navItempaddingVertical: 'var(--navItempaddingVertical)',
|
|
32
|
+
};
|
|
@@ -9,6 +9,7 @@ const utils_1 = require("@headless-adminapp/core/utils");
|
|
|
9
9
|
const icons_1 = require("@headless-adminapp/icons");
|
|
10
10
|
const react_query_1 = require("@tanstack/react-query");
|
|
11
11
|
const react_1 = require("react");
|
|
12
|
+
const fluent_1 = require("../../components/fluent");
|
|
12
13
|
const SkeletonControl_1 = require("./SkeletonControl");
|
|
13
14
|
function useAttachmentSelector({ fileService, fileServiceContext, location, onChange, }) {
|
|
14
15
|
const openErrorDialog = (0, hooks_1.useOpenErrorDialog)();
|
|
@@ -71,7 +72,7 @@ const AttachmentImageControl = ({ value, disabled, readOnly, onChange, fileServi
|
|
|
71
72
|
width: 100,
|
|
72
73
|
height: 100,
|
|
73
74
|
backgroundColor: react_components_1.tokens.colorNeutralBackground2,
|
|
74
|
-
borderRadius:
|
|
75
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
75
76
|
display: 'flex',
|
|
76
77
|
justifyContent: 'center',
|
|
77
78
|
alignItems: 'center',
|
|
@@ -88,7 +89,7 @@ const AttachmentImageControl = ({ value, disabled, readOnly, onChange, fileServi
|
|
|
88
89
|
maxHeight: '100%',
|
|
89
90
|
maxWidth: '100%',
|
|
90
91
|
objectFit: 'contain',
|
|
91
|
-
borderRadius:
|
|
92
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
92
93
|
} }), (0, jsx_runtime_1.jsx)("div", { style: { position: 'absolute', top: 0, right: 0 }, children: (0, jsx_runtime_1.jsx)(ActionMenu, { format: 'image', value: value, disabled: disabled, readOnly: readOnly, onChange: onChange, onChangeClick: () => selectFile('image/*') }) }), isProcessing && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
93
94
|
position: 'absolute',
|
|
94
95
|
inset: 0,
|
|
@@ -148,7 +149,7 @@ const AttachmentControl = ({ value, disabled, readOnly, id, name, onBlur, onChan
|
|
|
148
149
|
}, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
149
150
|
width: '100%',
|
|
150
151
|
height: 30,
|
|
151
|
-
borderRadius:
|
|
152
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
152
153
|
backgroundColor: react_components_1.tokens.colorNeutralBackground3,
|
|
153
154
|
display: 'flex',
|
|
154
155
|
paddingLeft: react_components_1.tokens.spacingHorizontalS,
|
|
@@ -170,7 +171,7 @@ const AttachmentControl = ({ value, disabled, readOnly, id, name, onBlur, onChan
|
|
|
170
171
|
}, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
171
172
|
width: '100%',
|
|
172
173
|
height: 30,
|
|
173
|
-
borderRadius:
|
|
174
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
174
175
|
backgroundColor: react_components_1.tokens.colorNeutralBackground3,
|
|
175
176
|
display: 'flex',
|
|
176
177
|
paddingLeft: react_components_1.tokens.spacingHorizontalS,
|
|
@@ -206,13 +207,13 @@ const ActionMenu = ({ format, value, disabled, readOnly, onChange, onChangeClick
|
|
|
206
207
|
return 'Open';
|
|
207
208
|
}
|
|
208
209
|
}, [format]);
|
|
209
|
-
return ((0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: "before-top", hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(
|
|
210
|
+
return ((0, jsx_runtime_1.jsxs)(react_components_1.Menu, { positioning: "before-top", hasIcons: true, children: [(0, jsx_runtime_1.jsx)(react_components_1.MenuTrigger, { children: (0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "transparent", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.MoreVertical, {}) }) }), (0, jsx_runtime_1.jsx)(fluent_1.MenuPopover, { children: (0, jsx_runtime_1.jsxs)(react_components_1.MenuList, { children: [(0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(FileOpenIcon, {}), onClick: () => {
|
|
210
211
|
window.open(value.url, '_blank');
|
|
211
|
-
}, children: OpenText }), (0, jsx_runtime_1.jsx)(
|
|
212
|
+
}, children: OpenText }), (0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Copy, {}), onClick: () => {
|
|
212
213
|
navigator.clipboard.writeText(value.url).catch(() => { });
|
|
213
|
-
}, children: "Copy Url" }), !(disabled || readOnly) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(
|
|
214
|
+
}, children: "Copy Url" }), !(disabled || readOnly) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Edit, {}), onClick: () => {
|
|
214
215
|
onChangeClick?.();
|
|
215
|
-
}, children: "Change" }), (0, jsx_runtime_1.jsx)(react_components_1.MenuDivider, {}), (0, jsx_runtime_1.jsx)(
|
|
216
|
+
}, children: "Change" }), (0, jsx_runtime_1.jsx)(react_components_1.MenuDivider, {}), (0, jsx_runtime_1.jsx)(fluent_1.MenuItem, { icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Delete, {}), onClick: async () => {
|
|
216
217
|
const result = await openConfirmDialog({
|
|
217
218
|
title: 'Remove file',
|
|
218
219
|
text: 'Are you sure you want to remove this file?',
|
|
@@ -6,13 +6,17 @@ const react_components_1 = require("@fluentui/react-components");
|
|
|
6
6
|
const utils_1 = require("@headless-adminapp/core/utils");
|
|
7
7
|
const icons_1 = require("@headless-adminapp/icons");
|
|
8
8
|
const react_1 = require("react");
|
|
9
|
+
const fluent_1 = require("../../components/fluent");
|
|
9
10
|
const SkeletonControl_1 = require("./SkeletonControl");
|
|
10
11
|
const AttachmentsControl = ({ onChange, id, onBlur, onFocus, disabled, readOnly, value, skeleton, }) => {
|
|
11
12
|
const inputRef = (0, react_1.useRef)(null);
|
|
12
13
|
if (skeleton) {
|
|
13
14
|
return (0, jsx_runtime_1.jsx)(SkeletonControl_1.SkeletonControl, {});
|
|
14
15
|
}
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)(react_components_1.TagPicker, { appearance: "filled-darker", disabled: disabled, open: false, children: [(0, jsx_runtime_1.jsx)(react_components_1.TagPickerControl, { onFocus: onFocus, onBlur: onBlur, id: id, style: {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)(react_components_1.TagPicker, { appearance: "filled-darker", disabled: disabled, open: false, children: [(0, jsx_runtime_1.jsx)(react_components_1.TagPickerControl, { onFocus: onFocus, onBlur: onBlur, id: id, style: {
|
|
17
|
+
paddingBlock: react_components_1.tokens.spacingVerticalXXS,
|
|
18
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
19
|
+
}, expandIcon: null, children: (0, jsx_runtime_1.jsxs)(react_components_1.TagGroup, { style: {
|
|
16
20
|
flexWrap: 'wrap',
|
|
17
21
|
columnGap: react_components_1.tokens.spacingHorizontalXS,
|
|
18
22
|
gap: react_components_1.tokens.spacingHorizontalXS,
|
|
@@ -24,7 +28,7 @@ const AttachmentsControl = ({ onChange, id, onBlur, onFocus, disabled, readOnly,
|
|
|
24
28
|
event.preventDefault();
|
|
25
29
|
event.stopPropagation();
|
|
26
30
|
window.open(file.url, '_blank');
|
|
27
|
-
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Caption1, { style: { overflow: 'hidden', textOverflow: 'ellipsis' }, children: file.name }) }) }, index))), !readOnly && !disabled && ((0, jsx_runtime_1.jsx)(
|
|
31
|
+
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Caption1, { style: { overflow: 'hidden', textOverflow: 'ellipsis' }, children: file.name }) }) }, index))), !readOnly && !disabled && ((0, jsx_runtime_1.jsx)(fluent_1.Button, { size: "small", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Add, { size: 16 }), appearance: "outline", onClick: () => {
|
|
28
32
|
if (readOnly)
|
|
29
33
|
return;
|
|
30
34
|
inputRef.current?.click();
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CurrencyControl = CurrencyControl;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_components_1 = require("@fluentui/react-components");
|
|
6
5
|
const locale_1 = require("@headless-adminapp/app/locale");
|
|
7
6
|
const react_1 = require("react");
|
|
7
|
+
const fluent_1 = require("../../components/fluent");
|
|
8
8
|
const SkeletonControl_1 = require("./SkeletonControl");
|
|
9
9
|
function CurrencyControl({ value, onChange, id, name, onBlur, onFocus,
|
|
10
10
|
// error,
|
|
@@ -50,7 +50,7 @@ readOnly, skeleton, }) {
|
|
|
50
50
|
if (skeleton) {
|
|
51
51
|
return (0, jsx_runtime_1.jsx)(SkeletonControl_1.SkeletonControl, {});
|
|
52
52
|
}
|
|
53
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(fluent_1.Input, { placeholder: placeholder, id: id, autoFocus: autoFocus, name: name, value: internalValue, onChange: handleChange, onBlur: () => onBlur?.(), appearance: "filled-darker", onFocus: () => onFocus?.(), contentBefore: (0, jsx_runtime_1.jsx)("div", { children: symbol }), readOnly: isReadOnly, style: {
|
|
54
54
|
width: '100%',
|
|
55
55
|
}, input: {
|
|
56
56
|
style: {
|
|
@@ -14,6 +14,7 @@ const dayjs_1 = __importDefault(require("dayjs"));
|
|
|
14
14
|
const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
15
15
|
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
16
16
|
const AppStringContext_1 = require("../../App/AppStringContext");
|
|
17
|
+
const fluent_1 = require("../../components/fluent");
|
|
17
18
|
const SkeletonControl_1 = require("./SkeletonControl");
|
|
18
19
|
dayjs_1.default.extend(utc_1.default);
|
|
19
20
|
dayjs_1.default.extend(timezone_1.default);
|
|
@@ -27,10 +28,16 @@ function DateControl({ value, onChange, id, name, onBlur, onFocus, placeholder,
|
|
|
27
28
|
onChange?.(date ? (0, dayjs_1.default)(date).format('YYYY-MM-DD') : null);
|
|
28
29
|
}, strings: datePickerStrings, style: {
|
|
29
30
|
width: '100%',
|
|
31
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
32
|
+
minHeight: fluent_1.extendedTokens.controlMinHeightM,
|
|
30
33
|
}, input: {
|
|
31
34
|
style: {
|
|
32
35
|
width: '100%',
|
|
33
36
|
},
|
|
37
|
+
}, popupSurface: {
|
|
38
|
+
style: {
|
|
39
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
40
|
+
},
|
|
34
41
|
}, contentAfter: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
35
42
|
display: 'flex',
|
|
36
43
|
alignItems: 'center',
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const locale_1 = require("@headless-adminapp/app/locale");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
+
const fluent_1 = require("../../../components/fluent");
|
|
8
9
|
const SkeletonControl_1 = require("../SkeletonControl");
|
|
9
10
|
const PopoverContent_1 = require("./PopoverContent");
|
|
10
11
|
const utils_1 = require("./utils");
|
|
@@ -31,9 +32,9 @@ function DateRangeControl({ value, onChange, onBlur, onFocus, disabled, maxDate,
|
|
|
31
32
|
}
|
|
32
33
|
onFocus?.();
|
|
33
34
|
setOpen(data.open);
|
|
34
|
-
}, positioning: "below-start", children: [(0, jsx_runtime_1.jsx)(react_components_1.PopoverTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(
|
|
35
|
+
}, positioning: "below-start", children: [(0, jsx_runtime_1.jsx)(react_components_1.PopoverTrigger, { disableButtonEnhancement: true, children: (0, jsx_runtime_1.jsx)(fluent_1.Input, { appearance: "filled-darker", readOnly: true, className: styles.input, value: formattedValue, onChange: () => { }, style: {
|
|
35
36
|
width: '100%',
|
|
36
|
-
} }) }), (0, jsx_runtime_1.jsx)(
|
|
37
|
+
} }) }), (0, jsx_runtime_1.jsx)(fluent_1.PopoverSurface, { style: { padding: 0 }, children: (0, jsx_runtime_1.jsx)(PopoverContent_1.PopoverContent, { value: value, minDate: minDate, maxDate: maxDate, onChange: (value) => {
|
|
37
38
|
setOpen(false);
|
|
38
39
|
onChange?.(value);
|
|
39
40
|
onBlur?.();
|
|
@@ -8,6 +8,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const react_components_1 = require("@fluentui/react-components");
|
|
9
9
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
10
10
|
const react_1 = require("react");
|
|
11
|
+
const fluent_1 = require("../../../components/fluent");
|
|
11
12
|
const CalendarItem_1 = require("./CalendarItem");
|
|
12
13
|
const utils_1 = require("./utils");
|
|
13
14
|
const PopoverContent = ({ value, minDate, maxDate, onChange, required, showApplyButton, }) => {
|
|
@@ -46,13 +47,13 @@ const PopoverContent = ({ value, minDate, maxDate, onChange, required, showApply
|
|
|
46
47
|
};
|
|
47
48
|
const actions = [];
|
|
48
49
|
if (!required) {
|
|
49
|
-
actions.push((0, jsx_runtime_1.jsx)(
|
|
50
|
+
actions.push((0, jsx_runtime_1.jsx)(fluent_1.Button, { size: "small", appearance: "secondary", onClick: () => {
|
|
50
51
|
onChange?.(null);
|
|
51
52
|
setInternalValue([null, null]);
|
|
52
53
|
}, children: "Clear" }, "clear"));
|
|
53
54
|
}
|
|
54
55
|
if (showApplyButton) {
|
|
55
|
-
actions.push((0, jsx_runtime_1.jsx)(
|
|
56
|
+
actions.push((0, jsx_runtime_1.jsx)(fluent_1.Button, { size: "small", appearance: "primary", disabled: !internalValue[0] || !internalValue[1], onClick: () => {
|
|
56
57
|
if (!internalValue[0] || !internalValue[1]) {
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
@@ -15,6 +15,7 @@ const customParseFormat_1 = __importDefault(require("dayjs/plugin/customParseFor
|
|
|
15
15
|
const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
16
16
|
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
17
17
|
const react_1 = require("react");
|
|
18
|
+
const fluent_1 = require("../../components/fluent");
|
|
18
19
|
const SkeletonControl_1 = require("./SkeletonControl");
|
|
19
20
|
const utils_1 = require("./TimeControl/utils");
|
|
20
21
|
dayjs_1.default.extend(customParseFormat_1.default);
|
|
@@ -79,12 +80,22 @@ function DateTimeControl({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
79
80
|
justifyContent: 'center',
|
|
80
81
|
marginRight: -4,
|
|
81
82
|
color: react_components_1.tokens.colorNeutralForeground2,
|
|
82
|
-
}, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Calendar, { size: 20 }) }), style: {
|
|
83
|
+
}, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Calendar, { size: 20 }) }), style: {
|
|
84
|
+
flex: 1,
|
|
85
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
86
|
+
minHeight: fluent_1.extendedTokens.controlMinHeightM,
|
|
87
|
+
}, input: {
|
|
83
88
|
style: { minWidth: 0, width: '100%' },
|
|
89
|
+
}, popupSurface: {
|
|
90
|
+
style: {
|
|
91
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
92
|
+
},
|
|
84
93
|
} }), (0, jsx_runtime_1.jsx)(react_timepicker_compat_1.TimePicker, { appearance: "filled-darker", style: {
|
|
85
94
|
flex: 1,
|
|
86
95
|
minWidth: 0,
|
|
87
96
|
pointerEvents: isReadonly ? 'none' : 'auto',
|
|
97
|
+
borderRadius: fluent_1.extendedTokens.controlBorderRadius,
|
|
98
|
+
minHeight: fluent_1.extendedTokens.controlMinHeightM,
|
|
88
99
|
}, input: {
|
|
89
100
|
style: { minWidth: 0 },
|
|
90
101
|
}, readOnly: isReadonly || !value,
|
|
@@ -132,5 +143,9 @@ function DateTimeControl({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
132
143
|
justifyContent: 'center',
|
|
133
144
|
marginRight: -4,
|
|
134
145
|
color: react_components_1.tokens.colorNeutralForeground2,
|
|
135
|
-
}, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Clock, { size: 20 }) })
|
|
146
|
+
}, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Clock, { size: 20 }) }), listbox: {
|
|
147
|
+
style: {
|
|
148
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
149
|
+
},
|
|
150
|
+
} })] }));
|
|
136
151
|
}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DecimalControl = DecimalControl;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
/* eslint-disable unused-imports/no-unused-vars */
|
|
6
|
-
const react_components_1 = require("@fluentui/react-components");
|
|
7
6
|
const react_1 = require("react");
|
|
7
|
+
const fluent_1 = require("../../components/fluent");
|
|
8
8
|
const SkeletonControl_1 = require("./SkeletonControl");
|
|
9
9
|
function DecimalControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, borderOnFocusOnly, readOnly, decimalPlaces, skeleton, }) {
|
|
10
10
|
const [internalValue, setInternalValue] = (0, react_1.useState)(value ? value.toString() : '');
|
|
@@ -50,7 +50,7 @@ function DecimalControl({ value, onChange, id, name, onBlur, onFocus, error, dis
|
|
|
50
50
|
if (skeleton) {
|
|
51
51
|
return (0, jsx_runtime_1.jsx)(SkeletonControl_1.SkeletonControl, {});
|
|
52
52
|
}
|
|
53
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(fluent_1.Input, { placeholder: placeholder, id: id, appearance: "filled-darker", name: name, value: internalValue, onChange: handleChange, onBlur: () => onBlur?.(), onFocus: () => onFocus?.(), readOnly: readOnly || disabled, style: {
|
|
54
54
|
width: '100%',
|
|
55
55
|
}, input: {
|
|
56
56
|
style: {
|