@max-ts/svelte 1.0.2 → 1.0.5
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/assets/{styles.css.ts.vanilla-CRRIM3FB.css → styles.css.ts.vanilla-BTOQ-HsW.css} +2 -2
- package/dist/assets/styles.css.ts.vanilla-CLnCzIMF.css +8 -0
- package/dist/components/Accordion/Content/Content.svelte.d.ts +1 -1
- package/dist/components/Accordion/Trigger/Trigger.svelte.d.ts +1 -1
- package/dist/components/Accordion/index.d.ts +1 -1
- package/dist/components/Alert/Alert.svelte.d.ts +1 -1
- package/dist/components/Alert/Description/Description.svelte.d.ts +1 -1
- package/dist/components/Alert/Title/Title.svelte.d.ts +1 -1
- package/dist/components/Alert/index.d.ts +2 -2
- package/dist/components/Calendar/Calendar.svelte.d.ts +2 -18
- package/dist/components/Calendar/Month/Month.svelte.d.ts +1 -1
- package/dist/components/Calendar/Months/Months.svelte.d.ts +1 -1
- package/dist/components/Calendar/Nav/Nav.svelte.d.ts +1 -1
- package/dist/components/Calendar/NextButton/NextButton.svelte.d.ts +1 -1
- package/dist/components/Calendar/PrevButton/PrevButton.svelte.d.ts +1 -1
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendar/types.d.ts +17 -0
- package/dist/components/Card/Action/Action.svelte.d.ts +1 -1
- package/dist/components/Card/Card.svelte.d.ts +1 -1
- package/dist/components/Card/Content/Content.svelte.d.ts +1 -1
- package/dist/components/Card/Description/Description.svelte.d.ts +1 -1
- package/dist/components/Card/Footer/Footer.svelte.d.ts +1 -1
- package/dist/components/Card/Header/Header.svelte.d.ts +1 -1
- package/dist/components/Card/Title/Title.svelte.d.ts +1 -1
- package/dist/components/Card/index.d.ts +7 -7
- package/dist/components/Checkbox/index.d.ts +1 -2
- package/dist/components/Checkbox/styles.css.js +1 -1
- package/dist/components/ContentState/ContentState.js +109 -0
- package/dist/components/ContentState/ContentState.svelte.d.ts +4 -0
- package/dist/components/ContentState/index.d.ts +2 -0
- package/dist/components/ContentState/styles.css.d.ts +4 -0
- package/dist/components/ContentState/styles.css.js +8 -0
- package/dist/components/ContentState/types.d.ts +55 -0
- package/dist/components/DataGrid/Cell/Cell.js +1 -2
- package/dist/components/DropdownMenu/CheckboxItem/CheckboxItem.svelte.d.ts +1 -1
- package/dist/components/DropdownMenu/Content/Content.svelte.d.ts +1 -1
- package/dist/components/DropdownMenu/Label/Label.svelte.d.ts +1 -1
- package/dist/components/DropdownMenu/Shortcut/Shortcut.svelte.d.ts +1 -1
- package/dist/components/Field/Content/Content.svelte.d.ts +1 -1
- package/dist/components/Field/Description/Description.svelte.d.ts +1 -1
- package/dist/components/Field/Field.svelte.d.ts +1 -1
- package/dist/components/Field/FieldError/FieldError.svelte.d.ts +1 -1
- package/dist/components/Field/FieldSet/FieldSet.svelte.d.ts +1 -1
- package/dist/components/Field/Group/Group.svelte.d.ts +1 -1
- package/dist/components/Field/Label/Label.js +1 -1
- package/dist/components/Field/Label/Label.svelte.d.ts +1 -1
- package/dist/components/Field/Legend/Legend.svelte.d.ts +1 -1
- package/dist/components/Field/Separator/Separator.js +1 -1
- package/dist/components/Field/Separator/Separator.svelte.d.ts +2 -2
- package/dist/components/Field/Title/Title.svelte.d.ts +1 -1
- package/dist/components/Field/index.d.ts +5 -5
- package/dist/components/Field/types.d.ts +1 -1
- package/dist/components/Input/types.d.ts +1 -1
- package/dist/components/Select/Content/Content.svelte.d.ts +1 -1
- package/dist/components/Select/Label/Label.svelte.d.ts +1 -1
- package/dist/components/Select/Trigger/Trigger.svelte.d.ts +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Spinner/styles.css.js +1 -1
- package/dist/components/Tooltip/Content/Content.svelte.d.ts +1 -1
- package/dist/components/Typography/styles.css.d.ts +1 -1
- package/dist/components/index.d.ts +20 -19
- package/dist/{index.js → components.js} +5 -10
- package/dist/stories/Accordion.stories.svelte.d.ts +0 -1
- package/dist/stories/Alert.stories.svelte.d.ts +1 -1
- package/dist/stories/Calendar.stories.svelte.d.ts +1 -1
- package/dist/stories/Card.stories.svelte.d.ts +1 -1
- package/dist/stories/CircularProgress.stories.svelte.d.ts +0 -1
- package/dist/stories/DataGrid.stories.svelte.d.ts +1 -1
- package/dist/stories/DropdownMenu.stories.svelte.d.ts +1 -1
- package/dist/stories/Field.stories.svelte.d.ts +1 -1
- package/dist/stories/Input.stories.svelte.d.ts +0 -1
- package/dist/stories/Label.stories.svelte.d.ts +1 -1
- package/dist/stories/Select.stories.svelte.d.ts +1 -1
- package/dist/stories/Tooltip.stories.svelte.d.ts +1 -1
- package/dist/stories/Typography.stories.svelte.d.ts +0 -1
- package/dist/{styles/theme.css.d.ts → theme.css.d.ts} +1 -0
- package/dist/{styles/theme.css.js → theme.js} +2 -2
- package/dist/{styles/types.d.ts → types.d.ts} +0 -1
- package/dist/{styles/utils.d.ts → utils.d.ts} +1 -3
- package/dist/{styles/utils.js → utils.js} +2 -2
- package/package.json +6 -15
- package/dist/_virtual/rolldown_runtime.js +0 -29
- package/dist/components/DropdownMenu/index.d.ts +0 -127
- package/dist/index.d.ts +0 -2
- package/dist/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -24
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/adapter/dist/vanilla-extract-css-adapter.browser.esm.js +0 -43
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/dist/taggedTemplateLiteral-8e47dbd7.browser.esm.js +0 -8
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/dist/transformCss-20240126.browser.esm.js +0 -767
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.browser.esm.js +0 -297
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.browser.esm.js +0 -18
- package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.browser.esm.js +0 -19
- package/dist/node_modules/.pnpm/@vanilla-extract_private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js +0 -29
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/parse.js +0 -314
- package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/types.js +0 -29
- package/dist/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js +0 -67
- package/dist/node_modules/.pnpm/dedent@1.7.1/node_modules/dedent/dist/dedent.js +0 -104
- package/dist/node_modules/.pnpm/deep-object-diff@1.1.9/node_modules/deep-object-diff/mjs/diff.js +0 -29
- package/dist/node_modules/.pnpm/deep-object-diff@1.1.9/node_modules/deep-object-diff/mjs/utils.js +0 -10
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +0 -88
- package/dist/node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/esm/index.js +0 -1155
- package/dist/node_modules/.pnpm/media-query-parser@2.0.2/node_modules/media-query-parser/dist/media-query-parser.esm.js +0 -940
- package/dist/node_modules/.pnpm/modern-ahocorasick@1.1.0/node_modules/modern-ahocorasick/dist/index.js +0 -81
- package/dist/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js +0 -59
- package/dist/styles/index.d.ts +0 -4
- package/dist/styles/index.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Accordion as AccordionPrimitive } from 'bits-ui';
|
|
2
|
-
declare const Content: import("svelte").Component<
|
|
2
|
+
declare const Content: import("svelte").Component<WithoutChild<AccordionPrimitive.ContentProps>, {}, "ref">;
|
|
3
3
|
type Content = ReturnType<typeof Content>;
|
|
4
4
|
export default Content;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accordion as AccordionPrimitive } from 'bits-ui';
|
|
2
|
-
import type { WithoutChild } from '../../../
|
|
2
|
+
import type { WithoutChild } from '../../../types.js';
|
|
3
3
|
type $$ComponentProps = WithoutChild<AccordionPrimitive.TriggerProps> & {
|
|
4
4
|
level?: AccordionPrimitive.HeaderProps['level'];
|
|
5
5
|
};
|
|
@@ -3,7 +3,7 @@ declare const Accordion: {
|
|
|
3
3
|
level?: import("bits-ui").AccordionHeaderProps["level"];
|
|
4
4
|
}, {}, "ref">;
|
|
5
5
|
Item: import("svelte").Component<import("bits-ui").AccordionItemProps, {}, "ref">;
|
|
6
|
-
Content: import("svelte").Component<
|
|
6
|
+
Content: import("svelte").Component<WithoutChild<import("bits-ui").AccordionContentProps>, {}, "ref">;
|
|
7
7
|
Root: import("svelte").Component<import("bits-ui").AccordionRootProps, {}, "value" | "ref">;
|
|
8
8
|
};
|
|
9
9
|
export { Accordion };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../
|
|
2
|
+
import type { WithElementRef } from '../../types.js';
|
|
3
3
|
import type { AlertVariant } from './types.js';
|
|
4
4
|
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
5
5
|
variant?: AlertVariant;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Description: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Description = ReturnType<typeof Description>;
|
|
5
5
|
export default Description;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Title: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Title = ReturnType<typeof Title>;
|
|
5
5
|
export default Title;
|
|
@@ -5,8 +5,8 @@ declare const Alert: {
|
|
|
5
5
|
} & {
|
|
6
6
|
variant?: import("./types.js").AlertVariant;
|
|
7
7
|
}, {}, "ref">;
|
|
8
|
-
Title: import("svelte").Component<import("../../
|
|
9
|
-
Description: import("svelte").Component<import("../../
|
|
8
|
+
Title: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
9
|
+
Description: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
10
10
|
};
|
|
11
11
|
export { Alert, alertVariants };
|
|
12
12
|
export type * from './types.js';
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import type { Snippet } from 'svelte';
|
|
4
|
-
import type { ButtonVariant } from '../../index.js';
|
|
5
|
-
import type { WithoutChildrenOrChild } from '../../styles/index.js';
|
|
6
|
-
type $$ComponentProps = WithoutChildrenOrChild<CalendarPrimitive.RootProps> & {
|
|
7
|
-
buttonVariant?: ButtonVariant;
|
|
8
|
-
captionLayout?: 'dropdown' | 'dropdown-months' | 'dropdown-years' | 'label';
|
|
9
|
-
months?: CalendarPrimitive.MonthSelectProps['months'];
|
|
10
|
-
years?: CalendarPrimitive.YearSelectProps['years'];
|
|
11
|
-
monthFormat?: CalendarPrimitive.MonthSelectProps['monthFormat'];
|
|
12
|
-
yearFormat?: CalendarPrimitive.YearSelectProps['yearFormat'];
|
|
13
|
-
day?: Snippet<[{
|
|
14
|
-
day: DateValue;
|
|
15
|
-
outsideMonth: boolean;
|
|
16
|
-
}]>;
|
|
17
|
-
};
|
|
18
|
-
declare const Calendar: import("svelte").Component<$$ComponentProps, {}, "value" | "placeholder" | "ref">;
|
|
1
|
+
import type { CalendarProps } from './types.js';
|
|
2
|
+
declare const Calendar: import("svelte").Component<CalendarProps, {}, "value" | "placeholder" | "ref">;
|
|
19
3
|
type Calendar = ReturnType<typeof Calendar>;
|
|
20
4
|
export default Calendar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Month: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
4
|
type Month = ReturnType<typeof Month>;
|
|
5
5
|
export default Month;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Months: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Months = ReturnType<typeof Months>;
|
|
5
5
|
export default Months;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Nav: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
4
|
type Nav = ReturnType<typeof Nav>;
|
|
5
5
|
export default Nav;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DateValue } from '@internationalized/date';
|
|
2
|
+
import type { Calendar } from 'bits-ui';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { WithoutChildrenOrChild } from '../../types.js';
|
|
5
|
+
import type { ButtonVariant } from '../Button/types.js';
|
|
6
|
+
export type CalendarProps = WithoutChildrenOrChild<Calendar.RootProps> & {
|
|
7
|
+
buttonVariant?: ButtonVariant;
|
|
8
|
+
captionLayout?: 'dropdown' | 'dropdown-months' | 'dropdown-years' | 'label';
|
|
9
|
+
months?: Calendar.MonthSelectProps['months'];
|
|
10
|
+
years?: Calendar.YearSelectProps['years'];
|
|
11
|
+
monthFormat?: Calendar.MonthSelectProps['monthFormat'];
|
|
12
|
+
yearFormat?: Calendar.YearSelectProps['yearFormat'];
|
|
13
|
+
day?: Snippet<[{
|
|
14
|
+
day: DateValue;
|
|
15
|
+
outsideMonth: boolean;
|
|
16
|
+
}]>;
|
|
17
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Action: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Action = ReturnType<typeof Action>;
|
|
5
5
|
export default Action;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../
|
|
2
|
+
import type { WithElementRef } from '../../types.js';
|
|
3
3
|
declare const Card: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Card = ReturnType<typeof Card>;
|
|
5
5
|
export default Card;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Content: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Content = ReturnType<typeof Content>;
|
|
5
5
|
export default Content;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Description: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
|
|
4
4
|
type Description = ReturnType<typeof Description>;
|
|
5
5
|
export default Description;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Footer: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Footer = ReturnType<typeof Footer>;
|
|
5
5
|
export default Footer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Header: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Header = ReturnType<typeof Header>;
|
|
5
5
|
export default Header;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Title: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Title = ReturnType<typeof Title>;
|
|
5
5
|
export default Title;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const Card: {
|
|
2
|
-
Root: import("svelte").Component<import("../../
|
|
3
|
-
Header: import("svelte").Component<import("../../
|
|
4
|
-
Title: import("svelte").Component<import("../../
|
|
5
|
-
Description: import("svelte").Component<import("../../
|
|
6
|
-
Content: import("svelte").Component<import("../../
|
|
7
|
-
Footer: import("svelte").Component<import("../../
|
|
8
|
-
Action: import("svelte").Component<import("../../
|
|
2
|
+
Root: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
3
|
+
Header: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
Title: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
5
|
+
Description: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
|
|
6
|
+
Content: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
7
|
+
Footer: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
8
|
+
Action: import("svelte").Component<import("../../types.js").WithElementRef<import("svelte/elements").HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
9
9
|
};
|
|
10
10
|
export { Card };
|
|
11
11
|
export type * from './types.js';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Root as Checkbox, Root, };
|
|
1
|
+
export { default as Checkbox } from './Checkbox.svelte';
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import Button from "../Button/Button.js";
|
|
2
|
+
import Placeholder from "../Placeholder/Placeholder.js";
|
|
3
|
+
import Spinner from "../Spinner/Spinner.js";
|
|
4
|
+
import styles_css_default from "./styles.css.js";
|
|
5
|
+
import "svelte/internal/disclose-version";
|
|
6
|
+
import * as $ from "svelte/internal/client";
|
|
7
|
+
|
|
8
|
+
//#region src/components/ContentState/ContentState.svelte
|
|
9
|
+
var root_3 = $.from_html(`<div><!></div>`);
|
|
10
|
+
function ContentState($$anchor, $$props) {
|
|
11
|
+
$.push($$props, true);
|
|
12
|
+
const actionSnippet = ($$anchor$1) => {
|
|
13
|
+
{
|
|
14
|
+
let $0 = $.derived(() => $$props.errorState?.onRetry);
|
|
15
|
+
Button($$anchor$1, {
|
|
16
|
+
get onclick() {
|
|
17
|
+
return $.get($0);
|
|
18
|
+
},
|
|
19
|
+
children: ($$anchor$2, $$slotProps) => {
|
|
20
|
+
$.next();
|
|
21
|
+
var text = $.text("Попробовать снова");
|
|
22
|
+
$.append($$anchor$2, text);
|
|
23
|
+
},
|
|
24
|
+
$$slots: { default: true }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var fragment_1 = $.comment();
|
|
29
|
+
var node = $.first_child(fragment_1);
|
|
30
|
+
var consequent_1 = ($$anchor$1) => {
|
|
31
|
+
var div = root_3();
|
|
32
|
+
var node_1 = $.child(div);
|
|
33
|
+
var consequent = ($$anchor$2) => {
|
|
34
|
+
var text_1 = $.text();
|
|
35
|
+
$.template_effect(() => $.set_text(text_1, $$props.loadingContent));
|
|
36
|
+
$.append($$anchor$2, text_1);
|
|
37
|
+
};
|
|
38
|
+
var alternate = ($$anchor$2) => {
|
|
39
|
+
Spinner($$anchor$2, {});
|
|
40
|
+
};
|
|
41
|
+
$.if(node_1, ($$render) => {
|
|
42
|
+
if ($$props.loadingContent) $$render(consequent);
|
|
43
|
+
else $$render(alternate, false);
|
|
44
|
+
});
|
|
45
|
+
$.reset(div);
|
|
46
|
+
$.template_effect(() => $.set_class(div, 1, $.clsx(styles_css_default.loadingContainer)));
|
|
47
|
+
$.append($$anchor$1, div);
|
|
48
|
+
};
|
|
49
|
+
var alternate_3 = ($$anchor$1) => {
|
|
50
|
+
var fragment_4 = $.comment();
|
|
51
|
+
var node_2 = $.first_child(fragment_4);
|
|
52
|
+
var consequent_2 = ($$anchor$2) => {
|
|
53
|
+
Placeholder($$anchor$2, $.spread_props(() => $$props.customState));
|
|
54
|
+
};
|
|
55
|
+
var alternate_2 = ($$anchor$2) => {
|
|
56
|
+
var fragment_6 = $.comment();
|
|
57
|
+
var node_3 = $.first_child(fragment_6);
|
|
58
|
+
var consequent_3 = ($$anchor$3) => {
|
|
59
|
+
{
|
|
60
|
+
let $0 = $.derived(() => $$props.errorState.title || "Произошла ошибка");
|
|
61
|
+
let $1 = $.derived(() => $$props.errorState.errorList.join(", "));
|
|
62
|
+
let $2 = $.derived(() => $$props.errorState.actions || actionSnippet);
|
|
63
|
+
Placeholder($$anchor$3, {
|
|
64
|
+
get title() {
|
|
65
|
+
return $.get($0);
|
|
66
|
+
},
|
|
67
|
+
get description() {
|
|
68
|
+
return $.get($1);
|
|
69
|
+
},
|
|
70
|
+
get imgAlt() {
|
|
71
|
+
return $$props.errorState.imgAlt;
|
|
72
|
+
},
|
|
73
|
+
get imgSrc() {
|
|
74
|
+
return $$props.errorState.imgSrc;
|
|
75
|
+
},
|
|
76
|
+
get actions() {
|
|
77
|
+
return $.get($2);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
var alternate_1 = ($$anchor$3) => {
|
|
83
|
+
var fragment_8 = $.comment();
|
|
84
|
+
var node_4 = $.first_child(fragment_8);
|
|
85
|
+
$.snippet(node_4, () => $$props.children ?? $.noop);
|
|
86
|
+
$.append($$anchor$3, fragment_8);
|
|
87
|
+
};
|
|
88
|
+
$.if(node_3, ($$render) => {
|
|
89
|
+
if ($$props.isError && $$props.errorState) $$render(consequent_3);
|
|
90
|
+
else $$render(alternate_1, false);
|
|
91
|
+
}, true);
|
|
92
|
+
$.append($$anchor$2, fragment_6);
|
|
93
|
+
};
|
|
94
|
+
$.if(node_2, ($$render) => {
|
|
95
|
+
if ($$props.isCustom && $$props.customState) $$render(consequent_2);
|
|
96
|
+
else $$render(alternate_2, false);
|
|
97
|
+
}, true);
|
|
98
|
+
$.append($$anchor$1, fragment_4);
|
|
99
|
+
};
|
|
100
|
+
$.if(node, ($$render) => {
|
|
101
|
+
if ($$props.isLoading) $$render(consequent_1);
|
|
102
|
+
else $$render(alternate_3, false);
|
|
103
|
+
});
|
|
104
|
+
$.append($$anchor, fragment_1);
|
|
105
|
+
$.pop();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
//#endregion
|
|
109
|
+
export { ContentState as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./../../assets/styles.css.ts.vanilla-CLnCzIMF.css";
|
|
2
|
+
|
|
3
|
+
//#region src/components/ContentState/styles.css.ts
|
|
4
|
+
var __default__ = { loadingContainer: "style__kx5p8g0" };
|
|
5
|
+
var styles_css_default = __default__;
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { styles_css_default as default };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { PlaceholderProps } from '../Placeholder/index.js';
|
|
3
|
+
export type ContentStateProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Флаг состояния загрузки
|
|
6
|
+
*/
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Элемент для отображения состояния загрузки
|
|
10
|
+
*/
|
|
11
|
+
loadingContent?: Snippet<[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Флаг состояния ошибки
|
|
14
|
+
*/
|
|
15
|
+
isError?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Параметры для отображения состояния ошибки
|
|
18
|
+
*/
|
|
19
|
+
errorState?: ContentStateErrorProps;
|
|
20
|
+
/**
|
|
21
|
+
* Флаг для отображения custom состояния ошибки
|
|
22
|
+
*/
|
|
23
|
+
isCustom?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Параметры для отображения custom состояния ошибки
|
|
26
|
+
*/
|
|
27
|
+
customState?: PlaceholderProps;
|
|
28
|
+
/**
|
|
29
|
+
* Элементы для отображения состояния "Успех"
|
|
30
|
+
*/
|
|
31
|
+
children: Snippet<[]>;
|
|
32
|
+
};
|
|
33
|
+
export type ContentStateErrorProps = {
|
|
34
|
+
/**
|
|
35
|
+
* Название ошибки
|
|
36
|
+
*/
|
|
37
|
+
title?: string;
|
|
38
|
+
imgSrc?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Alt атрибут для изображения
|
|
41
|
+
*/
|
|
42
|
+
imgAlt?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Список ошибок для отображения
|
|
45
|
+
*/
|
|
46
|
+
errorList: string[];
|
|
47
|
+
/**
|
|
48
|
+
* Элементы кнопок для дальнейших действий
|
|
49
|
+
*/
|
|
50
|
+
actions?: Snippet<[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Функция для повторного действия
|
|
53
|
+
*/
|
|
54
|
+
onRetry: () => void;
|
|
55
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { calculateSize } from "../../../
|
|
2
|
-
import "../../../styles/index.js";
|
|
1
|
+
import { calculateSize } from "../../../utils.js";
|
|
3
2
|
import styles_css_default from "./styles.css.js";
|
|
4
3
|
import "svelte/internal/disclose-version";
|
|
5
4
|
import * as $ from "svelte/internal/client";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
import type { WithoutChildrenOrChild } from '../../../
|
|
3
|
+
import type { WithoutChildrenOrChild } from '../../../types.js';
|
|
4
4
|
type $$ComponentProps = WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & {
|
|
5
5
|
children?: Snippet;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
2
|
import type { ComponentProps } from 'svelte';
|
|
3
|
-
import type { WithoutChildrenOrChild } from '../../../
|
|
3
|
+
import type { WithoutChildrenOrChild } from '../../../types.js';
|
|
4
4
|
import { Portal } from '../Portal/index.js';
|
|
5
5
|
type $$ComponentProps = DropdownMenuPrimitive.ContentProps & {
|
|
6
6
|
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof Portal>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
4
|
inset?: boolean;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Shortcut: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
|
|
4
4
|
type Shortcut = ReturnType<typeof Shortcut>;
|
|
5
5
|
export default Shortcut;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Content: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Content = ReturnType<typeof Content>;
|
|
5
5
|
export default Content;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Description: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLParagraphElement>>, {}, "ref">;
|
|
4
4
|
type Description = ReturnType<typeof Description>;
|
|
5
5
|
export default Description;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../
|
|
2
|
+
import type { WithElementRef } from '../../types.js';
|
|
3
3
|
import type { FieldOrientation } from './types.js';
|
|
4
4
|
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
5
5
|
orientation?: FieldOrientation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
import type { WithElementRef } from '../../../
|
|
3
|
+
import type { WithElementRef } from '../../../types.js';
|
|
4
4
|
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
5
5
|
children?: Snippet;
|
|
6
6
|
errors?: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLFieldsetAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const FieldSet: import("svelte").Component<WithElementRef<HTMLFieldsetAttributes>, {}, "ref">;
|
|
4
4
|
type FieldSet = ReturnType<typeof FieldSet>;
|
|
5
5
|
export default FieldSet;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Group: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Group = ReturnType<typeof Group>;
|
|
5
5
|
export default Group;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLLegendElement>> & {
|
|
4
4
|
variant?: 'legend' | 'label';
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import type { WithElementRef } from '../../../types.js';
|
|
4
|
+
import { Separator } from '../../Separator/index.js';
|
|
5
5
|
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
6
6
|
children?: Snippet;
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { WithElementRef } from '../../../
|
|
2
|
+
import type { WithElementRef } from '../../../types.js';
|
|
3
3
|
declare const Title: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
4
|
type Title = ReturnType<typeof Title>;
|
|
5
5
|
export default Title;
|