@mintlify/components 1.0.5 → 1.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"expandable.d.ts","sourceRoot":"","sources":["../../../src/components/expandable/expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAWf,KAAK,eAAe,GAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,UAAU,GAAI,6KAejB,eAAe,4CA8HjB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"expandable.d.ts","sourceRoot":"","sources":["../../../src/components/expandable/expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAWf,KAAK,eAAe,GAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,UAAU,GAAI,6KAejB,eAAe,4CAgIjB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -1,72 +1,72 @@
1
1
  import { jsxs as p, jsx as x } from "react/jsx-runtime";
2
- import { useState as u, useLayoutEffect as j, useEffect as B, useId as z } from "react";
2
+ import { useState as u, useLayoutEffect as j, useEffect as z, useId as B } from "react";
3
3
  import { Classes as H } from "../../constants/selectors.js";
4
4
  import { useExpandableMemory as I } from "../../hooks/use-expandable-memory.js";
5
- import { cn as r } from "../../utils/cn.js";
5
+ import { cn as s } from "../../utils/cn.js";
6
6
  import { Icon as G } from "../icon/icon.js";
7
- const N = "expandable-content", J = "Hide", K = "Show", Q = "child attributes", P = ({
8
- title: n = Q,
9
- defaultOpen: o = !1,
7
+ const v = "expandable-content", J = "Hide", K = "Show", Q = "child attributes", P = ({
8
+ title: o = Q,
9
+ defaultOpen: n = !1,
10
10
  onChange: b,
11
- lazy: T,
12
- className: L,
13
- children: v,
14
- uniqueParamId: s,
11
+ lazy: N,
12
+ className: T,
13
+ children: L,
14
+ uniqueParamId: r,
15
15
  onMount: a,
16
16
  onOpen: d,
17
- onClose: c,
18
- openedText: _ = J,
19
- closedText: k = K,
20
- hasScrolledToAnchorRef: i,
17
+ onClose: i,
18
+ openedText: S = J,
19
+ closedText: _ = K,
20
+ hasScrolledToAnchorRef: c,
21
21
  anchor: l
22
22
  }) => {
23
- const f = !!s, {
24
- ref: D,
25
- isExpanded: S,
23
+ const f = !!r, {
24
+ ref: k,
25
+ isExpanded: D,
26
26
  onManualToggle: w,
27
27
  isInSessionStorage: A
28
- } = I(s || "", o), [y, F] = u(o), U = !!(s && (l != null && l.includes(s))) && !(i != null && i.current), e = f ? (
28
+ } = I(r || "", n), [y, C] = u(n), F = !!(r && (l != null && l.includes(r))) && !(c != null && c.current), e = f ? (
29
29
  // biome-ignore lint/style/noNestedTernary: TODO
30
- U ? !0 : (
30
+ F ? !0 : (
31
31
  // biome-ignore lint/style/noNestedTernary: TODO
32
- A ? S : o
32
+ A ? D : n
33
33
  )
34
34
  ) : y, [m, E] = u(
35
- e || !T
35
+ e || !N
36
36
  );
37
37
  j(() => {
38
38
  e && !m && E(!0);
39
- }, [e, m]), B(() => {
39
+ }, [e, m]), z(() => {
40
40
  a == null || a();
41
41
  }, []);
42
- const C = (t) => {
43
- E(!0), b && b(t), t ? d == null || d() : c == null || c();
42
+ const U = (t) => {
43
+ E(!0), b && b(t), t ? d == null || d() : i == null || i();
44
44
  }, X = (t) => {
45
- f ? w(t) : F(t), C(t);
46
- }, $ = z(), g = `${n}-${$}-content`.replace(/\s+/g, "-");
45
+ f ? w(t) : C(t), U(t);
46
+ }, $ = B(), g = `${o}-${$}-content`.replace(/\s+/g, "-");
47
47
  return /* @__PURE__ */ p(
48
48
  "details",
49
49
  {
50
- className: r(
50
+ className: s(
51
51
  H.Expandable,
52
52
  "mt-4 rounded-xl border-standard",
53
- L
53
+ T
54
54
  ),
55
55
  "data-component-part": "expandable",
56
- "data-testid": s ? `${s}-children` : void 0,
56
+ "data-testid": r ? `${r}-children` : void 0,
57
57
  onToggle: (t) => {
58
58
  const h = t.currentTarget.open;
59
59
  h !== e && X(h);
60
60
  },
61
61
  open: e,
62
- ref: D,
62
+ ref: k,
63
63
  children: [
64
64
  /* @__PURE__ */ p(
65
65
  "summary",
66
66
  {
67
67
  "aria-controls": g,
68
68
  "aria-expanded": e,
69
- className: r(
69
+ className: s(
70
70
  "not-prose flex w-full cursor-pointer flex-row content-center items-center text-sm",
71
71
  "rounded-t-xl px-3.5 py-3 text-stone-600 hover:bg-stone-50/50 hover:text-stone-900 dark:text-stone-300 dark:hover:bg-white/5 dark:hover:text-stone-200",
72
72
  "list-none [&::-webkit-details-marker]:hidden",
@@ -77,18 +77,20 @@ const N = "expandable-content", J = "Hide", K = "Show", Q = "child attributes",
77
77
  /* @__PURE__ */ x(
78
78
  G,
79
79
  {
80
- className: r(
80
+ className: s(
81
81
  "size-2.5 bg-stone-400 transition-transform",
82
82
  e && "rotate-90"
83
83
  ),
84
84
  "data-component-part": "expandable-icon",
85
- icon: "angle-right"
85
+ icon: "angle-right",
86
+ overrideColor: !0,
87
+ overrideSize: !0
86
88
  }
87
89
  ),
88
90
  /* @__PURE__ */ x("div", { className: "ml-3 text-left leading-tight", children: /* @__PURE__ */ p("p", { className: "m-0", contentEditable: !1, children: [
89
- e ? _ : k,
91
+ e ? S : _,
90
92
  " ",
91
- n
93
+ o
92
94
  ] }) })
93
95
  ]
94
96
  }
@@ -96,18 +98,18 @@ const N = "expandable-content", J = "Hide", K = "Show", Q = "child attributes",
96
98
  /* @__PURE__ */ x(
97
99
  "div",
98
100
  {
99
- className: r(
100
- N,
101
+ className: s(
102
+ v,
101
103
  "mx-3 border-stone-100 border-t px-2 dark:border-white/10"
102
104
  ),
103
- "data-component-part": N,
105
+ "data-component-part": v,
104
106
  id: g,
105
- children: m && v
107
+ children: m && L
106
108
  }
107
109
  )
108
110
  ]
109
111
  },
110
- n
112
+ o
111
113
  );
112
114
  };
113
115
  export {
@@ -1,3 +1,5 @@
1
+ export type { ParamHeadProps } from './param-head';
2
+ export { ParamHead } from './param-head';
1
3
  export type { PropertyProps } from './property';
2
4
  export { Property } from './property';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/property/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/property/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { PropertyProps } from './property';
2
2
  type ParamHeadProps = Omit<PropertyProps, "children">;
3
3
  declare const ParamHead: ({ name, type, location, required, deprecated, default: defaultValue, id, pre, post, onMount, navigateToHeaderAriaLabel, defaultLabel, requiredLabel, deprecatedLabel, }: ParamHeadProps) => import("react/jsx-runtime").JSX.Element | null;
4
- export { ParamHead };
4
+ export { ParamHead, type ParamHeadProps };
5
5
  //# sourceMappingURL=param-head.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"param-head.d.ts","sourceRoot":"","sources":["../../../src/components/property/param-head.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,KAAK,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AAEtD,QAAA,MAAM,SAAS,GAAI,yKAehB,cAAc,mDA4HhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"param-head.d.ts","sourceRoot":"","sources":["../../../src/components/property/param-head.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,KAAK,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AAEtD,QAAA,MAAM,SAAS,GAAI,yKAehB,cAAc,mDA4HhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -2,9 +2,9 @@ import { cn as e } from "./utils/cn.js";
2
2
  import { getInitialOpenState as p, updateAndCopyUrl as m } from "./components/accordion/accordion-url-utils.js";
3
3
  import { Accordion as x } from "./components/accordion/index.js";
4
4
  import { Badge as n } from "./components/badge/badge.js";
5
- import { Callout as d, Check as c, Danger as i, Info as C, Note as S, Tip as T, Warning as s } from "./components/callout/callout.js";
6
- import { Card as h } from "./components/card/card.js";
7
- import { BaseCodeBlock as I } from "./components/code-block/base-code-block.js";
5
+ import { Callout as l, Check as c, Danger as i, Info as C, Note as S, Tip as T, Warning as s } from "./components/callout/callout.js";
6
+ import { Card as P } from "./components/card/card.js";
7
+ import { BaseCodeBlock as B } from "./components/code-block/base-code-block.js";
8
8
  import { CodeBlock as g } from "./components/code-block/code-block.js";
9
9
  import { CodeGroup as k } from "./components/code-group/code-group.js";
10
10
  import { Color as b } from "./components/color/color.js";
@@ -12,28 +12,29 @@ import { Columns as A } from "./components/columns/columns.js";
12
12
  import { Expandable as _ } from "./components/expandable/expandable.js";
13
13
  import { Frame as w } from "./components/frame/frame.js";
14
14
  import { Icon as F } from "./components/icon/icon.js";
15
- import { Mermaid as L } from "./components/mermaid/mermaid.js";
16
- import { usePanZoom as N } from "./components/mermaid/use-pan-zoom.js";
17
- import { ZoomControls as V } from "./components/mermaid/zoom-controls.js";
18
- import { Panel as j } from "./components/panel/panel.js";
19
- import { Property as z } from "./components/property/property.js";
20
- import { SearchButton as J } from "./components/search/button.js";
21
- import { SearchProvider as Q, useSearch as R } from "./components/search/provider.js";
22
- import { Search as Y } from "./components/search/search.js";
23
- import { STEP_TITLE_SIZES as oo } from "./components/steps/constants.js";
24
- import { Steps as eo } from "./components/steps/steps.js";
25
- import { Tabs as po } from "./components/tabs/tabs.js";
26
- import { Tile as fo } from "./components/tile/tile.js";
27
- import { Tooltip as ao } from "./components/tooltip/tooltip.js";
28
- import { Tree as lo } from "./components/tree/index.js";
29
- import { Update as io } from "./components/update/update.js";
30
- import { View as So } from "./components/view/view.js";
15
+ import { Mermaid as H } from "./components/mermaid/mermaid.js";
16
+ import { usePanZoom as M } from "./components/mermaid/use-pan-zoom.js";
17
+ import { ZoomControls as O } from "./components/mermaid/zoom-controls.js";
18
+ import { Panel as W } from "./components/panel/panel.js";
19
+ import { ParamHead as q } from "./components/property/param-head.js";
20
+ import { Property as J } from "./components/property/property.js";
21
+ import { SearchButton as Q } from "./components/search/button.js";
22
+ import { SearchProvider as X, useSearch as Y } from "./components/search/provider.js";
23
+ import { Search as oo } from "./components/search/search.js";
24
+ import { STEP_TITLE_SIZES as eo } from "./components/steps/constants.js";
25
+ import { Steps as po } from "./components/steps/steps.js";
26
+ import { Tabs as fo } from "./components/tabs/tabs.js";
27
+ import { Tile as ao } from "./components/tile/tile.js";
28
+ import { Tooltip as lo } from "./components/tooltip/tooltip.js";
29
+ import { Tree as io } from "./components/tree/index.js";
30
+ import { Update as So } from "./components/update/update.js";
31
+ import { View as so } from "./components/view/view.js";
31
32
  export {
32
33
  x as Accordion,
33
34
  n as Badge,
34
- I as BaseCodeBlock,
35
- d as Callout,
36
- h as Card,
35
+ B as BaseCodeBlock,
36
+ l as Callout,
37
+ P as Card,
37
38
  c as Check,
38
39
  g as CodeBlock,
39
40
  k as CodeGroup,
@@ -44,27 +45,28 @@ export {
44
45
  w as Frame,
45
46
  F as Icon,
46
47
  C as Info,
47
- L as Mermaid,
48
+ H as Mermaid,
48
49
  S as Note,
49
- j as Panel,
50
- z as Property,
51
- oo as STEP_TITLE_SIZES,
52
- Y as Search,
53
- J as SearchButton,
54
- Q as SearchProvider,
55
- eo as Steps,
56
- po as Tabs,
57
- fo as Tile,
50
+ W as Panel,
51
+ q as ParamHead,
52
+ J as Property,
53
+ eo as STEP_TITLE_SIZES,
54
+ oo as Search,
55
+ Q as SearchButton,
56
+ X as SearchProvider,
57
+ po as Steps,
58
+ fo as Tabs,
59
+ ao as Tile,
58
60
  T as Tip,
59
- ao as Tooltip,
60
- lo as Tree,
61
- io as Update,
62
- So as View,
61
+ lo as Tooltip,
62
+ io as Tree,
63
+ So as Update,
64
+ so as View,
63
65
  s as Warning,
64
- V as ZoomControls,
66
+ O as ZoomControls,
65
67
  e as cn,
66
68
  p as getInitialOpenState,
67
69
  m as updateAndCopyUrl,
68
- N as usePanZoom,
69
- R as useSearch
70
+ M as usePanZoom,
71
+ Y as useSearch
70
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/components",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Mintlify open-source UI components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -76,8 +76,8 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@shikijs/types": "3.21.0",
79
- "@storybook/addon-docs": "10.1.11",
80
- "@storybook/react-vite": "10.1.11",
79
+ "@storybook/addon-docs": "10.2.10",
80
+ "@storybook/react-vite": "10.2.10",
81
81
  "@tailwindcss/cli": "4.1.18",
82
82
  "@tailwindcss/postcss": "4.1.18",
83
83
  "@tailwindcss/typography": "0.5.19",
@@ -98,7 +98,7 @@
98
98
  "react": "18.3.1",
99
99
  "react-dom": "18.3.1",
100
100
  "rimraf": "6.0.1",
101
- "storybook": "10.1.11",
101
+ "storybook": "10.2.10",
102
102
  "tailwindcss": "4.1.18",
103
103
  "typescript": "5.9.3",
104
104
  "ultracite": "7.0.12",