@invopop/popui 0.1.14 → 0.1.15

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 (93) hide show
  1. package/dist/BaseButton.svelte +25 -103
  2. package/dist/BaseCard.svelte +35 -30
  3. package/dist/BaseCounter.svelte +11 -8
  4. package/dist/BaseTable.svelte +6 -8
  5. package/dist/BaseTableActions.svelte +2 -2
  6. package/dist/BaseTableCellContent.svelte +2 -2
  7. package/dist/BaseTableHeaderContent.svelte +2 -2
  8. package/dist/Breadcrumb.svelte +40 -0
  9. package/dist/Breadcrumb.svelte.d.ts +4 -0
  10. package/dist/Breadcrumbs.svelte +5 -30
  11. package/dist/ButtonFile.svelte +35 -30
  12. package/dist/ButtonUuidCopy.svelte +2 -2
  13. package/dist/CardCheckbox.svelte +25 -21
  14. package/dist/CardRelation.svelte +12 -16
  15. package/dist/CompanySelector.svelte +35 -7
  16. package/dist/DataListItem.svelte +14 -10
  17. package/dist/DatePicker.svelte +9 -9
  18. package/dist/DrawerContext.svelte +112 -10
  19. package/dist/DrawerContextItem.svelte +19 -29
  20. package/dist/DrawerContextSeparator.svelte +1 -1
  21. package/dist/DrawerContextWorkspace.svelte +7 -7
  22. package/dist/DropdownSelect.svelte +40 -14
  23. package/dist/EmptyState.svelte +40 -0
  24. package/dist/EmptyState.svelte.d.ts +4 -0
  25. package/dist/EmptyStateIllustration.svelte.d.ts +0 -1
  26. package/dist/FeedEvents.svelte +9 -5
  27. package/dist/FeedIconEvent.svelte +1 -1
  28. package/dist/FeedItem.svelte +8 -8
  29. package/dist/FeedItemDetail.svelte +7 -5
  30. package/dist/GlobalSearch.svelte +13 -12
  31. package/dist/InputCheckbox.svelte +2 -5
  32. package/dist/InputError.svelte +4 -9
  33. package/dist/InputLabel.svelte +3 -1
  34. package/dist/InputRadio.svelte +26 -11
  35. package/dist/InputSearch.svelte +8 -8
  36. package/dist/InputSelect.svelte +32 -31
  37. package/dist/InputText.svelte +32 -24
  38. package/dist/InputTextarea.svelte +25 -19
  39. package/dist/InputToggle.svelte +24 -18
  40. package/dist/Notification.svelte +55 -24
  41. package/dist/ProfileAvatar.svelte +41 -14
  42. package/dist/SeparatorHorizontal.svelte +2 -2
  43. package/dist/ShortcutWrapper.svelte +14 -5
  44. package/dist/StatusLabel.svelte +4 -5
  45. package/dist/StepIconList.svelte +7 -9
  46. package/dist/TagBeta.svelte +26 -14
  47. package/dist/TagStatus.svelte +33 -48
  48. package/dist/TitleMain.svelte +1 -1
  49. package/dist/TitleSection.svelte +1 -1
  50. package/dist/UuidCopy.svelte +4 -4
  51. package/dist/alert-dialog/alert-dialog-action.svelte +5 -3
  52. package/dist/alert-dialog/alert-dialog-cancel.svelte +4 -2
  53. package/dist/alert-dialog/alert-dialog-content.svelte +1 -1
  54. package/dist/alert-dialog/alert-dialog-description.svelte +1 -1
  55. package/dist/alert-dialog/alert-dialog-footer.svelte +1 -1
  56. package/dist/alert-dialog/alert-dialog-header.svelte +1 -1
  57. package/dist/alert-dialog/alert-dialog-title.svelte +1 -1
  58. package/dist/button/button.svelte +183 -24
  59. package/dist/button/button.svelte.d.ts +48 -26
  60. package/dist/index.d.ts +2 -7
  61. package/dist/index.js +2 -12
  62. package/dist/range-calendar/range-calendar-cell.svelte +1 -1
  63. package/dist/range-calendar/range-calendar-day.svelte +10 -8
  64. package/dist/range-calendar/range-calendar-head-cell.svelte +1 -1
  65. package/dist/range-calendar/range-calendar-next-button.svelte +3 -3
  66. package/dist/range-calendar/range-calendar-prev-button.svelte +3 -3
  67. package/dist/range-calendar/range-calendar.svelte +1 -1
  68. package/dist/svg/CheckBadge.svelte +18 -0
  69. package/dist/svg/CheckBadge.svelte.d.ts +26 -0
  70. package/dist/svg/IconEmpty.svelte +78 -106
  71. package/dist/table/table-body.svelte +1 -1
  72. package/dist/table/table-cell.svelte +1 -1
  73. package/dist/table/table-footer.svelte +1 -1
  74. package/dist/table/table-head.svelte +1 -1
  75. package/dist/table/table-header.svelte +1 -1
  76. package/dist/table/table-row.svelte +1 -1
  77. package/dist/tabs/tabs-list.svelte +1 -1
  78. package/dist/tailwind.theme.css +969 -0
  79. package/dist/tooltip/tooltip-content.svelte +2 -2
  80. package/dist/types.d.ts +36 -42
  81. package/package.json +2 -2
  82. package/dist/CounterWorkflow.svelte +0 -19
  83. package/dist/CounterWorkflow.svelte.d.ts +0 -4
  84. package/dist/EmptyStateIcon.svelte +0 -52
  85. package/dist/EmptyStateIcon.svelte.d.ts +0 -4
  86. package/dist/FormLayoutModal.svelte +0 -14
  87. package/dist/FormLayoutModal.svelte.d.ts +0 -4
  88. package/dist/ProfileSelector.svelte +0 -41
  89. package/dist/ProfileSelector.svelte.d.ts +0 -4
  90. package/dist/SectionLayout.svelte +0 -13
  91. package/dist/SectionLayout.svelte.d.ts +0 -4
  92. package/dist/tw.theme.d.ts +0 -171
  93. package/dist/tw.theme.js +0 -188
@@ -1,12 +1,12 @@
1
1
  <script lang="ts">
2
2
  import clsx from 'clsx'
3
- import { Warning, Failure, Success } from '@invopop/ui-icons'
3
+ import { Warning, Failure, Success, InfoBold } from '@invopop/ui-icons'
4
4
  import { Icon } from '@steeze-ui/svelte-icon'
5
- import type { NotificationProps, Status } from './types'
5
+ import type { NotificationProps } from './types'
6
6
 
7
- let { message = '', type = 'success', children }: NotificationProps = $props()
7
+ let { title = '', description = '', type = 'neutral', children }: NotificationProps = $props()
8
8
 
9
- function getIcon(type: Status) {
9
+ let icon = $derived.by(() => {
10
10
  switch (type) {
11
11
  case 'success':
12
12
  return Success
@@ -14,31 +14,62 @@
14
14
  return Failure
15
15
  case 'warning':
16
16
  return Warning
17
+ case 'info':
18
+ return InfoBold
19
+ case 'neutral':
20
+ return InfoBold
17
21
  default:
18
- return null
22
+ return InfoBold
19
23
  }
20
- }
21
- let icon = $derived(getIcon(type))
22
- let styles = $derived(
23
- clsx(
24
- { 'bg-positive-50': type === 'success' },
25
- { 'bg-danger-50': type === 'error' },
26
- { 'bg-yellow-50': type === 'warning' }
27
- )
24
+ })
25
+
26
+ let containerStyles = $derived(
27
+ clsx('flex items-center gap-1.5 px-3 py-2 rounded-xl', {
28
+ 'bg-background border border-border': type === 'neutral',
29
+ 'bg-background-info': type === 'info',
30
+ 'bg-background-success': type === 'success',
31
+ 'bg-background-warning': type === 'warning',
32
+ 'bg-background-critical': type === 'error',
33
+ 'min-h-9 rounded-[10px] pl-3 pr-1.5 py-1.5': !description
34
+ })
35
+ )
36
+
37
+ let titleStyles = $derived(
38
+ clsx('text-base font-medium leading-5 tracking-tight', {
39
+ 'text-foreground': type === 'neutral',
40
+ 'text-foreground-info': type === 'info',
41
+ 'text-foreground-success': type === 'success',
42
+ 'text-foreground-warning': type === 'warning',
43
+ 'text-foreground-critical': type === 'error'
44
+ })
28
45
  )
29
- let textStyles = $derived(
30
- clsx(
31
- { 'text-positive-500': type === 'success' },
32
- { 'text-danger-500': type === 'error' },
33
- { 'text-yellow-500': type === 'warning' }
34
- )
46
+
47
+ let iconStyles = $derived(
48
+ clsx('size-4 mt-0.5', {
49
+ 'text-icon': type === 'neutral',
50
+ 'text-icon-info': type === 'info',
51
+ 'text-icon-success': type === 'success',
52
+ 'text-icon-warning': type === 'warning',
53
+ 'text-icon-critical': type === 'error'
54
+ })
35
55
  )
36
56
  </script>
37
57
 
38
- <div class="{styles} pl-3 pr-2 py-2 text-base font-medium rounded-lg flex items-center space-x-1">
39
- {#if icon}
40
- <Icon src={icon} class="h-4 w-4" />
41
- {/if}
42
- <span class="{textStyles} flex-1">{message}</span>
58
+ <div class={containerStyles}>
59
+ <div class="flex items-start self-stretch">
60
+ <div class="relative size-4 shrink-0">
61
+ {#if icon}
62
+ <Icon src={icon} class={iconStyles} />
63
+ {/if}
64
+ </div>
65
+ </div>
66
+ <div class="flex flex-col gap-0.5 grow justify-center min-w-0">
67
+ <p class={titleStyles}>{title}</p>
68
+ {#if description}
69
+ <p class="text-sm text-foreground-default-secondary leading-5 tracking-tight">
70
+ {description}
71
+ </p>
72
+ {/if}
73
+ </div>
43
74
  {@render children?.()}
44
75
  </div>
@@ -1,43 +1,70 @@
1
1
  <script lang="ts">
2
2
  import clsx from 'clsx'
3
3
  import BaseFlag from './BaseFlag.svelte'
4
+ import { Icon } from '@steeze-ui/svelte-icon'
4
5
  import type { ProfileAvatarProps } from './types'
5
6
 
6
7
  let {
7
8
  name = '',
8
- small = false,
9
- large = false,
9
+ variant = 'sm',
10
10
  dark = false,
11
11
  picture = $bindable(''),
12
- country = ''
12
+ country = '',
13
+ icon
13
14
  }: ProfileAvatarProps = $props()
14
15
 
15
- let avatarStyles = $derived(
16
+ let containerStyles = $derived(
16
17
  clsx(
17
- { 'text-sm': !large },
18
- { 'h-4 w-4': small },
19
- { 'h-5 w-5': !large && !small },
20
- { 'h-8 w-8': large },
21
- { 'bg-neutral-50 border-neutral-100 text-neutral-500': !dark },
22
- { 'bg-white-5 border-white-10 text-white-70': dark },
23
- { border: !picture }
18
+ 'border overflow-clip relative flex items-center justify-center',
19
+ { 'size-4 rounded': variant === 'xs' },
20
+ { 'size-5 rounded-md': variant === 'sm' },
21
+ { 'size-7 rounded-md': variant === 'md' },
22
+ { 'size-8 rounded-lg': variant === 'lg' },
23
+ { 'size-10 rounded-lg': variant === 'xl' },
24
+ { 'bg-background-default-default border-border-default-default': !dark },
25
+ { 'border-border-inverse-default': dark }
26
+ )
27
+ )
28
+
29
+ let textStyles = $derived(
30
+ clsx(
31
+ 'font-sans font-medium tracking-tight',
32
+ { 'text-sm leading-4': variant === 'xs' || variant === 'sm' },
33
+ { 'text-base leading-5': variant === 'md' },
34
+ { 'text-lg leading-6': variant === 'lg' },
35
+ { 'text-xl leading-7': variant === 'xl' },
36
+ { 'text-foreground-default-secondary': !dark },
37
+ { 'text-foreground-inverse-secondary': dark }
38
+ )
39
+ )
40
+
41
+ let iconStyles = $derived(
42
+ clsx(
43
+ { 'size-3': variant === 'xs' || variant === 'sm' },
44
+ { 'size-4': variant === 'md' },
45
+ { 'size-[25px]': variant === 'lg' || variant === 'xl' },
46
+ { 'text-icon-default-default': !dark },
47
+ { 'text-icon-inverse-default': dark }
24
48
  )
25
49
  )
26
50
  </script>
27
51
 
28
- <div class="{avatarStyles} rounded flex items-center justify-center font-semibold relative">
52
+ <div class={containerStyles}>
29
53
  {#if picture}
30
54
  <img
31
- class="h-full w-full rounded object-cover"
32
55
  src={picture}
33
56
  alt={name}
57
+ class="absolute inset-0 size-full object-cover bg-background-default-bold"
34
58
  onerror={() => {
35
59
  picture = ''
36
60
  }}
37
61
  />
62
+ {:else if icon}
63
+ <Icon src={icon} class={iconStyles} />
38
64
  {:else}
39
- <span>{name?.charAt(0)}</span>
65
+ <span class={textStyles}>{name?.charAt(0)?.toUpperCase()}</span>
40
66
  {/if}
67
+
41
68
  {#if country}
42
69
  <div class="absolute -bottom-0.5 -right-0.5">
43
70
  <BaseFlag {country} />
@@ -4,8 +4,8 @@
4
4
  .hr-separator {
5
5
  border-image: repeating-linear-gradient(
6
6
  90deg,
7
- rgba(209, 213, 219, 1),
8
- rgba(209, 213, 219, 1) 3px,
7
+ var(--color-border-default-default),
8
+ var(--color-border-default-default) 3px,
9
9
  transparent 3px,
10
10
  transparent 7px
11
11
  );
@@ -1,12 +1,21 @@
1
1
  <script lang="ts">
2
2
  import type { ShortcutWrapperProps } from './types'
3
+ import clsx from 'clsx'
3
4
 
4
- let { children }: ShortcutWrapperProps = $props()
5
+ let { size = 'sm', theme = 'light', children }: ShortcutWrapperProps = $props()
6
+
7
+ const styles = $derived(
8
+ clsx('inline-flex items-center justify-center border', {
9
+ 'size-4 rounded': size === 'sm',
10
+ 'size-5 rounded-md': size === 'md',
11
+ 'bg-background-default-secondary border-border-default-secondary shadow-[0px_1px_0px_rgba(0,0,0,0.06)] text-foreground-default-secondary':
12
+ theme === 'light',
13
+ 'bg-background-inverse-secondary border-border-inverse-secondary shadow-[0px_1px_0px_rgba(255,255,255,0.25)] text-foreground-inverse-secondary':
14
+ theme === 'navigation'
15
+ })
16
+ )
5
17
  </script>
6
18
 
7
- <div
8
- class="h-4 w-4 bg-white-5 rounded border border-white-20 inline-flex items-center justify-center"
9
- style="box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.25);"
10
- >
19
+ <div class={styles}>
11
20
  {@render children?.()}
12
21
  </div>
@@ -7,11 +7,10 @@
7
7
 
8
8
  let styles = $derived(
9
9
  clsx({
10
- 'text-positive-500': status === 'success',
11
- 'text-neutral-500': status === 'queued',
12
- 'text-warning-500': status === 'alert',
13
- 'text-danger-500': status === 'failure',
14
- 'text-yellow-500': status === 'run'
10
+ 'text-foreground-success': status === 'success',
11
+ 'text-foreground-critical': status === 'failure',
12
+ 'text-foreground-attention': ['run', 'alert'].includes(status),
13
+ 'text-foreground-default-secondary': status === 'queued'
15
14
  })
16
15
  )
17
16
  </script>
@@ -13,27 +13,25 @@
13
13
  <div class="flex flex-col space-y-2 sm:flex-row sm:space-y-0 items-center">
14
14
  {#each mainIcons as icon, i (i)}
15
15
  <Tooltip>
16
- <TooltipTrigger class="flex-shrink-0">
16
+ <TooltipTrigger class="shrink-0">
17
17
  <div
18
- class="p-1.5 border rounded-md border-neutral-200 flex items-center space-x-1 bg-white text-neutral-800"
18
+ class="p-1.5 border rounded-md border-border flex items-center space-x-1 bg-background text-icon"
19
19
  >
20
- <img src={icon.url} alt={icon.name} class="w-4 h-4" />
20
+ <img src={icon.url} alt={icon.name} class="size-4" />
21
21
  </div>
22
22
  </TooltipTrigger>
23
23
  <TooltipContent>{icon.name}</TooltipContent>
24
24
  </Tooltip>
25
25
 
26
26
  {#if i < mainIcons.length - 1}
27
- <div class="hidden sm:block h-px w-3 border border-neutral-200 mx-px flex-shrink-0"></div>
27
+ <div class="hidden sm:block h-px w-3 border border-border mx-px shrink-0"></div>
28
28
  {/if}
29
29
  {/each}
30
30
  {#if restIcons.length}
31
- <div class="hidden sm:block h-px w-3 border border-neutral-200 mx-px flex-shrink-0"></div>
31
+ <div class="hidden sm:block h-px w-3 border border-border mx-px shrink-0"></div>
32
32
  <Tooltip>
33
- <TooltipTrigger class="flex-shrink-0">
34
- <div
35
- class="flex items-center justify-center text-neutral-500 font-medium text-base h-7 w-7"
36
- >
33
+ <TooltipTrigger class="shrink-0">
34
+ <div class="flex items-center justify-center text-icon font-medium text-base size-7">
37
35
  +{restIcons.length}
38
36
  </div>
39
37
  </TooltipTrigger>
@@ -1,23 +1,35 @@
1
- <div class="rounded p-px beta-tag relative">
2
- <svg viewBox="0 0 37 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="absolute">
3
- <path
4
- fill-rule="evenodd"
5
- clip-rule="evenodd"
6
- d="M4 4L4 7.5H0V8H4L4 11.5H0V12H4V15.5H0V16H4V20H4.5V16H8V20H8.5V16H12V20H12.5V16H16V20H16.5V16H20V20H20.5V16H24V20H24.5V16H28V20H28.5V16H32V20H32.5V16H37V15.5H32.5V12H37V11.5H32.5V8H37V7.5H32.5V4H37V3.5H32.5V0H32V3.5H28.5V0H28V3.5H24.5V0H24V3.5H20.5V0H20V3.5H16.5V0H16V3.5H12.5V0H12V3.5H8.5V0H8V3.5H4.5V0H4L4 3.5H0V4H4ZM32 4H28.5V7.5H32V4ZM32 8H28.5V11.5H32V8ZM32 12H28.5V15.5H32V12ZM28 12V15.5H24.5V12H28ZM28 8V11.5H24.5V8H28ZM28 4V7.5H24.5V4H28ZM24 4H20.5V7.5H24V4ZM24 8H20.5V11.5H24V8ZM24 12H20.5V15.5H24V12ZM20 12V15.5H16.5V12H20ZM20 8V11.5H16.5V8H20ZM20 4V7.5H16.5V4H20ZM16 4H12.5V7.5H16V4ZM16 8H12.5L12.5 11.5H16L16 8ZM16 12H12.5V15.5H16V12ZM12 12V15.5H8.5V12H12ZM12 8L12 11.5H8.5L8.5 8H12ZM12 4V7.5H8.5V4H12ZM8 4H4.5V7.5H8L8 4ZM8 8H4.5L4.5 11.5H8V8ZM8 12H4.5V15.5H8L8 12Z"
7
- fill="white"
8
- fill-opacity="0.05"
9
- />
10
- </svg>
1
+ <div class="flex gap-2 items-start">
11
2
  <div
12
- class="rounded-[3px] py-px px-1 text-white font-mono"
13
- style="border: 0.5px solid var(--white-60, rgba(255, 255, 255, 0.60));"
3
+ class="beta-tag flex flex-col gap-2 items-start overflow-hidden p-px rounded relative shrink-0"
14
4
  >
15
- Beta
5
+ <div class="border-[0.5px] border-white-60 rounded-[3px] relative shrink-0">
6
+ <div class="flex gap-2 items-start overflow-hidden px-1 py-px rounded-[inherit]">
7
+ <span class="font-medium text-xs leading-4 text-white whitespace-nowrap">Beta</span>
8
+ </div>
9
+ </div>
10
+ <div class="absolute h-5 left-0 right-0 top-0 pointer-events-none">
11
+ <svg
12
+ viewBox="0 0 37 20"
13
+ fill="none"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ class="block max-w-none size-full"
16
+ >
17
+ <path
18
+ fill-rule="evenodd"
19
+ clip-rule="evenodd"
20
+ d="M4 4L4 7.5H0V8H4L4 11.5H0V12H4V15.5H0V16H4V20H4.5V16H8V20H8.5V16H12V20H12.5V16H16V20H16.5V16H20V20H20.5V16H24V20H24.5V16H28V20H28.5V16H32V20H32.5V16H37V15.5H32.5V12H37V11.5H32.5V8H37V7.5H32.5V4H37V3.5H32.5V0H32V3.5H28.5V0H28V3.5H24.5V0H24V3.5H20.5V0H20V3.5H16.5V0H16V3.5H12.5V0H12V3.5H8.5V0H8V3.5H4.5V0H4L4 3.5H0V4H4ZM32 4H28.5V7.5H32V4ZM32 8H28.5V11.5H32V8ZM32 12H28.5V15.5H32V12ZM28 12V15.5H24.5V12H28ZM28 8V11.5H24.5V8H28ZM28 4V7.5H24.5V4H28ZM24 4H20.5V7.5H24V4ZM24 8H20.5V11.5H24V8ZM24 12H20.5V15.5H24V12ZM20 12V15.5H16.5V12H20ZM20 8V11.5H16.5V8H20ZM20 4V7.5H16.5V4H20ZM16 4H12.5V7.5H16V4ZM16 8H12.5L12.5 11.5H16L16 8ZM16 12H12.5V15.5H16V12ZM12 12V15.5H8.5V12H12ZM12 8L12 11.5H8.5L8.5 8H12ZM12 4V7.5H8.5V4H12ZM8 4H4.5V7.5H8L8 4ZM8 8H4.5L4.5 11.5H8V8ZM8 12H4.5V15.5H8L8 12Z"
21
+ fill="white"
22
+ fill-opacity="0.05"
23
+ />
24
+ </svg>
25
+ </div>
16
26
  </div>
17
27
  </div>
18
28
 
19
29
  <style>
20
30
  .beta-tag {
21
- background: linear-gradient(180deg, #0072f5 0%, rgba(0, 77, 164, 0.4) 100%), #0072f5;
31
+ background-image:
32
+ linear-gradient(rgb(0, 114, 245) 0%, rgba(0, 77, 164, 0.4) 100%),
33
+ linear-gradient(90deg, rgb(0, 114, 245) 0%, rgb(0, 114, 245) 100%);
22
34
  }
23
35
  </style>
@@ -5,64 +5,49 @@
5
5
  let { label = '', status = 'grey', dot = false }: TagStatusProps = $props()
6
6
 
7
7
  let tagStyles = $derived(
8
- clsx({
9
- 'bg-positive-100 text-positive-500': status === 'green',
10
- 'border border-positive-200': status === 'green' && dot,
11
- 'bg-yellow-100 text-yellow-500': status === 'yellow',
12
- 'border border-yellow-200': status === 'yellow' && dot,
13
- 'bg-danger-100 text-danger-500': status === 'red',
14
- 'border border-danger-200': status === 'red' && dot,
15
- 'bg-warning-100 text-warning-500': status === 'orange',
16
- 'border border-warning-200': status === 'orange' && dot,
17
- 'bg-blue-100 text-blue-500': status === 'blue',
18
- 'border border-blue-200': status === 'blue' && dot,
19
- 'bg-purple-100 text-purple-500': status === 'purple',
20
- 'border border-purple-200': status === 'purple' && dot,
21
- 'bg-olive-100 text-olive-500': status === 'olive',
22
- 'border border-olive-200': status === 'olive' && dot,
23
- 'bg-teal-100 text-teal-500': status === 'teal',
24
- 'border border-teal-200': status === 'teal' && dot,
25
- 'bg-crimson-100 text-crimson-500': status === 'crimson',
26
- 'border border-crimson-200': status === 'crimson' && dot,
27
- 'bg-blue-violet-100 text-blue-violet-500': status === 'blueViolet',
28
- 'border border-blue-violet-200': status === 'blueViolet' && dot,
29
- 'bg-steel-blue-100 text-steel-blue-500': status === 'steelBlue',
30
- 'border border-steel-blue-200': status === 'steelBlue' && dot,
31
- 'border border-dashed border-neutral-200 text-neutral-400': status === 'empty',
32
- 'bg-neutral-100 text-neutral-500': status === 'grey',
33
- 'border border-neutral-200': status === 'grey' && dot,
34
- 'pl-1.5 pr-[5px] py-0.5': dot && label,
35
- 'p-0.5': dot && !label,
36
- 'px-1 py-0.5': !dot
8
+ clsx('rounded inline-flex items-center text-xs font-medium gap-1 box-border leading-4 py-0.5', {
9
+ 'bg-background-status-paid text-foreground-status-paid': status === 'green',
10
+ 'bg-background-status-processing text-foreground-status-processing': status === 'yellow',
11
+ 'bg-background-status-error text-foreground-status-error': status === 'red',
12
+ 'bg-background-status-draft text-foreground-status-draft': status === 'orange',
13
+ 'bg-background-status-sent text-foreground-status-sent': status === 'blue',
14
+ 'bg-background-status-registered text-foreground-status-registered': status === 'purple',
15
+ 'bg-background-status-completed text-foreground-status-completed': status === 'teal',
16
+ 'bg-background-status-received text-foreground-status-received': status === 'steelBlue',
17
+ 'bg-background-status-rejected text-foreground-status-rejected': status === 'crimson',
18
+ 'bg-sherwood-alpha-10 text-sherwood-60': status === 'olive',
19
+ 'bg-background-status-void text-foreground-default-secondary': status === 'grey',
20
+ 'border border-dashed border-border-default-secondary text-foreground-default-secondary':
21
+ status === 'empty',
22
+ 'px-1.5': dot,
23
+ 'p-1!': dot && !label,
24
+ 'px-1': !dot
37
25
  })
38
26
  )
39
27
 
40
28
  let dotStyles = $derived(
41
- clsx({
42
- 'bg-positive-500': status === 'green',
43
- 'bg-yellow-500': status === 'yellow',
44
- 'bg-danger-500': status === 'red',
45
- 'bg-warning-500': status === 'orange',
46
- 'bg-blue-500': status === 'blue',
47
- 'bg-purple-500': status === 'purple',
48
- 'bg-olive-500': status === 'olive',
49
- 'bg-teal-500': status === 'teal',
50
- 'bg-crimson-500': status === 'crimson',
51
- 'bg-blue-violet-500': status === 'blueViolet',
52
- 'bg-neutral-300': status === 'empty',
53
- 'bg-neutral-500': status === 'grey'
29
+ clsx('rounded-[2px] shrink-0', {
30
+ 'bg-icon-status-paid': status === 'green',
31
+ 'bg-icon-status-processing': status === 'yellow',
32
+ 'bg-icon-status-error': status === 'red',
33
+ 'bg-icon-status-draft': status === 'orange',
34
+ 'bg-icon-status-sent': status === 'blue',
35
+ 'bg-icon-status-registered': status === 'purple',
36
+ 'bg-icon-status-completed': status === 'teal',
37
+ 'bg-icon-status-received': status === 'steelBlue',
38
+ 'bg-icon-status-rejected': status === 'crimson',
39
+ 'bg-sherwood-50': status === 'olive',
40
+ 'bg-icon-status-void': status === 'grey',
41
+ 'bg-icon-default-secondary': status === 'empty'
54
42
  })
55
43
  )
56
44
  </script>
57
45
 
58
- <span
59
- class:h-5={Boolean(label)}
60
- class="{tagStyles} rounded text-sm inline-flex items-center font-medium gap-1 box-border"
61
- >
46
+ <span class={tagStyles}>
62
47
  {#if dot}
63
- <span class="{dotStyles} w-2 h-2 rounded-sm"></span>
48
+ <span class="{dotStyles} size-2"></span>
64
49
  {/if}
65
50
  {#if label}
66
- <span>{label}</span>
51
+ <span class="whitespace-nowrap">{label}</span>
67
52
  {/if}
68
53
  </span>
@@ -4,7 +4,7 @@
4
4
  let { title = '', children }: TitleMainProps = $props()
5
5
  </script>
6
6
 
7
- <h1 class="text-neutral-800 font-medium text-lg font-sans tracking-tightest">
7
+ <h1 class="text-foreground font-medium text-lg">
8
8
  {#if children}
9
9
  {@render children()}
10
10
  {:else}
@@ -4,7 +4,7 @@
4
4
  let { title = '', children }: TitleSectionProps = $props()
5
5
  </script>
6
6
 
7
- <h1 class="text-neutral-800 font-medium text-lg font-sans tracking-tighter">
7
+ <h1 class="text-foreground font-medium text-lg">
8
8
  {#if children}
9
9
  {@render children()}
10
10
  {:else}
@@ -35,11 +35,11 @@
35
35
  'justify-end': rightAlign,
36
36
  'text-sm': small,
37
37
  'text-base': !small,
38
- 'text-neutral-800': dark,
39
- 'text-neutral-500': !dark,
38
+ 'text-foreground': dark,
39
+ 'text-foreground-default-secondary': !dark,
40
40
  'justify-between': !compact,
41
41
  'w-full': full,
42
- 'border border-neutral-800/10 rounded-md pl-2.5 pr-2 py-[5px]': !full
42
+ 'border border-border rounded-md pl-2.5 pr-2 py-[5px]': !full
43
43
  })
44
44
  )
45
45
 
@@ -65,6 +65,6 @@
65
65
  {formattedUuid}
66
66
  </button>
67
67
  <button class="p-1 cursor-pointer" onclick={handleIconClick}>
68
- <Icon src={link ? ExternalLink : Duplicate} class="w-4 h-4 text-neutral-500" />
68
+ <Icon src={link ? ExternalLink : Duplicate} class="w-4 h-4 text-foreground-default-secondary" />
69
69
  </button>
70
70
  </div>
@@ -10,14 +10,16 @@
10
10
  ...restProps
11
11
  }: AlertDialogPrimitive.ActionProps & { destructive: boolean } = $props()
12
12
 
13
- let variant = $derived((destructive ? 'destructive' : 'primary') as ButtonVariant)
13
+ let variant = $derived((destructive ? 'danger' : 'primary') as ButtonVariant)
14
14
  </script>
15
15
 
16
16
  <AlertDialogPrimitive.Action
17
17
  bind:ref
18
18
  data-slot="alert-dialog-action"
19
- class={cn(buttonVariants({ variant }), className)}
19
+ class={cn(buttonVariants({ variant }), 'group', className)}
20
20
  {...restProps}
21
21
  >
22
- {@render children?.()}
22
+ <div class="inline-flex items-center transition-transform group-active:translate-y-px">
23
+ {@render children?.()}
24
+ </div>
23
25
  </AlertDialogPrimitive.Action>
@@ -13,9 +13,11 @@
13
13
  <AlertDialogPrimitive.Cancel
14
14
  bind:ref
15
15
  data-slot="alert-dialog-cancel"
16
- class={cn(buttonVariants({ variant: 'secondary' }), 'mt-2 sm:mt-0', className)}
16
+ class={cn(buttonVariants({ variant: 'secondary' }), 'group mt-2 sm:mt-0', className)}
17
17
  {onkeydown}
18
18
  {...restProps}
19
19
  >
20
- {@render children?.()}
20
+ <div class="inline-flex items-center transition-transform group-active:translate-y-px">
21
+ {@render children?.()}
22
+ </div>
21
23
  </AlertDialogPrimitive.Cancel>
@@ -18,7 +18,7 @@
18
18
  bind:ref
19
19
  data-slot="alert-dialog-content"
20
20
  class={cn(
21
- 'bg-white fixed left-[50%] top-[50%] z-[1002] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5 pt-3 px-4 pb-4 sm:rounded-lg md:w-full',
21
+ 'bg-background fixed left-1/2 top-1/2 z-[1002] flex flex-col w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-xl overflow-clip',
22
22
  className
23
23
  )}
24
24
  >
@@ -12,7 +12,7 @@
12
12
  bind:ref
13
13
  data-slot="alert-dialog-description"
14
14
  class={cn(
15
- 'text-neutral-500 text-base flex flex-col space-y-2 justify-start items-start !mt-2',
15
+ 'text-base font-normal leading-5 tracking-tight text-foreground-default-secondary',
16
16
  className
17
17
  )}
18
18
  >
@@ -11,7 +11,7 @@
11
11
  <div
12
12
  bind:this={ref}
13
13
  data-slot="alert-dialog-footer"
14
- class={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-3', className)}
14
+ class={cn('flex gap-3 justify-end px-3 pb-3', className)}
15
15
  >
16
16
  {@render children?.()}
17
17
  </div>
@@ -11,7 +11,7 @@
11
11
  <div
12
12
  bind:this={ref}
13
13
  data-slot="alert-dialog-header"
14
- class={cn('flex flex-col space-y-1 text-center sm:text-left', className)}
14
+ class={cn('flex flex-col gap-1 px-4 py-3', className)}
15
15
  >
16
16
  {@render children?.()}
17
17
  </div>
@@ -11,7 +11,7 @@
11
11
  <AlertDialogPrimitive.Title
12
12
  bind:ref
13
13
  data-slot="alert-dialog-title"
14
- class={cn('text-lg font-semibold text-neutral-800', className)}
14
+ class={cn('text-lg font-semibold leading-6 tracking-tight text-foreground', className)}
15
15
  >
16
16
  {@render children?.()}
17
17
  </AlertDialogPrimitive.Title>