twenty-ui 2.42.0 → 2.43.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 (212) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +11 -6
  3. package/dist/{AllIcons-DMeLF1LP.cjs → AllIcons-D_4JeQkX.cjs} +1 -1
  4. package/dist/{AllIcons-BkHLT6oe.js → AllIcons-Z8o0B2fy.js} +1 -1
  5. package/dist/{Avatar-C_TzSJBe.js → Avatar-BSHgTxt-.js} +2 -2
  6. package/dist/Avatar-DTNH6Ku7.cjs +1 -0
  7. package/dist/Input-CFXY05bj.cjs +1 -0
  8. package/dist/Input-DHfmRBq5.js +116 -0
  9. package/dist/{ListItem-D75aS69B.cjs → ListItem-2dHkY1NB.cjs} +1 -1
  10. package/dist/{ListItem-C08r49UJ.js → ListItem-D6DvFIbl.js} +3 -3
  11. package/dist/ListItem.module-CveFbY4M.cjs +1 -0
  12. package/dist/ListItem.module-DtIGiTDL.js +38 -0
  13. package/dist/{Loader-DbOLVUcK.js → Loader-X1LymYkw.js} +4 -4
  14. package/dist/Loader-Z6_7AA-x.cjs +1 -0
  15. package/dist/MenuSeparator-DJOspG7J.cjs +1 -0
  16. package/dist/MenuSeparator-dNx4JE6C.js +66 -0
  17. package/dist/{OverflowingTextWithTooltip-BXWJtb0f.js → OverflowingTextWithTooltip-CqEkoH6t.js} +1 -1
  18. package/dist/OverflowingTextWithTooltip-bn6EwWeq.cjs +1 -0
  19. package/dist/ResizeHandle-DN1bRxQb.js +89 -0
  20. package/dist/ResizeHandle-cll01qBQ.cjs +1 -0
  21. package/dist/TabsTabContent-BseLV1Wk.cjs +1 -0
  22. package/dist/TabsTabContent-_NCTxoP6.js +40 -0
  23. package/dist/components/code-editor/CodeEditor/CodeEditor.d.ts +1 -1
  24. package/dist/components/code-editor/CodeEditor/types/CodeEditorProps.d.ts +1 -0
  25. package/dist/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme.d.ts +1 -1
  26. package/dist/components/code-editor.cjs +1 -1
  27. package/dist/components/code-editor.mjs +54 -52
  28. package/dist/components/data-display/AvatarGroup/AvatarGroup.d.ts +1 -1
  29. package/dist/components/data-display/AvatarGroup/types/AvatarGroupProps.d.ts +3 -0
  30. package/dist/components/index.d.ts +15 -0
  31. package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -2
  32. package/dist/components/navigation/Dropdown/Dropdown.d.ts +21 -0
  33. package/dist/components/navigation/Dropdown/__stories__/DropdownNestedExample.d.ts +1 -0
  34. package/dist/components/navigation/Dropdown/__stories__/DropdownPagesExample.d.ts +1 -0
  35. package/dist/components/navigation/Dropdown/__stories__/DropdownPanelExample.d.ts +1 -0
  36. package/dist/components/navigation/Dropdown/__stories__/DropdownPickerExample.d.ts +4 -0
  37. package/dist/components/navigation/Dropdown/internal/DropdownActionItem.d.ts +2 -0
  38. package/dist/components/navigation/Dropdown/internal/DropdownBack.d.ts +2 -0
  39. package/dist/components/navigation/Dropdown/internal/DropdownClose.d.ts +2 -0
  40. package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +2 -0
  41. package/dist/components/navigation/Dropdown/internal/DropdownContext.d.ts +2 -0
  42. package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +37 -0
  43. package/dist/components/navigation/Dropdown/internal/DropdownEmpty.d.ts +2 -0
  44. package/dist/components/navigation/Dropdown/internal/DropdownFocusTarget.d.ts +6 -0
  45. package/dist/components/navigation/Dropdown/internal/DropdownHeader.d.ts +2 -0
  46. package/dist/components/navigation/Dropdown/internal/DropdownLoading.d.ts +2 -0
  47. package/dist/components/navigation/Dropdown/internal/DropdownNestedRootEffect.d.ts +6 -0
  48. package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +2 -0
  49. package/dist/components/navigation/Dropdown/internal/DropdownPage.d.ts +2 -0
  50. package/dist/components/navigation/Dropdown/internal/DropdownPageFocusEffect.d.ts +6 -0
  51. package/dist/components/navigation/Dropdown/internal/DropdownPageFocusRequest.d.ts +5 -0
  52. package/dist/components/navigation/Dropdown/internal/DropdownRoot.d.ts +4 -0
  53. package/dist/components/navigation/Dropdown/internal/DropdownSearch.d.ts +2 -0
  54. package/dist/components/navigation/Dropdown/internal/DropdownSearchTargetEffect.d.ts +5 -0
  55. package/dist/components/navigation/Dropdown/internal/DropdownSection.d.ts +2 -0
  56. package/dist/components/navigation/Dropdown/internal/DropdownSeparator.d.ts +2 -0
  57. package/dist/components/navigation/Dropdown/internal/DropdownSubmenu.d.ts +2 -0
  58. package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +2 -0
  59. package/dist/components/navigation/Dropdown/internal/DropdownTitle.d.ts +2 -0
  60. package/dist/components/navigation/Dropdown/internal/DropdownTrigger.d.ts +2 -0
  61. package/dist/components/navigation/Dropdown/internal/getDropdownFocusTarget.d.ts +8 -0
  62. package/dist/components/navigation/Dropdown/internal/getDropdownItemLabel.d.ts +1 -0
  63. package/dist/components/navigation/Dropdown/internal/getDropdownItems.d.ts +1 -0
  64. package/dist/components/navigation/Dropdown/internal/getDropdownSearchTarget.d.ts +1 -0
  65. package/dist/components/navigation/Dropdown/internal/getDropdownTrigger.d.ts +1 -0
  66. package/dist/components/navigation/Dropdown/internal/getNextDropdownItem.d.ts +7 -0
  67. package/dist/components/navigation/Dropdown/internal/isUnhandledModifierShortcut.d.ts +2 -0
  68. package/dist/components/navigation/Dropdown/internal/preventDismissingClickActivation.d.ts +1 -0
  69. package/dist/components/navigation/Dropdown/internal/useDropdownContext.d.ts +1 -0
  70. package/dist/components/navigation/Dropdown/internal/useDropdownItemFocus.d.ts +7 -0
  71. package/dist/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.d.ts +7 -0
  72. package/dist/components/navigation/Dropdown/types/DropdownActionItemProps.d.ts +10 -0
  73. package/dist/components/navigation/Dropdown/types/DropdownCloseProps.d.ts +4 -0
  74. package/dist/components/navigation/Dropdown/types/DropdownContentProps.d.ts +5 -0
  75. package/dist/components/navigation/Dropdown/types/DropdownHeaderProps.d.ts +2 -0
  76. package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -0
  77. package/dist/components/navigation/Dropdown/types/DropdownPageProps.d.ts +7 -0
  78. package/dist/components/navigation/Dropdown/types/DropdownRootProps.d.ts +11 -0
  79. package/dist/components/navigation/Dropdown/types/DropdownSearchProps.d.ts +4 -0
  80. package/dist/components/navigation/Dropdown/types/DropdownSectionProps.d.ts +5 -0
  81. package/dist/components/navigation/Dropdown/types/DropdownSubmenuProps.d.ts +2 -0
  82. package/dist/components/navigation/Dropdown/types/DropdownSubmenuTriggerProps.d.ts +6 -0
  83. package/dist/components/navigation/Dropdown/types/DropdownTitleProps.d.ts +2 -0
  84. package/dist/components/navigation/Dropdown/types/DropdownTriggerProps.d.ts +2 -0
  85. package/dist/components/navigation/Dropdown/types/DropdownType.d.ts +1 -0
  86. package/dist/components-BYWo2sUE.cjs +1 -0
  87. package/dist/components-C96xU59U.js +1996 -0
  88. package/dist/components.cjs +1 -1
  89. package/dist/components.mjs +40 -39
  90. package/dist/data-display-BQ9g9oSc.cjs +1 -0
  91. package/dist/{data-display-YQG01UPq.js → data-display-z9gKjkPS.js} +30 -30
  92. package/dist/icon/constants/TwentyIconDictionary.d.ts +9 -0
  93. package/dist/icon/providers/internal/AllIcons.d.ts +1 -1
  94. package/dist/{icon-CDy3-hqV.js → icon-Bd81r48z.js} +131 -117
  95. package/dist/icon-iD9IXJmn.cjs +1 -0
  96. package/dist/icon.cjs +1 -1
  97. package/dist/icon.mjs +1 -1
  98. package/dist/index.cjs +1 -1
  99. package/dist/index.d.ts +0 -1
  100. package/dist/index.mjs +554 -557
  101. package/dist/individual-entry.d.ts +0 -1
  102. package/dist/input-C8IiOA9Q.js +335 -0
  103. package/dist/input-NBD4DP8j.cjs +1 -0
  104. package/dist/{navigation-e5PTdnND.cjs → navigation-BqZBteC2.cjs} +1 -1
  105. package/dist/{navigation-Z7puI3wl.js → navigation-CLMgaqS8.js} +1 -1
  106. package/dist/primitives/data-display.cjs +1 -1
  107. package/dist/primitives/data-display.mjs +2 -2
  108. package/dist/primitives/feedback.cjs +1 -1
  109. package/dist/primitives/feedback.mjs +1 -1
  110. package/dist/primitives/input/ButtonGroup/internal/ButtonGroupContext.d.ts +1 -1
  111. package/dist/primitives/input/SegmentedControl/SegmentedControl.d.ts +2 -29
  112. package/dist/primitives/input/SegmentedControl/types/SegmentedControlOption.d.ts +13 -0
  113. package/dist/primitives/input/SegmentedControl/types/SegmentedControlProps.d.ts +10 -0
  114. package/dist/primitives/input/index.d.ts +2 -1
  115. package/dist/primitives/input.cjs +1 -1
  116. package/dist/primitives/input.mjs +12 -12
  117. package/dist/primitives/layout/ResizeHandle/ResizeHandle.d.ts +2 -9
  118. package/dist/primitives/layout/ResizeHandle/__stories__/ControlledResizeHandle.d.ts +2 -0
  119. package/dist/primitives/layout/ResizeHandle/__stories__/ResizableDemo.d.ts +3 -0
  120. package/dist/primitives/layout/ResizeHandle/__stories__/withMockPointerCapture.d.ts +4 -0
  121. package/dist/primitives/layout/ResizeHandle/internal/ResizeHandleDefaults.constant.d.ts +6 -0
  122. package/dist/primitives/layout/ResizeHandle/internal/useResizeHandleInteraction.d.ts +19 -0
  123. package/dist/primitives/layout/ResizeHandle/types/ResizeHandleProps.d.ts +11 -0
  124. package/dist/primitives/layout/index.d.ts +1 -1
  125. package/dist/primitives/layout.cjs +1 -1
  126. package/dist/primitives/layout.mjs +7 -8
  127. package/dist/primitives/navigation.cjs +1 -1
  128. package/dist/primitives/navigation.mjs +2 -2
  129. package/dist/primitives/surfaces/Card/Card.d.ts +17 -7
  130. package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +8 -0
  131. package/dist/primitives/surfaces/index.d.ts +0 -3
  132. package/dist/primitives/surfaces.cjs +1 -1
  133. package/dist/primitives/surfaces.mjs +8 -10
  134. package/dist/primitives/typography.cjs +1 -1
  135. package/dist/primitives/typography.mjs +1 -1
  136. package/dist/primitives.cjs +1 -1
  137. package/dist/primitives.mjs +59 -62
  138. package/dist/style.css +1 -1
  139. package/dist/surfaces-DX8oX1ou.js +254 -0
  140. package/dist/surfaces-uuLwsFxg.cjs +1 -0
  141. package/dist/testing/index.d.ts +1 -3
  142. package/dist/testing/utils/overrideMediaQueryMatches.d.ts +1 -0
  143. package/dist/testing.cjs +1 -1
  144. package/dist/testing.mjs +98 -102
  145. package/dist/theme/ThemeOverrides.d.ts +1 -0
  146. package/dist/theme/ThemeProvider.d.ts +3 -0
  147. package/dist/theme/ThemeProviderProps.d.ts +13 -0
  148. package/dist/{theme-constants → theme}/getNextThemeColor.d.ts +1 -1
  149. package/dist/theme/index.d.ts +10 -0
  150. package/dist/theme/internal/ThemeContextType.d.ts +6 -0
  151. package/dist/theme/internal/computeThemeFromCss.d.ts +2 -0
  152. package/dist/theme/internal/getThemeContext.d.ts +3 -0
  153. package/dist/theme/internal/getThemeScopeContext.d.ts +2 -0
  154. package/dist/theme/internal/resolveExplicitTheme.d.ts +5 -0
  155. package/dist/{theme-OwFrow8b.js → theme-DBro6iwF.js} +1198 -23
  156. package/dist/theme-DNG4OSBd.cjs +1 -0
  157. package/dist/theme.cjs +1 -1
  158. package/dist/theme.mjs +14 -7
  159. package/dist/utilities/color/utils/stringToThemeColorP3String.d.ts +1 -2
  160. package/dist/utilities/index.d.ts +3 -1
  161. package/dist/utilities/responsive/constants/MobileMediaQuery.d.ts +1 -0
  162. package/dist/utilities/responsive/constants/TouchDeviceMediaQuery.d.ts +1 -0
  163. package/dist/utilities/responsive/hooks/useMediaQuery.d.ts +1 -0
  164. package/dist/utilities/responsive/internal/getMediaQueryStore.d.ts +6 -0
  165. package/dist/utilities-BlvbRryv.cjs +1 -0
  166. package/dist/utilities-C5Tt2HLT.js +56 -0
  167. package/dist/utilities.cjs +1 -1
  168. package/dist/utilities.mjs +17 -15
  169. package/package.json +2 -16
  170. package/dist/Avatar-BGFK0_a_.cjs +0 -1
  171. package/dist/ListItem.module-CFDku7rI.cjs +0 -1
  172. package/dist/ListItem.module-DBhzbt9-.js +0 -38
  173. package/dist/Loader-CHKTYJo7.cjs +0 -1
  174. package/dist/OverflowingTextWithTooltip-DpizuDxR.cjs +0 -1
  175. package/dist/ResizeHandle-BWfY2ONo.js +0 -37
  176. package/dist/ResizeHandle-IVbYS3b8.cjs +0 -1
  177. package/dist/Switch-BvVP6vjR.js +0 -101
  178. package/dist/Switch-DuoJ4ytC.cjs +0 -1
  179. package/dist/TabsTabContent-BWQCg7Ua.js +0 -40
  180. package/dist/TabsTabContent-ChqlTk3P.cjs +0 -1
  181. package/dist/chunk-u_mIcLyS.cjs +0 -1
  182. package/dist/components-B2Pdf_yn.js +0 -1459
  183. package/dist/components-DfhgWbKW.cjs +0 -1
  184. package/dist/data-display-QOdhAohf.cjs +0 -1
  185. package/dist/icon-lF2kxwql.cjs +0 -1
  186. package/dist/input-C2q7tGPj.js +0 -383
  187. package/dist/input-CAX9aS7C.cjs +0 -1
  188. package/dist/primitives/layout/ResizeHandle/hooks/useResizeHandle.d.ts +0 -10
  189. package/dist/surfaces-Cr4lhCvZ.js +0 -306
  190. package/dist/surfaces-CuxI6145.cjs +0 -1
  191. package/dist/testing/decorators/ComponentWithRouterDecorator.d.ts +0 -9
  192. package/dist/testing/decorators/RouterDecorator.d.ts +0 -2
  193. package/dist/theme-YHfZnD2U.cjs +0 -1
  194. package/dist/theme-constants/ThemeProvider.d.ts +0 -15
  195. package/dist/theme-constants/ThemeScopeContext.d.ts +0 -1
  196. package/dist/theme-constants/index.d.ts +0 -10
  197. package/dist/theme-constants-CrrgAYWN.js +0 -1163
  198. package/dist/theme-constants-ZNgkgDE-.cjs +0 -1
  199. package/dist/theme-constants.cjs +0 -1
  200. package/dist/theme-constants.mjs +0 -12
  201. package/dist/utilities/screen-size/hooks/useScreenSize.d.ts +0 -4
  202. package/dist/utilities-D7Z6Uof8.cjs +0 -1
  203. package/dist/utilities-FXsKnNbt.js +0 -49
  204. /package/dist/primitives/surfaces/{CardContent → Card/internal}/CardContent.d.ts +0 -0
  205. /package/dist/primitives/surfaces/{CardFooter → Card/internal}/CardFooter.d.ts +0 -0
  206. /package/dist/primitives/surfaces/{CardHeader → Card/internal}/CardHeader.d.ts +0 -0
  207. /package/dist/{theme-constants/constants.d.ts → theme/constants/MobileViewport.d.ts} +0 -0
  208. /package/dist/{theme-constants → theme}/themeCssVariables.d.ts +0 -0
  209. /package/dist/{theme-constants → theme}/themeTypes.d.ts +0 -0
  210. /package/dist/{theme-constants → theme}/useTheme.d.ts +0 -0
  211. /package/dist/{theme-constants → theme}/useThemeColorScheme.d.ts +0 -0
  212. /package/dist/{theme-constants → theme}/useThemeContainer.d.ts +0 -0
@@ -0,0 +1,254 @@
1
+ import { t as H } from "./isDefined-fMi6eQ4r.js";
2
+ import { t as P } from "./theme-DBro6iwF.js";
3
+ import { t as p } from "./mergeClassNames-BHKm1BNi.js";
4
+ import { t as I } from "./ListItem-D6DvFIbl.js";
5
+ import { t as F } from "./Heading-DvxTKEaL.js";
6
+ import { i as b, n as x, r as O, t as S } from "./MenuSeparator-dNx4JE6C.js";
7
+ import { clsx as c } from "clsx";
8
+ import { jsx as t, jsxs as T } from "react/jsx-runtime";
9
+ import { isBoolean as y, isFunction as A } from "@sniptt/guards";
10
+ import { createContext as w, useContext as B } from "react";
11
+ import { useRender as g } from "@base-ui/react/use-render";
12
+ import { useDirection as R } from "@base-ui/react/direction-provider";
13
+ import { Menu as l } from "@base-ui/react/menu";
14
+ import { AlertDialog as u } from "@base-ui/react/alert-dialog";
15
+ import { Dialog as m } from "@base-ui/react/dialog";
16
+ var G = "_backdrop_19f4m_1", L = "_viewport_19f4m_12", $ = "_popup_19f4m_30", U = "_header_19f4m_79", j = "_body_19f4m_87", z = "_footer_19f4m_91", E = "_title_19f4m_102", V = "_description_19f4m_109", d = {
17
+ backdrop: G,
18
+ viewport: L,
19
+ popup: $,
20
+ header: U,
21
+ body: j,
22
+ footer: z,
23
+ title: E,
24
+ description: V
25
+ }, q = ({ render: e, ref: r, className: o, ...a }) => g({
26
+ render: e,
27
+ ref: r,
28
+ props: {
29
+ ...a,
30
+ className: c(d.body, o)
31
+ }
32
+ }), J = ({ className: e, ...r }) => /* @__PURE__ */ t(u.Description, {
33
+ ...r,
34
+ className: p(d.description, e)
35
+ }), K = ({ render: e, ref: r, className: o, ...a }) => g({
36
+ render: e,
37
+ ref: r,
38
+ props: {
39
+ ...a,
40
+ className: c(d.footer, o)
41
+ }
42
+ }), Q = ({ render: e, ref: r, className: o, ...a }) => g({
43
+ render: e,
44
+ ref: r,
45
+ props: {
46
+ ...a,
47
+ className: c(d.header, o)
48
+ }
49
+ }), W = ({ size: e = "md", container: r, keepMounted: o, className: a, ...i }) => {
50
+ const s = P(), n = R();
51
+ return /* @__PURE__ */ T(u.Portal, {
52
+ container: r === void 0 ? s ?? void 0 : r,
53
+ keepMounted: o,
54
+ children: [/* @__PURE__ */ t(u.Backdrop, { className: d.backdrop }), /* @__PURE__ */ t(u.Viewport, {
55
+ dir: n,
56
+ className: d.viewport,
57
+ children: /* @__PURE__ */ t(u.Popup, {
58
+ ...i,
59
+ "data-size": e,
60
+ className: p(d.popup, a)
61
+ })
62
+ })]
63
+ });
64
+ }, X = ({ className: e, ...r }) => /* @__PURE__ */ t(u.Title, {
65
+ ...r,
66
+ className: p(d.title, e)
67
+ }), Y = () => ({
68
+ Root: u.Root,
69
+ Trigger: u.Trigger,
70
+ Popup: W,
71
+ Title: X,
72
+ Description: J,
73
+ Close: u.Close,
74
+ Header: Q,
75
+ Body: q,
76
+ Footer: K
77
+ }), je = /* @__PURE__ */ Y(), Z = "_cardContent_10wri_1", ee = { cardContent: Z }, re = ({ children: e, className: r, divider: o, isClickable: a, hasHoverHighlight: i, ...s }) => /* @__PURE__ */ t("div", {
78
+ className: c(ee.cardContent, r),
79
+ "data-divider": o || void 0,
80
+ "data-clickable": a || void 0,
81
+ "data-hover-highlight": i || void 0,
82
+ ...s,
83
+ children: e
84
+ }), ae = "_cardFooter_15rlh_1", oe = { cardFooter: ae }, te = ({ children: e, className: r, divider: o, ...a }) => /* @__PURE__ */ t("div", {
85
+ className: c(oe.cardFooter, r),
86
+ "data-no-divider": o === !1 || void 0,
87
+ ...a,
88
+ children: e
89
+ }), ie = "_cardHeader_yrli2_1", de = { cardHeader: ie }, se = ({ children: e, className: r, ...o }) => /* @__PURE__ */ t("div", {
90
+ className: c(de.cardHeader, r),
91
+ ...o,
92
+ children: e
93
+ }), le = "_card_1cl8g_1", ne = { card: le }, me = ({ children: e, className: r, fullWidth: o, rounded: a, backgroundColor: i, style: s, ...n }) => /* @__PURE__ */ t("div", {
94
+ className: c(ne.card, r),
95
+ "data-full-width": o || void 0,
96
+ "data-rounded": a || void 0,
97
+ style: H(i) ? {
98
+ ...s,
99
+ "--card-background-color": i
100
+ } : s,
101
+ ...n,
102
+ children: e
103
+ }), ze = {
104
+ Root: me,
105
+ Header: se,
106
+ Content: re,
107
+ Footer: te
108
+ }, pe = ({ render: e, ref: r, className: o, ...a }) => g({
109
+ render: e,
110
+ ref: r,
111
+ props: {
112
+ ...a,
113
+ className: c(d.body, o)
114
+ }
115
+ }), ce = ({ className: e, ...r }) => /* @__PURE__ */ t(m.Description, {
116
+ ...r,
117
+ className: p(d.description, e)
118
+ }), ue = ({ render: e, ref: r, className: o, ...a }) => g({
119
+ render: e,
120
+ ref: r,
121
+ props: {
122
+ ...a,
123
+ className: c(d.footer, o)
124
+ }
125
+ }), ve = ({ render: e, ref: r, className: o, ...a }) => g({
126
+ render: e,
127
+ ref: r,
128
+ props: {
129
+ ...a,
130
+ className: c(d.header, o)
131
+ }
132
+ }), fe = ({ size: e = "md", container: r, keepMounted: o, backdrop: a = !0, viewportProps: i, className: s, ...n }) => {
133
+ const h = P(), v = R(), _ = y(a) ? {} : a;
134
+ return /* @__PURE__ */ T(m.Portal, {
135
+ container: r === void 0 ? h ?? void 0 : r,
136
+ keepMounted: o,
137
+ children: [a !== !1 && /* @__PURE__ */ t(m.Backdrop, {
138
+ ..._,
139
+ className: p(d.backdrop, _.className)
140
+ }), /* @__PURE__ */ t(m.Viewport, {
141
+ dir: v,
142
+ "data-backdrop-hidden": a === !1,
143
+ ...i,
144
+ className: p(d.viewport, i?.className),
145
+ children: /* @__PURE__ */ t(m.Popup, {
146
+ ...n,
147
+ "data-size": e,
148
+ className: p(d.popup, s)
149
+ })
150
+ })]
151
+ });
152
+ }, _e = "_title_9tadl_1", ge = { title: _e }, he = ({ level: e = 2, size: r = "lg", color: o = "primary", className: a, render: i, ...s }) => /* @__PURE__ */ t(m.Title, {
153
+ ...s,
154
+ className: p(ge.title, a),
155
+ render: /* @__PURE__ */ t(F, {
156
+ level: e,
157
+ size: r,
158
+ color: o,
159
+ render: i
160
+ })
161
+ }), Ee = {
162
+ createHandle: m.createHandle,
163
+ Root: m.Root,
164
+ Trigger: m.Trigger,
165
+ Popup: fe,
166
+ Title: he,
167
+ Description: ce,
168
+ Close: m.Close,
169
+ Header: ve,
170
+ Body: pe,
171
+ Footer: ue
172
+ }, C = ({ color: e = "neutral", startIcon: r, endIcon: o, description: a, descriptionPlacement: i, hotkeys: s, disabled: n = !1, children: h, render: v, ..._ }, N) => ({
173
+ ..._,
174
+ disabled: n,
175
+ render: (D, f) => /* @__PURE__ */ t(I, {
176
+ ...D,
177
+ render: A(v) ? (k) => v(k, f) : v,
178
+ color: e,
179
+ disabled: n,
180
+ startIcon: r,
181
+ endIcon: o,
182
+ description: a,
183
+ descriptionPlacement: i,
184
+ hotkeys: s,
185
+ ...N?.(f),
186
+ children: h
187
+ })
188
+ }), Ce = (e) => /* @__PURE__ */ t(l.CheckboxItem, { ...C(e, (r) => ({
189
+ indicator: "checkbox",
190
+ selected: r.checked
191
+ })) }), Ne = (e) => /* @__PURE__ */ t(l.Item, { ...C(e) }), M = w(!1), De = {
192
+ root: {
193
+ side: "bottom",
194
+ align: "start",
195
+ sideOffset: 8,
196
+ alignOffset: 0
197
+ },
198
+ submenu: {
199
+ side: "inline-end",
200
+ align: "start",
201
+ sideOffset: 0,
202
+ alignOffset: -4
203
+ }
204
+ }, be = ({ side: e, align: r, sideOffset: o, alignOffset: a, anchor: i, keepMounted: s, className: n, children: h, ...v }) => {
205
+ const _ = P(), { container: N = _ ?? void 0, ...D } = v, f = De[B(M) ? "submenu" : "root"];
206
+ return /* @__PURE__ */ t(l.Portal, {
207
+ container: N,
208
+ keepMounted: s,
209
+ children: /* @__PURE__ */ t(l.Positioner, {
210
+ side: e ?? f.side,
211
+ align: r ?? f.align,
212
+ sideOffset: o ?? f.sideOffset,
213
+ alignOffset: a ?? f.alignOffset,
214
+ anchor: i,
215
+ className: b.positioner,
216
+ children: /* @__PURE__ */ t(l.Popup, {
217
+ ...D,
218
+ className: p(b.popup, n),
219
+ children: h
220
+ })
221
+ })
222
+ });
223
+ }, Pe = ({ className: e, ...r }) => /* @__PURE__ */ t(l.RadioGroup, {
224
+ ...r,
225
+ className: p(b.group, e)
226
+ }), Te = (e) => /* @__PURE__ */ t(l.RadioItem, { ...C(e, (r) => ({
227
+ indicator: "check",
228
+ selected: r.checked
229
+ })) }), Re = ({ children: e, ...r }) => /* @__PURE__ */ t(M.Provider, {
230
+ value: !0,
231
+ children: /* @__PURE__ */ t(l.SubmenuRoot, {
232
+ ...r,
233
+ children: e
234
+ })
235
+ }), Me = (e) => /* @__PURE__ */ t(l.SubmenuTrigger, { ...C(e, () => ({ hasSubmenu: !0 })) }), Ve = {
236
+ Root: l.Root,
237
+ Trigger: l.Trigger,
238
+ Popup: be,
239
+ Item: Ne,
240
+ CheckboxItem: Ce,
241
+ RadioGroup: Pe,
242
+ RadioItem: Te,
243
+ Group: O,
244
+ GroupLabel: x,
245
+ Separator: S,
246
+ SubmenuRoot: Re,
247
+ SubmenuTrigger: Me
248
+ };
249
+ export {
250
+ je as i,
251
+ Ee as n,
252
+ ze as r,
253
+ Ve as t
254
+ };
@@ -0,0 +1 @@
1
+ const h=require("./theme-DNG4OSBd.cjs"),T=require("./isDefined-DS2Q42p5.cjs"),c=require("./mergeClassNames-BbJtXN2t.cjs"),A=require("./ListItem-2dHkY1NB.cjs"),O=require("./Heading-CQqDjovJ.cjs"),f=require("./MenuSeparator-DJOspG7J.cjs");let m=require("clsx"),t=require("react/jsx-runtime"),j=require("@sniptt/guards"),M=require("react"),D=require("@base-ui/react/use-render"),P=require("@base-ui/react/direction-provider"),n=require("@base-ui/react/menu"),_=require("@base-ui/react/alert-dialog"),u=require("@base-ui/react/dialog");var y="_backdrop_19f4m_1",H="_viewport_19f4m_12",I="_popup_19f4m_30",k="_header_19f4m_79",F="_body_19f4m_87",S="_footer_19f4m_91",w="_title_19f4m_102",B="_description_19f4m_109",s={backdrop:y,viewport:H,popup:I,header:k,body:F,footer:S,title:w,description:B},G=({render:e,ref:r,className:o,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,m.clsx)(s.body,o)}}),L=({className:e,...r})=>(0,t.jsx)(_.AlertDialog.Description,{...r,className:c.mergeClassNames(s.description,e)}),U=({render:e,ref:r,className:o,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,m.clsx)(s.footer,o)}}),z=({render:e,ref:r,className:o,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,m.clsx)(s.header,o)}}),E=({size:e="md",container:r,keepMounted:o,className:a,...i})=>{const l=h.useThemeContainer(),d=(0,P.useDirection)();return(0,t.jsxs)(_.AlertDialog.Portal,{container:r===void 0?l??void 0:r,keepMounted:o,children:[(0,t.jsx)(_.AlertDialog.Backdrop,{className:s.backdrop}),(0,t.jsx)(_.AlertDialog.Viewport,{dir:d,className:s.viewport,children:(0,t.jsx)(_.AlertDialog.Popup,{...i,"data-size":e,className:c.mergeClassNames(s.popup,a)})})]})},V=({className:e,...r})=>(0,t.jsx)(_.AlertDialog.Title,{...r,className:c.mergeClassNames(s.title,e)}),$=()=>({Root:_.AlertDialog.Root,Trigger:_.AlertDialog.Trigger,Popup:E,Title:V,Description:L,Close:_.AlertDialog.Close,Header:z,Body:G,Footer:U}),J=$(),K="_cardContent_10wri_1",Q={cardContent:K},W=({children:e,className:r,divider:o,isClickable:a,hasHoverHighlight:i,...l})=>(0,t.jsx)("div",{className:(0,m.clsx)(Q.cardContent,r),"data-divider":o||void 0,"data-clickable":a||void 0,"data-hover-highlight":i||void 0,...l,children:e}),X="_cardFooter_15rlh_1",Y={cardFooter:X},Z=({children:e,className:r,divider:o,...a})=>(0,t.jsx)("div",{className:(0,m.clsx)(Y.cardFooter,r),"data-no-divider":o===!1||void 0,...a,children:e}),ee="_cardHeader_yrli2_1",re={cardHeader:ee},ae=({children:e,className:r,...o})=>(0,t.jsx)("div",{className:(0,m.clsx)(re.cardHeader,r),...o,children:e}),oe="_card_1cl8g_1",te={card:oe},ie=({children:e,className:r,fullWidth:o,rounded:a,backgroundColor:i,style:l,...d})=>(0,t.jsx)("div",{className:(0,m.clsx)(te.card,r),"data-full-width":o||void 0,"data-rounded":a||void 0,style:T.isDefined(i)?{...l,"--card-background-color":i}:l,...d,children:e}),se={Root:ie,Header:ae,Content:W,Footer:Z},le=({render:e,ref:r,className:o,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,m.clsx)(s.body,o)}}),ne=({className:e,...r})=>(0,t.jsx)(u.Dialog.Description,{...r,className:c.mergeClassNames(s.description,e)}),de=({render:e,ref:r,className:o,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,m.clsx)(s.footer,o)}}),ue=({render:e,ref:r,className:o,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,m.clsx)(s.header,o)}}),ce=({size:e="md",container:r,keepMounted:o,backdrop:a=!0,viewportProps:i,className:l,...d})=>{const x=h.useThemeContainer(),g=(0,P.useDirection)(),v=(0,j.isBoolean)(a)?{}:a;return(0,t.jsxs)(u.Dialog.Portal,{container:r===void 0?x??void 0:r,keepMounted:o,children:[a!==!1&&(0,t.jsx)(u.Dialog.Backdrop,{...v,className:c.mergeClassNames(s.backdrop,v.className)}),(0,t.jsx)(u.Dialog.Viewport,{dir:g,"data-backdrop-hidden":a===!1,...i,className:c.mergeClassNames(s.viewport,i?.className),children:(0,t.jsx)(u.Dialog.Popup,{...d,"data-size":e,className:c.mergeClassNames(s.popup,l)})})]})},me="_title_9tadl_1",_e={title:me},ge=({level:e=2,size:r="lg",color:o="primary",className:a,render:i,...l})=>(0,t.jsx)(u.Dialog.Title,{...l,className:c.mergeClassNames(_e.title,a),render:(0,t.jsx)(O.Heading,{level:e,size:r,color:o,render:i})}),pe={createHandle:u.Dialog.createHandle,Root:u.Dialog.Root,Trigger:u.Dialog.Trigger,Popup:ce,Title:ge,Description:ne,Close:u.Dialog.Close,Header:ue,Body:le,Footer:de},C=({color:e="neutral",startIcon:r,endIcon:o,description:a,descriptionPlacement:i,hotkeys:l,disabled:d=!1,children:x,render:g,...v},N)=>({...v,disabled:d,render:(b,p)=>(0,t.jsx)(A.ListItem,{...b,render:(0,j.isFunction)(g)?q=>g(q,p):g,color:e,disabled:d,startIcon:r,endIcon:o,description:a,descriptionPlacement:i,hotkeys:l,...N?.(p),children:x})}),ve=e=>(0,t.jsx)(n.Menu.CheckboxItem,{...C(e,r=>({indicator:"checkbox",selected:r.checked}))}),fe=e=>(0,t.jsx)(n.Menu.Item,{...C(e)}),R=(0,M.createContext)(!1),De={root:{side:"bottom",align:"start",sideOffset:8,alignOffset:0},submenu:{side:"inline-end",align:"start",sideOffset:0,alignOffset:-4}},xe=({side:e,align:r,sideOffset:o,alignOffset:a,anchor:i,keepMounted:l,className:d,children:x,...g})=>{const v=h.useThemeContainer(),{container:N=v??void 0,...b}=g,p=De[(0,M.useContext)(R)?"submenu":"root"];return(0,t.jsx)(n.Menu.Portal,{container:N,keepMounted:l,children:(0,t.jsx)(n.Menu.Positioner,{side:e??p.side,align:r??p.align,sideOffset:o??p.sideOffset,alignOffset:a??p.alignOffset,anchor:i,className:f.Menu_module_default.positioner,children:(0,t.jsx)(n.Menu.Popup,{...b,className:c.mergeClassNames(f.Menu_module_default.popup,d),children:x})})})},Ce=({className:e,...r})=>(0,t.jsx)(n.Menu.RadioGroup,{...r,className:c.mergeClassNames(f.Menu_module_default.group,e)}),Ne=e=>(0,t.jsx)(n.Menu.RadioItem,{...C(e,r=>({indicator:"check",selected:r.checked}))}),be=({children:e,...r})=>(0,t.jsx)(R.Provider,{value:!0,children:(0,t.jsx)(n.Menu.SubmenuRoot,{...r,children:e})}),he=e=>(0,t.jsx)(n.Menu.SubmenuTrigger,{...C(e,()=>({hasSubmenu:!0}))}),je={Root:n.Menu.Root,Trigger:n.Menu.Trigger,Popup:xe,Item:fe,CheckboxItem:ve,RadioGroup:Ce,RadioItem:Ne,Group:f.MenuGroup,GroupLabel:f.MenuGroupLabel,Separator:f.MenuSeparator,SubmenuRoot:be,SubmenuTrigger:he};Object.defineProperty(exports,"AlertDialog",{enumerable:!0,get:function(){return J}});Object.defineProperty(exports,"Card",{enumerable:!0,get:function(){return se}});Object.defineProperty(exports,"Dialog",{enumerable:!0,get:function(){return pe}});Object.defineProperty(exports,"Menu",{enumerable:!0,get:function(){return je}});
@@ -3,8 +3,6 @@ export { ComponentStorybookLayout } from './ComponentStorybookLayout';
3
3
  export type { CatalogDimension, CatalogOptions, } from './decorators/CatalogDecorator';
4
4
  export { CatalogDecorator } from './decorators/CatalogDecorator';
5
5
  export { ComponentDecorator } from './decorators/ComponentDecorator';
6
- export type { RouteParams } from './decorators/ComponentWithRouterDecorator';
7
- export { isRouteParams, computeLocation, ComponentWithRouterDecorator, } from './decorators/ComponentWithRouterDecorator';
8
- export { RouterDecorator } from './decorators/RouterDecorator';
9
6
  export { AVATAR_URL_MOCK } from './mocks/avatarUrlMock';
10
7
  export type { CatalogStory } from './types/CatalogStory';
8
+ export { overrideMediaQueryMatches } from './utils/overrideMediaQueryMatches';
@@ -0,0 +1 @@
1
+ export declare const overrideMediaQueryMatches: (matchesByQuery: Partial<Record<string, boolean>>) => () => void;
package/dist/testing.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("./isDefined-DS2Q42p5.cjs"),_=require("./theme-constants-ZNgkgDE-.cjs");let T=require("clsx"),t=require("react/jsx-runtime"),v=require("@sniptt/guards"),n=require("react-router-dom");var w={test:"error",config:{rules:[{id:"color-contrast",enabled:!1}]}},y="_layout_17ld0_1",f={layout:y},h=({width:e,backgroundColor:r,height:A,children:o})=>(0,t.jsx)("div",{className:f.layout,style:{background:r,height:V.isDefined(A)?`${A}px`:"fit-content",minWidth:e?"unset":"300px",width:e?`${e}px`:"fit-content"},children:o}),D="_columnTitle_5dert_1",F="_rowsTitle_5dert_7",S="_rowTitle_5dert_15",k="_elementTitle_5dert_23",x="_container_5dert_32",N="_columnContainer_5dert_37",b="_rowsContainer_5dert_43",M="_rowContainer_5dert_49",I="_elementContainer_5dert_56",L="_cellContainer_5dert_60",a={columnTitle:D,rowsTitle:F,rowTitle:S,elementTitle:k,container:x,columnContainer:N,rowsContainer:b,rowContainer:M,elementContainer:I,cellContainer:L},u={name:"",values:[void 0],props:()=>({})},C=e=>(0,v.isString)(e)||(0,v.isNumber)(e),q=(e,r)=>{const{catalog:{dimensions:A=[],options:o={}}={dimensions:[],options:{}}}=r.parameters||{};if(!A||!Array.isArray(A))return(0,t.jsx)(e,{});const[s=u,i=u,R=u,p=u]=A;return(0,t.jsx)("div",{className:a.container,children:p.values.map((c,g)=>(0,t.jsxs)("div",{className:a.columnContainer,children:[(0,t.jsx)("div",{className:a.columnTitle,children:p.labels?.(c)??(C(c)?c:"")}),R.values.map((d,E)=>(0,t.jsxs)("div",{className:a.rowsContainer,children:[(0,t.jsx)("div",{className:a.rowsTitle,children:R.labels?.(d)??(C(d)?d:"")}),i.values.map((m,Q)=>(0,t.jsxs)("div",{className:a.rowContainer,children:[(0,t.jsx)("div",{className:a.rowTitle,children:i.labels?.(m)??(C(m)?m:"")}),s.values.map((l,B)=>(0,t.jsxs)("div",{className:a.cellContainer,id:A.length>1?`catalog-cell-${g}-${E}-${Q}-${B}`:l,children:[(0,t.jsx)("span",{className:a.elementTitle,children:s.labels?.(l)??(C(l)?l:"")}),(0,t.jsx)("div",{className:(0,T.clsx)(a.elementContainer,o?.elementContainer?.className),style:{minWidth:o?.elementContainer?.width?`${o.elementContainer.width}px`:"auto",...o?.elementContainer?.style},children:(0,t.jsx)(e,{args:{...r.args,...s.props(l),...i.props(m),...R.props(d),...p.props(c)}})})]},`d1-${B}`))]},`d2-${Q}`))]},`d3-${E}`))]},`d4-${g}`))})},W=(e,r)=>{if(e)switch(r){case"default":return _.themeCssVariables.grayScale.gray11;case"danger":return _.themeCssVariables.color.red;case"blue":return _.themeCssVariables.color.blue;default:return}},K=(e,r)=>{const{container:A}=r.parameters,o=r.args.inverted,s=r.args.accent,i=W(o,s);return(0,t.jsx)(h,{width:A?.width,height:A?.height,backgroundColor:i,children:(0,t.jsx)(e,{})})},U=e=>typeof e!="object"||e===null?!1:Object.keys(e).every(r=>typeof e[r]=="string"),j=(e,r)=>({pathname:e.replace(/:(\w+)/g,A=>r?.[A]??"")}),P=()=>(0,t.jsx)(h,{children:(0,t.jsx)(n.Outlet,{})}),O=({Story:e,args:r,initialEntries:A,initialIndex:o})=>(0,n.createMemoryRouter)((0,n.createRoutesFromElements)((0,t.jsx)(n.Route,{element:(0,t.jsx)(P,{}),children:(0,t.jsx)(n.Route,{path:r.routePath??"*",element:(0,t.jsx)(e,{})})})),{initialEntries:A,initialIndex:o}),Y=(e,{args:r})=>(0,t.jsx)(n.RouterProvider,{useTransitions:!1,router:O({Story:e,args:r,initialEntries:r.routePath&&typeof r.routePath=="string"&&(r.routeParams===void 0||U(r.routeParams))?[j(r.routePath,r.routeParams)]:[{pathname:"/"}]})}),J=e=>(0,t.jsx)(n.MemoryRouter,{children:(0,t.jsx)(e,{})}),X="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAYABgAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABgAAAAAQAAAGAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABSgAwAEAAAAAQAAABQAAAAA/8AAEQgAFAAUAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMACwgICggHCwoJCg0MCw0RHBIRDw8RIhkaFBwpJCsqKCQnJy0yQDctMD0wJyc4TDk9Q0VISUgrNk9VTkZUQEdIRf/bAEMBDA0NEQ8RIRISIUUuJy5FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRf/dAAQAAv/aAAwDAQACEQMRAD8Ava1q728otYY98joSCTgZrnbXWdTtrhrfVZXWLafmcAEkdgR/hVltQku9Q8+OIEBcGOT+ID0PY1ka1KH2u8ToqnPLbmIqG7u6LtbQ7RXBRec4Uck9eKXcPWsKDWVnhWSL5kYcFelSf2m3901POh8jP//QoyIAnTuKpXsY82NsksUyWPU5q/L9z8RVK++/F/uCsVsaEURwgA4HtT9x9TUcf3KfUGh//9k=";exports.A11Y_DEFER_COLOR_CONTRAST=w;exports.AVATAR_URL_MOCK=X;exports.CatalogDecorator=q;exports.ComponentDecorator=K;exports.ComponentStorybookLayout=h;exports.ComponentWithRouterDecorator=Y;exports.RouterDecorator=J;exports.computeLocation=j;exports.isRouteParams=U;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./theme-DNG4OSBd.cjs"),B=require("./isDefined-DS2Q42p5.cjs");let v=require("clsx"),A=require("react/jsx-runtime"),_=require("@sniptt/guards");var U={test:"error",config:{rules:[{id:"color-contrast",enabled:!1}]}},V="_layout_17ld0_1",T={layout:V},w=({width:e,backgroundColor:r,height:t,children:a})=>(0,A.jsx)("div",{className:T.layout,style:{background:r,height:B.isDefined(t)?`${t}px`:"fit-content",minWidth:e?"unset":"300px",width:e?`${e}px`:"fit-content"},children:a}),j="_columnTitle_5dert_1",M="_rowsTitle_5dert_7",y="_rowTitle_5dert_15",F="_elementTitle_5dert_23",S="_container_5dert_32",b="_columnContainer_5dert_37",f="_rowsContainer_5dert_43",N="_rowContainer_5dert_49",k="_elementContainer_5dert_56",D="_cellContainer_5dert_60",n={columnTitle:j,rowsTitle:M,rowTitle:y,elementTitle:F,container:S,columnContainer:b,rowsContainer:f,rowContainer:N,elementContainer:k,cellContainer:D},m={name:"",values:[void 0],props:()=>({})},C=e=>(0,_.isString)(e)||(0,_.isNumber)(e),L=(e,r)=>{const{catalog:{dimensions:t=[],options:a={}}={dimensions:[],options:{}}}=r.parameters||{};if(!t||!Array.isArray(t))return(0,A.jsx)(e,{});const[o=m,i=m,u=m,g=m]=t;return(0,A.jsx)("div",{className:n.container,children:g.values.map((l,R)=>(0,A.jsxs)("div",{className:n.columnContainer,children:[(0,A.jsx)("div",{className:n.columnTitle,children:g.labels?.(l)??(C(l)?l:"")}),u.values.map((c,Q)=>(0,A.jsxs)("div",{className:n.rowsContainer,children:[(0,A.jsx)("div",{className:n.rowsTitle,children:u.labels?.(c)??(C(c)?c:"")}),i.values.map((d,p)=>(0,A.jsxs)("div",{className:n.rowContainer,children:[(0,A.jsx)("div",{className:n.rowTitle,children:i.labels?.(d)??(C(d)?d:"")}),o.values.map((s,E)=>(0,A.jsxs)("div",{className:n.cellContainer,id:t.length>1?`catalog-cell-${R}-${Q}-${p}-${E}`:s,children:[(0,A.jsx)("span",{className:n.elementTitle,children:o.labels?.(s)??(C(s)?s:"")}),(0,A.jsx)("div",{className:(0,v.clsx)(n.elementContainer,a?.elementContainer?.className),style:{minWidth:a?.elementContainer?.width?`${a.elementContainer.width}px`:"auto",...a?.elementContainer?.style},children:(0,A.jsx)(e,{args:{...r.args,...o.props(s),...i.props(d),...u.props(c),...g.props(l)}})})]},`d1-${E}`))]},`d2-${p}`))]},`d3-${Q}`))]},`d4-${R}`))})},I=(e,r)=>{if(e)switch(r){case"default":return h.themeCssVariables.grayScale.gray11;case"danger":return h.themeCssVariables.color.red;case"blue":return h.themeCssVariables.color.blue;default:return}},K=(e,r)=>{const{container:t}=r.parameters,a=r.args.inverted,o=r.args.accent,i=I(a,o);return(0,A.jsx)(w,{width:t?.width,height:t?.height,backgroundColor:i,children:(0,A.jsx)(e,{})})},x="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAYABgAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABgAAAAAQAAAGAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABSgAwAEAAAAAQAAABQAAAAA/8AAEQgAFAAUAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMACwgICggHCwoJCg0MCw0RHBIRDw8RIhkaFBwpJCsqKCQnJy0yQDctMD0wJyc4TDk9Q0VISUgrNk9VTkZUQEdIRf/bAEMBDA0NEQ8RIRISIUUuJy5FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRf/dAAQAAv/aAAwDAQACEQMRAD8Ava1q728otYY98joSCTgZrnbXWdTtrhrfVZXWLafmcAEkdgR/hVltQku9Q8+OIEBcGOT+ID0PY1ka1KH2u8ToqnPLbmIqG7u6LtbQ7RXBRec4Uck9eKXcPWsKDWVnhWSL5kYcFelSf2m3901POh8jP//QoyIAnTuKpXsY82NsksUyWPU5q/L9z8RVK++/F/uCsVsaEURwgA4HtT9x9TUcf3KfUGh//9k=",O=e=>Object.assign(new EventTarget,{media:e,matches:!1,onchange:null,addListener:()=>{},removeListener:()=>{}}),W=e=>{const r=window.matchMedia;return window.matchMedia=t=>{const a=(0,_.isFunction)(r)?r.call(window,t):O(t),o=e[t];return B.isDefined(o)&&Object.defineProperty(a,"matches",{value:o}),a},()=>{window.matchMedia=r}};exports.A11Y_DEFER_COLOR_CONTRAST=U;exports.AVATAR_URL_MOCK=x;exports.CatalogDecorator=L;exports.ComponentDecorator=K;exports.ComponentStorybookLayout=w;exports.overrideMediaQueryMatches=W;
package/dist/testing.mjs CHANGED
@@ -1,133 +1,129 @@
1
- import { t as U } from "./isDefined-fMi6eQ4r.js";
2
- import { s as h } from "./theme-constants-CrrgAYWN.js";
3
- import { clsx as V } from "clsx";
4
- import { jsx as A, jsxs as d } from "react/jsx-runtime";
5
- import { isNumber as f, isString as w } from "@sniptt/guards";
6
- import { MemoryRouter as T, Outlet as y, Route as v, RouterProvider as F, createMemoryRouter as k, createRoutesFromElements as N } from "react-router-dom";
7
- var Ae = {
1
+ import { t as w } from "./isDefined-fMi6eQ4r.js";
2
+ import { a as Q } from "./theme-DBro6iwF.js";
3
+ import { clsx as _ } from "clsx";
4
+ import { jsx as a, jsxs as m } from "react/jsx-runtime";
5
+ import { isFunction as U, isNumber as v, isString as V } from "@sniptt/guards";
6
+ var q = {
8
7
  test: "error",
9
8
  config: { rules: [{
10
9
  id: "color-contrast",
11
10
  enabled: !1
12
11
  }] }
13
- }, S = "_layout_17ld0_1", D = { layout: S }, _ = ({ width: e, backgroundColor: r, height: t, children: o }) => /* @__PURE__ */ A("div", {
14
- className: D.layout,
12
+ }, T = "_layout_17ld0_1", f = { layout: T }, F = ({ width: e, backgroundColor: A, height: r, children: t }) => /* @__PURE__ */ a("div", {
13
+ className: f.layout,
15
14
  style: {
16
- background: r,
17
- height: U(t) ? `${t}px` : "fit-content",
15
+ background: A,
16
+ height: w(r) ? `${r}px` : "fit-content",
18
17
  minWidth: e ? "unset" : "300px",
19
18
  width: e ? `${e}px` : "fit-content"
20
19
  },
21
- children: o
22
- }), I = "_columnTitle_5dert_1", b = "_rowsTitle_5dert_7", M = "_rowTitle_5dert_15", W = "_elementTitle_5dert_23", K = "_container_5dert_32", L = "_columnContainer_5dert_37", P = "_rowsContainer_5dert_43", Y = "_rowContainer_5dert_49", J = "_elementContainer_5dert_56", j = "_cellContainer_5dert_60", a = {
23
- columnTitle: I,
24
- rowsTitle: b,
25
- rowTitle: M,
26
- elementTitle: W,
27
- container: K,
28
- columnContainer: L,
29
- rowsContainer: P,
30
- rowContainer: Y,
31
- elementContainer: J,
32
- cellContainer: j
33
- }, u = {
20
+ children: t
21
+ }), M = "_columnTitle_5dert_1", N = "_rowsTitle_5dert_7", k = "_rowTitle_5dert_15", y = "_elementTitle_5dert_23", S = "_container_5dert_32", b = "_columnContainer_5dert_37", D = "_rowsContainer_5dert_43", I = "_rowContainer_5dert_49", L = "_elementContainer_5dert_56", K = "_cellContainer_5dert_60", n = {
22
+ columnTitle: M,
23
+ rowsTitle: N,
24
+ rowTitle: k,
25
+ elementTitle: y,
26
+ container: S,
27
+ columnContainer: b,
28
+ rowsContainer: D,
29
+ rowContainer: I,
30
+ elementContainer: L,
31
+ cellContainer: K
32
+ }, C = {
34
33
  name: "",
35
34
  values: [void 0],
36
35
  props: () => ({})
37
- }, p = (e) => w(e) || f(e), te = (e, r) => {
38
- const { catalog: { dimensions: t = [], options: o = {} } = {
36
+ }, g = (e) => V(e) || v(e), G = (e, A) => {
37
+ const { catalog: { dimensions: r = [], options: t = {} } = {
39
38
  dimensions: [],
40
39
  options: {}
41
- } } = r.parameters || {};
42
- if (!t || !Array.isArray(t)) return /* @__PURE__ */ A(e, {});
43
- const [n = u, i = u, C = u, R = u] = t;
44
- return /* @__PURE__ */ A("div", {
45
- className: a.container,
46
- children: R.values.map((l, g) => /* @__PURE__ */ d("div", {
47
- className: a.columnContainer,
48
- children: [/* @__PURE__ */ A("div", {
49
- className: a.columnTitle,
50
- children: R.labels?.(l) ?? (p(l) ? l : "")
51
- }), C.values.map((c, E) => /* @__PURE__ */ d("div", {
52
- className: a.rowsContainer,
53
- children: [/* @__PURE__ */ A("div", {
54
- className: a.rowsTitle,
55
- children: C.labels?.(c) ?? (p(c) ? c : "")
56
- }), i.values.map((m, Q) => /* @__PURE__ */ d("div", {
57
- className: a.rowContainer,
58
- children: [/* @__PURE__ */ A("div", {
59
- className: a.rowTitle,
60
- children: i.labels?.(m) ?? (p(m) ? m : "")
61
- }), n.values.map((s, B) => /* @__PURE__ */ d("div", {
62
- className: a.cellContainer,
63
- id: t.length > 1 ? `catalog-cell-${g}-${E}-${Q}-${B}` : s,
64
- children: [/* @__PURE__ */ A("span", {
65
- className: a.elementTitle,
66
- children: n.labels?.(s) ?? (p(s) ? s : "")
67
- }), /* @__PURE__ */ A("div", {
68
- className: V(a.elementContainer, o?.elementContainer?.className),
40
+ } } = A.parameters || {};
41
+ if (!r || !Array.isArray(r)) return /* @__PURE__ */ a(e, {});
42
+ const [o = C, i = C, h = C, p = C] = r;
43
+ return /* @__PURE__ */ a("div", {
44
+ className: n.container,
45
+ children: p.values.map((l, R) => /* @__PURE__ */ m("div", {
46
+ className: n.columnContainer,
47
+ children: [/* @__PURE__ */ a("div", {
48
+ className: n.columnTitle,
49
+ children: p.labels?.(l) ?? (g(l) ? l : "")
50
+ }), h.values.map((c, u) => /* @__PURE__ */ m("div", {
51
+ className: n.rowsContainer,
52
+ children: [/* @__PURE__ */ a("div", {
53
+ className: n.rowsTitle,
54
+ children: h.labels?.(c) ?? (g(c) ? c : "")
55
+ }), i.values.map((d, E) => /* @__PURE__ */ m("div", {
56
+ className: n.rowContainer,
57
+ children: [/* @__PURE__ */ a("div", {
58
+ className: n.rowTitle,
59
+ children: i.labels?.(d) ?? (g(d) ? d : "")
60
+ }), o.values.map((s, B) => /* @__PURE__ */ m("div", {
61
+ className: n.cellContainer,
62
+ id: r.length > 1 ? `catalog-cell-${R}-${u}-${E}-${B}` : s,
63
+ children: [/* @__PURE__ */ a("span", {
64
+ className: n.elementTitle,
65
+ children: o.labels?.(s) ?? (g(s) ? s : "")
66
+ }), /* @__PURE__ */ a("div", {
67
+ className: _(n.elementContainer, t?.elementContainer?.className),
69
68
  style: {
70
- minWidth: o?.elementContainer?.width ? `${o.elementContainer.width}px` : "auto",
71
- ...o?.elementContainer?.style
69
+ minWidth: t?.elementContainer?.width ? `${t.elementContainer.width}px` : "auto",
70
+ ...t?.elementContainer?.style
72
71
  },
73
- children: /* @__PURE__ */ A(e, { args: {
74
- ...r.args,
75
- ...n.props(s),
76
- ...i.props(m),
77
- ...C.props(c),
78
- ...R.props(l)
72
+ children: /* @__PURE__ */ a(e, { args: {
73
+ ...A.args,
74
+ ...o.props(s),
75
+ ...i.props(d),
76
+ ...h.props(c),
77
+ ...p.props(l)
79
78
  } })
80
79
  })]
81
80
  }, `d1-${B}`))]
82
- }, `d2-${Q}`))]
83
- }, `d3-${E}`))]
84
- }, `d4-${g}`))
81
+ }, `d2-${E}`))]
82
+ }, `d3-${u}`))]
83
+ }, `d4-${R}`))
85
84
  });
86
- }, X = (e, r) => {
85
+ }, W = (e, A) => {
87
86
  if (e)
88
- switch (r) {
87
+ switch (A) {
89
88
  case "default":
90
- return h.grayScale.gray11;
89
+ return Q.grayScale.gray11;
91
90
  case "danger":
92
- return h.color.red;
91
+ return Q.color.red;
93
92
  case "blue":
94
- return h.color.blue;
93
+ return Q.color.blue;
95
94
  default:
96
95
  return;
97
96
  }
98
- }, oe = (e, r) => {
99
- const { container: t } = r.parameters, o = r.args.inverted, n = r.args.accent, i = X(o, n);
100
- return /* @__PURE__ */ A(_, {
101
- width: t?.width,
102
- height: t?.height,
97
+ }, H = (e, A) => {
98
+ const { container: r } = A.parameters, t = A.args.inverted, o = A.args.accent, i = W(t, o);
99
+ return /* @__PURE__ */ a(F, {
100
+ width: r?.width,
101
+ height: r?.height,
103
102
  backgroundColor: i,
104
- children: /* @__PURE__ */ A(e, {})
103
+ children: /* @__PURE__ */ a(e, {})
105
104
  });
106
- }, O = (e) => typeof e != "object" || e === null ? !1 : Object.keys(e).every((r) => typeof e[r] == "string"), Z = (e, r) => ({ pathname: e.replace(/:(\w+)/g, (t) => r?.[t] ?? "") }), q = () => /* @__PURE__ */ A(_, { children: /* @__PURE__ */ A(y, {}) }), G = ({ Story: e, args: r, initialEntries: t, initialIndex: o }) => k(N(/* @__PURE__ */ A(v, {
107
- element: /* @__PURE__ */ A(q, {}),
108
- children: /* @__PURE__ */ A(v, {
109
- path: r.routePath ?? "*",
110
- element: /* @__PURE__ */ A(e, {})
111
- })
112
- })), {
113
- initialEntries: t,
114
- initialIndex: o
115
- }), ae = (e, { args: r }) => /* @__PURE__ */ A(F, {
116
- useTransitions: !1,
117
- router: G({
118
- Story: e,
119
- args: r,
120
- initialEntries: r.routePath && typeof r.routePath == "string" && (r.routeParams === void 0 || O(r.routeParams)) ? [Z(r.routePath, r.routeParams)] : [{ pathname: "/" }]
121
- })
122
- }), ne = (e) => /* @__PURE__ */ A(T, { children: /* @__PURE__ */ A(e, {}) }), ie = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAYABgAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABgAAAAAQAAAGAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABSgAwAEAAAAAQAAABQAAAAA/8AAEQgAFAAUAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMACwgICggHCwoJCg0MCw0RHBIRDw8RIhkaFBwpJCsqKCQnJy0yQDctMD0wJyc4TDk9Q0VISUgrNk9VTkZUQEdIRf/bAEMBDA0NEQ8RIRISIUUuJy5FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRf/dAAQAAv/aAAwDAQACEQMRAD8Ava1q728otYY98joSCTgZrnbXWdTtrhrfVZXWLafmcAEkdgR/hVltQku9Q8+OIEBcGOT+ID0PY1ka1KH2u8ToqnPLbmIqG7u6LtbQ7RXBRec4Uck9eKXcPWsKDWVnhWSL5kYcFelSf2m3901POh8jP//QoyIAnTuKpXsY82NsksUyWPU5q/L9z8RVK++/F/uCsVsaEURwgA4HtT9x9TUcf3KfUGh//9k=";
105
+ }, $ = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAYABgAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABgAAAAAQAAAGAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABSgAwAEAAAAAQAAABQAAAAA/8AAEQgAFAAUAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMACwgICggHCwoJCg0MCw0RHBIRDw8RIhkaFBwpJCsqKCQnJy0yQDctMD0wJyc4TDk9Q0VISUgrNk9VTkZUQEdIRf/bAEMBDA0NEQ8RIRISIUUuJy5FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRf/dAAQAAv/aAAwDAQACEQMRAD8Ava1q728otYY98joSCTgZrnbXWdTtrhrfVZXWLafmcAEkdgR/hVltQku9Q8+OIEBcGOT+ID0PY1ka1KH2u8ToqnPLbmIqG7u6LtbQ7RXBRec4Uck9eKXcPWsKDWVnhWSL5kYcFelSf2m3901POh8jP//QoyIAnTuKpXsY82NsksUyWPU5q/L9z8RVK++/F/uCsVsaEURwgA4HtT9x9TUcf3KfUGh//9k=", j = (e) => Object.assign(new EventTarget(), {
106
+ media: e,
107
+ matches: !1,
108
+ onchange: null,
109
+ addListener: () => {
110
+ },
111
+ removeListener: () => {
112
+ }
113
+ }), P = (e) => {
114
+ const A = window.matchMedia;
115
+ return window.matchMedia = (r) => {
116
+ const t = U(A) ? A.call(window, r) : j(r), o = e[r];
117
+ return w(o) && Object.defineProperty(t, "matches", { value: o }), t;
118
+ }, () => {
119
+ window.matchMedia = A;
120
+ };
121
+ };
123
122
  export {
124
- Ae as A11Y_DEFER_COLOR_CONTRAST,
125
- ie as AVATAR_URL_MOCK,
126
- te as CatalogDecorator,
127
- oe as ComponentDecorator,
128
- _ as ComponentStorybookLayout,
129
- ae as ComponentWithRouterDecorator,
130
- ne as RouterDecorator,
131
- Z as computeLocation,
132
- O as isRouteParams
123
+ q as A11Y_DEFER_COLOR_CONTRAST,
124
+ $ as AVATAR_URL_MOCK,
125
+ G as CatalogDecorator,
126
+ H as ComponentDecorator,
127
+ F as ComponentStorybookLayout,
128
+ P as overrideMediaQueryMatches
133
129
  };
@@ -0,0 +1 @@
1
+ export type ThemeOverrides = Record<string, string | number>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { ThemeProviderProps } from './ThemeProviderProps';
3
+ export declare const ThemeProvider: ({ children, colorScheme, applyToRoot, overrides, className, scale, theme: providedTheme, }: ThemeProviderProps) => React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { THEME_LIGHT } from './constants/ThemeLight';
3
+ import { ThemeOverrides } from './ThemeOverrides';
4
+ import { ThemeType } from './themeTypes';
5
+ export type ThemeProviderProps = {
6
+ children: ReactNode;
7
+ colorScheme: 'light' | 'dark';
8
+ applyToRoot?: boolean;
9
+ overrides?: ThemeOverrides;
10
+ className?: string;
11
+ scale?: number;
12
+ theme?: ThemeType | typeof THEME_LIGHT;
13
+ };
@@ -1,2 +1,2 @@
1
- import { ThemeColor } from '../theme/constants/MainColorNames';
1
+ import { ThemeColor } from './constants/MainColorNames';
2
2
  export declare const getNextThemeColor: (colorNames: ThemeColor[], currentColor?: ThemeColor) => ThemeColor;
@@ -5,7 +5,17 @@ export { GRAY_SCALE_DARK } from './constants/GrayScaleDark';
5
5
  export { GRAY_SCALE_LIGHT } from './constants/GrayScaleLight';
6
6
  export type { ThemeColor } from './constants/MainColorNames';
7
7
  export { MAIN_COLOR_NAMES } from './constants/MainColorNames';
8
+ export { MOBILE_VIEWPORT } from './constants/MobileViewport';
8
9
  export { RGBA } from './constants/Rgba';
9
10
  export { THEME_COMMON } from './constants/ThemeCommon';
10
11
  export { THEME_DARK } from './constants/ThemeDark';
11
12
  export { THEME_LIGHT } from './constants/ThemeLight';
13
+ export { getNextThemeColor } from './getNextThemeColor';
14
+ export { themeCssVariables } from './themeCssVariables';
15
+ export type { ThemeOverrides } from './ThemeOverrides';
16
+ export { ThemeProvider } from './ThemeProvider';
17
+ export type { ThemeProviderProps } from './ThemeProviderProps';
18
+ export type { ThemeType } from './themeTypes';
19
+ export { useTheme } from './useTheme';
20
+ export { useThemeColorScheme } from './useThemeColorScheme';
21
+ export { useThemeContainer } from './useThemeContainer';
@@ -0,0 +1,6 @@
1
+ import { ThemeType } from '../themeTypes';
2
+ export type ThemeContextType = {
3
+ theme: ThemeType;
4
+ colorScheme: 'light' | 'dark';
5
+ explicitTheme?: ThemeType;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { ThemeType } from '../themeTypes';
2
+ export declare const computeThemeFromCss: (sourceElement?: HTMLElement) => ThemeType;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { ThemeContextType } from './ThemeContextType';
3
+ export declare const getThemeContext: () => React.Context<ThemeContextType>;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const getThemeScopeContext: () => React.Context<HTMLElement | null>;
@@ -0,0 +1,5 @@
1
+ import { THEME_LIGHT } from '../constants/ThemeLight';
2
+ import { ThemeType } from '../themeTypes';
3
+ type StaticTheme = typeof THEME_LIGHT;
4
+ export declare const resolveExplicitTheme: (theme: ThemeType | StaticTheme) => ThemeType;
5
+ export {};