@jsenv/navi 0.18.14 → 0.18.16

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.
@@ -29521,31 +29521,31 @@ const CodeBox = ({
29521
29521
 
29522
29522
  installImportMetaCss(import.meta);import.meta.css = /* css */`
29523
29523
  @layer navi {
29524
- .navi_stat {
29524
+ .navi_quantity {
29525
29525
  --unit-color: color-mix(in srgb, currentColor 50%, white);
29526
29526
  --unit-size-ratio: 0.7;
29527
29527
  }
29528
29528
  }
29529
29529
 
29530
- .navi_stat {
29530
+ .navi_quantity {
29531
29531
  display: inline-flex;
29532
29532
  flex-direction: column;
29533
29533
  align-items: flex-start;
29534
29534
  gap: 0.3em;
29535
29535
  line-height: 1;
29536
29536
 
29537
- .navi_stat_label {
29537
+ .navi_quantity_label {
29538
29538
  font-weight: 600;
29539
29539
  font-size: 0.75em;
29540
29540
  text-transform: uppercase;
29541
29541
  line-height: 1;
29542
29542
  letter-spacing: 0.06em;
29543
29543
  }
29544
- .navi_stat_body {
29545
- .navi_stat_value {
29544
+ .navi_quantity_body {
29545
+ .navi_quantity_value {
29546
29546
  font-weight: bold;
29547
29547
  }
29548
- .navi_stat_unit {
29548
+ .navi_quantity_unit {
29549
29549
  color: var(--unit-color);
29550
29550
  font-weight: normal;
29551
29551
  font-size: calc(var(--unit-size-ratio) * 1em);
@@ -29564,13 +29564,13 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
29564
29564
  }
29565
29565
 
29566
29566
  &[data-unit-bottom] {
29567
- .navi_stat_value {
29567
+ .navi_quantity_value {
29568
29568
  display: inline-block;
29569
29569
  width: 100%;
29570
29570
  text-align: center;
29571
29571
  }
29572
- .navi_stat_body {
29573
- .navi_stat_unit {
29572
+ .navi_quantity_body {
29573
+ .navi_quantity_unit {
29574
29574
  display: inline-block;
29575
29575
  width: 100%;
29576
29576
  text-align: center;
@@ -29579,8 +29579,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
29579
29579
  }
29580
29580
  }
29581
29581
  `;
29582
- const StatPseudoClasses = [":hover", ":active", ":read-only", ":disabled", ":-navi-loading"];
29583
- const Stat = ({
29582
+ const QuantityPseudoClasses = [":hover", ":active", ":read-only", ":disabled", ":-navi-loading"];
29583
+ const Quantity = ({
29584
29584
  children,
29585
29585
  unit,
29586
29586
  unitPosition = "right",
@@ -29594,38 +29594,38 @@ const Stat = ({
29594
29594
  disabled,
29595
29595
  ...props
29596
29596
  }) => {
29597
- const value = parseStatValue(children);
29597
+ const value = parseQuantityValue(children);
29598
29598
  const valueRounded = integer && typeof value === "number" ? Math.round(value) : value;
29599
29599
  const valueFormatted = typeof valueRounded === "number" ? formatNumber(valueRounded, {
29600
29600
  lang
29601
29601
  }) : valueRounded;
29602
29602
  const unitBottom = unitPosition === "bottom";
29603
29603
  return jsxs(Text, {
29604
- baseClassName: "navi_stat",
29604
+ baseClassName: "navi_quantity",
29605
29605
  "data-unit-bottom": unitBottom ? "" : undefined,
29606
29606
  basePseudoState: {
29607
29607
  ":read-only": readOnly,
29608
29608
  ":disabled": disabled,
29609
29609
  ":-navi-loading": loading
29610
29610
  },
29611
- pseudoClasses: StatPseudoClasses,
29611
+ pseudoClasses: QuantityPseudoClasses,
29612
29612
  spacing: "pre",
29613
29613
  ...props,
29614
29614
  children: [label && jsx("span", {
29615
- className: "navi_stat_label",
29615
+ className: "navi_quantity_label",
29616
29616
  children: label
29617
29617
  }), jsxs(Text, {
29618
- className: "navi_stat_body",
29618
+ className: "navi_quantity_body",
29619
29619
  size: size,
29620
29620
  spacing: unitBottom ? jsx("br", {}) : undefined,
29621
29621
  children: [jsx("span", {
29622
- className: "navi_stat_value",
29622
+ className: "navi_quantity_value",
29623
29623
  children: loading ? jsx(Icon, {
29624
29624
  flowInline: true,
29625
29625
  children: jsx(LoadingDots, {})
29626
29626
  }) : valueFormatted
29627
29627
  }), unit && jsx("span", {
29628
- className: "navi_stat_unit",
29628
+ className: "navi_quantity_unit",
29629
29629
  style: {
29630
29630
  ...(unitSizeRatio === undefined ? {} : {
29631
29631
  "--unit-size-ratio": unitSizeRatio
@@ -29636,7 +29636,7 @@ const Stat = ({
29636
29636
  })]
29637
29637
  });
29638
29638
  };
29639
- const parseStatValue = children => {
29639
+ const parseQuantityValue = children => {
29640
29640
  if (typeof children !== "string") {
29641
29641
  return children;
29642
29642
  }
@@ -29796,7 +29796,7 @@ const Meter = ({
29796
29796
  const fillRatio = max === min ? 0 : (clampedValue - min) / (max - min);
29797
29797
  let children = caption;
29798
29798
  if (children === undefined && percentage) {
29799
- children = jsx(Stat, {
29799
+ children = jsx(Quantity, {
29800
29800
  unit: "%",
29801
29801
  unitSizeRatio: "1",
29802
29802
  children: Math.round(fillRatio * 100)
@@ -30318,5 +30318,5 @@ const UserSvg = () => jsx("svg", {
30318
30318
  })
30319
30319
  });
30320
30320
 
30321
- export { ActionRenderer, ActiveKeyboardShortcuts, Address, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, Code, Col, Colgroup, ConstructionSvg, Details, DialogLayout, Editable, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, HeartSvg, HomeSvg, Icon, Image, Input, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, MessageBox, Meter, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, StarSvg, Stat, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createRequestCanceller, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useArraySignalMembership, useCalloutClose, useCancelPrevious, useCellsAndColumns, useConstraintValidityState, useDependenciesDiff, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useMatchingRouteInfo, useNavState$1 as useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage };
30321
+ export { ActionRenderer, ActiveKeyboardShortcuts, Address, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, Code, Col, Colgroup, ConstructionSvg, Details, DialogLayout, Editable, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, HeartSvg, HomeSvg, Icon, Image, Input, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, MessageBox, Meter, Paragraph, Quantity, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, StarSvg, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createRequestCanceller, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useArraySignalMembership, useCalloutClose, useCancelPrevious, useCellsAndColumns, useConstraintValidityState, useDependenciesDiff, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useMatchingRouteInfo, useNavState$1 as useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage };
30322
30322
  //# sourceMappingURL=jsenv_navi.js.map