@headless-adminapp/fluent 1.4.25 → 1.4.27
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 +41 -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 +44 -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
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageEntityViewDesktopFrameV2 = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const fluent_1 = require("../components/fluent");
|
|
6
7
|
// Exprement component
|
|
7
8
|
const PageEntityViewDesktopFrameV2 = ({ header, content, footer }) => {
|
|
8
9
|
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
@@ -32,7 +33,7 @@ const PageEntityViewDesktopFrameV2 = ({ header, content, footer }) => {
|
|
|
32
33
|
display: 'flex',
|
|
33
34
|
flexDirection: 'column',
|
|
34
35
|
boxShadow: react_components_1.tokens.shadow2,
|
|
35
|
-
borderRadius:
|
|
36
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
36
37
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
37
38
|
overflow: 'hidden',
|
|
38
39
|
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageEntityViewMobileFrame = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const fluent_1 = require("../components/fluent");
|
|
6
7
|
const MobileHeaderRightContainer_1 = require("../DataGrid/MobileHeaderRightContainer");
|
|
7
8
|
const PageEntityViewMobileFrame = ({ header, content, }) => {
|
|
8
9
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
@@ -29,7 +30,7 @@ const PageEntityViewMobileFrame = ({ header, content, }) => {
|
|
|
29
30
|
flex: 1,
|
|
30
31
|
display: 'flex',
|
|
31
32
|
flexDirection: 'column',
|
|
32
|
-
borderRadius:
|
|
33
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
33
34
|
}, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
34
35
|
gap: 8,
|
|
35
36
|
display: 'flex',
|
|
@@ -4,6 +4,7 @@ exports.ProgressIndicatorContainer = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const hooks_1 = require("@headless-adminapp/app/progress-indicator/hooks");
|
|
7
|
+
const fluent_1 = require("../components/fluent");
|
|
7
8
|
const ProgressIndicatorContainer = () => {
|
|
8
9
|
const state = (0, hooks_1.useProgressIndicator)();
|
|
9
10
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [state.overlayVisible && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
@@ -15,7 +16,7 @@ const ProgressIndicatorContainer = () => {
|
|
|
15
16
|
zIndex: 1000,
|
|
16
17
|
} })), (0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: state.visible, onOpenChange: () => {
|
|
17
18
|
// do nothing
|
|
18
|
-
}, children: (0, jsx_runtime_1.jsx)(
|
|
19
|
+
}, children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 320 }, children: (0, jsx_runtime_1.jsx)(react_components_1.DialogBody, { children: (0, jsx_runtime_1.jsxs)(react_components_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(react_components_1.Spinner, {}), !!state.message && ((0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: {
|
|
19
20
|
textAlign: 'center',
|
|
20
21
|
display: 'flex',
|
|
21
22
|
alignItems: 'center',
|
|
@@ -12,6 +12,7 @@ const react_1 = require("react");
|
|
|
12
12
|
const BodyLoading_1 = require("../components/BodyLoading");
|
|
13
13
|
const DrawerFooter_1 = require("../components/DrawerFooter");
|
|
14
14
|
const DrawerHeader_1 = require("../components/DrawerHeader");
|
|
15
|
+
const fluent_1 = require("../components/fluent");
|
|
15
16
|
const PageBroken_1 = require("../components/PageBroken");
|
|
16
17
|
const FormTab_1 = require("../form/layout/FormTab");
|
|
17
18
|
const SectionContainer_1 = require("../PageEntityForm/SectionContainer");
|
|
@@ -45,6 +46,6 @@ const FormContainer = ({ onClose, onCreate, }) => {
|
|
|
45
46
|
flexDirection: 'column',
|
|
46
47
|
padding: react_components_1.tokens.spacingVerticalM,
|
|
47
48
|
// backgroundColor: tokens.colorNeutralBackground2,
|
|
48
|
-
}, children: formConfig.experience.tabs.map((tab) => ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab, { value: tab.name, columnCount: tab.columnCount, columnWidths: tab.columnWidths, children: tab.tabColumns.map((tabColumn, index) => ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab.Column, { children: tabColumn.sections.map((section) => ((0, jsx_runtime_1.jsx)(SectionContainer_1.SectionContainer, { section: section, readOnly: false, skeleton: dataState.isFetching }, section.name))) }, index))) }, tab.name))) }), (0, jsx_runtime_1.jsxs)(DrawerFooter_1.DrawerFooter, { children: [(0, jsx_runtime_1.jsx)(
|
|
49
|
+
}, children: formConfig.experience.tabs.map((tab) => ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab, { value: tab.name, columnCount: tab.columnCount, columnWidths: tab.columnWidths, children: tab.tabColumns.map((tabColumn, index) => ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab.Column, { children: tabColumn.sections.map((section) => ((0, jsx_runtime_1.jsx)(SectionContainer_1.SectionContainer, { section: section, readOnly: false, skeleton: dataState.isFetching }, section.name))) }, index))) }, tab.name))) }), (0, jsx_runtime_1.jsxs)(DrawerFooter_1.DrawerFooter, { children: [(0, jsx_runtime_1.jsx)(fluent_1.Button, { appearance: "primary", onClick: () => save(), children: isCreating ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_components_1.Spinner, { size: "extra-tiny", appearance: "inverted", style: { marginRight: 8 } }), "Creating..."] })) : ('Create') }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { onClick: onClose, children: "Cancel" })] })] }));
|
|
49
50
|
};
|
|
50
51
|
exports.FormContainer = FormContainer;
|
|
@@ -10,6 +10,6 @@ export declare class ComponentErrorBoundary extends Component<PropsWithChildren<
|
|
|
10
10
|
hasError: boolean;
|
|
11
11
|
};
|
|
12
12
|
componentDidCatch(error: unknown, errorInfo: unknown): void;
|
|
13
|
-
render(): string | number | boolean | import("react
|
|
13
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
@@ -4,6 +4,7 @@ exports.DialogLogin = DialogLogin;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const hooks_1 = require("@headless-adminapp/app/hooks");
|
|
7
|
+
const fluent_1 = require("./fluent");
|
|
7
8
|
const LoginForm_1 = require("./LoginForm");
|
|
8
9
|
function DialogLogin(props) {
|
|
9
10
|
const isMobile = (0, hooks_1.useIsMobile)();
|
|
@@ -19,5 +20,5 @@ function DialogLogin(props) {
|
|
|
19
20
|
margin: 'auto',
|
|
20
21
|
}, children: (0, jsx_runtime_1.jsx)(LoginForm_1.LoginForm, { onLogin: props.onLogin, logoImageUrl: props.logoImageUrl, afterLoginContent: props.afterLoginContent, beforeLoginContent: props.beforeLoginContent, subtitle: props.subtitle }) }));
|
|
21
22
|
}
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: true, onOpenChange: () => { }, modalType: "non-modal", children: (0, jsx_runtime_1.jsx)(
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: true, onOpenChange: () => { }, modalType: "non-modal", children: (0, jsx_runtime_1.jsx)(fluent_1.DialogSurface, { style: { maxWidth: 360 }, children: (0, jsx_runtime_1.jsx)(react_components_1.DialogBody, { children: (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(LoginForm_1.LoginForm, { onLogin: props.onLogin, logoImageUrl: props.logoImageUrl, afterLoginContent: props.afterLoginContent, beforeLoginContent: props.beforeLoginContent, subtitle: props.subtitle }) }) }) }) }));
|
|
23
24
|
}
|
|
@@ -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 icons_1 = require("@headless-adminapp/icons");
|
|
7
7
|
const QuickActionItem_1 = require("../App/QuickActionItem");
|
|
8
|
+
const fluent_1 = require("./fluent");
|
|
8
9
|
const DrawerHeader = ({ title, onClose, showCloseButton, rightContent, bottomContent, }) => {
|
|
9
10
|
return ((0, jsx_runtime_1.jsx)(react_components_1.DrawerHeader, { style: { padding: 0 }, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
10
11
|
display: 'flex',
|
|
@@ -12,8 +13,8 @@ const DrawerHeader = ({ title, onClose, showCloseButton, rightContent, bottomCon
|
|
|
12
13
|
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
13
14
|
display: 'flex',
|
|
14
15
|
alignItems: 'center',
|
|
15
|
-
height:
|
|
16
|
-
minHeight:
|
|
16
|
+
height: fluent_1.extendedTokens.appBarHeight,
|
|
17
|
+
minHeight: fluent_1.extendedTokens.appBarHeight,
|
|
17
18
|
background: react_components_1.tokens.colorNeutralBackground3,
|
|
18
19
|
paddingInline: 8,
|
|
19
20
|
gap: 8,
|
package/components/LoginForm.js
CHANGED
|
@@ -32,6 +32,7 @@ const yup = __importStar(require("yup"));
|
|
|
32
32
|
const SectionControl_1 = require("../DataForm/SectionControl");
|
|
33
33
|
const PasswordControl_1 = require("../form/controls/PasswordControl");
|
|
34
34
|
const TextControl_1 = require("../form/controls/TextControl");
|
|
35
|
+
const fluent_1 = require("./fluent");
|
|
35
36
|
const validationSchema = yup
|
|
36
37
|
.object()
|
|
37
38
|
.shape({
|
|
@@ -78,7 +79,7 @@ function LoginForm(props) {
|
|
|
78
79
|
alignItems: 'stretch',
|
|
79
80
|
justifyContent: 'flex-start',
|
|
80
81
|
gap: 16,
|
|
81
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_hook_form_1.Controller, { control: form.control, name: "username", render: ({ field, fieldState, formState }) => ((0, jsx_runtime_1.jsx)(SectionControl_1.SectionControlWrapper, { label: "Username", labelPosition: "top", required: true, isError: !!fieldState.error?.message && formState.isSubmitted, errorMessage: fieldState.error?.message, children: (0, jsx_runtime_1.jsx)(TextControl_1.TextControl, { placeholder: "Username", appearance: "outline", name: field.name, value: field.value, onChange: field.onChange, onBlur: field.onBlur, autoCapitalize: "none", autoCorrect: "off", error: !!fieldState.error?.message && formState.isSubmitted }) })) }), (0, jsx_runtime_1.jsx)(react_hook_form_1.Controller, { control: form.control, name: "password", render: ({ field, fieldState, formState }) => ((0, jsx_runtime_1.jsx)(SectionControl_1.SectionControlWrapper, { label: "Password", labelPosition: "top", required: true, isError: !!fieldState.error?.message && formState.isSubmitted, errorMessage: fieldState.error?.message, children: (0, jsx_runtime_1.jsx)(PasswordControl_1.PasswordControl, { placeholder: "Password", name: field.name, appearance: "outline", error: !!fieldState.error?.message && formState.isSubmitted, value: field.value, onChange: field.onChange, onBlur: field.onBlur }) })) }), props.beforeLoginContent, !!form.formState.errors.root && ((0, jsx_runtime_1.jsx)(react_components_1.MessageBar, { intent: "error", children: (0, jsx_runtime_1.jsx)(react_components_1.MessageBarBody, { children: form.formState.errors.root.message }) })), (0, jsx_runtime_1.jsxs)(
|
|
82
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_hook_form_1.Controller, { control: form.control, name: "username", render: ({ field, fieldState, formState }) => ((0, jsx_runtime_1.jsx)(SectionControl_1.SectionControlWrapper, { label: "Username", labelPosition: "top", required: true, isError: !!fieldState.error?.message && formState.isSubmitted, errorMessage: fieldState.error?.message, children: (0, jsx_runtime_1.jsx)(TextControl_1.TextControl, { placeholder: "Username", appearance: "outline", name: field.name, value: field.value, onChange: field.onChange, onBlur: field.onBlur, autoCapitalize: "none", autoCorrect: "off", error: !!fieldState.error?.message && formState.isSubmitted }) })) }), (0, jsx_runtime_1.jsx)(react_hook_form_1.Controller, { control: form.control, name: "password", render: ({ field, fieldState, formState }) => ((0, jsx_runtime_1.jsx)(SectionControl_1.SectionControlWrapper, { label: "Password", labelPosition: "top", required: true, isError: !!fieldState.error?.message && formState.isSubmitted, errorMessage: fieldState.error?.message, children: (0, jsx_runtime_1.jsx)(PasswordControl_1.PasswordControl, { placeholder: "Password", name: field.name, appearance: "outline", error: !!fieldState.error?.message && formState.isSubmitted, value: field.value, onChange: field.onChange, onBlur: field.onBlur }) })) }), props.beforeLoginContent, !!form.formState.errors.root && ((0, jsx_runtime_1.jsx)(react_components_1.MessageBar, { intent: "error", children: (0, jsx_runtime_1.jsx)(react_components_1.MessageBarBody, { children: form.formState.errors.root.message }) })), (0, jsx_runtime_1.jsxs)(fluent_1.Button, { appearance: "primary", type: "submit", style: {
|
|
82
83
|
marginTop: 8,
|
|
83
84
|
pointerEvents: form.formState.isSubmitting ? 'none' : 'auto',
|
|
84
85
|
}, children: [form.formState.isSubmitting && ((0, jsx_runtime_1.jsx)(react_components_1.Spinner, { size: "extra-tiny", appearance: "inverted", style: { marginRight: 4 } })), "Login"] }), props.afterLoginContent] }), (0, jsx_runtime_1.jsx)("div", { style: { height: 80 } })] }) }));
|
package/components/PageBroken.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageBroken = PageBroken;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const fluent_1 = require("./fluent");
|
|
6
7
|
function PageBroken({ title, message, Icon, }) {
|
|
7
8
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
8
9
|
display: 'flex',
|
|
@@ -11,5 +12,5 @@ function PageBroken({ title, message, Icon, }) {
|
|
|
11
12
|
alignItems: 'center',
|
|
12
13
|
justifyContent: 'center',
|
|
13
14
|
gap: 16,
|
|
14
|
-
}, children: [!!Icon && (0, jsx_runtime_1.jsx)(Icon, { size: 64 }), (0, jsx_runtime_1.jsx)(react_components_1.Title2, { children: title }), !!message && (0, jsx_runtime_1.jsx)(react_components_1.Body1, { children: message }), (0, jsx_runtime_1.jsx)(
|
|
15
|
+
}, children: [!!Icon && (0, jsx_runtime_1.jsx)(Icon, { size: 64 }), (0, jsx_runtime_1.jsx)(react_components_1.Title2, { children: title }), !!message && (0, jsx_runtime_1.jsx)(react_components_1.Body1, { children: message }), (0, jsx_runtime_1.jsx)(fluent_1.Button, { onClick: () => window.history.back(), children: "Go back" })] }));
|
|
15
16
|
}
|
package/components/PageLogin.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.PageLogin = PageLogin;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const hooks_1 = require("@headless-adminapp/app/hooks");
|
|
7
|
+
const fluent_1 = require("./fluent");
|
|
7
8
|
const LoginForm_1 = require("./LoginForm");
|
|
8
9
|
function PageLogin(props) {
|
|
9
10
|
const isMobile = (0, hooks_1.useIsMobile)();
|
|
@@ -37,7 +38,7 @@ function PageLogin(props) {
|
|
|
37
38
|
maxWidth: 992,
|
|
38
39
|
width: '100%',
|
|
39
40
|
overflow: 'hidden',
|
|
40
|
-
borderRadius:
|
|
41
|
+
borderRadius: fluent_1.extendedTokens.paperBorderRadius,
|
|
41
42
|
background: react_components_1.tokens.colorNeutralBackground1,
|
|
42
43
|
}, children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', minHeight: 'calc(-200px + 100vh)' }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
43
44
|
display: 'flex',
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Button = 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
|
+
},
|
|
13
|
+
small: {
|
|
14
|
+
minHeight: tokens_1.extendedTokens.buttonMinHeightS,
|
|
15
|
+
'&[data-icon-only="true"]': {
|
|
16
|
+
minWidth: tokens_1.extendedTokens.buttonMinHeightS,
|
|
17
|
+
maxWidth: tokens_1.extendedTokens.buttonMinHeightS,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
medium: {
|
|
21
|
+
minHeight: tokens_1.extendedTokens.buttonMinHeightM,
|
|
22
|
+
'&[data-icon-only="true"]': {
|
|
23
|
+
minWidth: tokens_1.extendedTokens.buttonMinHeightM,
|
|
24
|
+
maxWidth: tokens_1.extendedTokens.buttonMinHeightM,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
large: {
|
|
28
|
+
minHeight: tokens_1.extendedTokens.buttonMinHeightL,
|
|
29
|
+
'&[data-icon-only="true"]': {
|
|
30
|
+
minWidth: tokens_1.extendedTokens.buttonMinHeightL,
|
|
31
|
+
maxWidth: tokens_1.extendedTokens.buttonMinHeightL,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
exports.Button = (0, react_1.forwardRef)(function Button({ className, ...rest }, ref) {
|
|
36
|
+
const styles = useStyles();
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Button, { ...rest, className: (0, react_components_1.mergeClasses)(styles.root, styles[rest.size || 'medium'], className), "data-icon-only": !rest.children && !!rest.icon ? 'true' : undefined, ref: ref }));
|
|
38
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Checkbox = 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
|
+
indicator: {
|
|
10
|
+
borderRadius: tokens_1.extendedTokens.checkboxBorderRadius,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.Checkbox = (0, react_1.forwardRef)(function Checkbox({ ...rest }, ref) {
|
|
14
|
+
const styles = useStyles();
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Checkbox, { ...rest, ref: ref, indicator: {
|
|
16
|
+
className: styles.indicator,
|
|
17
|
+
} }));
|
|
18
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Combobox = 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
|
+
listbox: {
|
|
14
|
+
borderRadius: tokens_1.extendedTokens.paperBorderRadius,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
exports.Combobox = (0, react_1.forwardRef)(function Combobox({ className, ...rest }, ref) {
|
|
18
|
+
const styles = useStyles();
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Combobox, { ...rest, className: (0, react_components_1.mergeClasses)(styles.root, className), ref: ref, listbox: {
|
|
20
|
+
className: styles.listbox,
|
|
21
|
+
} }));
|
|
22
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogSurface = 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.dialogBorderRadius,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.DialogSurface = (0, react_1.forwardRef)(function DialogSurface({ className, ...rest }, ref) {
|
|
14
|
+
const styles = useStyles();
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.DialogSurface, { ...rest, className: (0, react_components_1.mergeClasses)(styles.root, className), ref: ref }));
|
|
16
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dropdown = 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
|
+
'&::after': {
|
|
13
|
+
borderBottomLeftRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
14
|
+
borderBottomRightRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
15
|
+
left: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
16
|
+
right: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
listbox: {
|
|
20
|
+
borderRadius: tokens_1.extendedTokens.paperBorderRadius,
|
|
21
|
+
},
|
|
22
|
+
outlined: {
|
|
23
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1,
|
|
24
|
+
'&:hover': {
|
|
25
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Hover,
|
|
26
|
+
},
|
|
27
|
+
'&:active': {
|
|
28
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Pressed,
|
|
29
|
+
},
|
|
30
|
+
'&:focus-within': {
|
|
31
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Pressed,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
exports.Dropdown = (0, react_1.forwardRef)(function Dropdown({ className, ...rest }, ref) {
|
|
36
|
+
const styles = useStyles();
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Dropdown, { ...rest, className: (0, react_components_1.mergeClasses)(styles.root, (rest.appearance === 'outline' || !rest.appearance) &&
|
|
38
|
+
styles.outlined, className), ref: ref, listbox: {
|
|
39
|
+
className: styles.listbox,
|
|
40
|
+
} }));
|
|
41
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FluentProviderProps, ForwardRefComponent } from '@fluentui/react-components';
|
|
2
|
+
export interface ExtendedThemeProps {
|
|
3
|
+
corners: 'soft' | 'rounded' | 'square' | 'circular';
|
|
4
|
+
density: 'compact' | 'comfortable';
|
|
5
|
+
}
|
|
6
|
+
export type ExtendedFluentProviderProps = FluentProviderProps & Partial<ExtendedThemeProps>;
|
|
7
|
+
export declare const FluentProvider: ForwardRefComponent<ExtendedFluentProviderProps>;
|
|
8
|
+
export declare const ExtendedThemeContext: import("react").Context<ExtendedThemeProps | undefined>;
|
|
9
|
+
export declare function useExtendedThemeContext(): {
|
|
10
|
+
corners: "rounded" | "circular" | "square" | "soft";
|
|
11
|
+
density: "compact" | "comfortable";
|
|
12
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtendedThemeContext = exports.FluentProvider = void 0;
|
|
4
|
+
exports.useExtendedThemeContext = useExtendedThemeContext;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_components_1 = require("@fluentui/react-components");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const defaultCorners = 'rounded';
|
|
9
|
+
const defaultDensity = 'compact';
|
|
10
|
+
exports.FluentProvider = (0, react_1.forwardRef)(function FluentProvider({ corners = defaultCorners, density = defaultDensity, children, theme, ...rest }, ref) {
|
|
11
|
+
corners ??= defaultCorners;
|
|
12
|
+
density ??= defaultDensity;
|
|
13
|
+
const contextValue = (0, react_1.useMemo)(() => ({ corners, density }), [corners, density]);
|
|
14
|
+
const extendedTheme = (0, react_1.useMemo)(() => {
|
|
15
|
+
let buttonBorderRadius;
|
|
16
|
+
let controlBorderRadius;
|
|
17
|
+
let paperBorderRadius;
|
|
18
|
+
let checkboxBorderRadius;
|
|
19
|
+
let controlBottomBorderMargin;
|
|
20
|
+
let dialogBorderRadius;
|
|
21
|
+
switch (corners) {
|
|
22
|
+
case 'soft':
|
|
23
|
+
buttonBorderRadius = '4px';
|
|
24
|
+
controlBorderRadius = '4px';
|
|
25
|
+
paperBorderRadius = '4px';
|
|
26
|
+
checkboxBorderRadius = '2px';
|
|
27
|
+
controlBottomBorderMargin = '-1px';
|
|
28
|
+
dialogBorderRadius = '8px';
|
|
29
|
+
break;
|
|
30
|
+
case 'rounded':
|
|
31
|
+
buttonBorderRadius = '8px';
|
|
32
|
+
controlBorderRadius = '8px';
|
|
33
|
+
paperBorderRadius = '8px';
|
|
34
|
+
checkboxBorderRadius = '4px';
|
|
35
|
+
controlBottomBorderMargin = '1px';
|
|
36
|
+
dialogBorderRadius = '12px';
|
|
37
|
+
break;
|
|
38
|
+
case 'square':
|
|
39
|
+
buttonBorderRadius = '0px';
|
|
40
|
+
controlBorderRadius = '0px';
|
|
41
|
+
paperBorderRadius = '0px';
|
|
42
|
+
checkboxBorderRadius = '0px';
|
|
43
|
+
controlBottomBorderMargin = '0px';
|
|
44
|
+
dialogBorderRadius = '0px';
|
|
45
|
+
break;
|
|
46
|
+
case 'circular':
|
|
47
|
+
buttonBorderRadius = '16px';
|
|
48
|
+
controlBorderRadius = '16px';
|
|
49
|
+
paperBorderRadius = '20px';
|
|
50
|
+
checkboxBorderRadius = '8px';
|
|
51
|
+
controlBottomBorderMargin = '8px';
|
|
52
|
+
dialogBorderRadius = '20px';
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
let buttonMinWidthS = '64px';
|
|
56
|
+
let buttonMinWidthM = '96px';
|
|
57
|
+
let buttonMinWidthL = '96px';
|
|
58
|
+
let buttonMinHeightS = '24px';
|
|
59
|
+
let buttonMinHeightM = '32px';
|
|
60
|
+
let buttonMinHeightL = '40px';
|
|
61
|
+
let controlMinHeightS = '24px';
|
|
62
|
+
let controlMinHeightM = '32px';
|
|
63
|
+
let controlMinHeightL = '40px';
|
|
64
|
+
let menuItemPaddingVertical = '6px';
|
|
65
|
+
let optionPaddingVertical = '6px';
|
|
66
|
+
let appBarHeight = '48px';
|
|
67
|
+
let navItempaddingVertical = '10px';
|
|
68
|
+
if (density === 'comfortable') {
|
|
69
|
+
buttonMinWidthS = '72px';
|
|
70
|
+
buttonMinWidthM = '112px';
|
|
71
|
+
buttonMinWidthL = '112px';
|
|
72
|
+
buttonMinHeightS = '32px';
|
|
73
|
+
buttonMinHeightM = '40px';
|
|
74
|
+
buttonMinHeightL = '48px';
|
|
75
|
+
controlMinHeightS = '32px';
|
|
76
|
+
controlMinHeightM = '40px';
|
|
77
|
+
controlMinHeightL = '48px';
|
|
78
|
+
menuItemPaddingVertical = '9px';
|
|
79
|
+
optionPaddingVertical = '9px';
|
|
80
|
+
appBarHeight = '64px';
|
|
81
|
+
navItempaddingVertical = '16px';
|
|
82
|
+
}
|
|
83
|
+
let fontSizeBase100 = '10px';
|
|
84
|
+
let fontSizeBase200 = '12px';
|
|
85
|
+
let fontSizeBase300 = '14px';
|
|
86
|
+
let fontSizeBase400 = '16px';
|
|
87
|
+
let fontSizeBase500 = '20px';
|
|
88
|
+
let fontSizeBase600 = '24px';
|
|
89
|
+
let fontSizeHero700 = '28px';
|
|
90
|
+
let fontSizeHero800 = '32px';
|
|
91
|
+
let fontSizeHero900 = '40px';
|
|
92
|
+
let fontSizeHero1000 = '68px';
|
|
93
|
+
let lineHeightBase100 = '14px';
|
|
94
|
+
let lineHeightBase200 = '16px';
|
|
95
|
+
let lineHeightBase300 = '20px';
|
|
96
|
+
let lineHeightBase400 = '22px';
|
|
97
|
+
let lineHeightBase500 = '28px';
|
|
98
|
+
let lineHeightBase600 = '32px';
|
|
99
|
+
let lineHeightHero700 = '36px';
|
|
100
|
+
let lineHeightHero800 = '40px';
|
|
101
|
+
let lineHeightHero900 = '52px';
|
|
102
|
+
let lineHeightHero1000 = '92px';
|
|
103
|
+
if (density === 'comfortable') {
|
|
104
|
+
fontSizeBase100 = '12px';
|
|
105
|
+
fontSizeBase200 = '14px';
|
|
106
|
+
fontSizeBase300 = '16px';
|
|
107
|
+
fontSizeBase400 = '18px';
|
|
108
|
+
fontSizeBase500 = '22px';
|
|
109
|
+
fontSizeBase600 = '26px';
|
|
110
|
+
fontSizeHero700 = '30px';
|
|
111
|
+
fontSizeHero800 = '34px';
|
|
112
|
+
fontSizeHero900 = '42px';
|
|
113
|
+
fontSizeHero1000 = '72px';
|
|
114
|
+
lineHeightBase100 = '16px';
|
|
115
|
+
lineHeightBase200 = '18px';
|
|
116
|
+
lineHeightBase300 = '22px';
|
|
117
|
+
lineHeightBase400 = '24px';
|
|
118
|
+
lineHeightBase500 = '30px';
|
|
119
|
+
lineHeightBase600 = '34px';
|
|
120
|
+
lineHeightHero700 = '38px';
|
|
121
|
+
lineHeightHero800 = '42px';
|
|
122
|
+
lineHeightHero900 = '54px';
|
|
123
|
+
lineHeightHero1000 = '94px';
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
...theme,
|
|
127
|
+
buttonBorderRadius,
|
|
128
|
+
controlBorderRadius,
|
|
129
|
+
paperBorderRadius,
|
|
130
|
+
checkboxBorderRadius,
|
|
131
|
+
controlBottomBorderMargin,
|
|
132
|
+
dialogBorderRadius,
|
|
133
|
+
buttonMinHeightS,
|
|
134
|
+
buttonMinHeightM,
|
|
135
|
+
buttonMinHeightL,
|
|
136
|
+
buttonMinWidthS,
|
|
137
|
+
buttonMinWidthM,
|
|
138
|
+
buttonMinWidthL,
|
|
139
|
+
controlMinHeightS,
|
|
140
|
+
controlMinHeightM,
|
|
141
|
+
controlMinHeightL,
|
|
142
|
+
menuItemPaddingVertical,
|
|
143
|
+
optionPaddingVertical,
|
|
144
|
+
navItempaddingVertical,
|
|
145
|
+
appBarHeight,
|
|
146
|
+
fontSizeBase100,
|
|
147
|
+
fontSizeBase200,
|
|
148
|
+
fontSizeBase300,
|
|
149
|
+
fontSizeBase400,
|
|
150
|
+
fontSizeBase500,
|
|
151
|
+
fontSizeBase600,
|
|
152
|
+
fontSizeHero700,
|
|
153
|
+
fontSizeHero800,
|
|
154
|
+
fontSizeHero900,
|
|
155
|
+
fontSizeHero1000,
|
|
156
|
+
lineHeightBase100,
|
|
157
|
+
lineHeightBase200,
|
|
158
|
+
lineHeightBase300,
|
|
159
|
+
lineHeightBase400,
|
|
160
|
+
lineHeightBase500,
|
|
161
|
+
lineHeightBase600,
|
|
162
|
+
lineHeightHero700,
|
|
163
|
+
lineHeightHero800,
|
|
164
|
+
lineHeightHero900,
|
|
165
|
+
lineHeightHero1000,
|
|
166
|
+
};
|
|
167
|
+
}, [corners, density, theme]);
|
|
168
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.FluentProvider, { ...rest, theme: extendedTheme, ref: ref, children: (0, jsx_runtime_1.jsx)(exports.ExtendedThemeContext.Provider, { value: contextValue, children: children }) }));
|
|
169
|
+
});
|
|
170
|
+
exports.ExtendedThemeContext = (0, react_1.createContext)(undefined);
|
|
171
|
+
function useExtendedThemeContext() {
|
|
172
|
+
const value = (0, react_1.useContext)(exports.ExtendedThemeContext);
|
|
173
|
+
return (0, react_1.useMemo)(() => {
|
|
174
|
+
return {
|
|
175
|
+
corners: value?.corners ?? defaultCorners,
|
|
176
|
+
density: value?.density ?? defaultDensity,
|
|
177
|
+
};
|
|
178
|
+
}, [value]);
|
|
179
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Input = 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
|
+
'&::after': {
|
|
13
|
+
borderBottomLeftRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
14
|
+
borderBottomRightRadius: tokens_1.extendedTokens.controlBorderRadius,
|
|
15
|
+
left: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
16
|
+
right: tokens_1.extendedTokens.controlBottomBorderMargin,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
readonly: {
|
|
20
|
+
'&::after': {
|
|
21
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStrokeDisabled,
|
|
22
|
+
},
|
|
23
|
+
'&:focus-within:active::after': {
|
|
24
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStrokeDisabled,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
outlined: {
|
|
28
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1,
|
|
29
|
+
'&:hover': {
|
|
30
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Hover,
|
|
31
|
+
},
|
|
32
|
+
'&:active': {
|
|
33
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Pressed,
|
|
34
|
+
},
|
|
35
|
+
'&:focus-within': {
|
|
36
|
+
borderBottomColor: react_components_1.tokens.colorNeutralStroke1Pressed,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
exports.Input = (0, react_1.forwardRef)(function Input({ className, ...rest }, ref) {
|
|
41
|
+
const styles = useStyles();
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { ...rest, className: (0, react_components_1.mergeClasses)(styles.root, rest.readOnly && styles.readonly, (rest.appearance === 'outline' || !rest.appearance) &&
|
|
43
|
+
styles.outlined, className), ref: ref }));
|
|
44
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuItem = 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.buttonBorderRadius,
|
|
11
|
+
paddingBlock: tokens_1.extendedTokens.menuItemPaddingVertical,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
exports.MenuItem = (0, react_1.forwardRef)(function MenuItem({ className, ...rest }, ref) {
|
|
15
|
+
const styles = useStyles();
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.MenuItem, { ...rest, className: (0, react_components_1.mergeClasses)(styles.root, className), ref: ref }));
|
|
17
|
+
});
|