@casinogate/ui 1.2.0 → 1.3.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/css/root.css +72 -1
- package/dist/assets/css/theme.css +2 -0
- package/dist/components/app-shell/components/app-shell.nav-bar.svelte +2 -2
- package/dist/components/app-shell/components/app-shell.nav-bar.svelte.d.ts +2 -2
- package/dist/components/app-shell/components/app-shell.root.svelte +0 -4
- package/dist/components/app-shell/components/app-shell.svelte.js +1 -0
- package/dist/components/button-group/components/button-group.root.svelte +0 -2
- package/dist/components/collapsible/collapsible.stories.svelte +24 -8
- package/dist/components/collapsible/components/collapsaible.root.svelte +9 -3
- package/dist/components/collapsible/components/collapsaible.root.svelte.d.ts +4 -3
- package/dist/components/collapsible/components/collapsaible.trigger.svelte +10 -8
- package/dist/components/collapsible/components/collapsaible.trigger.svelte.d.ts +1 -1
- package/dist/components/collapsible/index.d.ts +1 -1
- package/dist/components/collapsible/styles.d.ts +70 -142
- package/dist/components/collapsible/styles.js +24 -5
- package/dist/components/navigation/components/navigation.content.svelte +44 -0
- package/dist/components/navigation/components/navigation.content.svelte.d.ts +7 -0
- package/dist/components/navigation/components/navigation.item.svelte +55 -0
- package/dist/components/navigation/components/navigation.item.svelte.d.ts +7 -0
- package/dist/components/navigation/components/navigation.root.svelte +49 -0
- package/dist/components/navigation/components/navigation.root.svelte.d.ts +10 -0
- package/dist/components/navigation/components/navigation.sub-content.svelte +70 -0
- package/dist/components/navigation/components/navigation.sub-content.svelte.d.ts +9 -0
- package/dist/components/navigation/components/navigation.svelte.d.ts +82 -0
- package/dist/components/navigation/components/navigation.svelte.js +128 -0
- package/dist/components/navigation/components/navigation.trigger.svelte +89 -0
- package/dist/components/navigation/components/navigation.trigger.svelte.d.ts +12 -0
- package/dist/components/navigation/index.d.ts +12 -0
- package/dist/components/navigation/index.js +12 -0
- package/dist/components/navigation/navigation.stories.svelte +85 -0
- package/dist/components/navigation/navigation.stories.svelte.d.ts +18 -0
- package/dist/components/navigation/navigation.svelte +3 -0
- package/dist/components/navigation/navigation.svelte.d.ts +18 -0
- package/dist/components/navigation/styles.d.ts +38 -0
- package/dist/components/navigation/styles.js +34 -0
- package/dist/components/popover/components/popover.content.svelte +39 -0
- package/dist/components/popover/components/popover.content.svelte.d.ts +5 -0
- package/dist/components/popover/components/popover.root.svelte +38 -0
- package/dist/components/popover/components/popover.root.svelte.d.ts +8 -0
- package/dist/components/popover/components/popover.svelte.d.ts +41 -0
- package/dist/components/popover/components/popover.svelte.js +59 -0
- package/dist/components/popover/components/popover.trigger.svelte +32 -0
- package/dist/components/popover/components/popover.trigger.svelte.d.ts +5 -0
- package/dist/components/popover/index.js +15 -0
- package/dist/components/popover/popover.stories.svelte +135 -0
- package/dist/components/popover/popover.stories.svelte.d.ts +4 -0
- package/dist/components/popover/popover.svelte +97 -0
- package/dist/components/popover/popover.svelte.d.ts +35 -0
- package/dist/components/popover/styles.d.ts +56 -0
- package/dist/components/popover/styles.js +21 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +12 -12
package/dist/assets/css/root.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -218,6 +218,9 @@
|
|
|
218
218
|
.cgui\:\!m-0 {
|
|
219
219
|
margin: calc(var(--cgui-spacing) * 0) !important;
|
|
220
220
|
}
|
|
221
|
+
.cgui\:mx-auto {
|
|
222
|
+
margin-inline: auto;
|
|
223
|
+
}
|
|
221
224
|
.cgui\:my-4 {
|
|
222
225
|
margin-block: calc(var(--cgui-spacing) * 4);
|
|
223
226
|
}
|
|
@@ -396,6 +399,9 @@
|
|
|
396
399
|
.cgui\:w-11 {
|
|
397
400
|
width: calc(var(--cgui-spacing) * 11);
|
|
398
401
|
}
|
|
402
|
+
.cgui\:w-40 {
|
|
403
|
+
width: calc(var(--cgui-spacing) * 40);
|
|
404
|
+
}
|
|
399
405
|
.cgui\:w-auto {
|
|
400
406
|
width: auto;
|
|
401
407
|
}
|
|
@@ -414,6 +420,9 @@
|
|
|
414
420
|
.cgui\:max-w-44 {
|
|
415
421
|
max-width: calc(var(--cgui-spacing) * 44);
|
|
416
422
|
}
|
|
423
|
+
.cgui\:max-w-64 {
|
|
424
|
+
max-width: calc(var(--cgui-spacing) * 64);
|
|
425
|
+
}
|
|
417
426
|
.cgui\:max-w-80 {
|
|
418
427
|
max-width: calc(var(--cgui-spacing) * 80);
|
|
419
428
|
}
|
|
@@ -423,6 +432,9 @@
|
|
|
423
432
|
.cgui\:min-w-42 {
|
|
424
433
|
min-width: calc(var(--cgui-spacing) * 42);
|
|
425
434
|
}
|
|
435
|
+
.cgui\:min-w-px {
|
|
436
|
+
min-width: 1px;
|
|
437
|
+
}
|
|
426
438
|
.cgui\:flex-1 {
|
|
427
439
|
flex: 1;
|
|
428
440
|
}
|
|
@@ -465,6 +477,9 @@
|
|
|
465
477
|
.cgui\:flex-row {
|
|
466
478
|
flex-direction: row;
|
|
467
479
|
}
|
|
480
|
+
.cgui\:flex-row-reverse {
|
|
481
|
+
flex-direction: row-reverse;
|
|
482
|
+
}
|
|
468
483
|
.cgui\:flex-wrap {
|
|
469
484
|
flex-wrap: wrap;
|
|
470
485
|
}
|
|
@@ -474,6 +489,9 @@
|
|
|
474
489
|
.cgui\:items-stretch {
|
|
475
490
|
align-items: stretch;
|
|
476
491
|
}
|
|
492
|
+
.cgui\:justify-between {
|
|
493
|
+
justify-content: space-between;
|
|
494
|
+
}
|
|
477
495
|
.cgui\:justify-center {
|
|
478
496
|
justify-content: center;
|
|
479
497
|
}
|
|
@@ -498,6 +516,9 @@
|
|
|
498
516
|
.cgui\:gap-4 {
|
|
499
517
|
gap: calc(var(--cgui-spacing) * 4);
|
|
500
518
|
}
|
|
519
|
+
.cgui\:gap-12 {
|
|
520
|
+
gap: calc(var(--cgui-spacing) * 12);
|
|
521
|
+
}
|
|
501
522
|
.cgui\:space-y-1 {
|
|
502
523
|
:where(& > :not(:last-child)) {
|
|
503
524
|
--tw-space-y-reverse: 0;
|
|
@@ -715,6 +736,9 @@
|
|
|
715
736
|
.cgui\:py-2\.5 {
|
|
716
737
|
padding-block: calc(var(--cgui-spacing) * 2.5);
|
|
717
738
|
}
|
|
739
|
+
.cgui\:py-4 {
|
|
740
|
+
padding-block: calc(var(--cgui-spacing) * 4);
|
|
741
|
+
}
|
|
718
742
|
.cgui\:pt-4 {
|
|
719
743
|
padding-top: calc(var(--cgui-spacing) * 4);
|
|
720
744
|
}
|
|
@@ -844,6 +868,10 @@
|
|
|
844
868
|
--tw-shadow: 0 0 #0000;
|
|
845
869
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
846
870
|
}
|
|
871
|
+
.cgui\:shadow-popover {
|
|
872
|
+
--tw-shadow: var(--cg-ui-shadow-popover);
|
|
873
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
874
|
+
}
|
|
847
875
|
.cgui\:shadow-segment-thumb {
|
|
848
876
|
--tw-shadow: var(--cg-ui-shadow-segment-item);
|
|
849
877
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -931,6 +959,11 @@
|
|
|
931
959
|
}
|
|
932
960
|
}
|
|
933
961
|
}
|
|
962
|
+
.cgui\:group-data-\[compact\=true\]\/navigation\:py-3 {
|
|
963
|
+
&:is(:where(.cgui\:group\/navigation)[data-compact="true"] *) {
|
|
964
|
+
padding-block: calc(var(--cgui-spacing) * 3);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
934
967
|
.cgui\:placeholder\:text-fg-regular {
|
|
935
968
|
&::placeholder {
|
|
936
969
|
color: var(--cg-ui-palette-neutral-50);
|
|
@@ -1114,6 +1147,16 @@
|
|
|
1114
1147
|
width: var(--app-shell-sidebar-collapsed-width);
|
|
1115
1148
|
}
|
|
1116
1149
|
}
|
|
1150
|
+
.cgui\:data-\[compact\=false\]\:pl-10 {
|
|
1151
|
+
&[data-compact="false"] {
|
|
1152
|
+
padding-left: calc(var(--cgui-spacing) * 10);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
.cgui\:data-\[compact\=true\]\:w-fit {
|
|
1156
|
+
&[data-compact="true"] {
|
|
1157
|
+
width: fit-content;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1117
1160
|
.cgui\:data-\[disabled\]\:pointer-events-none {
|
|
1118
1161
|
&[data-disabled] {
|
|
1119
1162
|
pointer-events: none;
|
|
@@ -1209,6 +1252,16 @@
|
|
|
1209
1252
|
color: var(--cg-ui-palette-neutral-50);
|
|
1210
1253
|
}
|
|
1211
1254
|
}
|
|
1255
|
+
.cgui\:data-\[popover-content\]\:rounded-md {
|
|
1256
|
+
&[data-popover-content] {
|
|
1257
|
+
border-radius: calc(var(--cg-ui-number-md) * 1px);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
.cgui\:data-\[popover-content\]\:bg-surface-darkest {
|
|
1261
|
+
&[data-popover-content] {
|
|
1262
|
+
background-color: var(--cg-ui-palette-neutral-100);
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1212
1265
|
.cgui\:data-\[selected\=\"\"\]\:border-stroke-primary {
|
|
1213
1266
|
&[data-selected=""] {
|
|
1214
1267
|
border-color: var(--cg-ui-palette-primary-80);
|
|
@@ -1314,6 +1367,13 @@
|
|
|
1314
1367
|
border-color: var(--cg-ui-palette-primary-80);
|
|
1315
1368
|
}
|
|
1316
1369
|
}
|
|
1370
|
+
.cgui\:data-\[compact\=false\]\:\[\&_\[data-slot\=\"trigger\"\]\]\:pl-0 {
|
|
1371
|
+
&[data-compact="false"] {
|
|
1372
|
+
& [data-slot="trigger"] {
|
|
1373
|
+
padding-left: calc(var(--cgui-spacing) * 0);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1317
1377
|
.cgui\:hover\:\[\&_\[data-slot\=icon\]\]\:text-icon-focus {
|
|
1318
1378
|
&:hover {
|
|
1319
1379
|
@media (hover: hover) {
|
|
@@ -1386,6 +1446,16 @@
|
|
|
1386
1446
|
border-width: 0px;
|
|
1387
1447
|
}
|
|
1388
1448
|
}
|
|
1449
|
+
.cgui\:\[data-disabled\]\:cursor-not-allowed {
|
|
1450
|
+
&:is(data-disabled) {
|
|
1451
|
+
cursor: not-allowed;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
.cgui\:\[data-disabled\]\:opacity-50 {
|
|
1455
|
+
&:is(data-disabled) {
|
|
1456
|
+
opacity: 50%;
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1389
1459
|
.cgui\:\[\&\>\*\]\:focus-visible\:relative {
|
|
1390
1460
|
&>* {
|
|
1391
1461
|
&:focus-visible {
|
|
@@ -1497,6 +1567,7 @@
|
|
|
1497
1567
|
--cg-ui-shadow-toast: 0px 0px 8px 0px hsla(0, 0%, 0%, 0.2);
|
|
1498
1568
|
--cg-ui-shadow-switch-thumb: 0px 1px 1px 0px hsla(0, 0%, 0%, 0.25);
|
|
1499
1569
|
--cg-ui-shadow-segment-item: 0px 0px 4px 0px hsla(0, 0%, 0%, 0.1);
|
|
1570
|
+
--cg-ui-shadow-popover: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
|
|
1500
1571
|
--cg-ui-fz-base: 16;
|
|
1501
1572
|
--cg-ui-fz-heading: calc(16 / var(--cg-ui-fz-base) * 1rem);
|
|
1502
1573
|
--cg-ui-lh-heading: calc(22 / var(--cg-ui-fz-base) * 1rem);
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
--shadow-toast: var(--cg-ui-shadow-toast);
|
|
120
120
|
--shadow-switch-thumb: var(--cg-ui-shadow-switch-thumb);
|
|
121
121
|
--shadow-segment-thumb: var(--cg-ui-shadow-segment-item);
|
|
122
|
+
--shadow-popover: var(--cg-ui-shadow-popover);
|
|
122
123
|
|
|
123
124
|
/* Font sizes, Line heights */
|
|
124
125
|
--text-heading: var(--cg-ui-fz-heading);
|
|
@@ -198,6 +199,7 @@
|
|
|
198
199
|
--cg-ui-shadow-toast: 0px 0px 8px 0px hsla(0, 0%, 0%, 0.2);
|
|
199
200
|
--cg-ui-shadow-switch-thumb: 0px 1px 1px 0px hsla(0, 0%, 0%, 0.25);
|
|
200
201
|
--cg-ui-shadow-segment-item: 0px 0px 4px 0px hsla(0, 0%, 0%, 0.1);
|
|
202
|
+
--cg-ui-shadow-popover: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
|
|
201
203
|
|
|
202
204
|
/* Font sizes, Line heights */
|
|
203
205
|
--cg-ui-fz-base: 16;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
type AppShellNavBarPropsWithoutHTML = WithElementRef<WithChild<{}>>;
|
|
3
3
|
|
|
4
4
|
export type AppShellNavBarProps = AppShellNavBarPropsWithoutHTML &
|
|
5
|
-
Without<
|
|
5
|
+
Without<PrimitiveElementAttributes, AppShellNavBarPropsWithoutHTML>;
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import type {
|
|
9
|
+
import type { PrimitiveElementAttributes } from '../../../internal/types/html-attributes.js';
|
|
10
10
|
import { cn, useId } from '../../../internal/utils/common.js';
|
|
11
11
|
import { box, mergeProps, type WithChild, type WithElementRef, type Without } from 'svelte-toolbelt';
|
|
12
12
|
import { AppShellStylesContext } from '../styles.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type AppShellNavBarPropsWithoutHTML = WithElementRef<WithChild<{}>>;
|
|
2
|
-
export type AppShellNavBarProps = AppShellNavBarPropsWithoutHTML & Without<
|
|
3
|
-
import type {
|
|
2
|
+
export type AppShellNavBarProps = AppShellNavBarPropsWithoutHTML & Without<PrimitiveElementAttributes, AppShellNavBarPropsWithoutHTML>;
|
|
3
|
+
import type { PrimitiveElementAttributes } from '../../../internal/types/html-attributes.js';
|
|
4
4
|
import { type WithChild, type WithElementRef, type Without } from 'svelte-toolbelt';
|
|
5
5
|
declare const AppShell: import("svelte").Component<AppShellNavBarProps, {}, "ref">;
|
|
6
6
|
type AppShell = ReturnType<typeof AppShell>;
|
|
@@ -54,12 +54,8 @@
|
|
|
54
54
|
header: box.with(() => header),
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
-
$inspect(collapsed);
|
|
58
|
-
|
|
59
57
|
const variants = $derived(appShellVariants({ layout, withBorder }));
|
|
60
58
|
|
|
61
|
-
$inspect(variants);
|
|
62
|
-
|
|
63
59
|
AppShellStylesContext.set(box.with(() => variants));
|
|
64
60
|
|
|
65
61
|
const mergedProps = $derived(mergeProps(restProps, rootState.props, { class: cn(variants.root(), className) }));
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import type { Parameters } from '@storybook/sveltekit';
|
|
4
4
|
|
|
5
5
|
import type { ComponentProps } from 'svelte';
|
|
6
|
-
import CollapsibleContent from './components/collapsaible.content.svelte';
|
|
7
6
|
import CollapsibleRoot from './components/collapsaible.root.svelte';
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
import { CollapsiblePrimitive } from './index.js';
|
|
9
9
|
|
|
10
10
|
const parameters: Parameters = {
|
|
11
11
|
controls: {
|
|
12
|
-
include: ['open', 'disabled'],
|
|
12
|
+
include: ['open', 'disabled', 'variant', 'iconPosition'],
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -35,19 +35,35 @@
|
|
|
35
35
|
const args: Args = {
|
|
36
36
|
open: false,
|
|
37
37
|
disabled: false,
|
|
38
|
+
variant: 'default',
|
|
39
|
+
iconPosition: 'end',
|
|
38
40
|
};
|
|
39
41
|
</script>
|
|
40
42
|
|
|
41
43
|
{#snippet template(args: Args)}
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
44
|
+
<CollapsiblePrimitive.Root {...args}>
|
|
45
|
+
<CollapsiblePrimitive.Trigger>Nisi nulla esse qui dolor</CollapsiblePrimitive.Trigger>
|
|
46
|
+
<CollapsiblePrimitive.Content>
|
|
45
47
|
Labore cupidatat nisi nostrud non laboris tempor velit. Commodo in sint ea fugiat ad ullamco labore. Laboris
|
|
46
48
|
labore sunt nostrud labore aliqua. Consectetur nulla anim amet laborum ex sunt nisi do consectetur magna Lorem
|
|
47
49
|
irure. Anim aute magna ad. Aliqua labore enim in quis. Eu exercitation cupidatat anim mollit ipsum eiusmod ex. Id
|
|
48
50
|
exercitation nulla esse consequat incididunt tempor.
|
|
49
|
-
</
|
|
50
|
-
</
|
|
51
|
+
</CollapsiblePrimitive.Content>
|
|
52
|
+
</CollapsiblePrimitive.Root>
|
|
51
53
|
{/snippet}
|
|
52
54
|
|
|
53
55
|
<Story name="Basic" {args} {template} {parameters} />
|
|
56
|
+
|
|
57
|
+
<Story name="Without Icon" {args} {parameters}>
|
|
58
|
+
{#snippet template(args: Args)}
|
|
59
|
+
<CollapsiblePrimitive.Root {...args}>
|
|
60
|
+
<CollapsiblePrimitive.Trigger icon={null}>Nisi nulla esse qui dolor</CollapsiblePrimitive.Trigger>
|
|
61
|
+
<CollapsiblePrimitive.Content>
|
|
62
|
+
Labore cupidatat nisi nostrud non laboris tempor velit. Commodo in sint ea fugiat ad ullamco labore. Laboris
|
|
63
|
+
labore sunt nostrud labore aliqua. Consectetur nulla anim amet laborum ex sunt nisi do consectetur magna Lorem
|
|
64
|
+
irure. Anim aute magna ad. Aliqua labore enim in quis. Eu exercitation cupidatat anim mollit ipsum eiusmod ex.
|
|
65
|
+
Id exercitation nulla esse consequat incididunt tempor.
|
|
66
|
+
</CollapsiblePrimitive.Content>
|
|
67
|
+
</CollapsiblePrimitive.Root>
|
|
68
|
+
{/snippet}
|
|
69
|
+
</Story>
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
export type CollapsibleRootProps = CollapsibleRootPropsPrimitive;
|
|
2
|
+
export type CollapsibleRootProps = CollapsibleRootPropsPrimitive & CollapsibleVariantsProps;
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script lang="ts">
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
CollapsibleStylesContext,
|
|
8
|
+
collapsibleVariants,
|
|
9
|
+
type CollapsibleVariantsProps,
|
|
10
|
+
} from '../styles.js';
|
|
7
11
|
import { cn, useId } from '../../../internal/utils/common.js';
|
|
8
12
|
import {
|
|
9
13
|
Collapsible as CollapsiblePrimitive,
|
|
@@ -18,6 +22,8 @@
|
|
|
18
22
|
id = useId(),
|
|
19
23
|
disabled,
|
|
20
24
|
class: className,
|
|
25
|
+
variant = 'default',
|
|
26
|
+
iconPosition = 'start',
|
|
21
27
|
...restProps
|
|
22
28
|
}: CollapsibleRootProps = $props();
|
|
23
29
|
|
|
@@ -47,7 +53,7 @@
|
|
|
47
53
|
group
|
|
48
54
|
);
|
|
49
55
|
|
|
50
|
-
const variants = $derived(collapsibleVariants());
|
|
56
|
+
const variants = $derived(collapsibleVariants({ variant, iconPosition }));
|
|
51
57
|
|
|
52
58
|
CollapsibleStylesContext.set(box.with(() => variants));
|
|
53
59
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export type CollapsibleRootProps = CollapsibleRootPropsPrimitive;
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
export type CollapsibleRootProps = CollapsibleRootPropsPrimitive & CollapsibleVariantsProps;
|
|
2
|
+
import { type CollapsibleVariantsProps } from '../styles.js';
|
|
3
|
+
import { type CollapsibleRootProps as CollapsibleRootPropsPrimitive } from 'bits-ui';
|
|
4
|
+
declare const Collapsaible: import("svelte").Component<CollapsibleRootProps, {}, "ref" | "open">;
|
|
4
5
|
type Collapsaible = ReturnType<typeof Collapsaible>;
|
|
5
6
|
export default Collapsaible;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
export type CollapsibleTriggerProps = CollapsibleTriggerPropsPrimitive & {
|
|
3
|
-
icon?: Snippet;
|
|
3
|
+
icon?: Snippet | null;
|
|
4
4
|
};
|
|
5
5
|
</script>
|
|
6
6
|
|
|
@@ -34,13 +34,15 @@
|
|
|
34
34
|
{@render childSnippet?.(childProps)}
|
|
35
35
|
{:else}
|
|
36
36
|
<button {...childProps.props}>
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
{#if iconSnippet !== null}
|
|
38
|
+
<span data-slot="icon" class={styles.current.icon()}>
|
|
39
|
+
{#if iconSnippet}
|
|
40
|
+
{@render iconSnippet?.()}
|
|
41
|
+
{:else}
|
|
42
|
+
<ChevronSmallRightIcon width={16} height={16} />
|
|
43
|
+
{/if}
|
|
44
|
+
</span>
|
|
45
|
+
{/if}
|
|
44
46
|
|
|
45
47
|
{@render childrenSnippet?.()}
|
|
46
48
|
</button>
|
|
@@ -2,7 +2,7 @@ import { type CollapsibleContentProps } from './components/collapsaible.content.
|
|
|
2
2
|
import { type CollapsibleRootProps } from './components/collapsaible.root.svelte';
|
|
3
3
|
import { type CollapsibleTriggerProps } from './components/collapsaible.trigger.svelte';
|
|
4
4
|
export declare const CollapsiblePrimitive: {
|
|
5
|
-
Root: import("svelte").Component<
|
|
5
|
+
Root: import("svelte").Component<CollapsibleRootProps, {}, "ref" | "open">;
|
|
6
6
|
Trigger: import("svelte").Component<CollapsibleTriggerProps, {}, "ref">;
|
|
7
7
|
Content: import("svelte").Component<import("bits-ui").CollapsibleContentProps, {}, "ref">;
|
|
8
8
|
};
|
|
@@ -2,43 +2,67 @@ import { Context } from 'runed';
|
|
|
2
2
|
import type { ReadableBox } from 'svelte-toolbelt';
|
|
3
3
|
import type { VariantProps } from 'tailwind-variants';
|
|
4
4
|
export declare const collapsibleVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
icon?: import("tailwind-variants").ClassValue;
|
|
5
|
+
variant: {
|
|
6
|
+
default: {
|
|
7
|
+
root: string[];
|
|
8
|
+
trigger: string[];
|
|
9
|
+
icon: string[];
|
|
11
10
|
};
|
|
11
|
+
clean: {};
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
trigger
|
|
19
|
-
icon?: import("tailwind-variants").ClassValue;
|
|
13
|
+
iconPosition: {
|
|
14
|
+
start: {
|
|
15
|
+
trigger: string[];
|
|
16
|
+
};
|
|
17
|
+
end: {
|
|
18
|
+
trigger: string[];
|
|
20
19
|
};
|
|
21
20
|
};
|
|
22
|
-
}
|
|
21
|
+
}, {
|
|
23
22
|
root: string[];
|
|
24
23
|
trigger: string[];
|
|
25
24
|
icon: string[];
|
|
26
25
|
content: string[];
|
|
27
26
|
}, undefined, {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
icon?: import("tailwind-variants").ClassValue;
|
|
27
|
+
variant: {
|
|
28
|
+
default: {
|
|
29
|
+
root: string[];
|
|
30
|
+
trigger: string[];
|
|
31
|
+
icon: string[];
|
|
34
32
|
};
|
|
33
|
+
clean: {};
|
|
35
34
|
};
|
|
36
|
-
|
|
35
|
+
iconPosition: {
|
|
36
|
+
start: {
|
|
37
|
+
trigger: string[];
|
|
38
|
+
};
|
|
39
|
+
end: {
|
|
40
|
+
trigger: string[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
37
44
|
root: string[];
|
|
38
45
|
trigger: string[];
|
|
39
46
|
icon: string[];
|
|
40
47
|
content: string[];
|
|
41
|
-
}, import("tailwind-variants").TVReturnType<
|
|
48
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
49
|
+
variant: {
|
|
50
|
+
default: {
|
|
51
|
+
root: string[];
|
|
52
|
+
trigger: string[];
|
|
53
|
+
icon: string[];
|
|
54
|
+
};
|
|
55
|
+
clean: {};
|
|
56
|
+
};
|
|
57
|
+
iconPosition: {
|
|
58
|
+
start: {
|
|
59
|
+
trigger: string[];
|
|
60
|
+
};
|
|
61
|
+
end: {
|
|
62
|
+
trigger: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
42
66
|
root: string[];
|
|
43
67
|
trigger: string[];
|
|
44
68
|
icon: string[];
|
|
@@ -47,132 +71,36 @@ export declare const collapsibleVariants: import("tailwind-variants").TVReturnTy
|
|
|
47
71
|
export type CollapsibleVariantsProps = VariantProps<typeof collapsibleVariants>;
|
|
48
72
|
export declare const CollapsibleStylesContext: Context<ReadableBox<{
|
|
49
73
|
root: (slotProps?: ({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
53
|
-
[x: string]: string | number | undefined;
|
|
54
|
-
[x: number]: string | number | undefined;
|
|
55
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
56
|
-
[x: string]: string | number | undefined;
|
|
57
|
-
[x: number]: string | number | undefined;
|
|
58
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
59
|
-
[x: string]: string | number | undefined;
|
|
60
|
-
[x: number]: string | number | undefined;
|
|
61
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
62
|
-
[x: string]: string | number | undefined;
|
|
63
|
-
[x: number]: string | number | undefined;
|
|
64
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
74
|
+
variant?: "clean" | "default" | undefined;
|
|
75
|
+
iconPosition?: "end" | "start" | undefined;
|
|
76
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
65
77
|
trigger: (slotProps?: ({
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
69
|
-
[x: string]: string | number | undefined;
|
|
70
|
-
[x: number]: string | number | undefined;
|
|
71
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
72
|
-
[x: string]: string | number | undefined;
|
|
73
|
-
[x: number]: string | number | undefined;
|
|
74
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
75
|
-
[x: string]: string | number | undefined;
|
|
76
|
-
[x: number]: string | number | undefined;
|
|
77
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
78
|
-
[x: string]: string | number | undefined;
|
|
79
|
-
[x: number]: string | number | undefined;
|
|
80
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
78
|
+
variant?: "clean" | "default" | undefined;
|
|
79
|
+
iconPosition?: "end" | "start" | undefined;
|
|
80
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
81
81
|
icon: (slotProps?: ({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
85
|
-
[x: string]: string | number | undefined;
|
|
86
|
-
[x: number]: string | number | undefined;
|
|
87
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
88
|
-
[x: string]: string | number | undefined;
|
|
89
|
-
[x: number]: string | number | undefined;
|
|
90
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
91
|
-
[x: string]: string | number | undefined;
|
|
92
|
-
[x: number]: string | number | undefined;
|
|
93
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
94
|
-
[x: string]: string | number | undefined;
|
|
95
|
-
[x: number]: string | number | undefined;
|
|
96
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
82
|
+
variant?: "clean" | "default" | undefined;
|
|
83
|
+
iconPosition?: "end" | "start" | undefined;
|
|
84
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
97
85
|
content: (slotProps?: ({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
101
|
-
[x: string]: string | number | undefined;
|
|
102
|
-
[x: number]: string | number | undefined;
|
|
103
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
104
|
-
[x: string]: string | number | undefined;
|
|
105
|
-
[x: number]: string | number | undefined;
|
|
106
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
107
|
-
[x: string]: string | number | undefined;
|
|
108
|
-
[x: number]: string | number | undefined;
|
|
109
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
110
|
-
[x: string]: string | number | undefined;
|
|
111
|
-
[x: number]: string | number | undefined;
|
|
112
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
86
|
+
variant?: "clean" | "default" | undefined;
|
|
87
|
+
iconPosition?: "end" | "start" | undefined;
|
|
88
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
113
89
|
} & {
|
|
114
90
|
root: (slotProps?: ({
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
118
|
-
[x: string]: string | number | undefined;
|
|
119
|
-
[x: number]: string | number | undefined;
|
|
120
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
121
|
-
[x: string]: string | number | undefined;
|
|
122
|
-
[x: number]: string | number | undefined;
|
|
123
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
124
|
-
[x: string]: string | number | undefined;
|
|
125
|
-
[x: number]: string | number | undefined;
|
|
126
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
127
|
-
[x: string]: string | number | undefined;
|
|
128
|
-
[x: number]: string | number | undefined;
|
|
129
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
91
|
+
variant?: "clean" | "default" | undefined;
|
|
92
|
+
iconPosition?: "end" | "start" | undefined;
|
|
93
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
130
94
|
trigger: (slotProps?: ({
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
134
|
-
[x: string]: string | number | undefined;
|
|
135
|
-
[x: number]: string | number | undefined;
|
|
136
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
137
|
-
[x: string]: string | number | undefined;
|
|
138
|
-
[x: number]: string | number | undefined;
|
|
139
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
140
|
-
[x: string]: string | number | undefined;
|
|
141
|
-
[x: number]: string | number | undefined;
|
|
142
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
143
|
-
[x: string]: string | number | undefined;
|
|
144
|
-
[x: number]: string | number | undefined;
|
|
145
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
95
|
+
variant?: "clean" | "default" | undefined;
|
|
96
|
+
iconPosition?: "end" | "start" | undefined;
|
|
97
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
146
98
|
icon: (slotProps?: ({
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
150
|
-
[x: string]: string | number | undefined;
|
|
151
|
-
[x: number]: string | number | undefined;
|
|
152
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
153
|
-
[x: string]: string | number | undefined;
|
|
154
|
-
[x: number]: string | number | undefined;
|
|
155
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
156
|
-
[x: string]: string | number | undefined;
|
|
157
|
-
[x: number]: string | number | undefined;
|
|
158
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
159
|
-
[x: string]: string | number | undefined;
|
|
160
|
-
[x: number]: string | number | undefined;
|
|
161
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
99
|
+
variant?: "clean" | "default" | undefined;
|
|
100
|
+
iconPosition?: "end" | "start" | undefined;
|
|
101
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
162
102
|
content: (slotProps?: ({
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) |
|
|
166
|
-
[x: string]: string | number | undefined;
|
|
167
|
-
[x: number]: string | number | undefined;
|
|
168
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
169
|
-
[x: string]: string | number | undefined;
|
|
170
|
-
[x: number]: string | number | undefined;
|
|
171
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
172
|
-
[x: string]: string | number | undefined;
|
|
173
|
-
[x: number]: string | number | undefined;
|
|
174
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
175
|
-
[x: string]: string | number | undefined;
|
|
176
|
-
[x: number]: string | number | undefined;
|
|
177
|
-
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
103
|
+
variant?: "clean" | "default" | undefined;
|
|
104
|
+
iconPosition?: "end" | "start" | undefined;
|
|
105
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
178
106
|
} & {}>>;
|