@inf-monkeys-tech/monkeys-design 0.4.42 → 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,10 +1,11 @@
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';
5
5
  import { useSensors, useSensor, PointerSensor, DndContext, DragOverlay, useDroppable, useDraggable } from '@dnd-kit/core';
6
6
  import '@dnd-kit/sortable';
7
7
  import '@dnd-kit/utilities';
8
+ import 'react-dom';
8
9
  import { toast as toast$1, Toaster } from 'sonner';
9
10
  import * as Tooltip from '@radix-ui/react-tooltip';
10
11
 
@@ -20519,6 +20520,7 @@ function LoginPage({
20519
20520
  onMethodChange,
20520
20521
  externalLabel,
20521
20522
  externalMethods = [],
20523
+ externalPanel,
20522
20524
  callout
20523
20525
  }) {
20524
20526
  const availableMethods = useMemo(() => methods.filter((method) => !method.hidden), [methods]);
@@ -20671,7 +20673,24 @@ function LoginPage({
20671
20673
  method.id
20672
20674
  );
20673
20675
  }) }) : null,
20674
- 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(
20675
20694
  "form",
20676
20695
  {
20677
20696
  className: "login-page__form-fields",
@@ -20765,7 +20784,7 @@ function LoginPage({
20765
20784
  ]
20766
20785
  }
20767
20786
  ) : null,
20768
- 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: [
20769
20788
  externalLabel ? /* @__PURE__ */ jsx("div", { className: "login-page__oauth-label", "data-login-part": "external-label", children: externalLabel }) : null,
20770
20789
  /* @__PURE__ */ jsx("div", { className: "login-page__oauth-list", "data-login-part": "external-list", children: externalMethods.map(renderExternalMethod) })
20771
20790
  ] }) : null
@@ -20776,302 +20795,6 @@ function LoginPage({
20776
20795
  }
20777
20796
  );
20778
20797
  }
20779
- var containerStyle = {
20780
- display: "flex",
20781
- alignItems: "center",
20782
- justifyContent: "center",
20783
- minHeight: "100vh",
20784
- padding: "1rem"
20785
- };
20786
- var cardStyle = {
20787
- width: "100%",
20788
- maxWidth: "400px"
20789
- };
20790
- var logoContainerStyle = {
20791
- display: "flex",
20792
- justifyContent: "center",
20793
- marginBottom: "1.5rem"
20794
- };
20795
- var logoImageStyle = {
20796
- height: "48px",
20797
- width: "auto"
20798
- };
20799
- var titleStyle = {
20800
- fontSize: "1.5rem",
20801
- fontWeight: 700,
20802
- textAlign: "center",
20803
- marginBottom: "0.5rem",
20804
- lineHeight: 1.2
20805
- };
20806
- var subtitleStyle = {
20807
- fontSize: "0.875rem",
20808
- textAlign: "center",
20809
- marginBottom: "1.5rem",
20810
- opacity: 0.6
20811
- };
20812
- var footerStyle = {
20813
- fontSize: "0.75rem",
20814
- textAlign: "center",
20815
- marginTop: "2rem",
20816
- opacity: 0.4
20817
- };
20818
- var LoginLayout = ({
20819
- className,
20820
- style,
20821
- children,
20822
- logo,
20823
- title,
20824
- subtitle,
20825
- footer
20826
- }) => {
20827
- const renderLogo = () => {
20828
- if (!logo) return null;
20829
- if (typeof logo === "string") {
20830
- return /* @__PURE__ */ jsx("div", { style: logoContainerStyle, children: /* @__PURE__ */ jsx("img", { src: logo, alt: title || "Logo", style: logoImageStyle }) });
20831
- }
20832
- return /* @__PURE__ */ jsx("div", { style: logoContainerStyle, children: logo });
20833
- };
20834
- return /* @__PURE__ */ jsx("div", { className, style: { ...containerStyle, ...style }, children: /* @__PURE__ */ jsxs("div", { style: cardStyle, children: [
20835
- renderLogo(),
20836
- title && /* @__PURE__ */ jsx("h1", { style: titleStyle, children: title }),
20837
- subtitle && /* @__PURE__ */ jsx("p", { style: subtitleStyle, children: subtitle }),
20838
- children,
20839
- footer && /* @__PURE__ */ jsx("p", { style: footerStyle, children: footer })
20840
- ] }) });
20841
- };
20842
- var formStyle = {
20843
- display: "flex",
20844
- flexDirection: "column",
20845
- gap: "1rem"
20846
- };
20847
- var labelStyle = {
20848
- display: "block",
20849
- fontSize: "0.875rem",
20850
- fontWeight: 500,
20851
- marginBottom: "0.375rem"
20852
- };
20853
- var inputStyle = {
20854
- display: "block",
20855
- width: "100%",
20856
- padding: "0.5rem 0.75rem",
20857
- fontSize: "0.875rem",
20858
- lineHeight: 1.5,
20859
- backgroundColor: "transparent",
20860
- border: "1px solid #d1d5db",
20861
- borderRadius: "0.375rem",
20862
- outline: "none",
20863
- boxSizing: "border-box"
20864
- };
20865
- var buttonStyle = {
20866
- display: "inline-flex",
20867
- alignItems: "center",
20868
- justifyContent: "center",
20869
- width: "100%",
20870
- padding: "0.625rem 1rem",
20871
- fontSize: "0.875rem",
20872
- fontWeight: 500,
20873
- color: "#ffffff",
20874
- backgroundColor: "#111827",
20875
- border: "none",
20876
- borderRadius: "0.375rem",
20877
- cursor: "pointer",
20878
- lineHeight: 1.5
20879
- };
20880
- var buttonDisabledStyle = {
20881
- ...buttonStyle,
20882
- opacity: 0.6,
20883
- cursor: "not-allowed"
20884
- };
20885
- var errorStyle = {
20886
- fontSize: "0.875rem",
20887
- color: "#dc2626",
20888
- marginTop: "-0.25rem"
20889
- };
20890
- var EmailAuth = React.forwardRef(
20891
- ({
20892
- className,
20893
- email,
20894
- onEmailChange,
20895
- password,
20896
- onPasswordChange,
20897
- onSubmit,
20898
- isLoading = false,
20899
- disabled = false,
20900
- emailLabel = "Email",
20901
- emailPlaceholder = "Enter your email",
20902
- passwordLabel = "Password",
20903
- passwordPlaceholder = "Enter your password",
20904
- submitText = "Sign In",
20905
- loadingText = "Signing in...",
20906
- error
20907
- }, ref) => {
20908
- const handleSubmit = useCallback(
20909
- (e) => {
20910
- e.preventDefault();
20911
- if (!isLoading && !disabled) {
20912
- onSubmit();
20913
- }
20914
- },
20915
- [onSubmit, isLoading, disabled]
20916
- );
20917
- const isDisabled = isLoading || disabled;
20918
- return /* @__PURE__ */ jsxs("form", { ref, className, style: formStyle, onSubmit: handleSubmit, children: [
20919
- /* @__PURE__ */ jsxs("div", { children: [
20920
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: emailLabel }),
20921
- /* @__PURE__ */ jsx(
20922
- "input",
20923
- {
20924
- type: "email",
20925
- value: email,
20926
- onChange: (e) => onEmailChange(e.target.value),
20927
- placeholder: emailPlaceholder,
20928
- disabled: isDisabled,
20929
- required: true,
20930
- autoComplete: "email",
20931
- style: inputStyle
20932
- }
20933
- )
20934
- ] }),
20935
- /* @__PURE__ */ jsxs("div", { children: [
20936
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: passwordLabel }),
20937
- /* @__PURE__ */ jsx(
20938
- "input",
20939
- {
20940
- type: "password",
20941
- value: password,
20942
- onChange: (e) => onPasswordChange(e.target.value),
20943
- placeholder: passwordPlaceholder,
20944
- disabled: isDisabled,
20945
- required: true,
20946
- autoComplete: "current-password",
20947
- style: inputStyle
20948
- }
20949
- )
20950
- ] }),
20951
- error && /* @__PURE__ */ jsx("p", { style: errorStyle, children: error }),
20952
- /* @__PURE__ */ jsx("button", { type: "submit", disabled: isDisabled, style: isDisabled ? buttonDisabledStyle : buttonStyle, children: isLoading ? loadingText : submitText })
20953
- ] });
20954
- }
20955
- );
20956
- EmailAuth.displayName = "EmailAuth";
20957
- var buttonStyle2 = {
20958
- display: "inline-flex",
20959
- alignItems: "center",
20960
- justifyContent: "center",
20961
- gap: "0.5rem",
20962
- width: "100%",
20963
- padding: "0.625rem 1rem",
20964
- fontSize: "0.875rem",
20965
- fontWeight: 500,
20966
- backgroundColor: "transparent",
20967
- border: "1px solid #d1d5db",
20968
- borderRadius: "0.375rem",
20969
- cursor: "pointer",
20970
- lineHeight: 1.5
20971
- };
20972
- var OIDCButton = React.forwardRef(
20973
- ({ className, label = "Sign in with SSO", onClick, icon }, ref) => {
20974
- return /* @__PURE__ */ jsxs("button", { ref, type: "button", className, style: buttonStyle2, onClick, children: [
20975
- icon && /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", alignItems: "center" }, children: icon }),
20976
- label
20977
- ] });
20978
- }
20979
- );
20980
- OIDCButton.displayName = "OIDCButton";
20981
- var buttonStyle3 = {
20982
- display: "inline-flex",
20983
- alignItems: "center",
20984
- justifyContent: "center",
20985
- gap: "0.5rem",
20986
- width: "100%",
20987
- padding: "0.625rem 1rem",
20988
- fontSize: "0.875rem",
20989
- fontWeight: 500,
20990
- backgroundColor: "transparent",
20991
- border: "1px solid #d1d5db",
20992
- borderRadius: "0.375rem",
20993
- cursor: "pointer",
20994
- lineHeight: 1.5
20995
- };
20996
- var OAuthButton = React.forwardRef(
20997
- ({ className, providerName, onClick, icon }, ref) => {
20998
- return /* @__PURE__ */ jsxs("button", { ref, type: "button", className, style: buttonStyle3, onClick, children: [
20999
- icon && /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", alignItems: "center" }, children: icon }),
21000
- providerName
21001
- ] });
21002
- }
21003
- );
21004
- OAuthButton.displayName = "OAuthButton";
21005
- var containerStyle2 = {
21006
- display: "flex",
21007
- alignItems: "center",
21008
- gap: "0.75rem",
21009
- margin: "1rem 0"
21010
- };
21011
- var lineStyle = {
21012
- flex: 1,
21013
- height: "1px",
21014
- backgroundColor: "#e5e7eb"
21015
- };
21016
- var textStyle = {
21017
- fontSize: "0.75rem",
21018
- opacity: 0.5,
21019
- whiteSpace: "nowrap"
21020
- };
21021
- var AuthDivider = ({ className, text = "or" }) => {
21022
- return /* @__PURE__ */ jsxs("div", { className, style: containerStyle2, children: [
21023
- /* @__PURE__ */ jsx("div", { style: lineStyle }),
21024
- /* @__PURE__ */ jsx("span", { style: textStyle, children: text }),
21025
- /* @__PURE__ */ jsx("div", { style: lineStyle })
21026
- ] });
21027
- };
21028
- var containerStyle3 = {
21029
- display: "flex",
21030
- flexDirection: "column",
21031
- alignItems: "center",
21032
- textAlign: "center",
21033
- padding: "1.5rem 0",
21034
- gap: "1rem"
21035
- };
21036
- var titleStyle2 = {
21037
- fontSize: "1.125rem",
21038
- fontWeight: 600,
21039
- margin: 0
21040
- };
21041
- var descriptionStyle = {
21042
- fontSize: "0.875rem",
21043
- opacity: 0.6,
21044
- lineHeight: 1.5,
21045
- margin: 0
21046
- };
21047
- var backButtonStyle = {
21048
- display: "inline-flex",
21049
- alignItems: "center",
21050
- justifyContent: "center",
21051
- padding: "0.5rem 1.5rem",
21052
- fontSize: "0.875rem",
21053
- fontWeight: 500,
21054
- backgroundColor: "transparent",
21055
- border: "1px solid #d1d5db",
21056
- borderRadius: "0.375rem",
21057
- cursor: "pointer",
21058
- marginTop: "0.5rem"
21059
- };
21060
- var PendingApproval = ({
21061
- className,
21062
- icon,
21063
- title = "Pending Approval",
21064
- description = "Your account is awaiting administrator approval. Please check back later.",
21065
- backText = "Go Back",
21066
- onBack
21067
- }) => {
21068
- return /* @__PURE__ */ jsxs("div", { className, style: containerStyle3, children: [
21069
- icon,
21070
- /* @__PURE__ */ jsx("h2", { style: titleStyle2, children: title }),
21071
- /* @__PURE__ */ jsx("p", { style: descriptionStyle, children: description }),
21072
- onBack && /* @__PURE__ */ jsx("button", { type: "button", style: backButtonStyle, onClick: onBack, children: backText })
21073
- ] });
21074
- };
21075
20798
  function cn3(...inputs) {
21076
20799
  return inputs.filter(Boolean).join(" ");
21077
20800
  }
@@ -25546,6 +25269,6 @@ lodash/lodash.js:
25546
25269
  *)
25547
25270
  */
25548
25271
 
25549
- 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 };
25550
25273
  //# sourceMappingURL=index.mjs.map
25551
25274
  //# sourceMappingURL=index.mjs.map