@inf-monkeys-tech/monkeys-design 0.4.43 → 0.4.44

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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import React, { forwardRef, useRef, useState, useEffect, useId, useMemo, createContext, useCallback, useContext, useLayoutEffect, Children, isValidElement, Fragment as Fragment$1 } from 'react';
1
+ import React, { forwardRef, useRef, useState, useEffect, useId, useMemo, createContext, useContext, useLayoutEffect, Children, isValidElement, useCallback, Fragment as Fragment$1 } from 'react';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import * as ContextMenu from '@radix-ui/react-context-menu';
4
4
  import * as DropdownMenu3 from '@radix-ui/react-dropdown-menu';
@@ -20520,6 +20520,7 @@ function LoginPage({
20520
20520
  onMethodChange,
20521
20521
  externalLabel,
20522
20522
  externalMethods = [],
20523
+ externalPanel,
20523
20524
  callout
20524
20525
  }) {
20525
20526
  const availableMethods = useMemo(() => methods.filter((method) => !method.hidden), [methods]);
@@ -20672,7 +20673,24 @@ function LoginPage({
20672
20673
  method.id
20673
20674
  );
20674
20675
  }) }) : null,
20675
- activeMethod ? /* @__PURE__ */ jsxs(
20676
+ externalPanel ? /* @__PURE__ */ jsxs("div", { className: "login-page__external-panel", "data-login-part": "external-panel", children: [
20677
+ externalPanel.title ? /* @__PURE__ */ jsx("div", { className: "login-page__external-panel-title", "data-login-part": "external-panel-title", children: externalPanel.title }) : null,
20678
+ externalPanel.description ? /* @__PURE__ */ jsx("p", { className: "login-page__external-panel-description", "data-login-part": "external-panel-description", children: externalPanel.description }) : null,
20679
+ /* @__PURE__ */ jsx("div", { className: "login-page__external-panel-content", "data-login-part": "external-panel-content", children: externalPanel.content }),
20680
+ externalPanel.footer || externalPanel.backAction ? /* @__PURE__ */ jsxs("div", { className: "login-page__external-panel-footer", "data-login-part": "external-panel-footer", children: [
20681
+ externalPanel.footer,
20682
+ externalPanel.backAction ? /* @__PURE__ */ jsx(
20683
+ "button",
20684
+ {
20685
+ type: "button",
20686
+ className: "login-page__external-panel-back",
20687
+ "data-login-part": "external-panel-back",
20688
+ onClick: externalPanel.backAction.onClick,
20689
+ children: externalPanel.backAction.label
20690
+ }
20691
+ ) : null
20692
+ ] }) : null
20693
+ ] }) : activeMethod ? /* @__PURE__ */ jsxs(
20676
20694
  "form",
20677
20695
  {
20678
20696
  className: "login-page__form-fields",
@@ -20766,7 +20784,7 @@ function LoginPage({
20766
20784
  ]
20767
20785
  }
20768
20786
  ) : null,
20769
- externalMethods.length ? /* @__PURE__ */ jsxs("div", { className: "login-page__oauth-section", "data-login-part": "external-methods", children: [
20787
+ !externalPanel && externalMethods.length ? /* @__PURE__ */ jsxs("div", { className: "login-page__oauth-section", "data-login-part": "external-methods", children: [
20770
20788
  externalLabel ? /* @__PURE__ */ jsx("div", { className: "login-page__oauth-label", "data-login-part": "external-label", children: externalLabel }) : null,
20771
20789
  /* @__PURE__ */ jsx("div", { className: "login-page__oauth-list", "data-login-part": "external-list", children: externalMethods.map(renderExternalMethod) })
20772
20790
  ] }) : null
@@ -20777,302 +20795,6 @@ function LoginPage({
20777
20795
  }
20778
20796
  );
20779
20797
  }
20780
- var containerStyle = {
20781
- display: "flex",
20782
- alignItems: "center",
20783
- justifyContent: "center",
20784
- minHeight: "100vh",
20785
- padding: "1rem"
20786
- };
20787
- var cardStyle = {
20788
- width: "100%",
20789
- maxWidth: "400px"
20790
- };
20791
- var logoContainerStyle = {
20792
- display: "flex",
20793
- justifyContent: "center",
20794
- marginBottom: "1.5rem"
20795
- };
20796
- var logoImageStyle = {
20797
- height: "48px",
20798
- width: "auto"
20799
- };
20800
- var titleStyle = {
20801
- fontSize: "1.5rem",
20802
- fontWeight: 700,
20803
- textAlign: "center",
20804
- marginBottom: "0.5rem",
20805
- lineHeight: 1.2
20806
- };
20807
- var subtitleStyle = {
20808
- fontSize: "0.875rem",
20809
- textAlign: "center",
20810
- marginBottom: "1.5rem",
20811
- opacity: 0.6
20812
- };
20813
- var footerStyle = {
20814
- fontSize: "0.75rem",
20815
- textAlign: "center",
20816
- marginTop: "2rem",
20817
- opacity: 0.4
20818
- };
20819
- var LoginLayout = ({
20820
- className,
20821
- style,
20822
- children,
20823
- logo,
20824
- title,
20825
- subtitle,
20826
- footer
20827
- }) => {
20828
- const renderLogo = () => {
20829
- if (!logo) return null;
20830
- if (typeof logo === "string") {
20831
- return /* @__PURE__ */ jsx("div", { style: logoContainerStyle, children: /* @__PURE__ */ jsx("img", { src: logo, alt: title || "Logo", style: logoImageStyle }) });
20832
- }
20833
- return /* @__PURE__ */ jsx("div", { style: logoContainerStyle, children: logo });
20834
- };
20835
- return /* @__PURE__ */ jsx("div", { className, style: { ...containerStyle, ...style }, children: /* @__PURE__ */ jsxs("div", { style: cardStyle, children: [
20836
- renderLogo(),
20837
- title && /* @__PURE__ */ jsx("h1", { style: titleStyle, children: title }),
20838
- subtitle && /* @__PURE__ */ jsx("p", { style: subtitleStyle, children: subtitle }),
20839
- children,
20840
- footer && /* @__PURE__ */ jsx("p", { style: footerStyle, children: footer })
20841
- ] }) });
20842
- };
20843
- var formStyle = {
20844
- display: "flex",
20845
- flexDirection: "column",
20846
- gap: "1rem"
20847
- };
20848
- var labelStyle = {
20849
- display: "block",
20850
- fontSize: "0.875rem",
20851
- fontWeight: 500,
20852
- marginBottom: "0.375rem"
20853
- };
20854
- var inputStyle = {
20855
- display: "block",
20856
- width: "100%",
20857
- padding: "0.5rem 0.75rem",
20858
- fontSize: "0.875rem",
20859
- lineHeight: 1.5,
20860
- backgroundColor: "transparent",
20861
- border: "1px solid #d1d5db",
20862
- borderRadius: "0.375rem",
20863
- outline: "none",
20864
- boxSizing: "border-box"
20865
- };
20866
- var buttonStyle = {
20867
- display: "inline-flex",
20868
- alignItems: "center",
20869
- justifyContent: "center",
20870
- width: "100%",
20871
- padding: "0.625rem 1rem",
20872
- fontSize: "0.875rem",
20873
- fontWeight: 500,
20874
- color: "#ffffff",
20875
- backgroundColor: "#111827",
20876
- border: "none",
20877
- borderRadius: "0.375rem",
20878
- cursor: "pointer",
20879
- lineHeight: 1.5
20880
- };
20881
- var buttonDisabledStyle = {
20882
- ...buttonStyle,
20883
- opacity: 0.6,
20884
- cursor: "not-allowed"
20885
- };
20886
- var errorStyle = {
20887
- fontSize: "0.875rem",
20888
- color: "#dc2626",
20889
- marginTop: "-0.25rem"
20890
- };
20891
- var EmailAuth = React.forwardRef(
20892
- ({
20893
- className,
20894
- email,
20895
- onEmailChange,
20896
- password,
20897
- onPasswordChange,
20898
- onSubmit,
20899
- isLoading = false,
20900
- disabled = false,
20901
- emailLabel = "Email",
20902
- emailPlaceholder = "Enter your email",
20903
- passwordLabel = "Password",
20904
- passwordPlaceholder = "Enter your password",
20905
- submitText = "Sign In",
20906
- loadingText = "Signing in...",
20907
- error
20908
- }, ref) => {
20909
- const handleSubmit = useCallback(
20910
- (e) => {
20911
- e.preventDefault();
20912
- if (!isLoading && !disabled) {
20913
- onSubmit();
20914
- }
20915
- },
20916
- [onSubmit, isLoading, disabled]
20917
- );
20918
- const isDisabled = isLoading || disabled;
20919
- return /* @__PURE__ */ jsxs("form", { ref, className, style: formStyle, onSubmit: handleSubmit, children: [
20920
- /* @__PURE__ */ jsxs("div", { children: [
20921
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: emailLabel }),
20922
- /* @__PURE__ */ jsx(
20923
- "input",
20924
- {
20925
- type: "email",
20926
- value: email,
20927
- onChange: (e) => onEmailChange(e.target.value),
20928
- placeholder: emailPlaceholder,
20929
- disabled: isDisabled,
20930
- required: true,
20931
- autoComplete: "email",
20932
- style: inputStyle
20933
- }
20934
- )
20935
- ] }),
20936
- /* @__PURE__ */ jsxs("div", { children: [
20937
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: passwordLabel }),
20938
- /* @__PURE__ */ jsx(
20939
- "input",
20940
- {
20941
- type: "password",
20942
- value: password,
20943
- onChange: (e) => onPasswordChange(e.target.value),
20944
- placeholder: passwordPlaceholder,
20945
- disabled: isDisabled,
20946
- required: true,
20947
- autoComplete: "current-password",
20948
- style: inputStyle
20949
- }
20950
- )
20951
- ] }),
20952
- error && /* @__PURE__ */ jsx("p", { style: errorStyle, children: error }),
20953
- /* @__PURE__ */ jsx("button", { type: "submit", disabled: isDisabled, style: isDisabled ? buttonDisabledStyle : buttonStyle, children: isLoading ? loadingText : submitText })
20954
- ] });
20955
- }
20956
- );
20957
- EmailAuth.displayName = "EmailAuth";
20958
- var buttonStyle2 = {
20959
- display: "inline-flex",
20960
- alignItems: "center",
20961
- justifyContent: "center",
20962
- gap: "0.5rem",
20963
- width: "100%",
20964
- padding: "0.625rem 1rem",
20965
- fontSize: "0.875rem",
20966
- fontWeight: 500,
20967
- backgroundColor: "transparent",
20968
- border: "1px solid #d1d5db",
20969
- borderRadius: "0.375rem",
20970
- cursor: "pointer",
20971
- lineHeight: 1.5
20972
- };
20973
- var OIDCButton = React.forwardRef(
20974
- ({ className, label = "Sign in with SSO", onClick, icon }, ref) => {
20975
- return /* @__PURE__ */ jsxs("button", { ref, type: "button", className, style: buttonStyle2, onClick, children: [
20976
- icon && /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", alignItems: "center" }, children: icon }),
20977
- label
20978
- ] });
20979
- }
20980
- );
20981
- OIDCButton.displayName = "OIDCButton";
20982
- var buttonStyle3 = {
20983
- display: "inline-flex",
20984
- alignItems: "center",
20985
- justifyContent: "center",
20986
- gap: "0.5rem",
20987
- width: "100%",
20988
- padding: "0.625rem 1rem",
20989
- fontSize: "0.875rem",
20990
- fontWeight: 500,
20991
- backgroundColor: "transparent",
20992
- border: "1px solid #d1d5db",
20993
- borderRadius: "0.375rem",
20994
- cursor: "pointer",
20995
- lineHeight: 1.5
20996
- };
20997
- var OAuthButton = React.forwardRef(
20998
- ({ className, providerName, onClick, icon }, ref) => {
20999
- return /* @__PURE__ */ jsxs("button", { ref, type: "button", className, style: buttonStyle3, onClick, children: [
21000
- icon && /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", alignItems: "center" }, children: icon }),
21001
- providerName
21002
- ] });
21003
- }
21004
- );
21005
- OAuthButton.displayName = "OAuthButton";
21006
- var containerStyle2 = {
21007
- display: "flex",
21008
- alignItems: "center",
21009
- gap: "0.75rem",
21010
- margin: "1rem 0"
21011
- };
21012
- var lineStyle = {
21013
- flex: 1,
21014
- height: "1px",
21015
- backgroundColor: "#e5e7eb"
21016
- };
21017
- var textStyle = {
21018
- fontSize: "0.75rem",
21019
- opacity: 0.5,
21020
- whiteSpace: "nowrap"
21021
- };
21022
- var AuthDivider = ({ className, text = "or" }) => {
21023
- return /* @__PURE__ */ jsxs("div", { className, style: containerStyle2, children: [
21024
- /* @__PURE__ */ jsx("div", { style: lineStyle }),
21025
- /* @__PURE__ */ jsx("span", { style: textStyle, children: text }),
21026
- /* @__PURE__ */ jsx("div", { style: lineStyle })
21027
- ] });
21028
- };
21029
- var containerStyle3 = {
21030
- display: "flex",
21031
- flexDirection: "column",
21032
- alignItems: "center",
21033
- textAlign: "center",
21034
- padding: "1.5rem 0",
21035
- gap: "1rem"
21036
- };
21037
- var titleStyle2 = {
21038
- fontSize: "1.125rem",
21039
- fontWeight: 600,
21040
- margin: 0
21041
- };
21042
- var descriptionStyle = {
21043
- fontSize: "0.875rem",
21044
- opacity: 0.6,
21045
- lineHeight: 1.5,
21046
- margin: 0
21047
- };
21048
- var backButtonStyle = {
21049
- display: "inline-flex",
21050
- alignItems: "center",
21051
- justifyContent: "center",
21052
- padding: "0.5rem 1.5rem",
21053
- fontSize: "0.875rem",
21054
- fontWeight: 500,
21055
- backgroundColor: "transparent",
21056
- border: "1px solid #d1d5db",
21057
- borderRadius: "0.375rem",
21058
- cursor: "pointer",
21059
- marginTop: "0.5rem"
21060
- };
21061
- var PendingApproval = ({
21062
- className,
21063
- icon,
21064
- title = "Pending Approval",
21065
- description = "Your account is awaiting administrator approval. Please check back later.",
21066
- backText = "Go Back",
21067
- onBack
21068
- }) => {
21069
- return /* @__PURE__ */ jsxs("div", { className, style: containerStyle3, children: [
21070
- icon,
21071
- /* @__PURE__ */ jsx("h2", { style: titleStyle2, children: title }),
21072
- /* @__PURE__ */ jsx("p", { style: descriptionStyle, children: description }),
21073
- onBack && /* @__PURE__ */ jsx("button", { type: "button", style: backButtonStyle, onClick: onBack, children: backText })
21074
- ] });
21075
- };
21076
20798
  function cn3(...inputs) {
21077
20799
  return inputs.filter(Boolean).join(" ");
21078
20800
  }
@@ -25547,6 +25269,6 @@ lodash/lodash.js:
25547
25269
  *)
25548
25270
  */
25549
25271
 
25550
- export { ARTIST_CONFIG, ARTIST_DEFAULT_QUICK_ACTIONS, AppHeader, AppLayout, AppSidebar, ArtistLandingPage, AuthDivider, BSD_CONFIG, BSD_DEFAULT_FEATURE_CARDS, BaseAccordion, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseInput, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLoadingState, BaseMultiSelect, BaseNotice, BasePagination, BasePanel, BaseProgress, BaseRadioGroup, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSwitch, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseTextarea, BaseToolbar, BaseTooltip, BsdLandingPage, BsdToolboxPanel, CONCEPT_CONFIG, CONCEPT_DEFAULT_QUICK_ACTIONS, ConceptDesignLandingPage, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, DefaultLandingPage, DynamicComponent, EmailAuth, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginLayout, LoginPage, MonkeysToastProvider, MonkeysToaster, NavButton, OAuthButton, OIDCButton, PendingApproval, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchResizableSidebar, WorkbenchTableView, applyMonkeysTheme, calculateHue, calculateLightness, calculateSaturation, clearRegistry, cn3 as cn, createSolidColorScale, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getRegisteredComponents, getRegisteredThemes, getThemeConfig, hasCustomComponent, markDarkColor, registerComponent, registerTheme, resolveBaseAppearance, resolveComponent, resolveDataExplorerAppearance, resolveMonkeysTheme, resolveToastVariantForMessage, setNeocardTheme, setTailwindTheme, toast, useDarkMode, useToastFeed, useToastOnValue };
25272
+ export { ARTIST_CONFIG, ARTIST_DEFAULT_QUICK_ACTIONS, AppHeader, AppLayout, AppSidebar, ArtistLandingPage, BSD_CONFIG, BSD_DEFAULT_FEATURE_CARDS, BaseAccordion, BaseAvatar, BaseBadge, BaseBreadcrumb, BaseButton, BaseCheckbox, BaseContextMenu, BaseContextMenuCheckboxItem, BaseContextMenuContent, BaseContextMenuItem, BaseContextMenuLabel, BaseContextMenuRadioGroup, BaseContextMenuRadioItem, BaseContextMenuSeparator, BaseContextMenuSub, BaseContextMenuSubContent, BaseContextMenuSubTrigger, BaseContextMenuTrigger, BaseDescriptionList, BaseDialog, BaseDivider, BaseDropdownMenu, BaseEmptyState, BaseField, BaseInput, BaseLayout, BaseLayoutPane, BaseLayoutResizeHandle, BaseLayoutSplit, BaseLoadingState, BaseMultiSelect, BaseNotice, BasePagination, BasePanel, BaseProgress, BaseRadioGroup, BaseSectionHeader, BaseSegmentedControl, BaseSelect, BaseSkeleton, BaseSwitch, BaseTable, BaseTableBody, BaseTableCaption, BaseTableCell, BaseTableContainer, BaseTableEmpty, BaseTableFooter, BaseTableFooterBar, BaseTableHead, BaseTableHeader, BaseTableLoading, BaseTableRow, BaseTabs, BaseTextarea, BaseToolbar, BaseTooltip, BsdLandingPage, BsdToolboxPanel, CONCEPT_CONFIG, CONCEPT_DEFAULT_QUICK_ACTIONS, ConceptDesignLandingPage, DarkModeSelector, DarkModeSubMenu, DataExplorerActionBar, DataExplorerButton, DataExplorerCheckbox, DataExplorerCollectionFooter, DataExplorerDetailField, DataExplorerDetailSection, DataExplorerDetailShell, DataExplorerDisplayActionMenu, DataExplorerDisplayCard, DataExplorerDisplayCollectionView, DataExplorerDisplayListItem, DataExplorerDisplayMedia, DataExplorerImagePreview, DataExplorerPage, DataExplorerRecordCard, DataExplorerSelect, DataExplorerToolbarActions, DataExplorerToolbarShell, DataExplorerTree, DataExplorerTreeShell, DataExplorerView, DataExplorerViewCollection, DataExplorerViewItem, DataExplorerViewItemShell, DataExplorerViewShell, DataExplorerViewTree, DefaultLandingPage, DynamicComponent, I18nSelector, InteractiveTable, InteractiveTableEditableTextCell, InteractiveTableReadonlyCell, InteractiveTableSelectCell, LoginPage, MonkeysToastProvider, MonkeysToaster, NavButton, MonkeysToastProvider as ToastProvider, MonkeysToaster as Toaster, WorkbenchContentPane, WorkbenchContentToolbar, WorkbenchDetailSidebar, WorkbenchGalleryCard, WorkbenchGallerySettingsButton, WorkbenchGallerySettingsPanel, WorkbenchGalleryView, WorkbenchLaneView, WorkbenchMasonryLayout, WorkbenchResizableSidebar, WorkbenchTableView, applyMonkeysTheme, calculateHue, calculateLightness, calculateSaturation, clearRegistry, cn3 as cn, createSolidColorScale, extractToastMessage, genTailwindTheme, getBaseBadgeToneClassName, getBaseButtonToneClassName, getBaseMenuItemToneClassName, getBaseNoticeToneClassName, getDataExplorerActionToneClassName, getDataExplorerMenuItemToneClassName, getRegisteredComponents, getRegisteredThemes, getThemeConfig, hasCustomComponent, markDarkColor, registerComponent, registerTheme, resolveBaseAppearance, resolveComponent, resolveDataExplorerAppearance, resolveMonkeysTheme, resolveToastVariantForMessage, setNeocardTheme, setTailwindTheme, toast, useDarkMode, useToastFeed, useToastOnValue };
25551
25273
  //# sourceMappingURL=index.mjs.map
25552
25274
  //# sourceMappingURL=index.mjs.map