@invopop/popui 0.1.14 → 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 (103) 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/BaseDropdown.svelte +3 -3
  5. package/dist/BaseTable.svelte +8 -12
  6. package/dist/BaseTableActions.svelte +4 -6
  7. package/dist/BaseTableCellContent.svelte +4 -6
  8. package/dist/BaseTableCheckbox.svelte +8 -10
  9. package/dist/BaseTableHeaderContent.svelte +4 -4
  10. package/dist/BaseTableRow.svelte +12 -10
  11. package/dist/Breadcrumb.svelte +40 -0
  12. package/dist/Breadcrumb.svelte.d.ts +4 -0
  13. package/dist/Breadcrumbs.svelte +5 -30
  14. package/dist/ButtonFile.svelte +35 -30
  15. package/dist/ButtonUuidCopy.svelte +3 -2
  16. package/dist/CardCheckbox.svelte +25 -21
  17. package/dist/CardRelation.svelte +12 -16
  18. package/dist/CompanySelector.svelte +35 -7
  19. package/dist/DataListItem.svelte +14 -10
  20. package/dist/DatePicker.svelte +14 -12
  21. package/dist/DrawerContext.svelte +111 -8
  22. package/dist/DrawerContextItem.svelte +18 -30
  23. package/dist/DrawerContextSeparator.svelte +1 -1
  24. package/dist/DrawerContextWorkspace.svelte +7 -7
  25. package/dist/DropdownSelect.svelte +38 -16
  26. package/dist/EmptyState.svelte +42 -0
  27. package/dist/EmptyState.svelte.d.ts +4 -0
  28. package/dist/EmptyStateIllustration.svelte.d.ts +0 -1
  29. package/dist/FeedEvents.svelte +9 -5
  30. package/dist/FeedIconEvent.svelte +1 -1
  31. package/dist/FeedIconStatus.svelte +1 -1
  32. package/dist/FeedItem.svelte +8 -8
  33. package/dist/FeedItemDetail.svelte +15 -6
  34. package/dist/GlobalSearch.svelte +13 -12
  35. package/dist/InputCheckbox.svelte +2 -5
  36. package/dist/InputError.svelte +4 -9
  37. package/dist/InputLabel.svelte +3 -1
  38. package/dist/InputRadio.svelte +26 -11
  39. package/dist/InputSearch.svelte +8 -8
  40. package/dist/InputSelect.svelte +32 -31
  41. package/dist/InputText.svelte +32 -24
  42. package/dist/InputTextarea.svelte +25 -19
  43. package/dist/InputToggle.svelte +24 -18
  44. package/dist/MenuItem.svelte +9 -8
  45. package/dist/MenuItemCollapsible.svelte +4 -4
  46. package/dist/Notification.svelte +59 -24
  47. package/dist/ProfileAvatar.svelte +43 -14
  48. package/dist/SeparatorHorizontal.svelte +2 -2
  49. package/dist/ShortcutWrapper.svelte +14 -5
  50. package/dist/StatusLabel.svelte +4 -5
  51. package/dist/StepIconList.svelte +11 -9
  52. package/dist/TagBeta.svelte +26 -14
  53. package/dist/TagStatus.svelte +37 -49
  54. package/dist/TitleMain.svelte +1 -1
  55. package/dist/TitleSection.svelte +1 -1
  56. package/dist/UuidCopy.svelte +4 -4
  57. package/dist/alert-dialog/alert-dialog-action.svelte +5 -3
  58. package/dist/alert-dialog/alert-dialog-cancel.svelte +4 -2
  59. package/dist/alert-dialog/alert-dialog-content.svelte +1 -1
  60. package/dist/alert-dialog/alert-dialog-description.svelte +1 -1
  61. package/dist/alert-dialog/alert-dialog-footer.svelte +1 -1
  62. package/dist/alert-dialog/alert-dialog-header.svelte +1 -1
  63. package/dist/alert-dialog/alert-dialog-title.svelte +1 -1
  64. package/dist/button/button.svelte +198 -24
  65. package/dist/button/button.svelte.d.ts +48 -26
  66. package/dist/index.d.ts +5 -10
  67. package/dist/index.js +3 -13
  68. package/dist/range-calendar/range-calendar-cell.svelte +1 -1
  69. package/dist/range-calendar/range-calendar-day.svelte +10 -8
  70. package/dist/range-calendar/range-calendar-head-cell.svelte +1 -1
  71. package/dist/range-calendar/range-calendar-next-button.svelte +3 -3
  72. package/dist/range-calendar/range-calendar-prev-button.svelte +3 -3
  73. package/dist/range-calendar/range-calendar.svelte +1 -1
  74. package/dist/sonner/sonner.svelte +7 -9
  75. package/dist/svg/CheckBadge.svelte +18 -0
  76. package/dist/svg/CheckBadge.svelte.d.ts +26 -0
  77. package/dist/svg/IconEmpty.svelte +78 -106
  78. package/dist/table/table-body.svelte +1 -1
  79. package/dist/table/table-cell.svelte +1 -1
  80. package/dist/table/table-footer.svelte +1 -1
  81. package/dist/table/table-head.svelte +1 -1
  82. package/dist/table/table-header.svelte +1 -1
  83. package/dist/table/table-row.svelte +1 -1
  84. package/dist/tabs/tabs-list.svelte +8 -2
  85. package/dist/tabs/tabs-list.svelte.d.ts +4 -1
  86. package/dist/tabs/tabs-trigger.svelte +5 -3
  87. package/dist/tabs/tabs-trigger.svelte.d.ts +4 -1
  88. package/dist/tailwind.theme.css +981 -0
  89. package/dist/tooltip/tooltip-content.svelte +2 -2
  90. package/dist/types.d.ts +36 -42
  91. package/package.json +2 -2
  92. package/dist/CounterWorkflow.svelte +0 -19
  93. package/dist/CounterWorkflow.svelte.d.ts +0 -4
  94. package/dist/EmptyStateIcon.svelte +0 -52
  95. package/dist/EmptyStateIcon.svelte.d.ts +0 -4
  96. package/dist/FormLayoutModal.svelte +0 -14
  97. package/dist/FormLayoutModal.svelte.d.ts +0 -4
  98. package/dist/ProfileSelector.svelte +0 -41
  99. package/dist/ProfileSelector.svelte.d.ts +0 -4
  100. package/dist/SectionLayout.svelte +0 -13
  101. package/dist/SectionLayout.svelte.d.ts +0 -4
  102. package/dist/tw.theme.d.ts +0 -171
  103. package/dist/tw.theme.js +0 -188
@@ -4,7 +4,7 @@
4
4
  import { Icon } from '@steeze-ui/svelte-icon'
5
5
  import { AddCircle, ExternalLink, Workspace } from '@invopop/ui-icons'
6
6
  import BaseCounter from './BaseCounter.svelte'
7
- import EmptyStateIcon from './EmptyStateIcon.svelte'
7
+ import EmptyState from './EmptyState.svelte'
8
8
  import { slide } from 'svelte/transition'
9
9
  import { ChevronRight } from '@steeze-ui/heroicons'
10
10
 
@@ -44,15 +44,15 @@
44
44
  <span>Live</span>
45
45
  </div>
46
46
  {#if liveItems.length}
47
- <BaseCounter content={liveItems.length} />
47
+ <BaseCounter value={liveItems.length} />
48
48
  {/if}
49
49
  </button>
50
50
  {#if liveOpen}
51
51
  <div transition:slide class="max-h-[475px] overflow-auto">
52
52
  {#if !liveItems.length}
53
53
  <div class="h-[182px] overflow-x-hidden">
54
- <EmptyStateIcon
55
- icon={Workspace}
54
+ <EmptyState
55
+ iconSource={Workspace}
56
56
  title="No workspaces here"
57
57
  description="Create a workspace to start"
58
58
  />
@@ -82,15 +82,15 @@
82
82
  <span>Sandbox</span>
83
83
  </div>
84
84
  {#if sandboxItems.length}
85
- <BaseCounter content={sandboxItems.length} />
85
+ <BaseCounter value={sandboxItems.length} />
86
86
  {/if}
87
87
  </button>
88
88
  {#if sandboxOpen}
89
89
  <div transition:slide class="max-h-[475px] overflow-auto">
90
90
  {#if !sandboxItems.length}
91
91
  <div class="h-[182px] overflow-x-hidden">
92
- <EmptyStateIcon
93
- icon={Workspace}
92
+ <EmptyState
93
+ iconSource={Workspace}
94
94
  title="No workspaces here"
95
95
  description="Create a workspace to start"
96
96
  />
@@ -44,14 +44,14 @@
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
 
51
51
  let styles = $derived(
52
- clsx({
53
- 'shadow-active border-workspace-accent hover:border-workspace-accent': isOpen,
54
- 'border-neutral-100': !isOpen
52
+ clsx('border backdrop-blur-sm backdrop-filter', {
53
+ 'border-border-selected-bold shadow-active': isOpen,
54
+ 'border-border hover:border-border-default-secondary-hover': !isOpen
55
55
  })
56
56
  )
57
57
 
@@ -75,22 +75,44 @@
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 max-w-[420px] flex items-center border hover:border-neutral-300 rounded-md py-1.25 pl-2 gap-1 bg-white whitespace-nowrap"
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"
82
98
  >
83
99
  {#if selectedColor}
84
- <TagStatus dot status={selectedColor} />
85
- {:else if selectedIcon}
86
- <Icon src={selectedIcon} {iconTheme} class="{selectedIconColor} h-4 w-4 flex-shrink-0" />
87
- {:else if resolvedIcon}
88
- <Icon src={resolvedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
100
+ <div class="flex items-center gap-1 flex-1 min-w-0">
101
+ <TagStatus dot status={selectedColor} />
102
+ {@render label()}
103
+ </div>
104
+ {:else if selectedIcon || resolvedIcon}
105
+ <div class="flex items-center gap-1 flex-1 min-w-0">
106
+ {#if selectedIcon}
107
+ <Icon src={selectedIcon} {iconTheme} class="{selectedIconColor} size-4 flex-shrink-0" />
108
+ {:else if resolvedIcon}
109
+ <Icon src={resolvedIcon} {iconTheme} class="text-icon size-4 flex-shrink-0" />
110
+ {/if}
111
+ {@render label()}
112
+ </div>
113
+ {:else}
114
+ {@render label()}
89
115
  {/if}
90
-
91
- <span class="w-full pr-8 text-neutral-800 placeholder-neutral-800 text-base truncate">
92
- {selectedLabel}
93
- </span>
94
116
  </div>
95
117
  {/snippet}
96
118
  <DrawerContext {widthClass} {multiple} {items} onclick={handleClick} onselect={handleSelected} />
@@ -98,7 +120,7 @@
98
120
 
99
121
  <style>
100
122
  .dropdown-select {
101
- background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMiIgeT0iMiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiByeD0iNCIgZmlsbD0iI0YzRjRGNiIvPgo8cGF0aCBkPSJNNi41IDguMjUwMDRMMTAgMTEuNzVMMTMuNSA4LjI1IiBzdHJva2U9IiMwMzA3MTIiIHN0cm9rZS13aWR0aD0iMS4xIi8+Cjwvc3ZnPg==');
123
+ background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiByeD0iNCIgZmlsbD0icmdiYSg1LCA1LCAzNiwgMC4wNikiLz4KPHBhdGggZD0iTTQuNSA2LjVMOCAxMEwxMS41IDYuNSIgc3Ryb2tlPSIjMGIwYjEwIiBzdHJva2Utd2lkdGg9IjEuMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPg==');
102
124
  background-repeat: no-repeat;
103
125
  background-position: center right 8px;
104
126
  }
@@ -0,0 +1,42 @@
1
+ <script lang="ts">
2
+ import IconEmpty from './svg/IconEmpty.svelte'
3
+ import CheckBadge from './svg/CheckBadge.svelte'
4
+ import { Icon } from '@steeze-ui/svelte-icon'
5
+ import type { EmptyStateProps } from './types'
6
+
7
+ let {
8
+ icon,
9
+ iconSource,
10
+ title = '',
11
+ description = '',
12
+ check = false,
13
+ children
14
+ }: EmptyStateProps = $props()
15
+ </script>
16
+
17
+ <div class="flex flex-col items-center justify-center">
18
+ {#if icon}
19
+ <div class="relative h-[120px] w-[352px] max-w-sm flex items-center justify-center">
20
+ {@render icon()}
21
+ </div>
22
+ {:else if iconSource}
23
+ <div class="relative h-[120px] w-[352px] max-w-sm">
24
+ <IconEmpty />
25
+ <div class="absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2">
26
+ <Icon src={iconSource} class="h-12 w-12 text-foreground-accent" />
27
+ {#if check}
28
+ <CheckBadge />
29
+ {/if}
30
+ </div>
31
+ </div>
32
+ {/if}
33
+ <div class="flex flex-col items-center gap-0.5 text-center">
34
+ <h4 class="font-medium text-foreground text-base">{title}</h4>
35
+ <p class="text-foreground-default-secondary text-base">{description}</p>
36
+ </div>
37
+ {#if children}
38
+ <div class="mt-4">
39
+ {@render children()}
40
+ </div>
41
+ {/if}
42
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { EmptyStateProps } from './types';
2
+ declare const EmptyState: import("svelte").Component<EmptyStateProps, {}, "">;
3
+ type EmptyState = ReturnType<typeof EmptyState>;
4
+ export default EmptyState;
@@ -1,4 +1,3 @@
1
- import type { EmptyStateIllustrationProps } from './types.js';
2
1
  declare const EmptyStateIllustration: import("svelte").Component<EmptyStateIllustrationProps, {}, "">;
3
2
  type EmptyStateIllustration = ReturnType<typeof EmptyStateIllustration>;
4
3
  export default EmptyStateIllustration;
@@ -1,28 +1,32 @@
1
1
  <script lang="ts">
2
+ import SeparatorHorizontal from './SeparatorHorizontal.svelte'
2
3
  import TagStatus from './TagStatus.svelte'
3
4
  import type { FeedEventsProps } from './types.js'
4
5
 
5
6
  let { events = [] }: FeedEventsProps = $props()
6
7
  </script>
7
8
 
8
- <div class="border border-neutral-100 bg-neutral-50 rounded">
9
+ <div class="border border-border bg-background-default-secondary rounded">
9
10
  {#each events as event, i (i)}
10
- <div class:border-t={i > 0} class="border-neutral-100 py-2 px-3">
11
+ {#if i > 0}
12
+ <SeparatorHorizontal />
13
+ {/if}
14
+ <div class="py-2 px-3">
11
15
  <div class="flex items-center justify-between">
12
16
  <div class="flex items-center space-x-2">
13
17
  <TagStatus status={event.status.type} label={event.status.label} />
14
18
  {#if event.code}
15
- <p class="text-sm text-neutral-500 font-mono tracking-wide">
19
+ <p class="text-sm text-foreground-default-secondary font-mono">
16
20
  {event.code}
17
21
  </p>
18
22
  {/if}
19
23
  </div>
20
- <p class="text-sm text-neutral-500 font-mono tracking-wide">
24
+ <p class="text-sm text-foreground-default-secondary font-mono">
21
25
  {event.date.toISOString()}
22
26
  </p>
23
27
  </div>
24
28
  {#if event.message}
25
- <p class="text-neutral-800 text-sm pt-2 tracking-normal break-words">{event.message}</p>
29
+ <p class="text-foreground text-sm pt-2 break-words">{event.message}</p>
26
30
  {/if}
27
31
  </div>
28
32
  {/each}
@@ -7,6 +7,6 @@
7
7
 
8
8
  <div class="relative py-0.5 mt-2">
9
9
  {#if icon}
10
- <Icon src={icon} theme={iconTheme} class="h-4 w-4 text-neutral-500" />
10
+ <Icon src={icon} theme={iconTheme} class="size-4 text-icon-default-bold" />
11
11
  {/if}
12
12
  </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>
@@ -31,7 +31,7 @@
31
31
 
32
32
  <div id={`feed-item-${slug}`} class="relative text-left w-full min-w-[344px]">
33
33
  {#if hasNext && icon}
34
- <span class="absolute bottom-[-20px] left-2 border-l border-neutral-100 w-px h-[58px]"></span>
34
+ <span class="absolute bottom-[-20px] left-2 border-l border-border w-px h-[58px]"></span>
35
35
  {/if}
36
36
  <div class="flex items-start justify-between space-x-2 py-3">
37
37
  <div class="relative">
@@ -39,17 +39,15 @@
39
39
  <FeedIconEvent {icon} />
40
40
  {/if}
41
41
  </div>
42
- <div
43
- class="flex-1 items-center justify-start pl-2.5 py-2 pr-2 rounded-lg border border-neutral-100"
44
- >
42
+ <div class="flex-1 items-center justify-start pl-2.5 py-2 pr-2 rounded-lg">
45
43
  <div
46
- class="text-base text-neutral-800 whitespace-nowrap tracking-normal font-medium flex items-center gap-1 {viewable
44
+ class="text-base text-foreground whitespace-nowrap tracking-normal font-medium flex items-center gap-1 {viewable
47
45
  ? 'max-w-[260px]'
48
46
  : 'max-w-[320px]'}"
49
47
  >
50
48
  {#if user}
51
49
  <div class="mr-0.5">
52
- <ProfileAvatar small {...user} />
50
+ <ProfileAvatar variant="sm" {...user} />
53
51
  </div>
54
52
  {/if}
55
53
  <p class="truncate" {title}>{title}</p>
@@ -59,7 +57,9 @@
59
57
  {/if}
60
58
  </div>
61
59
  <p
62
- class="mt-0.5 flex items-center space-x-2 text-sm text-neutral-500 whitespace-nowrap tabular-nums slashed-zero lining-nums tracking-normal"
60
+ class="mt-0.5 flex items-center space-x-2 text-sm text-foreground-default-secondary whitespace-nowrap tabular-nums slashed-zero lining-nums tracking-normal {user
61
+ ? 'ml-[26px]'
62
+ : ''}"
63
63
  >
64
64
  {#if date}
65
65
  <span>
@@ -78,7 +78,7 @@
78
78
  {#if viewable}
79
79
  <span class="absolute top-5 right-2">
80
80
  <BaseButton
81
- small
81
+ size="sm"
82
82
  variant="secondary"
83
83
  onclick={() => {
84
84
  onView?.(slug)
@@ -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,17 +21,23 @@
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
- <div class="w-full rounded-lg border border-neutral-100">
26
- <div class="px-3 py-2.5 flex items-center space-x-1.5">
32
+ <div class="w-full rounded-lg border border-border">
33
+ <div class={styles}>
27
34
  {#if status}
28
35
  <FeedIconStatus {status} />
29
36
  {/if}
30
- <span class="flex-1 truncate font-medium text-neutral-800 text-base">{title}</span>
37
+ <span class="flex-1 truncate font-medium text-foreground text-base">{title}</span>
31
38
  {#if cancelable}
32
39
  <BaseButton
33
- small
40
+ size="sm"
34
41
  icon={Close}
35
42
  variant="secondary"
36
43
  onclick={() => {
@@ -43,14 +50,16 @@
43
50
  </div>
44
51
  <SeparatorHorizontal />
45
52
  <div class="pl-3 py-1 pr-2.5 flex items-center space-x-0.5">
46
- <span class="text-sm text-neutral-500 whitespace-nowrap">{idLabel}</span>
53
+ <span class="text-sm text-foreground-default-secondary whitespace-nowrap">{idLabel}</span>
47
54
  {#if uuid}
48
55
  <UuidCopy {uuid} full small {onCopied} />
49
56
  {/if}
50
57
  </div>
51
58
  {#if events.length}
52
59
  <SeparatorHorizontal />
53
- <div class="px-3 py-2 text-sm text-neutral-500 flex items-center justify-between">
60
+ <div
61
+ class="px-3 py-2 text-sm text-foreground-default-secondary flex items-center justify-between"
62
+ >
54
63
  <span>Logs</span>
55
64
  <button
56
65
  class="cursor-pointer"
@@ -10,10 +10,14 @@
10
10
 
11
11
  let { collapsed = false, onOpen }: GlobalSearchProps = $props()
12
12
 
13
- let styles = $derived(
14
- clsx({
15
- 'space-x-1 w-full': !collapsed
16
- })
13
+ const styles = $derived(
14
+ clsx(
15
+ 'cursor-pointer flex items-center border border-border-inverse-default rounded-lg backdrop-blur-[20px]',
16
+ {
17
+ 'gap-1 px-2 py-1.5 w-full hover:bg-background-selected-inverse': !collapsed,
18
+ 'p-1.5': collapsed
19
+ }
20
+ )
17
21
  )
18
22
 
19
23
  function onKeyDown(event: KeyboardEvent) {
@@ -38,15 +42,12 @@
38
42
  })
39
43
  </script>
40
44
 
41
- <button
42
- class="cursor-pointer {styles} flex items-center border pl-1.5 py-1.5 pr-2 border-white-10 bg-neutral-800/10 rounded-md"
43
- onclick={() => onOpen?.()}
44
- >
45
- <Icon src={Search} class="w-4 h-4 text-white-70" />
45
+ <button class={styles} onclick={() => onOpen?.()}>
46
+ <Icon src={Search} class="size-4 text-foreground-inverse shrink-0" />
46
47
  {#if !collapsed}
47
- <span class="text-white-40 text-sm flex-1 text-left tracking-normal">Search</span>
48
- <ShortcutWrapper>
49
- <Icon src={Slash} class="w-3 h-3 text-white-70" />
48
+ <span class="text-foreground-inverse-secondary text-base flex-1 text-left">Search</span>
49
+ <ShortcutWrapper theme="navigation">
50
+ <Icon src={Slash} class="size-3" />
50
51
  </ShortcutWrapper>
51
52
  {/if}
52
53
  </button>
@@ -20,16 +20,13 @@
20
20
  }
21
21
  </script>
22
22
 
23
- <label
24
- for={id}
25
- class="inline-flex items-center space-x-2 cursor-pointer group text-base text-neutral-800"
26
- >
23
+ <label for={id} class="inline-flex items-center gap-2 cursor-pointer text-base text-foreground">
27
24
  <input
28
25
  {id}
29
26
  type="checkbox"
30
27
  {checked}
31
28
  {indeterminate}
32
- class="form-checkbox w-4 h-4 text-workspace-accent focus:text-workspace-accent rounded border border-neutral-200 hover:border-neutral-300 group-hover:border-neutral-300 focus:ring-0 focus:ring-offset-0"
29
+ class="form-checkbox size-4 text-background-accent rounded border border-border-default-secondary hover:border-border-default-primary focus:ring-0 focus:ring-offset-0"
33
30
  {...rest}
34
31
  onchange={updateInput}
35
32
  {onclick}
@@ -1,17 +1,12 @@
1
1
  <script lang="ts">
2
+ import { Icon } from '@steeze-ui/svelte-icon'
3
+ import { Alert } from '@invopop/ui-icons'
2
4
  import type { InputErrorProps } from './types'
3
5
 
4
6
  let { errorText = '' }: InputErrorProps = $props()
5
7
  </script>
6
8
 
7
- <p class="mt-2 text-sm text-danger-500 flex items-center space-x-1">
8
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
9
- <path
10
- fill-rule="evenodd"
11
- clip-rule="evenodd"
12
- d="M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5ZM7.99999 9.35C7.66862 9.35 7.39999 9.08137 7.39999 8.75V4.75C7.39999 4.41863 7.66862 4.15 7.99999 4.15C8.33137 4.15 8.59999 4.41863 8.59999 4.75L8.59999 8.75C8.59999 9.08137 8.33136 9.35 7.99999 9.35ZM8.75 11C8.75 11.4142 8.41421 11.75 8 11.75C7.58579 11.75 7.25 11.4142 7.25 11C7.25 10.5858 7.58579 10.25 8 10.25C8.41421 10.25 8.75 10.5858 8.75 11Z"
13
- fill="currentColor"
14
- />
15
- </svg>
9
+ <p class="flex items-center gap-1 text-xs text-foreground-critical">
10
+ <Icon src={Alert} class="size-3 shrink-0" />
16
11
  <span>{errorText}</span>
17
12
  </p>
@@ -4,4 +4,6 @@
4
4
  let { id = '', label = '', ...rest }: InputLabelProps = $props()
5
5
  </script>
6
6
 
7
- <label for={id} class="text-sm font-medium text-neutral-500 mb-2" {...rest}>{label}</label>
7
+ <label for={id} class="text-sm font-medium text-foreground-default-secondary" {...rest}>
8
+ {label}
9
+ </label>
@@ -3,8 +3,10 @@
3
3
 
4
4
  let {
5
5
  checked = false,
6
+ disabled = false,
6
7
  id = Math.random().toString(36).slice(2, 7),
7
8
  name = '',
9
+ label,
8
10
  onchange,
9
11
  ...rest
10
12
  }: InputRadioProps = $props()
@@ -19,18 +21,31 @@
19
21
 
20
22
  function updateInput(event: Event) {
21
23
  const target = event.target as HTMLInputElement
22
-
23
24
  onchange?.(target.checked)
24
25
  }
25
26
  </script>
26
27
 
27
- <input
28
- bind:this={el}
29
- type="radio"
30
- {id}
31
- {name}
32
- {checked}
33
- class="form-radio h-5 w-5 border-neutral-200 text-workspace-accent focus:ring-0 focus:ring-offset-0 cursor-pointer"
34
- {...rest}
35
- onchange={updateInput}
36
- />
28
+ {#snippet radioInput()}
29
+ <input
30
+ bind:this={el}
31
+ type="radio"
32
+ {id}
33
+ {name}
34
+ {checked}
35
+ {disabled}
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
+ {...rest}
38
+ onchange={updateInput}
39
+ />
40
+ {/snippet}
41
+
42
+ {#if label}
43
+ <label class="flex items-center gap-2 cursor-pointer">
44
+ {@render radioInput()}
45
+ <span class="text-base text-foreground whitespace-nowrap">
46
+ {label}
47
+ </span>
48
+ </label>
49
+ {:else}
50
+ {@render radioInput()}
51
+ {/if}
@@ -2,6 +2,7 @@
2
2
  import { onMount } from 'svelte'
3
3
  import { Icon } from '@steeze-ui/svelte-icon'
4
4
  import { Search } from '@invopop/ui-icons'
5
+ import ShortcutWrapper from './ShortcutWrapper.svelte'
5
6
  import type { InputSearchProps } from './types.js'
6
7
 
7
8
  const debounce = (target: HTMLInputElement) => {
@@ -66,8 +67,8 @@
66
67
  bind:this={input}
67
68
  bind:value
68
69
  type="search"
69
- class="py-[5px] pl-7 border border-neutral-200 hover:border-neutral-300 w-full rounded-md text-neutral-800 placeholder-neutral-500 text-base outline-none tracking-tight caret-workspace-accent focus:border-workspace-accent focus:shadow-active bg-white"
70
- style:padding-right={`${shortcutKeys.length * 15 + 12}px`}
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
+ style:padding-right={shortcut ? `${shortcutKeys.length * 20 + 12}px` : undefined}
71
72
  {placeholder}
72
73
  {...rest}
73
74
  oninput={handleInput}
@@ -75,15 +76,14 @@
75
76
  {onblur}
76
77
  {onclick}
77
78
  />
78
- <Icon src={icon} class="absolute text-neutral-500 w-4 h-4 left-2" />
79
+ <Icon src={icon} class="absolute left-2 size-4 text-foreground-default-tertiary" />
79
80
 
80
81
  {#if shortcut}
81
- <div class="absolute top-1 right-0 flex py-1.5 pr-1.5 space-x-1">
82
+ <div class="absolute right-2 flex items-center gap-1">
82
83
  {#each shortcutKeys as key}
83
- <kbd
84
- class="w-4 h-4 flex justify-center items-center rounded-md border border-neutral-200 bg-neutral-100 font-sans text-sm text-neutral-500 font-semibold"
85
- >{key}</kbd
86
- >
84
+ <ShortcutWrapper>
85
+ <span class="text-xs font-semibold">{key}</span>
86
+ </ShortcutWrapper>
87
87
  {/each}
88
88
  </div>
89
89
  {/if}
@@ -29,43 +29,44 @@
29
29
 
30
30
  function handleChange(event: Event) {
31
31
  const target = (event as PointerEvent).target as HTMLSelectElement
32
-
33
32
  onchange?.(target.value)
34
33
  }
35
34
  </script>
36
35
 
37
- {#if label}
38
- <InputLabel {id} {label} />
39
- {/if}
40
- <div class="relative">
41
- <select
42
- {id}
43
- {name}
44
- bind:value
45
- {disabled}
46
- class:pl-7={icon}
47
- class:pl-2={!icon}
48
- class="py-1.5 border border-neutral-200 hover:border-neutral-300 w-full rounded-md text-neutral-800 text-base pr-9 outline-none tracking-tight ui-select focus:border-workspace-accent focus:shadow-active"
49
- {...rest}
50
- onchange={handleChange}
51
- >
52
- <option value="" disabled={disablePlaceholder}>{placeholder}</option>
53
- {#each options as option}
54
- <option value={option.value}>{option.label}</option>
55
- {/each}
56
- </select>
57
- {#if resolvedIcon}
58
- <Icon
59
- src={resolvedIcon}
60
- theme={iconTheme}
61
- class="h-4 w-4 absolute top-2 left-2 text-neutral-500"
62
- />
36
+ <div class="flex flex-col gap-2">
37
+ {#if label}
38
+ <InputLabel {id} {label} />
63
39
  {/if}
64
- </div>
40
+ <div class="relative">
41
+ <select
42
+ {id}
43
+ {name}
44
+ bind:value
45
+ {disabled}
46
+ class="h-8 w-full px-2 py-1.5 rounded-lg border bg-background text-base outline-none focus:ring-0 border-border hover:border-border-default-secondary-hover focus:border-border-selected-bold focus:shadow-active text-foreground ui-select"
47
+ class:pl-7={resolvedIcon}
48
+ class:text-foreground-default-secondary={!value}
49
+ {...rest}
50
+ onchange={handleChange}
51
+ >
52
+ <option value="" disabled={disablePlaceholder}>{placeholder}</option>
53
+ {#each options as option}
54
+ <option value={option.value}>{option.label}</option>
55
+ {/each}
56
+ </select>
57
+ {#if resolvedIcon}
58
+ <Icon
59
+ src={resolvedIcon}
60
+ theme={iconTheme}
61
+ class="absolute left-2 top-2 size-4 text-icon pointer-events-none"
62
+ />
63
+ {/if}
64
+ </div>
65
65
 
66
- {#if errorText}
67
- <InputError {errorText} />
68
- {/if}
66
+ {#if errorText}
67
+ <InputError {errorText} />
68
+ {/if}
69
+ </div>
69
70
 
70
71
  <style>
71
72
  .ui-select {