@gearbox-protocol/permissionless-ui 1.7.4 → 1.8.0

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 (87) hide show
  1. package/README.md +0 -4
  2. package/dist/cjs/_virtual/_commonjsHelpers.cjs +9 -0
  3. package/dist/cjs/_virtual/index.cjs +9 -0
  4. package/dist/cjs/components/alert-dialog/alert-dialog.cjs +1 -1
  5. package/dist/cjs/components/error-message/error-message.cjs +5 -5
  6. package/dist/cjs/components/graph/graph-current-value.cjs +2 -2
  7. package/dist/cjs/components/graph/graph-tooltip.cjs +4 -4
  8. package/dist/cjs/components/graph/graph-view.cjs +9 -9
  9. package/dist/cjs/components/graph/graph.cjs +2 -2
  10. package/dist/cjs/components/layout/app-logo/app-logo.cjs +8 -4
  11. package/dist/cjs/components/layout/footer/footer.cjs +1 -1
  12. package/dist/cjs/components/layout/grid/grid.cjs +7 -1
  13. package/dist/cjs/components/layout/header/header.cjs +16 -7
  14. package/dist/cjs/components/layout/page-layout/page-layout.cjs +2 -2
  15. package/dist/cjs/components/liquidation/liquidation-assets-table/liquidation-assets-table.cjs +23 -13
  16. package/dist/cjs/components/loader-guard/loader-guard.cjs +10 -6
  17. package/dist/cjs/components/navbar/navbar.cjs +5 -2
  18. package/dist/cjs/components/navitem/navitem.cjs +6 -6
  19. package/dist/cjs/components/page-title/page-title.cjs +2 -2
  20. package/dist/cjs/components/tab-control/tab-control.cjs +4 -3
  21. package/dist/cjs/components/tabs/tabs.cjs +2 -2
  22. package/dist/cjs/components/theme-toggle/theme-toggle.cjs +1 -1
  23. package/dist/cjs/components/token-icon/token-icon.cjs +2 -1
  24. package/dist/cjs/components/token-symbol/token-symbol.cjs +4 -4
  25. package/dist/cjs/components/trading-view/graph-dropdown.cjs +27 -3
  26. package/dist/cjs/components/trading-view/trading-view.cjs +15 -2
  27. package/dist/cjs/components/with-filter-button/with-filter-button.cjs +2 -2
  28. package/dist/cjs/configs/tailwind-preset.cjs +2 -1
  29. package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/helpers.cjs +31 -0
  30. package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/index.cjs +49 -0
  31. package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/utilities.cjs +218 -0
  32. package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/variants.cjs +44 -0
  33. package/dist/cjs/node_modules/.pnpm/tailwindcss@4.1.17/node_modules/tailwindcss/dist/flatten-color-palette.cjs +17 -0
  34. package/dist/cjs/node_modules/.pnpm/tailwindcss@4.1.17/node_modules/tailwindcss/dist/plugin.cjs +15 -0
  35. package/dist/esm/_virtual/_commonjsHelpers.js +5 -0
  36. package/dist/esm/_virtual/index.js +7 -0
  37. package/dist/esm/components/alert-dialog/alert-dialog.js +1 -1
  38. package/dist/esm/components/error-message/error-message.js +5 -5
  39. package/dist/esm/components/graph/graph-current-value.js +2 -2
  40. package/dist/esm/components/graph/graph-tooltip.js +4 -4
  41. package/dist/esm/components/graph/graph-view.js +9 -9
  42. package/dist/esm/components/graph/graph.js +2 -2
  43. package/dist/esm/components/layout/app-logo/app-logo.js +8 -4
  44. package/dist/esm/components/layout/footer/footer.js +1 -1
  45. package/dist/esm/components/layout/grid/grid.js +7 -1
  46. package/dist/esm/components/layout/header/header.js +16 -7
  47. package/dist/esm/components/layout/page-layout/page-layout.js +2 -2
  48. package/dist/esm/components/liquidation/liquidation-assets-table/liquidation-assets-table.js +23 -13
  49. package/dist/esm/components/loader-guard/loader-guard.js +10 -6
  50. package/dist/esm/components/navbar/navbar.js +5 -2
  51. package/dist/esm/components/navitem/navitem.js +6 -6
  52. package/dist/esm/components/page-title/page-title.js +2 -2
  53. package/dist/esm/components/tab-control/tab-control.js +4 -3
  54. package/dist/esm/components/tabs/tabs.js +2 -2
  55. package/dist/esm/components/theme-toggle/theme-toggle.js +1 -1
  56. package/dist/esm/components/token-icon/token-icon.js +2 -1
  57. package/dist/esm/components/token-symbol/token-symbol.js +4 -4
  58. package/dist/esm/components/trading-view/graph-dropdown.js +28 -4
  59. package/dist/esm/components/trading-view/trading-view.js +16 -3
  60. package/dist/esm/components/with-filter-button/with-filter-button.js +2 -2
  61. package/dist/esm/configs/tailwind-preset.js +2 -1
  62. package/dist/esm/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/helpers.js +27 -0
  63. package/dist/esm/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/index.js +45 -0
  64. package/dist/esm/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/utilities.js +214 -0
  65. package/dist/esm/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/variants.js +40 -0
  66. package/dist/esm/node_modules/.pnpm/tailwindcss@4.1.17/node_modules/tailwindcss/dist/flatten-color-palette.js +13 -0
  67. package/dist/esm/node_modules/.pnpm/tailwindcss@4.1.17/node_modules/tailwindcss/dist/plugin.js +11 -0
  68. package/dist/globals.css +50 -23
  69. package/dist/types/components/auth/signin-required.d.ts +2 -2
  70. package/dist/types/components/buttons/navigation-button/navigation-button.d.ts +1 -1
  71. package/dist/types/components/dialog/dialog.d.ts +3 -3
  72. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +6 -6
  73. package/dist/types/components/layout/col/col.d.ts +12 -2
  74. package/dist/types/components/layout/container/container.d.ts +1 -1
  75. package/dist/types/components/layout/footer/footer.d.ts +1 -1
  76. package/dist/types/components/layout/grid/grid.d.ts +3 -2
  77. package/dist/types/components/layout/header/header.d.ts +1 -1
  78. package/dist/types/components/layout/layout/layout.d.ts +1 -1
  79. package/dist/types/components/navbar/navbar-indicator-context.d.ts +1 -1
  80. package/dist/types/components/pool-points-indicator/pool-points-indicator.d.ts +1 -1
  81. package/dist/types/components/theme-provider.d.ts +1 -1
  82. package/dist/types/components/trading-view/graph-dropdown.d.ts +7 -1
  83. package/dist/types/components/trading-view/trading-view.d.ts +7 -1
  84. package/dist/types/configs/tailwind-preset.d.ts +1 -3
  85. package/dist/types/hooks/use-filter.d.ts +2 -2
  86. package/dist/types/types/component-props.d.ts +1 -1
  87. package/package.json +2 -1
@@ -11,7 +11,10 @@ function GraphDropdown({
11
11
  items,
12
12
  defaultItem,
13
13
  onSelected,
14
- multiple = false
14
+ multiple = false,
15
+ graphsWithNoData,
16
+ loadingGraphs,
17
+ onNoDataSelected
15
18
  }) {
16
19
  const getInitialValue = () => {
17
20
  if (multiple) {
@@ -63,6 +66,15 @@ function GraphDropdown({
63
66
  (newValue) => {
64
67
  const item = items.find((i) => String(i.value) === newValue);
65
68
  if (!item) return;
69
+ if (loadingGraphs?.has(item.value)) {
70
+ return;
71
+ }
72
+ if (graphsWithNoData?.has(item.value)) {
73
+ if (onNoDataSelected) {
74
+ onNoDataSelected(item.value, item.label);
75
+ }
76
+ return;
77
+ }
66
78
  if (multiple) {
67
79
  isSelectingRef.current = true;
68
80
  setSelectedItems((prev) => {
@@ -83,7 +95,14 @@ function GraphDropdown({
83
95
  onSelected(item.value);
84
96
  }
85
97
  },
86
- [multiple, onSelected, items]
98
+ [
99
+ multiple,
100
+ onSelected,
101
+ items,
102
+ graphsWithNoData,
103
+ loadingGraphs,
104
+ onNoDataSelected
105
+ ]
87
106
  );
88
107
  const title = React.useMemo(() => {
89
108
  if (!multiple) {
@@ -136,16 +155,20 @@ function GraphDropdown({
136
155
  ),
137
156
  items.map((item, index) => {
138
157
  const isChecked = multiple && selectedItems.has(item.value);
158
+ const isLoading = loadingGraphs?.has(item.value);
159
+ const isDisabled = isLoading;
139
160
  return /* @__PURE__ */ jsxRuntime.jsx(
140
161
  components_select_select.SelectItem,
141
162
  {
142
163
  value: String(item.value),
164
+ disabled: isDisabled,
143
165
  onSelect: (e) => {
144
166
  if (multiple) {
145
167
  e.preventDefault();
146
168
  }
147
169
  handleValueChange(String(item.value));
148
170
  },
171
+ className: isDisabled ? "opacity-50 cursor-not-allowed" : "",
149
172
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
150
173
  multiple && /* @__PURE__ */ jsxRuntime.jsx(
151
174
  "span",
@@ -154,7 +177,8 @@ function GraphDropdown({
154
177
  children: isChecked && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" })
155
178
  }
156
179
  ),
157
- item.label
180
+ item.label,
181
+ isLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ml-1 h-4 w-4 animate-spin text-muted-foreground" })
158
182
  ] })
159
183
  },
160
184
  `graph-item-${index}-${String(item.value)}`
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  const jsxRuntime = require('react/jsx-runtime');
6
6
  const React = require('react');
7
+ const sonner = require('sonner');
7
8
  const hooks_useMediaQuery = require('../../hooks/use-media-query.cjs');
8
9
  const components_buttons_rangeButtons_rangeButtons = require('../buttons/range-buttons/range-buttons.cjs');
9
10
  const components_graph_graph = require('../graph/graph.cjs');
@@ -59,7 +60,10 @@ function TradingView({
59
60
  setRange,
60
61
  onGraphExpanded,
61
62
  isGraphExpanded,
62
- onUnselectSeries
63
+ onUnselectSeries,
64
+ graphsWithNoData,
65
+ loadingGraphs,
66
+ noDataMessage = "No data available for this graph"
63
67
  }) {
64
68
  const dataArray = React.useMemo(() => {
65
69
  return Array.isArray(data) ? data : data ? [data] : [];
@@ -68,6 +72,12 @@ function TradingView({
68
72
  return Array.isArray(data) && data.length > 1;
69
73
  }, [data]);
70
74
  const isMobile = hooks_useMediaQuery.useIsMobile();
75
+ const handleNoDataSelected = React.useCallback(
76
+ (_graphValue, _graphLabel) => {
77
+ sonner.toast.error(noDataMessage);
78
+ },
79
+ [noDataMessage]
80
+ );
71
81
  const yMeasureUnitSingle = React.useMemo(() => {
72
82
  if (!yMeasureUnit) return void 0;
73
83
  return Array.isArray(yMeasureUnit) ? yMeasureUnit[0] : yMeasureUnit;
@@ -79,7 +89,10 @@ function TradingView({
79
89
  onSelected: onGraphSelected,
80
90
  items: graphs,
81
91
  defaultItem: defaultGraph,
82
- multiple: isMultipleSelect
92
+ multiple: isMultipleSelect,
93
+ graphsWithNoData,
94
+ loadingGraphs,
95
+ onNoDataSelected: handleNoDataSelected
83
96
  }
84
97
  ) }),
85
98
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row flex-nowrap justify-start sm:justify-end items-center flex-1", children: [
@@ -46,12 +46,12 @@ const WithFilterButton = React__namespace.forwardRef(
46
46
  {
47
47
  ref,
48
48
  className: utils_cn.cn(
49
- "w-full flex items-center justify-between gap-4",
49
+ "w-full flex items-start md:items-center justify-between gap-4 flex-col md:flex-row",
50
50
  className
51
51
  ),
52
52
  children: [
53
53
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children }),
54
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
54
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-row-reverse md:flex-row", children: [
55
55
  onClearAll && /* @__PURE__ */ jsxRuntime.jsx(components_buttons_button_button.Button, { variant: "ghost", size: "default", onClick: onClearAll, children: "Clear all" }),
56
56
  /* @__PURE__ */ jsxRuntime.jsx(
57
57
  components_buttons_filterButton_filterButton.FilterButton,
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
+ const index = require('../_virtual/index.cjs');
5
6
  const tailwindAnimate = require('tailwindcss-animate');
6
7
 
7
8
  const preset = {
@@ -124,7 +125,7 @@ const preset = {
124
125
  }
125
126
  }
126
127
  },
127
- plugins: [tailwindAnimate]
128
+ plugins: [tailwindAnimate, index({ nocompatible: true })]
128
129
  };
129
130
 
130
131
  exports.default = preset;
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ /**
6
+ * Gets the underlying default import of a module.
7
+ *
8
+ * This is used to handle internal imoprts from Tailwind, since Tailwind Play
9
+ * handles these imports differently.
10
+ *
11
+ * @template T
12
+ * @param {T | { __esModule: unknown, default: T }} mod The module
13
+ * @returns {T} The bare export
14
+ */
15
+
16
+ var helpers;
17
+ var hasRequiredHelpers;
18
+
19
+ function requireHelpers () {
20
+ if (hasRequiredHelpers) return helpers;
21
+ hasRequiredHelpers = 1;
22
+ // eslint-disable-next-line no-underscore-dangle
23
+ const importDefault = mod => (mod && mod.__esModule ? mod.default : mod);
24
+
25
+ helpers = {
26
+ importDefault
27
+ };
28
+ return helpers;
29
+ }
30
+
31
+ exports.__require = requireHelpers;
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const plugin = require('../../../../tailwindcss@4.1.17/node_modules/tailwindcss/dist/plugin.cjs');
6
+ const utilities = require('./utilities.cjs');
7
+ const variants = require('./variants.cjs');
8
+
9
+ var src;
10
+ var hasRequiredSrc;
11
+
12
+ function requireSrc () {
13
+ if (hasRequiredSrc) return src;
14
+ hasRequiredSrc = 1;
15
+ // TODO: Figure out why the linter is unhappy with this import
16
+ // eslint-disable-next-line import/no-unresolved
17
+ const plugin$1 = plugin.__require();
18
+ const {
19
+ addBaseStyles,
20
+ addBaseSizeUtilities,
21
+ addColorUtilities,
22
+ addRoundedUtilities,
23
+ addSizeUtilities
24
+ } = utilities.__require();
25
+ const { addVariants } = variants.__require();
26
+
27
+ src = plugin$1.withOptions((options = {}) => tailwind => {
28
+ let preferredStrategy = options.preferredStrategy ?? options.preferredstrategy ?? 'standard';
29
+
30
+ if (preferredStrategy !== 'standard' && preferredStrategy !== 'pseudoelements') {
31
+ // eslint-disable-next-line no-console
32
+ console.warn('WARNING: tailwind-scrollbar preferredStrategy should be \'standard\' or \'pseudoelements\'');
33
+ preferredStrategy = 'standard';
34
+ }
35
+
36
+ addBaseStyles(tailwind, preferredStrategy);
37
+ addBaseSizeUtilities(tailwind, preferredStrategy);
38
+ addColorUtilities(tailwind);
39
+ addVariants(tailwind);
40
+
41
+ if (options.nocompatible) {
42
+ addRoundedUtilities(tailwind);
43
+ addSizeUtilities(tailwind);
44
+ }
45
+ });
46
+ return src;
47
+ }
48
+
49
+ exports.__require = requireSrc;
@@ -0,0 +1,218 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const flattenColorPalette = require('../../../../tailwindcss@4.1.17/node_modules/tailwindcss/dist/flatten-color-palette.cjs');
6
+ const helpers = require('./helpers.cjs');
7
+
8
+ var utilities;
9
+ var hasRequiredUtilities;
10
+
11
+ function requireUtilities () {
12
+ if (hasRequiredUtilities) return utilities;
13
+ hasRequiredUtilities = 1;
14
+ // TODO: Figure out why the linter is unhappy with this import
15
+ // eslint-disable-next-line import/no-unresolved
16
+ const flattenColorPaletteImport = flattenColorPalette.__require();
17
+ const { importDefault } = helpers.__require();
18
+
19
+ // Tailwind Play will import these internal imports as ES6 imports, while most
20
+ // other workflows will import them as CommonJS imports.
21
+ const flattenColorPalette$1 = importDefault(flattenColorPaletteImport);
22
+
23
+ const COMPONENTS = ['track', 'thumb', 'corner'];
24
+
25
+ /**
26
+ * @param {Record<never, unknown>} properties - The properties to assign
27
+ * @param {boolean} preferPseudoElements - If true, only browsers that cannot
28
+ * use pseudoelements will specify scrollbar properties
29
+ * @returns {Record<string, unknown>} - The generated CSS rules
30
+ */
31
+ const scrollbarProperties = (properties, preferPseudoElements) => {
32
+ if (preferPseudoElements) {
33
+ return {
34
+ '@supports (-moz-appearance:none)': properties
35
+ };
36
+ }
37
+
38
+ return properties;
39
+ };
40
+
41
+ /**
42
+ * Base resets to make the plugin's utilities work
43
+ *
44
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
45
+ * @param {'standard' | 'peseudoelements'} preferredStrategy - The preferred
46
+ * scrollbar styling strategy: standards track or pseudoelements
47
+ */
48
+ const addBaseStyles = ({ addBase }, preferredStrategy) => {
49
+ addBase({
50
+ '*': scrollbarProperties({
51
+ 'scrollbar-color': 'initial',
52
+ 'scrollbar-width': 'initial'
53
+ }, preferredStrategy === 'pseudoelements')
54
+ });
55
+ };
56
+
57
+ /**
58
+ * Generates utilties that tell an element what to do with
59
+ * --scrollbar-track and --scrollbar-thumb custom properties
60
+ *
61
+ * @returns {Record<string, unknown>} - The generated CSS
62
+ */
63
+ const generateBaseUtilities = () => ({
64
+ ...Object.fromEntries(COMPONENTS.map(component => {
65
+ const base = `&::-webkit-scrollbar-${component}`;
66
+
67
+ return [
68
+ [base, {
69
+ 'background-color': `var(--scrollbar-${component})`,
70
+ 'border-radius': `var(--scrollbar-${component}-radius)`
71
+ }]
72
+ ];
73
+ }).flat())
74
+ });
75
+
76
+ /**
77
+ * Utilities for initializing a custom styled scrollbar, which implicitly set
78
+ * the scrollbar's size
79
+ *
80
+ * @param {object} options - Options
81
+ * @param {boolean} options.preferPseudoElements - If true, only browsers that
82
+ * cannot use pseudoelements will specify scrollbar-width
83
+ * @returns {Record<string, unknown>} - Base size utilities for scrollbars
84
+ */
85
+ const generateScrollbarSizeUtilities = ({ preferPseudoElements }) => ({
86
+ '.scrollbar': {
87
+ ...generateBaseUtilities(),
88
+ ...scrollbarProperties({
89
+ 'scrollbar-width': 'auto',
90
+ 'scrollbar-color': 'var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)'
91
+ }, preferPseudoElements),
92
+
93
+ '&::-webkit-scrollbar': {
94
+ display: 'block',
95
+ width: 'var(--scrollbar-width, 16px)',
96
+ height: 'var(--scrollbar-height, 16px)'
97
+ }
98
+ },
99
+
100
+ '.scrollbar-thin': {
101
+ ...generateBaseUtilities(),
102
+ ...scrollbarProperties({
103
+ 'scrollbar-width': 'thin',
104
+ 'scrollbar-color': 'var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)'
105
+ }, preferPseudoElements),
106
+
107
+ '&::-webkit-scrollbar': {
108
+ display: 'block',
109
+ width: '8px',
110
+ height: '8px'
111
+ }
112
+ },
113
+
114
+ '.scrollbar-none': {
115
+ ...scrollbarProperties({
116
+ 'scrollbar-width': 'none'
117
+ }, preferPseudoElements),
118
+
119
+ '&::-webkit-scrollbar': {
120
+ display: 'none'
121
+ }
122
+ }
123
+ });
124
+
125
+ /**
126
+ * Converts a color value or function to a color value
127
+ *
128
+ * @param {string | Function} maybeFunction - The color value or function
129
+ * @returns {string} - The color value
130
+ */
131
+ const toColorValue = maybeFunction => (typeof maybeFunction === 'function' ? maybeFunction({}) : maybeFunction);
132
+
133
+ /**
134
+ * Adds scrollbar-COMPONENT-COLOR utilities for every scrollbar component.
135
+ *
136
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
137
+ */
138
+ const addColorUtilities = ({ matchUtilities, theme }) => {
139
+ const themeColors = flattenColorPalette$1(theme('colors'));
140
+ const colors = Object.fromEntries(
141
+ Object.entries(themeColors).map(([k, v]) => [k, toColorValue(v)])
142
+ );
143
+
144
+ COMPONENTS.forEach(component => {
145
+ matchUtilities(
146
+ {
147
+ [`scrollbar-${component}`]: value => ({
148
+ [`--scrollbar-${component}`]: toColorValue(value)
149
+ })
150
+ },
151
+ {
152
+ values: colors,
153
+ type: 'color'
154
+ }
155
+ );
156
+ });
157
+ };
158
+
159
+ /**
160
+ * Adds scrollbar-COMPONENT-rounded-VALUE utilities for every scrollbar
161
+ * component.
162
+ *
163
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
164
+ */
165
+ const addRoundedUtilities = ({ theme, matchUtilities }) => {
166
+ COMPONENTS.forEach(component => {
167
+ matchUtilities(
168
+ {
169
+ [`scrollbar-${component}-rounded`]: value => ({
170
+ [`--scrollbar-${component}-radius`]: value
171
+ })
172
+ },
173
+ {
174
+ values: theme('borderRadius')
175
+ }
176
+ );
177
+ });
178
+ };
179
+
180
+ /**
181
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
182
+ * @param {'standard' | 'peseudoelements'} preferredStrategy - The preferred
183
+ * scrollbar styling strategy: standards track or pseudoelements
184
+ */
185
+ const addBaseSizeUtilities = ({ addUtilities }, preferredStrategy) => {
186
+ addUtilities(generateScrollbarSizeUtilities({
187
+ preferPseudoElements: preferredStrategy === 'pseudoelements'
188
+ }));
189
+ };
190
+
191
+ /**
192
+ * Adds scrollbar-w-* and scrollbar-h-* utilities
193
+ *
194
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
195
+ */
196
+ const addSizeUtilities = ({ matchUtilities, theme }) => {
197
+ ['width', 'height'].forEach(dimension => {
198
+ matchUtilities({
199
+ [`scrollbar-${dimension[0]}`]: value => ({
200
+ [`--scrollbar-${dimension}`]: value
201
+ })
202
+ }, {
203
+ values: theme(dimension)
204
+ });
205
+ });
206
+ };
207
+
208
+ utilities = {
209
+ addBaseStyles,
210
+ addBaseSizeUtilities,
211
+ addColorUtilities,
212
+ addRoundedUtilities,
213
+ addSizeUtilities
214
+ };
215
+ return utilities;
216
+ }
217
+
218
+ exports.__require = requireUtilities;
@@ -0,0 +1,44 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ /** @typedef {import('./typedefs').TailwindPlugin} TailwindPlugin */
6
+
7
+ var variants;
8
+ var hasRequiredVariants;
9
+
10
+ function requireVariants () {
11
+ if (hasRequiredVariants) return variants;
12
+ hasRequiredVariants = 1;
13
+ /**
14
+ * Adds scrollbar variants for styling webkit scrollbars' hover and active
15
+ * states.
16
+ *
17
+ * Earlier iterations of this plugin hijacked the hover: and active: variants
18
+ * directly to create a cleaner syntax, but there are several issues with that
19
+ * approach:
20
+ * - It made the plugin prone to breaking other unrelated styles
21
+ * - It made logic like "make an element's scrollbar green when the
22
+ * _element_ is hovered impossible. (This is unusual, but should still
23
+ * be possible.)
24
+ * - It straight up does not work in Tailwind v4.
25
+ *
26
+ * @param {TailwindPlugin} tailwind - Tailwind's plugin object
27
+ */
28
+ const addVariants = ({ addVariant }) => {
29
+ addVariant('scrollbar-hover', '&::-webkit-scrollbar-thumb:hover');
30
+ addVariant('scrollbar-track-hover', '&::-webkit-scrollbar-track:hover');
31
+ addVariant('scrollbar-corner-hover', '&::-webkit-scrollbar-corner:hover');
32
+
33
+ addVariant('scrollbar-active', '&::-webkit-scrollbar-thumb:active');
34
+ addVariant('scrollbar-track-active', '&::-webkit-scrollbar-track:active');
35
+ // Corners can't be active, so they don't get their own active variant.
36
+ };
37
+
38
+ variants = {
39
+ addVariants
40
+ };
41
+ return variants;
42
+ }
43
+
44
+ exports.__require = requireVariants;
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ var flattenColorPalette;
6
+ var hasRequiredFlattenColorPalette;
7
+
8
+ function requireFlattenColorPalette () {
9
+ if (hasRequiredFlattenColorPalette) return flattenColorPalette;
10
+ hasRequiredFlattenColorPalette = 1;
11
+ function V(e){return {kind:"word",value:e}}function we(e,t){return {kind:"function",value:e,nodes:t}}function ye(e){return {kind:"separator",value:e}}function v(e){let t="";for(let i of e)switch(i.kind){case "word":case "separator":{t+=i.value;break}case "function":t+=i.value+"("+v(i.nodes)+")";}return t}var H=92,be=41,Z=58,Q=44,xe=34,J=61,X=62,ee=60,te=10,Ae=40,Ce=39,Se=47,re=32,ie=9;function g(e){e=e.replaceAll(`\r
12
+ `,`
13
+ `);let t=[],i=[],r=null,n="",a;for(let o=0;o<e.length;o++){let l=e.charCodeAt(o);switch(l){case H:{n+=e[o]+e[o+1],o++;break}case Se:{if(n.length>0){let u=V(n);r?r.nodes.push(u):t.push(u),n="";}let s=V(e[o]);r?r.nodes.push(s):t.push(s);break}case Z:case Q:case J:case X:case ee:case te:case re:case ie:{if(n.length>0){let U=V(n);r?r.nodes.push(U):t.push(U),n="";}let s=o,u=o+1;for(;u<e.length&&(a=e.charCodeAt(u),!(a!==Z&&a!==Q&&a!==J&&a!==X&&a!==ee&&a!==te&&a!==re&&a!==ie));u++);o=u-1;let w=ye(e.slice(s,u));r?r.nodes.push(w):t.push(w);break}case Ce:case xe:{let s=o;for(let u=o+1;u<e.length;u++)if(a=e.charCodeAt(u),a===H)u+=1;else if(a===l){o=u;break}n+=e.slice(s,o+1);break}case Ae:{let s=we(n,[]);n="",r?r.nodes.push(s):t.push(s),i.push(s),r=s;break}case be:{let s=i.pop();if(n.length>0){let u=V(n);s?.nodes.push(u),n="";}i.length>0?r=i[i.length-1]:r=null;break}default:n+=String.fromCharCode(l);}}return n.length>0&&t.push(V(n)),t}var p=class extends Map{constructor(i){super();this.factory=i;}get(i){let r=super.get(i);return r===void 0&&(r=this.factory(i,this),this.set(i,r)),r}};var L=new Uint8Array(256);function d(e,t){let i=0,r=[],n=0,a=e.length,o=t.charCodeAt(0);for(let l=0;l<a;l++){let s=e.charCodeAt(l);if(i===0&&s===o){r.push(e.slice(n,l)),n=l+1;continue}switch(s){case 92:l+=1;break;case 39:case 34:for(;++l<a;){let u=e.charCodeAt(l);if(u===92){l+=1;continue}if(u===s)break}break;case 40:L[i]=41,i++;break;case 91:L[i]=93,i++;break;case 123:L[i]=125,i++;break;case 93:case 125:case 41:i>0&&s===L[i-1]&&i--;break}}return r.push(e.slice(n)),r}var j=(o=>(o[o.Continue=0]="Continue",o[o.Skip=1]="Skip",o[o.Stop=2]="Stop",o[o.Replace=3]="Replace",o[o.ReplaceSkip=4]="ReplaceSkip",o[o.ReplaceStop=5]="ReplaceStop",o))(j||{}),f={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function c(e,t){typeof t=="function"?ne(e,t):ne(e,t.enter,t.exit);}function ne(e,t=()=>f.Continue,i=()=>f.Continue){let r=[[e,0,null]],n={parent:null,depth:0,path(){let a=[];for(let o=1;o<r.length;o++){let l=r[o][2];l&&a.push(l);}return a}};for(;r.length>0;){let a=r.length-1,o=r[a],l=o[0],s=o[1],u=o[2];if(s>=l.length){r.pop();continue}if(n.parent=u,n.depth=a,s>=0){let O=l[s],C=t(O,n)??f.Continue;switch(C.kind){case 0:{O.nodes&&O.nodes.length>0&&r.push([O.nodes,0,O]),o[1]=~s;continue}case 2:return;case 1:{o[1]=~s;continue}case 3:{l.splice(s,1,...C.nodes);continue}case 5:{l.splice(s,1,...C.nodes);return}case 4:{l.splice(s,1,...C.nodes),o[1]+=C.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${j[C.kind]??`Unknown(${C.kind})`}\` in enter.`)}}let w=~s,U=l[w],b=i(U,n)??f.Continue;switch(b.kind){case 0:o[1]=w+1;continue;case 2:return;case 3:{l.splice(w,1,...b.nodes),o[1]=w+b.nodes.length;continue}case 5:{l.splice(w,1,...b.nodes);return}case 4:{l.splice(w,1,...b.nodes),o[1]=w+b.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${j[b.kind]??`Unknown(${b.kind})`}\` in exit.`)}}}new p(e=>{let t=g(e),i=new Set;return c(t,(r,n)=>{let a=n.parent===null?t:n.parent.nodes??[];if(r.kind==="word"&&(r.value==="+"||r.value==="-"||r.value==="*"||r.value==="/")){let o=a.indexOf(r)??-1;if(o===-1)return;let l=a[o-1];if(l?.kind!=="separator"||l.value!==" ")return;let s=a[o+1];if(s?.kind!=="separator"||s.value!==" ")return;i.add(l),i.add(s);}else r.kind==="separator"&&r.value.length>0&&r.value.trim()===""?(a[0]===r||a[a.length-1]===r)&&i.add(r):r.kind==="separator"&&r.value.trim()===","&&(r.value=",");}),i.size>0&&c(t,r=>{if(i.has(r))return i.delete(r),f.ReplaceSkip([])}),W(t),v(t)});new p(e=>{let t=g(e);return t.length===3&&t[0].kind==="word"&&t[0].value==="&"&&t[1].kind==="separator"&&t[1].value===":"&&t[2].kind==="function"&&t[2].value==="is"?v(t[2].nodes):e});function W(e){for(let t of e)switch(t.kind){case "function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=P(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=P(t.value);for(let i=0;i<t.nodes.length;i++)W([t.nodes[i]]);break}t.value=P(t.value),W(t.nodes);break}case "separator":t.value=P(t.value);break;case "word":{(t.value[0]!=="-"||t.value[1]!=="-")&&(t.value=P(t.value));break}default:$e(t);}}new p(e=>{let t=g(e);return t.length===1&&t[0].kind==="function"&&t[0].value==="var"});function $e(e){throw new Error(`Unexpected value: ${e}`)}function P(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}function _(e,t){if(t===null)return e;let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),t==="100%"?e:`color-mix(in oklab, ${e} ${t}, transparent)`}var Re={"--alpha":Oe,"--spacing":Pe,"--theme":_e,theme:Ie};function Oe(e,t,i,...r){let[n,a]=d(i,"/").map(o=>o.trim());if(!n||!a)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${a||"50%"})\``);if(r.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${a||"50%"})\``);return _(n,a)}function Pe(e,t,i,...r){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(r.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${r.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return `calc(${n} * ${i})`}function _e(e,t,i,...r){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=false;i.endsWith(" inline")&&(n=true,i=i.slice(0,-7)),t.kind==="at-rule"&&(n=true);let a=e.resolveThemeValue(i,n);if(!a){if(r.length>0)return r.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(r.length===0)return a;let o=r.join(", ");if(o==="initial")return a;if(a==="initial")return o;if(a.startsWith("var(")||a.startsWith("theme(")||a.startsWith("--theme(")){let l=g(a);return Ue(l,o),v(l)}return a}function Ie(e,t,i,...r){i=De(i);let n=e.resolveThemeValue(i);if(!n&&r.length>0)return r.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}new RegExp(Object.keys(Re).map(e=>`${e}\\(`).join("|"));function De(e){if(e[0]!=="'"&&e[0]!=='"')return e;let t="",i=e[0];for(let r=1;r<e.length-1;r++){let n=e[r],a=e[r+1];n==="\\"&&(a===i||a==="\\")?(t+=a,r++):t+=n;}return t}function Ue(e,t){c(e,i=>{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${t}`});else {let r=i.nodes[i.nodes.length-1];r.kind==="word"&&r.value==="initial"&&(r.value=t);}});}var Ke=/^(?<value>[-+]?(?:\d*\.)?\d+)(?<unit>[a-z]+|%)?$/i;new p(e=>{let t=Ke.exec(e);if(!t)return null;let i=t.groups?.value;if(i===void 0)return null;let r=Number(i);if(Number.isNaN(r))return null;let n=t.groups?.unit;return n===void 0?[r,null]:[r,n]});function F(e){let t={};for(let[i,r]of Object.entries(e??{}))if(i!=="__CSS_VALUES__")if(typeof r=="object"&&r!==null)for(let[n,a]of Object.entries(F(r)))t[`${i}${n==="DEFAULT"?"":`-${n}`}`]=a;else t[i]=r;if("__CSS_VALUES__"in e)for(let[i,r]of Object.entries(e.__CSS_VALUES__))(Number(r)&4)===0&&(t[i]=e[i]);return t}flattenColorPalette=F;
14
+ return flattenColorPalette;
15
+ }
16
+
17
+ exports.__require = requireFlattenColorPalette;
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ var plugin;
6
+ var hasRequiredPlugin;
7
+
8
+ function requirePlugin () {
9
+ if (hasRequiredPlugin) return plugin;
10
+ hasRequiredPlugin = 1;
11
+ function g(i,n){return {handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return {handler:i(o),config:n(o)}}return t.__isOptionsFunction=true,t};var u=g;plugin=u;
12
+ return plugin;
13
+ }
14
+
15
+ exports.__require = requirePlugin;
@@ -0,0 +1,5 @@
1
+ function getDefaultExportFromCjs (x) {
2
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
+ }
4
+
5
+ export { getDefaultExportFromCjs };
@@ -0,0 +1,7 @@
1
+ import { getDefaultExportFromCjs } from './_commonjsHelpers.js';
2
+ import { __require as requireSrc } from '../node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/index.js';
3
+
4
+ var srcExports = requireSrc();
5
+ const tailwindScrollbar = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
6
+
7
+ export { tailwindScrollbar as default };
@@ -34,7 +34,7 @@ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /*
34
34
  {
35
35
  ref,
36
36
  className: cn(
37
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-input bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
37
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-input bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
38
38
  className
39
39
  ),
40
40
  ...props
@@ -20,17 +20,17 @@ function ErrorMessage({
20
20
  maxWidth: "md",
21
21
  padding: true,
22
22
  className: cn(
23
- "min-h-[200px] min-w-[320px] max-w-[600px]",
23
+ "min-w-[280px] md:min-w-[320px] max-w-[600px]",
24
24
  theme === "dark" && "bg-slate-900",
25
25
  theme === "light" && "bg-white"
26
26
  ),
27
- children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-wrap justify-center", children: [
27
+ children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-wrap justify-center gap-2", children: [
28
28
  /* @__PURE__ */ jsxs("div", { className: "w-full text-center text-xl font-medium text-muted-foreground", children: [
29
29
  /* @__PURE__ */ jsx(FormattedMessageTyped, { messageId: "components.errorMessage.oops" }),
30
- "😬"
30
+ " 😬"
31
31
  ] }),
32
- /* @__PURE__ */ jsx("div", { className: "flex w-full min-h-[100px] justify-center items-start pt-5 pr-8 pl-3 text-lg text-center text-foreground", children: /* @__PURE__ */ jsx(FormattedMessage, { id: err.message, defaultMessage: err.message }) }),
33
- /* @__PURE__ */ jsx(Button, { onClick, className: "w-1/2", children: btnTitle })
32
+ /* @__PURE__ */ jsx("div", { className: "flex w-full justify-center items-start px-2 text-lg text-center text-foreground", children: /* @__PURE__ */ jsx(FormattedMessage, { id: err.message, defaultMessage: err.message }) }),
33
+ /* @__PURE__ */ jsx(Button, { onClick, className: "w-1/2 mt-2", children: btnTitle })
34
34
  ] })
35
35
  }
36
36
  );
@@ -20,8 +20,8 @@ function GraphCurrentValue({
20
20
  className
21
21
  ),
22
22
  children: [
23
- /* @__PURE__ */ jsx("div", { className: "text-2xl font-semibold text-foreground whitespace-nowrap overflow-hidden text-ellipsis", children: yFormatted }),
24
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-muted-foreground whitespace-nowrap overflow-hidden text-ellipsis mt-0.5", children: xFormatted })
23
+ /* @__PURE__ */ jsx("div", { className: "text-xl sm:text-2xl font-semibold text-foreground whitespace-nowrap overflow-hidden text-ellipsis", children: yFormatted }),
24
+ /* @__PURE__ */ jsx("div", { className: "text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap overflow-hidden text-ellipsis mt-0.5", children: xFormatted })
25
25
  ]
26
26
  }
27
27
  );
@@ -71,8 +71,8 @@ function GraphTooltip({
71
71
  className
72
72
  ),
73
73
  style: positionStyles,
74
- children: /* @__PURE__ */ jsxs("div", { className: "bg-background/90 backdrop-blur-sm rounded border border-border p-2 space-y-1.5", children: [
75
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-muted-foreground mb-1 whitespace-nowrap", children: xFormatted }),
74
+ children: /* @__PURE__ */ jsxs("div", { className: "bg-background/90 backdrop-blur-sm rounded border border-border p-1.5 sm:p-2 space-y-1 sm:space-y-1.5", children: [
75
+ /* @__PURE__ */ jsx("div", { className: "text-xs sm:text-sm font-medium text-muted-foreground mb-0.5 sm:mb-1 whitespace-nowrap", children: xFormatted }),
76
76
  series.map((s, index) => {
77
77
  const pointData = points.get(s.label);
78
78
  if (!pointData) return null;
@@ -90,12 +90,12 @@ function GraphTooltip({
90
90
  return /* @__PURE__ */ jsxs(
91
91
  "div",
92
92
  {
93
- className: "flex items-center gap-2 text-sm whitespace-nowrap",
93
+ className: "flex items-center gap-1.5 sm:gap-2 text-xs sm:text-sm whitespace-nowrap",
94
94
  children: [
95
95
  /* @__PURE__ */ jsx(
96
96
  "div",
97
97
  {
98
- className: "w-2 h-2 rounded-full flex-shrink-0",
98
+ className: "w-1.5 h-1.5 sm:w-2 sm:h-2 rounded-full flex-shrink-0",
99
99
  style: { backgroundColor: lineColor }
100
100
  }
101
101
  ),