@frontify/fondue-components 1.3.0 → 1.3.2
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/fondue-components.js +16 -14
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +44 -47
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +47 -43
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +46 -8
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components13.js +8 -12
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +10 -152
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js +57 -21
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components16.js +18 -18
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +112 -14
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +14 -54
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +22 -9
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +51 -26
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +16 -24
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +35 -8
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +25 -5
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +8 -15
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +5 -2360
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +14 -142
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +2358 -27
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +146 -0
- package/dist/fondue-components28.js.map +1 -0
- package/dist/fondue-components29.js +32 -0
- package/dist/fondue-components29.js.map +1 -0
- package/dist/fondue-components3.js +5 -5
- package/dist/fondue-components4.js +2 -2
- package/dist/fondue-components5.js +78 -23
- package/dist/fondue-components5.js.map +1 -1
- package/dist/fondue-components6.js +21 -56
- package/dist/fondue-components6.js.map +1 -1
- package/dist/fondue-components7.js +56 -22
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js +24 -39
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components9.js +36 -44
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +117 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,63 +1,23 @@
|
|
|
1
|
-
import { sv as t } from "./fondue-
|
|
2
|
-
const
|
|
3
|
-
base:
|
|
1
|
+
import { sv as t } from "./fondue-components14.js";
|
|
2
|
+
const a = t({
|
|
3
|
+
base: 'tw-peer tw-relative tw-inline-flex tw-bg-base tw-text-white tw-shrink-0 tw-rounded tw-border tw-border-line-x-strong group-hover:tw-border-line-xx-strong hover:tw-border-line-xx-strong tw-transition-colors data-[state="checked"]:tw-border-transparent data-[state="indeterminate"]:tw-border-transparent disabled:tw-border-line-strong disabled:tw-bg-base disabled:tw-cursor-not-allowed data-[state="checked"]:disabled:tw-bg-box-disabled-strong focus-visible:tw-outline focus-visible:tw-outline-blue ',
|
|
4
4
|
variants: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
size: {
|
|
6
|
+
default: "tw-size-4",
|
|
7
|
+
large: "tw-size-5"
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
strong: "tw-border-line-strong",
|
|
13
|
-
"x-strong": "tw-border-x-line-strong"
|
|
14
|
-
},
|
|
15
|
-
style: {
|
|
16
|
-
solid: "tw-border-solid",
|
|
17
|
-
dashed: "tw-border-dashed",
|
|
18
|
-
noline: "tw-border-none"
|
|
9
|
+
emphasis: {
|
|
10
|
+
default: 'data-[state="checked"]:tw-bg-box-selected-strong data-[state="checked"]:hover:tw-bg-box-selected-strong-hover data-[state="checked"]:active:tw-bg-box-selected-strong-pressed data-[state="indeterminate"]:tw-bg-box-selected-strong data-[state="indeterminate"]:hover:tw-bg-box-selected-strong-hover data-[state="indeterminate"]:active:tw-bg-box-selected-strong-pressed ',
|
|
11
|
+
weak: 'data-[state="checked"]:tw-bg-box-neutral-strong data-[state="checked"]:hover:tw-bg-box-neutral-strong-hover data-[state="checked"]:active:tw-bg-box-neutral-strong-pressed data-[state="indeterminate"]:tw-bg-box-neutral-strong data-[state="indeterminate"]:hover:tw-bg-box-neutral-strong-hover data-[state="indeterminate"]:active:tw-bg-box-neutral-strong-pressed '
|
|
19
12
|
}
|
|
20
13
|
},
|
|
21
|
-
compoundVariants: [
|
|
22
|
-
{
|
|
23
|
-
direction: "horizontal",
|
|
24
|
-
padding: "small",
|
|
25
|
-
class: "tw-my-4"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
direction: "horizontal",
|
|
29
|
-
padding: "medium",
|
|
30
|
-
class: "tw-my-7"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
direction: "horizontal",
|
|
34
|
-
padding: "large",
|
|
35
|
-
class: "tw-my-12"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
direction: "vertical",
|
|
39
|
-
padding: "small",
|
|
40
|
-
class: "tw-mx-4"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
direction: "vertical",
|
|
44
|
-
padding: "medium",
|
|
45
|
-
class: "tw-mx-7"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
direction: "vertical",
|
|
49
|
-
padding: "large",
|
|
50
|
-
class: "tw-mx-12"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
14
|
defaultVariants: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
color: "default",
|
|
57
|
-
style: "solid"
|
|
15
|
+
size: "default",
|
|
16
|
+
emphasis: "default"
|
|
58
17
|
}
|
|
59
|
-
});
|
|
18
|
+
}), s = 'tw-group tw-absolute tw-inset-0 tw-inline-flex tw-items-center tw-justify-center tw-text-current tw-opacity-0 data-[state="checked"]:tw-opacity-100 data-[state="indeterminate"]:tw-opacity-100 tw-transition-opacity ';
|
|
60
19
|
export {
|
|
61
|
-
|
|
20
|
+
s as checkboxIndicatorStyles,
|
|
21
|
+
a as checkboxStyles
|
|
62
22
|
};
|
|
63
23
|
//# sourceMappingURL=fondue-components18.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components18.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components18.js","sources":["../src/components/Checkbox/styles/checkboxStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const checkboxStyles = sv({\n base:\n 'tw-peer tw-relative tw-inline-flex tw-bg-base tw-text-white tw-shrink-0 tw-rounded tw-border tw-border-line-x-strong group-hover:tw-border-line-xx-strong hover:tw-border-line-xx-strong tw-transition-colors ' +\n 'data-[state=\"checked\"]:tw-border-transparent data-[state=\"indeterminate\"]:tw-border-transparent ' +\n 'disabled:tw-border-line-strong disabled:tw-bg-base disabled:tw-cursor-not-allowed data-[state=\"checked\"]:disabled:tw-bg-box-disabled-strong ' +\n 'focus-visible:tw-outline focus-visible:tw-outline-blue ',\n variants: {\n size: {\n default: 'tw-size-4',\n large: 'tw-size-5',\n },\n emphasis: {\n default:\n 'data-[state=\"checked\"]:tw-bg-box-selected-strong data-[state=\"checked\"]:hover:tw-bg-box-selected-strong-hover data-[state=\"checked\"]:active:tw-bg-box-selected-strong-pressed ' +\n 'data-[state=\"indeterminate\"]:tw-bg-box-selected-strong data-[state=\"indeterminate\"]:hover:tw-bg-box-selected-strong-hover data-[state=\"indeterminate\"]:active:tw-bg-box-selected-strong-pressed ',\n weak:\n 'data-[state=\"checked\"]:tw-bg-box-neutral-strong data-[state=\"checked\"]:hover:tw-bg-box-neutral-strong-hover data-[state=\"checked\"]:active:tw-bg-box-neutral-strong-pressed ' +\n 'data-[state=\"indeterminate\"]:tw-bg-box-neutral-strong data-[state=\"indeterminate\"]:hover:tw-bg-box-neutral-strong-hover data-[state=\"indeterminate\"]:active:tw-bg-box-neutral-strong-pressed ',\n },\n },\n defaultVariants: {\n size: 'default',\n emphasis: 'default',\n },\n});\n\nexport const checkboxIndicatorStyles =\n 'tw-group tw-absolute tw-inset-0 tw-inline-flex tw-items-center tw-justify-center tw-text-current ' +\n 'tw-opacity-0 data-[state=\"checked\"]:tw-opacity-100 data-[state=\"indeterminate\"]:tw-opacity-100 tw-transition-opacity ';\n"],"names":["checkboxStyles","sv","checkboxIndicatorStyles"],"mappings":";AAIO,MAAMA,IAAiBC,EAAG;AAAA,EAC7B,MACI;AAAA,EAIJ,UAAU;AAAA,IACN,MAAM;AAAA,MACF,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACN,SACI;AAAA,MAEJ,MACI;AAAA,IAER;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,EACd;AACJ,CAAC,GAEYC,IACT;"}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
import { sv as t } from "./fondue-
|
|
2
|
-
const
|
|
3
|
-
base:
|
|
1
|
+
import { sv as t } from "./fondue-components14.js";
|
|
2
|
+
const o = t({
|
|
3
|
+
base: "tw-group tw-block tw-fixed tw-left-2 tw-right-2 tw-top-1/2 sm:tw-left-1/2 sm:tw-transform sm:tw--translate-x-1/2 tw--translate-y-1/2 tw-bg-base tw-shadow-mid tw-z-20 sm:tw-min-w-[--dialog-min-width] tw-max-w-[--dialog-max-width] tw-min-h-[--dialog-min-height] tw-max-h-[600px] tw-h-fit tw-overflow-hidden has-[[data-dialog-layout-component]]:tw-grid tw-grid-rows-[auto_auto_minmax(0_,_1fr)_auto] sm:tw-grid-rows-[auto_minmax(0_,_1fr)_auto] sm:tw-grid-cols-[min-content_auto]",
|
|
4
4
|
variants: {
|
|
5
5
|
rounded: {
|
|
6
|
-
true: "tw-rounded",
|
|
6
|
+
true: "tw-rounded-lg",
|
|
7
7
|
false: ""
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
defaultVariants: {
|
|
11
11
|
rounded: !0
|
|
12
12
|
}
|
|
13
|
-
}),
|
|
13
|
+
}), w = t({
|
|
14
|
+
base: "tw-fixed tw-inset-0 tw-bg-box-neutral-mighty tw-z-10",
|
|
15
|
+
variants: {
|
|
16
|
+
showUnderlay: {
|
|
17
|
+
true: "tw-opacity-50",
|
|
18
|
+
false: "tw-opacity-0"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
showUnderlay: !1
|
|
23
|
+
}
|
|
24
|
+
}), s = "tw-col-start-1 tw-row-start-1 tw-row-span-1 sm:tw-row-span-3 tw-min-h-10 tw-min-w-10", r = "tw-flex tw-h-fit tw-justify-between tw-items-center tw-border-b tw-border-line tw-font-medium tw-col-start-1 sm:tw-col-start-2 tw-row-start-2 sm:tw-row-start-1 group-data-[dialog-spacing=compact]:tw-p-4 group-data-[dialog-spacing=comfortable]:tw-p-6 group-data-[dialog-spacing=spacious]:tw-p-10 ", i = "tw-flex tw-gap-2 tw-justify-end tw-h-fit tw-border-t tw-border-line tw-font-medium tw-col-start-1 sm:tw-col-start-2 tw-row-start-4 sm:tw-row-start-3 group-data-[dialog-spacing=compact]:tw-p-4 group-data-[dialog-spacing=comfortable]:tw-p-6 group-data-[dialog-spacing=spacious]:tw-p-10 ", d = "tw-overflow-hidden tw-flex tw-max-h-full tw-flex-col tw-gap-4 group-data-[dialog-spacing=compact]:tw-px-4 group-data-[dialog-spacing=compact]:tw-py-2 tw-col-start-1 sm:tw-col-start-2 tw-row-start-3 sm:tw-row-start-2 group-data-[dialog-spacing=comfortable]:tw-px-6 group-data-[dialog-spacing=comfortable]:tw-py-4 group-data-[dialog-spacing=spacious]:tw-px-10 group-data-[dialog-spacing=spacious]:tw-py-6 ";
|
|
14
25
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
d as dialogBodyStyles,
|
|
27
|
+
o as dialogContentStyles,
|
|
28
|
+
i as dialogFooterStyles,
|
|
29
|
+
r as dialogHeaderStyles,
|
|
30
|
+
s as dialogSideContentStyles,
|
|
31
|
+
w as dialogUnderlayStyles
|
|
19
32
|
};
|
|
20
33
|
//# sourceMappingURL=fondue-components19.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components19.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components19.js","sources":["../src/components/Dialog/styles/dialogStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const dialogContentStyles = sv({\n base:\n 'tw-group tw-block tw-fixed tw-left-2 tw-right-2 tw-top-1/2 sm:tw-left-1/2 sm:tw-transform sm:tw--translate-x-1/2 tw--translate-y-1/2 tw-bg-base tw-shadow-mid tw-z-20 ' +\n 'sm:tw-min-w-[--dialog-min-width] tw-max-w-[--dialog-max-width] tw-min-h-[--dialog-min-height] tw-max-h-[600px] tw-h-fit tw-overflow-hidden ' +\n 'has-[[data-dialog-layout-component]]:tw-grid tw-grid-rows-[auto_auto_minmax(0_,_1fr)_auto] sm:tw-grid-rows-[auto_minmax(0_,_1fr)_auto] sm:tw-grid-cols-[min-content_auto]',\n variants: {\n rounded: {\n true: 'tw-rounded-lg',\n false: '',\n },\n },\n defaultVariants: {\n rounded: true,\n },\n});\n\nexport const dialogUnderlayStyles = sv({\n base: 'tw-fixed tw-inset-0 tw-bg-box-neutral-mighty tw-z-10',\n variants: {\n showUnderlay: {\n true: 'tw-opacity-50',\n false: 'tw-opacity-0',\n },\n },\n defaultVariants: {\n showUnderlay: false,\n },\n});\n\nexport const dialogSideContentStyles =\n 'tw-col-start-1 tw-row-start-1 tw-row-span-1 sm:tw-row-span-3 tw-min-h-10 tw-min-w-10';\n\nexport const dialogHeaderStyles =\n 'tw-flex tw-h-fit tw-justify-between tw-items-center tw-border-b tw-border-line tw-font-medium tw-col-start-1 sm:tw-col-start-2 tw-row-start-2 sm:tw-row-start-1 ' +\n 'group-data-[dialog-spacing=compact]:tw-p-4 ' +\n 'group-data-[dialog-spacing=comfortable]:tw-p-6 ' +\n 'group-data-[dialog-spacing=spacious]:tw-p-10 ';\n\nexport const dialogFooterStyles =\n 'tw-flex tw-gap-2 tw-justify-end tw-h-fit tw-border-t tw-border-line tw-font-medium tw-col-start-1 sm:tw-col-start-2 tw-row-start-4 sm:tw-row-start-3 ' +\n 'group-data-[dialog-spacing=compact]:tw-p-4 ' +\n 'group-data-[dialog-spacing=comfortable]:tw-p-6 ' +\n 'group-data-[dialog-spacing=spacious]:tw-p-10 ';\n\nexport const dialogBodyStyles =\n 'tw-overflow-hidden tw-flex tw-max-h-full tw-flex-col tw-gap-4 ' +\n 'group-data-[dialog-spacing=compact]:tw-px-4 group-data-[dialog-spacing=compact]:tw-py-2 tw-col-start-1 sm:tw-col-start-2 tw-row-start-3 sm:tw-row-start-2 ' +\n 'group-data-[dialog-spacing=comfortable]:tw-px-6 group-data-[dialog-spacing=comfortable]:tw-py-4 ' +\n 'group-data-[dialog-spacing=spacious]:tw-px-10 group-data-[dialog-spacing=spacious]:tw-py-6 ';\n"],"names":["dialogContentStyles","sv","dialogUnderlayStyles","dialogSideContentStyles","dialogHeaderStyles","dialogFooterStyles","dialogBodyStyles"],"mappings":";AAIO,MAAMA,IAAsBC,EAAG;AAAA,EAClC,MACI;AAAA,EAGJ,UAAU;AAAA,IACN,SAAS;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,SAAS;AAAA,EACb;AACJ,CAAC,GAEYC,IAAuBD,EAAG;AAAA,EACnC,MAAM;AAAA,EACN,UAAU;AAAA,IACN,cAAc;AAAA,MACV,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,cAAc;AAAA,EAClB;AACJ,CAAC,GAEYE,IACT,wFAESC,IACT,2SAKSC,IACT,gSAKSC,IACT;"}
|
|
@@ -1,38 +1,63 @@
|
|
|
1
|
-
import { sv as t } from "./fondue-
|
|
2
|
-
const
|
|
3
|
-
base: "tw-
|
|
1
|
+
import { sv as t } from "./fondue-components14.js";
|
|
2
|
+
const e = t({
|
|
3
|
+
base: "tw-flex tw-self-stretch tw-justify-center ",
|
|
4
4
|
variants: {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
direction: {
|
|
6
|
+
horizontal: "tw-flex-col tw-h-0 tw-border-t tw-w-full",
|
|
7
|
+
vertical: "tw-flex-row tw-w-0 tw-border-r tw-h-full "
|
|
7
8
|
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"x-
|
|
9
|
+
color: {
|
|
10
|
+
weak: "tw-border-line-weak",
|
|
11
|
+
default: "tw-border-line",
|
|
12
|
+
strong: "tw-border-line-strong",
|
|
13
|
+
"x-strong": "tw-border-x-line-strong"
|
|
13
14
|
},
|
|
14
15
|
style: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
solid: "tw-border-solid",
|
|
17
|
+
dashed: "tw-border-dashed",
|
|
18
|
+
noline: "tw-border-none"
|
|
18
19
|
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
},
|
|
21
|
+
compoundVariants: [
|
|
22
|
+
{
|
|
23
|
+
direction: "horizontal",
|
|
24
|
+
padding: "small",
|
|
25
|
+
class: "tw-my-4"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
direction: "horizontal",
|
|
29
|
+
padding: "medium",
|
|
30
|
+
class: "tw-my-7"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
direction: "horizontal",
|
|
34
|
+
padding: "large",
|
|
35
|
+
class: "tw-my-12"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
direction: "vertical",
|
|
39
|
+
padding: "small",
|
|
40
|
+
class: "tw-mx-4"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
direction: "vertical",
|
|
44
|
+
padding: "medium",
|
|
45
|
+
class: "tw-mx-7"
|
|
27
46
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
47
|
+
{
|
|
48
|
+
direction: "vertical",
|
|
49
|
+
padding: "large",
|
|
50
|
+
class: "tw-mx-12"
|
|
31
51
|
}
|
|
52
|
+
],
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
padding: "medium",
|
|
55
|
+
direction: "horizontal",
|
|
56
|
+
color: "default",
|
|
57
|
+
style: "solid"
|
|
32
58
|
}
|
|
33
59
|
});
|
|
34
60
|
export {
|
|
35
|
-
|
|
36
|
-
a as loadingBarStyles
|
|
61
|
+
e as dividerStyles
|
|
37
62
|
};
|
|
38
63
|
//# sourceMappingURL=fondue-components20.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components20.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components20.js","sources":["../src/components/Divider/styles/dividerStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const dividerStyles = sv({\n base: 'tw-flex tw-self-stretch tw-justify-center ',\n variants: {\n direction: {\n horizontal: 'tw-flex-col tw-h-0 tw-border-t tw-w-full',\n vertical: 'tw-flex-row tw-w-0 tw-border-r tw-h-full ',\n },\n color: {\n weak: 'tw-border-line-weak',\n default: 'tw-border-line',\n strong: 'tw-border-line-strong',\n 'x-strong': 'tw-border-x-line-strong',\n },\n style: {\n solid: 'tw-border-solid',\n dashed: 'tw-border-dashed',\n noline: 'tw-border-none',\n },\n },\n compoundVariants: [\n {\n direction: 'horizontal',\n padding: 'small',\n class: 'tw-my-4',\n },\n {\n direction: 'horizontal',\n padding: 'medium',\n class: 'tw-my-7',\n },\n {\n direction: 'horizontal',\n padding: 'large',\n class: 'tw-my-12',\n },\n {\n direction: 'vertical',\n padding: 'small',\n class: 'tw-mx-4',\n },\n {\n direction: 'vertical',\n padding: 'medium',\n class: 'tw-mx-7',\n },\n {\n direction: 'vertical',\n padding: 'large',\n class: 'tw-mx-12',\n },\n ],\n defaultVariants: {\n padding: 'medium',\n direction: 'horizontal',\n color: 'default',\n style: 'solid',\n },\n});\n"],"names":["dividerStyles","sv"],"mappings":";AAIO,MAAMA,IAAgBC,EAAG;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU;AAAA,IACN,WAAW;AAAA,MACP,YAAY;AAAA,MACZ,UAAU;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,YAAY;AAAA,IAChB;AAAA,IACA,OAAO;AAAA,MACH,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,IACZ;AAAA,EACJ;AAAA,EACA,kBAAkB;AAAA,IACd;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,SAAS;AAAA,IACT,WAAW;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EACX;AACJ,CAAC;"}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { sv as t } from "./fondue-components14.js";
|
|
2
|
+
const a = t({
|
|
3
|
+
base: 'tw-block tw-bg-base tw-shadow-mid tw-border tw-border-line tw-w-full sm:tw-w-fit sm:tw-max-w-[--flyout-max-width] tw-group tw-mt-4 sm:tw-mt-0 [body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:tw-p-2 [body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:tw-w-screen [body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:!tw-translate-x-0 [body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:!tw-translate-y-0 before:tw-fixed tw-content-[""] before:tw-top-0 before:tw-left-0 before:tw-h-screen before:tw-w-screen before:tw-bg-black before:tw-opacity-30 before:tw-z-[-1] before:tw-pointer-events-none sm:before:tw-hidden',
|
|
4
|
+
variants: {
|
|
5
|
+
rounded: {
|
|
6
|
+
true: "tw-rounded",
|
|
7
|
+
false: ""
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: {
|
|
11
|
+
rounded: !0
|
|
6
12
|
}
|
|
7
|
-
})
|
|
8
|
-
const [o, c] = b({ defaultProp: n, onChange: s }), t = e !== void 0, i = t ? e : o, r = f(() => s, [s]), a = d(
|
|
9
|
-
(l) => {
|
|
10
|
-
if (t) {
|
|
11
|
-
const u = typeof l == "function" ? l(e) : l;
|
|
12
|
-
u !== e && r(u);
|
|
13
|
-
} else
|
|
14
|
-
c(l);
|
|
15
|
-
},
|
|
16
|
-
[t, e, c, r]
|
|
17
|
-
);
|
|
18
|
-
return [i, a];
|
|
19
|
-
}, b = ({ defaultProp: e, onChange: n }) => {
|
|
20
|
-
const s = v(e), [o] = s, c = S(o), t = f(() => n, [n]);
|
|
21
|
-
return m(() => {
|
|
22
|
-
c.current !== o && (t == null || t(o), c.current = o);
|
|
23
|
-
}, [o, c, t]), s;
|
|
24
|
-
};
|
|
13
|
+
}), e = "tw-flex tw-justify-between tw-items-center tw-border-b tw-border-line tw-font-medium group-data-[flyout-spacing=compact]:tw-p-4 group-data-[flyout-spacing=comfortable]:tw-p-6 group-data-[flyout-spacing=spacious]:tw-p-10 ", r = "tw-flex tw-justify-end tw-gap-2 tw-border-t tw-border-line tw-font-medium group-data-[flyout-spacing=compact]:tw-p-4 group-data-[flyout-spacing=comfortable]:tw-p-6 group-data-[flyout-spacing=spacious]:tw-p-10 ", p = "tw-flex tw-flex-col tw-gap-4 group-data-[flyout-spacing=compact]:tw-px-4 group-data-[flyout-spacing=compact]:tw-py-2 group-data-[flyout-spacing=comfortable]:tw-px-6 group-data-[flyout-spacing=comfortable]:tw-py-4 group-data-[flyout-spacing=spacious]:tw-px-10 group-data-[flyout-spacing=spacious]:tw-py-6 ";
|
|
25
14
|
export {
|
|
26
|
-
|
|
15
|
+
p as flyoutBodyStyles,
|
|
16
|
+
a as flyoutContentStyles,
|
|
17
|
+
r as flyoutFooterStyles,
|
|
18
|
+
e as flyoutHeaderStyles
|
|
27
19
|
};
|
|
28
20
|
//# sourceMappingURL=fondue-components21.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components21.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components21.js","sources":["../src/components/Flyout/styles/flyoutStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const flyoutContentStyles = sv({\n base:\n 'tw-block tw-bg-base tw-shadow-mid tw-border tw-border-line tw-w-full sm:tw-w-fit sm:tw-max-w-[--flyout-max-width] tw-group tw-mt-4 sm:tw-mt-0 ' +\n // Mobile view flyout -> dialog responsiveness\n '[body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:tw-p-2 [body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:tw-w-screen [body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:!tw-translate-x-0 [body>[data-radix-popper-content-wrapper]:has(&)]:max-sm:!tw-translate-y-0 ' +\n // Responsive dialog background element\n 'before:tw-fixed tw-content-[\"\"] before:tw-top-0 before:tw-left-0 before:tw-h-screen before:tw-w-screen before:tw-bg-black before:tw-opacity-30 before:tw-z-[-1] before:tw-pointer-events-none sm:before:tw-hidden',\n variants: {\n rounded: {\n true: 'tw-rounded',\n false: '',\n },\n },\n defaultVariants: {\n rounded: true,\n },\n});\n\nexport const flyoutHeaderStyles =\n 'tw-flex tw-justify-between tw-items-center tw-border-b tw-border-line tw-font-medium ' +\n 'group-data-[flyout-spacing=compact]:tw-p-4 ' +\n 'group-data-[flyout-spacing=comfortable]:tw-p-6 ' +\n 'group-data-[flyout-spacing=spacious]:tw-p-10 ';\n\nexport const flyoutFooterStyles =\n 'tw-flex tw-justify-end tw-gap-2 tw-border-t tw-border-line tw-font-medium ' +\n 'group-data-[flyout-spacing=compact]:tw-p-4 ' +\n 'group-data-[flyout-spacing=comfortable]:tw-p-6 ' +\n 'group-data-[flyout-spacing=spacious]:tw-p-10 ';\n\nexport const flyoutBodyStyles =\n 'tw-flex tw-flex-col tw-gap-4 ' +\n 'group-data-[flyout-spacing=compact]:tw-px-4 group-data-[flyout-spacing=compact]:tw-py-2 ' +\n 'group-data-[flyout-spacing=comfortable]:tw-px-6 group-data-[flyout-spacing=comfortable]:tw-py-4 ' +\n 'group-data-[flyout-spacing=spacious]:tw-px-10 group-data-[flyout-spacing=spacious]:tw-py-6 ';\n"],"names":["flyoutContentStyles","sv","flyoutHeaderStyles","flyoutFooterStyles","flyoutBodyStyles"],"mappings":";AAIO,MAAMA,IAAsBC,EAAG;AAAA,EAClC,MACI;AAAA,EAKJ,UAAU;AAAA,IACN,SAAS;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,SAAS;AAAA,EACb;AACJ,CAAC,GAEYC,IACT,gOAKSC,IACT,qNAKSC,IACT;"}
|
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import { sv as t } from "./fondue-components14.js";
|
|
2
|
+
const i = t({
|
|
3
|
+
base: "tw-relative tw-w-full tw-overflow-hidden",
|
|
4
|
+
variants: {
|
|
5
|
+
rounded: {
|
|
6
|
+
true: "tw-rounded"
|
|
7
|
+
},
|
|
8
|
+
size: {
|
|
9
|
+
small: "tw-h-1",
|
|
10
|
+
medium: "tw-h-2",
|
|
11
|
+
large: "tw-h-3",
|
|
12
|
+
"x-large": "tw-h-4"
|
|
13
|
+
},
|
|
14
|
+
style: {
|
|
15
|
+
default: "tw-bg-box-selected",
|
|
16
|
+
positive: "tw-bg-box-positive",
|
|
17
|
+
negative: "tw-bg-box-negative"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}), a = t({
|
|
21
|
+
base: "tw-h-full tw-w-full",
|
|
22
|
+
variants: {
|
|
23
|
+
style: {
|
|
24
|
+
default: "tw-bg-text-interactive",
|
|
25
|
+
positive: "tw-bg-text-positive",
|
|
26
|
+
negative: "tw-bg-text-negative"
|
|
27
|
+
},
|
|
28
|
+
indeterminateState: {
|
|
29
|
+
true: "tw-animate-loading-bar-infinite tw-origin-left-right",
|
|
30
|
+
false: "tw-transition-all tw-origin-left tw-scale-x-[--loading-bar-proportion]"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
2
34
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
i as segmentedControlItemLabelInactiveStyles,
|
|
6
|
-
o as segmentedControlItemLabelStyles,
|
|
7
|
-
n as segmentedControlItemSeparatorStyles,
|
|
8
|
-
e as segmentedControlItemStyles,
|
|
9
|
-
t as segmentedControlRootStyles
|
|
35
|
+
i as loadingBarContainerStyles,
|
|
36
|
+
a as loadingBarStyles
|
|
10
37
|
};
|
|
11
38
|
//# sourceMappingURL=fondue-components22.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components22.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components22.js","sources":["../src/components/LoadingBar/styles/loadingBarStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const loadingBarContainerStyles = sv({\n base: 'tw-relative tw-w-full tw-overflow-hidden',\n variants: {\n rounded: {\n true: 'tw-rounded',\n },\n size: {\n small: 'tw-h-1',\n medium: 'tw-h-2',\n large: 'tw-h-3',\n 'x-large': 'tw-h-4',\n },\n style: {\n default: 'tw-bg-box-selected',\n positive: 'tw-bg-box-positive',\n negative: 'tw-bg-box-negative',\n },\n },\n});\n\nexport const loadingBarStyles = sv({\n base: 'tw-h-full tw-w-full',\n variants: {\n style: {\n default: 'tw-bg-text-interactive',\n positive: 'tw-bg-text-positive',\n negative: 'tw-bg-text-negative',\n },\n indeterminateState: {\n true: 'tw-animate-loading-bar-infinite tw-origin-left-right',\n false: 'tw-transition-all tw-origin-left tw-scale-x-[--loading-bar-proportion]',\n },\n },\n});\n"],"names":["loadingBarContainerStyles","sv","loadingBarStyles"],"mappings":";AAIO,MAAMA,IAA4BC,EAAG;AAAA,EACxC,MAAM;AAAA,EACN,UAAU;AAAA,IACN,SAAS;AAAA,MACL,MAAM;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACF,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,WAAW;AAAA,IACf;AAAA,IACA,OAAO;AAAA,MACH,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IACd;AAAA,EACJ;AACJ,CAAC,GAEYC,IAAmBD,EAAG;AAAA,EAC/B,MAAM;AAAA,EACN,UAAU;AAAA,IACN,OAAO;AAAA,MACH,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IACd;AAAA,IACA,oBAAoB;AAAA,MAChB,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ,CAAC;"}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import { useMemo as f, useCallback as d, useState as v, useRef as S, useEffect as m } from "react";
|
|
2
|
+
const U = ({
|
|
3
|
+
prop: e,
|
|
4
|
+
defaultProp: n,
|
|
5
|
+
onChange: s = () => {
|
|
6
|
+
}
|
|
7
|
+
}) => {
|
|
8
|
+
const [o, c] = b({ defaultProp: n, onChange: s }), t = e !== void 0, i = t ? e : o, r = f(() => s, [s]), a = d(
|
|
9
|
+
(l) => {
|
|
10
|
+
if (t) {
|
|
11
|
+
const u = typeof l == "function" ? l(e) : l;
|
|
12
|
+
u !== e && r(u);
|
|
13
|
+
} else
|
|
14
|
+
c(l);
|
|
15
|
+
},
|
|
16
|
+
[t, e, c, r]
|
|
17
|
+
);
|
|
18
|
+
return [i, a];
|
|
19
|
+
}, b = ({ defaultProp: e, onChange: n }) => {
|
|
20
|
+
const s = v(e), [o] = s, c = S(o), t = f(() => n, [n]);
|
|
21
|
+
return m(() => {
|
|
22
|
+
c.current !== o && (t == null || t(o), c.current = o);
|
|
23
|
+
}, [o, c, t]), s;
|
|
24
|
+
};
|
|
2
25
|
export {
|
|
3
|
-
|
|
4
|
-
a as loadingStatusStyles,
|
|
5
|
-
t as rootStyles,
|
|
6
|
-
r as slotStyles
|
|
26
|
+
U as useControllableState
|
|
7
27
|
};
|
|
8
28
|
//# sourceMappingURL=fondue-components23.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components23.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components23.js","sources":["../src/hooks/useControllableState.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type Dispatch, type SetStateAction, useCallback, useMemo, useState, useRef, useEffect } from 'react';\n\n// Radix UI handy hook for handling controlled and uncontrolled state\n// Source: https://github.com/radix-ui/primitives/blob/main/packages/react/use-controllable-state/src/useControllableState.tsx\n\ntype UseControllableStateParams<TValue> = {\n prop?: TValue;\n defaultProp?: TValue;\n onChange?: (state: TValue) => void;\n};\n\ntype SetStateFn<T> = (prevState?: T) => T;\n\nexport const useControllableState = <TValue>({\n prop,\n defaultProp,\n onChange = () => {},\n}: UseControllableStateParams<TValue>) => {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useMemo(() => onChange, [onChange]);\n\n const setValue: Dispatch<SetStateAction<TValue | undefined>> = useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue as SetStateFn<TValue>;\n const value = typeof nextValue === 'function' ? setter(prop) : nextValue;\n if (value !== prop) {\n handleChange(value as TValue);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange],\n );\n\n return [value, setValue] as const;\n};\n\nconst useUncontrolledState = <TValue>({ defaultProp, onChange }: Omit<UseControllableStateParams<TValue>, 'prop'>) => {\n const uncontrolledState = useState<TValue | undefined>(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = useRef(value);\n const handleChange = useMemo(() => onChange, [onChange]);\n\n useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange?.(value as TValue);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n\n return uncontrolledState;\n};\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useMemo","setValue","useCallback","nextValue","uncontrolledState","useState","prevValueRef","useRef","useEffect"],"mappings":";AAeO,MAAMA,IAAuB,CAAS;AAAA,EACzC,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EAAC;AACtB,MAA0C;AAChC,QAAA,CAACC,GAAkBC,CAAmB,IAAIC,EAAqB,EAAE,aAAAJ,GAAa,UAAAC,GAAU,GACxFI,IAAeN,MAAS,QACxBO,IAAQD,IAAeN,IAAOG,GAC9BK,IAAeC,EAAQ,MAAMP,GAAU,CAACA,CAAQ,CAAC,GAEjDQ,IAAyDC;AAAA,IAC3D,CAACC,MAAc;AACX,UAAIN,GAAc;AAEd,cAAMC,IAAQ,OAAOK,KAAc,aADpBA,EACwCZ,CAAI,IAAIY;AAC/D,QAAIL,MAAUP,KACVQ,EAAaD,CAAe;AAAA,MAChC;AAEA,QAAAH,EAAoBQ,CAAS;AAAA,IAErC;AAAA,IACA,CAACN,GAAcN,GAAMI,GAAqBI,CAAY;AAAA,EAAA;AAGnD,SAAA,CAACD,GAAOG,CAAQ;AAC3B,GAEML,IAAuB,CAAS,EAAE,aAAAJ,GAAa,UAAAC,QAAiE;AAC5G,QAAAW,IAAoBC,EAA6Bb,CAAW,GAC5D,CAACM,CAAK,IAAIM,GACVE,IAAeC,EAAOT,CAAK,GAC3BC,IAAeC,EAAQ,MAAMP,GAAU,CAACA,CAAQ,CAAC;AAEvD,SAAAe,EAAU,MAAM;AACR,IAAAF,EAAa,YAAYR,MACzBC,KAAA,QAAAA,EAAeD,IACfQ,EAAa,UAAUR;AAAA,EAE5B,GAAA,CAACA,GAAOQ,GAAcP,CAAY,CAAC,GAE/BK;AACX;"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
const o = t({
|
|
3
|
-
base: "tw-bg-box-neutral-mighty tw-text-box-neutral-mighty-inverse tw-rounded tw-max-w-48 tw-text-sm tw-overflow-hidden",
|
|
4
|
-
variants: {
|
|
5
|
-
padding: {
|
|
6
|
-
spacious: "tw-px-3 tw-py-2",
|
|
7
|
-
compact: "tw-px-2 tw-py-1"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
defaultVariants: {
|
|
11
|
-
padding: "spacious"
|
|
12
|
-
}
|
|
13
|
-
}), e = "tw-w-2 tw-h-2 tw-bg-box-neutral-mighty tw-border-r tw-border-b tw-border-r-line-mighty tw-border-b-line-mighty tw-rotate-45 -tw-translate-y-1 tw-rounded-br-small";
|
|
1
|
+
const t = "tw-inline-grid tw-h-9 tw-grid-flow-col tw-auto-cols-[1fr] tw-items-stretch tw-bg-base-alt disabled:tw-bg-base-alt tw-border tw-border-line-strong tw-rounded tw-relative tw-min-w-max tw-font-sans tw-font-normal tw-text-center tw-isolate", e = "tw-peer tw-group tw-flex tw-items-stretch tw-justify-center tw-select-none first:tw-rounded-l-[inherit] [&:nth-last-child(2)]:tw-rounded-r-[inherit] focus-visible:tw-rounded-[inherit] focus-visible:tw-outline focus-visible:tw-outline-blue", a = "tw-hidden tw-absolute -tw-z-[1] tw-top-0 tw-left-0 tw-h-full tw-pointer-events-none tw-transition-transform before:tw-content-[''] before:tw-inset-0 before:tw-absolute before:tw-rounded-[calc(var(--radius)-var(--line-width))] before:tw-bg-white peer-disabled:before:tw-bg-box-disabled before:tw-shadow-[0_0_0_var(--line-width)_var(--line-color-xx-strong)] peer-disabled:before:tw-shadow-[0_0_0_var(--line-width)_var(--line-color-x-strong)] peer-data-[state=on]:tw-block [&:nth-child(2)]:tw-w-[calc(100%/1)] [&:nth-child(3)]:tw-w-[calc(100%/2)] [&:nth-child(4)]:tw-w-[calc(100%/3)] [&:nth-child(5)]:tw-w-[calc(100%/4)] [&:nth-child(6)]:tw-w-[calc(100%/5)] [&:nth-child(7)]:tw-w-[calc(100%/6)] [&:nth-child(8)]:tw-w-[calc(100%/7)] [&:nth-child(9)]:tw-w-[calc(100%/8)] [&:nth-child(10)]:tw-w-[calc(100%/9)] [&:nth-child(11)]:tw-w-[calc(100%/10)] peer-[[data-state=on]:nth-child(1)]:tw-translate-x-[0%] peer-[[data-state=on]:nth-child(2)]:tw-translate-x-[100%] peer-[[data-state=on]:nth-child(3)]:tw-translate-x-[200%] peer-[[data-state=on]:nth-child(4)]:tw-translate-x-[300%] peer-[[data-state=on]:nth-child(5)]:tw-translate-x-[400%] peer-[[data-state=on]:nth-child(6)]:tw-translate-x-[500%] peer-[[data-state=on]:nth-child(7)]:tw-translate-x-[600%] peer-[[data-state=on]:nth-child(8)]:tw-translate-x-[700%] peer-[[data-state=on]:nth-child(9)]:tw-translate-x-[800%] peer-[[data-state=on]:nth-child(10)]:tw-translate-x-[900%]", n = "-tw-z-[1] tw-min-w-px tw-w-px -tw-mx-[0.5px] tw-bg-line-strong tw-transition-opacity tw-ease-out group-first:tw-opacity-0 group-first:tw-ease-in group-data-[state=on]:tw-opacity-0 group-data-[state=on]:tw-ease-in group-focus-visible:tw-opacity-0 group-focus-visible:tw-ease-in [[data-state=on]_+_*_&]:tw-opacity-0 [[data-state=on]_+_*_&]:tw-ease-in group-focus-visible:tw-duration-0", o = "tw-flex tw-flex-grow tw-items-center tw-justify-center tw-rounded-[inherit] tw-px-4 tw-gap-2 tw-text-body-medium group-data-[state=off]:group-enabled:hover:tw-bg-[#00005506] [&_svg]:tw-shrink-0", w = "tw-inline-flex tw-gap-2 tw-items-center tw-justify-center tw-transition-opacity group-disabled:tw-text-box-disabled-inverse tw-font-medium tw-opacity-0 tw-ease-in group-data-[state=on]:tw-opacity-100 group-data-[state=on]:tw-ease-out", i = "tw-absolute tw-inline-flex tw-gap-2 tw-items-center tw-justify-center tw-transition-opacity group-disabled:tw-text-box-disabled-inverse tw-font-normal tw-opacity-100 tw-ease-out group-data-[state=on]:tw-opacity-0 group-data-[state=on]:tw-ease-in";
|
|
14
2
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
a as segmentedControlActiveIndicatorStyles,
|
|
4
|
+
w as segmentedControlItemLabelActiveStyles,
|
|
5
|
+
i as segmentedControlItemLabelInactiveStyles,
|
|
6
|
+
o as segmentedControlItemLabelStyles,
|
|
7
|
+
n as segmentedControlItemSeparatorStyles,
|
|
8
|
+
e as segmentedControlItemStyles,
|
|
9
|
+
t as segmentedControlRootStyles
|
|
17
10
|
};
|
|
18
11
|
//# sourceMappingURL=fondue-components24.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components24.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components24.js","sources":["../src/components/SegmentedControl/styles/segmentedControlStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const segmentedControlRootStyles =\n 'tw-inline-grid tw-h-9 tw-grid-flow-col tw-auto-cols-[1fr] tw-items-stretch tw-bg-base-alt disabled:tw-bg-base-alt ' +\n 'tw-border tw-border-line-strong tw-rounded tw-relative tw-min-w-max tw-font-sans tw-font-normal tw-text-center tw-isolate';\n\nexport const segmentedControlItemStyles =\n 'tw-peer tw-group tw-flex tw-items-stretch tw-justify-center tw-select-none ' +\n // Apply border radius based on the index\n 'first:tw-rounded-l-[inherit] [&:nth-last-child(2)]:tw-rounded-r-[inherit] ' +\n // Focus styles for keyboard navigation\n 'focus-visible:tw-rounded-[inherit] focus-visible:tw-outline focus-visible:tw-outline-blue';\n\nexport const segmentedControlActiveIndicatorStyles =\n 'tw-hidden tw-absolute -tw-z-[1] tw-top-0 tw-left-0 tw-h-full tw-pointer-events-none tw-transition-transform ' +\n // Outline of active item\n \"before:tw-content-[''] before:tw-inset-0 before:tw-absolute before:tw-rounded-[calc(var(--radius)-var(--line-width))] before:tw-bg-white peer-disabled:before:tw-bg-box-disabled \" +\n 'before:tw-shadow-[0_0_0_var(--line-width)_var(--line-color-xx-strong)] peer-disabled:before:tw-shadow-[0_0_0_var(--line-width)_var(--line-color-x-strong)] ' +\n // Show the active indicator when the state is on\n 'peer-data-[state=on]:tw-block ' +\n // Used to animate the active indicator horizontally\n '[&:nth-child(2)]:tw-w-[calc(100%/1)] [&:nth-child(3)]:tw-w-[calc(100%/2)] ' +\n '[&:nth-child(4)]:tw-w-[calc(100%/3)] [&:nth-child(5)]:tw-w-[calc(100%/4)] ' +\n '[&:nth-child(6)]:tw-w-[calc(100%/5)] [&:nth-child(7)]:tw-w-[calc(100%/6)] ' +\n '[&:nth-child(8)]:tw-w-[calc(100%/7)] [&:nth-child(9)]:tw-w-[calc(100%/8)] ' +\n '[&:nth-child(10)]:tw-w-[calc(100%/9)] [&:nth-child(11)]:tw-w-[calc(100%/10)] ' +\n 'peer-[[data-state=on]:nth-child(1)]:tw-translate-x-[0%] ' +\n 'peer-[[data-state=on]:nth-child(2)]:tw-translate-x-[100%] ' +\n 'peer-[[data-state=on]:nth-child(3)]:tw-translate-x-[200%] ' +\n 'peer-[[data-state=on]:nth-child(4)]:tw-translate-x-[300%] ' +\n 'peer-[[data-state=on]:nth-child(5)]:tw-translate-x-[400%] ' +\n 'peer-[[data-state=on]:nth-child(6)]:tw-translate-x-[500%] ' +\n 'peer-[[data-state=on]:nth-child(7)]:tw-translate-x-[600%] ' +\n 'peer-[[data-state=on]:nth-child(8)]:tw-translate-x-[700%] ' +\n 'peer-[[data-state=on]:nth-child(9)]:tw-translate-x-[800%] ' +\n 'peer-[[data-state=on]:nth-child(10)]:tw-translate-x-[900%]';\n\nexport const segmentedControlItemSeparatorStyles =\n '-tw-z-[1] tw-min-w-px tw-w-px -tw-mx-[0.5px] tw-bg-line-strong tw-transition-opacity tw-ease-out ' +\n // Hide the separator when the state is on to rely on the active item's border\n 'group-first:tw-opacity-0 group-first:tw-ease-in ' +\n 'group-data-[state=on]:tw-opacity-0 group-data-[state=on]:tw-ease-in ' +\n 'group-focus-visible:tw-opacity-0 group-focus-visible:tw-ease-in ' +\n '[[data-state=on]_+_*_&]:tw-opacity-0 [[data-state=on]_+_*_&]:tw-ease-in ' +\n // Remove transition is the control is focused\n 'group-focus-visible:tw-duration-0';\n\nexport const segmentedControlItemLabelStyles =\n 'tw-flex tw-flex-grow tw-items-center tw-justify-center tw-rounded-[inherit] tw-px-4 tw-gap-2 tw-text-body-medium ' +\n // Hover on unselected items but not when disabled\n 'group-data-[state=off]:group-enabled:hover:tw-bg-[#00005506] ' +\n // Prevent shrinking of icons\n '[&_svg]:tw-shrink-0';\n\nexport const segmentedControlItemLabelActiveStyles =\n 'tw-inline-flex tw-gap-2 tw-items-center tw-justify-center tw-transition-opacity group-disabled:tw-text-box-disabled-inverse tw-font-medium ' +\n 'tw-opacity-0 tw-ease-in group-data-[state=on]:tw-opacity-100 ' +\n 'group-data-[state=on]:tw-ease-out';\n\nexport const segmentedControlItemLabelInactiveStyles =\n 'tw-absolute tw-inline-flex tw-gap-2 tw-items-center tw-justify-center tw-transition-opacity group-disabled:tw-text-box-disabled-inverse tw-font-normal ' +\n 'tw-opacity-100 tw-ease-out group-data-[state=on]:tw-opacity-0 ' +\n 'group-data-[state=on]:tw-ease-in';\n"],"names":["segmentedControlRootStyles","segmentedControlItemStyles","segmentedControlActiveIndicatorStyles","segmentedControlItemSeparatorStyles","segmentedControlItemLabelStyles","segmentedControlItemLabelActiveStyles","segmentedControlItemLabelInactiveStyles"],"mappings":"AAEO,MAAMA,IACT,+OAGSC,IACT,kPAMSC,IACT,i5CAuBSC,IACT,kYASSC,IACT,qMAMSC,IACT,6OAISC,IACT;"}
|