@jsenv/navi 0.12.9 → 0.12.10

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.
@@ -8734,58 +8734,58 @@ import.meta.css = /* css */ `
8734
8734
  }
8735
8735
 
8736
8736
  .ui_transition,
8737
- .active_group,
8738
- .previous_group,
8739
- .target_slot,
8740
- .previous_target_slot,
8741
- .outgoing_slot,
8742
- .previous_outgoing_slot {
8737
+ .ui_transition_active_group,
8738
+ .ui_transition_previous_group,
8739
+ .ui_transition_target_slot,
8740
+ .ui_transition_previous_target_slot,
8741
+ .ui_transition_outgoing_slot,
8742
+ .ui_transition_previous_outgoing_slot {
8743
8743
  width: 100%;
8744
8744
  height: 100%;
8745
8745
  }
8746
8746
 
8747
- .target_slot,
8748
- .outgoing_slot,
8749
- .previous_target_slot,
8750
- .previous_outgoing_slot {
8747
+ .ui_transition_target_slot,
8748
+ .ui_transition_outgoing_slot,
8749
+ .ui_transition_previous_target_slot,
8750
+ .ui_transition_previous_outgoing_slot {
8751
8751
  display: flex;
8752
8752
  align-items: var(--x-align-items);
8753
8753
  justify-content: var(--x-justify-content);
8754
8754
  }
8755
- .target_slot[data-items-width-overflow],
8756
- .previous_target_slot[data-items-width-overflow],
8757
- .previous_target_slot[data-items-width-overflow],
8758
- .previous_outgoing_slot[data-items-width-overflow] {
8755
+ .ui_transition_target_slot[data-items-width-overflow],
8756
+ .ui_transition_previous_target_slot[data-items-width-overflow],
8757
+ .ui_transition_previous_target_slot[data-items-width-overflow],
8758
+ .ui_transition_previous_outgoing_slot[data-items-width-overflow] {
8759
8759
  --x-justify-content: flex-start;
8760
8760
  }
8761
- .target_slot[data-items-height-overflow],
8762
- .previous_slot[data-items-height-overflow],
8763
- .previous_target_slot[data-items-height-overflow],
8764
- .previous_outgoing_slot[data-items-height-overflow] {
8761
+ .ui_transition_target_slot[data-items-height-overflow],
8762
+ .ui_transition_previous_slot[data-items-height-overflow],
8763
+ .ui_transition_previous_target_slot[data-items-height-overflow],
8764
+ .ui_transition_previous_outgoing_slot[data-items-height-overflow] {
8765
8765
  --x-align-items: flex-start;
8766
8766
  }
8767
8767
 
8768
- .active_group {
8768
+ .ui_transition_active_group {
8769
8769
  position: relative;
8770
8770
  }
8771
- .target_slot {
8771
+ .ui_transition_target_slot {
8772
8772
  position: relative;
8773
8773
  }
8774
- .outgoing_slot,
8775
- .previous_outgoing_slot {
8774
+ .ui_transition_outgoing_slot,
8775
+ .ui_transition_previous_outgoing_slot {
8776
8776
  position: absolute;
8777
8777
  top: 0;
8778
8778
  left: 0;
8779
8779
  }
8780
- .previous_group {
8780
+ .ui_transition_previous_group {
8781
8781
  position: absolute;
8782
8782
  inset: 0;
8783
8783
  }
8784
- .ui_transition[data-only-previous-group] .previous_group {
8784
+ .ui_transition[data-only-previous-group] .ui_transition_previous_group {
8785
8785
  position: relative;
8786
8786
  }
8787
8787
 
8788
- .target_slot_background {
8788
+ .ui_transition_target_slot_background {
8789
8789
  position: absolute;
8790
8790
  top: 0;
8791
8791
  left: 0;
@@ -8796,7 +8796,7 @@ import.meta.css = /* css */ `
8796
8796
  background: var(--target-slot-background, transparent);
8797
8797
  pointer-events: none;
8798
8798
  }
8799
- .ui_transition[data-transitioning] .target_slot_background {
8799
+ .ui_transition[data-transitioning] .ui_transition_target_slot_background {
8800
8800
  display: block;
8801
8801
  }
8802
8802
  `;
@@ -8844,15 +8844,15 @@ const createUITransitionController = (
8844
8844
  console.debug(`[size]`, message);
8845
8845
  };
8846
8846
 
8847
- const activeGroup = root.querySelector(".active_group");
8848
- const targetSlot = root.querySelector(".target_slot");
8849
- const outgoingSlot = root.querySelector(".outgoing_slot");
8850
- const previousGroup = root.querySelector(".previous_group");
8847
+ const activeGroup = root.querySelector(".ui_transition_active_group");
8848
+ const targetSlot = root.querySelector(".ui_transition_target_slot");
8849
+ const outgoingSlot = root.querySelector(".ui_transition_outgoing_slot");
8850
+ const previousGroup = root.querySelector(".ui_transition_previous_group");
8851
8851
  const previousTargetSlot = previousGroup?.querySelector(
8852
- ".previous_target_slot",
8852
+ ".ui_transition_previous_target_slot",
8853
8853
  );
8854
8854
  const previousOutgoingSlot = previousGroup?.querySelector(
8855
- ".previous_outgoing_slot",
8855
+ ".ui_transition_previous_outgoing_slot",
8856
8856
  );
8857
8857
 
8858
8858
  if (
@@ -8872,7 +8872,7 @@ const createUITransitionController = (
8872
8872
  // we maintain a background copy behind target slot to avoid showing
8873
8873
  // the body flashing during the fade-in
8874
8874
  const targetSlotBackground = document.createElement("div");
8875
- targetSlotBackground.className = "target_slot_background";
8875
+ targetSlotBackground.className = "ui_transition_target_slot_background";
8876
8876
  activeGroup.insertBefore(targetSlotBackground, targetSlot);
8877
8877
 
8878
8878
  root.style.setProperty("--x-transition-duration", `${duration}ms`);
@@ -9530,6 +9530,8 @@ const UITransition = ({
9530
9530
  debugSize,
9531
9531
  disabled,
9532
9532
  uiTransitionRef,
9533
+ alignX,
9534
+ alignY,
9533
9535
  ...props
9534
9536
  }) => {
9535
9537
  const contentIdRef = useRef(contentId);
@@ -9590,12 +9592,15 @@ const UITransition = ({
9590
9592
  if (disabled) {
9591
9593
  return null;
9592
9594
  }
9593
- const uiTransition = createUITransitionController(ref.current);
9595
+ const uiTransition = createUITransitionController(ref.current, {
9596
+ alignX,
9597
+ alignY
9598
+ });
9594
9599
  uiTransitionRef.current = uiTransition;
9595
9600
  return () => {
9596
9601
  uiTransition.cleanup();
9597
9602
  };
9598
- }, [disabled]);
9603
+ }, [disabled, alignX, alignY]);
9599
9604
  if (disabled) {
9600
9605
  return children;
9601
9606
  }
@@ -9609,23 +9614,23 @@ const UITransition = ({
9609
9614
  "data-debug-size": debugSize ? "" : undefined,
9610
9615
  "data-debug-content": debugContent ? "" : undefined,
9611
9616
  children: [jsxs("div", {
9612
- className: "active_group",
9617
+ className: "ui_transition_active_group",
9613
9618
  children: [jsx("div", {
9614
- className: "target_slot",
9619
+ className: "ui_transition_target_slot",
9615
9620
  "data-content-id": contentIdRef.current ? contentIdRef.current : undefined,
9616
9621
  children: jsx(UITransitionContentIdContext.Provider, {
9617
9622
  value: uiTransitionContentIdContextValue,
9618
9623
  children: children
9619
9624
  })
9620
9625
  }), jsx("div", {
9621
- className: "outgoing_slot"
9626
+ className: "ui_transition_outgoing_slot"
9622
9627
  })]
9623
9628
  }), jsxs("div", {
9624
- className: "previous_group",
9629
+ className: "ui_transition_previous_group",
9625
9630
  children: [jsx("div", {
9626
- className: "previous_target_slot"
9631
+ className: "ui_transition_previous_target_slot"
9627
9632
  }), jsx("div", {
9628
- className: "previous_outgoing_slot"
9633
+ className: "ui_transition_previous_outgoing_slot"
9629
9634
  })]
9630
9635
  })]
9631
9636
  });
@@ -21588,6 +21593,118 @@ const Title = ({
21588
21593
  });
21589
21594
  };
21590
21595
 
21596
+ installImportMetaCss(import.meta);import.meta.css = /* css */`
21597
+ @layer navi {
21598
+ .navi_dialog_layout {
21599
+ --margin: 30px;
21600
+ --padding: 20px;
21601
+ --background: white;
21602
+ --border-width: 2px;
21603
+ --border-color: lightgrey;
21604
+ --border-radius: 10px;
21605
+ --min-width: 300px;
21606
+ --min-height: auto;
21607
+ }
21608
+ }
21609
+ .navi_dialog_layout {
21610
+ padding-top: var(--margin-top, var(--margin-y, var(--margin)));
21611
+ padding-right: var(--margin-right, var(--margin-x, var(--margin)));
21612
+ padding-bottom: var(--margin-bottom, var(--margin-y, var(--margin)));
21613
+ padding-left: var(--margin-left, var(--margin-x, var(--margin)));
21614
+ }
21615
+
21616
+ .navi_dialog_content {
21617
+ min-width: var(--min-width);
21618
+ min-height: var(--min-height);
21619
+ padding-top: var(--padding-top, var(--padding-y, var(--padding)));
21620
+ padding-right: var(--padding-right, var(--padding-x, var(--padding)));
21621
+ padding-bottom: var(--padding-bottom, var(--padding-y, var(--padding)));
21622
+ padding-left: var(--padding-left, var(--padding-x, var(--padding)));
21623
+ background: var(--background);
21624
+ background-color: var(--background-color, var(--background));
21625
+ border-width: var(--border-width);
21626
+ border-style: solid;
21627
+ border-color: var(--border-color);
21628
+ border-radius: var(--border-radius);
21629
+ }
21630
+ `;
21631
+ const DialogManagedByCSSVars = {
21632
+ margin: "--margin",
21633
+ marginTop: "--margin-top",
21634
+ marginBottom: "--margin-bottom",
21635
+ marginLeft: "--margin-left",
21636
+ marginRight: "--margin-right",
21637
+ borderRadius: "--border-radius",
21638
+ borderWidth: "--border-width",
21639
+ borderColor: "--border-color",
21640
+ background: "--background",
21641
+ backgroundColor: "--background-color",
21642
+ padding: "--padding",
21643
+ paddingTop: "--padding-top",
21644
+ paddingBottom: "--padding-bottom",
21645
+ paddingLeft: "--padding-left",
21646
+ paddingRight: "--padding-right",
21647
+ minWidth: "--min-width",
21648
+ minHeight: "--min-height"
21649
+ };
21650
+ const DialogLayout = ({
21651
+ children,
21652
+ contentAlignX = "center",
21653
+ contentAlignY = "center",
21654
+ ...props
21655
+ }) => {
21656
+ return jsx(Box, {
21657
+ className: "navi_dialog_layout",
21658
+ managedByCSSVars: DialogManagedByCSSVars,
21659
+ visualSelector: ".navi_dialog_content",
21660
+ ...props,
21661
+ contentAlignX: contentAlignX,
21662
+ contentAlignY: contentAlignY,
21663
+ children: jsx(Box, {
21664
+ className: "navi_dialog_content",
21665
+ row: true,
21666
+ children: children
21667
+ })
21668
+ });
21669
+ };
21670
+
21671
+ installImportMetaCss(import.meta);import.meta.css = /* css */`
21672
+ @layer navi {
21673
+ .navi_viewport_layout {
21674
+ --padding: 40px;
21675
+ --background: white;
21676
+ }
21677
+ }
21678
+
21679
+ .navi_viewport_layout {
21680
+ padding-top: var(--padding-top, var(--padding-y, var(--padding)));
21681
+ padding-right: var(--padding-right, var(--padding-x, var(--padding)));
21682
+ padding-bottom: var(--padding-bottom, var(--padding-y, var(--padding)));
21683
+ padding-left: var(--padding-left, var(--padding-x, var(--padding)));
21684
+ background: var(--background);
21685
+ }
21686
+ `;
21687
+ const ViewportManagedByCSSVars = {
21688
+ padding: "--padding",
21689
+ paddingTop: "--padding-top",
21690
+ paddingBottom: "--padding-bottom",
21691
+ paddingLeft: "--padding-left",
21692
+ paddingRight: "--padding-right",
21693
+ background: "--background"
21694
+ };
21695
+ const ViewportLayout = props => {
21696
+ return jsx(Box, {
21697
+ row: true,
21698
+ ...props,
21699
+ className: "navi_viewport_layout",
21700
+ managedByCSSVars: ViewportManagedByCSSVars,
21701
+ minWidth: "max-content",
21702
+ minHeight: "max-content",
21703
+ width: "100%",
21704
+ height: "100%"
21705
+ });
21706
+ };
21707
+
21591
21708
  const createUniqueValueConstraint = (
21592
21709
  // the set might be incomplete (the front usually don't have the full copy of all the items from the backend)
21593
21710
  // but this is already nice to help user with what we know
@@ -21665,5 +21782,5 @@ const useDependenciesDiff = (inputs) => {
21665
21782
  return diffRef.current;
21666
21783
  };
21667
21784
 
21668
- export { ActionRenderer, ActiveKeyboardShortcuts, BadgeCount, Box, Button, Checkbox, CheckboxList, Code, Col, Colgroup, Details, Editable, ErrorBoundaryContext, FontSizedSvg, Form, Icon, IconAndText, Image, Input, Label, Layout, Link, LinkWithIcon, MessageBox, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, Select, SelectionContext, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, actionIntegratedVia, addCustomMessage, createAction, createSelectionKeyboardShortcuts, createUniqueValueConstraint, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, goBack, goForward, goTo, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, openCallout, rawUrlPart, reload, removeCustomMessage, rerunActions, resource, setBaseUrl, setupRoutes, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useActiveRouteInfo, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, useUrlSearchParam, valueInLocalStorage };
21785
+ export { ActionRenderer, ActiveKeyboardShortcuts, BadgeCount, Box, Button, Checkbox, CheckboxList, Code, Col, Colgroup, Details, DialogLayout, Editable, ErrorBoundaryContext, FontSizedSvg, Form, Icon, IconAndText, Image, Input, Label, Layout, Link, LinkWithIcon, MessageBox, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, Select, SelectionContext, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, ViewportLayout, actionIntegratedVia, addCustomMessage, createAction, createSelectionKeyboardShortcuts, createUniqueValueConstraint, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, goBack, goForward, goTo, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, openCallout, rawUrlPart, reload, removeCustomMessage, rerunActions, resource, setBaseUrl, setupRoutes, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useActiveRouteInfo, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, useUrlSearchParam, valueInLocalStorage };
21669
21786
  //# sourceMappingURL=jsenv_navi.js.map