@luxfi/ui 7.1.0 → 7.2.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.
package/dist/alert.cjs CHANGED
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var classVarianceAuthority = require('class-variance-authority');
5
4
  var React2 = require('react');
6
5
  var clsx = require('clsx');
7
6
  var tailwindMerge = require('tailwind-merge');
@@ -282,52 +281,22 @@ React2__namespace.forwardRef(
282
281
  }
283
282
  );
284
283
  var IndicatorIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-11.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 10a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0v-3z" }) });
285
- var alertRoot = classVarianceAuthority.cva(
286
- // base
287
- "w-full flex items-start relative rounded text-[var(--color-alert-fg)]",
288
- {
289
- variants: {
290
- status: {
291
- info: "bg-[var(--color-alert-bg-info)]",
292
- warning: "bg-[var(--color-alert-bg-warning)]",
293
- warning_table: "bg-[var(--color-alert-bg-warning-table)]",
294
- success: "bg-[var(--color-alert-bg-success)]",
295
- error: "bg-[var(--color-alert-bg-error)]"
296
- },
297
- size: {
298
- sm: "gap-2 px-2 py-2 text-xs",
299
- md: "gap-2 px-3 py-2 text-base"
300
- }
301
- },
302
- defaultVariants: {
303
- status: "info",
304
- size: "md"
305
- }
306
- }
307
- );
308
- var alertContent = classVarianceAuthority.cva("flex flex-1", {
309
- variants: {
310
- inline: {
311
- "true": "inline-flex flex-row items-center",
312
- "false": "flex flex-col"
313
- }
314
- },
315
- defaultVariants: {
316
- inline: true
317
- }
318
- });
319
- var INDICATOR_BASE = "inline-flex items-center justify-center shrink-0 w-5 h-5 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full";
320
- var indicatorVariants = classVarianceAuthority.cva(INDICATOR_BASE, {
321
- variants: {
322
- size: {
323
- sm: "w-5 h-5 my-0",
324
- md: "w-5 h-5 my-[2px]"
325
- }
326
- },
327
- defaultVariants: {
328
- size: "md"
329
- }
330
- });
284
+ var ALERT_BASE = "w-full flex items-start relative rounded text-[var(--color-alert-fg)]";
285
+ var STATUS_CLASSES = {
286
+ info: "bg-[var(--color-alert-bg-info)]",
287
+ warning: "bg-[var(--color-alert-bg-warning)]",
288
+ warning_table: "bg-[var(--color-alert-bg-warning-table)]",
289
+ success: "bg-[var(--color-alert-bg-success)]",
290
+ error: "bg-[var(--color-alert-bg-error)]"
291
+ };
292
+ var SIZE_CLASSES = {
293
+ sm: "gap-2 px-2 py-2 text-xs",
294
+ md: "gap-2 px-3 py-2 text-base"
295
+ };
296
+ var INDICATOR_SIZE_CLASSES = {
297
+ sm: "w-5 h-5 my-0",
298
+ md: "w-5 h-5 my-[2px]"
299
+ };
331
300
  var Alert = React2__namespace.forwardRef(
332
301
  function Alert2(props, ref) {
333
302
  const {
@@ -363,7 +332,10 @@ var Alert = React2__namespace.forwardRef(
363
332
  if (!showIcon && icon === void 0) {
364
333
  return null;
365
334
  }
366
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: indicatorVariants({ size: resolvedSize }), children: icon || defaultIcon });
335
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
336
+ "inline-flex items-center justify-center shrink-0 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full",
337
+ INDICATOR_SIZE_CLASSES[resolvedSize]
338
+ ), children: icon || defaultIcon });
367
339
  })();
368
340
  const handleClose = React2__namespace.useCallback(() => {
369
341
  setIsOpen(false);
@@ -396,12 +368,12 @@ var Alert = React2__namespace.forwardRef(
396
368
  "div",
397
369
  {
398
370
  ref,
399
- className: cn(alertRoot({ status, size: resolvedSize }), className),
371
+ className: cn(ALERT_BASE, STATUS_CLASSES[status], SIZE_CLASSES[resolvedSize], className),
400
372
  style: alertStyle,
401
373
  ...alertRest,
402
374
  children: [
403
375
  iconElement,
404
- children ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: alertContent({ inline }), children: [
376
+ children ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-1", inline ? "inline-flex flex-row items-center" : "flex flex-col"), children: [
405
377
  title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold", children: title }),
406
378
  /* @__PURE__ */ jsxRuntime.jsx(
407
379
  "div",
package/dist/alert.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import { cva } from 'class-variance-authority';
3
2
  import * as React2 from 'react';
4
3
  import { clsx } from 'clsx';
5
4
  import { twMerge } from 'tailwind-merge';
@@ -260,52 +259,22 @@ React2.forwardRef(
260
259
  }
261
260
  );
262
261
  var IndicatorIcon = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-11.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 10a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0v-3z" }) });
263
- var alertRoot = cva(
264
- // base
265
- "w-full flex items-start relative rounded text-[var(--color-alert-fg)]",
266
- {
267
- variants: {
268
- status: {
269
- info: "bg-[var(--color-alert-bg-info)]",
270
- warning: "bg-[var(--color-alert-bg-warning)]",
271
- warning_table: "bg-[var(--color-alert-bg-warning-table)]",
272
- success: "bg-[var(--color-alert-bg-success)]",
273
- error: "bg-[var(--color-alert-bg-error)]"
274
- },
275
- size: {
276
- sm: "gap-2 px-2 py-2 text-xs",
277
- md: "gap-2 px-3 py-2 text-base"
278
- }
279
- },
280
- defaultVariants: {
281
- status: "info",
282
- size: "md"
283
- }
284
- }
285
- );
286
- var alertContent = cva("flex flex-1", {
287
- variants: {
288
- inline: {
289
- "true": "inline-flex flex-row items-center",
290
- "false": "flex flex-col"
291
- }
292
- },
293
- defaultVariants: {
294
- inline: true
295
- }
296
- });
297
- var INDICATOR_BASE = "inline-flex items-center justify-center shrink-0 w-5 h-5 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full";
298
- var indicatorVariants = cva(INDICATOR_BASE, {
299
- variants: {
300
- size: {
301
- sm: "w-5 h-5 my-0",
302
- md: "w-5 h-5 my-[2px]"
303
- }
304
- },
305
- defaultVariants: {
306
- size: "md"
307
- }
308
- });
262
+ var ALERT_BASE = "w-full flex items-start relative rounded text-[var(--color-alert-fg)]";
263
+ var STATUS_CLASSES = {
264
+ info: "bg-[var(--color-alert-bg-info)]",
265
+ warning: "bg-[var(--color-alert-bg-warning)]",
266
+ warning_table: "bg-[var(--color-alert-bg-warning-table)]",
267
+ success: "bg-[var(--color-alert-bg-success)]",
268
+ error: "bg-[var(--color-alert-bg-error)]"
269
+ };
270
+ var SIZE_CLASSES = {
271
+ sm: "gap-2 px-2 py-2 text-xs",
272
+ md: "gap-2 px-3 py-2 text-base"
273
+ };
274
+ var INDICATOR_SIZE_CLASSES = {
275
+ sm: "w-5 h-5 my-0",
276
+ md: "w-5 h-5 my-[2px]"
277
+ };
309
278
  var Alert = React2.forwardRef(
310
279
  function Alert2(props, ref) {
311
280
  const {
@@ -341,7 +310,10 @@ var Alert = React2.forwardRef(
341
310
  if (!showIcon && icon === void 0) {
342
311
  return null;
343
312
  }
344
- return /* @__PURE__ */ jsx("span", { className: indicatorVariants({ size: resolvedSize }), children: icon || defaultIcon });
313
+ return /* @__PURE__ */ jsx("span", { className: cn(
314
+ "inline-flex items-center justify-center shrink-0 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full",
315
+ INDICATOR_SIZE_CLASSES[resolvedSize]
316
+ ), children: icon || defaultIcon });
345
317
  })();
346
318
  const handleClose = React2.useCallback(() => {
347
319
  setIsOpen(false);
@@ -374,12 +346,12 @@ var Alert = React2.forwardRef(
374
346
  "div",
375
347
  {
376
348
  ref,
377
- className: cn(alertRoot({ status, size: resolvedSize }), className),
349
+ className: cn(ALERT_BASE, STATUS_CLASSES[status], SIZE_CLASSES[resolvedSize], className),
378
350
  style: alertStyle,
379
351
  ...alertRest,
380
352
  children: [
381
353
  iconElement,
382
- children ? /* @__PURE__ */ jsxs("div", { className: alertContent({ inline }), children: [
354
+ children ? /* @__PURE__ */ jsxs("div", { className: cn("flex flex-1", inline ? "inline-flex flex-row items-center" : "flex flex-col"), children: [
383
355
  title && /* @__PURE__ */ jsx("div", { className: "font-semibold", children: title }),
384
356
  /* @__PURE__ */ jsx(
385
357
  "div",
package/dist/bank.d.cts CHANGED
@@ -46,7 +46,7 @@ declare const BankButtonText: _hanzogui_core.GuiComponent<_hanzogui_core.TamaDef
46
46
  }, _hanzogui_core.StaticConfigPublic>;
47
47
  type BankButtonProps = GetProps<typeof BankButton>;
48
48
  declare const BankHeading: _hanzogui_core.GuiComponent<_hanzogui_core.TamaDefer, _hanzogui_core.GuiTextElement, _hanzogui_core.RNGuiTextNonStyleProps, _hanzogui_core.TextStylePropsBase, {
49
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
49
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
50
50
  }, _hanzogui_core.StaticConfigPublic>;
51
51
  type BankHeadingProps = GetProps<typeof BankHeading>;
52
52
  declare const BankText: _hanzogui_core.GuiComponent<_hanzogui_core.TamaDefer, _hanzogui_core.GuiTextElement, _hanzogui_core.RNGuiTextNonStyleProps, _hanzogui_core.TextStylePropsBase, {
package/dist/bank.d.ts CHANGED
@@ -46,7 +46,7 @@ declare const BankButtonText: _hanzogui_core.GuiComponent<_hanzogui_core.TamaDef
46
46
  }, _hanzogui_core.StaticConfigPublic>;
47
47
  type BankButtonProps = GetProps<typeof BankButton>;
48
48
  declare const BankHeading: _hanzogui_core.GuiComponent<_hanzogui_core.TamaDefer, _hanzogui_core.GuiTextElement, _hanzogui_core.RNGuiTextNonStyleProps, _hanzogui_core.TextStylePropsBase, {
49
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
49
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
50
50
  }, _hanzogui_core.StaticConfigPublic>;
51
51
  type BankHeadingProps = GetProps<typeof BankHeading>;
52
52
  declare const BankText: _hanzogui_core.GuiComponent<_hanzogui_core.TamaDefer, _hanzogui_core.GuiTextElement, _hanzogui_core.RNGuiTextNonStyleProps, _hanzogui_core.TextStylePropsBase, {