@heymantle/litho 0.0.1

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 (140) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/dist/cjs/components/ActionList.js +267 -0
  4. package/dist/cjs/components/AnnouncementBar.js +73 -0
  5. package/dist/cjs/components/AppProvider.js +245 -0
  6. package/dist/cjs/components/Autocomplete.js +351 -0
  7. package/dist/cjs/components/Badge.js +234 -0
  8. package/dist/cjs/components/Banner.js +264 -0
  9. package/dist/cjs/components/Box.js +247 -0
  10. package/dist/cjs/components/Button.js +1018 -0
  11. package/dist/cjs/components/ButtonGroup.js +196 -0
  12. package/dist/cjs/components/Card.js +593 -0
  13. package/dist/cjs/components/Checkbox.js +175 -0
  14. package/dist/cjs/components/ChoiceList.js +160 -0
  15. package/dist/cjs/components/Collapsible.js +42 -0
  16. package/dist/cjs/components/ColorField.js +159 -0
  17. package/dist/cjs/components/ContextualSaveBar.js +53 -0
  18. package/dist/cjs/components/DatePicker.js +547 -0
  19. package/dist/cjs/components/Divider.js +50 -0
  20. package/dist/cjs/components/DropZone.js +547 -0
  21. package/dist/cjs/components/EmptyState.js +111 -0
  22. package/dist/cjs/components/Filters.js +874 -0
  23. package/dist/cjs/components/FooterHelp.js +48 -0
  24. package/dist/cjs/components/Form.js +44 -0
  25. package/dist/cjs/components/Frame.js +386 -0
  26. package/dist/cjs/components/FrameSaveBar.js +239 -0
  27. package/dist/cjs/components/Grid.js +151 -0
  28. package/dist/cjs/components/HorizontalStack.js +180 -0
  29. package/dist/cjs/components/Icon.js +346 -0
  30. package/dist/cjs/components/Image.js +191 -0
  31. package/dist/cjs/components/InlineError.js +57 -0
  32. package/dist/cjs/components/Label.js +78 -0
  33. package/dist/cjs/components/Layout.js +228 -0
  34. package/dist/cjs/components/LayoutSection.js +133 -0
  35. package/dist/cjs/components/Link.js +128 -0
  36. package/dist/cjs/components/List.js +69 -0
  37. package/dist/cjs/components/Listbox.js +211 -0
  38. package/dist/cjs/components/Loading.js +103 -0
  39. package/dist/cjs/components/Modal.js +449 -0
  40. package/dist/cjs/components/Navigation.js +331 -0
  41. package/dist/cjs/components/Page.js +529 -0
  42. package/dist/cjs/components/Pagination.js +109 -0
  43. package/dist/cjs/components/Pane.js +128 -0
  44. package/dist/cjs/components/Popover.js +365 -0
  45. package/dist/cjs/components/PopoverManager.js +34 -0
  46. package/dist/cjs/components/ProgressBar.js +124 -0
  47. package/dist/cjs/components/RadioButton.js +172 -0
  48. package/dist/cjs/components/RadioButtonCard.js +193 -0
  49. package/dist/cjs/components/RangeSlider.js +235 -0
  50. package/dist/cjs/components/ResourceList.js +105 -0
  51. package/dist/cjs/components/Select.js +300 -0
  52. package/dist/cjs/components/SkeletonText.js +130 -0
  53. package/dist/cjs/components/Spinner.js +72 -0
  54. package/dist/cjs/components/Table.js +1184 -0
  55. package/dist/cjs/components/Tabs.js +421 -0
  56. package/dist/cjs/components/Tag.js +165 -0
  57. package/dist/cjs/components/Text.js +274 -0
  58. package/dist/cjs/components/TextField.js +584 -0
  59. package/dist/cjs/components/Thumbnail.js +73 -0
  60. package/dist/cjs/components/TimePicker.js +23 -0
  61. package/dist/cjs/components/Tip.js +220 -0
  62. package/dist/cjs/components/Tooltip.js +431 -0
  63. package/dist/cjs/components/TopBar.js +210 -0
  64. package/dist/cjs/components/VerticalStack.js +161 -0
  65. package/dist/cjs/index.js +308 -0
  66. package/dist/cjs/styles/Table.js +591 -0
  67. package/dist/cjs/utilities/dates.js +339 -0
  68. package/dist/cjs/utilities/useIndexResourceState.js +175 -0
  69. package/dist/cjs/utilities/useMounted.js +67 -0
  70. package/dist/cjs/utilities/useTableScrollState.js +142 -0
  71. package/dist/esm/components/ActionList.js +216 -0
  72. package/dist/esm/components/AnnouncementBar.js +63 -0
  73. package/dist/esm/components/AppProvider.js +185 -0
  74. package/dist/esm/components/Autocomplete.js +300 -0
  75. package/dist/esm/components/Badge.js +225 -0
  76. package/dist/esm/components/Banner.js +254 -0
  77. package/dist/esm/components/Box.js +238 -0
  78. package/dist/esm/components/Button.js +967 -0
  79. package/dist/esm/components/ButtonGroup.js +137 -0
  80. package/dist/esm/components/Card.js +537 -0
  81. package/dist/esm/components/Checkbox.js +165 -0
  82. package/dist/esm/components/ChoiceList.js +145 -0
  83. package/dist/esm/components/Collapsible.js +32 -0
  84. package/dist/esm/components/ColorField.js +149 -0
  85. package/dist/esm/components/ContextualSaveBar.js +43 -0
  86. package/dist/esm/components/DatePicker.js +532 -0
  87. package/dist/esm/components/Divider.js +41 -0
  88. package/dist/esm/components/DropZone.js +537 -0
  89. package/dist/esm/components/EmptyState.js +101 -0
  90. package/dist/esm/components/Filters.js +823 -0
  91. package/dist/esm/components/FooterHelp.js +38 -0
  92. package/dist/esm/components/Form.js +35 -0
  93. package/dist/esm/components/Frame.js +376 -0
  94. package/dist/esm/components/FrameSaveBar.js +229 -0
  95. package/dist/esm/components/Grid.js +142 -0
  96. package/dist/esm/components/HorizontalStack.js +171 -0
  97. package/dist/esm/components/Icon.js +296 -0
  98. package/dist/esm/components/Image.js +141 -0
  99. package/dist/esm/components/InlineError.js +43 -0
  100. package/dist/esm/components/Label.js +63 -0
  101. package/dist/esm/components/Layout.js +164 -0
  102. package/dist/esm/components/LayoutSection.js +82 -0
  103. package/dist/esm/components/Link.js +119 -0
  104. package/dist/esm/components/List.js +61 -0
  105. package/dist/esm/components/Listbox.js +201 -0
  106. package/dist/esm/components/Loading.js +93 -0
  107. package/dist/esm/components/Modal.js +390 -0
  108. package/dist/esm/components/Navigation.js +321 -0
  109. package/dist/esm/components/Page.js +473 -0
  110. package/dist/esm/components/Pagination.js +99 -0
  111. package/dist/esm/components/Pane.js +118 -0
  112. package/dist/esm/components/Popover.js +350 -0
  113. package/dist/esm/components/PopoverManager.js +24 -0
  114. package/dist/esm/components/ProgressBar.js +114 -0
  115. package/dist/esm/components/RadioButton.js +157 -0
  116. package/dist/esm/components/RadioButtonCard.js +178 -0
  117. package/dist/esm/components/RangeSlider.js +225 -0
  118. package/dist/esm/components/ResourceList.js +95 -0
  119. package/dist/esm/components/Select.js +285 -0
  120. package/dist/esm/components/SkeletonText.js +120 -0
  121. package/dist/esm/components/Spinner.js +63 -0
  122. package/dist/esm/components/Table.js +1129 -0
  123. package/dist/esm/components/Tabs.js +366 -0
  124. package/dist/esm/components/Tag.js +151 -0
  125. package/dist/esm/components/Text.js +265 -0
  126. package/dist/esm/components/TextField.js +533 -0
  127. package/dist/esm/components/Thumbnail.js +63 -0
  128. package/dist/esm/components/TimePicker.js +13 -0
  129. package/dist/esm/components/Tip.js +169 -0
  130. package/dist/esm/components/Tooltip.js +380 -0
  131. package/dist/esm/components/TopBar.js +200 -0
  132. package/dist/esm/components/VerticalStack.js +152 -0
  133. package/dist/esm/index.js +61 -0
  134. package/dist/esm/styles/Table.js +581 -0
  135. package/dist/esm/utilities/dates.js +289 -0
  136. package/dist/esm/utilities/useIndexResourceState.js +158 -0
  137. package/dist/esm/utilities/useMounted.js +57 -0
  138. package/dist/esm/utilities/useTableScrollState.js +132 -0
  139. package/index.css +1137 -0
  140. package/package.json +53 -0
@@ -0,0 +1,321 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _object_spread(target) {
15
+ for(var i = 1; i < arguments.length; i++){
16
+ var source = arguments[i] != null ? arguments[i] : {};
17
+ var ownKeys = Object.keys(source);
18
+ if (typeof Object.getOwnPropertySymbols === "function") {
19
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
+ }));
22
+ }
23
+ ownKeys.forEach(function(key) {
24
+ _define_property(target, key, source[key]);
25
+ });
26
+ }
27
+ return target;
28
+ }
29
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
30
+ import { useContext } from "react";
31
+ import { FrameContext } from "./AppProvider.js";
32
+ import { tv } from "tailwind-variants";
33
+ import { Badge, Icon, Text } from "../index.js";
34
+ import { ChevronLeftMinor, ChevronRightMinor, ExternalMinor } from "@shopify/polaris-icons";
35
+ var styles = tv({
36
+ base: "Litho-Navigation h-full w-full pt-12 @md:pt-0 pr-2.5 pb-3 @md:pb-0 flex flex-col gap-2 justify-between bg-surface-normal"
37
+ });
38
+ var sectionStyles = tv({
39
+ base: "Litho-Navigation-Section mb-4"
40
+ });
41
+ var titleStyles = tv({
42
+ base: "Litho-Navigation-Title relative min-h-8 ml-2.5 px-2.5 py-1.5 flex items-center justify-between gap-2",
43
+ variants: {
44
+ selected: {
45
+ true: "after:content-[''] after:absolute after:-left-2.5 after:top-0.5 after:bottom-0.5 after:w-0.75 after:rounded-r-md after:bg-brand-saturated"
46
+ },
47
+ hasAction: {
48
+ true: "cursor-pointer rounded-md hover"
49
+ }
50
+ }
51
+ });
52
+ /**
53
+ * Navigation component.
54
+ * A sidebar navigation component for displaying links, sections, and footer links.
55
+ *
56
+ * @component
57
+ * @param {Object} props - Component properties.
58
+ * @param {Object} [props.breadcrumb] - Breadcrumb navigation item.
59
+ * @param {string} [props.breadcrumb.content] - Label for the breadcrumb.
60
+ * @param {Function} [props.breadcrumb.onAction] - Callback for breadcrumb action.
61
+ * @param {Array<Object>} [props.sections] - Array of navigation sections.
62
+ * @param {Object} [props.sections[].title] - Section title configuration.
63
+ * @param {string} [props.sections[].title.label] - Title label.
64
+ * @param {boolean} [props.sections[].title.selected] - Whether the title is selected.
65
+ * @param {Function} [props.sections[].title.onAction] - Callback for title action.
66
+ * @param {Array<Object>} [props.sections[].links] - Array of link configurations for the section.
67
+ * @param {Array<Object>} [props.footerLinks] - Array of footer link configurations.
68
+ * @returns {JSX.Element} The rendered Navigation component.
69
+ */ function Navigation() {
70
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
71
+ var breadcrumb = props.breadcrumb, sections = props.sections, footerLinks = props.footerLinks;
72
+ var setShowMobileNavigation = useContext(FrameContext).setShowMobileNavigation;
73
+ var classes = styles(props);
74
+ var sectionClasses = sectionStyles(props);
75
+ return /*#__PURE__*/ _jsxs("div", {
76
+ className: classes,
77
+ children: [
78
+ /*#__PURE__*/ _jsxs("div", {
79
+ children: [
80
+ breadcrumb && /*#__PURE__*/ _jsx("div", {
81
+ className: sectionClasses,
82
+ children: /*#__PURE__*/ _jsx(Navigation.Link, {
83
+ label: breadcrumb.content || "Back",
84
+ onAction: breadcrumb.onAction,
85
+ icon: ChevronLeftMinor,
86
+ keepNavigationOpen: breadcrumb.keepNavigationOpen
87
+ })
88
+ }),
89
+ sections && sections.map(function(section, index) {
90
+ var _section_title, _section_title1;
91
+ if (!section.links) return null;
92
+ var titleClasses = titleStyles({
93
+ selected: (_section_title = section.title) === null || _section_title === void 0 ? void 0 : _section_title.selected,
94
+ hasAction: !!((_section_title1 = section.title) === null || _section_title1 === void 0 ? void 0 : _section_title1.onAction)
95
+ });
96
+ var handleTitleClick = function() {
97
+ var _section_title_onAction, _section_title;
98
+ (_section_title_onAction = (_section_title = section.title).onAction) === null || _section_title_onAction === void 0 ? void 0 : _section_title_onAction.call(_section_title);
99
+ if (!section.title.keepNavigationOpen) {
100
+ setShowMobileNavigation(false);
101
+ }
102
+ };
103
+ return /*#__PURE__*/ _jsxs("div", {
104
+ className: sectionClasses,
105
+ children: [
106
+ section.title && /*#__PURE__*/ _jsx("div", {
107
+ className: titleClasses,
108
+ onClick: handleTitleClick,
109
+ children: /*#__PURE__*/ _jsx(Text, {
110
+ color: section.title.selected ? "link" : "normal",
111
+ fontWeight: "medium",
112
+ variant: "bodySm",
113
+ truncate: true,
114
+ children: section.title.label
115
+ })
116
+ }),
117
+ section.links.map(function(link, index) {
118
+ return /*#__PURE__*/ _jsx(Navigation.Link, _object_spread({}, link), "navigation-link-".concat(index));
119
+ })
120
+ ]
121
+ }, "navigation-section-".concat(index));
122
+ })
123
+ ]
124
+ }),
125
+ /*#__PURE__*/ _jsx("div", {
126
+ children: footerLinks && footerLinks.map(function(link, index) {
127
+ return /*#__PURE__*/ _jsx(Navigation.Link, _object_spread({}, link), "navigation-footer-link-".concat(index));
128
+ })
129
+ })
130
+ ]
131
+ });
132
+ }
133
+ var linkStyles = tv({
134
+ base: "Litho-Navigation-Link relative min-h-8 ml-2.5 px-2.5 py-1.5 flex items-center justify-between gap-2",
135
+ variants: {
136
+ selected: {
137
+ true: "Litho-Navigation-Link-Selected after:content-[''] after:absolute after:-left-2.5 after:top-0.5 after:bottom-0.5 after:w-0.75 after:rounded-r-md after:bg-brand-saturated"
138
+ },
139
+ hasAction: {
140
+ true: "cursor-pointer rounded-md hover"
141
+ },
142
+ onlyShowOnMobile: {
143
+ true: "@md:hidden"
144
+ }
145
+ },
146
+ defaultVariants: {
147
+ onlyShowOnMobile: false
148
+ }
149
+ });
150
+ /**
151
+ * Navigation.Link component.
152
+ * Represents a link within the navigation.
153
+ *
154
+ * @component
155
+ * @param {Object} props - Component properties.
156
+ * @param {boolean} [props.selected] - Whether the link is selected.
157
+ * @param {boolean} [props.highlight] - Whether the link is highlighted.
158
+ * @param {Array<Object>} [props.subLinks] - Array of sub-links for this link.
159
+ * @param {boolean} [props.showSubLinksAsRegularLinks] - Whether to render sub-links as regular links.
160
+ * @param {boolean} [props.showDividerAbove] - Whether to show a divider above the link.
161
+ * @param {boolean} [props.showDividerBelow] - Whether to show a divider below the link.
162
+ * @param {Function} [props.onAction] - Callback for the link action.
163
+ * @param {React.ReactNode} [props.source] - Optional source content to render.
164
+ * @param {React.ReactNode} [props.icon] - Optional icon to render.
165
+ * @param {string} [props.label] - Label for the link.
166
+ * @param {Object} [props.badge] - Badge configuration.
167
+ * @param {string} [props.badge.status] - Badge status (e.g., "success", "warning").
168
+ * @param {string} [props.badge.label] - Badge label.
169
+ * @param {boolean} [props.external] - Whether the link is external.
170
+ * @param {boolean} [props.disclosure] - Whether the link has a disclosure icon.
171
+ * @param {string} [props.iconDisplay] - Icon display style (e.g., "block", "inline").
172
+ * @param {boolean} [props.keepNavigationOpen] - Whether to keep the navigation open.
173
+ * @returns {JSX.Element} The rendered Link component.
174
+ */ function Link() {
175
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
176
+ var selected = props.selected, highlight = props.highlight, subLinks = props.subLinks, showSubLinksAsRegularLinks = props.showSubLinksAsRegularLinks, showDividerAbove = props.showDividerAbove, showDividerBelow = props.showDividerBelow, onAction = props.onAction, source = props.source, icon = props.icon, label = props.label, badge = props.badge, external = props.external, expanded = props.expanded, _props_iconDisplay = props.iconDisplay, iconDisplay = _props_iconDisplay === void 0 ? "block" : _props_iconDisplay, _props_keepNavigationOpen = props.keepNavigationOpen, keepNavigationOpen = _props_keepNavigationOpen === void 0 ? false : _props_keepNavigationOpen, _props_onlyShowOnMobile = props.onlyShowOnMobile, onlyShowOnMobile = _props_onlyShowOnMobile === void 0 ? false : _props_onlyShowOnMobile, _props_disclosure = props.disclosure, disclosure = _props_disclosure === void 0 ? false : _props_disclosure;
177
+ var setShowMobileNavigation = useContext(FrameContext).setShowMobileNavigation;
178
+ var subLinkIsSelected = subLinks === null || subLinks === void 0 ? void 0 : subLinks.some(function(subLink) {
179
+ return subLink.selected;
180
+ });
181
+ var grandChildLinkIsSelected = subLinks === null || subLinks === void 0 ? void 0 : subLinks.some(function(subLink) {
182
+ var _subLink_subLinks;
183
+ return (_subLink_subLinks = subLink.subLinks) === null || _subLink_subLinks === void 0 ? void 0 : _subLink_subLinks.some(function(grandChildLink) {
184
+ return grandChildLink.selected;
185
+ });
186
+ });
187
+ var linkSelected = selected || subLinkIsSelected && !highlight;
188
+ var linkClasses = linkStyles({
189
+ selected: linkSelected,
190
+ hasAction: !!onAction,
191
+ highlight: highlight,
192
+ onlyShowOnMobile: onlyShowOnMobile
193
+ });
194
+ var handleClick = function() {
195
+ onAction === null || onAction === void 0 ? void 0 : onAction();
196
+ if (!keepNavigationOpen) {
197
+ setShowMobileNavigation(false);
198
+ }
199
+ };
200
+ return /*#__PURE__*/ _jsxs(_Fragment, {
201
+ children: [
202
+ showDividerAbove && /*#__PURE__*/ _jsx("div", {
203
+ className: "h-px w-full bg-tint-3 dark:bg-tint-alt-3 my-3"
204
+ }),
205
+ /*#__PURE__*/ _jsxs("div", {
206
+ className: linkClasses,
207
+ onClick: handleClick,
208
+ children: [
209
+ /*#__PURE__*/ _jsxs("div", {
210
+ className: "flex items-center gap-2 truncate",
211
+ children: [
212
+ source ? source : icon ? /*#__PURE__*/ _jsx(Icon, {
213
+ source: icon,
214
+ color: linkSelected ? "link" : "subdued",
215
+ display: iconDisplay
216
+ }) : null,
217
+ /*#__PURE__*/ _jsx(Text, {
218
+ fontWeight: "medium",
219
+ color: linkSelected ? "link" : subLinkIsSelected || grandChildLinkIsSelected ? "default" : "normal",
220
+ truncate: true,
221
+ children: label
222
+ })
223
+ ]
224
+ }),
225
+ badge ? /*#__PURE__*/ _jsx(Badge, {
226
+ status: badge.status,
227
+ children: badge.label
228
+ }) : external ? /*#__PURE__*/ _jsx(Icon, {
229
+ source: ExternalMinor,
230
+ color: "subdued"
231
+ }) : disclosure ? /*#__PURE__*/ _jsx(Icon, {
232
+ source: ChevronRightMinor,
233
+ color: "subdued",
234
+ className: "opacity-50"
235
+ }) : null
236
+ ]
237
+ }),
238
+ (expanded || selected || subLinkIsSelected || grandChildLinkIsSelected) && !disclosure && subLinks && /*#__PURE__*/ _jsx("div", {
239
+ className: "flex flex-col mb-3",
240
+ children: subLinks.map(function(subLink, index) {
241
+ if (showSubLinksAsRegularLinks) {
242
+ return /*#__PURE__*/ _jsx(Navigation.Link, _object_spread({}, subLink), "navigation-sublink-".concat(index));
243
+ }
244
+ return /*#__PURE__*/ _jsx(Navigation.SubLink, _object_spread({}, subLink), "navigation-sublink-".concat(index));
245
+ })
246
+ }),
247
+ showDividerBelow && /*#__PURE__*/ _jsx("div", {
248
+ className: "h-px w-full bg-tint-3 dark:bg-tint-alt-3 mb-3"
249
+ })
250
+ ]
251
+ });
252
+ }
253
+ Navigation.Link = Link;
254
+ var subLinkStyles = tv({
255
+ base: "Litho-Navigation-SubLink min-h-8 ml-2.5 pr-2.5 py-1.5 flex items-center justify-between gap-2",
256
+ variants: {
257
+ selected: {
258
+ true: "pl-2.5",
259
+ false: "pl-9.5"
260
+ },
261
+ hasAction: {
262
+ true: "cursor-pointer rounded-md hover"
263
+ }
264
+ }
265
+ });
266
+ /**
267
+ * Navigation.SubLink component.
268
+ * Represents a sub-link within the navigation.
269
+ *
270
+ * @component
271
+ * @param {Object} props - Component properties.
272
+ * @param {boolean} [props.selected] - Whether the sub-link is selected.
273
+ * @param {Function} [props.onAction] - Callback for the sub-link action.
274
+ * @param {string} [props.label] - Label for the sub-link.
275
+ * @param {Object} [props.badge] - Badge configuration.
276
+ * @param {string} [props.badge.status] - Badge status (e.g., "success", "warning").
277
+ * @param {string} [props.badge.label] - Badge label.
278
+ * @param {boolean} [props.keepNavigationOpen] - Whether to keep the navigation open.
279
+ * @returns {JSX.Element} The rendered SubLink component.
280
+ */ function SubLink() {
281
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
282
+ var selected = props.selected, onAction = props.onAction, label = props.label, badge = props.badge, _props_keepNavigationOpen = props.keepNavigationOpen, keepNavigationOpen = _props_keepNavigationOpen === void 0 ? false : _props_keepNavigationOpen;
283
+ var subLinkClasses = subLinkStyles({
284
+ selected: selected,
285
+ hasAction: !!onAction
286
+ });
287
+ var setShowMobileNavigation = useContext(FrameContext).setShowMobileNavigation;
288
+ var handleClick = function() {
289
+ onAction === null || onAction === void 0 ? void 0 : onAction();
290
+ if (!keepNavigationOpen) {
291
+ setShowMobileNavigation(false);
292
+ }
293
+ };
294
+ return /*#__PURE__*/ _jsxs("div", {
295
+ className: subLinkClasses,
296
+ onClick: handleClick,
297
+ children: [
298
+ /*#__PURE__*/ _jsxs("div", {
299
+ className: "flex items-center gap-2",
300
+ children: [
301
+ selected && /*#__PURE__*/ _jsx(Icon, {
302
+ source: ChevronRightMinor,
303
+ color: "subdued",
304
+ className: "opacity-50"
305
+ }),
306
+ /*#__PURE__*/ _jsx(Text, {
307
+ fontWeight: selected ? "medium" : "normal",
308
+ color: selected ? "default" : "normal",
309
+ children: label
310
+ })
311
+ ]
312
+ }),
313
+ badge && /*#__PURE__*/ _jsx(Badge, {
314
+ status: badge.status,
315
+ children: badge.label
316
+ })
317
+ ]
318
+ });
319
+ }
320
+ Navigation.SubLink = SubLink;
321
+ export default Navigation;