@rotki/ui-library 2.17.0 → 2.17.2

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.
@@ -7,6 +7,7 @@ export declare const ButtonVariant: {
7
7
  };
8
8
  export type ButtonVariant = (typeof ButtonVariant)[keyof typeof ButtonVariant];
9
9
  export declare const ButtonSize: {
10
+ readonly xs: "xs";
10
11
  readonly sm: "sm";
11
12
  readonly lg: "lg";
12
13
  readonly xl: "xl";
@@ -7,6 +7,7 @@ var ButtonVariant = {
7
7
  list: "list"
8
8
  };
9
9
  var SPINNER_SIZES = {
10
+ xs: 12,
10
11
  sm: 18,
11
12
  lg: 26,
12
13
  xl: 28
@@ -1 +1 @@
1
- {"version":3,"file":"button-props.js","names":[],"sources":["../../../../src/components/buttons/button/button-props.ts"],"sourcesContent":["export const ButtonVariant = {\n default: 'default',\n outlined: 'outlined',\n text: 'text',\n fab: 'fab',\n list: 'list',\n} as const;\n\nexport type ButtonVariant = (typeof ButtonVariant)[keyof typeof ButtonVariant];\n\nexport const ButtonSize = {\n sm: 'sm',\n lg: 'lg',\n xl: 'xl',\n} as const;\n\nexport type ButtonSize = (typeof ButtonSize)[keyof typeof ButtonSize];\n\nconst SPINNER_SIZES: Record<string, number> = { sm: 18, lg: 26, xl: 28 };\nconst DEFAULT_SPINNER_SIZE = 22;\n\nexport const FAB_DEFAULT_ELEVATION = 6;\n\nexport const NO_ELEVATION = 0;\n\nexport function getButtonSpinnerSize(size?: ButtonSize): number {\n return (size && SPINNER_SIZES[size]) || DEFAULT_SPINNER_SIZE;\n}\n"],"mappings":";AAAA,IAAa,gBAAgB;CAC3B,SAAS;CACT,UAAU;CACV,MAAM;CACN,KAAK;CACL,MAAM;CACP;AAYD,IAAM,gBAAwC;CAAE,IAAI;CAAI,IAAI;CAAI,IAAI;CAAI;AACxE,IAAM,uBAAuB;AAM7B,SAAgB,qBAAqB,MAA2B;AAC9D,QAAQ,QAAQ,cAAc,SAAU"}
1
+ {"version":3,"file":"button-props.js","names":[],"sources":["../../../../src/components/buttons/button/button-props.ts"],"sourcesContent":["export const ButtonVariant = {\n default: 'default',\n outlined: 'outlined',\n text: 'text',\n fab: 'fab',\n list: 'list',\n} as const;\n\nexport type ButtonVariant = (typeof ButtonVariant)[keyof typeof ButtonVariant];\n\nexport const ButtonSize = {\n xs: 'xs',\n sm: 'sm',\n lg: 'lg',\n xl: 'xl',\n} as const;\n\nexport type ButtonSize = (typeof ButtonSize)[keyof typeof ButtonSize];\n\nconst SPINNER_SIZES: Record<string, number> = { xs: 12, sm: 18, lg: 26, xl: 28 };\nconst DEFAULT_SPINNER_SIZE = 22;\n\nexport const FAB_DEFAULT_ELEVATION = 6;\n\nexport const NO_ELEVATION = 0;\n\nexport function getButtonSpinnerSize(size?: ButtonSize): number {\n return (size && SPINNER_SIZES[size]) || DEFAULT_SPINNER_SIZE;\n}\n"],"mappings":";AAAA,IAAa,gBAAgB;CAC3B,SAAS;CACT,UAAU;CACV,MAAM;CACN,KAAK;CACL,MAAM;CACP;AAaD,IAAM,gBAAwC;CAAE,IAAI;CAAI,IAAI;CAAI,IAAI;CAAI,IAAI;CAAI;AAChF,IAAM,uBAAuB;AAM7B,SAAgB,qBAAqB,MAA2B;AAC9D,QAAQ,QAAQ,cAAc,SAAU"}
@@ -14,6 +14,9 @@ export declare const buttonStyles: import("tailwind-variants").TVReturnType<{
14
14
  };
15
15
  };
16
16
  size: {
17
+ xs: {
18
+ root: string;
19
+ };
17
20
  sm: {
18
21
  root: string;
19
22
  };
@@ -92,6 +95,9 @@ export declare const buttonStyles: import("tailwind-variants").TVReturnType<{
92
95
  };
93
96
  };
94
97
  size: {
98
+ xs: {
99
+ root: string;
100
+ };
95
101
  sm: {
96
102
  root: string;
97
103
  };
@@ -170,6 +176,9 @@ export declare const buttonStyles: import("tailwind-variants").TVReturnType<{
170
176
  };
171
177
  };
172
178
  size: {
179
+ xs: {
180
+ root: string;
181
+ };
173
182
  sm: {
174
183
  root: string;
175
184
  };
@@ -6,7 +6,7 @@ var buttonStyles = tv({
6
6
  "text-sm leading-5 font-medium outline outline-1 outline-transparent outline-offset-[-1px]",
7
7
  "flex items-center justify-center gap-x-2",
8
8
  "px-4 py-1.5 rounded transition-all",
9
- "[&_.rui-icon]:w-[1.125rem] [&_.rui-icon]:h-[1.125rem]",
9
+ "[--rui-icon-size:1.125rem]",
10
10
  "disabled:cursor-not-allowed",
11
11
  "focus-visible:!ring-2"
12
12
  ].join(" "),
@@ -25,9 +25,10 @@ var buttonStyles = tv({
25
25
  }
26
26
  },
27
27
  size: {
28
- sm: { root: "px-2.5 py-1 text-[.8125rem] leading-5 [&_.rui-icon]:!w-4 [&_.rui-icon]:!h-4" },
29
- lg: { root: "px-6 py-2 text-[1rem] leading-5 [&_.rui-icon]:!w-5 [&_.rui-icon]:!h-5" },
30
- xl: { root: "px-6 py-2.5 text-[1rem] leading-6 [&_.rui-icon]:!w-[1.375rem] [&_.rui-icon]:!h-[1.375rem]" }
28
+ xs: { root: "px-2 py-[0.125rem] text-[.75rem] leading-4 ![--rui-icon-size:0.75rem]" },
29
+ sm: { root: "px-2.5 py-1 text-[.8125rem] leading-5 ![--rui-icon-size:1rem]" },
30
+ lg: { root: "px-6 py-2 text-[1rem] leading-5 ![--rui-icon-size:1.25rem]" },
31
+ xl: { root: "px-6 py-2.5 text-[1rem] leading-6 ![--rui-icon-size:1.375rem]" }
31
32
  },
32
33
  color: {
33
34
  grey: { root: "bg-rui-grey-200 hover:bg-rui-grey-100 active:bg-rui-grey-50 text-rui-text ring-rui-grey-400 dark:bg-rui-grey-300 dark:text-rui-light-text dark:ring-rui-grey-600" },
@@ -39,7 +40,7 @@ var buttonStyles = tv({
39
40
  success: { root: "bg-rui-success hover:bg-rui-success-darker active:bg-rui-success-darker/90 text-rui-dark-text ring-rui-success/40 dark:text-rui-text dark:ring-rui-success/60" }
40
41
  },
41
42
  rounded: { true: { root: "rounded-full" } },
42
- icon: { true: { root: "rounded-full px-3 py-3" } },
43
+ icon: { true: { root: "rounded-full" } },
43
44
  active: {
44
45
  true: {},
45
46
  false: {}
@@ -278,6 +279,11 @@ var buttonStyles = tv({
278
279
  variant: "outlined",
279
280
  class: { root: "outline-rui-success/[0.5]" }
280
281
  },
282
+ {
283
+ variant: "text",
284
+ size: "xs",
285
+ class: { root: "px-1" }
286
+ },
281
287
  {
282
288
  variant: "text",
283
289
  size: "sm",
@@ -288,6 +294,11 @@ var buttonStyles = tv({
288
294
  size: "lg",
289
295
  class: { root: "px-2.5" }
290
296
  },
297
+ {
298
+ variant: "fab",
299
+ size: "xs",
300
+ class: { root: "py-1 px-1" }
301
+ },
291
302
  {
292
303
  variant: "fab",
293
304
  size: "sm",
@@ -298,20 +309,39 @@ var buttonStyles = tv({
298
309
  size: "lg",
299
310
  class: { root: "py-3" }
300
311
  },
312
+ {
313
+ variant: "list",
314
+ size: "xs",
315
+ class: { root: "px-3 py-0.5" }
316
+ },
301
317
  {
302
318
  variant: "list",
303
319
  size: "sm",
304
320
  class: { root: "px-3 py-1" }
305
321
  },
322
+ {
323
+ icon: true,
324
+ class: { root: "p-1.5 ![--rui-icon-size:1.25rem]" }
325
+ },
326
+ {
327
+ icon: true,
328
+ size: "xs",
329
+ class: { root: "p-[0.1875rem] ![--rui-icon-size:0.875rem]" }
330
+ },
306
331
  {
307
332
  icon: true,
308
333
  size: "sm",
309
- class: { root: "px-1 py-1" }
334
+ class: { root: "p-1 ![--rui-icon-size:1.25rem]" }
310
335
  },
311
336
  {
312
337
  icon: true,
313
338
  size: "lg",
314
- class: { root: "px-4 py-4" }
339
+ class: { root: "p-1.5 ![--rui-icon-size:1.5rem]" }
340
+ },
341
+ {
342
+ icon: true,
343
+ size: "xl",
344
+ class: { root: "p-2 ![--rui-icon-size:1.75rem]" }
315
345
  },
316
346
  {
317
347
  variant: "fab",
@@ -1 +1 @@
1
- {"version":3,"file":"button-styles.js","names":[],"sources":["../../../../src/components/buttons/button/button-styles.ts"],"sourcesContent":["import { tv } from '@/utils/tv';\n\nexport const buttonStyles = tv({\n slots: {\n root: [\n 'text-sm leading-5 font-medium outline outline-1 outline-transparent outline-offset-[-1px]',\n // `position: relative` is only needed as a positioning context for the\n // absolute-positioned loading spinner; applied via the `loading` variant\n // below. Putting it here would collide with consumers that need to pin\n // the button with `fixed`/`absolute` (cascade order picks the later\n // utility — usually `relative` — and the consumer's `right-*`/`bottom-*`\n // end up as relative offsets, which misplaces FABs).\n 'flex items-center justify-center gap-x-2',\n 'px-4 py-1.5 rounded transition-all',\n // Default (md) icon sizing for RuiIcons in button slots (prepend/append\n // /default). Size variants below override this via `!` so the rule\n // specificity wins regardless of CSS source order.\n '[&_.rui-icon]:w-[1.125rem] [&_.rui-icon]:h-[1.125rem]',\n // `disabled` on the element covers two states: actually disabled and\n // loading (RuiButton sets `disabled = disabled || loading`). The\n // color/bg/text overrides for the \"grey disabled\" look live in the\n // `loading: false` compounds below so they skip firing on loading\n // buttons — where we want the variant color to stay visible behind\n // the spinner. Cursor stays here since both states are non-clickable.\n 'disabled:cursor-not-allowed',\n 'focus-visible:!ring-2',\n ].join(' '),\n label: 'inline-block text-nowrap',\n spinner: 'absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2',\n },\n variants: {\n variant: {\n default: {},\n outlined: {},\n text: { root: 'px-2' },\n fab: { root: 'rounded-full py-2' },\n list: { root: 'p-3 px-3 rounded-none w-full justify-start text-left', label: 'w-full' },\n },\n size: {\n // Each size variant sets a matching descendant rule so RuiIcons in\n // button slots (prepend/append/default) inherit a size proportional to\n // the button's height. The `.rui-icon` class sits on the icon's <svg>\n // and its `w-6 h-6` default (set by RuiIcon when no size prop is\n // passed) is overridden here because the descendant selector is more\n // specific. `!` guarantees size variants beat the md default baked\n // into the base root regardless of CSS source order. Consumers can\n // still force a specific icon size by passing the `size` prop on\n // RuiIcon — that path stamps inline width/height which beats classes.\n sm: { root: 'px-2.5 py-1 text-[.8125rem] leading-5 [&_.rui-icon]:!w-4 [&_.rui-icon]:!h-4' },\n lg: { root: 'px-6 py-2 text-[1rem] leading-5 [&_.rui-icon]:!w-5 [&_.rui-icon]:!h-5' },\n xl: { root: 'px-6 py-2.5 text-[1rem] leading-6 [&_.rui-icon]:!w-[1.375rem] [&_.rui-icon]:!h-[1.375rem]' },\n },\n color: {\n grey: { root: 'bg-rui-grey-200 hover:bg-rui-grey-100 active:bg-rui-grey-50 text-rui-text ring-rui-grey-400 dark:bg-rui-grey-300 dark:text-rui-light-text dark:ring-rui-grey-600' },\n primary: { root: 'bg-rui-primary hover:bg-rui-primary-darker active:bg-rui-primary-darker/90 text-rui-dark-text ring-rui-primary/40 dark:text-rui-text dark:ring-rui-primary/60' },\n secondary: { root: 'bg-rui-secondary hover:bg-rui-secondary-darker active:bg-rui-secondary-darker/90 text-rui-dark-text ring-rui-secondary/40 dark:text-rui-text dark:ring-rui-secondary/60' },\n error: { root: 'bg-rui-error hover:bg-rui-error-darker active:bg-rui-error-darker/90 text-rui-dark-text ring-rui-error/40 dark:text-rui-text dark:ring-rui-error/60' },\n warning: { root: 'bg-rui-warning hover:bg-rui-warning-darker active:bg-rui-warning-darker/90 text-rui-dark-text ring-rui-warning/40 dark:text-rui-text dark:ring-rui-warning/60' },\n info: { root: 'bg-rui-info hover:bg-rui-info-darker active:bg-rui-info-darker/90 text-rui-dark-text ring-rui-info/40 dark:text-rui-text dark:ring-rui-info/60' },\n success: { root: 'bg-rui-success hover:bg-rui-success-darker active:bg-rui-success-darker/90 text-rui-dark-text ring-rui-success/40 dark:text-rui-text dark:ring-rui-success/60' },\n },\n rounded: {\n true: { root: 'rounded-full' },\n },\n icon: {\n true: { root: 'rounded-full px-3 py-3' },\n },\n active: {\n true: {},\n false: {},\n },\n loading: {\n true: { root: 'relative !cursor-progress space-x-0 [&>*:not([data-spinner])]:opacity-0 [&>*:not([data-spinner])]:invisible' },\n false: {},\n },\n hideFocusIndicator: {\n true: { root: 'focus-visible:!ring-0' },\n },\n },\n compoundVariants: [\n // === Disabled (not loading) appearance ===\n // Applied only when `loading: false` so that loading buttons keep their\n // variant color/outline visible behind the spinner; pure disabled buttons\n // fade to the Material disabled palette.\n { loading: false, class: { root: 'disabled:!bg-black/[.12] dark:disabled:!bg-white/[.12] disabled:!text-rui-text-disabled disabled:active:!text-rui-text-disabled' } },\n { loading: false, variant: 'outlined', class: { root: 'disabled:!bg-transparent dark:disabled:!bg-transparent disabled:active:!bg-transparent disabled:outline-rui-text-disabled' } },\n { loading: false, variant: 'text', class: { root: 'disabled:!bg-transparent dark:disabled:!bg-transparent disabled:active:!bg-transparent' } },\n { loading: false, variant: 'list', class: { root: 'disabled:!bg-transparent dark:disabled:!bg-transparent disabled:active:!bg-transparent' } },\n\n // === Grey color variants ===\n { color: 'grey', active: true, class: { root: 'bg-rui-grey-50' } },\n { color: 'grey', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-black/[.04] active:bg-black/10 dark:bg-transparent dark:active:bg-white/10 dark:hover:bg-white/[.04] dark:text-rui-text' } },\n { color: 'grey', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-black/10 dark:bg-white/30' } },\n { color: 'grey', variant: 'outlined', class: { root: 'outline-rui-text' } },\n { color: 'grey', variant: 'text', class: { root: 'text-rui-text-secondary' } },\n\n // === Context colors — outlined/text variants ===\n // `dark:text-rui-<color>` is required to beat `dark:text-rui-text` set by\n // the base color variant (meant for filled buttons where text sits on a\n // colored bg). Without the override, outlined/text/list buttons in dark\n // mode render white text against a themed outline/underline.\n { color: 'primary', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-primary-lighter/[.04] active:bg-rui-primary-lighter/10 text-rui-primary dark:text-rui-primary' } },\n { color: 'secondary', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-secondary-lighter/[.04] active:bg-rui-secondary-lighter/10 text-rui-secondary dark:text-rui-secondary' } },\n { color: 'error', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-error-lighter/[.04] active:bg-rui-error-lighter/10 text-rui-error dark:text-rui-error' } },\n { color: 'warning', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-warning-lighter/[.04] active:bg-rui-warning-lighter/10 text-rui-warning dark:text-rui-warning' } },\n { color: 'info', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-info-lighter/[.04] active:bg-rui-info-lighter/10 text-rui-info dark:text-rui-info' } },\n { color: 'success', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-success-lighter/[.04] active:bg-rui-success-lighter/10 text-rui-success dark:text-rui-success' } },\n\n // === Context colors — active default ===\n { color: 'primary', active: true, class: { root: 'bg-rui-primary-darker' } },\n { color: 'secondary', active: true, class: { root: 'bg-rui-secondary-darker' } },\n { color: 'error', active: true, class: { root: 'bg-rui-error-darker' } },\n { color: 'warning', active: true, class: { root: 'bg-rui-warning-darker' } },\n { color: 'info', active: true, class: { root: 'bg-rui-info-darker' } },\n { color: 'success', active: true, class: { root: 'bg-rui-success-darker' } },\n\n // === Context colors — active outlined/text ===\n { color: 'primary', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-primary-lighter/30' } },\n { color: 'secondary', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-secondary-lighter/30' } },\n { color: 'error', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-error-lighter/30' } },\n { color: 'warning', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-warning-lighter/30' } },\n { color: 'info', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-info-lighter/30' } },\n { color: 'success', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-success-lighter/30' } },\n\n // === Context colors — outlined border ===\n { color: 'primary', variant: 'outlined', class: { root: 'outline-rui-primary/[0.5]' } },\n { color: 'secondary', variant: 'outlined', class: { root: 'outline-rui-secondary/[0.5]' } },\n { color: 'error', variant: 'outlined', class: { root: 'outline-rui-error/[0.5]' } },\n { color: 'warning', variant: 'outlined', class: { root: 'outline-rui-warning/[0.5]' } },\n { color: 'info', variant: 'outlined', class: { root: 'outline-rui-info/[0.5]' } },\n { color: 'success', variant: 'outlined', class: { root: 'outline-rui-success/[0.5]' } },\n\n // === Size overrides per variant ===\n { variant: 'text', size: 'sm', class: { root: 'px-1.5' } },\n { variant: 'text', size: 'lg', class: { root: 'px-2.5' } },\n { variant: 'fab', size: 'sm', class: { root: 'py-1.5 px-2' } },\n { variant: 'fab', size: 'lg', class: { root: 'py-3' } },\n { variant: 'list', size: 'sm', class: { root: 'px-3 py-1' } },\n { icon: true, size: 'sm', class: { root: 'px-1 py-1' } },\n { icon: true, size: 'lg', class: { root: 'px-4 py-4' } },\n { variant: 'fab', icon: true, size: 'sm', class: { root: 'px-2 py-2' } },\n ],\n compoundSlots: [\n // Dark mode default variant text override for warning/success/info\n { slots: ['root'], color: ['warning', 'success', 'info'], variant: 'default', class: 'dark:text-rui-light-text' },\n // Dark mode active outlined/text override for primary/secondary\n { slots: ['root'], color: 'primary', variant: ['outlined', 'text', 'list'], active: true, class: 'dark:bg-rui-primary-darker/60 dark:text-rui-primary-lighter' },\n { slots: ['root'], color: 'secondary', variant: ['outlined', 'text', 'list'], active: true, class: 'dark:bg-rui-secondary-darker/60 dark:text-rui-secondary-lighter' },\n ],\n defaultVariants: {\n variant: 'default',\n color: 'grey',\n active: false,\n },\n});\n"],"mappings":";;AAEA,IAAa,eAAe,GAAG;CAC7B,OAAO;EACL,MAAM;GACJ;GAOA;GACA;GAIA;GAOA;GACA;GACD,CAAC,KAAK,IAAI;EACX,OAAO;EACP,SAAS;EACV;CACD,UAAU;EACR,SAAS;GACP,SAAS,EAAE;GACX,UAAU,EAAE;GACZ,MAAM,EAAE,MAAM,QAAQ;GACtB,KAAK,EAAE,MAAM,qBAAqB;GAClC,MAAM;IAAE,MAAM;IAAwD,OAAO;IAAU;GACxF;EACD,MAAM;GAUJ,IAAI,EAAE,MAAM,+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7D;GAAE,MAAM;GAAM,MAAM;GAAM,OAAO,EAAE,MAAM,aAAa;GAAE;EACxD;GAAE,MAAM;GAAM,MAAM;GAAM,OAAO,EAAE,MAAM,aAAa;GAAE;EACxD;GAAE,SAAS;GAAO,MAAM;GAAM,MAAM;GAAM,OAAO,EAAE,MAAM,aAAa;GAAE;EACzE;CACD,eAAe;EAEb;GAAE,OAAO,CAAC,OAAO;GAAE,OAAO;IAAC;IAAW;IAAW;IAAO;GAAE,SAAS;GAAW,OAAO;GAA4B;EAEjH;GAAE,OAAO,CAAC,OAAO;GAAE,OAAO;GAAW,SAAS;IAAC;IAAY;IAAQ;IAAO;GAAE,QAAQ;GAAM,OAAO;GAA+D;EAChK;GAAE,OAAO,CAAC,OAAO;GAAE,OAAO;GAAa,SAAS;IAAC;IAAY;IAAQ;IAAO;GAAE,QAAQ;GAAM,OAAO;GAAmE;EACvK;CACD,iBAAiB;EACf,SAAS;EACT,OAAO;EACP,QAAQ;EACT;CACF,CAAC"}
1
+ {"version":3,"file":"button-styles.js","names":[],"sources":["../../../../src/components/buttons/button/button-styles.ts"],"sourcesContent":["import { tv } from '@/utils/tv';\n\nexport const buttonStyles = tv({\n slots: {\n root: [\n 'text-sm leading-5 font-medium outline outline-1 outline-transparent outline-offset-[-1px]',\n // `position: relative` is only needed as a positioning context for the\n // absolute-positioned loading spinner; applied via the `loading` variant\n // below. Putting it here would collide with consumers that need to pin\n // the button with `fixed`/`absolute` (cascade order picks the later\n // utility — usually `relative` — and the consumer's `right-*`/`bottom-*`\n // end up as relative offsets, which misplaces FABs).\n 'flex items-center justify-center gap-x-2',\n 'px-4 py-1.5 rounded transition-all',\n // Default (md) icon sizing is driven by a CSS custom property so that\n // RuiIcon's `size` prop (stamped as inline `style=\"--rui-icon-size\"` on\n // the svg) can override it cleanly. Size variants below redefine the\n // property with `!` so they beat this baseline on the same element;\n // inline style on the svg then beats the inherited value when a\n // consumer supplies their own size. See rotki/ui-library#512.\n '[--rui-icon-size:1.125rem]',\n // `disabled` on the element covers two states: actually disabled and\n // loading (RuiButton sets `disabled = disabled || loading`). The\n // color/bg/text overrides for the \"grey disabled\" look live in the\n // `loading: false` compounds below so they skip firing on loading\n // buttons — where we want the variant color to stay visible behind\n // the spinner. Cursor stays here since both states are non-clickable.\n 'disabled:cursor-not-allowed',\n 'focus-visible:!ring-2',\n ].join(' '),\n label: 'inline-block text-nowrap',\n spinner: 'absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2',\n },\n variants: {\n variant: {\n default: {},\n outlined: {},\n text: { root: 'px-2' },\n fab: { root: 'rounded-full py-2' },\n list: { root: 'p-3 px-3 rounded-none w-full justify-start text-left', label: 'w-full' },\n },\n size: {\n // Each size variant redefines `--rui-icon-size` on the button so the\n // value inherits into RuiIcons in button slots (prepend/append/default)\n // and drives their `width: var(--rui-icon-size, 1.5rem)` class. `!` on\n // the arbitrary property makes the variant beat the md baseline in the\n // base root regardless of CSS source order. A consumer passing `size`\n // on RuiIcon still wins: that path stamps an inline style on the svg\n // element itself, which beats the inherited value from the button.\n xs: { root: 'px-2 py-[0.125rem] text-[.75rem] leading-4 ![--rui-icon-size:0.75rem]' },\n sm: { root: 'px-2.5 py-1 text-[.8125rem] leading-5 ![--rui-icon-size:1rem]' },\n lg: { root: 'px-6 py-2 text-[1rem] leading-5 ![--rui-icon-size:1.25rem]' },\n xl: { root: 'px-6 py-2.5 text-[1rem] leading-6 ![--rui-icon-size:1.375rem]' },\n },\n color: {\n grey: { root: 'bg-rui-grey-200 hover:bg-rui-grey-100 active:bg-rui-grey-50 text-rui-text ring-rui-grey-400 dark:bg-rui-grey-300 dark:text-rui-light-text dark:ring-rui-grey-600' },\n primary: { root: 'bg-rui-primary hover:bg-rui-primary-darker active:bg-rui-primary-darker/90 text-rui-dark-text ring-rui-primary/40 dark:text-rui-text dark:ring-rui-primary/60' },\n secondary: { root: 'bg-rui-secondary hover:bg-rui-secondary-darker active:bg-rui-secondary-darker/90 text-rui-dark-text ring-rui-secondary/40 dark:text-rui-text dark:ring-rui-secondary/60' },\n error: { root: 'bg-rui-error hover:bg-rui-error-darker active:bg-rui-error-darker/90 text-rui-dark-text ring-rui-error/40 dark:text-rui-text dark:ring-rui-error/60' },\n warning: { root: 'bg-rui-warning hover:bg-rui-warning-darker active:bg-rui-warning-darker/90 text-rui-dark-text ring-rui-warning/40 dark:text-rui-text dark:ring-rui-warning/60' },\n info: { root: 'bg-rui-info hover:bg-rui-info-darker active:bg-rui-info-darker/90 text-rui-dark-text ring-rui-info/40 dark:text-rui-text dark:ring-rui-info/60' },\n success: { root: 'bg-rui-success hover:bg-rui-success-darker active:bg-rui-success-darker/90 text-rui-dark-text ring-rui-success/40 dark:text-rui-text dark:ring-rui-success/60' },\n },\n rounded: {\n true: { root: 'rounded-full' },\n },\n icon: {\n // Padding and icon sizing live in the `icon + size` compound variants\n // below so every size resolves to a height matching its text-button\n // counterpart; this base only contributes the round shape.\n true: { root: 'rounded-full' },\n },\n active: {\n true: {},\n false: {},\n },\n loading: {\n true: { root: 'relative !cursor-progress space-x-0 [&>*:not([data-spinner])]:opacity-0 [&>*:not([data-spinner])]:invisible' },\n false: {},\n },\n hideFocusIndicator: {\n true: { root: 'focus-visible:!ring-0' },\n },\n },\n compoundVariants: [\n // === Disabled (not loading) appearance ===\n // Applied only when `loading: false` so that loading buttons keep their\n // variant color/outline visible behind the spinner; pure disabled buttons\n // fade to the Material disabled palette.\n { loading: false, class: { root: 'disabled:!bg-black/[.12] dark:disabled:!bg-white/[.12] disabled:!text-rui-text-disabled disabled:active:!text-rui-text-disabled' } },\n { loading: false, variant: 'outlined', class: { root: 'disabled:!bg-transparent dark:disabled:!bg-transparent disabled:active:!bg-transparent disabled:outline-rui-text-disabled' } },\n { loading: false, variant: 'text', class: { root: 'disabled:!bg-transparent dark:disabled:!bg-transparent disabled:active:!bg-transparent' } },\n { loading: false, variant: 'list', class: { root: 'disabled:!bg-transparent dark:disabled:!bg-transparent disabled:active:!bg-transparent' } },\n\n // === Grey color variants ===\n { color: 'grey', active: true, class: { root: 'bg-rui-grey-50' } },\n { color: 'grey', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-black/[.04] active:bg-black/10 dark:bg-transparent dark:active:bg-white/10 dark:hover:bg-white/[.04] dark:text-rui-text' } },\n { color: 'grey', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-black/10 dark:bg-white/30' } },\n { color: 'grey', variant: 'outlined', class: { root: 'outline-rui-text' } },\n { color: 'grey', variant: 'text', class: { root: 'text-rui-text-secondary' } },\n\n // === Context colors — outlined/text variants ===\n // `dark:text-rui-<color>` is required to beat `dark:text-rui-text` set by\n // the base color variant (meant for filled buttons where text sits on a\n // colored bg). Without the override, outlined/text/list buttons in dark\n // mode render white text against a themed outline/underline.\n { color: 'primary', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-primary-lighter/[.04] active:bg-rui-primary-lighter/10 text-rui-primary dark:text-rui-primary' } },\n { color: 'secondary', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-secondary-lighter/[.04] active:bg-rui-secondary-lighter/10 text-rui-secondary dark:text-rui-secondary' } },\n { color: 'error', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-error-lighter/[.04] active:bg-rui-error-lighter/10 text-rui-error dark:text-rui-error' } },\n { color: 'warning', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-warning-lighter/[.04] active:bg-rui-warning-lighter/10 text-rui-warning dark:text-rui-warning' } },\n { color: 'info', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-info-lighter/[.04] active:bg-rui-info-lighter/10 text-rui-info dark:text-rui-info' } },\n { color: 'success', variant: ['outlined', 'text', 'list'], class: { root: 'bg-transparent hover:bg-rui-success-lighter/[.04] active:bg-rui-success-lighter/10 text-rui-success dark:text-rui-success' } },\n\n // === Context colors — active default ===\n { color: 'primary', active: true, class: { root: 'bg-rui-primary-darker' } },\n { color: 'secondary', active: true, class: { root: 'bg-rui-secondary-darker' } },\n { color: 'error', active: true, class: { root: 'bg-rui-error-darker' } },\n { color: 'warning', active: true, class: { root: 'bg-rui-warning-darker' } },\n { color: 'info', active: true, class: { root: 'bg-rui-info-darker' } },\n { color: 'success', active: true, class: { root: 'bg-rui-success-darker' } },\n\n // === Context colors — active outlined/text ===\n { color: 'primary', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-primary-lighter/30' } },\n { color: 'secondary', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-secondary-lighter/30' } },\n { color: 'error', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-error-lighter/30' } },\n { color: 'warning', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-warning-lighter/30' } },\n { color: 'info', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-info-lighter/30' } },\n { color: 'success', variant: ['outlined', 'text', 'list'], active: true, class: { root: 'bg-rui-success-lighter/30' } },\n\n // === Context colors — outlined border ===\n { color: 'primary', variant: 'outlined', class: { root: 'outline-rui-primary/[0.5]' } },\n { color: 'secondary', variant: 'outlined', class: { root: 'outline-rui-secondary/[0.5]' } },\n { color: 'error', variant: 'outlined', class: { root: 'outline-rui-error/[0.5]' } },\n { color: 'warning', variant: 'outlined', class: { root: 'outline-rui-warning/[0.5]' } },\n { color: 'info', variant: 'outlined', class: { root: 'outline-rui-info/[0.5]' } },\n { color: 'success', variant: 'outlined', class: { root: 'outline-rui-success/[0.5]' } },\n\n // === Size overrides per variant ===\n { variant: 'text', size: 'xs', class: { root: 'px-1' } },\n { variant: 'text', size: 'sm', class: { root: 'px-1.5' } },\n { variant: 'text', size: 'lg', class: { root: 'px-2.5' } },\n { variant: 'fab', size: 'xs', class: { root: 'py-1 px-1' } },\n { variant: 'fab', size: 'sm', class: { root: 'py-1.5 px-2' } },\n { variant: 'fab', size: 'lg', class: { root: 'py-3' } },\n { variant: 'list', size: 'xs', class: { root: 'px-3 py-0.5' } },\n { variant: 'list', size: 'sm', class: { root: 'px-3 py-1' } },\n // Icon-only button sizing — every size lands at the same height as the\n // text button of the matching size, with a ~60–70% icon ratio (Material-3\n // style). The `size` rule sizes icons to 12/16/20/22px for text-button\n // prepend/append slots; here icon-only buttons get a larger glyph so they\n // don't look lost in the square. Values are rem-based throughout: p-1 =\n // 0.25rem, p-1.5 = 0.375rem, p-2 = 0.5rem; glyph sizes use rem literals.\n // xs uses an arbitrary 0.1875rem (3px) padding — no Tailwind token hits\n // it cleanly — to keep the 70% icon ratio with a 14px glyph.\n //\n // xs: p-[0.1875rem] + 0.875rem icon = 0.375 + 0.875 = 1.25rem (20px) — 70% ratio\n // sm: p-1 + 1.25rem icon = 0.5 + 1.25 = 1.75rem (28px)\n // md (default): p-1.5 + 1.25rem icon = 0.75 + 1.25 = 2rem (32px)\n // lg: p-1.5 + 1.5rem icon = 0.75 + 1.5 = 2.25rem (36px)\n // xl: p-2 + 1.75rem icon = 1 + 1.75 = 2.75rem (44px)\n { icon: true, class: { root: 'p-1.5 ![--rui-icon-size:1.25rem]' } },\n { icon: true, size: 'xs', class: { root: 'p-[0.1875rem] ![--rui-icon-size:0.875rem]' } },\n { icon: true, size: 'sm', class: { root: 'p-1 ![--rui-icon-size:1.25rem]' } },\n { icon: true, size: 'lg', class: { root: 'p-1.5 ![--rui-icon-size:1.5rem]' } },\n { icon: true, size: 'xl', class: { root: 'p-2 ![--rui-icon-size:1.75rem]' } },\n { variant: 'fab', icon: true, size: 'sm', class: { root: 'px-2 py-2' } },\n ],\n compoundSlots: [\n // Dark mode default variant text override for warning/success/info\n { slots: ['root'], color: ['warning', 'success', 'info'], variant: 'default', class: 'dark:text-rui-light-text' },\n // Dark mode active outlined/text override for primary/secondary\n { slots: ['root'], color: 'primary', variant: ['outlined', 'text', 'list'], active: true, class: 'dark:bg-rui-primary-darker/60 dark:text-rui-primary-lighter' },\n { slots: ['root'], color: 'secondary', variant: ['outlined', 'text', 'list'], active: true, class: 'dark:bg-rui-secondary-darker/60 dark:text-rui-secondary-lighter' },\n ],\n defaultVariants: {\n variant: 'default',\n color: 'grey',\n active: false,\n },\n});\n"],"mappings":";;AAEA,IAAa,eAAe,GAAG;CAC7B,OAAO;EACL,MAAM;GACJ;GAOA;GACA;GAOA;GAOA;GACA;GACD,CAAC,KAAK,IAAI;EACX,OAAO;EACP,SAAS;EACV;CACD,UAAU;EACR,SAAS;GACP,SAAS,EAAE;GACX,UAAU,EAAE;GACZ,MAAM,EAAE,MAAM,QAAQ;GACtB,KAAK,EAAE,MAAM,qBAAqB;GAClC,MAAM;IAAE,MAAM;IAAwD,OAAO;IAAU;GACxF;EACD,MAAM;GAQJ,IAAI,EAAE,MAAM,yEAAyE;GACrF,IAAI,EAAE,MAAM,iEAAiE;GAC7E,IAAI,EAAE,MAAM,8DAA8D;GAC1E,IAAI,EAAE,MAAM,iEAAiE;GAC9E;EACD,OAAO;GACL,MAAM,EAAE,MAAM,oKAAoK;GAClL,SAAS,EAAE,MAAM,iKAAiK;GAClL,WAAW,EAAE,MAAM,2KAA2K;GAC9L,OAAO,EAAE,MAAM,uJAAuJ;GACtK,SAAS,EAAE,MAAM,iKAAiK;GAClL,MAAM,EAAE,MAAM,kJAAkJ;GAChK,SAAS,EAAE,MAAM,iKAAiK;GACnL;EACD,SAAS,EACP,MAAM,EAAE,MAAM,gBAAgB,EAC/B;EACD,MAAM,EAIJ,MAAM,EAAE,MAAM,gBAAgB,EAC/B;EACD,QAAQ;GACN,MAAM,EAAE;GACR,OAAO,EAAE;GACV;EACD,SAAS;GACP,MAAM,EAAE,MAAM,+GAA+G;GAC7H,OAAO,EAAE;GACV;EACD,oBAAoB,EAClB,MAAM,EAAE,MAAM,yBAAyB,EACxC;EACF;CACD,kBAAkB;EAKhB;GAAE,SAAS;GAAO,OAAO,EAAE,MAAM,mIAAmI;GAAE;EACtK;GAAE,SAAS;GAAO,SAAS;GAAY,OAAO,EAAE,MAAM,6HAA6H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EjH;GAAE,OAAO,CAAC,OAAO;GAAE,OAAO;GAAW,SAAS;IAAC;IAAY;IAAQ;IAAO;GAAE,QAAQ;GAAM,OAAO;GAA+D;EAChK;GAAE,OAAO,CAAC,OAAO;GAAE,OAAO;GAAa,SAAS;IAAC;IAAY;IAAQ;IAAO;GAAE,QAAQ;GAAM,OAAO;GAAmE;EACvK;CACD,iBAAiB;EACf,SAAS;EACT,OAAO;EACP,QAAQ;EACT;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RuiIcon.js","names":[],"sources":["../../../src/components/icons/RuiIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ContextColorsType } from '@/consts/colors';\nimport { useIcons } from '@/composables/icons';\nimport { isRuiIcon, type RuiIcons } from '@/icons';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n name: RuiIcons;\n size?: number | string;\n color?: ContextColorsType;\n}\n\ndefineOptions({\n name: 'RuiIcon',\n});\n\nconst { name, size, color } = defineProps<Props>();\n\nconst { registeredIcons } = useIcons();\n\ntype SvgComponent = [tag: string, attrs: Record<string, string>];\n\nconst iconStyles = tv({\n variants: {\n color: {\n primary: 'text-rui-primary',\n secondary: 'text-rui-secondary',\n error: 'text-rui-error',\n warning: 'text-rui-warning',\n info: 'text-rui-info',\n success: 'text-rui-success',\n },\n sized: {\n // When no explicit size prop is set, fall back to Tailwind classes so a\n // parent (e.g. RuiButton) can override the icon size via CSS without\n // competing with inline width/height attributes.\n false: 'w-6 h-6',\n true: '',\n },\n },\n});\n\nconst hasExplicitSize = computed<boolean>(() => size !== undefined);\nconst ui = computed<string>(() => iconStyles({ color, sized: get(hasExplicitSize) }));\n\nconst isFill = computed<boolean>(() => name.endsWith('-fill'));\n\nconst components = computed<SvgComponent[] | undefined>(() => {\n if (!isRuiIcon(name)) {\n console.warn(`icon ${name} must be a valid RuiIcon`);\n }\n const found = registeredIcons[name];\n\n if (!found) {\n console.error(\n `Icons \"${name}\" not found. Make sure that you have register the icon when installing the RuiPlugin`,\n );\n }\n return found;\n});\n</script>\n\n<template>\n <svg\n aria-hidden=\"true\"\n class=\"rui-icon\"\n :class=\"ui\"\n :height=\"hasExplicitSize ? size : undefined\"\n :width=\"hasExplicitSize ? size : undefined\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <component\n :is=\"component[0]\"\n v-for=\"(component, index) in components\"\n :key=\"index\"\n v-bind=\"component[1]\"\n :fill=\"!isFill ? 'none' : 'currentColor'\"\n :stroke=\"!isFill ? 'currentColor' : 'none'\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n />\n </svg>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RuiIcon.js","names":[],"sources":["../../../src/components/icons/RuiIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ContextColorsType } from '@/consts/colors';\nimport { useIcons } from '@/composables/icons';\nimport { isRuiIcon, type RuiIcons } from '@/icons';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n name: RuiIcons;\n size?: number | string;\n color?: ContextColorsType;\n}\n\ndefineOptions({\n name: 'RuiIcon',\n});\n\nconst { name, size, color } = defineProps<Props>();\n\nconst { registeredIcons } = useIcons();\n\ntype SvgComponent = [tag: string, attrs: Record<string, string>];\n\nconst iconStyles = tv({\n base: 'w-[var(--rui-icon-size,1.5rem)] h-[var(--rui-icon-size,1.5rem)]',\n variants: {\n color: {\n primary: 'text-rui-primary',\n secondary: 'text-rui-secondary',\n error: 'text-rui-error',\n warning: 'text-rui-warning',\n info: 'text-rui-info',\n success: 'text-rui-success',\n },\n },\n});\n\nconst hasExplicitSize = computed<boolean>(() => size !== undefined);\nconst ui = computed<string>(() => iconStyles({ color }));\n\n// Render the `size` prop as an inline CSS custom property on the svg. Because\n// inline style wins against any inherited value for the same property on this\n// element, the consumer-supplied size beats the button's `--rui-icon-size`\n// assignment without needing !important. A bare number (or numeric string —\n// `:size=\"16\"` resolves to a string in the template binding) is coerced to px;\n// values that already include a unit (`1rem`, `18px`, `calc(...)`) pass\n// through unchanged. The previous SVG-attr path accepted bare numbers because\n// `width`/`height` presentation attrs treat them as px; CSS does not.\nconst sizeStyle = computed<Record<string, string> | undefined>(() => {\n if (!get(hasExplicitSize))\n return undefined;\n const raw = String(size);\n const value = /^\\d+(?:\\.\\d+)?$/.test(raw) ? `${raw}px` : raw;\n return { '--rui-icon-size': value };\n});\n\nconst isFill = computed<boolean>(() => name.endsWith('-fill'));\n\nconst components = computed<SvgComponent[] | undefined>(() => {\n if (!isRuiIcon(name)) {\n console.warn(`icon ${name} must be a valid RuiIcon`);\n }\n const found = registeredIcons[name];\n\n if (!found) {\n console.error(\n `Icons \"${name}\" not found. Make sure that you have register the icon when installing the RuiPlugin`,\n );\n }\n return found;\n});\n</script>\n\n<template>\n <svg\n aria-hidden=\"true\"\n class=\"rui-icon\"\n :class=\"ui\"\n :style=\"sizeStyle\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <component\n :is=\"component[0]\"\n v-for=\"(component, index) in components\"\n :key=\"index\"\n v-bind=\"component[1]\"\n :fill=\"!isFill ? 'none' : 'currentColor'\"\n :stroke=\"!isFill ? 'currentColor' : 'none'\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n />\n </svg>\n</template>\n"],"mappings":""}
@@ -1,10 +1,9 @@
1
1
  import { isRuiIcon } from "../../icons/index.js";
2
2
  import { useIcons } from "../../composables/icons.js";
3
3
  import { tv } from "../../utils/tv.js";
4
- import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, normalizeClass, openBlock, renderList, resolveDynamicComponent, unref } from "vue";
4
+ import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, resolveDynamicComponent, unref } from "vue";
5
5
  import { get } from "@vueuse/shared";
6
6
  //#region src/components/icons/RuiIcon.vue?vue&type=script&setup=true&lang.ts
7
- var _hoisted_1 = ["height", "width"];
8
7
  var RuiIcon_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
9
8
  name: "RuiIcon",
10
9
  __name: "RuiIcon",
@@ -15,25 +14,24 @@ var RuiIcon_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
15
14
  },
16
15
  setup(__props) {
17
16
  const { registeredIcons } = useIcons();
18
- const iconStyles = tv({ variants: {
19
- color: {
17
+ const iconStyles = tv({
18
+ base: "w-[var(--rui-icon-size,1.5rem)] h-[var(--rui-icon-size,1.5rem)]",
19
+ variants: { color: {
20
20
  primary: "text-rui-primary",
21
21
  secondary: "text-rui-secondary",
22
22
  error: "text-rui-error",
23
23
  warning: "text-rui-warning",
24
24
  info: "text-rui-info",
25
25
  success: "text-rui-success"
26
- },
27
- sized: {
28
- false: "w-6 h-6",
29
- true: ""
30
- }
31
- } });
26
+ } }
27
+ });
32
28
  const hasExplicitSize = computed(() => __props.size !== void 0);
33
- const ui = computed(() => iconStyles({
34
- color: __props.color,
35
- sized: get(hasExplicitSize)
36
- }));
29
+ const ui = computed(() => iconStyles({ color: __props.color }));
30
+ const sizeStyle = computed(() => {
31
+ if (!get(hasExplicitSize)) return void 0;
32
+ const raw = String(__props.size);
33
+ return { "--rui-icon-size": /^\d+(?:\.\d+)?$/.test(raw) ? `${raw}px` : raw };
34
+ });
37
35
  const isFill = computed(() => __props.name.endsWith("-fill"));
38
36
  const components = computed(() => {
39
37
  if (!isRuiIcon(__props.name)) console.warn(`icon ${__props.name} must be a valid RuiIcon`);
@@ -45,8 +43,7 @@ var RuiIcon_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
45
43
  return openBlock(), createElementBlock("svg", {
46
44
  "aria-hidden": "true",
47
45
  class: normalizeClass(["rui-icon", unref(ui)]),
48
- height: unref(hasExplicitSize) ? __props.size : void 0,
49
- width: unref(hasExplicitSize) ? __props.size : void 0,
46
+ style: normalizeStyle(unref(sizeStyle)),
50
47
  viewBox: "0 0 24 24",
51
48
  xmlns: "http://www.w3.org/2000/svg"
52
49
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(components), (component, index) => {
@@ -59,7 +56,7 @@ var RuiIcon_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
59
56
  "fill-rule": "evenodd",
60
57
  "clip-rule": "evenodd"
61
58
  }), null, 16, ["fill", "stroke"]);
62
- }), 128))], 10, _hoisted_1);
59
+ }), 128))], 6);
63
60
  };
64
61
  }
65
62
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RuiIcon.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/icons/RuiIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ContextColorsType } from '@/consts/colors';\nimport { useIcons } from '@/composables/icons';\nimport { isRuiIcon, type RuiIcons } from '@/icons';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n name: RuiIcons;\n size?: number | string;\n color?: ContextColorsType;\n}\n\ndefineOptions({\n name: 'RuiIcon',\n});\n\nconst { name, size, color } = defineProps<Props>();\n\nconst { registeredIcons } = useIcons();\n\ntype SvgComponent = [tag: string, attrs: Record<string, string>];\n\nconst iconStyles = tv({\n variants: {\n color: {\n primary: 'text-rui-primary',\n secondary: 'text-rui-secondary',\n error: 'text-rui-error',\n warning: 'text-rui-warning',\n info: 'text-rui-info',\n success: 'text-rui-success',\n },\n sized: {\n // When no explicit size prop is set, fall back to Tailwind classes so a\n // parent (e.g. RuiButton) can override the icon size via CSS without\n // competing with inline width/height attributes.\n false: 'w-6 h-6',\n true: '',\n },\n },\n});\n\nconst hasExplicitSize = computed<boolean>(() => size !== undefined);\nconst ui = computed<string>(() => iconStyles({ color, sized: get(hasExplicitSize) }));\n\nconst isFill = computed<boolean>(() => name.endsWith('-fill'));\n\nconst components = computed<SvgComponent[] | undefined>(() => {\n if (!isRuiIcon(name)) {\n console.warn(`icon ${name} must be a valid RuiIcon`);\n }\n const found = registeredIcons[name];\n\n if (!found) {\n console.error(\n `Icons \"${name}\" not found. Make sure that you have register the icon when installing the RuiPlugin`,\n );\n }\n return found;\n});\n</script>\n\n<template>\n <svg\n aria-hidden=\"true\"\n class=\"rui-icon\"\n :class=\"ui\"\n :height=\"hasExplicitSize ? size : undefined\"\n :width=\"hasExplicitSize ? size : undefined\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <component\n :is=\"component[0]\"\n v-for=\"(component, index) in components\"\n :key=\"index\"\n v-bind=\"component[1]\"\n :fill=\"!isFill ? 'none' : 'currentColor'\"\n :stroke=\"!isFill ? 'currentColor' : 'none'\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n />\n </svg>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAkBA,MAAM,EAAE,oBAAoB,UAAU;EAItC,MAAM,aAAa,GAAG,EACpB,UAAU;GACR,OAAO;IACL,SAAS;IACT,WAAW;IACX,OAAO;IACP,SAAS;IACT,MAAM;IACN,SAAS;IACV;GACD,OAAO;IAIL,OAAO;IACP,MAAM;;GAET,EACF,CAAC;EAEF,MAAM,kBAAkB,eAAwB,QAAA,SAAS,KAAA,EAAU;EACnE,MAAM,KAAK,eAAuB,WAAW;GAAE,OAAI,QAAA;GAAG,OAAO,IAAI,gBAAA;GAAkB,CAAC,CAAC;EAErF,MAAM,SAAS,eAAwB,QAAA,KAAK,SAAS,QAAQ,CAAC;EAE9D,MAAM,aAAa,eAA2C;AAC5D,OAAI,CAAC,UAAU,QAAA,KAAK,CAClB,SAAQ,KAAK,QAAQ,QAAA,KAAK,0BAA0B;GAEtD,MAAM,QAAQ,gBAAgB,QAAA;AAE9B,OAAI,CAAC,MACH,SAAQ,MACN,UAAU,QAAA,KAAK,sFAChB;AAEH,UAAO;IACP;;uBAIA,mBAsBM,OAAA;IArBJ,eAAY;IACZ,OAAK,eAAA,CAAC,YACE,MAAA,GAAE,CAAA,CAAA;IACT,QAAQ,MAAA,gBAAe,GAAG,QAAA,OAAO,KAAA;IACjC,OAAO,MAAA,gBAAe,GAAG,QAAA,OAAO,KAAA;IACjC,SAAQ;IACR,OAAM;yBAEN,mBAYE,UAAA,MAAA,WAV6B,MAAA,WAAU,GAA/B,WAAW,UAAK;wBAF1B,YAYE,wBAXK,UAAS,GAAA,EADhB,WAYE,EATC,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EACH,UAAS,IAAA;KAChB,MAAI,CAAG,MAAA,OAAM,GAAA,SAAA;KACb,QAAM,CAAG,MAAA,OAAM,GAAA,iBAAA;KAChB,gBAAa;KACb,kBAAe;KACf,mBAAgB;KAChB,aAAU;KACV,aAAU"}
1
+ {"version":3,"file":"RuiIcon.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/icons/RuiIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ContextColorsType } from '@/consts/colors';\nimport { useIcons } from '@/composables/icons';\nimport { isRuiIcon, type RuiIcons } from '@/icons';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n name: RuiIcons;\n size?: number | string;\n color?: ContextColorsType;\n}\n\ndefineOptions({\n name: 'RuiIcon',\n});\n\nconst { name, size, color } = defineProps<Props>();\n\nconst { registeredIcons } = useIcons();\n\ntype SvgComponent = [tag: string, attrs: Record<string, string>];\n\nconst iconStyles = tv({\n base: 'w-[var(--rui-icon-size,1.5rem)] h-[var(--rui-icon-size,1.5rem)]',\n variants: {\n color: {\n primary: 'text-rui-primary',\n secondary: 'text-rui-secondary',\n error: 'text-rui-error',\n warning: 'text-rui-warning',\n info: 'text-rui-info',\n success: 'text-rui-success',\n },\n },\n});\n\nconst hasExplicitSize = computed<boolean>(() => size !== undefined);\nconst ui = computed<string>(() => iconStyles({ color }));\n\n// Render the `size` prop as an inline CSS custom property on the svg. Because\n// inline style wins against any inherited value for the same property on this\n// element, the consumer-supplied size beats the button's `--rui-icon-size`\n// assignment without needing !important. A bare number (or numeric string —\n// `:size=\"16\"` resolves to a string in the template binding) is coerced to px;\n// values that already include a unit (`1rem`, `18px`, `calc(...)`) pass\n// through unchanged. The previous SVG-attr path accepted bare numbers because\n// `width`/`height` presentation attrs treat them as px; CSS does not.\nconst sizeStyle = computed<Record<string, string> | undefined>(() => {\n if (!get(hasExplicitSize))\n return undefined;\n const raw = String(size);\n const value = /^\\d+(?:\\.\\d+)?$/.test(raw) ? `${raw}px` : raw;\n return { '--rui-icon-size': value };\n});\n\nconst isFill = computed<boolean>(() => name.endsWith('-fill'));\n\nconst components = computed<SvgComponent[] | undefined>(() => {\n if (!isRuiIcon(name)) {\n console.warn(`icon ${name} must be a valid RuiIcon`);\n }\n const found = registeredIcons[name];\n\n if (!found) {\n console.error(\n `Icons \"${name}\" not found. Make sure that you have register the icon when installing the RuiPlugin`,\n );\n }\n return found;\n});\n</script>\n\n<template>\n <svg\n aria-hidden=\"true\"\n class=\"rui-icon\"\n :class=\"ui\"\n :style=\"sizeStyle\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <component\n :is=\"component[0]\"\n v-for=\"(component, index) in components\"\n :key=\"index\"\n v-bind=\"component[1]\"\n :fill=\"!isFill ? 'none' : 'currentColor'\"\n :stroke=\"!isFill ? 'currentColor' : 'none'\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n />\n </svg>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAkBA,MAAM,EAAE,oBAAoB,UAAU;EAItC,MAAM,aAAa,GAAG;GACpB,MAAM;GACN,UAAU,EACR,OAAO;IACL,SAAS;IACT,WAAW;IACX,OAAO;IACP,SAAS;IACT,MAAM;IACN,SAAS;IACV,EAAA;GAEJ,CAAC;EAEF,MAAM,kBAAkB,eAAwB,QAAA,SAAS,KAAA,EAAU;EACnE,MAAM,KAAK,eAAuB,WAAW,EAAE,OAAI,QAAA,OAAG,CAAC,CAAC;EAUxD,MAAM,YAAY,eAAmD;AACnE,OAAI,CAAC,IAAI,gBAAgB,CACvB,QAAO,KAAA;GACT,MAAM,MAAM,OAAO,QAAA,KAAK;AAExB,UAAO,EAAE,mBADK,kBAAkB,KAAK,IAAI,GAAG,GAAG,IAAI,MAAM,KACtB;IACnC;EAEF,MAAM,SAAS,eAAwB,QAAA,KAAK,SAAS,QAAQ,CAAC;EAE9D,MAAM,aAAa,eAA2C;AAC5D,OAAI,CAAC,UAAU,QAAA,KAAK,CAClB,SAAQ,KAAK,QAAQ,QAAA,KAAK,0BAA0B;GAEtD,MAAM,QAAQ,gBAAgB,QAAA;AAE9B,OAAI,CAAC,MACH,SAAQ,MACN,UAAU,QAAA,KAAK,sFAChB;AAEH,UAAO;IACP;;uBAIA,mBAqBM,OAAA;IApBJ,eAAY;IACZ,OAAK,eAAA,CAAC,YACE,MAAA,GAAE,CAAA,CAAA;IACT,OAAK,eAAE,MAAA,UAAS,CAAA;IACjB,SAAQ;IACR,OAAM;yBAEN,mBAYE,UAAA,MAAA,WAV6B,MAAA,WAAU,GAA/B,WAAW,UAAK;wBAF1B,YAYE,wBAXK,UAAS,GAAA,EADhB,WAYE,EATC,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EACH,UAAS,IAAA;KAChB,MAAI,CAAG,MAAA,OAAM,GAAA,SAAA;KACb,QAAM,CAAG,MAAA,OAAM,GAAA,iBAAA;KAChB,gBAAa;KACb,kBAAe;KACf,mBAAgB;KAChB,aAAU;KACV,aAAU"}
@@ -58,7 +58,7 @@ function useAutoCompleteValue(modelValue, options, opts, deps) {
58
58
  setSelected(selected);
59
59
  }
60
60
  });
61
- watch([modelValue, () => toValue(deps.isOpen)], () => {
61
+ watch([value, () => toValue(deps.isOpen)], () => {
62
62
  if (toValue(deps.isOpen) || !toValue(deps.shouldApplyValueAsSearch)) return;
63
63
  const currentValue = get(value);
64
64
  if (toValue(deps.multiple) || currentValue.length === 0) deps.updateInternalSearch();
@@ -1 +1 @@
1
- {"version":3,"file":"value.js","names":[],"sources":["../../../../src/composables/forms/auto-complete/value.ts"],"sourcesContent":["import type { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';\nimport { get, set } from '@vueuse/shared';\nimport { assert } from '@/utils/assert';\n\nexport interface UseAutoCompleteValueOptions<TItem> {\n /** The property used as the unique identifier for each item. */\n keyAttr?: MaybeRefOrGetter<keyof TItem | undefined>;\n /** Whether to return the full item object instead of just the key. */\n returnObject?: MaybeRefOrGetter<boolean>;\n /** Whether custom (free-text) values are allowed. */\n customValue?: MaybeRefOrGetter<boolean>;\n}\n\nexport interface UseAutoCompleteValueReturn<TItem> {\n value: ComputedRef<TItem[]>;\n setSelected: (selected: TItem[]) => void;\n}\n\nexport interface UseAutoCompleteValueDeps<TItem> {\n getIdentifier: (item: TItem) => any;\n getText: (item: TItem) => string | undefined;\n textValueToProperValue: (val: any, returnObject?: boolean) => TItem;\n shouldApplyValueAsSearch: MaybeRefOrGetter<boolean>;\n isOpen: MaybeRefOrGetter<boolean>;\n multiple: MaybeRefOrGetter<boolean>;\n updateInternalSearch: (value?: string) => void;\n}\n\nexport function useAutoCompleteValue<TValue, TItem>(\n modelValue: Ref<TValue | undefined>, // eslint-disable-line @rotki/composable-input-flexibility -- needs write access\n options: MaybeRefOrGetter<TItem[]>,\n opts: UseAutoCompleteValueOptions<TItem>,\n deps: UseAutoCompleteValueDeps<TItem>,\n): UseAutoCompleteValueReturn<TItem> {\n // Create maps for O(1) lookup performance\n const optionsMap = computed<Map<any, TItem>>(() => {\n const map = new Map<any, TItem>();\n const optionsData = toValue(options);\n for (const item of optionsData) {\n map.set(deps.getIdentifier(item), item);\n }\n return map;\n });\n\n function convertModelValueToArray(modelValueData: TValue | undefined): any[] {\n if (modelValueData === null || modelValueData === undefined)\n return [];\n return Array.isArray(modelValueData) ? modelValueData : [modelValueData];\n }\n\n function filterValues(\n valueArray: any[],\n optionsMapData: Map<any, TItem>,\n customValue: boolean,\n returnObject: boolean,\n getKey: (val: any) => any,\n ): TItem[] {\n const filtered: TItem[] = [];\n for (const val of valueArray) {\n const inOptions = optionsMapData.get(getKey(val));\n if (inOptions !== undefined)\n filtered.push(inOptions);\n else if (customValue)\n filtered.push(deps.textValueToProperValue(val, returnObject));\n }\n return filtered;\n }\n\n function processReturnObjectValue(\n modelValueData: TValue | undefined,\n optionsMapData: Map<any, TItem>,\n returnObject: boolean,\n customValue: boolean,\n ): TItem[] {\n const multipleValue = Array.isArray(modelValueData);\n const valueArray = convertModelValueToArray(modelValueData);\n const filtered = filterValues(valueArray, optionsMapData, customValue, returnObject, val => deps.getIdentifier(val));\n\n if (multipleValue || filtered.length === 0)\n return filtered;\n\n const val = filtered[0];\n assert(val !== undefined && val !== null);\n return [val];\n }\n\n function processStandardValue(\n modelValueData: TValue | undefined,\n optionsMapData: Map<any, TItem>,\n returnObject: boolean,\n customValue: boolean,\n ): TItem[] {\n const valueArray = convertModelValueToArray(modelValueData);\n return filterValues(valueArray, optionsMapData, customValue, returnObject, val => val);\n }\n\n function onUpdateModelValue(value: TValue | undefined): void {\n set(modelValue, value);\n }\n\n function setSelected(selected: TItem[]): void {\n const keyAttr = toValue(opts.keyAttr);\n const returnObject = toValue(opts.returnObject);\n const selection = keyAttr && !returnObject ? selected.map(item => item[keyAttr]) : selected;\n\n if (toValue(deps.multiple))\n return onUpdateModelValue(selection as TValue);\n\n if (selection.length === 0)\n return onUpdateModelValue(undefined);\n\n return onUpdateModelValue(selection[0] as TValue);\n }\n\n const value = computed<TItem[]>({\n get: () => {\n const modelValueData = get(modelValue);\n const keyAttr = toValue(opts.keyAttr);\n const returnObject = toValue(opts.returnObject) ?? false;\n const customValue = toValue(opts.customValue) ?? false;\n const optionsMapData = get(optionsMap);\n\n if (keyAttr && returnObject)\n return processReturnObjectValue(modelValueData, optionsMapData, returnObject, customValue);\n\n return processStandardValue(modelValueData, optionsMapData, returnObject, customValue);\n },\n set: (selected: TItem[]): void => {\n setSelected(selected);\n },\n });\n\n // Sync search text when menu is closed and value changes\n watch([modelValue, () => toValue(deps.isOpen)], () => {\n if (toValue(deps.isOpen) || !toValue(deps.shouldApplyValueAsSearch))\n return;\n\n const currentValue = get(value);\n if (toValue(deps.multiple) || currentValue.length === 0) {\n deps.updateInternalSearch();\n }\n else {\n const firstItem = currentValue[0];\n assert(firstItem !== undefined && firstItem !== null);\n deps.updateInternalSearch(deps.getText(firstItem));\n }\n }, { immediate: true });\n\n return {\n setSelected,\n value,\n };\n}\n"],"mappings":";;;;AA4BA,SAAgB,qBACd,YACA,SACA,MACA,MACmC;CAEnC,MAAM,aAAa,eAAgC;EACjD,MAAM,sBAAM,IAAI,KAAiB;EACjC,MAAM,cAAc,QAAQ,QAAQ;AACpC,OAAK,MAAM,QAAQ,YACjB,KAAI,IAAI,KAAK,cAAc,KAAK,EAAE,KAAK;AAEzC,SAAO;GACP;CAEF,SAAS,yBAAyB,gBAA2C;AAC3E,MAAI,mBAAmB,QAAQ,mBAAmB,KAAA,EAChD,QAAO,EAAE;AACX,SAAO,MAAM,QAAQ,eAAe,GAAG,iBAAiB,CAAC,eAAe;;CAG1E,SAAS,aACP,YACA,gBACA,aACA,cACA,QACS;EACT,MAAM,WAAoB,EAAE;AAC5B,OAAK,MAAM,OAAO,YAAY;GAC5B,MAAM,YAAY,eAAe,IAAI,OAAO,IAAI,CAAC;AACjD,OAAI,cAAc,KAAA,EAChB,UAAS,KAAK,UAAU;YACjB,YACP,UAAS,KAAK,KAAK,uBAAuB,KAAK,aAAa,CAAC;;AAEjE,SAAO;;CAGT,SAAS,yBACP,gBACA,gBACA,cACA,aACS;EACT,MAAM,gBAAgB,MAAM,QAAQ,eAAe;EAEnD,MAAM,WAAW,aADE,yBAAyB,eAAe,EACjB,gBAAgB,aAAa,eAAc,QAAO,KAAK,cAAc,IAAI,CAAC;AAEpH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,WAAW,EACpD,MAAK,sBAAsB;OAExB;GACH,MAAM,YAAY,aAAa;AAC/B,UAAO,cAAc,KAAA,KAAa,cAAc,KAAK;AACrD,QAAK,qBAAqB,KAAK,QAAQ,UAAU,CAAC;;IAEnD,EAAE,WAAW,MAAM,CAAC;AAEvB,QAAO;EACL;EACA;EACD"}
1
+ {"version":3,"file":"value.js","names":[],"sources":["../../../../src/composables/forms/auto-complete/value.ts"],"sourcesContent":["import type { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';\nimport { get, set } from '@vueuse/shared';\nimport { assert } from '@/utils/assert';\n\nexport interface UseAutoCompleteValueOptions<TItem> {\n /** The property used as the unique identifier for each item. */\n keyAttr?: MaybeRefOrGetter<keyof TItem | undefined>;\n /** Whether to return the full item object instead of just the key. */\n returnObject?: MaybeRefOrGetter<boolean>;\n /** Whether custom (free-text) values are allowed. */\n customValue?: MaybeRefOrGetter<boolean>;\n}\n\nexport interface UseAutoCompleteValueReturn<TItem> {\n value: ComputedRef<TItem[]>;\n setSelected: (selected: TItem[]) => void;\n}\n\nexport interface UseAutoCompleteValueDeps<TItem> {\n getIdentifier: (item: TItem) => any;\n getText: (item: TItem) => string | undefined;\n textValueToProperValue: (val: any, returnObject?: boolean) => TItem;\n shouldApplyValueAsSearch: MaybeRefOrGetter<boolean>;\n isOpen: MaybeRefOrGetter<boolean>;\n multiple: MaybeRefOrGetter<boolean>;\n updateInternalSearch: (value?: string) => void;\n}\n\nexport function useAutoCompleteValue<TValue, TItem>(\n modelValue: Ref<TValue | undefined>, // eslint-disable-line @rotki/composable-input-flexibility -- needs write access\n options: MaybeRefOrGetter<TItem[]>,\n opts: UseAutoCompleteValueOptions<TItem>,\n deps: UseAutoCompleteValueDeps<TItem>,\n): UseAutoCompleteValueReturn<TItem> {\n // Create maps for O(1) lookup performance\n const optionsMap = computed<Map<any, TItem>>(() => {\n const map = new Map<any, TItem>();\n const optionsData = toValue(options);\n for (const item of optionsData) {\n map.set(deps.getIdentifier(item), item);\n }\n return map;\n });\n\n function convertModelValueToArray(modelValueData: TValue | undefined): any[] {\n if (modelValueData === null || modelValueData === undefined)\n return [];\n return Array.isArray(modelValueData) ? modelValueData : [modelValueData];\n }\n\n function filterValues(\n valueArray: any[],\n optionsMapData: Map<any, TItem>,\n customValue: boolean,\n returnObject: boolean,\n getKey: (val: any) => any,\n ): TItem[] {\n const filtered: TItem[] = [];\n for (const val of valueArray) {\n const inOptions = optionsMapData.get(getKey(val));\n if (inOptions !== undefined)\n filtered.push(inOptions);\n else if (customValue)\n filtered.push(deps.textValueToProperValue(val, returnObject));\n }\n return filtered;\n }\n\n function processReturnObjectValue(\n modelValueData: TValue | undefined,\n optionsMapData: Map<any, TItem>,\n returnObject: boolean,\n customValue: boolean,\n ): TItem[] {\n const multipleValue = Array.isArray(modelValueData);\n const valueArray = convertModelValueToArray(modelValueData);\n const filtered = filterValues(valueArray, optionsMapData, customValue, returnObject, val => deps.getIdentifier(val));\n\n if (multipleValue || filtered.length === 0)\n return filtered;\n\n const val = filtered[0];\n assert(val !== undefined && val !== null);\n return [val];\n }\n\n function processStandardValue(\n modelValueData: TValue | undefined,\n optionsMapData: Map<any, TItem>,\n returnObject: boolean,\n customValue: boolean,\n ): TItem[] {\n const valueArray = convertModelValueToArray(modelValueData);\n return filterValues(valueArray, optionsMapData, customValue, returnObject, val => val);\n }\n\n function onUpdateModelValue(value: TValue | undefined): void {\n set(modelValue, value);\n }\n\n function setSelected(selected: TItem[]): void {\n const keyAttr = toValue(opts.keyAttr);\n const returnObject = toValue(opts.returnObject);\n const selection = keyAttr && !returnObject ? selected.map(item => item[keyAttr]) : selected;\n\n if (toValue(deps.multiple))\n return onUpdateModelValue(selection as TValue);\n\n if (selection.length === 0)\n return onUpdateModelValue(undefined);\n\n return onUpdateModelValue(selection[0] as TValue);\n }\n\n const value = computed<TItem[]>({\n get: () => {\n const modelValueData = get(modelValue);\n const keyAttr = toValue(opts.keyAttr);\n const returnObject = toValue(opts.returnObject) ?? false;\n const customValue = toValue(opts.customValue) ?? false;\n const optionsMapData = get(optionsMap);\n\n if (keyAttr && returnObject)\n return processReturnObjectValue(modelValueData, optionsMapData, returnObject, customValue);\n\n return processStandardValue(modelValueData, optionsMapData, returnObject, customValue);\n },\n set: (selected: TItem[]): void => {\n setSelected(selected);\n },\n });\n\n // Watching `value` (not `modelValue`) so the search text resyncs once\n // `options` arrives later and the lookup can finally resolve.\n watch([value, () => toValue(deps.isOpen)], () => {\n if (toValue(deps.isOpen) || !toValue(deps.shouldApplyValueAsSearch))\n return;\n\n const currentValue = get(value);\n if (toValue(deps.multiple) || currentValue.length === 0) {\n deps.updateInternalSearch();\n }\n else {\n const firstItem = currentValue[0];\n assert(firstItem !== undefined && firstItem !== null);\n deps.updateInternalSearch(deps.getText(firstItem));\n }\n }, { immediate: true });\n\n return {\n setSelected,\n value,\n };\n}\n"],"mappings":";;;;AA4BA,SAAgB,qBACd,YACA,SACA,MACA,MACmC;CAEnC,MAAM,aAAa,eAAgC;EACjD,MAAM,sBAAM,IAAI,KAAiB;EACjC,MAAM,cAAc,QAAQ,QAAQ;AACpC,OAAK,MAAM,QAAQ,YACjB,KAAI,IAAI,KAAK,cAAc,KAAK,EAAE,KAAK;AAEzC,SAAO;GACP;CAEF,SAAS,yBAAyB,gBAA2C;AAC3E,MAAI,mBAAmB,QAAQ,mBAAmB,KAAA,EAChD,QAAO,EAAE;AACX,SAAO,MAAM,QAAQ,eAAe,GAAG,iBAAiB,CAAC,eAAe;;CAG1E,SAAS,aACP,YACA,gBACA,aACA,cACA,QACS;EACT,MAAM,WAAoB,EAAE;AAC5B,OAAK,MAAM,OAAO,YAAY;GAC5B,MAAM,YAAY,eAAe,IAAI,OAAO,IAAI,CAAC;AACjD,OAAI,cAAc,KAAA,EAChB,UAAS,KAAK,UAAU;YACjB,YACP,UAAS,KAAK,KAAK,uBAAuB,KAAK,aAAa,CAAC;;AAEjE,SAAO;;CAGT,SAAS,yBACP,gBACA,gBACA,cACA,aACS;EACT,MA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AAQ,KAAK,OAAO,IAAI,CAAC,QAAQ,KAAK,yBAAyB,CACjE;EAEF,MAAM,eAAe,IAAI,MAAM;AAC/B,MAAI,QAAQ,KAAK,SAAS,IAAI,aAAa,WAAW,EACpD,MAAK,sBAAsB;OAExB;GACH,MAAM,YAAY,aAAa;AAC/B,UAAO,cAAc,KAAA,KAAa,cAAc,KAAK;AACrD,QAAK,qBAAqB,KAAK,QAAQ,UAAU,CAAC;;IAEnD,EAAE,WAAW,MAAM,CAAC;AAEvB,QAAO;EACL;EACA;EACD"}
package/dist/style.css CHANGED
@@ -1382,6 +1382,10 @@ html[data-theme="dark"], html.dark {
1382
1382
  height: calc(100% + 0.5rem);
1383
1383
  }
1384
1384
 
1385
+ .h-\[var\(--rui-icon-size\2c 1\.5rem\)\] {
1386
+ height: var(--rui-icon-size,1.5rem);
1387
+ }
1388
+
1385
1389
  .h-auto {
1386
1390
  height: auto;
1387
1391
  }
@@ -1563,6 +1567,10 @@ html[data-theme="dark"], html.dark {
1563
1567
  width: 3.625rem;
1564
1568
  }
1565
1569
 
1570
+ .w-\[var\(--rui-icon-size\2c 1\.5rem\)\] {
1571
+ width: var(--rui-icon-size,1.5rem);
1572
+ }
1573
+
1566
1574
  .w-auto {
1567
1575
  width: auto;
1568
1576
  }
@@ -2923,6 +2931,10 @@ html[data-theme="dark"], html.dark {
2923
2931
  padding: 0.25rem;
2924
2932
  }
2925
2933
 
2934
+ .p-1\.5 {
2935
+ padding: 0.375rem;
2936
+ }
2937
+
2926
2938
  .p-2 {
2927
2939
  padding: 0.5rem;
2928
2940
  }
@@ -2943,6 +2955,10 @@ html[data-theme="dark"], html.dark {
2943
2955
  padding: 0.13rem;
2944
2956
  }
2945
2957
 
2958
+ .p-\[0\.1875rem\] {
2959
+ padding: 0.1875rem;
2960
+ }
2961
+
2946
2962
  .p-\[0\.5625rem\] {
2947
2963
  padding: 0.5625rem;
2948
2964
  }
@@ -2997,6 +3013,11 @@ html[data-theme="dark"], html.dark {
2997
3013
  padding-right: 1.5rem;
2998
3014
  }
2999
3015
 
3016
+ .py-0\.5 {
3017
+ padding-top: 0.125rem;
3018
+ padding-bottom: 0.125rem;
3019
+ }
3020
+
3000
3021
  .py-1 {
3001
3022
  padding-top: 0.25rem;
3002
3023
  padding-bottom: 0.25rem;
@@ -3037,6 +3058,11 @@ html[data-theme="dark"], html.dark {
3037
3058
  padding-bottom: 2rem;
3038
3059
  }
3039
3060
 
3061
+ .py-\[0\.125rem\] {
3062
+ padding-top: 0.125rem;
3063
+ padding-bottom: 0.125rem;
3064
+ }
3065
+
3040
3066
  .py-\[0\.19rem\] {
3041
3067
  padding-top: 0.19rem;
3042
3068
  padding-bottom: 0.19rem;
@@ -3186,6 +3212,10 @@ html[data-theme="dark"], html.dark {
3186
3212
  line-height: 1;
3187
3213
  }
3188
3214
 
3215
+ .text-\[\.75rem\] {
3216
+ font-size: .75rem;
3217
+ }
3218
+
3189
3219
  .text-\[\.8125rem\] {
3190
3220
  font-size: .8125rem;
3191
3221
  }
@@ -3914,6 +3944,38 @@ html[data-theme="dark"], html.dark {
3914
3944
  scrollbar-width: none; /* Firefox */
3915
3945
  }
3916
3946
 
3947
+ .\!\[--rui-icon-size\:0\.75rem\] {
3948
+ --rui-icon-size: 0.75rem !important;
3949
+ }
3950
+
3951
+ .\!\[--rui-icon-size\:0\.875rem\] {
3952
+ --rui-icon-size: 0.875rem !important;
3953
+ }
3954
+
3955
+ .\[--rui-icon-size\:1\.125rem\] {
3956
+ --rui-icon-size: 1.125rem;
3957
+ }
3958
+
3959
+ .\!\[--rui-icon-size\:1\.25rem\] {
3960
+ --rui-icon-size: 1.25rem !important;
3961
+ }
3962
+
3963
+ .\!\[--rui-icon-size\:1\.375rem\] {
3964
+ --rui-icon-size: 1.375rem !important;
3965
+ }
3966
+
3967
+ .\!\[--rui-icon-size\:1\.5rem\] {
3968
+ --rui-icon-size: 1.5rem !important;
3969
+ }
3970
+
3971
+ .\!\[--rui-icon-size\:1\.75rem\] {
3972
+ --rui-icon-size: 1.75rem !important;
3973
+ }
3974
+
3975
+ .\!\[--rui-icon-size\:1rem\] {
3976
+ --rui-icon-size: 1rem !important;
3977
+ }
3978
+
3917
3979
  .\[--x-padding\:1rem\] {
3918
3980
  --x-padding: 1rem;
3919
3981
  }
@@ -5491,38 +5553,6 @@ body {
5491
5553
  background-color: rgba(var(--rui-grey-900), var(--tw-bg-opacity, 1));
5492
5554
  }
5493
5555
 
5494
- .\[\&_\.rui-icon\]\:\!h-4 .rui-icon {
5495
- height: 1rem !important;
5496
- }
5497
-
5498
- .\[\&_\.rui-icon\]\:\!h-5 .rui-icon {
5499
- height: 1.25rem !important;
5500
- }
5501
-
5502
- .\[\&_\.rui-icon\]\:\!h-\[1\.375rem\] .rui-icon {
5503
- height: 1.375rem !important;
5504
- }
5505
-
5506
- .\[\&_\.rui-icon\]\:h-\[1\.125rem\] .rui-icon {
5507
- height: 1.125rem;
5508
- }
5509
-
5510
- .\[\&_\.rui-icon\]\:\!w-4 .rui-icon {
5511
- width: 1rem !important;
5512
- }
5513
-
5514
- .\[\&_\.rui-icon\]\:\!w-5 .rui-icon {
5515
- width: 1.25rem !important;
5516
- }
5517
-
5518
- .\[\&_\.rui-icon\]\:\!w-\[1\.375rem\] .rui-icon {
5519
- width: 1.375rem !important;
5520
- }
5521
-
5522
- .\[\&_\.rui-icon\]\:w-\[1\.125rem\] .rui-icon {
5523
- width: 1.125rem;
5524
- }
5525
-
5526
5556
  .\[\&_input\]\:\!pr-0 input {
5527
5557
  padding-right: 0px !important;
5528
5558
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@rotki/ui-library",
5
- "version": "2.17.0",
5
+ "version": "2.17.2",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
8
8
  "contributions": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rotki/ui-library",
3
- "version": "2.17.0",
3
+ "version": "2.17.2",
4
4
  "description": "A vue design system and component library for rotki",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -98,43 +98,41 @@
98
98
  },
99
99
  "devDependencies": {
100
100
  "@fontsource/roboto": "5.2.10",
101
- "@storybook/addon-a11y": "10.3.4",
102
- "@storybook/addon-docs": "10.3.4",
103
- "@storybook/addon-links": "10.3.4",
104
- "@storybook/addon-themes": "10.3.4",
105
- "@storybook/addon-vitest": "10.3.4",
106
- "@storybook/vue3-vite": "10.3.4",
101
+ "@storybook/addon-a11y": "10.3.5",
102
+ "@storybook/addon-docs": "10.3.5",
103
+ "@storybook/addon-links": "10.3.5",
104
+ "@storybook/addon-themes": "10.3.5",
105
+ "@storybook/addon-vitest": "10.3.5",
106
+ "@storybook/vue3-vite": "10.3.5",
107
107
  "@tsconfig/node24": "24.0.4",
108
- "@types/jsdom": "28.0.1",
109
108
  "@types/node": "24.12.2",
110
109
  "@types/tinycolor2": "1.4.6",
111
- "@vitejs/plugin-vue": "6.0.5",
112
- "@vitest/browser": "4.1.2",
113
- "@vitest/browser-playwright": "4.1.2",
114
- "@vitest/coverage-v8": "4.1.2",
115
- "@vitest/ui": "4.1.2",
110
+ "@vitejs/plugin-vue": "6.0.6",
111
+ "@vitest/browser": "4.1.4",
112
+ "@vitest/browser-playwright": "4.1.4",
113
+ "@vitest/coverage-v8": "4.1.4",
114
+ "@vitest/ui": "4.1.4",
116
115
  "@vue/test-utils": "2.4.6",
117
116
  "@vue/tsconfig": "0.9.1",
118
- "autoprefixer": "10.4.27",
117
+ "autoprefixer": "10.5.0",
119
118
  "cac": "7.0.0",
120
119
  "consola": "3.4.2",
121
120
  "fast-glob": "3.3.3",
122
- "fast-xml-parser": "5.5.10",
121
+ "fast-xml-parser": "5.5.12",
123
122
  "fs-extra": "11.3.4",
124
- "happy-dom": "20.8.9",
125
- "jsdom": "28.1.0",
123
+ "happy-dom": "20.9.0",
126
124
  "lucide": "0.577.0",
127
- "msw": "2.13.0",
128
- "postcss": "8.5.8",
129
- "storybook": "10.3.4",
125
+ "msw": "2.13.3",
126
+ "postcss": "8.5.9",
127
+ "storybook": "10.3.5",
130
128
  "tailwindcss": "3.4.19",
131
129
  "tsc-alias": "1.8.16",
132
130
  "tsx": "4.21.0",
133
131
  "typescript": "5.9.3",
134
132
  "unplugin-auto-import": "21.0.0",
135
- "vite": "8.0.7",
133
+ "vite": "8.0.8",
136
134
  "vite-plugin-vue-devtools": "8.1.1",
137
- "vitest": "4.1.2",
135
+ "vitest": "4.1.4",
138
136
  "vue": "3.5.32",
139
137
  "vue-component-meta": "3.2.6",
140
138
  "vue-router": "5.0.4",