@invopop/popui 0.1.15 → 0.1.16

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 (45) hide show
  1. package/dist/BaseDropdown.svelte +3 -3
  2. package/dist/BaseTable.svelte +5 -7
  3. package/dist/BaseTableActions.svelte +2 -4
  4. package/dist/BaseTableCellContent.svelte +3 -5
  5. package/dist/BaseTableCheckbox.svelte +8 -10
  6. package/dist/BaseTableHeaderContent.svelte +2 -2
  7. package/dist/BaseTableRow.svelte +12 -10
  8. package/dist/ButtonFile.svelte +1 -1
  9. package/dist/ButtonUuidCopy.svelte +2 -1
  10. package/dist/CardCheckbox.svelte +1 -1
  11. package/dist/CardRelation.svelte +2 -2
  12. package/dist/DatePicker.svelte +10 -8
  13. package/dist/DrawerContext.svelte +19 -18
  14. package/dist/DrawerContextItem.svelte +3 -5
  15. package/dist/DrawerContextSeparator.svelte +1 -1
  16. package/dist/DropdownSelect.svelte +22 -26
  17. package/dist/EmptyState.svelte +4 -2
  18. package/dist/FeedIconStatus.svelte +1 -1
  19. package/dist/FeedItemDetail.svelte +8 -1
  20. package/dist/InputRadio.svelte +1 -1
  21. package/dist/InputSearch.svelte +1 -1
  22. package/dist/InputText.svelte +2 -2
  23. package/dist/InputTextarea.svelte +2 -2
  24. package/dist/MenuItem.svelte +9 -8
  25. package/dist/MenuItemCollapsible.svelte +4 -4
  26. package/dist/Notification.svelte +9 -5
  27. package/dist/ProfileAvatar.svelte +5 -3
  28. package/dist/ShortcutWrapper.svelte +2 -2
  29. package/dist/StepIconList.svelte +7 -3
  30. package/dist/TagStatus.svelte +21 -18
  31. package/dist/button/button.svelte +25 -10
  32. package/dist/button/button.svelte.d.ts +2 -2
  33. package/dist/index.d.ts +3 -3
  34. package/dist/index.js +1 -1
  35. package/dist/range-calendar/range-calendar-day.svelte +1 -1
  36. package/dist/sonner/sonner.svelte +7 -9
  37. package/dist/table/table-cell.svelte +1 -1
  38. package/dist/table/table-head.svelte +1 -1
  39. package/dist/table/table-row.svelte +1 -1
  40. package/dist/tabs/tabs-list.svelte +8 -2
  41. package/dist/tabs/tabs-list.svelte.d.ts +4 -1
  42. package/dist/tabs/tabs-trigger.svelte +5 -3
  43. package/dist/tabs/tabs-trigger.svelte.d.ts +4 -1
  44. package/dist/tailwind.theme.css +16 -4
  45. package/package.json +1 -1
@@ -10,6 +10,7 @@
10
10
  fullWidth = false,
11
11
  placement = 'bottom-end',
12
12
  matchParentWidth = false,
13
+ class: className = '',
13
14
  trigger,
14
15
  children,
15
16
  ...rest
@@ -49,10 +50,9 @@
49
50
  }
50
51
  </script>
51
52
 
52
- <div class="inline-flex" class:w-full={fullWidth} role="menu">
53
+ <div class="flex {className}" class:w-full={fullWidth} role="menu">
53
54
  <button
54
- class="cursor-pointer text-left"
55
- class:w-full={fullWidth}
55
+ class="cursor-pointer text-left w-full min-w-0"
56
56
  use:floatingRef
57
57
  {...rest}
58
58
  onclick={handleClick}
@@ -241,7 +241,7 @@
241
241
  }}
242
242
  />
243
243
 
244
- <div class="h-full w-full font-sans border rounded-md border-border overflow-auto">
244
+ <div class="h-full w-full font-sans rounded-md overflow-auto">
245
245
  <Table class="hidden md:table" {...rest}>
246
246
  <colgroup>
247
247
  {#if selectable}
@@ -261,7 +261,6 @@
261
261
  <TableHead class="bg-white sticky top-0 z-10 p-0 h-9">
262
262
  {#if !hideSelectAll}
263
263
  <BaseTableCheckbox
264
- hidden={!selectedRows.length}
265
264
  {indeterminate}
266
265
  checked={allChecked}
267
266
  onChecked={() => {
@@ -293,13 +292,12 @@
293
292
  <th
294
293
  scope="colgroup"
295
294
  colspan={fields.length + (selectable ? 2 : 1)}
296
- class="bg-white text-left text-sm font-medium text-foreground-default-secondary sticky top-9 tracking-normal h-8 z-10"
295
+ class="bg-white text-left text-base font-normal text-foreground-default-secondary sticky top-9 tracking-normal h-8 z-10"
297
296
  >
298
297
  <span
299
- class:border-t={i > 0}
300
- class:pl-12={selectable}
301
- class:pl-3={!selectable}
302
- class="flex items-center space-x-1 box-border border-b border-border h-8"
298
+ class:pl-13={selectable}
299
+ class:pl-6={!selectable}
300
+ class="flex items-center space-x-1 box-border border-b border-border h-9"
303
301
  >
304
302
  <span>{group.label}</span>
305
303
  {#if !hideCounter}
@@ -5,6 +5,7 @@
5
5
  import DrawerContext from './DrawerContext.svelte'
6
6
  import { Options } from '@invopop/ui-icons'
7
7
  import clsx from 'clsx'
8
+ import BaseButton from './BaseButton.svelte'
8
9
 
9
10
  let { actions, onclick }: BaseTableActionsProps = $props()
10
11
 
@@ -34,10 +35,7 @@
34
35
  </script>
35
36
 
36
37
  {#snippet trigger()}
37
- <div class="relative group flex justify-center items-center rounded p-1 cursor-pointer">
38
- <span class="{overlayClasses} absolute inset-0 rounded"></span>
39
- <Icon src={Options} class="w-4 text-neutral-500" />
40
- </div>
38
+ <BaseButton variant="ghost" aria-label="Row actions" icon={Options} />
41
39
  {/snippet}
42
40
 
43
41
  <BaseDropdown bind:isOpen bind:this={actionDropdown} {trigger}>
@@ -18,10 +18,10 @@
18
18
  </script>
19
19
 
20
20
  <div class="flex flex-col">
21
- <span class="md:hidden text-sm text-neutral-60 font-normal">
21
+ <span class="md:hidden text-sm font-normal">
22
22
  {field.headerLabel}
23
23
  </span>
24
- <span class="flex items-center" class:justify-end={field.rightAlign}>
24
+ <span class="flex items-center gap-2" class:justify-end={field.rightAlign}>
25
25
  {#if field.isCountry && data}
26
26
  <span class="flex items-center space-x-1">
27
27
  <BaseFlag country={String(data)} width={16} />
@@ -34,9 +34,7 @@
34
34
  <span class="md:hidden">{data ? data : badge || status ? '' : '-'}</span>
35
35
  {/if}
36
36
  {#if badge}
37
- <span class:ml-2={!!data}>
38
- <TagStatus label={badge.label} status={badge.status} dot={Boolean(badge.dot)} />
39
- </span>
37
+ <TagStatus label={badge.label} status={badge.status} dot={Boolean(badge.dot)} />
40
38
  {/if}
41
39
  {#if status}
42
40
  <span class:ml-2={!!data}>
@@ -20,16 +20,14 @@
20
20
  role="checkbox"
21
21
  aria-checked={checked}
22
22
  bind:this={checkboxButton}
23
- class="absolute inset-0 h-full w-full flex items-center justify-center outline-none group cursor-default"
23
+ class="h-full w-full flex items-center justify-center outline-none group cursor-default"
24
24
  onclick={handleClick}
25
25
  >
26
- <div class:invisible={hidden} class="group-hover:visible">
27
- <InputCheckbox
28
- {checked}
29
- {indeterminate}
30
- onchange={(changed) => {
31
- onChecked?.(changed)
32
- }}
33
- />
34
- </div>
26
+ <InputCheckbox
27
+ {checked}
28
+ {indeterminate}
29
+ onchange={(changed) => {
30
+ onChecked?.(changed)
31
+ }}
32
+ />
35
33
  </button>
@@ -29,7 +29,7 @@
29
29
  {#if field.sortable}
30
30
  {#snippet trigger()}
31
31
  <span
32
- class="{headerStyles} w-full p-3 flex items-center justify-start space-x-1 text-left text-base tracking-normal whitespace-nowrap font-normal"
32
+ class="{headerStyles} w-full px-3 py-2.5 flex items-center justify-start space-x-1 text-left text-base tracking-normal whitespace-nowrap font-normal"
33
33
  >
34
34
  <span class="w-full" class:text-right={field.rightAlign}>{field.headerLabel}</span>
35
35
  {#if sortBy === field.slug}
@@ -59,7 +59,7 @@
59
59
  </BaseDropdown>
60
60
  {:else}
61
61
  <div
62
- class="{headerStyles} p-3 text-left text-base font-normal tracking-normal whitespace-nowrap"
62
+ class="{headerStyles} px-3 py-2.5 text-left text-base font-normal tracking-normal whitespace-nowrap"
63
63
  >
64
64
  <div class="h-5">{field.headerLabel}</div>
65
65
  </div>
@@ -87,19 +87,21 @@
87
87
  >
88
88
  {#if selectable}
89
89
  <TableCell>
90
- <BaseTableCheckbox
91
- bind:checkboxButton
92
- {checked}
93
- hidden={selectedRows.length === 0}
94
- {onChecked}
95
- />
90
+ <BaseTableCheckbox bind:checkboxButton {checked} {onChecked} />
96
91
  </TableCell>
97
92
  {/if}
98
93
  {#each fields as field, i (i)}
94
+ {@const extraPaddingLeft = i === 0 && !selectable}
95
+ {@const extraPaddingRight = i === fields.length - 1 && !actions.length}
99
96
  <TableCell
100
- class="{i === 0 && !selectable ? 'pl-6' : 'pl-3'} {i === fields.length - 1 && !actions.length
101
- ? 'pr-6'
102
- : 'pr-3'}"
97
+ class={clsx({
98
+ 'font-medium': i === 0,
99
+ 'pl-6': extraPaddingLeft,
100
+ 'pl-3': !extraPaddingLeft,
101
+ 'pr-6': extraPaddingRight,
102
+ 'pr-3': !extraPaddingRight,
103
+ 'py-2': field.copy
104
+ })}
103
105
  >
104
106
  <BaseTableCellContent
105
107
  {field}
@@ -112,7 +114,7 @@
112
114
  </TableCell>
113
115
  {/each}
114
116
  {#if actions.length}
115
- <TableCell>
117
+ <TableCell class="py-2">
116
118
  <BaseTableActions
117
119
  bind:this={actionsDropdown}
118
120
  {actions}
@@ -34,7 +34,7 @@
34
34
 
35
35
  <button
36
36
  class={cn(
37
- 'flex items-center gap-3 px-2 py-1.5 rounded-[10px] w-full hover:bg-background-default-secondary',
37
+ 'flex items-center gap-3 px-2 py-1.5 rounded-[10px] w-full hover:bg-background-default-secondary cursor-pointer',
38
38
  disabled && 'opacity-30 pointer-events-none',
39
39
  className
40
40
  )}
@@ -28,9 +28,10 @@
28
28
 
29
29
  <BaseButton
30
30
  {disabled}
31
- size="lg"
31
+ size="sm"
32
32
  icon={Duplicate}
33
33
  iconPosition="right"
34
+ variant="ghost"
34
35
  onclick={async () => {
35
36
  await navigator.clipboard.writeText(uuid)
36
37
  oncopied?.(uuid)
@@ -31,7 +31,7 @@
31
31
  <div class={containerStyles}>
32
32
  <div class="flex grow items-start gap-1 min-w-0">
33
33
  {#if icon}
34
- <Icon src={icon} class="size-5 text-icon shrink-0" />
34
+ <Icon src={icon} class="size-4 text-icon shrink-0 mt-0.5" />
35
35
  {/if}
36
36
  <div class="flex flex-col gap-1 min-w-0">
37
37
  <span class="text-base font-medium text-foreground">
@@ -10,13 +10,13 @@
10
10
  <button class="flex items-center gap-3 px-3 py-2 w-full cursor-pointer" {onclick}>
11
11
  <div class="flex grow items-center gap-1.5 min-w-0">
12
12
  {#if icon}
13
- <Icon src={icon} class="size-4 text-foreground shrink-0" />
13
+ <Icon src={icon} class="size-4 text-icon shrink-0" />
14
14
  {/if}
15
15
  <span class="text-base font-medium text-foreground whitespace-nowrap">
16
16
  {title}
17
17
  </span>
18
18
  </div>
19
- <Icon src={ChevronRight} class="size-3 text-foreground shrink-0" />
19
+ <Icon src={ChevronRight} class="size-3 text-icon shrink-0" />
20
20
  </button>
21
21
  <div class="flex flex-col gap-2 px-3 pb-3 pt-2">
22
22
  {#each items as item}
@@ -120,7 +120,7 @@
120
120
  start: undefined,
121
121
  end: undefined
122
122
  })
123
- let isOpen = $state(false)
123
+ let isOpen = $state(true)
124
124
  let styles = $derived(
125
125
  clsx({
126
126
  'border-border-selected-bold shadow-active': isOpen,
@@ -188,7 +188,7 @@
188
188
  onclick={() => {
189
189
  isOpen = !isOpen
190
190
  }}
191
- class="{styles} datepicker-trigger w-full py-1.25 pl-7 pr-8 border rounded-md text-foreground placeholder-foreground text-base cursor-pointer"
191
+ class="{styles} datepicker-trigger w-full py-1.25 pl-7 pr-8 border rounded-lg text-foreground placeholder-foreground text-base cursor-pointer"
192
192
  >
193
193
  {selectedLabel}
194
194
  </button>
@@ -209,21 +209,21 @@
209
209
  <div
210
210
  class:left-0={position === 'left'}
211
211
  class:right-0={position === 'right'}
212
- class="bg-white inline-flex flex-col shadow-md rounded-lg absolute right-0 top-2 z-40"
212
+ class="bg-white inline-flex flex-col shadow-lg rounded-xl absolute right-0 top-2 z-40 border border-border"
213
213
  use:clickOutside
214
214
  onclick_outside={() => {
215
215
  if (!isOpen) return
216
216
  cancel()
217
217
  }}
218
218
  >
219
- <div class="flex border-b border-border min-h-[300px] rounded-lg shadow-calendar">
219
+ <div class="flex border-b border-border min-h-[300px] shadow-calendar">
220
220
  <div class="flex flex-col space-y-2 items-start p-3 border-r border-border">
221
221
  {#each periods as period}
222
222
  <button
223
223
  onclick={period.action}
224
224
  class="{selectedPeriod === period.slug
225
- ? 'selected-period text-foreground-accent bg-foreground-accent/10'
226
- : 'text-foreground-default-secondary'} whitespace-nowrap text-base px-2 py-1 tracking-normal rounded cursor-pointer"
225
+ ? 'selected-period text-foreground-selected bg-background-selected font-medium'
226
+ : 'text-foreground-default-secondary'} whitespace-nowrap text-base px-2 py-1 tracking-normal rounded-md cursor-pointer"
227
227
  >
228
228
  {period.label}
229
229
  </button>
@@ -232,8 +232,10 @@
232
232
  <RangeCalendar bind:value numberOfMonths={2} />
233
233
  </div>
234
234
  <div class="p-3 flex justify-end items-center space-x-3">
235
- <BaseButton variant="secondary" onclick={cancel}>Cancel</BaseButton>
236
- <BaseButton variant="primary" onclick={confirm} disabled={!value.end}>Confirm</BaseButton>
235
+ <BaseButton variant="secondary" size="lg" onclick={cancel}>Cancel</BaseButton>
236
+ <BaseButton variant="primary" size="lg" onclick={confirm} disabled={!value.end}
237
+ >Confirm</BaseButton
238
+ >
237
239
  </div>
238
240
  </div>
239
241
  </Transition>
@@ -68,8 +68,18 @@
68
68
  }
69
69
  </script>
70
70
 
71
+ {#snippet drawerItem(item: DrawerOption)}
72
+ {#if item.separator}
73
+ <DrawerContextSeparator />
74
+ {:else}
75
+ <div class:px-1={!item.groupBy}>
76
+ <DrawerContextItem {item} {multiple} {onclick} onchange={updateItem} />
77
+ </div>
78
+ {/if}
79
+ {/snippet}
80
+
71
81
  <div
72
- class="{widthClass} border border-border rounded-2xl shadow-lg bg-white overflow-hidden flex flex-col"
82
+ class="{widthClass} border border-border rounded-2xl shadow-lg bg-white overflow-hidden flex flex-col py-1 max-h-[400px] overflow-y-auto"
73
83
  >
74
84
  {@render children?.()}
75
85
 
@@ -77,9 +87,9 @@
77
87
  {#each groups as group, index}
78
88
  {@const groupItems = groupedItems.get(group.slug) || []}
79
89
  {@const isLastGroup = index === groups!.length - 1}
80
- <div class="flex-shrink-0 {!isLastGroup ? 'border-b border-border' : ''}">
90
+ <div class="flex-shrink-0 px-1">
81
91
  <button
82
- class="cursor-pointer flex items-center justify-between h-9 pl-3 pr-2.5 py-2.5 text-sm font-medium text-foreground-default-secondary w-full hover:bg-background-default-secondary rounded-lg overflow-clip"
92
+ class="cursor-pointer flex items-center justify-between h-8 pl-2.5 pr-2.5 py-2.5 text-base font-medium text-foreground-default-secondary w-full hover:bg-background-default-secondary rounded-lg overflow-clip"
83
93
  onclick={() => toggleGroup(group.slug)}
84
94
  >
85
95
  <div class="flex items-center gap-1.5">
@@ -111,32 +121,23 @@
111
121
  {:else}
112
122
  <div class="max-h-[400px] overflow-y-auto">
113
123
  {#each groupItems as item}
114
- {#if item.separator}
115
- <DrawerContextSeparator />
116
- {:else}
117
- <div class="px-1">
118
- <DrawerContextItem {item} {multiple} {onclick} onchange={updateItem} />
119
- </div>
120
- {/if}
124
+ {@render drawerItem(item)}
121
125
  {/each}
122
126
  </div>
123
127
  {/if}
124
128
  </div>
125
129
  {/if}
126
130
  </div>
131
+ {#if !isLastGroup}
132
+ <DrawerContextSeparator />
133
+ {/if}
127
134
  {/each}
128
135
  {/if}
129
136
 
130
137
  {#if ungroupedItems.length}
131
- <div class="flex-shrink-0 max-h-[400px] overflow-y-auto">
138
+ <div class="flex-shrink-0">
132
139
  {#each ungroupedItems as item}
133
- {#if item.separator}
134
- <DrawerContextSeparator />
135
- {:else}
136
- <div class="px-1">
137
- <DrawerContextItem {item} {multiple} {onclick} onchange={updateItem} />
138
- </div>
139
- {/if}
140
+ {@render drawerItem(item)}
140
141
  {/each}
141
142
  </div>
142
143
  {/if}
@@ -21,9 +21,7 @@
21
21
 
22
22
  let styles = $derived(
23
23
  clsx(
24
- 'py-1.5 space-x-1.5',
25
- { 'pl-1.5': !item.icon },
26
- { 'pl-2': item.icon },
24
+ 'px-2 py-1.5 space-x-1.5',
27
25
  { 'bg-background-selected': item.selected && !multiple },
28
26
  {
29
27
  'group-hover:bg-background-default-secondary':
@@ -57,11 +55,11 @@
57
55
 
58
56
  <button
59
57
  bind:this={el}
60
- class="cursor-pointer w-full py-0.5 disabled:opacity-30 group"
58
+ class="cursor-pointer w-full disabled:opacity-30 group"
61
59
  disabled={item.disabled}
62
60
  onclick={handleClick}
63
61
  >
64
- <div class="{styles} rounded pr-2 flex items-center justify-start w-full">
62
+ <div class="{styles} rounded-md pr-2 flex items-center justify-start w-full">
65
63
  {#if item.icon}
66
64
  <Icon
67
65
  src={item.icon}
@@ -1 +1 @@
1
- <li class="bg-border h-px w-full"></li>
1
+ <li class="bg-border h-px w-full my-1"></li>
@@ -44,7 +44,7 @@
44
44
  (!multiple && items.find((i) => i.selected)?.iconClass) || 'text-neutral-500'
45
45
  )
46
46
  let selectedLabel = $derived(
47
- `${selectedItems[0]?.label || ''}${selectedItems.length > 1 ? ' and more...' : ''}` ||
47
+ `${selectedItems[0]?.label || ''}${selectedItems.length > 1 ? ' and more and more and more and more and more and more' : ''}` ||
48
48
  placeholder
49
49
  )
50
50
 
@@ -75,23 +75,31 @@
75
75
  }
76
76
  </script>
77
77
 
78
- <BaseDropdown bind:isOpen placement="bottom-start" {fullWidth} bind:this={selectDropdown}>
78
+ {#snippet label()}
79
+ <span
80
+ class="flex-1 text-base truncate {selectedItems.length
81
+ ? 'text-foreground'
82
+ : 'text-foreground-default-secondary'}"
83
+ >
84
+ {selectedLabel}
85
+ </span>
86
+ {/snippet}
87
+
88
+ <BaseDropdown
89
+ bind:isOpen
90
+ placement="bottom-start"
91
+ {fullWidth}
92
+ bind:this={selectDropdown}
93
+ class={fullWidth ? '' : widthClass}
94
+ >
79
95
  {#snippet trigger()}
80
96
  <div
81
- class="{styles} dropdown-select flex items-center rounded-lg py-1.5 px-2 bg-background whitespace-nowrap {fullWidth
82
- ? 'w-full'
83
- : widthClass}"
97
+ class="{styles} dropdown-select flex items-center rounded-lg py-1.5 pl-2 pr-[28px] bg-background overflow-hidden w-full h-8"
84
98
  >
85
99
  {#if selectedColor}
86
100
  <div class="flex items-center gap-1 flex-1 min-w-0">
87
101
  <TagStatus dot status={selectedColor} />
88
- <span
89
- class="flex-1 text-sm truncate {selectedItems.length
90
- ? 'text-foreground'
91
- : 'text-foreground-default-secondary'}"
92
- >
93
- {selectedLabel}
94
- </span>
102
+ {@render label()}
95
103
  </div>
96
104
  {:else if selectedIcon || resolvedIcon}
97
105
  <div class="flex items-center gap-1 flex-1 min-w-0">
@@ -100,22 +108,10 @@
100
108
  {:else if resolvedIcon}
101
109
  <Icon src={resolvedIcon} {iconTheme} class="text-icon size-4 flex-shrink-0" />
102
110
  {/if}
103
- <span
104
- class="flex-1 text-sm truncate {selectedItems.length
105
- ? 'text-foreground'
106
- : 'text-foreground-default-secondary'}"
107
- >
108
- {selectedLabel}
109
- </span>
111
+ {@render label()}
110
112
  </div>
111
113
  {:else}
112
- <span
113
- class="flex-1 text-sm truncate {selectedItems.length
114
- ? 'text-foreground'
115
- : 'text-foreground-default-secondary'}"
116
- >
117
- {selectedLabel}
118
- </span>
114
+ {@render label()}
119
115
  {/if}
120
116
  </div>
121
117
  {/snippet}
@@ -14,7 +14,7 @@
14
14
  }: EmptyStateProps = $props()
15
15
  </script>
16
16
 
17
- <div class="flex flex-col items-center justify-center gap-4">
17
+ <div class="flex flex-col items-center justify-center">
18
18
  {#if icon}
19
19
  <div class="relative h-[120px] w-[352px] max-w-sm flex items-center justify-center">
20
20
  {@render icon()}
@@ -35,6 +35,8 @@
35
35
  <p class="text-foreground-default-secondary text-base">{description}</p>
36
36
  </div>
37
37
  {#if children}
38
- {@render children()}
38
+ <div class="mt-4">
39
+ {@render children()}
40
+ </div>
39
41
  {/if}
40
42
  </div>
@@ -24,7 +24,7 @@
24
24
 
25
25
  {#if iconStatus}
26
26
  <div title={status}>
27
- <Icon src={iconStatus} class="h-4 w-4 shrink-0" />
27
+ <Icon src={iconStatus} class="h-4 w-4 shrink-0 text-icon" />
28
28
  </div>
29
29
  {:else}
30
30
  <div class="w-4 h-4 shrink-0 bg-neutral-200 rounded-full"></div>
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import clsx from 'clsx'
2
3
  import type { FeedItemDetailProps } from './types.ts'
3
4
  import FeedIconStatus from './FeedIconStatus.svelte'
4
5
  import UuidCopy from './UuidCopy.svelte'
@@ -20,10 +21,16 @@
20
21
  }: FeedItemDetailProps = $props()
21
22
 
22
23
  let open = $state(false)
24
+ let styles = $derived(
25
+ clsx('pl-3 flex items-center space-x-1.5', {
26
+ 'pr-3 py-2.5': !cancelable,
27
+ 'py-2 pr-2': cancelable
28
+ })
29
+ )
23
30
  </script>
24
31
 
25
32
  <div class="w-full rounded-lg border border-border">
26
- <div class="px-3 py-2.5 flex items-center space-x-1.5">
33
+ <div class={styles}>
27
34
  {#if status}
28
35
  <FeedIconStatus {status} />
29
36
  {/if}
@@ -33,7 +33,7 @@
33
33
  {name}
34
34
  {checked}
35
35
  {disabled}
36
- class="appearance-none size-4 rounded-full border checked:border-0 checked:bg-foreground-selected cursor-pointer focus:outline-none focus:ring-0 shrink-0 disabled:cursor-not-allowed disabled:border-border-default-secondary disabled:checked:bg-border-default-secondary disabled:checked:border"
36
+ class="appearance-none size-4 rounded-full border checked:border-0 checked:bg-background-accent checked:border-0 checked:bg-background-accent cursor-pointer focus:outline-none focus:ring-0 shrink-0 disabled:cursor-not-allowed border-border-default-secondary disabled:checked:bg-border-default-secondary disabled:checked:border"
37
37
  {...rest}
38
38
  onchange={updateInput}
39
39
  />
@@ -67,7 +67,7 @@
67
67
  bind:this={input}
68
68
  bind:value
69
69
  type="search"
70
- class="flex items-center gap-1 h-8 w-full px-2 py-1.5 pl-7 rounded-lg border bg-background-default-default text-base text-foreground-default-default placeholder:text-foreground-default-tertiary outline-none caret-workspace-accent focus:ring-0 border-border-default-secondary hover:border-border-default-secondary-hover focus:border-border-selected-bold focus:shadow-active"
70
+ class="flex items-center gap-1 h-8 w-full px-2 py-1.5 pl-7 rounded-lg border bg-background-default-default text-base text-foreground-default-default placeholder:text-foreground-default-tertiary outline-none caret-foreground-accent focus:ring-0 border-border-default-secondary hover:border-border-default-secondary-hover focus:border-border-selected-bold focus:shadow-active"
71
71
  style:padding-right={shortcut ? `${shortcutKeys.length * 20 + 12}px` : undefined}
72
72
  {placeholder}
73
73
  {...rest}
@@ -32,7 +32,7 @@
32
32
 
33
33
  let inputStyles = $derived(
34
34
  clsx(
35
- 'h-8 w-full rounded-lg border px-2 py-1 text-base tracking-tight bg-background-default-default backdrop-blur-[2px]',
35
+ 'h-8 w-full rounded-lg border px-2 py-1 text-base tracking-tight bg-background-default-default backdrop-blur-[2px] caret-foreground-accent',
36
36
  'placeholder:text-foreground-default-tertiary',
37
37
  'outline-none focus:ring-0',
38
38
  {
@@ -40,7 +40,7 @@
40
40
  disabled
41
41
  },
42
42
  {
43
- 'text-foreground-critical border-border-critical-bold': errorText
43
+ 'text-foreground-critical border-border-critical-bold caret-foreground-critical': errorText
44
44
  },
45
45
  {
46
46
  'text-foreground border-border-default-secondary hover:border-border-default-secondary-hover focus:border-border-selected-bold focus:shadow-active':
@@ -18,12 +18,12 @@
18
18
 
19
19
  let inputStyles = $derived(
20
20
  clsx(
21
- 'w-full rounded-lg border px-2 py-1.5 text-base tracking-tight bg-background backdrop-blur-[2px] placeholder:text-foreground-default-tertiary outline-none focus:ring-0',
21
+ 'w-full rounded-lg border px-2 py-1.5 text-base tracking-tight bg-background backdrop-blur-[2px] placeholder:text-foreground-default-tertiary outline-none focus:ring-0 caret-foreground-accent',
22
22
  {
23
23
  'pointer-events-none bg-background-default-secondary border-border': disabled
24
24
  },
25
25
  {
26
- 'text-foreground-critical border-border-critical-bold': errorText
26
+ 'text-foreground-critical border-border-critical-bold caret-foreground-critical': errorText
27
27
  },
28
28
  {
29
29
  'text-foreground border-border hover:border-border-default-secondary-hover focus:border-border-selected-bold focus:shadow-active':
@@ -36,15 +36,16 @@
36
36
  let leaveHoverTimeout: ReturnType<typeof setTimeout> | null = null
37
37
  let itemStyles = $derived(
38
38
  clsx(
39
- { 'text-white font-medium': !isFolderItem },
40
- { 'text-white-40': isFolderItem && !active },
41
- { 'bg-white-10': active },
42
- { 'border border-transparent hover:border-white-5 group p-2': collapsedSidebar },
39
+ { 'text-foreground-inverse font-medium': !isFolderItem },
40
+ { 'text-foreground-inverse-secondary': isFolderItem && !active },
41
+ {
42
+ 'border border-transparent hover:bg-background-selected-inverse group p-2': collapsedSidebar
43
+ },
43
44
  { 'w-full px-2 py-1.5': !collapsedSidebar },
44
45
  {
45
- 'bg-white-10 border-white-5 text-white': active
46
+ 'bg-background-selected-inverse text-white': active
46
47
  },
47
- { 'hover:bg-white-5 focus:bg-white-10': !active }
48
+ { 'hover:bg-background-selected-inverse': !active }
48
49
  )
49
50
  )
50
51
  let iconStyles = $derived(clsx({ 'group-hover:text-white': collapsedSidebar }))
@@ -106,9 +107,9 @@
106
107
  onmouseleave={handleBlur}
107
108
  onclick={handleClick}
108
109
  title={label}
109
- class="cursor-pointer {itemStyles} text-base border border-transparent flex items-center justify-between hover:text-white focus:text-white rounded-md"
110
+ class="cursor-pointer {itemStyles} text-base border border-transparent flex items-center justify-between hover:text-white focus:text-white rounded-lg h-8"
110
111
  >
111
- <span class="flex items-center space-x-2">
112
+ <span class="flex items-center space-x-1.5">
112
113
  {#if resolvedIcon}
113
114
  <Icon src={resolvedIcon} theme={iconTheme} class="{iconStyles} h-4 w-4 text-white-70" />
114
115
  {/if}
@@ -17,16 +17,16 @@
17
17
  clsx(
18
18
  { 'p-1': collapsed },
19
19
  { 'space-x-2 w-full p-[7px]': !collapsed },
20
- { 'border-white-30 bg-white-10': active },
21
- { 'border-transparent hover:bg-white-5': !active },
22
- { 'font-semibold': bold }
20
+ { 'bg-selected-inverse': active },
21
+ { 'hover:bg-background-selected-inverse': !active },
22
+ { 'font-medium': bold }
23
23
  )
24
24
  )
25
25
  </script>
26
26
 
27
27
  <span
28
28
  {title}
29
- class="{styles} text-white text-base flex items-center justify-between border rounded"
29
+ class="{styles} text-foreground-inverse text-base flex items-center justify-between rounded-lg h-8"
30
30
  >
31
31
  <span class:space-x-2={!collapsed} class="flex items-center">
32
32
  {@render children?.()}
@@ -24,13 +24,16 @@
24
24
  })
25
25
 
26
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',
27
+ clsx('flex items-center gap-1.5 pl-3 rounded-xl', {
28
+ 'py-1.5': children,
29
+ 'py-2': !children,
30
+ 'bg-background border border-border shadow-sm': type === 'neutral',
29
31
  'bg-background-info': type === 'info',
30
32
  'bg-background-success': type === 'success',
31
33
  'bg-background-warning': type === 'warning',
32
34
  'bg-background-critical': type === 'error',
33
- 'min-h-9 rounded-[10px] pl-3 pr-1.5 py-1.5': !description
35
+ 'pr-3': description,
36
+ 'min-h-9 rounded-[10px] pl-3 py-1.5 pr-1.5': !description
34
37
  })
35
38
  )
36
39
 
@@ -45,7 +48,8 @@
45
48
  )
46
49
 
47
50
  let iconStyles = $derived(
48
- clsx('size-4 mt-0.5', {
51
+ clsx('size-4', {
52
+ 'mt-0.5': description,
49
53
  'text-icon': type === 'neutral',
50
54
  'text-icon-info': type === 'info',
51
55
  'text-icon-success': type === 'success',
@@ -56,7 +60,7 @@
56
60
  </script>
57
61
 
58
62
  <div class={containerStyles}>
59
- <div class="flex items-start self-stretch">
63
+ <div class:items-start={description} class:items-center={!description} class="flex self-stretch">
60
64
  <div class="relative size-4 shrink-0">
61
65
  {#if icon}
62
66
  <Icon src={icon} class={iconStyles} />
@@ -15,14 +15,16 @@
15
15
 
16
16
  let containerStyles = $derived(
17
17
  clsx(
18
- 'border overflow-clip relative flex items-center justify-center',
18
+ 'overflow-clip relative flex items-center justify-center after:content-[""] after:absolute after:inset-0 after:pointer-events-none after:rounded-[inherit]',
19
19
  { 'size-4 rounded': variant === 'xs' },
20
20
  { 'size-5 rounded-md': variant === 'sm' },
21
21
  { 'size-7 rounded-md': variant === 'md' },
22
22
  { 'size-8 rounded-lg': variant === 'lg' },
23
23
  { 'size-10 rounded-lg': variant === 'xl' },
24
- { 'bg-background-default-default border-border-default-default': !dark },
25
- { 'border-border-inverse-default': dark }
24
+ {
25
+ 'bg-background after:shadow-avatar': !dark
26
+ },
27
+ { 'border-border-inverse after:shadow-avatar-inverse': dark }
26
28
  )
27
29
  )
28
30
 
@@ -8,9 +8,9 @@
8
8
  clsx('inline-flex items-center justify-center border', {
9
9
  'size-4 rounded': size === 'sm',
10
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':
11
+ 'bg-background-default-secondary border-border-default-secondary shadow-[0px_1px_0px_#DFE0E6] text-foreground-default-secondary':
12
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':
13
+ 'bg-background-inverse-secondary border-border-inverse-secondary shadow-[0px_1px_0px_rgba(255,255,255,0.20)] text-foreground-inverse-secondary':
14
14
  theme === 'navigation'
15
15
  })
16
16
  )
@@ -9,13 +9,17 @@
9
9
  let restIcons = $derived(icons.slice(maxItems, icons.length))
10
10
  </script>
11
11
 
12
+ {#snippet separator()}
13
+ <div class="hidden sm:block h-px w-3 bg-border shrink-0"></div>
14
+ {/snippet}
15
+
12
16
  <TooltipProvider>
13
17
  <div class="flex flex-col space-y-2 sm:flex-row sm:space-y-0 items-center">
14
18
  {#each mainIcons as icon, i (i)}
15
19
  <Tooltip>
16
20
  <TooltipTrigger class="shrink-0">
17
21
  <div
18
- class="p-1.5 border rounded-md border-border flex items-center space-x-1 bg-background text-icon"
22
+ class="p-1.5 rounded-md border border-border flex items-center space-x-1 bg-background text-icon"
19
23
  >
20
24
  <img src={icon.url} alt={icon.name} class="size-4" />
21
25
  </div>
@@ -24,11 +28,11 @@
24
28
  </Tooltip>
25
29
 
26
30
  {#if i < mainIcons.length - 1}
27
- <div class="hidden sm:block h-px w-3 border border-border mx-px shrink-0"></div>
31
+ {@render separator()}
28
32
  {/if}
29
33
  {/each}
30
34
  {#if restIcons.length}
31
- <div class="hidden sm:block h-px w-3 border border-border mx-px shrink-0"></div>
35
+ {@render separator()}
32
36
  <Tooltip>
33
37
  <TooltipTrigger class="shrink-0">
34
38
  <div class="flex items-center justify-center text-icon font-medium text-base size-7">
@@ -5,24 +5,27 @@
5
5
  let { label = '', status = 'grey', dot = false }: TagStatusProps = $props()
6
6
 
7
7
  let tagStyles = $derived(
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
25
- })
8
+ clsx(
9
+ 'rounded inline-flex items-center text-xs font-medium gap-1 box-border leading-4 py-0.5 h-5',
10
+ {
11
+ 'bg-background-status-paid text-foreground-status-paid': status === 'green',
12
+ 'bg-background-status-processing text-foreground-status-processing': status === 'yellow',
13
+ 'bg-background-status-error text-foreground-status-error': status === 'red',
14
+ 'bg-background-status-draft text-foreground-status-draft': status === 'orange',
15
+ 'bg-background-status-sent text-foreground-status-sent': status === 'blue',
16
+ 'bg-background-status-registered text-foreground-status-registered': status === 'purple',
17
+ 'bg-background-status-completed text-foreground-status-completed': status === 'teal',
18
+ 'bg-background-status-received text-foreground-status-received': status === 'steelBlue',
19
+ 'bg-background-status-rejected text-foreground-status-rejected': status === 'crimson',
20
+ 'bg-sherwood-alpha-10 text-sherwood-60': status === 'olive',
21
+ 'bg-background-status-void text-foreground-default-secondary': status === 'grey',
22
+ 'border border-dashed border-border-default-secondary text-foreground-default-secondary':
23
+ status === 'empty',
24
+ 'px-1.5': dot,
25
+ 'p-1!': dot && !label,
26
+ 'px-1': !dot
27
+ }
28
+ )
26
29
  )
27
30
 
28
31
  let dotStyles = $derived(
@@ -5,27 +5,27 @@
5
5
  import type { IconSource } from '@steeze-ui/svelte-icon'
6
6
 
7
7
  export const buttonVariants = tv({
8
- base: 'inline-flex items-center justify-center font-medium text-base whitespace-nowrap rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-workspace-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-30 relative overflow-hidden',
8
+ base: 'inline-flex items-center justify-center font-medium text-base whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-workspace-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-30 relative overflow-hidden box-border cursor-pointer',
9
9
  variants: {
10
10
  variant: {
11
11
  primary:
12
- 'bg-background-accent text-foreground-inverse border border-border-accent shadow-button-default hover:bg-background-accent-hover active:bg-background-accent-press active:shadow-button-pressed [&_svg]:text-icon-inverse',
12
+ 'bg-background-accent text-foreground-inverse border border-border shadow-button-primary hover:bg-background-accent-hover active:bg-background-accent-hover active:shadow-button-pressed [&_svg]:text-icon-inverse',
13
13
  danger:
14
14
  'bg-background-default-tertiary text-foreground-critical border border-border shadow-button-default hover:bg-background-critical-bold hover:text-foreground-inverse hover:border-background-critical-bold active:bg-background-critical-bold active:text-foreground-inverse active:border-background-critical-bold active:shadow-[0px_4px_4px_-1px_inset_rgba(11,11,16,0.16)] [&_svg]:text-icon-critical hover:[&_svg]:text-icon-inverse active:[&_svg]:text-icon-inverse',
15
15
  outline:
16
- 'bg-background text-foreground border border-border shadow-button-default hover:border-border-default-secondary-hover active:bg-background-default-secondary active:shadow-button-pressed [&_svg]:text-icon',
16
+ 'bg-background text-foreground border border-border-default-secondary shadow-button-default hover:border-border-default-secondary-hover active:shadow-button-pressed [&_svg]:text-icon',
17
17
  ghost:
18
- 'bg-transparent text-foreground hover:bg-background-default-secondary active:bg-background-default-tertiary [&_svg]:text-icon',
18
+ 'bg-transparent text-foreground hover:shadow-button-default active:shadow-button-pressed hover:bg-background-default-tertiary-hover active:bg-background-default-tertiary-hover [&_svg]:text-icon',
19
19
  secondary:
20
- 'bg-background-default-tertiary text-foreground border border-border shadow-button-default hover:bg-background-default-tertiary-hover active:bg-background-default-tertiary-press active:shadow-button-pressed [&_svg]:text-icon',
20
+ 'bg-background-default-tertiary text-foreground shadow-button-default hover:bg-background-default-tertiary-hover active:bg-background-default-tertiary-hover active:shadow-button-pressed [&_svg]:text-icon',
21
21
  default:
22
22
  'bg-background text-foreground border border-border shadow-button-default hover:bg-background-default-secondary active:bg-background-default-tertiary active:shadow-button-pressed [&_svg]:text-icon',
23
- dark: 'bg-transparent text-foreground-inverse border border-border-inverse hover:bg-background-inverse-secondary active:bg-background-inverse-tertiary [&_svg]:text-icon-inverse'
23
+ dark: 'bg-transparent text-foreground-inverse border border-border-inverse-secondary hover:bg-background-selected-inverse active:bg-background-inverse-tertiary active:shadow-button-dark-pressed [&_svg]:text-icon-inverse'
24
24
  },
25
25
  size: {
26
- sm: 'h-6',
27
- md: 'h-7',
28
- lg: 'h-8'
26
+ sm: 'h-6 rounded-sm',
27
+ md: 'h-7 rounded-md',
28
+ lg: 'h-8 rounded-lg'
29
29
  },
30
30
  iconOnly: {
31
31
  true: '',
@@ -105,11 +105,26 @@
105
105
  variant: 'dark',
106
106
  iconOnly: true,
107
107
  class: '[&_svg]:!text-icon-inverse-bold'
108
+ },
109
+ {
110
+ size: 'sm',
111
+ iconOnly: true,
112
+ class: 'w-6'
113
+ },
114
+ {
115
+ size: 'md',
116
+ iconOnly: true,
117
+ class: 'w-7'
118
+ },
119
+ {
120
+ size: 'lg',
121
+ iconOnly: true,
122
+ class: 'w-8'
108
123
  }
109
124
  ],
110
125
  defaultVariants: {
111
126
  variant: 'primary',
112
- size: 'lg',
127
+ size: 'md',
113
128
  iconOnly: false,
114
129
  hasIcon: false
115
130
  }
@@ -25,7 +25,7 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
25
25
  true: string;
26
26
  false: string;
27
27
  };
28
- }, undefined, "inline-flex items-center justify-center font-medium text-base whitespace-nowrap rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-workspace-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-30 relative overflow-hidden", {
28
+ }, undefined, "inline-flex items-center justify-center font-medium text-base whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-workspace-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-30 relative overflow-hidden box-border cursor-pointer", {
29
29
  variant: {
30
30
  primary: string;
31
31
  danger: string;
@@ -71,7 +71,7 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
71
71
  true: string;
72
72
  false: string;
73
73
  };
74
- }, undefined, "inline-flex items-center justify-center font-medium text-base whitespace-nowrap rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-workspace-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-30 relative overflow-hidden", unknown, unknown, undefined>>;
74
+ }, undefined, "inline-flex items-center justify-center font-medium text-base whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-workspace-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-30 relative overflow-hidden box-border cursor-pointer", unknown, unknown, undefined>>;
75
75
  export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
76
76
  export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
77
77
  export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
package/dist/index.d.ts CHANGED
@@ -67,7 +67,7 @@ import { Tooltip } from './tooltip';
67
67
  import { TooltipContent } from './tooltip';
68
68
  import { TooltipTrigger } from './tooltip';
69
69
  import UuidCopy from './UuidCopy.svelte';
70
- import { resolveIcon } from './helpers.js';
71
- import { getCountryName } from './helpers.js';
72
- import { getStatusType } from './helpers.js';
70
+ import { resolveIcon } from './helpers.ts';
71
+ import { getCountryName } from './helpers.ts';
72
+ import { getStatusType } from './helpers.ts';
73
73
  export { AlertDialog, BaseButton, BaseCard, BaseCounter, BaseDropdown, BaseFlag, BaseTable, BaseTableActions, BaseTableHeaderContent, Breadcrumbs, ButtonFile, ButtonUuidCopy, CardCheckbox, CardRelation, CompanySelector, DataListItem, DatePicker, DrawerContext, DrawerContextItem, DrawerContextSeparator, DropdownSelect, EmptyState, FeedEvents, FeedIconEvent, FeedIconStatus, FeedItem, FeedItemDetail, FeedViewer, GlobalSearch, InputCheckbox, InputError, InputLabel, InputRadio, InputSearch, InputSelect, InputText, InputTextarea, InputToggle, MenuItem, MenuItemCollapsible, Notification, ProfileAvatar, ProgressBar, SeparatorHorizontal, ShortcutWrapper, StatusLabel, StepIconList, Table, TableBody, TableCaption, TableFooter, TableHeader, TableRow, TableHead, TableCell, Tabs, TabsContent, TabsList, TabsTrigger, TagBeta, TagSearch, TagStatus, TitleMain, TitleSection, Toaster, Tooltip, TooltipContent, TooltipTrigger, UuidCopy, resolveIcon, getCountryName, getStatusType };
package/dist/index.js CHANGED
@@ -64,7 +64,7 @@ import TitleSection from './TitleSection.svelte'
64
64
  import { Toaster } from './sonner'
65
65
  import { Tooltip, TooltipContent, TooltipTrigger } from './tooltip'
66
66
  import UuidCopy from './UuidCopy.svelte'
67
- import { resolveIcon, getCountryName, getStatusType } from './helpers.js'
67
+ import { resolveIcon, getCountryName, getStatusType } from './helpers.ts'
68
68
 
69
69
  export {
70
70
  AlertDialog,
@@ -13,7 +13,7 @@
13
13
  bind:ref
14
14
  class={cn(
15
15
  buttonVariants({ variant: 'ghost' }),
16
- 'size-(--cell-size) flex select-none flex-col items-center justify-center gap-1 whitespace-nowrap p-0 font-medium leading-none rounded-[4px]',
16
+ 'size-(--cell-size) flex select-none flex-col items-center justify-center gap-1 whitespace-nowrap p-0 font-medium leading-none rounded-lg',
17
17
  // today
18
18
  '[&[data-today]:not([data-selected]):not([data-outside-month])]:border-b [&[data-today]:not([data-selected]):not([data-outside-month])]:border-background-accent [&[data-today]:not([data-selected]):not([data-outside-month])]:rounded-none',
19
19
  // range Start
@@ -14,28 +14,26 @@
14
14
  unstyled: true,
15
15
  classes: {
16
16
  toast:
17
- 'group toast bg-neutral-800 border-0 rounded-lg text-white flex gap-2 items-start py-2 px-3 w-[336px]',
18
- title: 'font-medium text-sm leading-5 tracking-tight text-white',
19
- description: 'font-normal text-sm leading-5 tracking-tight text-white/70',
17
+ 'group toast bg-background-default-negative border-0 rounded-lg text-foreground-inverse flex gap-2 items-start pl-3 pr-2 py-2 w-[336px] [&>[data-content]]:flex-1',
18
+ title: 'font-medium text-base text-foreground-inverse',
19
+ description: 'font-normal text-base text-foreground-inverse-secondary',
20
20
  actionButton:
21
- 'bg-white/10 rounded px-2 py-1 text-xs font-medium text-white leading-4 hover:bg-white/15 transition-colors',
22
- cancelButton:
23
- 'bg-white/10 rounded px-2 py-1 text-xs font-medium text-white leading-4 hover:bg-white/15 transition-colors',
21
+ 'bg-background-selected-inverse rounded px-2 py-1 text-xs font-medium text-foreground-inverse hover:bg-background-selected-inverse-hover transition-colors',
24
22
  closeButton: 'hidden'
25
23
  }
26
24
  }}
27
25
  {...restProps}
28
26
  >
29
27
  {#snippet successIcon()}
30
- <Icon src={Success} class="w-4 h-4 text-positive-500" />
28
+ <Icon src={Success} class="size-4 mt-0.5" />
31
29
  {/snippet}
32
30
 
33
31
  {#snippet errorIcon()}
34
- <Icon src={Failure} class="w-4 h-4 text-danger-500" />
32
+ <Icon src={Failure} class="size-4 mt-0.5" />
35
33
  {/snippet}
36
34
 
37
35
  {#snippet infoIcon()}
38
- <Icon src={Info} class="w-4 h-4 text-white" />
36
+ <Icon src={Info} class="size-4 mt-0.5 text-icon-inverse" />
39
37
  {/snippet}
40
38
  </Sonner>
41
39
 
@@ -15,7 +15,7 @@
15
15
  bind:this={ref}
16
16
  data-slot="table-cell"
17
17
  class={cn(
18
- 'py-3 pl-3 pr-3 align-middle text-foreground-default-secondary font-normal text-base [&:has([role=checkbox])]:pr-2 [&:has([role=menu])]:pl-1 relative z-1',
18
+ 'py-3 pl-3 pr-3 align-middle text-foreground font-normal text-base [&:has([role=menu])]:pl-1 relative z-1',
19
19
  className
20
20
  )}
21
21
  onclick={bubble('click')}
@@ -12,7 +12,7 @@
12
12
  bind:this={ref}
13
13
  data-slot="table-head"
14
14
  class={cn(
15
- 'text-neutral-60 text-base font-normal p-3 text-left align-middle [&:has([role=checkbox])]:pr-0',
15
+ 'text-foreground-default-secondary text-base font-normal text-left align-middle [&:has([role=checkbox])]:pr-0 px-3',
16
16
  className
17
17
  )}
18
18
  >
@@ -18,7 +18,7 @@
18
18
  bind:this={ref}
19
19
  data-slot="table-row"
20
20
  class={cn(
21
- 'data-[state=selected]:bg-neutral-5 data-[state=checked]:bg-workspace-accent-50 transition-colors',
21
+ 'data-[state=selected]:bg-neutral-5 data-[state=checked]:bg-workspace-accent-50 transition-colors border-b border-border h-10',
22
22
  className
23
23
  )}
24
24
  {oncontextmenu}
@@ -1,14 +1,20 @@
1
1
  <script lang="ts">
2
2
  import { Tabs as TabsPrimitive } from 'bits-ui'
3
3
  import { cn } from '../utils.js'
4
- let { ref = $bindable(null), class: className, children }: TabsPrimitive.ListProps = $props()
4
+ let {
5
+ ref = $bindable(null),
6
+ class: className,
7
+ children,
8
+ variant
9
+ }: TabsPrimitive.ListProps & { variant?: 'md' | 'lg' } = $props()
5
10
  </script>
6
11
 
7
12
  <TabsPrimitive.List
8
13
  bind:ref
9
14
  data-slot="tabs-list"
10
15
  class={cn(
11
- 'bg-background-default-secondary border border-border text-base text-foreground inline-flex h-7 items-center justify-center rounded-md p-0.5 w-full',
16
+ 'bg-background-default-tertiary text-base text-foreground inline-flex items-center justify-center p-0.5 w-full',
17
+ variant === 'lg' ? 'rounded-lg h-8' : 'rounded-md h-7',
12
18
  className
13
19
  )}
14
20
  >
@@ -1,4 +1,7 @@
1
1
  import { Tabs as TabsPrimitive } from 'bits-ui';
2
- declare const TabsList: import("svelte").Component<TabsPrimitive.ListProps, {}, "ref">;
2
+ type $$ComponentProps = TabsPrimitive.ListProps & {
3
+ variant?: 'md' | 'lg';
4
+ };
5
+ declare const TabsList: import("svelte").Component<$$ComponentProps, {}, "ref">;
3
6
  type TabsList = ReturnType<typeof TabsList>;
4
7
  export default TabsList;
@@ -5,8 +5,9 @@
5
5
  ref = $bindable(null),
6
6
  class: className,
7
7
  children,
8
- value
9
- }: TabsPrimitive.TriggerProps = $props()
8
+ value,
9
+ variant
10
+ }: TabsPrimitive.TriggerProps & { variant?: 'md' | 'lg' } = $props()
10
11
  </script>
11
12
 
12
13
  <TabsPrimitive.Trigger
@@ -14,7 +15,8 @@
14
15
  {value}
15
16
  data-slot="tabs-trigger"
16
17
  class={cn(
17
- 'data-[state=active]:bg-white inline-flex items-center justify-center whitespace-nowrap rounded px-3 py-0.5 text-base font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm w-full cursor-pointer',
18
+ 'data-[state=active]:bg-white inline-flex items-center justify-center whitespace-nowrap px-3 py-0.5 text-base font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm w-full cursor-pointer h-full',
19
+ variant === 'lg' ? 'rounded-md' : 'rounded',
18
20
  className
19
21
  )}
20
22
  >
@@ -1,4 +1,7 @@
1
1
  import { Tabs as TabsPrimitive } from 'bits-ui';
2
- declare const TabsTrigger: import("svelte").Component<TabsPrimitive.TriggerProps, {}, "ref">;
2
+ type $$ComponentProps = TabsPrimitive.TriggerProps & {
3
+ variant?: 'md' | 'lg';
4
+ };
5
+ declare const TabsTrigger: import("svelte").Component<$$ComponentProps, {}, "ref">;
3
6
  type TabsTrigger = ReturnType<typeof TabsTrigger>;
4
7
  export default TabsTrigger;
@@ -95,6 +95,14 @@
95
95
  --color-white-80: rgba(255, 255, 255, 0.8);
96
96
  --color-white-90: rgba(255, 255, 255, 0.9);
97
97
 
98
+ /* DEFAULT: 'var(--workspace-accent-color, #169958)',
99
+ 50: 'color-mix(in lab, transparent 95%, var(--workspace-accent-color, #169958))',
100
+ 100: 'color-mix(in lab, transparent 90%, var(--workspace-accent-color, #169958))',
101
+ 200: 'color-mix(in lab, transparent 80%, var(--workspace-accent-color, #169958))',
102
+ 500: 'var(--workspace-accent-color, #169958)',
103
+ 600: 'color-mix(in lab, black 16%, var(--workspace-accent-color, #169958))',
104
+ 700: 'color-mix(in lab, black 32%, var(--workspace-accent-color, #169958))' */
105
+
98
106
  /* Green */
99
107
  --color-green-10: #f5faf8;
100
108
  --color-green-20: #cce7dc;
@@ -366,7 +374,7 @@
366
374
  SEMANTIC COLORS
367
375
  ============================================ */
368
376
 
369
- /* Accen */
377
+ /* Accent */
370
378
  --color-accent-40: var(--color-green-40);
371
379
  --color-accent-50: var(--color-green-50);
372
380
  --color-accent-60: var(--color-green-60);
@@ -771,10 +779,14 @@
771
779
  --shadow-sm: 0 2px 20px 0 rgba(10, 10, 10, 0.04);
772
780
  --shadow-lg: 0 8px 30px 0 rgba(10, 10, 10, 0.12);
773
781
  --shadow-xl: 0 8px 28px -6px rgba(10, 10, 10, 0.12), 0 18px 88px -4px rgba(10, 10, 10, 0.14);
774
- --shadow-active: 0px 0px 0px 2px color-mix(in lab, transparent 88%, var(--workspace-accent-color, var(--color-positive-50)));
782
+ --shadow-active: 0px 0px 0px 2px color-mix(in lab, transparent 88%, var(--color-background-accent-default, var(--color-positive-50)));
775
783
  --shadow-warning: 0px 0px 0px 2px rgba(215, 135, 0, 0.12);
776
784
  --shadow-button-default: 0 2px 6px -1px rgba(11, 11, 16, 0.04), 0 -2px 4px 0 rgba(11, 11, 16, 0.04) inset;
777
- --shadow-button-pressed: 0 4px 4px -1px rgba(11, 11, 16, 0.16) inset;
785
+ --shadow-button-primary: 0 -4px 4px 0 rgba(11, 11, 16, 0.12) inset, 0 1px 1.5px 0 rgba(255, 255, 255, 0.16) inset, 0 2px 4px -1px rgba(11, 11, 16, 0.08);
786
+ --shadow-button-pressed: 0 2px 6px 0 rgba(11, 11, 16, 0.16) inset, 0 -2px 5px -2px rgba(255, 255, 255, 0.25) inset;
787
+ --shadow-button-dark-pressed: 0 4px 4px -1px rgba(11, 11, 16, 0.16) inset;
788
+ --shadow-avatar: 0 0 0 1px rgba(5, 5, 36, 0.06) inset;
789
+ --shadow-avatar-inverse: 0 0 0 1px rgba(255, 255, 255, 0.10) inset;
778
790
 
779
791
  /* Letter Spacing (tracking) */
780
792
  --tracking-tightest: -0.29px; /* -1.2% (text-2xl) */
@@ -854,7 +866,7 @@
854
866
 
855
867
  /* Background */
856
868
  --color-background-default-default: var(--color-neutral-100);
857
- --color-background-default-secondary: var(--color-neutral-white-alpha-10);
869
+ --color-background-default-secondary: var(--color-neutral-white-alpha-5);
858
870
  --color-background-default-tertiary: var(--color-neutral-white-alpha-10);
859
871
  --color-background-default-tertiary-hover: var(--color-neutral-white-alpha-20);
860
872
  --color-background-default-tertiary-press: var(--color-neutral-white-alpha-30);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.15",
4
+ "version": "0.1.16",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "dev:clean": "npm run clean && vite dev",