compote-ui 0.77.0 → 0.78.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/components/carousel/carousel-next-trigger.svelte +1 -1
- package/dist/components/carousel/carousel-prev-trigger.svelte +1 -1
- package/dist/components/checkbox/checkbox.svelte +1 -1
- package/dist/components/combobox/combobox.svelte +1 -1
- package/dist/components/combobox/types.d.ts +1 -1
- package/dist/components/data-table-v9/data-table-cell-content.svelte +1 -1
- package/dist/components/data-table-v9/data-table-head.svelte +1 -1
- package/dist/components/data-table-v9/toolbar/data-table-column-filter.svelte +1 -1
- package/dist/components/data-table-v9/toolbar/data-table-column-visibility.svelte +1 -1
- package/dist/components/data-table-v9/toolbar/data-table-refresh.svelte +1 -1
- package/dist/components/data-table-v9/toolbar/data-table-search.svelte +1 -1
- package/dist/components/date-field/date-field.svelte +3 -3
- package/dist/components/date-input/date-input.svelte +2 -2
- package/dist/components/date-picker/date-picker-calendar.svelte +1 -1
- package/dist/components/date-picker/date-picker.svelte +3 -3
- package/dist/components/date-range-field/date-range-field.svelte +3 -3
- package/dist/components/dialog/alert-dialog.svelte +1 -1
- package/dist/components/dialog/dialog-close-trigger.svelte +2 -2
- package/dist/components/dialog/dialog-close-trigger.svelte.d.ts +1 -1
- package/dist/components/drawer/drawer-close-trigger.svelte +1 -1
- package/dist/components/file-upload/file-upload-dropzone.svelte +1 -1
- package/dist/components/file-upload/file-upload.svelte +1 -1
- package/dist/components/file-upload/icons.js +1 -1
- package/dist/components/image-crop-dialog/image-crop-dialog.svelte +1 -1
- package/dist/components/image-crop-dialog/types.d.ts +1 -1
- package/dist/components/image-cropper/image-cropper.svelte +3 -3
- package/dist/components/image-cropper/types.d.ts +1 -1
- package/dist/components/image-upload/image-upload.svelte +2 -2
- package/dist/components/image-upload/types.d.ts +1 -1
- package/dist/components/json-tree-view/json-tree-view.svelte +1 -1
- package/dist/components/listbox/listbox-content.svelte +1 -1
- package/dist/components/listbox/listbox-content.svelte.d.ts +1 -1
- package/dist/components/listbox/listbox-context.d.ts +1 -1
- package/dist/components/listbox/listbox-item-indicator.svelte +1 -1
- package/dist/components/listbox/listbox-root.svelte +1 -1
- package/dist/components/listbox/listbox-root.svelte.d.ts +1 -1
- package/dist/components/menu/menu-checkbox-item.svelte +1 -1
- package/dist/components/menu/menu-indicator.svelte +1 -1
- package/dist/components/number-input/number-input.svelte +1 -1
- package/dist/components/password-input/password-input.svelte +1 -1
- package/dist/components/phone-input/phone-input.svelte +1 -1
- package/dist/components/popover/popover-close-trigger.svelte +1 -1
- package/dist/components/select/select.svelte +2 -2
- package/dist/components/select/select.svelte.d.ts +1 -1
- package/dist/components/select/types.d.ts +1 -1
- package/dist/components/tags-input/tags-input.svelte +1 -1
- package/dist/components/toast/toaster.svelte +6 -6
- package/dist/components/tree-view/tree-view.svelte +1 -1
- package/dist/components/tree-view/types.d.ts +1 -1
- package/package.json +6 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { PhArrowRight } from '../../
|
|
2
|
+
import { PhArrowRight } from '../../icons';
|
|
3
3
|
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
4
4
|
import type { CarouselNextTriggerProps } from '@ark-ui/svelte/carousel';
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { PhArrowLeft } from '../../
|
|
2
|
+
import { PhArrowLeft } from '../../icons';
|
|
3
3
|
import { Carousel } from '@ark-ui/svelte/carousel';
|
|
4
4
|
import type { CarouselPrevTriggerProps } from '@ark-ui/svelte/carousel';
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Checkbox } from '@ark-ui/svelte/checkbox';
|
|
3
3
|
import { cn } from 'tailwind-variants';
|
|
4
4
|
import type { CheckboxProps as Props } from './checkbox.types.js';
|
|
5
|
-
import { PhCheck, PhMinus } from '../../
|
|
5
|
+
import { PhCheck, PhMinus } from '../../icons';
|
|
6
6
|
|
|
7
7
|
let {
|
|
8
8
|
checked = $bindable(),
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import type { ComboboxProps } from './types';
|
|
9
9
|
import { createListCollection, type ListItem } from '../../utils/collections';
|
|
10
10
|
import { cn } from 'tailwind-variants';
|
|
11
|
-
import { PhCaretDown, PhCheck, PhX } from '../../
|
|
11
|
+
import { PhCaretDown, PhCheck, PhX } from '../../icons';
|
|
12
12
|
|
|
13
13
|
let {
|
|
14
14
|
value = $bindable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComboboxRootBaseProps } from '@ark-ui/svelte/combobox';
|
|
2
|
-
import type { ListItem } from '../../
|
|
2
|
+
import type { ListItem } from '../../utils/collections';
|
|
3
3
|
export interface ComboboxProps<T extends ListItem> extends Omit<ComboboxRootBaseProps<T>, 'value' | 'collection'> {
|
|
4
4
|
value?: number | string | null | (number | string)[];
|
|
5
5
|
items: T[];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Cell, RowData } from '@tanstack/svelte-table';
|
|
3
3
|
import { FlexRender } from '@tanstack/svelte-table';
|
|
4
4
|
import { cn } from 'tailwind-variants';
|
|
5
|
-
import { PhArrowSquareOut, PhCheck, PhPhone, PhX } from '../../
|
|
5
|
+
import { PhArrowSquareOut, PhCheck, PhPhone, PhX } from '../../icons';
|
|
6
6
|
import type { DataTableFeatures } from './features';
|
|
7
7
|
import {
|
|
8
8
|
getBooleanCellValue,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { HeaderGroup, RowData } from '@tanstack/svelte-table';
|
|
3
3
|
import { FlexRender } from '@tanstack/svelte-table';
|
|
4
4
|
import { cn } from 'tailwind-variants';
|
|
5
|
-
import { PhCaretDown, PhCaretUp } from '../../
|
|
5
|
+
import { PhCaretDown, PhCaretUp } from '../../icons';
|
|
6
6
|
import type { DataTableInstance } from './data-table-utils';
|
|
7
7
|
import type { DataTableViewState } from './table-view-state.svelte';
|
|
8
8
|
import type { DataTableFeatures } from './features';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import * as Field from '../../field';
|
|
13
13
|
import Badge from '../../badge/badge.svelte';
|
|
14
14
|
import { button } from '../../button/button.variants';
|
|
15
|
-
import { PhX, PhMagnifyingGlass, PhFunnel } from '../../../
|
|
15
|
+
import { PhX, PhMagnifyingGlass, PhFunnel } from '../../../icons';
|
|
16
16
|
|
|
17
17
|
type Props = {
|
|
18
18
|
table: DataTableInstance<T>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import Checkbox from '../../checkbox/checkbox.svelte';
|
|
7
7
|
import type { DataTableInstance } from '../data-table-utils';
|
|
8
8
|
import { button } from '../../button/button.variants';
|
|
9
|
-
import { PhColumns } from '../../../
|
|
9
|
+
import { PhColumns } from '../../../icons';
|
|
10
10
|
|
|
11
11
|
type Props = {
|
|
12
12
|
table: DataTableInstance<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import * as Tooltip from '../../tooltip';
|
|
3
|
-
import { PhArrowClockwise } from '../../../
|
|
3
|
+
import { PhArrowClockwise } from '../../../icons';
|
|
4
4
|
|
|
5
5
|
type Props = {
|
|
6
6
|
/** Called on click. If it returns a promise, the button shows a busy state until it settles. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { onDestroy } from 'svelte';
|
|
3
3
|
import type { RowData } from '@tanstack/svelte-table';
|
|
4
4
|
import { cn, type ClassValue } from 'tailwind-variants';
|
|
5
|
-
import { PhMagnifyingGlass, PhX } from '../../../
|
|
5
|
+
import { PhMagnifyingGlass, PhX } from '../../../icons';
|
|
6
6
|
import * as Field from '../../field';
|
|
7
7
|
import type { DataTableInstance } from '../data-table-utils';
|
|
8
8
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import { Field } from '@ark-ui/svelte/field';
|
|
5
5
|
import { useLocaleContext } from '@ark-ui/svelte/locale';
|
|
6
6
|
import { CalendarDateTime, getLocalTimeZone } from '@internationalized/date';
|
|
7
|
-
import { toDateValue, fromDateValue, dateValueShape, dateValueToString } from '../../
|
|
8
|
-
import type { DateValueShape } from '../../
|
|
9
|
-
import { PhCalendarBlank } from '../../
|
|
7
|
+
import { toDateValue, fromDateValue, dateValueShape, dateValueToString } from '../../utils/date';
|
|
8
|
+
import type { DateValueShape } from '../../utils/date';
|
|
9
|
+
import { PhCalendarBlank } from '../../icons';
|
|
10
10
|
import type { DateFieldProps } from './types';
|
|
11
11
|
import DatePickerCalendar from '../date-picker/date-picker-calendar.svelte';
|
|
12
12
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { DateInput } from '@ark-ui/svelte/date-input';
|
|
3
3
|
import { Field, useFieldContext } from '@ark-ui/svelte/field';
|
|
4
|
-
import { toDateValue, fromDateValue, dateValueShape, dateValueToString } from '../../
|
|
4
|
+
import { toDateValue, fromDateValue, dateValueShape, dateValueToString } from '../../utils/date';
|
|
5
5
|
import { getLocalTimeZone } from '@internationalized/date';
|
|
6
|
-
import type { DateValue, DateValueShape } from '../../
|
|
6
|
+
import type { DateValue, DateValueShape } from '../../utils/date';
|
|
7
7
|
import type { DateInputProps } from './types';
|
|
8
8
|
|
|
9
9
|
let {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { DatePicker } from '@ark-ui/svelte/date-picker';
|
|
3
3
|
import { Portal } from '@ark-ui/svelte/portal';
|
|
4
4
|
import { CalendarDateTime } from '@internationalized/date';
|
|
5
|
-
import { PhArrowLeft, PhArrowRight } from '../../
|
|
5
|
+
import { PhArrowLeft, PhArrowRight } from '../../icons';
|
|
6
6
|
import type { DateValue } from '@ark-ui/svelte/date-picker';
|
|
7
7
|
import Select from '../select/select.svelte';
|
|
8
8
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { Field } from '@ark-ui/svelte/field';
|
|
4
4
|
import { useLocaleContext } from '@ark-ui/svelte/locale';
|
|
5
5
|
import { CalendarDateTime, getLocalTimeZone } from '@internationalized/date';
|
|
6
|
-
import { toDateValue, fromDateValue, dateValueShape } from '../../
|
|
7
|
-
import type { DateValueShape } from '../../
|
|
8
|
-
import { PhCalendarBlank, PhX } from '../../
|
|
6
|
+
import { toDateValue, fromDateValue, dateValueShape } from '../../utils/date';
|
|
7
|
+
import type { DateValueShape } from '../../utils/date';
|
|
8
|
+
import { PhCalendarBlank, PhX } from '../../icons';
|
|
9
9
|
import type { DatePickerProps } from './types';
|
|
10
10
|
import DatePickerCalendar from './date-picker-calendar.svelte';
|
|
11
11
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import { Field } from '@ark-ui/svelte/field';
|
|
5
5
|
import { useLocaleContext } from '@ark-ui/svelte/locale';
|
|
6
6
|
import { getLocalTimeZone } from '@internationalized/date';
|
|
7
|
-
import { toDateValue, fromDateValue, dateValueShape, dateValueToString } from '../../
|
|
8
|
-
import type { DateValueShape } from '../../
|
|
9
|
-
import { PhCalendarBlank } from '../../
|
|
7
|
+
import { toDateValue, fromDateValue, dateValueShape, dateValueToString } from '../../utils/date';
|
|
8
|
+
import type { DateValueShape } from '../../utils/date';
|
|
9
|
+
import { PhCalendarBlank } from '../../icons';
|
|
10
10
|
import type { DateRangeFieldProps } from './types';
|
|
11
11
|
import DatePickerCalendar from '../date-picker/date-picker-calendar.svelte';
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Dialog } from '@ark-ui/svelte/dialog';
|
|
3
3
|
import type { DialogCloseTriggerBaseProps } from '@ark-ui/svelte/dialog';
|
|
4
|
-
import { PhX } from '../../
|
|
4
|
+
import { PhX } from '../../icons';
|
|
5
5
|
import {
|
|
6
6
|
button,
|
|
7
7
|
type ButtonVariant,
|
|
8
8
|
type ButtonSize
|
|
9
|
-
} from '
|
|
9
|
+
} from '../button/button.variants';
|
|
10
10
|
import type { ClassValue } from 'tailwind-variants';
|
|
11
11
|
|
|
12
12
|
interface Props extends DialogCloseTriggerBaseProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DialogCloseTriggerBaseProps } from '@ark-ui/svelte/dialog';
|
|
2
|
-
import { type ButtonVariant, type ButtonSize } from '
|
|
2
|
+
import { type ButtonVariant, type ButtonSize } from '../button/button.variants';
|
|
3
3
|
import type { ClassValue } from 'tailwind-variants';
|
|
4
4
|
interface Props extends DialogCloseTriggerBaseProps {
|
|
5
5
|
variant?: ButtonVariant;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerCloseTriggerBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
4
|
import type { ClassValue } from 'svelte/elements';
|
|
5
|
-
import PhX from '../../
|
|
5
|
+
import PhX from '../../icons/PhX.svelte';
|
|
6
6
|
|
|
7
7
|
interface Props extends DrawerCloseTriggerBaseProps {
|
|
8
8
|
class?: ClassValue;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FileUpload } from '@ark-ui/svelte/file-upload';
|
|
3
3
|
import { getAcceptAttribute } from './utils';
|
|
4
4
|
import type { FileUploadDropzoneProps } from './types';
|
|
5
|
-
import { PhUploadSimple } from '../../
|
|
5
|
+
import { PhUploadSimple } from '../../icons';
|
|
6
6
|
|
|
7
7
|
let {
|
|
8
8
|
fileType,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { FileUpload, type FileUploadFileError } from '@ark-ui/svelte/file-upload';
|
|
3
|
-
import { PhX } from '../../
|
|
3
|
+
import { PhX } from '../../icons';
|
|
4
4
|
import type { FileUploadProps } from './types';
|
|
5
5
|
import { getAcceptAttribute } from './utils';
|
|
6
6
|
import { getFileIcon } from './icons';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhFile, PhFileArchive, PhFileText, PhHeadphones, PhImage, PhMicrosoftExcelLogo, PhVideoCamera } from '../../
|
|
1
|
+
import { PhFile, PhFileArchive, PhFileText, PhHeadphones, PhImage, PhMicrosoftExcelLogo, PhVideoCamera } from '../../icons';
|
|
2
2
|
export const getFileIcon = (file) => {
|
|
3
3
|
const fileType = file.type;
|
|
4
4
|
const fileName = file.name;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as Dialog from '../dialog';
|
|
3
3
|
import ImageCropper from '../image-cropper/image-cropper.svelte';
|
|
4
4
|
import { Button } from '../../index.js';
|
|
5
|
-
import { cropImage, processImage } from '../../
|
|
5
|
+
import { cropImage, processImage } from '../../utils/image-processing';
|
|
6
6
|
import type { ImageCropperCropData } from '../image-cropper/types';
|
|
7
7
|
import type { ImageCropDialogProps } from './types';
|
|
8
8
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { ImageCropper, useImageCropper } from '@ark-ui/svelte/image-cropper';
|
|
3
3
|
import type { ImageCropperProps } from './types';
|
|
4
4
|
import { Button } from '../../index.js';
|
|
5
|
-
import { cropImage } from '../../
|
|
6
|
-
import type { ProcessImageOptions } from '../../
|
|
7
|
-
import { PhArrowClockwise, PhArrowCounterClockwise } from '../../
|
|
5
|
+
import { cropImage } from '../../utils/image-processing';
|
|
6
|
+
import type { ProcessImageOptions } from '../../utils/image-processing';
|
|
7
|
+
import { PhArrowClockwise, PhArrowCounterClockwise } from '../../icons';
|
|
8
8
|
|
|
9
9
|
let {
|
|
10
10
|
src = $bindable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UseImageCropperProps, UseImageCropperReturn } from '@ark-ui/svelte/image-cropper';
|
|
2
|
-
import type { ProcessImageOptions } from '../../
|
|
2
|
+
import type { ProcessImageOptions } from '../../utils/image-processing';
|
|
3
3
|
export type ImageCropperCropData = ReturnType<ReturnType<UseImageCropperReturn>['getCropData']>;
|
|
4
4
|
export interface ImageCropperProps extends UseImageCropperProps {
|
|
5
5
|
src: string;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { cn } from 'tailwind-variants';
|
|
3
3
|
import * as Menu from '../menu';
|
|
4
4
|
import ImageCropDialog from '../image-crop-dialog/image-crop-dialog.svelte';
|
|
5
|
-
import { fileToDataUrl } from '../../
|
|
6
|
-
import { PhUploadSimple, PhImage, PhX } from '../../
|
|
5
|
+
import { fileToDataUrl } from '../../utils/image-processing';
|
|
6
|
+
import { PhUploadSimple, PhImage, PhX } from '../../icons';
|
|
7
7
|
import type { ImageUploadProps } from './types';
|
|
8
8
|
|
|
9
9
|
let {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ClassValue } from 'tailwind-variants';
|
|
2
|
-
import type { ProcessImageOptions } from '../../
|
|
2
|
+
import type { ProcessImageOptions } from '../../utils/image-processing';
|
|
3
3
|
export type ImageUploadShape = 'circle' | 'square';
|
|
4
4
|
export interface ImageUploadProps {
|
|
5
5
|
/** Current image src (data URL, blob URL, or remote URL). Bindable. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
} from '@ark-ui/svelte/json-tree-view';
|
|
7
7
|
import type { ClassValue } from 'svelte/elements';
|
|
8
8
|
import { cn } from 'tailwind-variants';
|
|
9
|
-
import { PhCaretRight } from '../../
|
|
9
|
+
import { PhCaretRight } from '../../icons';
|
|
10
10
|
|
|
11
11
|
interface Props extends JsonTreeViewRootBaseProps {
|
|
12
12
|
class?: ClassValue;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxContentBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
-
import type { ListItem } from '../../
|
|
5
|
+
import type { ListItem } from '../../utils/collections';
|
|
6
6
|
import { cn } from 'tailwind-variants';
|
|
7
7
|
import { getListboxContext } from './listbox-context';
|
|
8
8
|
import type { ClassValue } from 'svelte/elements';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ListboxContentBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
import type { ListItem } from '../../
|
|
3
|
+
import type { ListItem } from '../../utils/collections';
|
|
4
4
|
import type { ClassValue } from 'svelte/elements';
|
|
5
5
|
type Props = ListboxContentBaseProps & {
|
|
6
6
|
class?: ClassValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ListCollection } from '@ark-ui/svelte/collection';
|
|
2
|
-
import type { ListItem } from '../../
|
|
2
|
+
import type { ListItem } from '../../utils/collections';
|
|
3
3
|
export declare const getListboxContext: () => {
|
|
4
4
|
readonly collection: ListCollection<ListItem>;
|
|
5
5
|
filter: (text: string) => void;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { ListboxItemIndicatorBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
6
|
-
import { PhCheck } from '../../
|
|
6
|
+
import { PhCheck } from '../../icons';
|
|
7
7
|
import type { ClassValue } from 'svelte/elements';
|
|
8
8
|
|
|
9
9
|
type Props = ListboxItemIndicatorBaseProps & {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useFilter } from '@ark-ui/svelte/locale';
|
|
5
5
|
import type { Snippet } from 'svelte';
|
|
6
6
|
import type { ListCollection } from '@ark-ui/svelte/collection';
|
|
7
|
-
import type { ListItem } from '../../
|
|
7
|
+
import type { ListItem } from '../../utils/collections';
|
|
8
8
|
import { cn } from 'tailwind-variants';
|
|
9
9
|
import { setListboxContext } from './listbox-context';
|
|
10
10
|
import type { ClassValue } from 'svelte/elements';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
import type { ListItem } from '../../
|
|
3
|
+
import type { ListItem } from '../../utils/collections';
|
|
4
4
|
import type { ClassValue } from 'svelte/elements';
|
|
5
5
|
declare function $$render<T extends string | number = string>(): {
|
|
6
6
|
props: Omit<Listbox.RootBaseProps<ListItem<T>>, "value" | "onValueChange" | "collection"> & {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
6
6
|
import MenuItemIndicator from './menu-item-indicator.svelte';
|
|
7
|
-
import { PhCheck } from '../../
|
|
7
|
+
import { PhCheck } from '../../icons';
|
|
8
8
|
|
|
9
9
|
type IndicatorSnippet = { indicator?: Snippet };
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { MenuIndicatorBaseProps } from '@ark-ui/svelte/menu';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
6
|
-
import { PhCaretDown } from '../../
|
|
6
|
+
import { PhCaretDown } from '../../icons';
|
|
7
7
|
|
|
8
8
|
type Props = MenuIndicatorBaseProps & { class?: string; children?: Snippet };
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Field } from '@ark-ui/svelte/field';
|
|
3
3
|
import { NumberInput } from '@ark-ui/svelte/number-input';
|
|
4
4
|
import type { NumberInputProps } from './types';
|
|
5
|
-
import { PhCaretDown, PhCaretUp } from '../../
|
|
5
|
+
import { PhCaretDown, PhCaretUp } from '../../icons';
|
|
6
6
|
import { useLocaleContext } from '@ark-ui/svelte/locale';
|
|
7
7
|
|
|
8
8
|
let {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Field } from '@ark-ui/svelte/field';
|
|
3
3
|
import { PasswordInput } from '@ark-ui/svelte/password-input';
|
|
4
4
|
import type { PasswordInputProps } from './types';
|
|
5
|
-
import { PhEye, PhEyeSlash } from '../../
|
|
5
|
+
import { PhEye, PhEyeSlash } from '../../icons';
|
|
6
6
|
|
|
7
7
|
let {
|
|
8
8
|
value = $bindable(),
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type { PhoneInputProps } from './types';
|
|
8
8
|
import { createListCollection } from '../../utils/collections';
|
|
9
9
|
import { cn } from 'tailwind-variants';
|
|
10
|
-
import { PhCaretDown, PhCheck } from '../../
|
|
10
|
+
import { PhCaretDown, PhCheck } from '../../icons';
|
|
11
11
|
import 'svelte-tel-input/styles/flags.css';
|
|
12
12
|
|
|
13
13
|
interface CountryItem {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Popover } from '@ark-ui/svelte/popover';
|
|
3
3
|
import type { PopoverCloseTriggerBaseProps } from '@ark-ui/svelte/popover';
|
|
4
|
-
import { PhX } from '../../
|
|
4
|
+
import { PhX } from '../../icons';
|
|
5
5
|
import type { ClassValue } from 'svelte/elements';
|
|
6
6
|
|
|
7
7
|
interface Props extends PopoverCloseTriggerBaseProps {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { Portal } from '@ark-ui/svelte/portal';
|
|
4
4
|
import { Select } from '@ark-ui/svelte/select';
|
|
5
5
|
import type { SelectProps } from './types';
|
|
6
|
-
import { createListCollection, type ListItem } from '../../
|
|
6
|
+
import { createListCollection, type ListItem } from '../../utils/collections';
|
|
7
7
|
import { cn } from 'tailwind-variants';
|
|
8
|
-
import { PhCaretDown, PhCheck } from '../../
|
|
8
|
+
import { PhCaretDown, PhCheck } from '../../icons';
|
|
9
9
|
|
|
10
10
|
let {
|
|
11
11
|
value = $bindable(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Select } from '@ark-ui/svelte/select';
|
|
2
2
|
import type { SelectProps } from './types';
|
|
3
|
-
import { type ListItem } from '../../
|
|
3
|
+
import { type ListItem } from '../../utils/collections';
|
|
4
4
|
declare function $$render<T extends ListItem>(): {
|
|
5
5
|
props: SelectProps<T>;
|
|
6
6
|
exports: {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SelectRootBaseProps } from '@ark-ui/svelte/select';
|
|
2
|
-
import type { ListItem } from '../../
|
|
2
|
+
import type { ListItem } from '../../utils/collections';
|
|
3
3
|
export interface SelectProps<T extends ListItem> extends Omit<SelectRootBaseProps<T>, 'value' | 'collection'> {
|
|
4
4
|
value?: T['value'] | null;
|
|
5
5
|
items: T[];
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
6
6
|
import type { ClassValue } from 'tailwind-variants';
|
|
7
7
|
import { toast } from './toast.js';
|
|
8
|
-
import PhX from '../../
|
|
9
|
-
import PhCheckCircle from '../../
|
|
10
|
-
import PhXCircle from '../../
|
|
11
|
-
import PhWarning from '../../
|
|
12
|
-
import PhInfo from '../../
|
|
13
|
-
import PhCircleNotch from '../../
|
|
8
|
+
import PhX from '../../icons/PhX.svelte';
|
|
9
|
+
import PhCheckCircle from '../../icons/PhCheckCircle.svelte';
|
|
10
|
+
import PhXCircle from '../../icons/PhXCircle.svelte';
|
|
11
|
+
import PhWarning from '../../icons/PhWarning.svelte';
|
|
12
|
+
import PhInfo from '../../icons/PhInfo.svelte';
|
|
13
|
+
import PhCircleNotch from '../../icons/PhCircleNotch.svelte';
|
|
14
14
|
|
|
15
15
|
interface Props {
|
|
16
16
|
class?: ClassValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UseTreeViewProps } from '@ark-ui/svelte/tree-view';
|
|
2
|
-
import type { TreeItem } from '../../
|
|
2
|
+
import type { TreeItem } from '../../utils/collections';
|
|
3
3
|
export interface TreeViewProps<T extends TreeItem> extends Omit<UseTreeViewProps<T>, 'collection'> {
|
|
4
4
|
items?: T[];
|
|
5
5
|
label?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compote-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,12 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"imports": {
|
|
26
26
|
"#lib": "./src/lib/index.ts",
|
|
27
|
-
"#lib/*":
|
|
28
|
-
"./src/lib/*",
|
|
29
|
-
"./src/lib/*.ts",
|
|
30
|
-
"./src/lib/*.js",
|
|
31
|
-
"./src/lib/*/index.ts"
|
|
32
|
-
]
|
|
27
|
+
"#lib/*": "./src/lib/*"
|
|
33
28
|
},
|
|
34
29
|
"files": [
|
|
35
30
|
"dist",
|
|
@@ -39,7 +34,8 @@
|
|
|
39
34
|
"!skills/_artifacts"
|
|
40
35
|
],
|
|
41
36
|
"sideEffects": [
|
|
42
|
-
"**/*.css"
|
|
37
|
+
"**/*.css",
|
|
38
|
+
".svelte-kit/**"
|
|
43
39
|
],
|
|
44
40
|
"svelte": "./dist/index.js",
|
|
45
41
|
"types": "./dist/index.d.ts",
|
|
@@ -97,7 +93,8 @@
|
|
|
97
93
|
"typescript-eslint": "^8.70.0",
|
|
98
94
|
"unplugin-icons": "^24.0.0",
|
|
99
95
|
"vite": "^8.3.0",
|
|
100
|
-
"vitest": "^5.0.1"
|
|
96
|
+
"vitest": "^5.0.1",
|
|
97
|
+
"wrangler": "^4.118.0"
|
|
101
98
|
},
|
|
102
99
|
"keywords": [
|
|
103
100
|
"svelte",
|