@invopop/popui 0.0.104 → 0.1.1

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 (248) hide show
  1. package/dist/AlertDialog.svelte +84 -59
  2. package/dist/AlertDialog.svelte.d.ts +5 -29
  3. package/dist/BaseButton.svelte +106 -101
  4. package/dist/BaseButton.svelte.d.ts +4 -34
  5. package/dist/BaseCard.svelte +20 -12
  6. package/dist/BaseCard.svelte.d.ts +4 -26
  7. package/dist/BaseCounter.svelte +13 -9
  8. package/dist/BaseCounter.svelte.d.ts +4 -17
  9. package/dist/BaseDropdown.svelte +54 -38
  10. package/dist/BaseDropdown.svelte.d.ts +6 -26
  11. package/dist/BaseFlag.svelte +6 -4
  12. package/dist/BaseFlag.svelte.d.ts +4 -17
  13. package/dist/BaseTable.svelte +226 -188
  14. package/dist/BaseTable.svelte.d.ts +4 -39
  15. package/dist/BaseTableActions.svelte +43 -33
  16. package/dist/BaseTableActions.svelte.d.ts +6 -21
  17. package/dist/BaseTableCellContent.svelte +19 -13
  18. package/dist/BaseTableCellContent.svelte.d.ts +4 -24
  19. package/dist/BaseTableCheckbox.svelte +19 -12
  20. package/dist/BaseTableCheckbox.svelte.d.ts +4 -21
  21. package/dist/BaseTableHeaderContent.svelte +30 -22
  22. package/dist/BaseTableHeaderContent.svelte.d.ts +4 -21
  23. package/dist/BaseTableHeaderOrderBy.svelte +24 -0
  24. package/dist/BaseTableHeaderOrderBy.svelte.d.ts +4 -0
  25. package/dist/BaseTableRow.svelte +78 -60
  26. package/dist/BaseTableRow.svelte.d.ts +4 -32
  27. package/dist/Breadcrumbs.svelte +14 -10
  28. package/dist/Breadcrumbs.svelte.d.ts +4 -19
  29. package/dist/ButtonFile.svelte +40 -29
  30. package/dist/ButtonFile.svelte.d.ts +4 -26
  31. package/dist/ButtonUuidCopy.svelte +27 -20
  32. package/dist/ButtonUuidCopy.svelte.d.ts +4 -22
  33. package/dist/CardCheckbox.svelte +28 -19
  34. package/dist/CardCheckbox.svelte.d.ts +4 -28
  35. package/dist/CardRelation.svelte +9 -8
  36. package/dist/CardRelation.svelte.d.ts +4 -22
  37. package/dist/CompanySelector.svelte +49 -43
  38. package/dist/CompanySelector.svelte.d.ts +4 -22
  39. package/dist/CounterWorkflow.svelte +12 -8
  40. package/dist/CounterWorkflow.svelte.d.ts +4 -17
  41. package/dist/DataListItem.svelte +24 -14
  42. package/dist/DataListItem.svelte.d.ts +4 -22
  43. package/dist/DatePicker.svelte +186 -386
  44. package/dist/DatePicker.svelte.d.ts +4 -22
  45. package/dist/DrawerContext.svelte +33 -22
  46. package/dist/DrawerContext.svelte.d.ts +4 -24
  47. package/dist/DrawerContextItem.svelte +70 -57
  48. package/dist/DrawerContextItem.svelte.d.ts +4 -23
  49. package/dist/DrawerContextSeparator.svelte +1 -1
  50. package/dist/DrawerContextSeparator.svelte.d.ts +22 -19
  51. package/dist/DrawerContextWorkspace.svelte +31 -32
  52. package/dist/DrawerContextWorkspace.svelte.d.ts +4 -20
  53. package/dist/DropdownSelect.svelte +93 -81
  54. package/dist/DropdownSelect.svelte.d.ts +4 -27
  55. package/dist/EmptyStateIcon.svelte +13 -7
  56. package/dist/EmptyStateIcon.svelte.d.ts +4 -22
  57. package/dist/EmptyStateIllustration.svelte +41 -33
  58. package/dist/EmptyStateIllustration.svelte.d.ts +4 -21
  59. package/dist/FeedEvents.svelte +5 -2
  60. package/dist/FeedEvents.svelte.d.ts +4 -17
  61. package/dist/FeedIconEvent.svelte +5 -3
  62. package/dist/FeedIconEvent.svelte.d.ts +4 -19
  63. package/dist/FeedIconStatus.svelte +23 -18
  64. package/dist/FeedIconStatus.svelte.d.ts +4 -17
  65. package/dist/FeedItem.svelte +33 -28
  66. package/dist/FeedItem.svelte.d.ts +4 -30
  67. package/dist/FeedItemDetail.svelte +21 -13
  68. package/dist/FeedItemDetail.svelte.d.ts +4 -23
  69. package/dist/FeedViewer.svelte +6 -13
  70. package/dist/FeedViewer.svelte.d.ts +4 -21
  71. package/dist/FormLayoutModal.svelte +9 -3
  72. package/dist/FormLayoutModal.svelte.d.ts +4 -29
  73. package/dist/GlobalSearch.svelte +38 -31
  74. package/dist/GlobalSearch.svelte.d.ts +4 -18
  75. package/dist/InputCheckbox.svelte +23 -14
  76. package/dist/InputCheckbox.svelte.d.ts +4 -23
  77. package/dist/InputError.svelte +4 -1
  78. package/dist/InputError.svelte.d.ts +4 -16
  79. package/dist/InputLabel.svelte +5 -3
  80. package/dist/InputLabel.svelte.d.ts +4 -18
  81. package/dist/InputRadio.svelte +25 -19
  82. package/dist/InputRadio.svelte.d.ts +4 -21
  83. package/dist/InputSearch.svelte +66 -46
  84. package/dist/InputSearch.svelte.d.ts +9 -33
  85. package/dist/InputSelect.svelte +36 -33
  86. package/dist/InputSelect.svelte.d.ts +4 -31
  87. package/dist/InputText.svelte +64 -48
  88. package/dist/InputText.svelte.d.ts +4 -28
  89. package/dist/InputTextarea.svelte +38 -29
  90. package/dist/InputTextarea.svelte.d.ts +4 -25
  91. package/dist/InputToggle.svelte +29 -22
  92. package/dist/InputToggle.svelte.d.ts +4 -20
  93. package/dist/MenuItem.svelte +99 -87
  94. package/dist/MenuItem.svelte.d.ts +5 -29
  95. package/dist/MenuItemCollapsible.svelte +26 -18
  96. package/dist/MenuItemCollapsible.svelte.d.ts +4 -24
  97. package/dist/Notification.svelte +35 -31
  98. package/dist/Notification.svelte.d.ts +4 -20
  99. package/dist/ProfileAvatar.svelte +26 -19
  100. package/dist/ProfileAvatar.svelte.d.ts +4 -21
  101. package/dist/ProfileSelector.svelte +25 -17
  102. package/dist/ProfileSelector.svelte.d.ts +4 -22
  103. package/dist/SectionLayout.svelte +6 -3
  104. package/dist/SectionLayout.svelte.d.ts +4 -18
  105. package/dist/SeparatorHorizontal.svelte +1 -1
  106. package/dist/SeparatorHorizontal.svelte.d.ts +22 -19
  107. package/dist/ShortcutWrapper.svelte +7 -1
  108. package/dist/ShortcutWrapper.svelte.d.ts +4 -27
  109. package/dist/StatusLabel.svelte +16 -12
  110. package/dist/StatusLabel.svelte.d.ts +4 -18
  111. package/dist/StepIconList.svelte +44 -41
  112. package/dist/StepIconList.svelte.d.ts +4 -17
  113. package/dist/TagBeta.svelte.d.ts +22 -19
  114. package/dist/TagSearch.svelte +19 -20
  115. package/dist/TagSearch.svelte.d.ts +4 -22
  116. package/dist/TagStatus.svelte +42 -37
  117. package/dist/TagStatus.svelte.d.ts +4 -19
  118. package/dist/TitleMain.svelte +9 -2
  119. package/dist/TitleMain.svelte.d.ts +4 -18
  120. package/dist/TitleSection.svelte +9 -2
  121. package/dist/TitleSection.svelte.d.ts +4 -18
  122. package/dist/UuidCopy.svelte +61 -48
  123. package/dist/UuidCopy.svelte.d.ts +4 -26
  124. package/dist/alert-dialog/alert-dialog-action.svelte +15 -15
  125. package/dist/alert-dialog/alert-dialog-action.svelte.d.ts +5 -26
  126. package/dist/alert-dialog/alert-dialog-cancel.svelte +13 -10
  127. package/dist/alert-dialog/alert-dialog-cancel.svelte.d.ts +3 -22
  128. package/dist/alert-dialog/alert-dialog-content.svelte +19 -15
  129. package/dist/alert-dialog/alert-dialog-content.svelte.d.ts +6 -15
  130. package/dist/alert-dialog/alert-dialog-description.svelte +11 -6
  131. package/dist/alert-dialog/alert-dialog-description.svelte.d.ts +3 -16
  132. package/dist/alert-dialog/alert-dialog-footer.svelte +11 -5
  133. package/dist/alert-dialog/alert-dialog-footer.svelte.d.ts +4 -16
  134. package/dist/alert-dialog/alert-dialog-header.svelte +14 -5
  135. package/dist/alert-dialog/alert-dialog-header.svelte.d.ts +4 -16
  136. package/dist/alert-dialog/alert-dialog-overlay.svelte +10 -13
  137. package/dist/alert-dialog/alert-dialog-overlay.svelte.d.ts +3 -14
  138. package/dist/alert-dialog/alert-dialog-title.svelte +11 -8
  139. package/dist/alert-dialog/alert-dialog-title.svelte.d.ts +3 -16
  140. package/dist/alert-dialog/alert-dialog-trigger.svelte +6 -0
  141. package/dist/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
  142. package/dist/alert-dialog/index.d.ts +3 -4
  143. package/dist/alert-dialog/index.js +2 -2
  144. package/dist/button/button.svelte +76 -18
  145. package/dist/button/button.svelte.d.ts +62 -14
  146. package/dist/button/index.d.ts +2 -60
  147. package/dist/button/index.js +1 -26
  148. package/dist/helpers.d.ts +4 -1
  149. package/dist/helpers.js +35 -0
  150. package/dist/index.d.ts +1 -3
  151. package/dist/index.js +0 -4
  152. package/dist/range-calendar/index.d.ts +20 -0
  153. package/dist/range-calendar/index.js +22 -0
  154. package/dist/range-calendar/range-calendar-caption.svelte +71 -0
  155. package/dist/range-calendar/range-calendar-caption.svelte.d.ts +19 -0
  156. package/dist/range-calendar/range-calendar-cell.svelte +18 -0
  157. package/dist/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
  158. package/dist/range-calendar/range-calendar-day.svelte +41 -0
  159. package/dist/range-calendar/range-calendar-day.svelte.d.ts +4 -0
  160. package/dist/range-calendar/range-calendar-grid-row.svelte +11 -0
  161. package/dist/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
  162. package/dist/range-calendar/range-calendar-grid.svelte +15 -0
  163. package/dist/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
  164. package/dist/range-calendar/range-calendar-head-cell.svelte +18 -0
  165. package/dist/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
  166. package/dist/range-calendar/range-calendar-header.svelte +18 -0
  167. package/dist/range-calendar/range-calendar-header.svelte.d.ts +4 -0
  168. package/dist/range-calendar/range-calendar-heading.svelte +15 -0
  169. package/dist/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
  170. package/dist/range-calendar/range-calendar-month-select.svelte +44 -0
  171. package/dist/range-calendar/range-calendar-month-select.svelte.d.ts +4 -0
  172. package/dist/range-calendar/range-calendar-month.svelte +14 -0
  173. package/dist/range-calendar/range-calendar-month.svelte.d.ts +5 -0
  174. package/dist/range-calendar/range-calendar-months.svelte +18 -0
  175. package/dist/range-calendar/range-calendar-months.svelte.d.ts +5 -0
  176. package/dist/range-calendar/range-calendar-nav.svelte +18 -0
  177. package/dist/range-calendar/range-calendar-nav.svelte.d.ts +5 -0
  178. package/dist/range-calendar/range-calendar-next-button.svelte +30 -0
  179. package/dist/range-calendar/range-calendar-next-button.svelte.d.ts +8 -0
  180. package/dist/range-calendar/range-calendar-prev-button.svelte +30 -0
  181. package/dist/range-calendar/range-calendar-prev-button.svelte.d.ts +8 -0
  182. package/dist/range-calendar/range-calendar-year-select.svelte +43 -0
  183. package/dist/range-calendar/range-calendar-year-select.svelte.d.ts +4 -0
  184. package/dist/range-calendar/range-calendar.svelte +109 -0
  185. package/dist/range-calendar/range-calendar.svelte.d.ts +21 -0
  186. package/dist/svg/BgPattern.svelte.d.ts +22 -19
  187. package/dist/svg/IconContact.svelte +6 -1
  188. package/dist/svg/IconContact.svelte.d.ts +5 -15
  189. package/dist/svg/IconEmpty.svelte.d.ts +22 -19
  190. package/dist/svg/IconFile.svelte +6 -1
  191. package/dist/svg/IconFile.svelte.d.ts +5 -15
  192. package/dist/svg/IconInvoice.svelte +6 -1
  193. package/dist/svg/IconInvoice.svelte.d.ts +5 -15
  194. package/dist/svg/IconNoResults.svelte +6 -1
  195. package/dist/svg/IconNoResults.svelte.d.ts +5 -15
  196. package/dist/svg/IconPdf.svelte +6 -1
  197. package/dist/svg/IconPdf.svelte.d.ts +5 -15
  198. package/dist/svg/IconProduct.svelte +6 -1
  199. package/dist/svg/IconProduct.svelte.d.ts +5 -15
  200. package/dist/table/table-body.svelte +10 -5
  201. package/dist/table/table-body.svelte.d.ts +4 -16
  202. package/dist/table/table-caption.svelte +14 -5
  203. package/dist/table/table-caption.svelte.d.ts +4 -16
  204. package/dist/table/table-cell.svelte +16 -7
  205. package/dist/table/table-cell.svelte.d.ts +4 -19
  206. package/dist/table/table-footer.svelte +14 -5
  207. package/dist/table/table-footer.svelte.d.ts +4 -16
  208. package/dist/table/table-head.svelte +11 -5
  209. package/dist/table/table-head.svelte.d.ts +4 -16
  210. package/dist/table/table-header.svelte +17 -8
  211. package/dist/table/table-header.svelte.d.ts +4 -19
  212. package/dist/table/table-row.svelte +22 -8
  213. package/dist/table/table-row.svelte.d.ts +4 -22
  214. package/dist/table/table.svelte +11 -6
  215. package/dist/table/table.svelte.d.ts +4 -16
  216. package/dist/tabs/tabs-content.svelte +13 -8
  217. package/dist/tabs/tabs-content.svelte.d.ts +3 -16
  218. package/dist/tabs/tabs-list.svelte +7 -6
  219. package/dist/tabs/tabs-list.svelte.d.ts +3 -16
  220. package/dist/tabs/tabs-trigger.svelte +13 -9
  221. package/dist/tabs/tabs-trigger.svelte.d.ts +3 -14
  222. package/dist/tabs/tabs.svelte +12 -7
  223. package/dist/tabs/tabs.svelte.d.ts +3 -16
  224. package/dist/tooltip/index.d.ts +5 -3
  225. package/dist/tooltip/index.js +5 -3
  226. package/dist/tooltip/tooltip-content.svelte +42 -23
  227. package/dist/tooltip/tooltip-content.svelte.d.ts +5 -15
  228. package/dist/tooltip/tooltip-trigger.svelte +8 -0
  229. package/dist/tooltip/tooltip-trigger.svelte.d.ts +4 -0
  230. package/dist/tw.theme.d.ts +2 -9
  231. package/dist/tw.theme.js +0 -5
  232. package/dist/types.d.ts +484 -25
  233. package/dist/utils.d.ts +10 -1
  234. package/package.json +30 -39
  235. package/README.md +0 -234
  236. package/dist/BaseTableHeaderSortBy.svelte +0 -22
  237. package/dist/BaseTableHeaderSortBy.svelte.d.ts +0 -20
  238. package/dist/ComboBox.svelte +0 -12
  239. package/dist/ComboBox.svelte.d.ts +0 -21
  240. package/dist/ComboBoxContent.svelte +0 -33
  241. package/dist/ComboBoxContent.svelte.d.ts +0 -20
  242. package/dist/ProgressBar.svelte +0 -6
  243. package/dist/ProgressBar.svelte.d.ts +0 -16
  244. package/dist/alert-dialog/alert-dialog-portal.svelte +0 -6
  245. package/dist/alert-dialog/alert-dialog-portal.svelte.d.ts +0 -17
  246. package/dist/popui.css +0 -1
  247. package/dist/wcdispatch.d.ts +0 -1
  248. package/dist/wcdispatch.js +0 -9
@@ -1,17 +1,4 @@
1
- import { SvelteComponent } from "svelte";
2
- import type { StepIcon } from './types.js';
3
- declare const __propDef: {
4
- props: {
5
- icons?: StepIcon[] | undefined;
6
- };
7
- events: {
8
- [evt: string]: CustomEvent<any>;
9
- };
10
- slots: {};
11
- };
12
- export type StepIconListProps = typeof __propDef.props;
13
- export type StepIconListEvents = typeof __propDef.events;
14
- export type StepIconListSlots = typeof __propDef.slots;
15
- export default class StepIconList extends SvelteComponent<StepIconListProps, StepIconListEvents, StepIconListSlots> {
16
- }
17
- export {};
1
+ import type { StepIconListProps } from './types.js';
2
+ declare const StepIconList: import("svelte").Component<StepIconListProps, {}, "">;
3
+ type StepIconList = ReturnType<typeof StepIconList>;
4
+ export default StepIconList;
@@ -1,23 +1,26 @@
1
- /** @typedef {typeof __propDef.props} TagBetaProps */
2
- /** @typedef {typeof __propDef.events} TagBetaEvents */
3
- /** @typedef {typeof __propDef.slots} TagBetaSlots */
4
- export default class TagBeta extends SvelteComponent<{
1
+ export default TagBeta;
2
+ type TagBeta = SvelteComponent<{
5
3
  [x: string]: never;
6
4
  }, {
7
5
  [evt: string]: CustomEvent<any>;
8
- }, {}> {
9
- }
10
- export type TagBetaProps = typeof __propDef.props;
11
- export type TagBetaEvents = typeof __propDef.events;
12
- export type TagBetaSlots = typeof __propDef.slots;
13
- import { SvelteComponent } from "svelte";
14
- declare const __propDef: {
15
- props: {
16
- [x: string]: never;
17
- };
18
- events: {
19
- [evt: string]: CustomEvent<any>;
20
- };
21
- slots: {};
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
22
8
  };
23
- export {};
9
+ declare const TagBeta: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -1,22 +1,20 @@
1
- <script>import { Icon } from "@steeze-ui/svelte-icon";
2
- import { createEventDispatcher } from "svelte";
3
- import { dispatchWcEvent } from "./wcdispatch.js";
4
- import { resolveIcon } from "./helpers.js";
5
- const dispatch = createEventDispatcher();
6
- export let label = "";
7
- export let icon = void 0;
8
- export let iconTheme = "default";
9
- let resolvedIcon;
10
- $: {
11
- resolveIcon(icon).then((icon2) => {
12
- resolvedIcon = icon2;
13
- });
14
- }
15
- function handleClear(event) {
16
- const target = event.target;
17
- dispatch("clear");
18
- dispatchWcEvent(target, "clear");
19
- }
1
+ <script lang="ts">
2
+ import { Icon, type IconSource } from '@steeze-ui/svelte-icon'
3
+ import type { TagSearchProps } from './types.ts'
4
+ import { resolveIcon } from './helpers.js'
5
+
6
+ let { label = '', icon = undefined, iconTheme = 'default', onclear }: TagSearchProps = $props()
7
+
8
+ let resolvedIcon: IconSource | undefined = $state()
9
+
10
+ $effect(() => {
11
+ resolveIcon(icon).then((res) => (resolvedIcon = res))
12
+ })
13
+
14
+ function handleClear(event: unknown) {
15
+ const target = (event as PointerEvent).target
16
+ onclear?.()
17
+ }
20
18
  </script>
21
19
 
22
20
  <span
@@ -29,8 +27,9 @@ function handleClear(event) {
29
27
  {/if}
30
28
  <span class="py-1 pr-2 text-workspace-accent tracking-normal">{label}</span>
31
29
  <button
30
+ aria-label="Clear"
32
31
  class="py-1 border-l border-workspace-accent-100 pl-1 text-neutral-500"
33
- on:click={handleClear}
32
+ onclick={handleClear}
34
33
  >
35
34
  <svg
36
35
  xmlns="http://www.w3.org/2000/svg"
@@ -1,22 +1,4 @@
1
- import { SvelteComponent } from "svelte";
2
- import { type IconSource } from '@steeze-ui/svelte-icon';
3
- import type { IconTheme } from './types.ts';
4
- declare const __propDef: {
5
- props: {
6
- label?: string | undefined;
7
- icon?: IconSource | string | undefined;
8
- iconTheme?: IconTheme | undefined;
9
- };
10
- events: {
11
- clear: CustomEvent<any>;
12
- } & {
13
- [evt: string]: CustomEvent<any>;
14
- };
15
- slots: {};
16
- };
17
- export type TagSearchProps = typeof __propDef.props;
18
- export type TagSearchEvents = typeof __propDef.events;
19
- export type TagSearchSlots = typeof __propDef.slots;
20
- export default class TagSearch extends SvelteComponent<TagSearchProps, TagSearchEvents, TagSearchSlots> {
21
- }
22
- export {};
1
+ import type { TagSearchProps } from './types.ts';
2
+ declare const TagSearch: import("svelte").Component<TagSearchProps, {}, "">;
3
+ type TagSearch = ReturnType<typeof TagSearch>;
4
+ export default TagSearch;
@@ -1,39 +1,44 @@
1
- <script>import clsx from "clsx";
2
- export let label = "";
3
- export let status = "grey";
4
- export let dot = false;
5
- $:
6
- tagStyles = clsx({
7
- "bg-positive-100 text-positive-500": status === "green",
8
- "border border-positive-200": status === "green" && dot,
9
- "bg-yellow-100 text-yellow-500": status === "yellow",
10
- "border border-yellow-200": status === "yellow" && dot,
11
- "bg-danger-100 text-danger-500": status === "red",
12
- "border border-danger-200": status === "red" && dot,
13
- "bg-warning-100 text-warning-500": status === "orange",
14
- "border border-warning-200": status === "orange" && dot,
15
- "bg-blue-100 text-blue-500": status === "blue",
16
- "border border-blue-200": status === "blue" && dot,
17
- "bg-purple-100 text-purple-500": status === "purple",
18
- "border border-purple-200": status === "purple" && dot,
19
- "border border-dashed border-neutral-200 text-neutral-400": status === "empty",
20
- "bg-neutral-100 text-neutral-500": status === "grey",
21
- "border border-neutral-200": status === "grey" && dot,
22
- "pl-1.5 pr-[5px] py-0.5": dot && label,
23
- "p-0.5": dot && !label,
24
- "px-1 py-0.5": !dot
25
- });
26
- $:
27
- dotStyles = clsx({
28
- "bg-positive-500": status === "green",
29
- "bg-yellow-500": status === "yellow",
30
- "bg-danger-500": status === "red",
31
- "bg-warning-500": status === "orange",
32
- "bg-blue-500": status === "blue",
33
- "bg-purple-500": status === "purple",
34
- "bg-neutral-300": status === "empty",
35
- "bg-neutral-500": status === "grey"
36
- });
1
+ <script lang="ts">
2
+ import clsx from 'clsx'
3
+ import type { TagStatusProps } from './types.ts'
4
+
5
+ let { label = '', status = 'grey', dot = false }: TagStatusProps = $props()
6
+
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
+ 'border border-dashed border-neutral-200 text-neutral-400': status === 'empty',
22
+ 'bg-neutral-100 text-neutral-500': status === 'grey',
23
+ 'border border-neutral-200': status === 'grey' && dot,
24
+ 'pl-1.5 pr-[5px] py-0.5': dot && label,
25
+ 'p-0.5': dot && !label,
26
+ 'px-1 py-0.5': !dot
27
+ })
28
+ )
29
+
30
+ let dotStyles = $derived(
31
+ clsx({
32
+ 'bg-positive-500': status === 'green',
33
+ 'bg-yellow-500': status === 'yellow',
34
+ 'bg-danger-500': status === 'red',
35
+ 'bg-warning-500': status === 'orange',
36
+ 'bg-blue-500': status === 'blue',
37
+ 'bg-purple-500': status === 'purple',
38
+ 'bg-neutral-300': status === 'empty',
39
+ 'bg-neutral-500': status === 'grey'
40
+ })
41
+ )
37
42
  </script>
38
43
 
39
44
  <span
@@ -41,7 +46,7 @@ $:
41
46
  class="{tagStyles} rounded text-sm inline-flex items-center font-medium gap-1 box-border"
42
47
  >
43
48
  {#if dot}
44
- <span class="{dotStyles} w-2 h-2 rounded-sm" />
49
+ <span class="{dotStyles} w-2 h-2 rounded-sm"></span>
45
50
  {/if}
46
51
  {#if label}
47
52
  <span>{label}</span>
@@ -1,19 +1,4 @@
1
- import { SvelteComponent } from "svelte";
2
- import type { StatusType } from './types.ts';
3
- declare const __propDef: {
4
- props: {
5
- label?: string | undefined;
6
- status?: StatusType | undefined;
7
- dot?: boolean | undefined;
8
- };
9
- events: {
10
- [evt: string]: CustomEvent<any>;
11
- };
12
- slots: {};
13
- };
14
- export type TagStatusProps = typeof __propDef.props;
15
- export type TagStatusEvents = typeof __propDef.events;
16
- export type TagStatusSlots = typeof __propDef.slots;
17
- export default class TagStatus extends SvelteComponent<TagStatusProps, TagStatusEvents, TagStatusSlots> {
18
- }
19
- export {};
1
+ import type { TagStatusProps } from './types.ts';
2
+ declare const TagStatus: import("svelte").Component<TagStatusProps, {}, "">;
3
+ type TagStatus = ReturnType<typeof TagStatus>;
4
+ export default TagStatus;
@@ -1,6 +1,13 @@
1
- <script>export let title = "";
1
+ <script lang="ts">
2
+ import type { TitleMainProps } from './types'
3
+
4
+ let { title = '', children }: TitleMainProps = $props()
2
5
  </script>
3
6
 
4
7
  <h1 class="text-neutral-800 font-medium text-lg font-sans tracking-tightest">
5
- <slot>{title}</slot>
8
+ {#if children}
9
+ {@render children()}
10
+ {:else}
11
+ {title}
12
+ {/if}
6
13
  </h1>
@@ -1,18 +1,4 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- title?: string | undefined;
5
- };
6
- events: {
7
- [evt: string]: CustomEvent<any>;
8
- };
9
- slots: {
10
- default: {};
11
- };
12
- };
13
- export type TitleMainProps = typeof __propDef.props;
14
- export type TitleMainEvents = typeof __propDef.events;
15
- export type TitleMainSlots = typeof __propDef.slots;
16
- export default class TitleMain extends SvelteComponent<TitleMainProps, TitleMainEvents, TitleMainSlots> {
17
- }
18
- export {};
1
+ import type { TitleMainProps } from './types';
2
+ declare const TitleMain: import("svelte").Component<TitleMainProps, {}, "">;
3
+ type TitleMain = ReturnType<typeof TitleMain>;
4
+ export default TitleMain;
@@ -1,6 +1,13 @@
1
- <script>export let title = "";
1
+ <script lang="ts">
2
+ import type { TitleSectionProps } from './types'
3
+
4
+ let { title = '', children }: TitleSectionProps = $props()
2
5
  </script>
3
6
 
4
7
  <h1 class="text-neutral-800 font-medium text-lg font-sans tracking-tighter">
5
- <slot>{title}</slot>
8
+ {#if children}
9
+ {@render children()}
10
+ {:else}
11
+ {title}
12
+ {/if}
6
13
  </h1>
@@ -1,18 +1,4 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- title?: string | undefined;
5
- };
6
- events: {
7
- [evt: string]: CustomEvent<any>;
8
- };
9
- slots: {
10
- default: {};
11
- };
12
- };
13
- export type TitleSectionProps = typeof __propDef.props;
14
- export type TitleSectionEvents = typeof __propDef.events;
15
- export type TitleSectionSlots = typeof __propDef.slots;
16
- export default class TitleSection extends SvelteComponent<TitleSectionProps, TitleSectionEvents, TitleSectionSlots> {
17
- }
18
- export {};
1
+ import type { TitleSectionProps } from './types';
2
+ declare const TitleSection: import("svelte").Component<TitleSectionProps, {}, "">;
3
+ type TitleSection = ReturnType<typeof TitleSection>;
4
+ export default TitleSection;
@@ -1,57 +1,70 @@
1
- <script>import { Duplicate, ExternalLink } from "@invopop/ui-icons";
2
- import { Icon } from "@steeze-ui/svelte-icon";
3
- import clsx from "clsx";
4
- import { createEventDispatcher } from "svelte";
5
- const dispatch = createEventDispatcher();
6
- export let uuid = "";
7
- export let small = false;
8
- export let dark = false;
9
- export let rightAlign = false;
10
- export let prefixLength = 4;
11
- export let suffixLength = 4;
12
- export let full = false;
13
- export let compact = false;
14
- export let link = false;
15
- function shortenString(inputString, prefixLength2, suffixLength2) {
16
- if (inputString.length <= prefixLength2 + suffixLength2) {
17
- return inputString;
1
+ <script lang="ts">
2
+ import { Duplicate, ExternalLink } from '@invopop/ui-icons'
3
+ import { Icon } from '@steeze-ui/svelte-icon'
4
+ import clsx from 'clsx'
5
+ import type { UuidCopyProps } from './types'
6
+
7
+ let {
8
+ uuid = '',
9
+ small = false,
10
+ dark = false,
11
+ rightAlign = false,
12
+ prefixLength = 4,
13
+ suffixLength = 4,
14
+ full = false,
15
+ compact = false,
16
+ link = false,
17
+ onCopied,
18
+ onLinkClick
19
+ }: UuidCopyProps = $props()
20
+
21
+ function shortenString(inputString: string, prefixLength: number, suffixLength: number) {
22
+ if (inputString.length <= prefixLength + suffixLength) {
23
+ return inputString // Return the whole string if it's too short
24
+ }
25
+
26
+ const prefix = inputString.substring(0, prefixLength)
27
+ const suffix = inputString.substring(inputString.length - suffixLength)
28
+
29
+ return prefix + '...' + suffix
30
+ }
31
+
32
+ let formattedUuid = $derived(full ? uuid : shortenString(uuid, prefixLength, suffixLength))
33
+ let styles = $derived(
34
+ clsx({
35
+ 'justify-end': rightAlign,
36
+ 'text-sm': small,
37
+ 'text-base': !small,
38
+ 'text-neutral-800': dark,
39
+ 'text-neutral-500': !dark,
40
+ 'justify-between': !compact,
41
+ 'w-full': full,
42
+ 'border border-neutral-800/10 rounded-md pl-2.5 pr-2 py-[5px]': !full
43
+ })
44
+ )
45
+
46
+ async function handleClick(event: MouseEvent) {
47
+ event.stopPropagation()
48
+ await navigator.clipboard.writeText(uuid)
49
+ onCopied?.(uuid)
50
+ }
51
+
52
+ async function handleIconClick(event: MouseEvent) {
53
+ event.stopPropagation()
54
+ await navigator.clipboard.writeText(uuid)
55
+ if (link) {
56
+ onLinkClick?.(uuid)
57
+ } else {
58
+ onCopied?.(uuid)
59
+ }
18
60
  }
19
- const prefix = inputString.substring(0, prefixLength2);
20
- const suffix = inputString.substring(inputString.length - suffixLength2);
21
- return prefix + "..." + suffix;
22
- }
23
- $:
24
- formattedUuid = full ? uuid : shortenString(uuid, prefixLength, suffixLength);
25
- $:
26
- styles = clsx({
27
- "justify-end": rightAlign,
28
- "text-sm": small,
29
- "text-base": !small,
30
- "text-neutral-800": dark,
31
- "text-neutral-500": !dark,
32
- "justify-between": !compact,
33
- "w-full": full,
34
- "border border-neutral-800/10 rounded-md pl-2.5 pr-2 py-[5px]": !full
35
- });
36
61
  </script>
37
62
 
38
63
  <div class="{styles} relative inline-flex items-center space-x-1 text-left whitespace-nowrap">
39
- <button
40
- class="tracking-wide font-mono text-base"
41
- on:click|stopPropagation={async () => {
42
- await navigator.clipboard.writeText(uuid)
43
- dispatch('copied', uuid)
44
- }}
45
- >
64
+ <button class="tracking-wide font-mono text-base cursor-pointer" onclick={handleClick}>
46
65
  {formattedUuid}
47
66
  </button>
48
- <button
49
- class="p-1"
50
- on:click|stopPropagation={async () => {
51
- await navigator.clipboard.writeText(uuid)
52
- dispatch(link ? 'link' : 'copied', uuid)
53
- }}
54
- >
67
+ <button class="p-1 cursor-pointer" onclick={handleIconClick}>
55
68
  <Icon src={link ? ExternalLink : Duplicate} class="w-4 h-4 text-neutral-500" />
56
69
  </button>
57
70
  </div>
@@ -1,26 +1,4 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- uuid?: string | undefined;
5
- small?: boolean | undefined;
6
- dark?: boolean | undefined;
7
- rightAlign?: boolean | undefined;
8
- prefixLength?: number | undefined;
9
- suffixLength?: number | undefined;
10
- full?: boolean | undefined;
11
- compact?: boolean | undefined;
12
- link?: boolean | undefined;
13
- };
14
- events: {
15
- copied: CustomEvent<any>;
16
- } & {
17
- [evt: string]: CustomEvent<any>;
18
- };
19
- slots: {};
20
- };
21
- export type UuidCopyProps = typeof __propDef.props;
22
- export type UuidCopyEvents = typeof __propDef.events;
23
- export type UuidCopySlots = typeof __propDef.slots;
24
- export default class UuidCopy extends SvelteComponent<UuidCopyProps, UuidCopyEvents, UuidCopySlots> {
25
- }
26
- export {};
1
+ import type { UuidCopyProps } from './types';
2
+ declare const UuidCopy: import("svelte").Component<UuidCopyProps, {}, "">;
3
+ type UuidCopy = ReturnType<typeof UuidCopy>;
4
+ export default UuidCopy;
@@ -1,21 +1,21 @@
1
- <script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
2
- import { buttonVariants } from "../button/index.js";
3
- import { cn } from "../utils.js";
4
- let className = void 0;
5
- let destructive = false;
6
- let el = void 0;
7
- export { className as class, destructive, el };
8
- $:
9
- variant = destructive ? "destructive" : "primary";
1
+ <script lang="ts">
2
+ import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
3
+ import { buttonVariants, type ButtonVariant } from '../button/index.js'
4
+ import { cn } from '../utils.js'
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ destructive = false,
9
+ children
10
+ }: AlertDialogPrimitive.ActionProps & { destructive: boolean } = $props()
11
+
12
+ let variant = $derived((destructive ? 'destructive' : 'primary') as ButtonVariant)
10
13
  </script>
11
14
 
12
15
  <AlertDialogPrimitive.Action
13
- bind:el
16
+ bind:ref
17
+ data-slot="alert-dialog-action"
14
18
  class={cn(buttonVariants({ variant }), className)}
15
- {...$$restProps}
16
- on:click
17
- on:keydown
18
- let:builder
19
19
  >
20
- <slot {builder} />
20
+ {@render children?.()}
21
21
  </AlertDialogPrimitive.Action>
@@ -1,28 +1,7 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
3
- declare const __propDef: {
4
- props: {
5
- asChild?: boolean | undefined;
6
- el?: HTMLButtonElement | undefined;
7
- } & import("svelte/elements").HTMLButtonAttributes & {
8
- destructive: boolean;
9
- };
10
- slots: {
11
- default: {
12
- builder: {
13
- readonly type: "button";
14
- } & {
15
- [x: `data-melt-${string}`]: "";
16
- } & {
17
- action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"click" | "keydown">;
18
- };
19
- };
20
- };
21
- events: AlertDialogPrimitive.ActionEvents;
2
+ type $$ComponentProps = AlertDialogPrimitive.ActionProps & {
3
+ destructive: boolean;
22
4
  };
23
- export type AlertDialogActionProps = typeof __propDef.props;
24
- export type AlertDialogActionEvents = typeof __propDef.events;
25
- export type AlertDialogActionSlots = typeof __propDef.slots;
26
- export default class AlertDialogAction extends SvelteComponent<AlertDialogActionProps, AlertDialogActionEvents, AlertDialogActionSlots> {
27
- }
28
- export {};
5
+ declare const AlertDialogAction: import("svelte").Component<$$ComponentProps, {}, "ref">;
6
+ type AlertDialogAction = ReturnType<typeof AlertDialogAction>;
7
+ export default AlertDialogAction;
@@ -1,16 +1,19 @@
1
- <script>import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
2
- import { buttonVariants } from "../button/index.js";
3
- import { cn } from "../utils.js";
4
- let className = void 0;
5
- export { className as class };
1
+ <script lang="ts">
2
+ import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
3
+ import { buttonVariants } from '../button/index.js'
4
+ import { cn } from '../utils.js'
5
+ let {
6
+ ref = $bindable(null),
7
+ class: className,
8
+ children
9
+ }: AlertDialogPrimitive.CancelProps = $props()
6
10
  </script>
7
11
 
8
12
  <AlertDialogPrimitive.Cancel
13
+ bind:ref
14
+ data-slot="alert-dialog-cancel"
9
15
  class={cn(buttonVariants({ variant: 'secondary' }), 'mt-2 sm:mt-0', className)}
10
- {...$$restProps}
11
- on:click
12
- on:keydown
13
- let:builder
16
+ {onkeydown}
14
17
  >
15
- <slot {builder} />
18
+ {@render children?.()}
16
19
  </AlertDialogPrimitive.Cancel>
@@ -1,23 +1,4 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
3
- declare const __propDef: {
4
- props: AlertDialogPrimitive.CancelProps;
5
- slots: {
6
- default: {
7
- builder: {
8
- readonly type: "button";
9
- } & {
10
- [x: `data-melt-${string}`]: "";
11
- } & {
12
- action: (node: HTMLElement) => import("@melt-ui/svelte/internal/types").MeltActionReturn<"click" | "keydown">;
13
- };
14
- };
15
- };
16
- events: AlertDialogPrimitive.CancelEvents;
17
- };
18
- export type AlertDialogCancelProps = typeof __propDef.props;
19
- export type AlertDialogCancelEvents = typeof __propDef.events;
20
- export type AlertDialogCancelSlots = typeof __propDef.slots;
21
- export default class AlertDialogCancel extends SvelteComponent<AlertDialogCancelProps, AlertDialogCancelEvents, AlertDialogCancelSlots> {
22
- }
23
- export {};
2
+ declare const AlertDialogCancel: import("svelte").Component<AlertDialogPrimitive.TriggerProps, {}, "ref">;
3
+ type AlertDialogCancel = ReturnType<typeof AlertDialogCancel>;
4
+ export default AlertDialogCancel;