@frontify/fondue-components 23.0.0-rc.1 → 23.0.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.
Files changed (177) hide show
  1. package/dist/fondue-components.js +46 -50
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +27 -24
  4. package/dist/fondue-components10.js.map +1 -1
  5. package/dist/fondue-components11.js +86 -104
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +2 -2
  8. package/dist/fondue-components13.js +82 -79
  9. package/dist/fondue-components13.js.map +1 -1
  10. package/dist/fondue-components14.js +2 -2
  11. package/dist/fondue-components15.js +2 -2
  12. package/dist/fondue-components16.js +2 -2
  13. package/dist/fondue-components17.js +36 -56
  14. package/dist/fondue-components17.js.map +1 -1
  15. package/dist/fondue-components18.js +16 -34
  16. package/dist/fondue-components18.js.map +1 -1
  17. package/dist/fondue-components19.js +73 -18
  18. package/dist/fondue-components19.js.map +1 -1
  19. package/dist/fondue-components20.js +36 -18
  20. package/dist/fondue-components20.js.map +1 -1
  21. package/dist/fondue-components21.js +50 -71
  22. package/dist/fondue-components21.js.map +1 -1
  23. package/dist/fondue-components22.js +138 -36
  24. package/dist/fondue-components22.js.map +1 -1
  25. package/dist/fondue-components23.js +50 -50
  26. package/dist/fondue-components23.js.map +1 -1
  27. package/dist/fondue-components24.js +33 -138
  28. package/dist/fondue-components24.js.map +1 -1
  29. package/dist/fondue-components25.js +193 -52
  30. package/dist/fondue-components25.js.map +1 -1
  31. package/dist/fondue-components26.js +137 -29
  32. package/dist/fondue-components26.js.map +1 -1
  33. package/dist/fondue-components27.js +127 -170
  34. package/dist/fondue-components27.js.map +1 -1
  35. package/dist/fondue-components28.js +30 -134
  36. package/dist/fondue-components28.js.map +1 -1
  37. package/dist/fondue-components29.js +63 -130
  38. package/dist/fondue-components29.js.map +1 -1
  39. package/dist/fondue-components3.js +1 -1
  40. package/dist/fondue-components30.js +101 -31
  41. package/dist/fondue-components30.js.map +1 -1
  42. package/dist/fondue-components31.js +29 -63
  43. package/dist/fondue-components31.js.map +1 -1
  44. package/dist/fondue-components32.js +52 -98
  45. package/dist/fondue-components32.js.map +1 -1
  46. package/dist/fondue-components33.js +20 -12
  47. package/dist/fondue-components33.js.map +1 -1
  48. package/dist/fondue-components34.js +23 -56
  49. package/dist/fondue-components34.js.map +1 -1
  50. package/dist/fondue-components35.js +7 -20
  51. package/dist/fondue-components35.js.map +1 -1
  52. package/dist/fondue-components36.js +6 -7
  53. package/dist/fondue-components36.js.map +1 -1
  54. package/dist/fondue-components37.js +32 -7
  55. package/dist/fondue-components37.js.map +1 -1
  56. package/dist/fondue-components38.js +5 -32
  57. package/dist/fondue-components38.js.map +1 -1
  58. package/dist/fondue-components39.js +12 -5
  59. package/dist/fondue-components39.js.map +1 -1
  60. package/dist/fondue-components4.js +35 -31
  61. package/dist/fondue-components4.js.map +1 -1
  62. package/dist/fondue-components40.js +153 -18
  63. package/dist/fondue-components40.js.map +1 -1
  64. package/dist/fondue-components41.js +22 -59
  65. package/dist/fondue-components41.js.map +1 -1
  66. package/dist/fondue-components42.js +19 -19
  67. package/dist/fondue-components42.js.map +1 -1
  68. package/dist/fondue-components43.js +15 -112
  69. package/dist/fondue-components43.js.map +1 -1
  70. package/dist/fondue-components44.js +30 -19
  71. package/dist/fondue-components44.js.map +1 -1
  72. package/dist/fondue-components45.js +54 -32
  73. package/dist/fondue-components45.js.map +1 -1
  74. package/dist/fondue-components46.js +125 -47
  75. package/dist/fondue-components46.js.map +1 -1
  76. package/dist/fondue-components47.js +20 -129
  77. package/dist/fondue-components47.js.map +1 -1
  78. package/dist/fondue-components48.js +53 -21
  79. package/dist/fondue-components48.js.map +1 -1
  80. package/dist/fondue-components49.js +8 -53
  81. package/dist/fondue-components49.js.map +1 -1
  82. package/dist/fondue-components5.js +2 -2
  83. package/dist/fondue-components50.js +13 -8
  84. package/dist/fondue-components50.js.map +1 -1
  85. package/dist/fondue-components51.js +15 -13
  86. package/dist/fondue-components51.js.map +1 -1
  87. package/dist/fondue-components52.js +4 -14
  88. package/dist/fondue-components52.js.map +1 -1
  89. package/dist/fondue-components53.js +60 -5
  90. package/dist/fondue-components53.js.map +1 -1
  91. package/dist/fondue-components54.js +17 -58
  92. package/dist/fondue-components54.js.map +1 -1
  93. package/dist/fondue-components55.js +19 -18
  94. package/dist/fondue-components55.js.map +1 -1
  95. package/dist/fondue-components56.js +4 -18
  96. package/dist/fondue-components56.js.map +1 -1
  97. package/dist/fondue-components57.js +13 -3
  98. package/dist/fondue-components57.js.map +1 -1
  99. package/dist/fondue-components58.js +3 -11
  100. package/dist/fondue-components58.js.map +1 -1
  101. package/dist/fondue-components59.js +17 -3
  102. package/dist/fondue-components59.js.map +1 -1
  103. package/dist/fondue-components6.js +4 -4
  104. package/dist/fondue-components60.js +10 -17
  105. package/dist/fondue-components60.js.map +1 -1
  106. package/dist/fondue-components61.js +35 -11
  107. package/dist/fondue-components61.js.map +1 -1
  108. package/dist/fondue-components62.js +4 -36
  109. package/dist/fondue-components62.js.map +1 -1
  110. package/dist/fondue-components63.js +13 -35
  111. package/dist/fondue-components63.js.map +1 -1
  112. package/dist/fondue-components64.js +1 -1
  113. package/dist/fondue-components65.js +24 -12
  114. package/dist/fondue-components65.js.map +1 -1
  115. package/dist/fondue-components66.js +16 -4
  116. package/dist/fondue-components66.js.map +1 -1
  117. package/dist/fondue-components67.js +150 -23
  118. package/dist/fondue-components67.js.map +1 -1
  119. package/dist/fondue-components68.js +19 -17
  120. package/dist/fondue-components68.js.map +1 -1
  121. package/dist/fondue-components69.js +75 -148
  122. package/dist/fondue-components69.js.map +1 -1
  123. package/dist/fondue-components7.js +2 -2
  124. package/dist/fondue-components70.js +8 -19
  125. package/dist/fondue-components70.js.map +1 -1
  126. package/dist/fondue-components71.js +36 -77
  127. package/dist/fondue-components71.js.map +1 -1
  128. package/dist/fondue-components72.js +71 -8
  129. package/dist/fondue-components72.js.map +1 -1
  130. package/dist/fondue-components73.js +10 -36
  131. package/dist/fondue-components73.js.map +1 -1
  132. package/dist/fondue-components74.js +12 -70
  133. package/dist/fondue-components74.js.map +1 -1
  134. package/dist/fondue-components75.js +12 -10
  135. package/dist/fondue-components75.js.map +1 -1
  136. package/dist/fondue-components76.js +22 -12
  137. package/dist/fondue-components76.js.map +1 -1
  138. package/dist/fondue-components77.js +34 -13
  139. package/dist/fondue-components77.js.map +1 -1
  140. package/dist/fondue-components78.js +10 -22
  141. package/dist/fondue-components78.js.map +1 -1
  142. package/dist/fondue-components79.js +67 -33
  143. package/dist/fondue-components79.js.map +1 -1
  144. package/dist/fondue-components8.js +5 -5
  145. package/dist/fondue-components80.js +11 -7
  146. package/dist/fondue-components80.js.map +1 -1
  147. package/dist/fondue-components81.js +25 -67
  148. package/dist/fondue-components81.js.map +1 -1
  149. package/dist/fondue-components82.js +18 -14
  150. package/dist/fondue-components82.js.map +1 -1
  151. package/dist/fondue-components83.js +21 -23
  152. package/dist/fondue-components83.js.map +1 -1
  153. package/dist/fondue-components84.js +6 -18
  154. package/dist/fondue-components84.js.map +1 -1
  155. package/dist/fondue-components85.js +19 -22
  156. package/dist/fondue-components85.js.map +1 -1
  157. package/dist/fondue-components86.js +6 -8
  158. package/dist/fondue-components86.js.map +1 -1
  159. package/dist/fondue-components87.js +3 -5
  160. package/dist/fondue-components87.js.map +1 -1
  161. package/dist/fondue-components88.js +5 -2
  162. package/dist/fondue-components88.js.map +1 -1
  163. package/dist/fondue-components89.js +15 -3
  164. package/dist/fondue-components89.js.map +1 -1
  165. package/dist/fondue-components9.js +92 -88
  166. package/dist/fondue-components9.js.map +1 -1
  167. package/dist/fondue-components90.js +2 -5
  168. package/dist/fondue-components90.js.map +1 -1
  169. package/dist/fondue-components91.js +39 -16
  170. package/dist/fondue-components91.js.map +1 -1
  171. package/dist/fondue-components92.js +20 -39
  172. package/dist/fondue-components92.js.map +1 -1
  173. package/dist/index.d.ts +58 -118
  174. package/dist/style.css +1 -1
  175. package/package.json +10 -7
  176. package/dist/fondue-components93.js +0 -9
  177. package/dist/fondue-components93.js.map +0 -1
@@ -1,8 +1,18 @@
1
- const o = "_root_wpwbd_6", t = {
2
- root: o
1
+ const o = "_root_rlb6a_6", r = "_overlay_rlb6a_51", e = "_header_rlb6a_68", _ = "_body_rlb6a_93", t = "_footer_rlb6a_122", a = "_close_rlb6a_147", l = {
2
+ root: o,
3
+ overlay: r,
4
+ header: e,
5
+ body: _,
6
+ footer: t,
7
+ close: a
3
8
  };
4
9
  export {
5
- t as default,
10
+ _ as body,
11
+ a as close,
12
+ l as default,
13
+ t as footer,
14
+ e as header,
15
+ r as overlay,
6
16
  o as root
7
17
  };
8
18
  //# sourceMappingURL=fondue-components57.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components57.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"fondue-components57.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,16 +1,8 @@
1
- const o = "_root_n4kjj_6", e = "_overlay_n4kjj_51", t = "_header_n4kjj_68", _ = "_body_n4kjj_93", r = "_footer_n4kjj_122", n = {
2
- root: o,
3
- overlay: e,
4
- header: t,
5
- body: _,
6
- footer: r
1
+ const o = "_root_1b3p9_6", t = {
2
+ root: o
7
3
  };
8
4
  export {
9
- _ as body,
10
- n as default,
11
- r as footer,
12
- t as header,
13
- e as overlay,
5
+ t as default,
14
6
  o as root
15
7
  };
16
8
  //# sourceMappingURL=fondue-components58.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components58.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"fondue-components58.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,8 +1,22 @@
1
- const o = "_root_1b3p9_6", t = {
2
- root: o
1
+ const o = "_root_1brlo_2", r = {
2
+ root: o,
3
+ "size-medium": "_size-medium_1brlo_6",
4
+ "size-large": "_size-large_1brlo_11",
5
+ "size-x-large": "_size-x-large_1brlo_16",
6
+ "size-xx-large": "_size-xx-large_1brlo_21",
7
+ "weight-default": "_weight-default_1brlo_26",
8
+ "weight-strong": "_weight-strong_1brlo_30",
9
+ "color-default": "_color-default_1brlo_34",
10
+ "color-weak": "_color-weak_1brlo_38",
11
+ "color-x-weak": "_color-x-weak_1brlo_42",
12
+ "color-disabled": "_color-disabled_1brlo_46",
13
+ "color-negative": "_color-negative_1brlo_50",
14
+ "color-positive": "_color-positive_1brlo_54",
15
+ "color-warning": "_color-warning_1brlo_58",
16
+ "color-interactive": "_color-interactive_1brlo_62"
3
17
  };
4
18
  export {
5
- t as default,
19
+ r as default,
6
20
  o as root
7
21
  };
8
22
  //# sourceMappingURL=fondue-components59.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components59.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"fondue-components59.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as y } from "react";
3
- import { cn as x } from "./fondue-components40.js";
4
- import { buttonStyles as S } from "./fondue-components41.js";
5
- import { iconStyles as k } from "./fondue-components42.js";
6
- import { textStyles as B } from "./fondue-components43.js";
3
+ import { cn as x } from "./fondue-components39.js";
4
+ import { buttonStyles as S } from "./fondue-components40.js";
5
+ import { iconStyles as k } from "./fondue-components41.js";
6
+ import { textStyles as B } from "./fondue-components42.js";
7
7
  const C = y(
8
8
  ({
9
9
  children: f,
@@ -1,21 +1,14 @@
1
- const r = "_root_1ri4z_2", i = {
2
- root: r,
3
- "size-medium": "_size-medium_1ri4z_6",
4
- "size-large": "_size-large_1ri4z_11",
5
- "size-x-large": "_size-x-large_1ri4z_16",
6
- "size-xx-large": "_size-xx-large_1ri4z_21",
7
- "weight-default": "_weight-default_1ri4z_26",
8
- "weight-strong": "_weight-strong_1ri4z_30",
9
- "color-default": "_color-default_1ri4z_34",
10
- "color-weak": "_color-weak_1ri4z_38",
11
- "color-disabled": "_color-disabled_1ri4z_42",
12
- "color-negative": "_color-negative_1ri4z_46",
13
- "color-positive": "_color-positive_1ri4z_50",
14
- "color-warning": "_color-warning_1ri4z_54",
15
- "color-interactive": "_color-interactive_1ri4z_58"
1
+ const t = "_root_kwmbr_3", e = "_contentArea_kwmbr_66", o = "_hiddenText_kwmbr_71", n = "_visibleText_kwmbr_77", _ = {
2
+ root: t,
3
+ contentArea: e,
4
+ hiddenText: o,
5
+ visibleText: n
16
6
  };
17
7
  export {
18
- i as default,
19
- r as root
8
+ e as contentArea,
9
+ _ as default,
10
+ o as hiddenText,
11
+ t as root,
12
+ n as visibleText
20
13
  };
21
14
  //# sourceMappingURL=fondue-components60.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components60.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components60.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,14 +1,38 @@
1
- const t = "_root_1h7zi_3", e = "_contentArea_1h7zi_71", o = "_hiddenText_1h7zi_76", n = "_visibleText_1h7zi_82", i = {
2
- root: t,
3
- contentArea: e,
4
- hiddenText: o,
5
- visibleText: n
6
- };
1
+ import { sv as t } from "./fondue-components39.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
+ variant: {
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
+ variant: {
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
+ });
7
34
  export {
8
- e as contentArea,
9
- i as default,
10
- o as hiddenText,
11
- t as root,
12
- n as visibleText
35
+ i as loadingBarContainerStyles,
36
+ a as loadingBarStyles
13
37
  };
14
38
  //# sourceMappingURL=fondue-components61.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components61.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"fondue-components61.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 variant: {\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 variant: {\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,IAAA;AAAA,IAEV,MAAM;AAAA,MACF,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,IAEf,SAAS;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,EACd;AAER,CAAC,GAEYC,IAAmBD,EAAG;AAAA,EAC/B,MAAM;AAAA,EACN,UAAU;AAAA,IACN,SAAS;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,IAEd,oBAAoB;AAAA,MAChB,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACX;AAER,CAAC;"}
@@ -1,40 +1,8 @@
1
- const o = "_root_18l9z_2", l = "_truncate_18l9z_138", r = "_disabled_18l9z_144", _ = {
2
- root: o,
3
- "size-xx-small": "_size-xx-small_18l9z_8",
4
- "size-x-small": "_size-x-small_18l9z_14",
5
- "size-small": "_size-small_18l9z_20",
6
- "size-medium": "_size-medium_18l9z_26",
7
- "size-large": "_size-large_18l9z_32",
8
- "size-x-large": "_size-x-large_18l9z_38",
9
- "size-xx-large": "_size-xx-large_18l9z_44",
10
- "weight-regular": "_weight-regular_18l9z_50",
11
- "weight-medium": "_weight-medium_18l9z_54",
12
- "weight-bold": "_weight-bold_18l9z_58",
13
- "wrap-wrap": "_wrap-wrap_18l9z_62",
14
- "wrap-nowrap": "_wrap-nowrap_18l9z_66",
15
- "underline-auto": "_underline-auto_18l9z_70",
16
- "underline-always": "_underline-always_18l9z_74",
17
- "underline-hover": "_underline-hover_18l9z_78",
18
- "underline-none": "_underline-none_18l9z_86",
19
- "color-primary": "_color-primary_18l9z_90",
20
- "color-secondary": "_color-secondary_18l9z_94",
21
- "color-error": "_color-error_18l9z_98",
22
- "color-success": "_color-success_18l9z_102",
23
- "color-warning": "_color-warning_18l9z_106",
24
- "color-highlight": "_color-highlight_18l9z_110",
25
- "color-on-container-secondary": "_color-on-container-secondary_18l9z_114",
26
- "color-on-container-disabled": "_color-on-container-disabled_18l9z_118",
27
- "color-on-container-error": "_color-on-container-error_18l9z_122",
28
- "color-on-container-success": "_color-on-container-success_18l9z_126",
29
- "color-on-container-warning": "_color-on-container-warning_18l9z_130",
30
- "color-on-container-highlight": "_color-on-container-highlight_18l9z_134",
31
- truncate: l,
32
- disabled: r
1
+ const o = "_root_1hks3_8", t = {
2
+ root: o
33
3
  };
34
4
  export {
35
- _ as default,
36
- r as disabled,
37
- o as root,
38
- l as truncate
5
+ t as default,
6
+ o as root
39
7
  };
40
8
  //# sourceMappingURL=fondue-components62.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components62.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components62.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,38 +1,16 @@
1
- import { sv as t } from "./fondue-components40.js";
2
- const i = t({
3
- base: "tw-relative tw-w-full tw-overflow-hidden",
4
- variants: {
5
- rounded: {
6
- true: "tw-rounded-medium"
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
- variant: {
15
- default: "tw-bg-container-highlight",
16
- positive: "tw-bg-container-success",
17
- negative: "tw-bg-container-error"
18
- }
19
- }
20
- }), a = t({
21
- base: "tw-h-full tw-w-full",
22
- variants: {
23
- variant: {
24
- default: "tw-bg-highlight",
25
- positive: "tw-bg-success",
26
- negative: "tw-bg-error"
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
- });
1
+ const o = "_root_1bhxy_4", r = "_viewport_1bhxy_12", t = "_scrollbar_1bhxy_43", _ = "_thumb_1bhxy_75", c = "_corner_1bhxy_93", s = {
2
+ root: o,
3
+ viewport: r,
4
+ scrollbar: t,
5
+ thumb: _,
6
+ corner: c
7
+ };
34
8
  export {
35
- i as loadingBarContainerStyles,
36
- a as loadingBarStyles
9
+ c as corner,
10
+ s as default,
11
+ o as root,
12
+ t as scrollbar,
13
+ _ as thumb,
14
+ r as viewport
37
15
  };
38
16
  //# sourceMappingURL=fondue-components63.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components63.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-medium',\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 variant: {\n default: 'tw-bg-container-highlight',\n positive: 'tw-bg-container-success',\n negative: 'tw-bg-container-error',\n },\n },\n});\n\nexport const loadingBarStyles = sv({\n base: 'tw-h-full tw-w-full',\n variants: {\n variant: {\n default: 'tw-bg-highlight',\n positive: 'tw-bg-success',\n negative: 'tw-bg-error',\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,IAAA;AAAA,IAEV,MAAM;AAAA,MACF,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,IAEf,SAAS;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,EACd;AAER,CAAC,GAEYC,IAAmBD,EAAG;AAAA,EAC/B,MAAM;AAAA,EACN,UAAU;AAAA,IACN,SAAS;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,IAEd,oBAAoB;AAAA,MAChB,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACX;AAER,CAAC;"}
1
+ {"version":3,"file":"fondue-components63.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,4 +1,4 @@
1
- const o = "_root_jkymp_8", t = {
1
+ const o = "_root_f9dx4_6", t = {
2
2
  root: o
3
3
  };
4
4
  export {
@@ -1,16 +1,28 @@
1
- const r = "_root_71r9v_4", o = "_viewport_71r9v_12", t = "_scrollbar_71r9v_43", _ = "_thumb_71r9v_75", c = "_corner_71r9v_93", s = {
2
- root: r,
3
- viewport: o,
4
- scrollbar: t,
5
- thumb: _,
6
- corner: c
1
+ import { useMemo as f, useCallback as d, useState as v, useRef as m, useEffect as S } from "react";
2
+ const U = ({
3
+ prop: s,
4
+ defaultProp: c,
5
+ onChange: t = () => {
6
+ }
7
+ }) => {
8
+ const [n, o] = b({ defaultProp: c, onChange: t }), e = s !== void 0, i = e ? s : n, r = f(() => t, [t]), a = d(
9
+ (l) => {
10
+ if (e) {
11
+ const u = typeof l == "function" ? l(s) : l;
12
+ u !== s && r(u);
13
+ } else
14
+ o(l);
15
+ },
16
+ [e, s, o, r]
17
+ );
18
+ return [i, a];
19
+ }, b = ({ defaultProp: s, onChange: c }) => {
20
+ const [t, n] = v(s), o = m(t), e = f(() => c, [c]);
21
+ return S(() => {
22
+ o.current !== t && (e == null || e(t), o.current = t);
23
+ }, [t, o, e]), [t, n];
7
24
  };
8
25
  export {
9
- c as corner,
10
- s as default,
11
- r as root,
12
- t as scrollbar,
13
- _ as thumb,
14
- o as viewport
26
+ U as useControllableState
15
27
  };
16
28
  //# sourceMappingURL=fondue-components65.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components65.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"fondue-components65.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 [value, setValue] = useState<TValue | undefined>(defaultProp);\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 [value, setValue] as const;\n};\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useMemo","setValue","useCallback","nextValue","useState","prevValueRef","useRef","useEffect"],"mappings":";AAeO,MAAMA,IAAuB,CAAS;AAAA,EACzC,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EAAC;AACtB,MAA0C;AACtC,QAAM,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,MAEpC;AACI,QAAAH,EAAoBQ,CAAS;AAAA,IAErC;AAAA,IACA,CAACN,GAAcN,GAAMI,GAAqBI,CAAY;AAAA,EAAA;AAG1D,SAAO,CAACD,GAAOG,CAAQ;AAC3B,GAEML,IAAuB,CAAS,EAAE,aAAAJ,GAAa,UAAAC,QAAiE;AAClH,QAAM,CAACK,GAAOG,CAAQ,IAAIG,EAA6BZ,CAAW,GAC5Da,IAAeC,EAAOR,CAAK,GAC3BC,IAAeC,EAAQ,MAAMP,GAAU,CAACA,CAAQ,CAAC;AAEvD,SAAAc,EAAU,MAAM;AACZ,IAAIF,EAAa,YAAYP,MACzBC,KAAA,QAAAA,EAAeD,IACfO,EAAa,UAAUP;AAAA,EAE/B,GAAG,CAACA,GAAOO,GAAcN,CAAY,CAAC,GAE/B,CAACD,GAAOG,CAAQ;AAC3B;"}
@@ -1,8 +1,20 @@
1
- const o = "_root_f9dx4_6", t = {
2
- root: o
1
+ const e = "_root_nerqc_5", t = "_item_nerqc_33", c = "_itemLabel_nerqc_54", a = "_itemLabelActive_nerqc_75", i = "_itemLabelInactive_nerqc_105", n = "_activeIndicator_nerqc_135", o = "_separator_nerqc_262", _ = {
2
+ root: e,
3
+ item: t,
4
+ itemLabel: c,
5
+ itemLabelActive: a,
6
+ itemLabelInactive: i,
7
+ activeIndicator: n,
8
+ separator: o
3
9
  };
4
10
  export {
5
- t as default,
6
- o as root
11
+ n as activeIndicator,
12
+ _ as default,
13
+ t as item,
14
+ c as itemLabel,
15
+ a as itemLabelActive,
16
+ i as itemLabelInactive,
17
+ e as root,
18
+ o as separator
7
19
  };
8
20
  //# sourceMappingURL=fondue-components66.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components66.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"fondue-components66.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1,28 +1,155 @@
1
- import { useMemo as f, useCallback as d, useState as v, useRef as m, useEffect as S } from "react";
2
- const U = ({
3
- prop: s,
4
- defaultProp: c,
5
- onChange: t = () => {
6
- }
7
- }) => {
8
- const [n, o] = b({ defaultProp: c, onChange: t }), e = s !== void 0, i = e ? s : n, r = f(() => t, [t]), a = d(
9
- (l) => {
10
- if (e) {
11
- const u = typeof l == "function" ? l(s) : l;
12
- u !== s && r(u);
13
- } else
14
- o(l);
1
+ import { jsxs as g, jsx as t } from "react/jsx-runtime";
2
+ import { IconCaretDown as Q, IconCheckMark as U, IconExclamationMarkTriangle as W } from "@frontify/fondue-icons";
3
+ import * as B from "@radix-ui/react-popover";
4
+ import { Slot as X } from "@radix-ui/react-slot";
5
+ import { useCombobox as Y } from "downshift";
6
+ import { forwardRef as Z, useState as A, useRef as ee, useMemo as te } from "react";
7
+ import { LoadingCircle as oe } from "./fondue-components18.js";
8
+ import { ForwardedRefSelectSlot as re } from "./fondue-components70.js";
9
+ import { useTranslation as ae } from "./fondue-components34.js";
10
+ import { SelectMenu as le } from "./fondue-components69.js";
11
+ import o from "./fondue-components71.js";
12
+ import { useSelectData as ne } from "./fondue-components72.js";
13
+ const L = ({
14
+ children: M,
15
+ onSelect: i,
16
+ value: O,
17
+ defaultValue: v,
18
+ placeholder: F = "",
19
+ status: s = "neutral",
20
+ disabled: f,
21
+ "data-test-id": r = "fondue-select-combobox",
22
+ alignMenu: P = "start",
23
+ side: k = "bottom",
24
+ id: y,
25
+ viewportCollisionPadding: z = "compact",
26
+ getAsyncItems: c,
27
+ ...a
28
+ }, D) => {
29
+ const { t: H } = ae(), { inputSlots: V, menuSlots: $, items: u, filterText: T, clearButton: h, getItemByValue: p, setFilterText: b, asyncItemStatus: C } = ne(M, c), [j, x] = A(!1), {
30
+ getInputProps: d,
31
+ getToggleButtonProps: E,
32
+ getMenuProps: _,
33
+ getItemProps: q,
34
+ reset: w,
35
+ selectedItem: l,
36
+ isOpen: S,
37
+ highlightedIndex: G,
38
+ inputValue: m
39
+ } = Y({
40
+ items: u,
41
+ selectedItem: p(O),
42
+ defaultSelectedItem: p(v),
43
+ defaultHighlightedIndex: 0,
44
+ toggleButtonId: y,
45
+ labelId: "aria-labelledby" in a ? a["aria-labelledby"] : void 0,
46
+ onSelectedItemChange: ({ selectedItem: e }) => {
47
+ i == null || i((e == null ? void 0 : e.value) ?? null);
15
48
  },
16
- [e, s, o, r]
17
- );
18
- return [i, a];
19
- }, b = ({ defaultProp: s, onChange: c }) => {
20
- const [t, n] = v(s), o = m(t), e = f(() => c, [c]);
21
- return S(() => {
22
- o.current !== t && (e == null || e(t), o.current = t);
23
- }, [t, o, e]), [t, n];
49
+ onInputValueChange: ({ inputValue: e }) => {
50
+ b(e);
51
+ },
52
+ onIsOpenChange: () => {
53
+ x(!1), b("");
54
+ },
55
+ onHighlightedIndexChange: () => {
56
+ x(!0);
57
+ },
58
+ itemToString: (e) => e ? e.label : ""
59
+ }), n = ee(!1), J = te(
60
+ () => !c && !u.find((e) => e.label.toLowerCase().includes(m.toLowerCase())),
61
+ [m, u, c]
62
+ ), K = (e) => {
63
+ var N, R;
64
+ e.target.dataset.showFocusRing = "false", n.current = !1, (l == null ? void 0 : l.label.toLocaleLowerCase()) !== m.toLocaleLowerCase() && w(), d().onBlur && ((R = (N = d()).onBlur) == null || R.call(N, e));
65
+ }, I = J || !!C.error || s === "error";
66
+ return /* @__PURE__ */ g(B.Root, { open: S, children: [
67
+ /* @__PURE__ */ t(B.Anchor, { asChild: !0, children: /* @__PURE__ */ g("div", { ref: D, className: o.root, "data-status": I ? "error" : s, children: [
68
+ /* @__PURE__ */ t(
69
+ "input",
70
+ {
71
+ ...d({
72
+ "aria-label": "aria-label" in a ? a["aria-label"] : void 0
73
+ }),
74
+ "data-test-id": r,
75
+ placeholder: F,
76
+ className: o.input,
77
+ disabled: f,
78
+ onMouseDown: (e) => {
79
+ n.current = !0, e.currentTarget.dataset.showFocusRing = "false";
80
+ },
81
+ onFocus: (e) => {
82
+ n.current || (e.target.dataset.showFocusRing = "true");
83
+ },
84
+ onBlur: K
85
+ }
86
+ ),
87
+ V,
88
+ h ? /* @__PURE__ */ t(
89
+ X,
90
+ {
91
+ onClick: (e) => {
92
+ e.stopPropagation(), w();
93
+ },
94
+ className: o.clear,
95
+ role: "button",
96
+ children: h
97
+ }
98
+ ) : null,
99
+ C.isLoading && S ? /* @__PURE__ */ t(re, { name: "right", "data-test-id": `${r}-right-slot`, children: /* @__PURE__ */ t(oe, { size: "x-small", "data-test-id": `${r}-loading-circle` }) }) : null,
100
+ /* @__PURE__ */ g("div", { className: o.icons, children: [
101
+ /* @__PURE__ */ t(
102
+ "button",
103
+ {
104
+ "aria-label": H("Select_toggleMenu"),
105
+ ...E(),
106
+ type: "button",
107
+ disabled: f,
108
+ onMouseDown: () => {
109
+ n.current = !0;
110
+ },
111
+ children: /* @__PURE__ */ t(Q, { size: 16, className: o.caret })
112
+ }
113
+ ),
114
+ s === "success" ? /* @__PURE__ */ t(
115
+ U,
116
+ {
117
+ size: 16,
118
+ className: o.iconSuccess,
119
+ "data-test-id": `${r}-success-icon`
120
+ }
121
+ ) : null,
122
+ I ? /* @__PURE__ */ t(
123
+ W,
124
+ {
125
+ size: 16,
126
+ className: o.iconError,
127
+ "data-test-id": `${r}-error-icon`
128
+ }
129
+ ) : null
130
+ ] })
131
+ ] }) }),
132
+ /* @__PURE__ */ t(
133
+ le,
134
+ {
135
+ align: P,
136
+ side: k,
137
+ highlightedIndex: G,
138
+ filterText: T,
139
+ getMenuProps: _,
140
+ getItemProps: q,
141
+ selectedItem: l,
142
+ hasInteractedSinceOpening: j,
143
+ viewportCollisionPadding: z,
144
+ children: $
145
+ }
146
+ )
147
+ ] });
24
148
  };
149
+ L.displayName = "Select.Combobox";
150
+ const xe = Z(L);
25
151
  export {
26
- U as useControllableState
152
+ xe as ForwardedRefCombobox,
153
+ L as SelectCombobox
27
154
  };
28
155
  //# sourceMappingURL=fondue-components67.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components67.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 [value, setValue] = useState<TValue | undefined>(defaultProp);\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 [value, setValue] as const;\n};\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useMemo","setValue","useCallback","nextValue","useState","prevValueRef","useRef","useEffect"],"mappings":";AAeO,MAAMA,IAAuB,CAAS;AAAA,EACzC,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EAAC;AACtB,MAA0C;AACtC,QAAM,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,MAEpC;AACI,QAAAH,EAAoBQ,CAAS;AAAA,IAErC;AAAA,IACA,CAACN,GAAcN,GAAMI,GAAqBI,CAAY;AAAA,EAAA;AAG1D,SAAO,CAACD,GAAOG,CAAQ;AAC3B,GAEML,IAAuB,CAAS,EAAE,aAAAJ,GAAa,UAAAC,QAAiE;AAClH,QAAM,CAACK,GAAOG,CAAQ,IAAIG,EAA6BZ,CAAW,GAC5Da,IAAeC,EAAOR,CAAK,GAC3BC,IAAeC,EAAQ,MAAMP,GAAU,CAACA,CAAQ,CAAC;AAEvD,SAAAc,EAAU,MAAM;AACZ,IAAIF,EAAa,YAAYP,MACzBC,KAAA,QAAAA,EAAeD,IACfO,EAAa,UAAUP;AAAA,EAE/B,GAAG,CAACA,GAAOO,GAAcN,CAAY,CAAC,GAE/B,CAACD,GAAOG,CAAQ;AAC3B;"}
1
+ {"version":3,"file":"fondue-components67.js","sources":["../src/components/Select/Combobox.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown, IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useCombobox } from 'downshift';\nimport { forwardRef, useMemo, useRef, useState, type FocusEvent, type ForwardedRef, type ReactNode } from 'react';\n\nimport { LoadingCircle } from '#/components/LoadingCircle/LoadingCircle.tsx';\nimport { ForwardedRefSelectSlot } from '#/components/Select/SelectSlot.tsx';\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { useTranslation } from '#/hooks/useTranslation';\n\nimport { SelectMenu, type SelectMenuViewportCollisionPadding } from './SelectMenu';\nimport styles from './styles/select.module.scss';\nimport { type AsyncItemsFetcher, useSelectData } from './useSelectData';\n\nexport type ComboboxProps = {\n /**\n * Children of the Combobox component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string | null) => void;\n /**\n * The active value in the combobox component. This is used to control the combobox externally.\n */\n value?: string | null;\n /**\n * The default value of the combobox component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the combobox component.\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the combobox component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end' /**\n * Defines the preferred side of the combobox. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */;\n side?: 'left' | 'right' | 'bottom' | 'top';\n /**\n * Id of the combobox component\n */\n id?: string;\n /**\n * The data test id of the combobox component.\n */\n 'data-test-id'?: string;\n /**\n * Define the minimum distance between the select menu and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: SelectMenuViewportCollisionPadding;\n /**\n * Function to fetch items asynchronously.\n */\n getAsyncItems?: AsyncItemsFetcher;\n} & CommonAriaProps;\n\nexport const SelectCombobox = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n 'data-test-id': dataTestId = 'fondue-select-combobox',\n alignMenu = 'start',\n side = 'bottom',\n id,\n viewportCollisionPadding = 'compact',\n getAsyncItems,\n ...props\n }: ComboboxProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { t } = useTranslation();\n const { inputSlots, menuSlots, items, filterText, clearButton, getItemByValue, setFilterText, asyncItemStatus } =\n useSelectData(children, getAsyncItems);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const {\n getInputProps,\n getToggleButtonProps,\n getMenuProps,\n getItemProps,\n reset,\n selectedItem,\n isOpen,\n highlightedIndex,\n inputValue,\n } = useCombobox({\n items,\n selectedItem: getItemByValue(value),\n defaultSelectedItem: getItemByValue(defaultValue),\n defaultHighlightedIndex: 0,\n toggleButtonId: id,\n labelId: 'aria-labelledby' in props ? props['aria-labelledby'] : undefined,\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect?.(selectedItem?.value ?? null);\n },\n onInputValueChange: ({ inputValue }) => {\n setFilterText(inputValue);\n },\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n setFilterText('');\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n const wasClicked = useRef(false);\n\n const valueInvalid = useMemo(\n () => !getAsyncItems && !items.find((item) => item.label.toLowerCase().includes(inputValue.toLowerCase())),\n [inputValue, items, getAsyncItems],\n );\n\n const onBlurHandler = (blurEvent: FocusEvent<HTMLInputElement, Element>) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n\n const selectedItemNullOrOutdated = selectedItem?.label.toLocaleLowerCase() !== inputValue.toLocaleLowerCase();\n\n if (selectedItemNullOrOutdated) {\n // if there is no selection or\n // the existing selected value is not the same as the input value (old),\n // reset the input\n reset();\n }\n\n if (getInputProps().onBlur) {\n getInputProps().onBlur?.(blurEvent);\n }\n };\n const hasError = valueInvalid || !!asyncItemStatus.error || status === 'error';\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor asChild>\n <div ref={forwardedRef} className={styles.root} data-status={hasError ? 'error' : status}>\n <input\n {...getInputProps({\n 'aria-label': 'aria-label' in props ? props['aria-label'] : undefined,\n })}\n data-test-id={dataTestId}\n placeholder={placeholder}\n className={styles.input}\n disabled={disabled}\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={onBlurHandler}\n />\n {inputSlots}\n {clearButton ? (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n role=\"button\"\n >\n {clearButton}\n </RadixSlot>\n ) : null}\n {asyncItemStatus.isLoading && isOpen ? (\n <ForwardedRefSelectSlot name=\"right\" data-test-id={`${dataTestId}-right-slot`}>\n <LoadingCircle size=\"x-small\" data-test-id={`${dataTestId}-loading-circle`} />\n </ForwardedRefSelectSlot>\n ) : null}\n <div className={styles.icons}>\n <button\n aria-label={t('Select_toggleMenu')}\n {...getToggleButtonProps()}\n type=\"button\"\n disabled={disabled}\n onMouseDown={() => {\n wasClicked.current = true;\n }}\n >\n <IconCaretDown size={16} className={styles.caret} />\n </button>\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {hasError ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n side={side}\n highlightedIndex={highlightedIndex}\n filterText={filterText}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n viewportCollisionPadding={viewportCollisionPadding}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectCombobox.displayName = 'Select.Combobox';\n\nexport const ForwardedRefCombobox = forwardRef<HTMLDivElement, ComboboxProps>(SelectCombobox);\n"],"names":["SelectCombobox","children","onSelect","value","defaultValue","placeholder","status","disabled","dataTestId","alignMenu","side","id","viewportCollisionPadding","getAsyncItems","props","forwardedRef","t","useTranslation","inputSlots","menuSlots","items","filterText","clearButton","getItemByValue","setFilterText","asyncItemStatus","useSelectData","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getInputProps","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","inputValue","useCombobox","item","wasClicked","useRef","valueInvalid","useMemo","onBlurHandler","blurEvent","_b","_a","hasError","jsxs","RadixPopover","jsx","styles","mouseEvent","focusEvent","RadixSlot","event","ForwardedRefSelectSlot","LoadingCircle","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefCombobox","forwardRef"],"mappings":";;;;;;;;;;;;AA2EO,MAAMA,IAAiB,CAC1B;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,g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