@max-ts/svelte 1.2.0 → 1.4.0
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-CFc3t0Nn.css +58 -0
- package/dist/assets/styles.css.ts.vanilla-DONNicjp.css +62 -0
- package/dist/assets/styles.css.ts.vanilla-GOQJy88x.css +56 -0
- package/dist/assets/{theme.css.ts.vanilla-BRMmE1vI.css → theme.css.ts.vanilla-HT3RGHeI.css} +4 -4
- package/dist/components/Accordion/Content/styles.css.js +1 -1
- package/dist/components/Accordion/Item/styles.css.js +1 -1
- package/dist/components/Accordion/Trigger/styles.css.js +1 -1
- package/dist/components/Alert/Description/styles.css.js +1 -1
- package/dist/components/Alert/Title/styles.css.js +1 -1
- package/dist/components/Alert/styles.css.js +1 -1
- package/dist/components/Badge/styles.css.js +1 -1
- package/dist/components/Button/styles.css.js +1 -1
- package/dist/components/ButtonGroup/Separator/styles.css.js +1 -1
- package/dist/components/ButtonGroup/Text/styles.css.js +1 -1
- package/dist/components/ButtonGroup/styles.css.js +1 -1
- package/dist/components/Calendar/Cell/styles.css.js +1 -1
- package/dist/components/Calendar/Day/styles.css.js +1 -1
- package/dist/components/Calendar/Grid/styles.css.js +1 -1
- package/dist/components/Calendar/GridRow/styles.css.js +1 -1
- package/dist/components/Calendar/HeadCell/styles.css.js +1 -1
- package/dist/components/Calendar/Header/styles.css.js +1 -1
- package/dist/components/Calendar/MonthSelect/styles.css.js +1 -1
- package/dist/components/Calendar/Months/styles.css.js +1 -1
- package/dist/components/Calendar/Nav/styles.css.js +1 -1
- package/dist/components/Calendar/YearSelect/styles.css.js +1 -1
- package/dist/components/Calendar/styles.css.js +1 -1
- package/dist/components/Card/Content/styles.css.js +1 -1
- package/dist/components/Card/Description/styles.css.js +1 -1
- package/dist/components/Card/Footer/styles.css.js +1 -1
- package/dist/components/Card/Header/styles.css.js +1 -1
- package/dist/components/Card/Title/styles.css.js +1 -1
- package/dist/components/Card/styles.css.js +1 -1
- package/dist/components/Carousel/Arrows/Arrows.js +59 -0
- package/dist/components/Carousel/Arrows/Arrows.svelte.d.ts +3 -0
- package/dist/components/Carousel/Arrows/index.d.ts +1 -0
- package/dist/components/Carousel/Arrows/styles.css.d.ts +10 -0
- package/dist/components/Carousel/Arrows/styles.css.js +21 -0
- package/dist/components/Carousel/Carousel.js +8 -5
- package/dist/components/Carousel/Content/styles.css.js +1 -1
- package/dist/components/Carousel/Dots/Dots.js +39 -0
- package/dist/components/Carousel/Dots/Dots.svelte.d.ts +3 -0
- package/dist/components/Carousel/Dots/index.d.ts +1 -0
- package/dist/components/Carousel/Dots/styles.css.d.ts +6 -0
- package/dist/components/Carousel/Dots/styles.css.js +19 -0
- package/dist/components/Carousel/Item/styles.css.js +1 -1
- package/dist/components/Carousel/index.d.ts +2 -2
- package/dist/components/Carousel/index.js +4 -4
- package/dist/components/Carousel/types.d.ts +3 -3
- package/dist/components/Checkbox/styles.css.js +1 -1
- package/dist/components/CircularProgress/styles.css.js +1 -1
- package/dist/components/DataGrid/Cell/styles.css.js +1 -1
- package/dist/components/DataGrid/Footer/styles.css.js +1 -1
- package/dist/components/DataGrid/HeaderCell/styles.css.js +1 -1
- package/dist/components/DataGrid/Row/styles.css.js +1 -1
- package/dist/components/DataGrid/styles.css.js +1 -1
- package/dist/components/DataGridSortHeader/styles.css.js +1 -1
- package/dist/components/DropdownMenu/CheckboxItem/styles.css.js +1 -1
- package/dist/components/DropdownMenu/Content/styles.css.js +1 -1
- package/dist/components/DropdownMenu/GroupHeading/styles.css.js +1 -1
- package/dist/components/DropdownMenu/Item/styles.css.js +1 -1
- package/dist/components/DropdownMenu/Label/styles.css.js +1 -1
- package/dist/components/DropdownMenu/RadioItem/styles.css.js +1 -1
- package/dist/components/DropdownMenu/Separator/styles.css.js +1 -1
- package/dist/components/DropdownMenu/Shortcut/styles.css.js +1 -1
- package/dist/components/DropdownMenu/SubContent/styles.css.js +1 -1
- package/dist/components/DropdownMenu/SubTrigger/styles.css.js +1 -1
- package/dist/components/Empty/styles.css.js +1 -1
- package/dist/components/Field/Content/styles.css.js +1 -1
- package/dist/components/Field/Description/styles.css.js +1 -1
- package/dist/components/Field/FieldError/styles.css.js +1 -1
- package/dist/components/Field/FieldSet/styles.css.js +1 -1
- package/dist/components/Field/Group/styles.css.js +1 -1
- package/dist/components/Field/Label/styles.css.js +1 -1
- package/dist/components/Field/Legend/styles.css.js +1 -1
- package/dist/components/Field/Separator/styles.css.js +1 -1
- package/dist/components/Field/Title/styles.css.js +1 -1
- package/dist/components/Field/styles.css.js +1 -1
- package/dist/components/Input/styles.css.js +1 -1
- package/dist/components/Item/styles.css.js +1 -1
- package/dist/components/Label/styles.css.js +1 -1
- package/dist/components/Placeholder/Image/styles.css.js +1 -1
- package/dist/components/Placeholder/styles.css.js +1 -1
- package/dist/components/Popover/styles.css.js +1 -1
- package/dist/components/RangeInput/styles.css.js +1 -1
- package/dist/components/Select/Content/styles.css.js +1 -1
- package/dist/components/Select/GroupHeading/styles.css.js +1 -1
- package/dist/components/Select/Item/styles.css.js +1 -1
- package/dist/components/Select/Label/styles.css.js +1 -1
- package/dist/components/Select/ScrollDownButton/styles.css.js +1 -1
- package/dist/components/Select/ScrollUpButton/styles.css.js +1 -1
- package/dist/components/Select/Separator/styles.css.js +1 -1
- package/dist/components/Select/Trigger/styles.css.js +1 -1
- package/dist/components/Separator/styles.css.js +1 -1
- package/dist/components/Slider/styles.css.js +1 -1
- package/dist/components/Spinner/styles.css.js +1 -1
- package/dist/components/Tabs/Content/Content.js +49 -0
- package/dist/components/Tabs/Content/Content.svelte.d.ts +4 -0
- package/dist/components/Tabs/Content/index.d.ts +1 -0
- package/dist/components/Tabs/List/List.js +49 -0
- package/dist/components/Tabs/List/List.svelte.d.ts +4 -0
- package/dist/components/Tabs/List/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.js +56 -0
- package/dist/components/Tabs/Tabs.svelte.d.ts +4 -0
- package/dist/components/Tabs/Trigger/Trigger.js +49 -0
- package/dist/components/Tabs/Trigger/Trigger.svelte.d.ts +4 -0
- package/dist/components/Tabs/Trigger/index.d.ts +1 -0
- package/dist/components/Tabs/index.d.ts +7 -0
- package/dist/components/Tabs/index.js +15 -0
- package/dist/components/Tabs/styles.css.d.ts +11 -0
- package/dist/components/Tabs/styles.css.js +14 -0
- package/dist/components/Tabs/types.d.ts +5 -0
- package/dist/components/Tooltip/Content/styles.css.js +1 -1
- package/dist/components/Typography/styles.css.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -1
- package/dist/stories/Tabs.stories.svelte.d.ts +19 -0
- package/dist/theme.js +1 -1
- package/package.json +1 -1
- package/dist/assets/styles.css.ts.vanilla-Cj0JBm6N.css +0 -25
- package/dist/assets/styles.css.ts.vanilla-D2NN324N.css +0 -25
- package/dist/components/Carousel/Next/Next.js +0 -69
- package/dist/components/Carousel/Next/Next.svelte.d.ts +0 -4
- package/dist/components/Carousel/Next/index.d.ts +0 -1
- package/dist/components/Carousel/Next/styles.css.d.ts +0 -7
- package/dist/components/Carousel/Next/styles.css.js +0 -16
- package/dist/components/Carousel/Previous/Previous.js +0 -69
- package/dist/components/Carousel/Previous/Previous.svelte.d.ts +0 -4
- package/dist/components/Carousel/Previous/index.d.ts +0 -1
- package/dist/components/Carousel/Previous/styles.css.d.ts +0 -7
- package/dist/components/Carousel/Previous/styles.css.js +0 -16
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.styles_buttonBase__3ygkf90 {
|
|
2
|
+
position: absolute;
|
|
3
|
+
background-color: transparent;
|
|
4
|
+
border: none;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
.styles_buttonBase__3ygkf90:disabled {
|
|
11
|
+
user-select: none;
|
|
12
|
+
cursor: default;
|
|
13
|
+
opacity: 0.5;
|
|
14
|
+
}
|
|
15
|
+
.styles_iconWrapper__3ygkf91 {
|
|
16
|
+
width: var(--spacing-8);
|
|
17
|
+
height: var(--spacing-8);
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
background-color: var(--colors-background-paper);
|
|
22
|
+
border-radius: 9999px;
|
|
23
|
+
transition: transform 0.2s ease;
|
|
24
|
+
}
|
|
25
|
+
.styles_buttonBase__3ygkf90:not(:disabled):hover .styles_iconWrapper__3ygkf91 {
|
|
26
|
+
transform: scale(1.1);
|
|
27
|
+
}
|
|
28
|
+
.styles_iconWrapper__3ygkf91 svg {
|
|
29
|
+
width: var(--spacing-5);
|
|
30
|
+
height: var(--spacing-5);
|
|
31
|
+
}
|
|
32
|
+
.styles_buttonNext_horizontal__3ygkf92 {
|
|
33
|
+
right: 0;
|
|
34
|
+
top: 0;
|
|
35
|
+
width: clamp(2.5rem, 4vw, 4rem);
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
.styles_buttonNext_vertical__3ygkf93 {
|
|
39
|
+
left: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: clamp(2.5rem, 4vw, 4rem);
|
|
43
|
+
}
|
|
44
|
+
.styles_buttonPrev_horizontal__3ygkf94 {
|
|
45
|
+
left: 0;
|
|
46
|
+
top: 0;
|
|
47
|
+
width: clamp(2.5rem, 4vw, 4rem);
|
|
48
|
+
height: 100%;
|
|
49
|
+
}
|
|
50
|
+
.styles_buttonPrev_vertical__3ygkf95 {
|
|
51
|
+
right: 0;
|
|
52
|
+
top: 0;
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: clamp(2.5rem, 4vw, 4rem);
|
|
55
|
+
}
|
|
56
|
+
.styles_buttonNext_vertical__3ygkf93 svg, .styles_buttonPrev_vertical__3ygkf95 svg {
|
|
57
|
+
transform: rotate(90deg);
|
|
58
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.styles_root__mob0850 {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--spacing-2);
|
|
5
|
+
}
|
|
6
|
+
.styles_list__mob0851 {
|
|
7
|
+
background-color: var(--colors-background-paper);
|
|
8
|
+
color: var(--colors-text-secondary);
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
height: var(--spacing-10);
|
|
11
|
+
width: fit-content;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
border-radius: var(--borderRadius-md);
|
|
15
|
+
box-shadow: var(--shadow-3);
|
|
16
|
+
padding: var(--spacing-1);
|
|
17
|
+
gap: var(--spacing-1);
|
|
18
|
+
}
|
|
19
|
+
.styles_trigger__mob0852 {
|
|
20
|
+
color: var(--colors-text-primary);
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
height: calc(100% - 1px);
|
|
23
|
+
flex: 1;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
gap: var(--spacing-1);
|
|
27
|
+
border-radius: var(--borderRadius-md);
|
|
28
|
+
border: 1px solid transparent;
|
|
29
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
30
|
+
font-size: var(--fontSize-sm);
|
|
31
|
+
font-weight: var(--fontWeight-medium);
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
.styles_trigger__mob0852[data-state=active] {
|
|
38
|
+
background-color: var(--colors-primary);
|
|
39
|
+
color: var(--colors-foreground-primary);
|
|
40
|
+
box-shadow: var(--shadow-1);
|
|
41
|
+
}
|
|
42
|
+
.styles_trigger__mob0852:focus-visible {
|
|
43
|
+
border-color: var(--colors-primary);
|
|
44
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, var(--colors-primary) 20%, transparent);
|
|
45
|
+
outline: 1px solid var(--colors-primary);
|
|
46
|
+
}
|
|
47
|
+
.styles_trigger__mob0852:disabled {
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
}
|
|
51
|
+
.styles_trigger__mob0852 svg {
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
}
|
|
55
|
+
.styles_trigger__mob0852 svg:not([class*='size-']) {
|
|
56
|
+
width: var(--spacing-4);
|
|
57
|
+
height: var(--spacing-4);
|
|
58
|
+
}
|
|
59
|
+
.styles_content__mob0853 {
|
|
60
|
+
flex: 1;
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.styles_baseWrapper__zoccy10 {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: absolute;
|
|
4
|
+
z-index: 1;
|
|
5
|
+
overflow: auto;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: var(--spacing-1);
|
|
8
|
+
}
|
|
9
|
+
.styles_wrapper_horizontal__zoccy11 {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: auto;
|
|
12
|
+
bottom: var(--spacing-2);
|
|
13
|
+
left: 0;
|
|
14
|
+
}
|
|
15
|
+
.styles_wrapper_vertical__zoccy12 {
|
|
16
|
+
width: auto;
|
|
17
|
+
height: 100%;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
left: var(--spacing-4);
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
}
|
|
22
|
+
.styles_buttonBase__zoccy13 {
|
|
23
|
+
width: var(--spacing-6);
|
|
24
|
+
height: var(--spacing-6);
|
|
25
|
+
position: relative;
|
|
26
|
+
border: none;
|
|
27
|
+
background: transparent;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
.styles_buttonBase__zoccy13:focus {
|
|
31
|
+
outline: none;
|
|
32
|
+
}
|
|
33
|
+
.styles_buttonBase__zoccy13:after {
|
|
34
|
+
background-color: var(--colors-border);
|
|
35
|
+
}
|
|
36
|
+
.styles_dotButton_horizontal__zoccy14::after {
|
|
37
|
+
content: "";
|
|
38
|
+
position: absolute;
|
|
39
|
+
left: 0;
|
|
40
|
+
top: 50%;
|
|
41
|
+
transform: translateY(-50%);
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 2px;
|
|
44
|
+
}
|
|
45
|
+
.styles_dotButton_vertical__zoccy15::after {
|
|
46
|
+
content: "";
|
|
47
|
+
position: absolute;
|
|
48
|
+
left: 50%;
|
|
49
|
+
top: 0;
|
|
50
|
+
transform: translateX(-50%);
|
|
51
|
+
width: 2px;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
.styles_selected__zoccy16::after {
|
|
55
|
+
background-color: var(--colors-primary);
|
|
56
|
+
}
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
--spacing-16: 4rem;
|
|
32
32
|
--spacing-20: 5rem;
|
|
33
33
|
--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
34
|
-
--shadow-2: 0 1px
|
|
35
|
-
--shadow-3: 0
|
|
36
|
-
--shadow-4: 0
|
|
37
|
-
--shadow-5: 0
|
|
34
|
+
--shadow-2: 0 1px 2px 0px rgba(0, 0, 0, 0.05);
|
|
35
|
+
--shadow-3: 0 1px 3px 0px rgba(0, 0, 0, 0.1), 0 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
36
|
+
--shadow-4: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
37
|
+
--shadow-5: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
38
38
|
--elevation-1: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba #00000024 (0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
|
|
39
39
|
--elevation-2: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);;
|
|
40
40
|
--elevation-3: 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { getEmblaContext } from "../context.js";
|
|
2
|
+
import styles_css_default from "./styles.css.js";
|
|
3
|
+
import "svelte/internal/disclose-version";
|
|
4
|
+
import * as $ from "svelte/internal/client";
|
|
5
|
+
import { ArrowLeftIcon } from "@lucide/svelte";
|
|
6
|
+
import ArrowRightIcon from "@lucide/svelte/icons/arrow-right";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Carousel/Arrows/Arrows.svelte
|
|
9
|
+
var root = $.from_html(`<button><span><!></span></button> <button><span><!></span></button>`, 1);
|
|
10
|
+
function Arrows($$anchor, $$props) {
|
|
11
|
+
$.push($$props, true);
|
|
12
|
+
let restProps = $.rest_props($$props, [
|
|
13
|
+
"$$slots",
|
|
14
|
+
"$$events",
|
|
15
|
+
"$$legacy",
|
|
16
|
+
"class"
|
|
17
|
+
]);
|
|
18
|
+
const emblaNextCtx = getEmblaContext("<Carousel.Next/>");
|
|
19
|
+
const emblaPrevCtx = getEmblaContext("<Carousel.Previous/>");
|
|
20
|
+
var fragment = root();
|
|
21
|
+
var button = $.first_child(fragment);
|
|
22
|
+
$.attribute_effect(button, () => ({
|
|
23
|
+
"data-slot": "carousel-previous",
|
|
24
|
+
disabled: !emblaPrevCtx.canScrollPrev,
|
|
25
|
+
class: [styles_css_default.buttonPrev[emblaPrevCtx.orientation], $$props.class],
|
|
26
|
+
onclick: emblaPrevCtx.scrollPrev,
|
|
27
|
+
onkeydown: emblaPrevCtx.handleKeyDown,
|
|
28
|
+
"aria-label": "Previous slide",
|
|
29
|
+
...restProps
|
|
30
|
+
}));
|
|
31
|
+
var span = $.child(button);
|
|
32
|
+
ArrowLeftIcon($.child(span), {});
|
|
33
|
+
$.reset(span);
|
|
34
|
+
$.reset(button);
|
|
35
|
+
var button_1 = $.sibling(button, 2);
|
|
36
|
+
$.attribute_effect(button_1, () => ({
|
|
37
|
+
"data-slot": "carousel-next",
|
|
38
|
+
disabled: !emblaNextCtx.canScrollNext,
|
|
39
|
+
"aria-disabled": !emblaNextCtx.canScrollNext,
|
|
40
|
+
class: [styles_css_default.buttonNext[emblaNextCtx.orientation], $$props.class],
|
|
41
|
+
onclick: emblaNextCtx.scrollNext,
|
|
42
|
+
onkeydown: emblaNextCtx.handleKeyDown,
|
|
43
|
+
"aria-label": "Next slide",
|
|
44
|
+
...restProps
|
|
45
|
+
}));
|
|
46
|
+
var span_1 = $.child(button_1);
|
|
47
|
+
ArrowRightIcon($.child(span_1), {});
|
|
48
|
+
$.reset(span_1);
|
|
49
|
+
$.reset(button_1);
|
|
50
|
+
$.template_effect(() => {
|
|
51
|
+
$.set_class(span, 1, $.clsx(styles_css_default.iconWrapper));
|
|
52
|
+
$.set_class(span_1, 1, $.clsx(styles_css_default.iconWrapper));
|
|
53
|
+
});
|
|
54
|
+
$.append($$anchor, fragment);
|
|
55
|
+
$.pop();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Arrows as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Arrows } from './Arrows.svelte';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const buttonBase: string;
|
|
2
|
+
export declare const iconWrapper: string;
|
|
3
|
+
export declare const buttonNext: Record<"horizontal" | "vertical", string>;
|
|
4
|
+
export declare const buttonPrev: Record<"horizontal" | "vertical", string>;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
buttonNext: Record<"horizontal" | "vertical", string>;
|
|
7
|
+
buttonPrev: Record<"horizontal" | "vertical", string>;
|
|
8
|
+
iconWrapper: string;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "./../../../assets/theme.css.ts.vanilla-HT3RGHeI.css";
|
|
2
|
+
import "./../../../assets/styles.css.ts.vanilla-CFc3t0Nn.css";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Carousel/Arrows/styles.css.ts
|
|
5
|
+
var buttonNext = {
|
|
6
|
+
horizontal: "styles_buttonNext_horizontal__3ygkf92 styles_buttonBase__3ygkf90",
|
|
7
|
+
vertical: "styles_buttonNext_vertical__3ygkf93 styles_buttonBase__3ygkf90"
|
|
8
|
+
};
|
|
9
|
+
var buttonPrev = {
|
|
10
|
+
horizontal: "styles_buttonPrev_horizontal__3ygkf94 styles_buttonBase__3ygkf90",
|
|
11
|
+
vertical: "styles_buttonPrev_vertical__3ygkf95 styles_buttonBase__3ygkf90"
|
|
12
|
+
};
|
|
13
|
+
var __default__ = {
|
|
14
|
+
buttonNext,
|
|
15
|
+
buttonPrev,
|
|
16
|
+
iconWrapper: "styles_iconWrapper__3ygkf91"
|
|
17
|
+
};
|
|
18
|
+
var styles_css_default = __default__;
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { styles_css_default as default };
|
|
@@ -7,12 +7,12 @@ import * as $ from "svelte/internal/client";
|
|
|
7
7
|
var root = $.from_html(`<div><!></div>`);
|
|
8
8
|
function Carousel($$anchor, $$props) {
|
|
9
9
|
$.push($$props, true);
|
|
10
|
-
let ref = $.prop($$props, "ref", 15, null),
|
|
10
|
+
let ref = $.prop($$props, "ref", 15, null), setApi = $.prop($$props, "setApi", 3, () => {}), orientation = $.prop($$props, "orientation", 3, "horizontal"), restProps = $.rest_props($$props, [
|
|
11
11
|
"$$slots",
|
|
12
12
|
"$$events",
|
|
13
13
|
"$$legacy",
|
|
14
14
|
"ref",
|
|
15
|
-
"
|
|
15
|
+
"options",
|
|
16
16
|
"plugins",
|
|
17
17
|
"setApi",
|
|
18
18
|
"orientation",
|
|
@@ -23,12 +23,12 @@ function Carousel($$anchor, $$props) {
|
|
|
23
23
|
api: void 0,
|
|
24
24
|
scrollPrev,
|
|
25
25
|
scrollNext,
|
|
26
|
-
orientation:
|
|
26
|
+
orientation: "horizontal",
|
|
27
27
|
canScrollNext: false,
|
|
28
28
|
canScrollPrev: false,
|
|
29
29
|
handleKeyDown,
|
|
30
|
-
options:
|
|
31
|
-
plugins:
|
|
30
|
+
options: {},
|
|
31
|
+
plugins: [],
|
|
32
32
|
onInit,
|
|
33
33
|
scrollSnaps: [],
|
|
34
34
|
selectedIndex: 0,
|
|
@@ -67,6 +67,9 @@ function Carousel($$anchor, $$props) {
|
|
|
67
67
|
onSelect();
|
|
68
68
|
}
|
|
69
69
|
$.user_effect(() => {
|
|
70
|
+
if (orientation()) carouselState.orientation = orientation();
|
|
71
|
+
if ($$props.options) carouselState.options = $$props.options;
|
|
72
|
+
if ($$props.plugins?.length) carouselState.plugins = $$props.plugins;
|
|
70
73
|
return () => {
|
|
71
74
|
carouselState.api?.off("select", onSelect);
|
|
72
75
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getEmblaContext } from "../context.js";
|
|
2
|
+
import styles_css_default from "./styles.css.js";
|
|
3
|
+
import "svelte/internal/disclose-version";
|
|
4
|
+
import * as $ from "svelte/internal/client";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Carousel/Dots/Dots.svelte
|
|
7
|
+
var root_1 = $.from_html(`<button type="button" aria-label="Carousel Dots"></button>`);
|
|
8
|
+
var root = $.from_html(`<div></div>`);
|
|
9
|
+
function Dots($$anchor, $$props) {
|
|
10
|
+
$.push($$props, true);
|
|
11
|
+
let restProps = $.rest_props($$props, [
|
|
12
|
+
"$$slots",
|
|
13
|
+
"$$events",
|
|
14
|
+
"$$legacy",
|
|
15
|
+
"class"
|
|
16
|
+
]);
|
|
17
|
+
const emblaCtx = getEmblaContext("<Carousel.Dots/>");
|
|
18
|
+
const onClick = (index) => {
|
|
19
|
+
emblaCtx.scrollTo(index);
|
|
20
|
+
};
|
|
21
|
+
var div = root();
|
|
22
|
+
$.attribute_effect(div, () => ({
|
|
23
|
+
class: [styles_css_default.wrapper[emblaCtx.orientation], $$props.class],
|
|
24
|
+
...restProps
|
|
25
|
+
}));
|
|
26
|
+
$.each(div, 21, () => emblaCtx.scrollSnaps, $.index, ($$anchor$1, _, index) => {
|
|
27
|
+
var button = root_1();
|
|
28
|
+
button.__click = () => onClick(index);
|
|
29
|
+
$.template_effect(() => $.set_class(button, 1, $.clsx([styles_css_default.dotButton[emblaCtx.orientation], { [styles_css_default.selected]: index === emblaCtx.selectedIndex }])));
|
|
30
|
+
$.append($$anchor$1, button);
|
|
31
|
+
});
|
|
32
|
+
$.reset(div);
|
|
33
|
+
$.append($$anchor, div);
|
|
34
|
+
$.pop();
|
|
35
|
+
}
|
|
36
|
+
$.delegate(["click"]);
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Dots as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Dots } from './Dots.svelte';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./../../../assets/theme.css.ts.vanilla-HT3RGHeI.css";
|
|
2
|
+
import "./../../../assets/styles.css.ts.vanilla-GOQJy88x.css";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Carousel/Dots/styles.css.ts
|
|
5
|
+
var __default__ = {
|
|
6
|
+
wrapper: {
|
|
7
|
+
horizontal: "styles_wrapper_horizontal__zoccy11 styles_baseWrapper__zoccy10",
|
|
8
|
+
vertical: "styles_wrapper_vertical__zoccy12 styles_baseWrapper__zoccy10"
|
|
9
|
+
},
|
|
10
|
+
dotButton: {
|
|
11
|
+
horizontal: "styles_dotButton_horizontal__zoccy14 styles_buttonBase__zoccy13",
|
|
12
|
+
vertical: "styles_dotButton_vertical__zoccy15 styles_buttonBase__zoccy13"
|
|
13
|
+
},
|
|
14
|
+
selected: "styles_selected__zoccy16"
|
|
15
|
+
};
|
|
16
|
+
var styles_css_default = __default__;
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { styles_css_default as default };
|