@webstudio-is/sdk-components-react-radix 0.0.0-5844e28 → 0.0.0-73cd6ea

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 (75) hide show
  1. package/lib/__generated__/accordion.props.js +15 -2582
  2. package/lib/__generated__/checkbox.props.js +5 -1071
  3. package/lib/__generated__/collapsible.props.js +7 -1012
  4. package/lib/__generated__/dialog.props.js +10 -2585
  5. package/lib/__generated__/label.props.js +2 -517
  6. package/lib/__generated__/navigation-menu.props.js +13 -3625
  7. package/lib/__generated__/popover.props.js +7 -509
  8. package/lib/__generated__/radio-group.props.js +19 -1568
  9. package/lib/__generated__/select.props.js +42 -3615
  10. package/lib/__generated__/switch.props.js +5 -1071
  11. package/lib/__generated__/tabs.props.js +17 -2073
  12. package/lib/__generated__/tooltip.props.js +6 -503
  13. package/lib/accordion.js +33 -20
  14. package/lib/accordion.template.js +14 -14
  15. package/lib/accordion.ws.js +56 -93
  16. package/lib/checkbox.js +17 -6
  17. package/lib/checkbox.template.js +10 -10
  18. package/lib/checkbox.ws.js +26 -41
  19. package/lib/collapsible.js +29 -26
  20. package/lib/collapsible.ws.js +28 -48
  21. package/lib/components.js +46 -45
  22. package/lib/dialog.js +50 -56
  23. package/lib/dialog.template.js +19 -19
  24. package/lib/dialog.ws.js +68 -126
  25. package/lib/label.template.js +3 -3
  26. package/lib/label.ws.js +8 -15
  27. package/lib/metas.js +45 -44
  28. package/lib/navigation-menu.js +21 -20
  29. package/lib/navigation-menu.template.js +8 -8
  30. package/lib/navigation-menu.ws.js +71 -102
  31. package/lib/popover.js +36 -32
  32. package/lib/popover.template.js +50 -20
  33. package/lib/popover.ws.js +45 -44
  34. package/lib/radio-group.js +10 -7
  35. package/lib/radio-group.ws.js +37 -61
  36. package/lib/select.js +49 -37
  37. package/lib/select.ws.js +71 -137
  38. package/lib/shared/meta.js +13 -0
  39. package/lib/shared/preset-styles.js +29 -29
  40. package/lib/shared/theme.js +25 -68
  41. package/lib/sheet.template.js +32 -32
  42. package/lib/switch.js +9 -6
  43. package/lib/switch.template.js +9 -9
  44. package/lib/switch.ws.js +29 -52
  45. package/lib/tabs.js +50 -53
  46. package/lib/tabs.template.js +16 -16
  47. package/lib/tabs.ws.js +41 -76
  48. package/lib/tooltip.js +34 -31
  49. package/lib/tooltip.ws.js +27 -42
  50. package/lib/types/__generated__/popover.props.d.ts +1 -0
  51. package/lib/types/accordion.ws.d.ts +1 -6
  52. package/lib/types/checkbox.ws.d.ts +1 -3
  53. package/lib/types/collapsible.d.ts +2 -2
  54. package/lib/types/collapsible.ws.d.ts +1 -4
  55. package/lib/types/components.d.ts +1 -1
  56. package/lib/types/dialog.ws.d.ts +1 -8
  57. package/lib/types/label.ws.d.ts +1 -2
  58. package/lib/types/metas.d.ts +1 -1
  59. package/lib/types/navigation-menu.ws.d.ts +1 -8
  60. package/lib/types/popover.d.ts +1 -0
  61. package/lib/types/popover.ws.d.ts +2 -4
  62. package/lib/types/radio-group.d.ts +1 -1
  63. package/lib/types/radio-group.ws.d.ts +1 -4
  64. package/lib/types/select.d.ts +3 -3
  65. package/lib/types/select.ws.d.ts +1 -9
  66. package/lib/types/shared/meta.d.ts +1 -0
  67. package/lib/types/shared/preset-styles.d.ts +2 -2
  68. package/lib/types/shared/proxy.d.ts +1 -0
  69. package/lib/types/switch.ws.d.ts +1 -3
  70. package/lib/types/tabs.d.ts +1 -4
  71. package/lib/types/tabs.ws.d.ts +1 -5
  72. package/lib/types/tooltip.ws.d.ts +1 -4
  73. package/package.json +21 -27
  74. package/lib/props.js +0 -62
  75. package/lib/types/props.d.ts +0 -12
@@ -1,13 +1,13 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { css as t, $ as o, PlaceholderValue as s } from "@webstudio-is/template";
2
+ import { $ as o, PlaceholderValue as s, css as t } from "@webstudio-is/template";
3
3
  import { radix as i } from "./shared/proxy.js";
4
- import { borderWidth as h, colors as m, spacing as a, weights as f, height as g, width as p, transition as c, fontSize as w, fontSizeLineHeight as y } from "./shared/theme.js";
4
+ import { height as h, width as m, transition as a, spacing as c, weights as g, fontSize as f, fontSizeLineHeight as p, borderWidth as w, colors as y } from "./shared/theme.js";
5
5
  import { ChevronDownIcon as b } from "@webstudio-is/icons/svg";
6
6
  const n = (d, l) => /* @__PURE__ */ r(
7
7
  i.AccordionItem,
8
8
  {
9
9
  "ws:style": t`
10
- border-bottom: ${h.DEFAULT} solid ${m.border};
10
+ border-bottom: ${w.DEFAULT} solid ${y.border};
11
11
  `,
12
12
  children: [
13
13
  /* @__PURE__ */ e(
@@ -24,8 +24,8 @@ const n = (d, l) => /* @__PURE__ */ r(
24
24
  flex: 1 1 0;
25
25
  align-items: center;
26
26
  justify-content: between;
27
- padding: ${a[4]} 0;
28
- font-weight: ${f.medium};
27
+ padding: ${c[4]} 0;
28
+ font-weight: ${g.medium};
29
29
  --accordion-trigger-icon-transform: 0deg;
30
30
  &:hover {
31
31
  text-decoration-line: underline;
@@ -41,11 +41,11 @@ const n = (d, l) => /* @__PURE__ */ r(
41
41
  {
42
42
  "ws:label": "Icon Container",
43
43
  "ws:style": t`
44
- rotate: --accordion-trigger-icon-transform;
45
- height: ${g[4]};
46
- width: ${p[4]};
44
+ rotate: var(--accordion-trigger-icon-transform);
45
+ height: ${h[4]};
46
+ width: ${m[4]};
47
47
  flex-shrink: 0;
48
- transition: ${c.all};
48
+ transition: ${a.all};
49
49
  transition-duration: 200ms;
50
50
  `,
51
51
  children: /* @__PURE__ */ e(o.HtmlEmbed, { "ws:label": "Chevron Icon", code: b })
@@ -61,10 +61,10 @@ const n = (d, l) => /* @__PURE__ */ r(
61
61
  {
62
62
  "ws:style": t`
63
63
  overflow: hidden;
64
- font-size: ${w.sm};
65
- line-height: ${y.sm};
66
- transition: ${c.all};
67
- padding-bottom: ${a[4]};
64
+ font-size: ${f.sm};
65
+ line-height: ${p.sm};
66
+ transition: ${a.all};
67
+ padding-bottom: ${c[4]};
68
68
  `,
69
69
  children: new s(l)
70
70
  }
@@ -75,7 +75,7 @@ const n = (d, l) => /* @__PURE__ */ r(
75
75
  category: "radix",
76
76
  description: "A vertically stacked set of interactive headings that each reveal an associated section of content. Clicking on the heading will open the item and close other items.",
77
77
  order: 3,
78
- template: /* @__PURE__ */ r(i.Accordion, { collapsible: !0, defaultValue: "0", children: [
78
+ template: /* @__PURE__ */ r(i.Accordion, { collapsible: !0, value: "0", children: [
79
79
  n(
80
80
  "Is it accessible?",
81
81
  "Yes. It adheres to the WAI-ARIA design pattern."
@@ -1,117 +1,80 @@
1
- import { AccordionIcon as t, ItemIcon as e, HeaderIcon as n, TriggerIcon as r, ContentIcon as c } from "@webstudio-is/icons/svg";
2
- import { defaultStates as i } from "@webstudio-is/sdk";
3
- import { h3 as a, button as p, div as s } from "@webstudio-is/sdk/normalize.css";
1
+ import { AccordionIcon as t, ItemIcon as n, HeaderIcon as r, TriggerIcon as c, ContentIcon as i } from "@webstudio-is/icons/svg";
2
+ import { div as o, h3 as a, button as p } from "@webstudio-is/sdk/normalize.css";
3
+ import { radix as e } from "./shared/meta.js";
4
4
  import { buttonReset as d } from "./shared/preset-styles.js";
5
- import { propsAccordion as m, propsAccordionItem as l, propsAccordionHeader as A, propsAccordionTrigger as I, propsAccordionContent as g } from "./__generated__/accordion.props.js";
6
- const o = {
7
- div: s
8
- }, f = {
9
- type: "container",
5
+ import { propsAccordion as s, propsAccordionItem as l, propsAccordionHeader as m, propsAccordionTrigger as g, propsAccordionContent as A } from "./__generated__/accordion.props.js";
6
+ const v = {
10
7
  icon: t,
11
- presetStyle: o,
12
- constraints: [
13
- {
14
- relation: "descendant",
15
- component: { $eq: "AccordionItem" }
16
- }
17
- ]
18
- }, v = {
19
- type: "container",
8
+ contentModel: {
9
+ category: "instance",
10
+ children: ["instance"],
11
+ descendants: [e.AccordionItem]
12
+ },
13
+ presetStyle: { div: o },
14
+ initialProps: ["value", "collapsible"],
15
+ props: s
16
+ }, x = {
20
17
  label: "Item",
21
- icon: e,
22
- constraints: [
23
- {
24
- relation: "ancestor",
25
- component: { $eq: "Accordion" }
26
- },
27
- {
28
- relation: "descendant",
29
- component: { $eq: "AccordionHeader" }
30
- },
31
- {
32
- relation: "descendant",
33
- component: { $eq: "AccordionContent" }
34
- }
35
- ],
36
- indexWithinAncestor: "Accordion",
37
- presetStyle: o
38
- }, H = {
39
- type: "container",
40
- label: "Item Header",
41
18
  icon: n,
42
- constraints: [
43
- {
44
- relation: "ancestor",
45
- component: { $eq: "AccordionItem" }
46
- },
47
- {
48
- relation: "descendant",
49
- component: { $eq: "AccordionTrigger" }
50
- }
51
- ],
19
+ indexWithinAncestor: e.Accordion,
20
+ contentModel: {
21
+ category: "none",
22
+ children: ["instance"],
23
+ descendants: [e.AccordionHeader, e.AccordionContent]
24
+ },
25
+ presetStyle: { div: o },
26
+ initialProps: ["value"],
27
+ props: l
28
+ }, f = {
29
+ label: "Item Header",
30
+ icon: r,
31
+ contentModel: {
32
+ category: "none",
33
+ children: ["instance"],
34
+ descendants: [e.AccordionTrigger]
35
+ },
52
36
  presetStyle: {
53
37
  h3: [
54
38
  ...a,
55
39
  {
56
- property: "marginTop",
40
+ property: "margin-top",
57
41
  value: { type: "unit", unit: "px", value: 0 }
58
42
  },
59
43
  {
60
- property: "marginBottom",
44
+ property: "margin-bottom",
61
45
  value: { type: "unit", unit: "px", value: 0 }
62
46
  }
63
47
  ]
64
- }
65
- }, T = {
66
- type: "container",
48
+ },
49
+ props: m
50
+ }, C = {
67
51
  label: "Item Trigger",
68
- icon: r,
69
- constraints: {
70
- relation: "ancestor",
71
- component: { $eq: "AccordionHeader" }
52
+ icon: c,
53
+ contentModel: {
54
+ category: "none",
55
+ children: ["instance", "rich-text"]
72
56
  },
73
- states: [
74
- ...i,
75
- {
76
- category: "component-states",
77
- label: "Open",
78
- selector: "[data-state=open]"
79
- }
80
- ],
57
+ states: [{ label: "Open", selector: "[data-state=open]" }],
81
58
  presetStyle: {
82
59
  button: [p, d].flat()
83
- }
84
- }, C = {
85
- type: "container",
60
+ },
61
+ props: g
62
+ }, H = {
86
63
  label: "Item Content",
87
- icon: c,
88
- constraints: {
89
- relation: "ancestor",
90
- component: { $eq: "AccordionItem" }
64
+ icon: i,
65
+ contentModel: {
66
+ category: "none",
67
+ children: ["instance", "rich-text"]
68
+ },
69
+ presetStyle: {
70
+ div: o
91
71
  },
92
- presetStyle: o
93
- }, M = {
94
- props: m,
95
- initialProps: ["value", "collapsible"]
96
- }, x = {
97
- props: l,
98
- initialProps: ["value"]
99
- }, S = {
100
72
  props: A
101
- }, h = {
102
- props: I
103
- }, P = {
104
- props: g
105
73
  };
106
74
  export {
107
- f as metaAccordion,
108
- C as metaAccordionContent,
109
- H as metaAccordionHeader,
110
- v as metaAccordionItem,
111
- T as metaAccordionTrigger,
112
- M as propsMetaAccordion,
113
- P as propsMetaAccordionContent,
114
- S as propsMetaAccordionHeader,
115
- x as propsMetaAccordionItem,
116
- h as propsMetaAccordionTrigger
75
+ v as metaAccordion,
76
+ H as metaAccordionContent,
77
+ f as metaAccordionHeader,
78
+ x as metaAccordionItem,
79
+ C as metaAccordionTrigger
117
80
  };
package/lib/checkbox.js CHANGED
@@ -1,8 +1,19 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- import { Root as m, Indicator as d } from "@radix-ui/react-checkbox";
4
- const p = f(({ checked: o, defaultChecked: r, ...t }, e) => /* @__PURE__ */ c(m, { ...t, ref: e, defaultChecked: o ?? r })), x = d;
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as h, useState as s, useEffect as k } from "react";
3
+ import { Indicator as a, Root as m } from "@radix-ui/react-checkbox";
4
+ const x = h(({ defaultChecked: c, ...o }, r) => {
5
+ const e = o.checked ?? c ?? !1, [n, t] = s(e);
6
+ return k(() => t(e), [e]), /* @__PURE__ */ f(
7
+ m,
8
+ {
9
+ ...o,
10
+ ref: r,
11
+ checked: n,
12
+ onCheckedChange: (d) => t(d === !0)
13
+ }
14
+ );
15
+ }), b = a;
5
16
  export {
6
- p as Checkbox,
7
- x as CheckboxIndicator
17
+ x as Checkbox,
18
+ b as CheckboxIndicator
8
19
  };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { CheckMarkIcon as a } from "@webstudio-is/icons/svg";
3
- import { css as o, $ as t, PlaceholderValue as l } from "@webstudio-is/template";
3
+ import { $ as t, css as o, PlaceholderValue as l } from "@webstudio-is/template";
4
4
  import { radix as r } from "./shared/proxy.js";
5
- import { spacing as s, height as d, width as n, borderRadius as h, borderWidth as b, colors as i, boxShadow as m, opacity as p } from "./shared/theme.js";
5
+ import { height as s, width as d, borderRadius as n, borderWidth as h, colors as i, boxShadow as b, opacity as m, spacing as p } from "./shared/theme.js";
6
6
  const y = {
7
7
  category: "radix",
8
8
  description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
@@ -13,7 +13,7 @@ const y = {
13
13
  "ws:label": "Checkbox Field",
14
14
  "ws:style": o`
15
15
  display: flex;
16
- gap: ${s[2]};
16
+ gap: ${p[2]};
17
17
  align-items: center;
18
18
  `,
19
19
  children: [
@@ -21,18 +21,18 @@ const y = {
21
21
  r.Checkbox,
22
22
  {
23
23
  "ws:style": o`
24
- height: ${d[4]};
25
- width: ${n[4]};
24
+ height: ${s[4]};
25
+ width: ${d[4]};
26
26
  flex-shrink: 0;
27
- border-radius: ${h.sm};
28
- border: ${b.DEFAULT} solid ${i.primary};
27
+ border-radius: ${n.sm};
28
+ border: ${h.DEFAULT} solid ${i.primary};
29
29
  &:focus-visible {
30
30
  outline: none;
31
- box-shadow: ${m.ring};
31
+ box-shadow: ${b.ring};
32
32
  }
33
33
  &:disabled {
34
34
  cursor: not-allowed;
35
- opacity: ${p[50]};
35
+ opacity: ${m[50]};
36
36
  }
37
37
  &[data-state="checked"] {
38
38
  background-color: ${i.primary};
@@ -53,7 +53,7 @@ const y = {
53
53
  )
54
54
  }
55
55
  ),
56
- /* @__PURE__ */ e(t.Text, { "ws:label": "Checkbox Label", tag: "span", children: new l("Checkbox") })
56
+ /* @__PURE__ */ e(t.Text, { "ws:label": "Checkbox Label", "ws:tag": "span", children: new l("Checkbox") })
57
57
  ]
58
58
  }
59
59
  )
@@ -1,51 +1,36 @@
1
- import { CheckboxCheckedIcon as t, TriggerIcon as o } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/sdk";
3
- import { button as c, span as n } from "@webstudio-is/sdk/normalize.css";
4
- import { buttonReset as a } from "./shared/preset-styles.js";
5
- import { propsCheckbox as r, propsCheckboxIndicator as s } from "./__generated__/checkbox.props.js";
6
- const k = {
7
- type: "container",
8
- constraints: {
9
- relation: "descendant",
10
- component: { $eq: "CheckboxIndicator" }
1
+ import { CheckboxCheckedIcon as e, TriggerIcon as t } from "@webstudio-is/icons/svg";
2
+ import { button as o, span as c } from "@webstudio-is/sdk/normalize.css";
3
+ import { radix as n } from "./shared/meta.js";
4
+ import { buttonReset as r } from "./shared/preset-styles.js";
5
+ import { propsCheckbox as a, propsCheckboxIndicator as s } from "./__generated__/checkbox.props.js";
6
+ const m = {
7
+ icon: e,
8
+ contentModel: {
9
+ category: "instance",
10
+ children: ["instance"],
11
+ descendants: [n.CheckboxIndicator]
11
12
  },
12
- icon: t,
13
13
  states: [
14
- ...e,
15
- {
16
- label: "Checked",
17
- selector: "[data-state=checked]",
18
- category: "component-states"
19
- },
20
- {
21
- label: "Unchecked",
22
- selector: "[data-state=unchecked]",
23
- category: "component-states"
24
- }
14
+ { label: "Checked", selector: "[data-state=checked]" },
15
+ { label: "Unchecked", selector: "[data-state=unchecked]" }
25
16
  ],
26
17
  presetStyle: {
27
- button: [c, a].flat()
28
- }
29
- }, l = {
30
- type: "container",
31
- constraints: {
32
- relation: "ancestor",
33
- component: { $eq: "Checkbox" }
18
+ button: [o, r].flat()
19
+ },
20
+ initialProps: ["id", "class", "name", "value", "required", "checked"],
21
+ props: a
22
+ }, k = {
23
+ icon: t,
24
+ contentModel: {
25
+ category: "none",
26
+ children: ["instance", "rich-text"]
34
27
  },
35
- icon: o,
36
- states: e,
37
28
  presetStyle: {
38
- span: n
39
- }
40
- }, b = {
41
- props: r,
42
- initialProps: ["id", "className", "name", "value", "required", "checked"]
43
- }, C = {
29
+ span: c
30
+ },
44
31
  props: s
45
32
  };
46
33
  export {
47
- k as metaCheckbox,
48
- l as metaCheckboxIndicator,
49
- b as propsMetaCheckbox,
50
- C as propsMetaCheckboxIndicator
34
+ m as metaCheckbox,
35
+ k as metaCheckboxIndicator
51
36
  };
@@ -1,37 +1,40 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as r, Children as a } from "react";
3
- import { Root as c, Trigger as p, Content as C } from "@radix-ui/react-collapsible";
4
- import { getClosestInstance as l } from "@webstudio-is/react-sdk/runtime";
5
- const h = c, g = r(({ children: e, ...o }, t) => {
6
- const n = a.toArray(e)[0];
7
- return /* @__PURE__ */ i(p, { asChild: !0, ref: t, ...o, children: n ?? /* @__PURE__ */ i("button", { children: "Add button" }) });
8
- }), u = C, s = "@webstudio-is/sdk-components-react-radix", P = {
9
- onNavigatorSelect: (e, o) => {
10
- for (const t of o.instancePath)
11
- if (t.component === `${s}:CollapsibleContent`) {
12
- const n = l(
13
- o.instancePath,
14
- t,
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as a, useState as c, useEffect as p, Children as f } from "react";
3
+ import { Content as C, Root as m, Trigger as b } from "@radix-ui/react-collapsible";
4
+ import { getClosestInstance as r } from "@webstudio-is/react-sdk/runtime";
5
+ const P = a((n, t) => {
6
+ const o = n.open ?? !1, [e, i] = c(o);
7
+ return p(() => i(o), [o]), /* @__PURE__ */ l(m, { ...n, ref: t, open: e, onOpenChange: i });
8
+ }), $ = a(({ children: n, ...t }, o) => {
9
+ const e = f.toArray(n)[0];
10
+ return /* @__PURE__ */ l(b, { asChild: !0, ref: o, ...t, children: e ?? /* @__PURE__ */ l("button", { children: "Add button" }) });
11
+ }), x = C, s = "@webstudio-is/sdk-components-react-radix", y = {
12
+ onNavigatorSelect: (n, t) => {
13
+ for (const o of t.instancePath)
14
+ if (o.component === `${s}:CollapsibleContent`) {
15
+ const e = r(
16
+ t.instancePath,
17
+ o,
15
18
  `${s}:Collapsible`
16
19
  );
17
- n && e.setMemoryProp(n, "open", !0);
20
+ e && n.setMemoryProp(e, "open", !0);
18
21
  }
19
22
  },
20
- onNavigatorUnselect: (e, o) => {
21
- for (const t of o.instancePath)
22
- if (t.component === `${s}:CollapsibleContent`) {
23
- const n = l(
24
- o.instancePath,
25
- t,
23
+ onNavigatorUnselect: (n, t) => {
24
+ for (const o of t.instancePath)
25
+ if (o.component === `${s}:CollapsibleContent`) {
26
+ const e = r(
27
+ t.instancePath,
28
+ o,
26
29
  `${s}:Collapsible`
27
30
  );
28
- n && e.setMemoryProp(n, "open", void 0);
31
+ e && n.setMemoryProp(e, "open", void 0);
29
32
  }
30
33
  }
31
34
  };
32
35
  export {
33
- h as Collapsible,
34
- u as CollapsibleContent,
35
- g as CollapsibleTrigger,
36
- P as hooksCollapsible
36
+ P as Collapsible,
37
+ x as CollapsibleContent,
38
+ $ as CollapsibleTrigger,
39
+ y as hooksCollapsible
37
40
  };
@@ -1,59 +1,39 @@
1
- import { CollapsibleIcon as e, TriggerIcon as n, ContentIcon as t } from "@webstudio-is/icons/svg";
1
+ import { CollapsibleIcon as n, TriggerIcon as t, ContentIcon as l } from "@webstudio-is/icons/svg";
2
2
  import { div as o } from "@webstudio-is/sdk/normalize.css";
3
- import { propsCollapsible as l, propsCollapsibleTrigger as p, propsCollapsibleContent as r } from "./__generated__/collapsible.props.js";
4
- const c = {
5
- type: "container",
6
- constraints: [
7
- {
8
- relation: "descendant",
9
- component: { $eq: "CollapsibleTrigger" }
10
- },
11
- {
12
- relation: "descendant",
13
- component: { $eq: "CollapsibleContent" }
14
- }
15
- ],
16
- presetStyle: {
17
- div: o
18
- },
19
- icon: e
20
- }, C = {
21
- type: "container",
3
+ import { radix as e } from "./shared/meta.js";
4
+ import { propsCollapsible as r, propsCollapsibleTrigger as i, propsCollapsibleContent as p } from "./__generated__/collapsible.props.js";
5
+ const g = {
22
6
  icon: n,
23
- constraints: {
24
- relation: "ancestor",
25
- component: { $eq: "Collapsible" }
26
- }
27
- }, b = {
28
- type: "container",
7
+ contentModel: {
8
+ category: "instance",
9
+ children: ["instance"],
10
+ descendants: [e.CollapsibleTrigger, e.CollapsibleContent]
11
+ },
29
12
  presetStyle: {
30
13
  div: o
31
14
  },
32
- icon: t,
33
- constraints: {
34
- relation: "ancestor",
35
- component: { $eq: "Collapsible" }
36
- }
15
+ initialProps: ["open"],
16
+ props: r
37
17
  }, m = {
38
- props: {
39
- ...l,
40
- onOpenChange: {
41
- type: "action",
42
- control: "action",
43
- required: !1
44
- }
18
+ icon: t,
19
+ contentModel: {
20
+ category: "none",
21
+ children: ["instance", "rich-text"]
45
22
  },
46
- initialProps: ["open", "onOpenChange"]
47
- }, g = {
48
- props: p
23
+ props: i
49
24
  }, d = {
50
- props: r
25
+ icon: l,
26
+ contentModel: {
27
+ category: "none",
28
+ children: ["instance", "rich-text"]
29
+ },
30
+ presetStyle: {
31
+ div: o
32
+ },
33
+ props: p
51
34
  };
52
35
  export {
53
- c as metaCollapsible,
54
- b as metaCollapsibleContent,
55
- C as metaCollapsibleTrigger,
56
- m as propsMetaCollapsible,
57
- d as propsMetaCollapsibleContent,
58
- g as propsMetaCollapsibleTrigger
36
+ g as metaCollapsible,
37
+ d as metaCollapsibleContent,
38
+ m as metaCollapsibleTrigger
59
39
  };