@ultraviolet/plus 3.0.0-beta.14 → 3.0.0-beta.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.
Files changed (110) hide show
  1. package/dist/components/ContentCard/styles.css.js +0 -1
  2. package/dist/components/EstimateCost/Components/components.css.js +1 -0
  3. package/dist/components/InfoTable/components/Cell.js +2 -2
  4. package/dist/components/InfoTable/styles.css.d.ts +1 -0
  5. package/dist/components/InfoTable/styles.css.js +2 -0
  6. package/dist/components/OfferList/OfferList.d.ts +1 -0
  7. package/dist/components/OfferList/components/Row.d.ts +1 -0
  8. package/dist/components/OfferList/components/Row.js +1 -1
  9. package/dist/components/Plans/styles.css.js +1 -0
  10. package/dist/components/SteppedListCard/Step.d.ts +6 -1
  11. package/dist/components/SteppedListCard/Step.js +2 -1
  12. package/dist/components/SteppedListCard/SteppedListCard.d.ts +5 -2
  13. package/dist/components/SteppedListCard/SteppedListCard.js +10 -6
  14. package/dist/components/SteppedListCard/SteppedListContent.d.ts +1 -1
  15. package/dist/components/SteppedListCard/helper.d.ts +1 -1
  16. package/dist/components/SteppedListCard/helper.js +2 -1
  17. package/dist/components/SteppedListCard/styles.css.d.ts +1 -0
  18. package/dist/components/SteppedListCard/styles.css.js +2 -0
  19. package/dist/plus.css +1 -1
  20. package/package.json +8 -12
  21. package/dist/components/CodeEditor/CodeEditor.cjs +0 -50
  22. package/dist/components/CodeEditor/styles.css.cjs +0 -9
  23. package/dist/components/ContentCard/Skeleton.cjs +0 -23
  24. package/dist/components/ContentCard/index.cjs +0 -62
  25. package/dist/components/ContentCard/styles.css.cjs +0 -28
  26. package/dist/components/ContentCardGroup/Card.cjs +0 -30
  27. package/dist/components/ContentCardGroup/SkeletonCard.cjs +0 -15
  28. package/dist/components/ContentCardGroup/index.cjs +0 -18
  29. package/dist/components/ContentCardGroup/styles.css.cjs +0 -17
  30. package/dist/components/Conversation/index.cjs +0 -42
  31. package/dist/components/Conversation/styles.css.cjs +0 -17
  32. package/dist/components/CustomerSatisfaction/assets/1-5.svg.cjs +0 -3
  33. package/dist/components/CustomerSatisfaction/assets/1-5NB.svg.cjs +0 -3
  34. package/dist/components/CustomerSatisfaction/assets/2-5.svg.cjs +0 -3
  35. package/dist/components/CustomerSatisfaction/assets/2-5NB.svg.cjs +0 -3
  36. package/dist/components/CustomerSatisfaction/assets/3-5.svg.cjs +0 -3
  37. package/dist/components/CustomerSatisfaction/assets/3-5NB.svg.cjs +0 -3
  38. package/dist/components/CustomerSatisfaction/assets/4-5.svg.cjs +0 -3
  39. package/dist/components/CustomerSatisfaction/assets/4-5NB.svg.cjs +0 -3
  40. package/dist/components/CustomerSatisfaction/assets/5-5.svg.cjs +0 -3
  41. package/dist/components/CustomerSatisfaction/assets/5-5NB.svg.cjs +0 -3
  42. package/dist/components/CustomerSatisfaction/index.cjs +0 -66
  43. package/dist/components/CustomerSatisfaction/styles.css.cjs +0 -6
  44. package/dist/components/EstimateCost/Components/CustomUnitInput.cjs +0 -34
  45. package/dist/components/EstimateCost/Components/Item.cjs +0 -221
  46. package/dist/components/EstimateCost/Components/LineThrough.cjs +0 -11
  47. package/dist/components/EstimateCost/Components/NumberInput.cjs +0 -31
  48. package/dist/components/EstimateCost/Components/Region.cjs +0 -34
  49. package/dist/components/EstimateCost/Components/Regular.cjs +0 -23
  50. package/dist/components/EstimateCost/Components/Strong.cjs +0 -16
  51. package/dist/components/EstimateCost/Components/Unit.cjs +0 -36
  52. package/dist/components/EstimateCost/Components/Zone.cjs +0 -33
  53. package/dist/components/EstimateCost/Components/components.css.cjs +0 -123
  54. package/dist/components/EstimateCost/EstimateCost.cjs +0 -86
  55. package/dist/components/EstimateCost/EstimateCostContent.cjs +0 -206
  56. package/dist/components/EstimateCost/EstimateCostProvider.cjs +0 -37
  57. package/dist/components/EstimateCost/OverlayComponent.cjs +0 -85
  58. package/dist/components/EstimateCost/OverlayContext.cjs +0 -15
  59. package/dist/components/EstimateCost/constants.cjs +0 -28
  60. package/dist/components/EstimateCost/helper.cjs +0 -16
  61. package/dist/components/EstimateCost/locales/en.cjs +0 -23
  62. package/dist/components/EstimateCost/styles.css.cjs +0 -50
  63. package/dist/components/FAQ/index.cjs +0 -49
  64. package/dist/components/FAQ/styles.css.cjs +0 -5
  65. package/dist/components/InfoTable/InfoTable.cjs +0 -20
  66. package/dist/components/InfoTable/components/Cell.cjs +0 -16
  67. package/dist/components/InfoTable/components/Row.cjs +0 -25
  68. package/dist/components/InfoTable/context.cjs +0 -5
  69. package/dist/components/InfoTable/styles.css.cjs +0 -15
  70. package/dist/components/Navigation/Footer.cjs +0 -56
  71. package/dist/components/Navigation/Header.cjs +0 -18
  72. package/dist/components/Navigation/Navigation.cjs +0 -18
  73. package/dist/components/Navigation/NavigationContent.cjs +0 -112
  74. package/dist/components/Navigation/NavigationProvider.cjs +0 -129
  75. package/dist/components/Navigation/components/Group.cjs +0 -37
  76. package/dist/components/Navigation/components/Item.cjs +0 -277
  77. package/dist/components/Navigation/components/ItemProvider.cjs +0 -14
  78. package/dist/components/Navigation/components/PinnedItems.cjs +0 -80
  79. package/dist/components/Navigation/components/Separator.cjs +0 -8
  80. package/dist/components/Navigation/components/items.css.cjs +0 -47
  81. package/dist/components/Navigation/components/styles.css.cjs +0 -17
  82. package/dist/components/Navigation/constants.cjs +0 -10
  83. package/dist/components/Navigation/locales/en.cjs +0 -11
  84. package/dist/components/Navigation/styles.css.cjs +0 -23
  85. package/dist/components/Navigation/variables.css.cjs +0 -4
  86. package/dist/components/OfferList/OfferList.cjs +0 -45
  87. package/dist/components/OfferList/OfferListProvider.cjs +0 -38
  88. package/dist/components/OfferList/components/Banner.cjs +0 -21
  89. package/dist/components/OfferList/components/Cell.cjs +0 -20
  90. package/dist/components/OfferList/components/Row.cjs +0 -113
  91. package/dist/components/OfferList/styles.css.cjs +0 -38
  92. package/dist/components/OrderSummary/NonScrollableContent.cjs +0 -56
  93. package/dist/components/OrderSummary/Provider.cjs +0 -18
  94. package/dist/components/OrderSummary/ScrollableContent.cjs +0 -73
  95. package/dist/components/OrderSummary/constants.cjs +0 -12
  96. package/dist/components/OrderSummary/helpers.cjs +0 -91
  97. package/dist/components/OrderSummary/index.cjs +0 -102
  98. package/dist/components/OrderSummary/locales/en.cjs +0 -11
  99. package/dist/components/OrderSummary/styles.css.cjs +0 -19
  100. package/dist/components/Plans/FeatureHint.cjs +0 -24
  101. package/dist/components/Plans/PlanHeader.cjs +0 -42
  102. package/dist/components/Plans/index.cjs +0 -102
  103. package/dist/components/Plans/locales/en.cjs +0 -7
  104. package/dist/components/Plans/styles.css.cjs +0 -26
  105. package/dist/components/SteppedListCard/Step.cjs +0 -20
  106. package/dist/components/SteppedListCard/SteppedListCard.cjs +0 -54
  107. package/dist/components/SteppedListCard/SteppedListContent.cjs +0 -51
  108. package/dist/components/SteppedListCard/helper.cjs +0 -38
  109. package/dist/components/SteppedListCard/styles.css.cjs +0 -17
  110. package/dist/index.cjs +0 -33
@@ -1,85 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const icons = require("@ultraviolet/icons");
6
- const ui = require("@ultraviolet/ui");
7
- const dynamic = require("@vanilla-extract/dynamic");
8
- const react = require("react");
9
- const components_css = require("./Components/components.css.cjs");
10
- const LineThrough = require("./Components/LineThrough.cjs");
11
- const Strong = require("./Components/Strong.cjs");
12
- const constants = require("./constants.cjs");
13
- const EstimateCostProvider = require("./EstimateCostProvider.cjs");
14
- const OverlayContext = require("./OverlayContext.cjs");
15
- const styles_css = require("./styles.css.cjs");
16
- const OverlayComponent = ({
17
- children,
18
- inView = false,
19
- discount = 1,
20
- OverlayRight,
21
- disableOverlayRight = false,
22
- OverlayLeft,
23
- disableOverlayLeft = false,
24
- totalPrice,
25
- unit = "hours",
26
- isBeta = false,
27
- overlayMargin
28
- }) => {
29
- const {
30
- locales,
31
- formatNumber
32
- } = EstimateCostProvider.useEstimateCost();
33
- const value = react.useMemo(() => ({
34
- isOverlay: true
35
- }), []);
36
- const totalOverlayPrice = {
37
- days: totalPrice.maxOverlayHourly * constants.multiplier.days,
38
- hours: totalPrice.maxOverlayHourly,
39
- minutes: totalPrice.maxOverlayHourly * constants.multiplier.minutes,
40
- months: totalPrice.maxOverlayHourly * constants.multiplier.months,
41
- seconds: totalPrice.maxOverlayHourly * constants.multiplier.seconds
42
- }[unit];
43
- const overlayPrice = {
44
- days: totalPrice.overlayHourly * constants.multiplier.days,
45
- hours: totalPrice.overlayHourly,
46
- minutes: totalPrice.overlayHourly * constants.multiplier.minutes,
47
- months: totalPrice.overlayHourly * constants.multiplier.months,
48
- seconds: totalPrice.overlayHourly * constants.multiplier.seconds
49
- }[unit];
50
- return /* @__PURE__ */ jsxRuntime.jsx(OverlayContext.OverlayContextProvider, { value, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.estimateCostOverlayContainer({
51
- inView
52
- }), "data-testid": "summary-overlay", style: dynamic.assignInlineVars({
53
- [styles_css.overlayMarginVar]: overlayMargin ?? "0"
54
- }), children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: styles_css.estimateCostList, children: [
55
- OverlayLeft ? /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles_css.estimateCostSideItem, children: /* @__PURE__ */ jsxRuntime.jsx(OverlayLeft, { disabled: disableOverlayLeft, children: locales["estimate.cost.submit.label"] }) }) : null,
56
- react.Children.map(children, (child, index) => react.isValidElement(child) ? react.cloneElement(child, {
57
- isFirstElement: index === 0,
58
- isLastElement: index === react.Children.count(children) - 1
59
- }) : null),
60
- /* @__PURE__ */ jsxRuntime.jsxs("li", { className: styles_css.estimateCostOverlayRow(), children: [
61
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, { alignItems: "center", direction: "row", gap: 1, children: [
62
- /* @__PURE__ */ jsxRuntime.jsx(icons.CalculatorIcon, { sentiment: "primary", size: "medium" }),
63
- locales["estimate.cost.label"]
64
- ] }),
65
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: components_css.estimateCostResourceName(), children: [
66
- /* @__PURE__ */ jsxRuntime.jsx(Strong.Strong, { variant: "big", children: /* @__PURE__ */ jsxRuntime.jsxs(LineThrough.LineThrough, { isActive: isBeta && discount === 0, children: [
67
- formatNumber(overlayPrice, {
68
- maximumFractionDigits: constants.maximumFractionDigits[unit]
69
- }),
70
- totalOverlayPrice > 0 ? ` - ${formatNumber(totalOverlayPrice, {
71
- maximumFractionDigits: constants.maximumFractionDigits[unit]
72
- })}` : null,
73
- "/",
74
- locales[`estimate.cost.units.${unit}.label`]
75
- ] }) }),
76
- isBeta ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Badge, { className: styles_css.estimateCostBadge, prominence: "strong", sentiment: "warning", children: [
77
- discount > 0 ? discount * 100 : "",
78
- locales[`estimate.cost.beta.${discount > 0 ? "discount" : "free"}`]
79
- ] }) : null
80
- ] })
81
- ] }),
82
- OverlayRight ? /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles_css.estimateCostSideItem, children: /* @__PURE__ */ jsxRuntime.jsx(OverlayRight, { disabled: disableOverlayRight, children: locales["estimate.cost.submit.label"] }) }) : null
83
- ] }) }) });
84
- };
85
- exports.OverlayComponent = OverlayComponent;
@@ -1,15 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const react = require("react");
6
- const OverlayContext = react.createContext({
7
- isOverlay: false
8
- });
9
- const useOverlay = () => react.useContext(OverlayContext);
10
- const OverlayContextProvider = ({
11
- children,
12
- value
13
- }) => /* @__PURE__ */ jsxRuntime.jsx(OverlayContext.Provider, { value, children });
14
- exports.OverlayContextProvider = OverlayContextProvider;
15
- exports.useOverlay = useOverlay;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const APPROXIMATE_HOURS_IN_MONTH = 730;
4
- const multiplier = {
5
- days: 24,
6
- hours: 1,
7
- minutes: 1 / 60,
8
- months: APPROXIMATE_HOURS_IN_MONTH,
9
- seconds: 1 / 60 / 60
10
- };
11
- const maximumFractionDigits = {
12
- days: 3,
13
- hours: 5,
14
- minutes: 8,
15
- months: 2,
16
- seconds: 10
17
- };
18
- const maximumFractionDigitsLong = {
19
- days: 4,
20
- hours: 8,
21
- minutes: 10,
22
- months: 2,
23
- seconds: 12
24
- };
25
- exports.APPROXIMATE_HOURS_IN_MONTH = APPROXIMATE_HOURS_IN_MONTH;
26
- exports.maximumFractionDigits = maximumFractionDigits;
27
- exports.maximumFractionDigitsLong = maximumFractionDigitsLong;
28
- exports.multiplier = multiplier;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const constants = require("./constants.cjs");
4
- const calculatePrice = ({
5
- price,
6
- amount,
7
- amountFree = 0,
8
- timeUnit,
9
- timeAmount,
10
- discount = 0
11
- }) => {
12
- const nonNanTimeAmount = Number.isNaN(timeAmount) ? 0 : timeAmount;
13
- const value = (price - price * discount) * (nonNanTimeAmount * constants.multiplier[`${timeUnit}`]) * Math.max(amount - amountFree, 0);
14
- return value;
15
- };
16
- exports.calculatePrice = calculatePrice;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- const EstimateCostLocales = {
3
- "estimate.cost.az.label": "Availability Zone",
4
- "estimate.cost.beta.badge": "Beta Version",
5
- "estimate.cost.beta.discount": "% off during Beta",
6
- "estimate.cost.beta.free": "Free During Beta",
7
- "estimate.cost.description": "This summary provides a cost estimation based on your configuration, the amount of time you expect to use the resource for, and the scale of your expected usage. For the purposes of this calculation, we consider that 1 month equals to 730 hours.",
8
- "estimate.cost.fees.commitment": "Commitment Fees",
9
- "estimate.cost.fees.monthly.title": "Each month",
10
- "estimate.cost.fees.oneTime.title": "One time fees",
11
- "estimate.cost.label": "Estimated cost",
12
- "estimate.cost.notDefined": "Not defined",
13
- "estimate.cost.region.label": "Region",
14
- "estimate.cost.submit.label": "Create",
15
- "estimate.cost.units.days.label": "Day(s)",
16
- "estimate.cost.units.gb.label": "GB",
17
- "estimate.cost.units.hours.label": "Hour(s)",
18
- "estimate.cost.units.minutes.label": "Minute(s)",
19
- "estimate.cost.units.months.label": "Month(s)",
20
- "estimate.cost.units.seconds.label": "Second(s)",
21
- "estimate.cost.units.years.label": "Year(s)"
22
- };
23
- module.exports = EstimateCostLocales;
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- ;/* empty css */
4
- const createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
5
- var paddingLeftCell = "var(--uv_plus_sk5tga0)";
6
- var overlayMarginVar = "var(--uv_plus_sk5tga1)";
7
- var estimateCostImage = "uv_plus_sk5tga2";
8
- var estimateCostTable = { total: "uv_plus_sk5tga4 uv_plus_sk5tga3", noTotal: "uv_plus_sk5tga5 uv_plus_sk5tga3" };
9
- var estimateCostFeesTable = "uv_plus_sk5tga6 uv_plus_sk5tga3";
10
- var estimateCostPriceColumn = "uv_plus_sk5tga7";
11
- var estimateCostPriceCell = "uv_plus_sk5tga8";
12
- var estimateCostCell = createRuntimeFn.createRuntimeFn({ defaultClassName: "uv_plus_sk5tga9", variantClassNames: { hasBorder: { true: "uv_plus_sk5tgaa" }, primary: { true: "uv_plus_sk5tgab" } }, defaultVariants: {}, compoundVariants: [] });
13
- var estimateCostTotalPriceCell = "uv_plus_sk5tgac";
14
- var estimateCostEmptyTable = "uv_plus_sk5tgad";
15
- var estimateCostTitle = "uv_plus_sk5tgae";
16
- var estimateCostEmptyCell = "uv_plus_sk5tgaf";
17
- var estimateCostTimeCell = "uv_plus_sk5tgag";
18
- var estimateCostBadgeBeta = { "long": "uv_plus_sk5tgai uv_plus_sk5tgah", "short": "uv_plus_sk5tgaj uv_plus_sk5tgah" };
19
- var estimateCostOverlayRow = createRuntimeFn.createRuntimeFn({ defaultClassName: "uv_plus_sk5tgak", variantClassNames: { isFirstElement: { true: "uv_plus_sk5tgal" }, shouldBeHidden: { true: "uv_plus_sk5tgam" }, hideFromOverlay: { true: "uv_plus_sk5tgan" } }, defaultVariants: {}, compoundVariants: [] });
20
- var estimateCostBadge = "uv_plus_sk5tgao";
21
- var estimatecostFeesText = "uv_plus_sk5tgap";
22
- var estimateCostText = { beta: "uv_plus_sk5tgaq", notBeta: "uv_plus_sk5tgar" };
23
- var estimateCostCalculatorIcon = "uv_plus_sk5tgas";
24
- var estimateCostPriceCellContent = "uv_plus_sk5tgat";
25
- var estimateCostOverlayContainer = createRuntimeFn.createRuntimeFn({ defaultClassName: "uv_plus_sk5tgau", variantClassNames: { inView: { true: "uv_plus_sk5tgav", false: "uv_plus_sk5tgaw" } }, defaultVariants: {}, compoundVariants: [] });
26
- var estimateCostList = "uv_plus_sk5tgax";
27
- var estimateCostSideItem = "uv_plus_sk5tgay";
28
- exports.estimateCostBadge = estimateCostBadge;
29
- exports.estimateCostBadgeBeta = estimateCostBadgeBeta;
30
- exports.estimateCostCalculatorIcon = estimateCostCalculatorIcon;
31
- exports.estimateCostCell = estimateCostCell;
32
- exports.estimateCostEmptyCell = estimateCostEmptyCell;
33
- exports.estimateCostEmptyTable = estimateCostEmptyTable;
34
- exports.estimateCostFeesTable = estimateCostFeesTable;
35
- exports.estimateCostImage = estimateCostImage;
36
- exports.estimateCostList = estimateCostList;
37
- exports.estimateCostOverlayContainer = estimateCostOverlayContainer;
38
- exports.estimateCostOverlayRow = estimateCostOverlayRow;
39
- exports.estimateCostPriceCell = estimateCostPriceCell;
40
- exports.estimateCostPriceCellContent = estimateCostPriceCellContent;
41
- exports.estimateCostPriceColumn = estimateCostPriceColumn;
42
- exports.estimateCostSideItem = estimateCostSideItem;
43
- exports.estimateCostTable = estimateCostTable;
44
- exports.estimateCostText = estimateCostText;
45
- exports.estimateCostTimeCell = estimateCostTimeCell;
46
- exports.estimateCostTitle = estimateCostTitle;
47
- exports.estimateCostTotalPriceCell = estimateCostTotalPriceCell;
48
- exports.estimatecostFeesText = estimatecostFeesText;
49
- exports.overlayMarginVar = overlayMarginVar;
50
- exports.paddingLeftCell = paddingLeftCell;
@@ -1,49 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const ProductIcon = require("@ultraviolet/icons/product");
6
- const ui = require("@ultraviolet/ui");
7
- const styles_css = require("./styles.css.cjs");
8
- function _interopNamespaceCompat(e) {
9
- if (e && typeof e === "object" && "default" in e) return e;
10
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
11
- if (e) {
12
- for (const k in e) {
13
- if (k !== "default") {
14
- const d = Object.getOwnPropertyDescriptor(e, k);
15
- Object.defineProperty(n, k, d.get ? d : {
16
- enumerable: true,
17
- get: () => e[k]
18
- });
19
- }
20
- }
21
- }
22
- n.default = e;
23
- return Object.freeze(n);
24
- }
25
- const ProductIcon__namespace = /* @__PURE__ */ _interopNamespaceCompat(ProductIcon);
26
- const FAQ = ({
27
- productIconName,
28
- illustrationText,
29
- title,
30
- description,
31
- notes,
32
- style
33
- }) => {
34
- const ProductIconUsed = productIconName ? ProductIcon__namespace[`${productIconName.charAt(0).toUpperCase() + productIconName.slice(1)}ProductIcon`] : null;
35
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: styles_css.faq, style, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, { direction: "row", gap: 2, children: [
36
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
37
- !productIconName && illustrationText ? /* @__PURE__ */ jsxRuntime.jsx(ui.Bullet, { sentiment: "primary", children: illustrationText.toString() }) : null,
38
- ProductIconUsed ? /* @__PURE__ */ jsxRuntime.jsx(ProductIconUsed, { size: "xlarge" }) : null
39
- ] }),
40
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
41
- /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "p", prominence: "strong", variant: "bodyStronger", children: title }),
42
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Text, { as: "div", variant: "bodySmall", children: [
43
- description,
44
- notes ? /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "small", italic: true, variant: "caption", children: notes }) : null
45
- ] })
46
- ] })
47
- ] }) });
48
- };
49
- exports.FAQ = FAQ;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- ;/* empty css */
4
- var faq = "uv_plus_5imqkb0";
5
- exports.faq = faq;
@@ -1,20 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const Cell = require("./components/Cell.cjs");
6
- const Row = require("./components/Row.cjs");
7
- const context = require("./context.cjs");
8
- const styles_css = require("./styles.css.cjs");
9
- const InfoTable = ({
10
- children,
11
- width,
12
- className,
13
- style,
14
- "data-testid": dataTestId
15
- }) => /* @__PURE__ */ jsxRuntime.jsx(context.InfoTableContext.Provider, { value: {
16
- width
17
- }, children: /* @__PURE__ */ jsxRuntime.jsx("dl", { className: `${className ? `${className} ` : ""}${styles_css.dl}`, "data-testid": dataTestId, style, children }) });
18
- InfoTable.Row = Row.InfoTableRow;
19
- InfoTable.Cell = Cell.InfoTableCell;
20
- exports.InfoTable = InfoTable;
@@ -1,16 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const ui = require("@ultraviolet/ui");
6
- const styles_css = require("../styles.css.cjs");
7
- const InfoTableCell = ({
8
- children,
9
- title,
10
- multiline = false,
11
- style
12
- }) => /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, { gap: "0.5", minWidth: "0", style, width: "100%", children: [
13
- /* @__PURE__ */ jsxRuntime.jsx("dt", { className: styles_css.term, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "div", prominence: "weak", sentiment: "neutral", variant: "bodySmallStrong", children: title }) }),
14
- /* @__PURE__ */ jsxRuntime.jsx("dd", { className: styles_css.desc, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { as: "div", className: styles_css.cellText, oneLine: !multiline, prominence: "default", sentiment: "neutral", variant: "body", children }) })
15
- ] });
16
- exports.InfoTableCell = InfoTableCell;
@@ -1,25 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const ui = require("@ultraviolet/ui");
6
- const dynamic = require("@vanilla-extract/dynamic");
7
- const react = require("react");
8
- const context = require("../context.cjs");
9
- const styles_css = require("../styles.css.cjs");
10
- const InfoTableRow = ({
11
- children,
12
- templateColumns,
13
- style
14
- }) => {
15
- const {
16
- width
17
- } = react.useContext(context.InfoTableContext);
18
- return /* @__PURE__ */ jsxRuntime.jsx(ui.Row, { className: styles_css.infoTableRow, style: {
19
- ...dynamic.assignInlineVars({
20
- [styles_css.rowWidth]: width ?? "100%"
21
- }),
22
- ...style
23
- }, templateColumns, children });
24
- };
25
- exports.InfoTableRow = InfoTableRow;
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const react = require("react");
4
- const InfoTableContext = react.createContext({});
5
- exports.InfoTableContext = InfoTableContext;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- ;/* empty css */
4
- var rowWidth = "var(--uv_plus_h6pvpm0)";
5
- var dl = "uv_plus_h6pvpm1";
6
- var infoTableRow = "uv_plus_h6pvpm2";
7
- var term = "uv_plus_h6pvpm3";
8
- var desc = "uv_plus_h6pvpm4";
9
- var cellText = "uv_plus_h6pvpm5";
10
- exports.cellText = cellText;
11
- exports.desc = desc;
12
- exports.dl = dl;
13
- exports.infoTableRow = infoTableRow;
14
- exports.rowWidth = rowWidth;
15
- exports.term = term;
@@ -1,56 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const icons = require("@ultraviolet/icons");
6
- const ui = require("@ultraviolet/ui");
7
- const react = require("react");
8
- const NavigationProvider = require("./NavigationProvider.cjs");
9
- const styles_css = require("./styles.css.cjs");
10
- const Footer = ({
11
- onToggleExpand,
12
- contentRef
13
- }) => {
14
- const {
15
- expanded,
16
- toggleExpand,
17
- locales
18
- } = NavigationProvider.useNavigation();
19
- const isScrollAtBottom = react.useCallback(() => {
20
- if (contentRef.current) {
21
- if (contentRef.current.scrollTop + contentRef.current.offsetHeight >= contentRef.current.scrollHeight) {
22
- return false;
23
- }
24
- return true;
25
- }
26
- return true;
27
- }, [contentRef]);
28
- const [footerHasOverflowStyle, setFooterHasOverflowStyle] = react.useState(isScrollAtBottom());
29
- react.useEffect(() => {
30
- const currentContentRef = contentRef.current;
31
- const scroll = () => {
32
- const hasOverflow = isScrollAtBottom();
33
- if (footerHasOverflowStyle !== hasOverflow) {
34
- setFooterHasOverflowStyle(hasOverflow);
35
- }
36
- };
37
- if (currentContentRef) {
38
- currentContentRef.addEventListener("scroll", scroll);
39
- }
40
- return () => {
41
- currentContentRef?.removeEventListener("scroll", scroll);
42
- };
43
- }, [footerHasOverflowStyle, isScrollAtBottom, contentRef]);
44
- react.useEffect(() => {
45
- setFooterHasOverflowStyle(isScrollAtBottom());
46
- }, [isScrollAtBottom]);
47
- const Icon = react.useMemo(() => expanded ? icons.ArrowLeftDoubleIcon : icons.ArrowRightDoubleIcon, [expanded]);
48
- const label = react.useMemo(() => expanded ? locales["navigation.collapse.button"] : locales["navigation.expand.button"], [expanded, locales]);
49
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.navigationStickyFooter({
50
- overflow: footerHasOverflowStyle
51
- }), children: /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { placement: "right", text: label, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { "aria-label": label, onClick: () => {
52
- toggleExpand();
53
- onToggleExpand?.(!expanded);
54
- }, sentiment: "neutral", size: "small", variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) }) }) });
55
- };
56
- exports.Footer = Footer;
@@ -1,18 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const ui = require("@ultraviolet/ui");
6
- const react = require("react");
7
- const NavigationProvider = require("./NavigationProvider.cjs");
8
- const styles_css = require("./styles.css.cjs");
9
- const Header = react.memo(({
10
- logo
11
- }) => {
12
- const {
13
- animation,
14
- expanded
15
- } = NavigationProvider.useNavigation();
16
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.navigationHeader, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Stack, { alignItems: "start", className: styles_css.navigationLogoContainer, justifyContent: !expanded ? "center" : void 0, children: typeof logo === "function" ? logo(animation ? false : expanded) : logo }) });
17
- });
18
- exports.Header = Header;
@@ -1,18 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const Group = require("./components/Group.cjs");
6
- const Item = require("./components/Item.cjs");
7
- const PinnedItems = require("./components/PinnedItems.cjs");
8
- const Separator = require("./components/Separator.cjs");
9
- const NavigationContent = require("./NavigationContent.cjs");
10
- const Navigation = ({
11
- children,
12
- ...props
13
- }) => /* @__PURE__ */ jsxRuntime.jsx(NavigationContent.NavigationContent, { ...props, children });
14
- Navigation.Group = Group.Group;
15
- Navigation.Item = Item.Item;
16
- Navigation.PinnedItems = PinnedItems.PinnedItems;
17
- Navigation.Separator = Separator.Separator;
18
- exports.Navigation = Navigation;
@@ -1,112 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("@emotion/react/jsx-runtime");
5
- const ui = require("@ultraviolet/ui");
6
- const dynamic = require("@vanilla-extract/dynamic");
7
- const react = require("react");
8
- const constants = require("./constants.cjs");
9
- const Footer = require("./Footer.cjs");
10
- const Header = require("./Header.cjs");
11
- const NavigationProvider = require("./NavigationProvider.cjs");
12
- const styles_css = require("./styles.css.cjs");
13
- const variables_css = require("./variables.css.cjs");
14
- const NavigationContent = ({
15
- children,
16
- logo,
17
- onWidthResize,
18
- className,
19
- "data-testid": dataTestId,
20
- id,
21
- onToggleExpand
22
- }) => {
23
- const context = NavigationProvider.useNavigation();
24
- if (!context) {
25
- throw new Error("Navigation should be inside NavigationProvider to use it properly.");
26
- }
27
- const {
28
- setWidth,
29
- width,
30
- expanded,
31
- toggleExpand,
32
- animation,
33
- navigationRef,
34
- allowNavigationResize,
35
- shouldAnimate
36
- } = context;
37
- const sliderRef = react.useRef(null);
38
- const contentRef = react.useRef(null);
39
- react.useEffect(() => {
40
- let prevX;
41
- let navRect;
42
- let shouldCollapseOnMouseUp = false;
43
- let shouldExpandOnMouseUp = false;
44
- const mouseMove = (event) => {
45
- if (prevX !== void 0) {
46
- const navWidth = navRect?.width ?? 0;
47
- const newWidth = navWidth + (event.clientX - prevX);
48
- if (navigationRef.current && expanded) {
49
- navigationRef.current.style.width = `${newWidth}px`;
50
- }
51
- if (newWidth <= constants.NAVIGATION_MIN_WIDTH) {
52
- shouldCollapseOnMouseUp = true;
53
- } else {
54
- shouldCollapseOnMouseUp = false;
55
- }
56
- if (newWidth >= constants.NAVIGATION_COLLASPED_WIDTH && !expanded) {
57
- shouldExpandOnMouseUp = true;
58
- } else {
59
- shouldExpandOnMouseUp = false;
60
- }
61
- }
62
- };
63
- const mousedown = (event) => {
64
- document.body.style.pointerEvents = "none";
65
- document.body.style.userSelect = "none";
66
- prevX = event.clientX;
67
- navRect = navigationRef.current?.getBoundingClientRect();
68
- const mouseup = () => {
69
- if (shouldCollapseOnMouseUp || shouldExpandOnMouseUp) {
70
- toggleExpand();
71
- onToggleExpand?.(!expanded);
72
- }
73
- if (navigationRef.current) {
74
- if (!shouldCollapseOnMouseUp && !shouldExpandOnMouseUp) {
75
- onWidthResize?.(navigationRef.current.offsetWidth);
76
- setWidth?.(navigationRef.current.offsetWidth);
77
- }
78
- if (!expanded) {
79
- navigationRef.current.style.width = "";
80
- }
81
- }
82
- document.removeEventListener("mousemove", mouseMove);
83
- window.removeEventListener("mouseup", mouseup);
84
- document.body.style.pointerEvents = "";
85
- document.body.style.userSelect = "";
86
- };
87
- document.addEventListener("mousemove", mouseMove);
88
- window.addEventListener("mouseup", mouseup);
89
- };
90
- const sliderRefCurrent = sliderRef.current;
91
- sliderRefCurrent?.addEventListener("mousedown", mousedown);
92
- return () => {
93
- sliderRefCurrent?.removeEventListener("mousedown", mousedown);
94
- };
95
- }, [expanded, navigationRef, onToggleExpand, onWidthResize, setWidth, toggleExpand]);
96
- return /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: `${className ? `${className} ` : ""}${styles_css.navigation}`, "data-testid": dataTestId, id, children: [
97
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles_css.navigationContainer({
98
- animation: shouldAnimate ? animation : void 0,
99
- expanded
100
- }), ref: navigationRef, style: dynamic.assignInlineVars({
101
- [variables_css.widthNavigationContainer]: `${width}px`
102
- }), children: [
103
- logo ? /* @__PURE__ */ jsxRuntime.jsx(Header.Header, { logo }) : null,
104
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles_css.navigationContentContainer}${expanded ? "" : ` ${styles_css.navigationContentContainerCollapsed}`}`, children: [
105
- /* @__PURE__ */ jsxRuntime.jsx(ui.Stack, { className: styles_css.navigationContent, gap: 0.25, ref: contentRef, children }),
106
- allowNavigationResize ? /* @__PURE__ */ jsxRuntime.jsx(Footer.Footer, { contentRef, onToggleExpand }) : null
107
- ] })
108
- ] }),
109
- allowNavigationResize ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.navigationSlider, "data-testid": "slider", ref: sliderRef }) : null
110
- ] });
111
- };
112
- exports.NavigationContent = NavigationContent;