@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.
- package/dist/AlertDialog.svelte +84 -59
- package/dist/AlertDialog.svelte.d.ts +5 -29
- package/dist/BaseButton.svelte +106 -101
- package/dist/BaseButton.svelte.d.ts +4 -34
- package/dist/BaseCard.svelte +20 -12
- package/dist/BaseCard.svelte.d.ts +4 -26
- package/dist/BaseCounter.svelte +13 -9
- package/dist/BaseCounter.svelte.d.ts +4 -17
- package/dist/BaseDropdown.svelte +54 -38
- package/dist/BaseDropdown.svelte.d.ts +6 -26
- package/dist/BaseFlag.svelte +6 -4
- package/dist/BaseFlag.svelte.d.ts +4 -17
- package/dist/BaseTable.svelte +226 -188
- package/dist/BaseTable.svelte.d.ts +4 -39
- package/dist/BaseTableActions.svelte +43 -33
- package/dist/BaseTableActions.svelte.d.ts +6 -21
- package/dist/BaseTableCellContent.svelte +19 -13
- package/dist/BaseTableCellContent.svelte.d.ts +4 -24
- package/dist/BaseTableCheckbox.svelte +19 -12
- package/dist/BaseTableCheckbox.svelte.d.ts +4 -21
- package/dist/BaseTableHeaderContent.svelte +30 -22
- package/dist/BaseTableHeaderContent.svelte.d.ts +4 -21
- package/dist/BaseTableHeaderOrderBy.svelte +24 -0
- package/dist/BaseTableHeaderOrderBy.svelte.d.ts +4 -0
- package/dist/BaseTableRow.svelte +78 -60
- package/dist/BaseTableRow.svelte.d.ts +4 -32
- package/dist/Breadcrumbs.svelte +14 -10
- package/dist/Breadcrumbs.svelte.d.ts +4 -19
- package/dist/ButtonFile.svelte +40 -29
- package/dist/ButtonFile.svelte.d.ts +4 -26
- package/dist/ButtonUuidCopy.svelte +27 -20
- package/dist/ButtonUuidCopy.svelte.d.ts +4 -22
- package/dist/CardCheckbox.svelte +28 -19
- package/dist/CardCheckbox.svelte.d.ts +4 -28
- package/dist/CardRelation.svelte +9 -8
- package/dist/CardRelation.svelte.d.ts +4 -22
- package/dist/CompanySelector.svelte +49 -43
- package/dist/CompanySelector.svelte.d.ts +4 -22
- package/dist/CounterWorkflow.svelte +12 -8
- package/dist/CounterWorkflow.svelte.d.ts +4 -17
- package/dist/DataListItem.svelte +24 -14
- package/dist/DataListItem.svelte.d.ts +4 -22
- package/dist/DatePicker.svelte +186 -386
- package/dist/DatePicker.svelte.d.ts +4 -22
- package/dist/DrawerContext.svelte +33 -22
- package/dist/DrawerContext.svelte.d.ts +4 -24
- package/dist/DrawerContextItem.svelte +70 -57
- package/dist/DrawerContextItem.svelte.d.ts +4 -23
- package/dist/DrawerContextSeparator.svelte +1 -1
- package/dist/DrawerContextSeparator.svelte.d.ts +22 -19
- package/dist/DrawerContextWorkspace.svelte +31 -32
- package/dist/DrawerContextWorkspace.svelte.d.ts +4 -20
- package/dist/DropdownSelect.svelte +93 -81
- package/dist/DropdownSelect.svelte.d.ts +4 -27
- package/dist/EmptyStateIcon.svelte +13 -7
- package/dist/EmptyStateIcon.svelte.d.ts +4 -22
- package/dist/EmptyStateIllustration.svelte +41 -33
- package/dist/EmptyStateIllustration.svelte.d.ts +4 -21
- package/dist/FeedEvents.svelte +5 -2
- package/dist/FeedEvents.svelte.d.ts +4 -17
- package/dist/FeedIconEvent.svelte +5 -3
- package/dist/FeedIconEvent.svelte.d.ts +4 -19
- package/dist/FeedIconStatus.svelte +23 -18
- package/dist/FeedIconStatus.svelte.d.ts +4 -17
- package/dist/FeedItem.svelte +33 -28
- package/dist/FeedItem.svelte.d.ts +4 -30
- package/dist/FeedItemDetail.svelte +21 -13
- package/dist/FeedItemDetail.svelte.d.ts +4 -23
- package/dist/FeedViewer.svelte +6 -13
- package/dist/FeedViewer.svelte.d.ts +4 -21
- package/dist/FormLayoutModal.svelte +9 -3
- package/dist/FormLayoutModal.svelte.d.ts +4 -29
- package/dist/GlobalSearch.svelte +38 -31
- package/dist/GlobalSearch.svelte.d.ts +4 -18
- package/dist/InputCheckbox.svelte +23 -14
- package/dist/InputCheckbox.svelte.d.ts +4 -23
- package/dist/InputError.svelte +4 -1
- package/dist/InputError.svelte.d.ts +4 -16
- package/dist/InputLabel.svelte +5 -3
- package/dist/InputLabel.svelte.d.ts +4 -18
- package/dist/InputRadio.svelte +25 -19
- package/dist/InputRadio.svelte.d.ts +4 -21
- package/dist/InputSearch.svelte +66 -46
- package/dist/InputSearch.svelte.d.ts +9 -33
- package/dist/InputSelect.svelte +36 -33
- package/dist/InputSelect.svelte.d.ts +4 -31
- package/dist/InputText.svelte +64 -48
- package/dist/InputText.svelte.d.ts +4 -28
- package/dist/InputTextarea.svelte +38 -29
- package/dist/InputTextarea.svelte.d.ts +4 -25
- package/dist/InputToggle.svelte +29 -22
- package/dist/InputToggle.svelte.d.ts +4 -20
- package/dist/MenuItem.svelte +99 -87
- package/dist/MenuItem.svelte.d.ts +5 -29
- package/dist/MenuItemCollapsible.svelte +26 -18
- package/dist/MenuItemCollapsible.svelte.d.ts +4 -24
- package/dist/Notification.svelte +35 -31
- package/dist/Notification.svelte.d.ts +4 -20
- package/dist/ProfileAvatar.svelte +26 -19
- package/dist/ProfileAvatar.svelte.d.ts +4 -21
- package/dist/ProfileSelector.svelte +25 -17
- package/dist/ProfileSelector.svelte.d.ts +4 -22
- package/dist/SectionLayout.svelte +6 -3
- package/dist/SectionLayout.svelte.d.ts +4 -18
- package/dist/SeparatorHorizontal.svelte +1 -1
- package/dist/SeparatorHorizontal.svelte.d.ts +22 -19
- package/dist/ShortcutWrapper.svelte +7 -1
- package/dist/ShortcutWrapper.svelte.d.ts +4 -27
- package/dist/StatusLabel.svelte +16 -12
- package/dist/StatusLabel.svelte.d.ts +4 -18
- package/dist/StepIconList.svelte +44 -41
- package/dist/StepIconList.svelte.d.ts +4 -17
- package/dist/TagBeta.svelte.d.ts +22 -19
- package/dist/TagSearch.svelte +19 -20
- package/dist/TagSearch.svelte.d.ts +4 -22
- package/dist/TagStatus.svelte +42 -37
- package/dist/TagStatus.svelte.d.ts +4 -19
- package/dist/TitleMain.svelte +9 -2
- package/dist/TitleMain.svelte.d.ts +4 -18
- package/dist/TitleSection.svelte +9 -2
- package/dist/TitleSection.svelte.d.ts +4 -18
- package/dist/UuidCopy.svelte +61 -48
- package/dist/UuidCopy.svelte.d.ts +4 -26
- package/dist/alert-dialog/alert-dialog-action.svelte +15 -15
- package/dist/alert-dialog/alert-dialog-action.svelte.d.ts +5 -26
- package/dist/alert-dialog/alert-dialog-cancel.svelte +13 -10
- package/dist/alert-dialog/alert-dialog-cancel.svelte.d.ts +3 -22
- package/dist/alert-dialog/alert-dialog-content.svelte +19 -15
- package/dist/alert-dialog/alert-dialog-content.svelte.d.ts +6 -15
- package/dist/alert-dialog/alert-dialog-description.svelte +11 -6
- package/dist/alert-dialog/alert-dialog-description.svelte.d.ts +3 -16
- package/dist/alert-dialog/alert-dialog-footer.svelte +11 -5
- package/dist/alert-dialog/alert-dialog-footer.svelte.d.ts +4 -16
- package/dist/alert-dialog/alert-dialog-header.svelte +14 -5
- package/dist/alert-dialog/alert-dialog-header.svelte.d.ts +4 -16
- package/dist/alert-dialog/alert-dialog-overlay.svelte +10 -13
- package/dist/alert-dialog/alert-dialog-overlay.svelte.d.ts +3 -14
- package/dist/alert-dialog/alert-dialog-title.svelte +11 -8
- package/dist/alert-dialog/alert-dialog-title.svelte.d.ts +3 -16
- package/dist/alert-dialog/alert-dialog-trigger.svelte +6 -0
- package/dist/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/dist/alert-dialog/index.d.ts +3 -4
- package/dist/alert-dialog/index.js +2 -2
- package/dist/button/button.svelte +76 -18
- package/dist/button/button.svelte.d.ts +62 -14
- package/dist/button/index.d.ts +2 -60
- package/dist/button/index.js +1 -26
- package/dist/helpers.d.ts +4 -1
- package/dist/helpers.js +35 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +0 -4
- package/dist/range-calendar/index.d.ts +20 -0
- package/dist/range-calendar/index.js +22 -0
- package/dist/range-calendar/range-calendar-caption.svelte +71 -0
- package/dist/range-calendar/range-calendar-caption.svelte.d.ts +19 -0
- package/dist/range-calendar/range-calendar-cell.svelte +18 -0
- package/dist/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-day.svelte +41 -0
- package/dist/range-calendar/range-calendar-day.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-grid-row.svelte +11 -0
- package/dist/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-grid.svelte +15 -0
- package/dist/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-head-cell.svelte +18 -0
- package/dist/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-header.svelte +18 -0
- package/dist/range-calendar/range-calendar-header.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-heading.svelte +15 -0
- package/dist/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-month-select.svelte +44 -0
- package/dist/range-calendar/range-calendar-month-select.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar-month.svelte +14 -0
- package/dist/range-calendar/range-calendar-month.svelte.d.ts +5 -0
- package/dist/range-calendar/range-calendar-months.svelte +18 -0
- package/dist/range-calendar/range-calendar-months.svelte.d.ts +5 -0
- package/dist/range-calendar/range-calendar-nav.svelte +18 -0
- package/dist/range-calendar/range-calendar-nav.svelte.d.ts +5 -0
- package/dist/range-calendar/range-calendar-next-button.svelte +30 -0
- package/dist/range-calendar/range-calendar-next-button.svelte.d.ts +8 -0
- package/dist/range-calendar/range-calendar-prev-button.svelte +30 -0
- package/dist/range-calendar/range-calendar-prev-button.svelte.d.ts +8 -0
- package/dist/range-calendar/range-calendar-year-select.svelte +43 -0
- package/dist/range-calendar/range-calendar-year-select.svelte.d.ts +4 -0
- package/dist/range-calendar/range-calendar.svelte +109 -0
- package/dist/range-calendar/range-calendar.svelte.d.ts +21 -0
- package/dist/svg/BgPattern.svelte.d.ts +22 -19
- package/dist/svg/IconContact.svelte +6 -1
- package/dist/svg/IconContact.svelte.d.ts +5 -15
- package/dist/svg/IconEmpty.svelte.d.ts +22 -19
- package/dist/svg/IconFile.svelte +6 -1
- package/dist/svg/IconFile.svelte.d.ts +5 -15
- package/dist/svg/IconInvoice.svelte +6 -1
- package/dist/svg/IconInvoice.svelte.d.ts +5 -15
- package/dist/svg/IconNoResults.svelte +6 -1
- package/dist/svg/IconNoResults.svelte.d.ts +5 -15
- package/dist/svg/IconPdf.svelte +6 -1
- package/dist/svg/IconPdf.svelte.d.ts +5 -15
- package/dist/svg/IconProduct.svelte +6 -1
- package/dist/svg/IconProduct.svelte.d.ts +5 -15
- package/dist/table/table-body.svelte +10 -5
- package/dist/table/table-body.svelte.d.ts +4 -16
- package/dist/table/table-caption.svelte +14 -5
- package/dist/table/table-caption.svelte.d.ts +4 -16
- package/dist/table/table-cell.svelte +16 -7
- package/dist/table/table-cell.svelte.d.ts +4 -19
- package/dist/table/table-footer.svelte +14 -5
- package/dist/table/table-footer.svelte.d.ts +4 -16
- package/dist/table/table-head.svelte +11 -5
- package/dist/table/table-head.svelte.d.ts +4 -16
- package/dist/table/table-header.svelte +17 -8
- package/dist/table/table-header.svelte.d.ts +4 -19
- package/dist/table/table-row.svelte +22 -8
- package/dist/table/table-row.svelte.d.ts +4 -22
- package/dist/table/table.svelte +11 -6
- package/dist/table/table.svelte.d.ts +4 -16
- package/dist/tabs/tabs-content.svelte +13 -8
- package/dist/tabs/tabs-content.svelte.d.ts +3 -16
- package/dist/tabs/tabs-list.svelte +7 -6
- package/dist/tabs/tabs-list.svelte.d.ts +3 -16
- package/dist/tabs/tabs-trigger.svelte +13 -9
- package/dist/tabs/tabs-trigger.svelte.d.ts +3 -14
- package/dist/tabs/tabs.svelte +12 -7
- package/dist/tabs/tabs.svelte.d.ts +3 -16
- package/dist/tooltip/index.d.ts +5 -3
- package/dist/tooltip/index.js +5 -3
- package/dist/tooltip/tooltip-content.svelte +42 -23
- package/dist/tooltip/tooltip-content.svelte.d.ts +5 -15
- package/dist/tooltip/tooltip-trigger.svelte +8 -0
- package/dist/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/tw.theme.d.ts +2 -9
- package/dist/tw.theme.js +0 -5
- package/dist/types.d.ts +484 -25
- package/dist/utils.d.ts +10 -1
- package/package.json +30 -39
- package/README.md +0 -234
- package/dist/BaseTableHeaderSortBy.svelte +0 -22
- package/dist/BaseTableHeaderSortBy.svelte.d.ts +0 -20
- package/dist/ComboBox.svelte +0 -12
- package/dist/ComboBox.svelte.d.ts +0 -21
- package/dist/ComboBoxContent.svelte +0 -33
- package/dist/ComboBoxContent.svelte.d.ts +0 -20
- package/dist/ProgressBar.svelte +0 -6
- package/dist/ProgressBar.svelte.d.ts +0 -16
- package/dist/alert-dialog/alert-dialog-portal.svelte +0 -6
- package/dist/alert-dialog/alert-dialog-portal.svelte.d.ts +0 -17
- package/dist/popui.css +0 -1
- package/dist/wcdispatch.d.ts +0 -1
- package/dist/wcdispatch.js +0 -9
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
|
3
|
+
import AlertDialogOverlay from './alert-dialog-overlay.svelte'
|
|
4
|
+
import { cn, type WithoutChild, type WithoutChildrenOrChild } from '../utils.js'
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
portalProps,
|
|
9
|
+
children
|
|
10
|
+
}: WithoutChild<AlertDialogPrimitive.ContentProps> & {
|
|
11
|
+
portalProps?: WithoutChildrenOrChild<AlertDialogPrimitive.PortalProps>
|
|
12
|
+
} = $props()
|
|
8
13
|
</script>
|
|
9
14
|
|
|
10
|
-
<
|
|
11
|
-
<
|
|
15
|
+
<AlertDialogPrimitive.Portal {...portalProps}>
|
|
16
|
+
<AlertDialogOverlay />
|
|
12
17
|
<AlertDialogPrimitive.Content
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
bind:ref
|
|
19
|
+
data-slot="alert-dialog-content"
|
|
15
20
|
class={cn(
|
|
16
|
-
'bg-white fixed left-[50%] top-[50%] z-[1002] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5
|
|
21
|
+
'bg-white fixed left-[50%] top-[50%] z-[1002] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5 pt-3 px-4 pb-4 sm:rounded-lg md:w-full',
|
|
17
22
|
className
|
|
18
23
|
)}
|
|
19
|
-
{...$$restProps}
|
|
20
24
|
>
|
|
21
|
-
|
|
25
|
+
{@render children?.()}
|
|
22
26
|
</AlertDialogPrimitive.Content>
|
|
23
|
-
</
|
|
27
|
+
</AlertDialogPrimitive.Portal>
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
2
|
+
import { type WithoutChild, type WithoutChildrenOrChild } from '../utils.js';
|
|
3
|
+
type $$ComponentProps = WithoutChild<AlertDialogPrimitive.ContentProps> & {
|
|
4
|
+
portalProps?: WithoutChildrenOrChild<AlertDialogPrimitive.PortalProps>;
|
|
11
5
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
export default class AlertDialogContent extends SvelteComponent<AlertDialogContentProps, AlertDialogContentEvents, AlertDialogContentSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
6
|
+
declare const AlertDialogContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type AlertDialogContent = ReturnType<typeof AlertDialogContent>;
|
|
8
|
+
export default AlertDialogContent;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
|
3
|
+
import { cn } from '../utils.js'
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
class: className,
|
|
7
|
+
children
|
|
8
|
+
}: AlertDialogPrimitive.DescriptionProps = $props()
|
|
5
9
|
</script>
|
|
6
10
|
|
|
7
11
|
<AlertDialogPrimitive.Description
|
|
12
|
+
bind:ref
|
|
13
|
+
data-slot="alert-dialog-description"
|
|
8
14
|
class={cn(
|
|
9
15
|
'text-neutral-500 text-base flex flex-col space-y-2 justify-start items-start !mt-2',
|
|
10
16
|
className
|
|
11
17
|
)}
|
|
12
|
-
{...$$restProps}
|
|
13
18
|
>
|
|
14
|
-
|
|
19
|
+
{@render children?.()}
|
|
15
20
|
</AlertDialogPrimitive.Description>
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type AlertDialogDescriptionProps = typeof __propDef.props;
|
|
13
|
-
export type AlertDialogDescriptionEvents = typeof __propDef.events;
|
|
14
|
-
export type AlertDialogDescriptionSlots = typeof __propDef.slots;
|
|
15
|
-
export default class AlertDialogDescription extends SvelteComponent<AlertDialogDescriptionProps, AlertDialogDescriptionEvents, AlertDialogDescriptionSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
2
|
+
declare const AlertDialogDescription: import("svelte").Component<AlertDialogPrimitive.DescriptionProps, {}, "ref">;
|
|
3
|
+
type AlertDialogDescription = ReturnType<typeof AlertDialogDescription>;
|
|
4
|
+
export default AlertDialogDescription;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../utils.js'
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements'
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
class: className,
|
|
7
|
+
children
|
|
8
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props()
|
|
4
9
|
</script>
|
|
5
10
|
|
|
6
11
|
<div
|
|
12
|
+
bind:this={ref}
|
|
13
|
+
data-slot="alert-dialog-footer"
|
|
7
14
|
class={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-3', className)}
|
|
8
|
-
{...$$restProps}
|
|
9
15
|
>
|
|
10
|
-
|
|
16
|
+
{@render children?.()}
|
|
11
17
|
</div>
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type WithElementRef } from '../utils.js';
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type AlertDialogFooterProps = typeof __propDef.props;
|
|
13
|
-
export type AlertDialogFooterEvents = typeof __propDef.events;
|
|
14
|
-
export type AlertDialogFooterSlots = typeof __propDef.slots;
|
|
15
|
-
export default class AlertDialogFooter extends SvelteComponent<AlertDialogFooterProps, AlertDialogFooterEvents, AlertDialogFooterSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
3
|
+
declare const AlertDialogFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type AlertDialogFooter = ReturnType<typeof AlertDialogFooter>;
|
|
5
|
+
export default AlertDialogFooter;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements'
|
|
3
|
+
import { cn, type WithElementRef } from '../utils.js'
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
class: className,
|
|
7
|
+
children
|
|
8
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props()
|
|
4
9
|
</script>
|
|
5
10
|
|
|
6
|
-
<div
|
|
7
|
-
|
|
11
|
+
<div
|
|
12
|
+
bind:this={ref}
|
|
13
|
+
data-slot="alert-dialog-header"
|
|
14
|
+
class={cn('flex flex-col space-y-1 text-center sm:text-left', className)}
|
|
15
|
+
>
|
|
16
|
+
{@render children?.()}
|
|
8
17
|
</div>
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type AlertDialogHeaderProps = typeof __propDef.props;
|
|
13
|
-
export type AlertDialogHeaderEvents = typeof __propDef.events;
|
|
14
|
-
export type AlertDialogHeaderSlots = typeof __propDef.slots;
|
|
15
|
-
export default class AlertDialogHeader extends SvelteComponent<AlertDialogHeaderProps, AlertDialogHeaderEvents, AlertDialogHeaderSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
2
|
+
import { type WithElementRef } from '../utils.js';
|
|
3
|
+
declare const AlertDialogHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type AlertDialogHeader = ReturnType<typeof AlertDialogHeader>;
|
|
5
|
+
export default AlertDialogHeader;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from
|
|
4
|
-
let className =
|
|
5
|
-
export let transition = fade;
|
|
6
|
-
export let transitionConfig = {
|
|
7
|
-
duration: 150
|
|
8
|
-
};
|
|
9
|
-
export { className as class };
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
|
3
|
+
import { cn } from '../utils.js'
|
|
4
|
+
let { ref = $bindable(null), class: className }: AlertDialogPrimitive.OverlayProps = $props()
|
|
10
5
|
</script>
|
|
11
6
|
|
|
12
7
|
<AlertDialogPrimitive.Overlay
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class={cn(
|
|
16
|
-
|
|
8
|
+
bind:ref
|
|
9
|
+
data-slot="alert-dialog-overlay"
|
|
10
|
+
class={cn(
|
|
11
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-neutral-800/30 fixed inset-0 z-[1001]',
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
17
14
|
/>
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {};
|
|
9
|
-
};
|
|
10
|
-
export type AlertDialogOverlayProps = typeof __propDef.props;
|
|
11
|
-
export type AlertDialogOverlayEvents = typeof __propDef.events;
|
|
12
|
-
export type AlertDialogOverlaySlots = typeof __propDef.slots;
|
|
13
|
-
export default class AlertDialogOverlay extends SvelteComponent<AlertDialogOverlayProps, AlertDialogOverlayEvents, AlertDialogOverlaySlots> {
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
2
|
+
declare const AlertDialogOverlay: import("svelte").Component<AlertDialogPrimitive.OverlayProps, {}, "ref">;
|
|
3
|
+
type AlertDialogOverlay = ReturnType<typeof AlertDialogOverlay>;
|
|
4
|
+
export default AlertDialogOverlay;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
|
3
|
+
import { cn } from '../utils.js'
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
class: className,
|
|
7
|
+
children
|
|
8
|
+
}: AlertDialogPrimitive.TitleProps = $props()
|
|
6
9
|
</script>
|
|
7
10
|
|
|
8
11
|
<AlertDialogPrimitive.Title
|
|
12
|
+
bind:ref
|
|
13
|
+
data-slot="alert-dialog-title"
|
|
9
14
|
class={cn('text-lg font-semibold text-neutral-800', className)}
|
|
10
|
-
{level}
|
|
11
|
-
{...$$restProps}
|
|
12
15
|
>
|
|
13
|
-
|
|
16
|
+
{@render children?.()}
|
|
14
17
|
</AlertDialogPrimitive.Title>
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[evt: string]: CustomEvent<any>;
|
|
7
|
-
};
|
|
8
|
-
slots: {
|
|
9
|
-
default: {};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type AlertDialogTitleProps = typeof __propDef.props;
|
|
13
|
-
export type AlertDialogTitleEvents = typeof __propDef.events;
|
|
14
|
-
export type AlertDialogTitleSlots = typeof __propDef.slots;
|
|
15
|
-
export default class AlertDialogTitle extends SvelteComponent<AlertDialogTitleProps, AlertDialogTitleEvents, AlertDialogTitleSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
2
|
+
declare const AlertDialogTitle: import("svelte").Component<AlertDialogPrimitive.TitleProps, {}, "ref">;
|
|
3
|
+
type AlertDialogTitle = ReturnType<typeof AlertDialogTitle>;
|
|
4
|
+
export default AlertDialogTitle;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
declare const AlertDialogTrigger: import("svelte").Component<AlertDialogPrimitive.TriggerProps, {}, "ref">;
|
|
3
|
+
type AlertDialogTrigger = ReturnType<typeof AlertDialogTrigger>;
|
|
4
|
+
export default AlertDialogTrigger;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Trigger from './alert-dialog-trigger.svelte';
|
|
2
2
|
import Title from './alert-dialog-title.svelte';
|
|
3
3
|
import Action from './alert-dialog-action.svelte';
|
|
4
4
|
import Cancel from './alert-dialog-cancel.svelte';
|
|
5
|
-
import Portal from './alert-dialog-portal.svelte';
|
|
6
5
|
import Footer from './alert-dialog-footer.svelte';
|
|
7
6
|
import Header from './alert-dialog-header.svelte';
|
|
8
7
|
import Overlay from './alert-dialog-overlay.svelte';
|
|
9
8
|
import Content from './alert-dialog-content.svelte';
|
|
10
9
|
import Description from './alert-dialog-description.svelte';
|
|
11
|
-
declare const Root:
|
|
12
|
-
declare const
|
|
10
|
+
declare const Root: import("svelte").Component<import("bits-ui").AlertDialogRootPropsWithoutHTML, {}, "open">;
|
|
11
|
+
declare const Portal: import("svelte").Component<import("bits-ui").PortalProps, {}, "">;
|
|
13
12
|
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description, Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
import Trigger from './alert-dialog-trigger.svelte';
|
|
2
3
|
import Title from './alert-dialog-title.svelte';
|
|
3
4
|
import Action from './alert-dialog-action.svelte';
|
|
4
5
|
import Cancel from './alert-dialog-cancel.svelte';
|
|
5
|
-
import Portal from './alert-dialog-portal.svelte';
|
|
6
6
|
import Footer from './alert-dialog-footer.svelte';
|
|
7
7
|
import Header from './alert-dialog-header.svelte';
|
|
8
8
|
import Overlay from './alert-dialog-overlay.svelte';
|
|
9
9
|
import Content from './alert-dialog-content.svelte';
|
|
10
10
|
import Description from './alert-dialog-description.svelte';
|
|
11
11
|
const Root = AlertDialogPrimitive.Root;
|
|
12
|
-
const
|
|
12
|
+
const Portal = AlertDialogPrimitive.Portal;
|
|
13
13
|
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description,
|
|
14
14
|
//
|
|
15
15
|
Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription };
|
|
@@ -1,20 +1,78 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { cn, type WithElementRef } from '../utils.js'
|
|
3
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements'
|
|
4
|
+
import { type VariantProps, tv } from 'tailwind-variants'
|
|
5
|
+
export const buttonVariants = tv({
|
|
6
|
+
base: 'ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md text-base text-neutral-800 box-border',
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: 'bg-white text-neutral-800 hover:bg-primary/90',
|
|
10
|
+
destructive:
|
|
11
|
+
'ring-danger-200 bg-danger-500 border border-danger-500 hover:bg-danger-600 hover:border-danger-600 active:bg-danger-700 active:border-danger-700 text-white',
|
|
12
|
+
outline:
|
|
13
|
+
'border-neutral-200 bg-white hover:border-neutral-300 border shadow-button active:shadow-button-active',
|
|
14
|
+
primary:
|
|
15
|
+
'bg-workspace-accent-500 hover:bg-workspace-accent-600 active:bg-workspace-accent-700 text-white',
|
|
16
|
+
secondary:
|
|
17
|
+
'bg-neutral-100 border border-neutral-100 hover:bg-neutral-200 hover:border-neutral-200 active:bg-neutral-300 active:border-neutral-300',
|
|
18
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
19
|
+
link: 'text-primary underline-offset-4 hover:underline'
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default: 'h-7 px-2 py-1',
|
|
23
|
+
sm: 'h-9 rounded-md px-3',
|
|
24
|
+
lg: 'h-11 rounded-md px-8',
|
|
25
|
+
icon: 'h-7 p-1.5',
|
|
26
|
+
'icon-sm': 'size-6 p-1 active:pt-[5px] active:pb-[3px]'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: 'default',
|
|
31
|
+
size: 'default'
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>['variant']
|
|
35
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>['size']
|
|
36
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> &
|
|
37
|
+
WithElementRef<HTMLAnchorAttributes> & {
|
|
38
|
+
variant?: ButtonVariant
|
|
39
|
+
size?: ButtonSize
|
|
40
|
+
}
|
|
9
41
|
</script>
|
|
10
42
|
|
|
11
|
-
<
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
43
|
+
<script lang="ts">
|
|
44
|
+
let {
|
|
45
|
+
class: className,
|
|
46
|
+
variant = 'default',
|
|
47
|
+
size = 'default',
|
|
48
|
+
ref = $bindable(null),
|
|
49
|
+
href = undefined,
|
|
50
|
+
type = 'button',
|
|
51
|
+
disabled,
|
|
52
|
+
children
|
|
53
|
+
}: ButtonProps = $props()
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
{#if href}
|
|
57
|
+
<a
|
|
58
|
+
bind:this={ref}
|
|
59
|
+
data-slot="button"
|
|
60
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
61
|
+
href={disabled ? undefined : href}
|
|
62
|
+
aria-disabled={disabled}
|
|
63
|
+
role={disabled ? 'link' : undefined}
|
|
64
|
+
tabindex={disabled ? -1 : undefined}
|
|
65
|
+
>
|
|
66
|
+
{@render children?.()}
|
|
67
|
+
</a>
|
|
68
|
+
{:else}
|
|
69
|
+
<button
|
|
70
|
+
bind:this={ref}
|
|
71
|
+
data-slot="button"
|
|
72
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
73
|
+
{type}
|
|
74
|
+
{disabled}
|
|
75
|
+
>
|
|
76
|
+
{@render children?.()}
|
|
77
|
+
</button>
|
|
78
|
+
{/if}
|
|
@@ -1,16 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { type
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { type WithElementRef } from '../utils.js';
|
|
2
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
|
3
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
4
|
+
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
default: string;
|
|
7
|
+
destructive: string;
|
|
8
|
+
outline: string;
|
|
9
|
+
primary: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
ghost: string;
|
|
12
|
+
link: string;
|
|
8
13
|
};
|
|
9
|
-
|
|
14
|
+
size: {
|
|
15
|
+
default: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
'icon-sm': string;
|
|
20
|
+
};
|
|
21
|
+
}, undefined, "ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md text-base text-neutral-800 box-border", {
|
|
22
|
+
variant: {
|
|
23
|
+
default: string;
|
|
24
|
+
destructive: string;
|
|
25
|
+
outline: string;
|
|
26
|
+
primary: string;
|
|
27
|
+
secondary: string;
|
|
28
|
+
ghost: string;
|
|
29
|
+
link: string;
|
|
30
|
+
};
|
|
31
|
+
size: {
|
|
32
|
+
default: string;
|
|
33
|
+
sm: string;
|
|
34
|
+
lg: string;
|
|
35
|
+
icon: string;
|
|
36
|
+
'icon-sm': string;
|
|
37
|
+
};
|
|
38
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
39
|
+
variant: {
|
|
40
|
+
default: string;
|
|
41
|
+
destructive: string;
|
|
42
|
+
outline: string;
|
|
43
|
+
primary: string;
|
|
44
|
+
secondary: string;
|
|
45
|
+
ghost: string;
|
|
46
|
+
link: string;
|
|
47
|
+
};
|
|
48
|
+
size: {
|
|
49
|
+
default: string;
|
|
50
|
+
sm: string;
|
|
51
|
+
lg: string;
|
|
52
|
+
icon: string;
|
|
53
|
+
'icon-sm': string;
|
|
54
|
+
};
|
|
55
|
+
}, undefined, "ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md text-base text-neutral-800 box-border", unknown, unknown, undefined>>;
|
|
56
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
|
|
57
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
|
|
58
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
|
|
59
|
+
variant?: ButtonVariant;
|
|
60
|
+
size?: ButtonSize;
|
|
10
61
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
62
|
+
declare const Button: import("svelte").Component<ButtonProps, {}, "ref">;
|
|
63
|
+
type Button = ReturnType<typeof Button>;
|
|
64
|
+
export default Button;
|
package/dist/button/index.d.ts
CHANGED
|
@@ -1,60 +1,2 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
import Root from './button.svelte';
|
|
4
|
-
declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
-
variant: {
|
|
6
|
-
default: string;
|
|
7
|
-
destructive: string;
|
|
8
|
-
outline: string;
|
|
9
|
-
primary: string;
|
|
10
|
-
secondary: string;
|
|
11
|
-
ghost: string;
|
|
12
|
-
link: string;
|
|
13
|
-
};
|
|
14
|
-
size: {
|
|
15
|
-
default: string;
|
|
16
|
-
sm: string;
|
|
17
|
-
lg: string;
|
|
18
|
-
icon: string;
|
|
19
|
-
};
|
|
20
|
-
}, undefined, "ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md", {
|
|
21
|
-
variant: {
|
|
22
|
-
default: string;
|
|
23
|
-
destructive: string;
|
|
24
|
-
outline: string;
|
|
25
|
-
primary: string;
|
|
26
|
-
secondary: string;
|
|
27
|
-
ghost: string;
|
|
28
|
-
link: string;
|
|
29
|
-
};
|
|
30
|
-
size: {
|
|
31
|
-
default: string;
|
|
32
|
-
sm: string;
|
|
33
|
-
lg: string;
|
|
34
|
-
icon: string;
|
|
35
|
-
};
|
|
36
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
37
|
-
variant: {
|
|
38
|
-
default: string;
|
|
39
|
-
destructive: string;
|
|
40
|
-
outline: string;
|
|
41
|
-
primary: string;
|
|
42
|
-
secondary: string;
|
|
43
|
-
ghost: string;
|
|
44
|
-
link: string;
|
|
45
|
-
};
|
|
46
|
-
size: {
|
|
47
|
-
default: string;
|
|
48
|
-
sm: string;
|
|
49
|
-
lg: string;
|
|
50
|
-
icon: string;
|
|
51
|
-
};
|
|
52
|
-
}, undefined, "ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md", unknown, unknown, undefined>>;
|
|
53
|
-
type Variant = VariantProps<typeof buttonVariants>['variant'];
|
|
54
|
-
type Size = VariantProps<typeof buttonVariants>['size'];
|
|
55
|
-
type Props = ButtonPrimitive.Props & {
|
|
56
|
-
variant?: Variant;
|
|
57
|
-
size?: Size;
|
|
58
|
-
};
|
|
59
|
-
type Events = ButtonPrimitive.Events;
|
|
60
|
-
export { Root, type Props, type Events, type Variant, Root as Button, type Props as ButtonProps, type Events as ButtonEvents, buttonVariants };
|
|
1
|
+
import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, buttonVariants } from './button.svelte';
|
|
2
|
+
export { Root, type ButtonProps as Props, Root as Button, buttonVariants, type ButtonProps, type ButtonSize, type ButtonVariant };
|
package/dist/button/index.js
CHANGED
|
@@ -1,29 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Root from './button.svelte';
|
|
3
|
-
const buttonVariants = tv({
|
|
4
|
-
base: 'ring-workspace-accent-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 flex items-center justify-center font-medium font-sans relative group tracking-tight rounded-md',
|
|
5
|
-
variants: {
|
|
6
|
-
variant: {
|
|
7
|
-
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
8
|
-
destructive: 'ring-danger-200 bg-danger-500 border border-danger-500 hover:bg-danger-600 hover:border-danger-600 active:bg-danger-700 active:border-danger-700 text-white',
|
|
9
|
-
outline: 'border-input bg-background hover:bg-accent hover:text-accent-foreground border',
|
|
10
|
-
primary: 'bg-workspace-accent-500 hover:bg-workspace-accent-600 active:bg-workspace-accent-700 text-white',
|
|
11
|
-
secondary: 'bg-neutral-100 border border-neutral-100 hover:bg-neutral-200 hover:border-neutral-200 active:bg-neutral-300 active:border-neutral-300',
|
|
12
|
-
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
13
|
-
link: 'text-primary underline-offset-4 hover:underline'
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
default: 'h-[30px] px-3 py-[5px]',
|
|
17
|
-
sm: 'h-9 rounded-md px-3',
|
|
18
|
-
lg: 'h-11 rounded-md px-8',
|
|
19
|
-
icon: 'h-10 w-10'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
variant: 'default',
|
|
24
|
-
size: 'default'
|
|
25
|
-
}
|
|
26
|
-
});
|
|
1
|
+
import Root, { buttonVariants } from './button.svelte';
|
|
27
2
|
export { Root,
|
|
28
3
|
//
|
|
29
4
|
Root as Button, buttonVariants };
|
package/dist/helpers.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IconSource } from '@steeze-ui/svelte-icon';
|
|
2
|
-
import type { FeedItemStatus } from './types.js';
|
|
2
|
+
import type { DatesFromToday, FeedItemStatus } from './types.js';
|
|
3
|
+
import { type DateValue } from '@internationalized/date';
|
|
3
4
|
export declare function toPascalCase(text: string): string;
|
|
4
5
|
export declare function resolveIcon(icon?: IconSource | string | undefined): Promise<IconSource | undefined>;
|
|
5
6
|
export declare function getCountryName(code: string): string | undefined;
|
|
@@ -7,3 +8,5 @@ export declare function getStatusType(status: string): FeedItemStatus;
|
|
|
7
8
|
export declare function getScrollableContainer(element: HTMLElement): HTMLElement | undefined;
|
|
8
9
|
export declare function scrollIntoTableView(element: HTMLElement): void;
|
|
9
10
|
export declare function isInputFocused(): boolean;
|
|
11
|
+
export declare function toCalendarDate(date: Date): DateValue;
|
|
12
|
+
export declare function datesFromToday(): DatesFromToday;
|