@webstudio-is/sdk-components-react-radix 0.216.0 → 0.218.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.
package/lib/dialog.ws.js CHANGED
@@ -1,139 +1,109 @@
1
- import { TriggerIcon as n, OverlayIcon as e, ContentIcon as i, HeadingIcon as a, TextIcon as r, ButtonElementIcon as s, DialogIcon as p } from "@webstudio-is/icons/svg";
2
- import { defaultStates as l } from "@webstudio-is/sdk";
3
- import { div as t, h2 as c, p as g, button as D } from "@webstudio-is/sdk/normalize.css";
1
+ import { TriggerIcon as e, OverlayIcon as n, ContentIcon as i, HeadingIcon as r, TextIcon as a, ButtonElementIcon as s, DialogIcon as l } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as c } from "@webstudio-is/sdk";
3
+ import { div as t, h2 as p, p as g, button as D } from "@webstudio-is/sdk/normalize.css";
4
4
  import { radix as o } from "./shared/meta.js";
5
- import { propsDialog as m, propsDialogTrigger as y, propsDialogContent as C, propsDialogOverlay as d, propsDialogClose as q, propsDialogTitle as $, propsDialogDescription as T } from "./__generated__/dialog.props.js";
5
+ import { propsDialog as d, propsDialogTrigger as m, propsDialogContent as y, propsDialogOverlay as M, propsDialogClose as h, propsDialogTitle as C, propsDialogDescription as T } from "./__generated__/dialog.props.js";
6
6
  import { buttonReset as f } from "./shared/preset-styles.js";
7
- const S = {
8
- type: "container",
9
- icon: n,
10
- constraints: {
11
- relation: "ancestor",
12
- component: { $eq: o.Dialog }
7
+ const O = {
8
+ icon: e,
9
+ contentModel: {
10
+ category: "none",
11
+ children: ["instance"]
13
12
  }
14
13
  }, b = {
15
- type: "container",
14
+ icon: n,
15
+ contentModel: {
16
+ category: "none",
17
+ children: ["instance"],
18
+ descendants: [o.DialogContent]
19
+ },
16
20
  presetStyle: {
17
21
  div: t
22
+ }
23
+ }, B = {
24
+ icon: i,
25
+ contentModel: {
26
+ category: "none",
27
+ children: ["instance"],
28
+ descendants: [
29
+ o.DialogTitle,
30
+ o.DialogDescription,
31
+ o.DialogClose
32
+ ]
18
33
  },
19
- icon: e,
20
- constraints: [
21
- {
22
- relation: "ancestor",
23
- component: { $eq: o.Dialog }
24
- },
25
- {
26
- relation: "descendant",
27
- component: { $eq: o.DialogContent }
28
- }
29
- ]
30
- }, x = {
31
- type: "container",
32
34
  presetStyle: {
33
35
  div: t
36
+ }
37
+ }, E = {
38
+ icon: r,
39
+ contentModel: {
40
+ category: "none",
41
+ children: ["instance", "rich-text"]
34
42
  },
35
- icon: i,
36
- constraints: [
37
- {
38
- relation: "ancestor",
39
- component: { $eq: o.DialogOverlay }
40
- },
41
- // often deleted by users
42
- // though radix starts throwing warnings in console
43
- /*
44
- {
45
- relation: "descendant",
46
- component: { $eq: radix.DialogTitle },
47
- },
48
- {
49
- relation: "descendant",
50
- component: { $eq: radix.DialogDescription },
51
- },
52
- */
53
- {
54
- relation: "descendant",
55
- component: { $eq: o.DialogClose }
56
- }
57
- ]
58
- }, B = {
59
- type: "container",
60
43
  presetStyle: {
61
- h2: c
62
- },
63
- icon: a,
64
- constraints: {
65
- relation: "ancestor",
66
- component: { $eq: o.DialogContent }
44
+ h2: p
67
45
  }
68
- }, h = {
69
- type: "container",
46
+ }, H = {
47
+ icon: a,
48
+ contentModel: {
49
+ category: "none",
50
+ children: ["instance", "rich-text"]
51
+ },
70
52
  presetStyle: {
71
53
  p: g
72
- },
73
- icon: r,
74
- constraints: {
75
- relation: "ancestor",
76
- component: { $eq: o.DialogContent }
77
54
  }
78
- }, E = {
79
- type: "container",
80
- presetStyle: {
81
- button: [f, D].flat()
82
- },
83
- states: l,
55
+ }, R = {
84
56
  icon: s,
85
57
  label: "Close Button",
86
- constraints: {
87
- relation: "ancestor",
88
- component: { $eq: o.DialogContent }
58
+ contentModel: {
59
+ category: "none",
60
+ children: ["instance", "rich-text"]
61
+ },
62
+ states: c,
63
+ presetStyle: {
64
+ button: [f, D].flat()
89
65
  }
90
- }, H = {
91
- type: "container",
92
- icon: p,
93
- constraints: [
94
- {
95
- relation: "descendant",
96
- component: { $eq: o.DialogTrigger }
97
- },
98
- {
99
- relation: "descendant",
100
- component: { $eq: o.DialogOverlay }
101
- }
102
- ]
103
- }, R = {
104
- props: m,
105
- initialProps: []
106
66
  }, j = {
107
- props: y
67
+ icon: l,
68
+ contentModel: {
69
+ category: "instance",
70
+ children: ["instance"],
71
+ descendants: [o.DialogTrigger, o.DialogOverlay]
72
+ }
108
73
  }, k = {
109
- props: C,
74
+ props: d,
110
75
  initialProps: []
76
+ }, q = {
77
+ props: m
111
78
  }, w = {
112
- props: d,
79
+ props: y,
113
80
  initialProps: []
114
81
  }, z = {
115
- props: q,
82
+ props: M,
116
83
  initialProps: []
117
84
  }, A = {
118
- props: $,
85
+ props: h,
119
86
  initialProps: []
120
87
  }, F = {
88
+ props: C,
89
+ initialProps: []
90
+ }, G = {
121
91
  props: T,
122
92
  initialProps: []
123
93
  };
124
94
  export {
125
- H as metaDialog,
126
- E as metaDialogClose,
127
- x as metaDialogContent,
128
- h as metaDialogDescription,
95
+ j as metaDialog,
96
+ R as metaDialogClose,
97
+ B as metaDialogContent,
98
+ H as metaDialogDescription,
129
99
  b as metaDialogOverlay,
130
- B as metaDialogTitle,
131
- S as metaDialogTrigger,
132
- R as propsMetaDialog,
133
- z as propsMetaDialogClose,
134
- k as propsMetaDialogContent,
135
- F as propsMetaDialogDescription,
136
- w as propsMetaDialogOverlay,
137
- A as propsMetaDialogTitle,
138
- j as propsMetaDialogTrigger
100
+ E as metaDialogTitle,
101
+ O as metaDialogTrigger,
102
+ k as propsMetaDialog,
103
+ A as propsMetaDialogClose,
104
+ w as propsMetaDialogContent,
105
+ G as propsMetaDialogDescription,
106
+ z as propsMetaDialogOverlay,
107
+ F as propsMetaDialogTitle,
108
+ q as propsMetaDialogTrigger
139
109
  };
package/lib/label.ws.js CHANGED
@@ -2,18 +2,17 @@ import { LabelIcon as t } from "@webstudio-is/icons/svg";
2
2
  import { defaultStates as o } from "@webstudio-is/sdk";
3
3
  import { label as r } from "@webstudio-is/sdk/normalize.css";
4
4
  import { props as e } from "./__generated__/label.props.js";
5
- const p = {
6
- label: r
7
- }, l = {
8
- type: "container",
5
+ const i = {
9
6
  icon: t,
10
- presetStyle: p,
11
- states: o
12
- }, n = {
7
+ states: o,
8
+ presetStyle: {
9
+ label: r
10
+ }
11
+ }, l = {
13
12
  props: e,
14
13
  initialProps: ["id", "className", "htmlFor"]
15
14
  };
16
15
  export {
17
- l as meta,
18
- n as propsMeta
16
+ i as meta,
17
+ l as propsMeta
19
18
  };
@@ -1,127 +1,107 @@
1
- import { NavigationMenuIcon as e, ListIcon as o, ListItemIcon as i, TriggerIcon as a, ContentIcon as r, BoxIcon as p, ViewportIcon as s } from "@webstudio-is/icons/svg";
2
- import { div as t } from "@webstudio-is/sdk/normalize.css";
1
+ import { NavigationMenuIcon as t, ListIcon as o, ListItemIcon as i, TriggerIcon as a, ContentIcon as r, BoxIcon as s, ViewportIcon as c } from "@webstudio-is/icons/svg";
2
+ import { div as e } from "@webstudio-is/sdk/normalize.css";
3
3
  import { radix as n } from "./shared/meta.js";
4
- import { propsNavigationMenu as c, propsNavigationMenuItem as M, propsNavigationMenuTrigger as g, propsNavigationMenuContent as u, propsNavigationMenuLink as v, propsNavigationMenuList as N, propsNavigationMenuViewport as m } from "./__generated__/navigation-menu.props.js";
5
- const d = {
6
- type: "container",
7
- icon: e,
8
- presetStyle: {
9
- div: t
4
+ import { propsNavigationMenu as p, propsNavigationMenuItem as g, propsNavigationMenuTrigger as M, propsNavigationMenuContent as u, propsNavigationMenuLink as l, propsNavigationMenuList as v, propsNavigationMenuViewport as N } from "./__generated__/navigation-menu.props.js";
5
+ const y = {
6
+ icon: t,
7
+ contentModel: {
8
+ category: "instance",
9
+ children: ["instance"],
10
+ descendants: [n.NavigationMenuList, n.NavigationMenuViewport]
10
11
  },
11
- constraints: [
12
- {
13
- relation: "descendant",
14
- component: { $eq: n.NavigationMenuList }
15
- },
16
- {
17
- relation: "descendant",
18
- component: { $eq: n.NavigationMenuViewport }
19
- }
20
- ]
21
- }, $ = {
22
- type: "container",
23
- icon: o,
24
- constraints: [
25
- {
26
- relation: "ancestor",
27
- component: { $eq: n.NavigationMenu }
28
- },
29
- {
30
- relation: "descendant",
31
- component: { $eq: n.NavigationMenuItem }
32
- }
33
- ],
34
12
  presetStyle: {
35
- div: t
13
+ div: e
14
+ }
15
+ }, h = {
16
+ icon: o,
17
+ label: "Menu List",
18
+ contentModel: {
19
+ category: "none",
20
+ children: ["instance"],
21
+ descendants: [n.NavigationMenuItem]
36
22
  },
37
- label: "Menu List"
38
- }, q = {
39
- type: "container",
23
+ presetStyle: {
24
+ div: e
25
+ }
26
+ }, b = {
40
27
  icon: i,
41
- constraints: {
42
- relation: "ancestor",
43
- component: { $eq: n.NavigationMenuList }
28
+ label: "Menu Item",
29
+ indexWithinAncestor: n.NavigationMenu,
30
+ contentModel: {
31
+ category: "none",
32
+ children: ["instance"],
33
+ descendants: [
34
+ n.NavigationMenuTrigger,
35
+ n.NavigationMenuContent,
36
+ n.NavigationMenuLink
37
+ ]
44
38
  },
45
39
  presetStyle: {
46
- div: t
47
- },
48
- indexWithinAncestor: n.NavigationMenu,
49
- label: "Menu Item"
50
- }, b = {
51
- type: "container",
40
+ div: e
41
+ }
42
+ }, k = {
52
43
  icon: a,
53
- constraints: {
54
- relation: "ancestor",
55
- component: { $eq: n.NavigationMenuItem }
56
- },
57
- label: "Menu Trigger"
44
+ label: "Menu Trigger",
45
+ contentModel: {
46
+ category: "none",
47
+ children: ["instance"]
48
+ }
58
49
  }, w = {
59
- type: "container",
60
50
  icon: r,
61
- constraints: {
62
- relation: "ancestor",
63
- component: { $eq: n.NavigationMenuItem }
51
+ label: "Menu Content",
52
+ contentModel: {
53
+ category: "none",
54
+ children: ["instance"],
55
+ descendants: [n.NavigationMenuLink]
64
56
  },
65
- indexWithinAncestor: n.NavigationMenu,
66
57
  presetStyle: {
67
- div: t
68
- },
69
- label: "Menu Content"
58
+ div: e
59
+ }
70
60
  }, C = {
71
- type: "container",
72
- icon: p,
73
- constraints: [
74
- {
75
- relation: "ancestor",
76
- component: { $eq: n.NavigationMenu }
77
- },
78
- {
79
- relation: "ancestor",
80
- component: {
81
- $in: [n.NavigationMenuContent, n.NavigationMenuItem]
82
- }
83
- }
84
- ],
85
- label: "Accessible Link Wrapper"
86
- }, V = {
87
- type: "container",
88
61
  icon: s,
89
- constraints: {
90
- relation: "ancestor",
91
- component: { $eq: n.NavigationMenu }
62
+ label: "Accessible Link Wrapper",
63
+ contentModel: {
64
+ category: "none",
65
+ children: ["instance"]
66
+ }
67
+ }, T = {
68
+ icon: c,
69
+ label: "Menu Viewport",
70
+ contentModel: {
71
+ category: "none",
72
+ children: ["instance"]
92
73
  },
93
74
  presetStyle: {
94
- div: t
95
- },
96
- label: "Menu Viewport"
97
- }, x = {
98
- props: c
75
+ div: e
76
+ }
77
+ }, V = {
78
+ props: p
99
79
  }, S = {
100
- props: M
101
- }, T = {
102
80
  props: g
103
81
  }, f = {
82
+ props: M
83
+ }, x = {
104
84
  props: u
105
- }, k = {
106
- props: v
107
85
  }, A = {
108
- props: N
86
+ props: l
109
87
  }, W = {
110
- props: m
88
+ props: v
89
+ }, B = {
90
+ props: N
111
91
  };
112
92
  export {
113
- d as metaNavigationMenu,
93
+ y as metaNavigationMenu,
114
94
  w as metaNavigationMenuContent,
115
- q as metaNavigationMenuItem,
95
+ b as metaNavigationMenuItem,
116
96
  C as metaNavigationMenuLink,
117
- $ as metaNavigationMenuList,
118
- b as metaNavigationMenuTrigger,
119
- V as metaNavigationMenuViewport,
120
- x as propsMetaNavigationMenu,
121
- f as propsMetaNavigationMenuContent,
97
+ h as metaNavigationMenuList,
98
+ k as metaNavigationMenuTrigger,
99
+ T as metaNavigationMenuViewport,
100
+ V as propsMetaNavigationMenu,
101
+ x as propsMetaNavigationMenuContent,
122
102
  S as propsMetaNavigationMenuItem,
123
- k as propsMetaNavigationMenuLink,
124
- A as propsMetaNavigationMenuList,
125
- T as propsMetaNavigationMenuTrigger,
126
- W as propsMetaNavigationMenuViewport
103
+ A as propsMetaNavigationMenuLink,
104
+ W as propsMetaNavigationMenuList,
105
+ f as propsMetaNavigationMenuTrigger,
106
+ B as propsMetaNavigationMenuViewport
127
107
  };
package/lib/popover.ws.js CHANGED
@@ -1,51 +1,43 @@
1
- import { TriggerIcon as e, ContentIcon as r, PopoverIcon as n } from "@webstudio-is/icons/svg";
1
+ import { TriggerIcon as e, ContentIcon as n, PopoverIcon as r } from "@webstudio-is/icons/svg";
2
2
  import { div as t } from "@webstudio-is/sdk/normalize.css";
3
3
  import { radix as o } from "./shared/meta.js";
4
4
  import { propsPopover as p, propsPopoverTrigger as i, propsPopoverContent as s } from "./__generated__/popover.props.js";
5
5
  const v = {
6
- type: "container",
7
6
  icon: e,
8
- constraints: {
9
- relation: "ancestor",
10
- component: { $eq: o.Popover }
7
+ contentModel: {
8
+ category: "none",
9
+ children: ["instance"]
11
10
  }
12
- }, g = {
13
- type: "container",
11
+ }, d = {
12
+ icon: n,
13
+ contentModel: {
14
+ category: "none",
15
+ children: ["instance"]
16
+ },
14
17
  presetStyle: {
15
18
  div: t
16
- },
17
- icon: r,
18
- constraints: {
19
- relation: "ancestor",
20
- component: { $eq: o.Popover }
21
19
  }
22
20
  }, l = {
23
- type: "container",
24
- icon: n,
25
- constraints: [
26
- {
27
- relation: "descendant",
28
- component: { $eq: o.PopoverTrigger }
29
- },
30
- {
31
- relation: "descendant",
32
- component: { $eq: o.PopoverContent }
33
- }
34
- ]
35
- }, d = {
21
+ icon: r,
22
+ contentModel: {
23
+ category: "instance",
24
+ children: ["instance"],
25
+ descendants: [o.PopoverTrigger, o.PopoverContent]
26
+ }
27
+ }, m = {
36
28
  props: p,
37
29
  initialProps: ["open"]
38
30
  }, f = {
39
31
  props: i
40
- }, C = {
32
+ }, M = {
41
33
  props: s,
42
34
  initialProps: ["side", "sideOffset", "align", "alignOffset"]
43
35
  };
44
36
  export {
45
37
  l as metaPopover,
46
- g as metaPopoverContent,
38
+ d as metaPopoverContent,
47
39
  v as metaPopoverTrigger,
48
- d as propsMetaPopover,
49
- C as propsMetaPopoverContent,
40
+ m as propsMetaPopover,
41
+ M as propsMetaPopoverContent,
50
42
  f as propsMetaPopoverTrigger
51
43
  };
@@ -1,18 +1,18 @@
1
- import { RadioGroupIcon as e, ItemIcon as r, TriggerIcon as a } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/sdk";
3
- import { div as n, button as p, span as s } from "@webstudio-is/sdk/normalize.css";
4
- import { radix as o } from "./shared/meta.js";
5
- import { buttonReset as i } from "./shared/preset-styles.js";
6
- import { propsRadioGroup as c, propsRadioGroupItem as d, propsRadioGroupIndicator as m } from "./__generated__/radio-group.props.js";
1
+ import { RadioGroupIcon as e, ItemIcon as a, TriggerIcon as r } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as o } from "@webstudio-is/sdk";
3
+ import { div as n, button as s, span as c } from "@webstudio-is/sdk/normalize.css";
4
+ import { radix as t } from "./shared/meta.js";
5
+ import { buttonReset as p } from "./shared/preset-styles.js";
6
+ import { propsRadioGroup as i, propsRadioGroupItem as d, propsRadioGroupIndicator as m } from "./__generated__/radio-group.props.js";
7
7
  const y = {
8
- type: "container",
9
- constraints: {
10
- relation: "descendant",
11
- component: { $eq: o.RadioGroupItem }
12
- },
13
8
  icon: e,
9
+ contentModel: {
10
+ category: "instance",
11
+ children: ["instance"],
12
+ descendants: [t.RadioGroupItem]
13
+ },
14
14
  states: [
15
- ...t,
15
+ ...o,
16
16
  {
17
17
  label: "Checked",
18
18
  selector: "[data-state=checked]",
@@ -27,38 +27,31 @@ const y = {
27
27
  presetStyle: {
28
28
  div: n
29
29
  }
30
- }, b = {
31
- type: "container",
32
- constraints: [
33
- {
34
- relation: "ancestor",
35
- component: { $eq: o.RadioGroup }
36
- },
37
- {
38
- relation: "descendant",
39
- component: { $eq: o.RadioGroupIndicator }
40
- }
41
- ],
42
- icon: r,
43
- states: t,
30
+ }, g = {
31
+ icon: a,
32
+ contentModel: {
33
+ category: "none",
34
+ children: ["instance"],
35
+ descendants: [t.RadioGroupIndicator]
36
+ },
37
+ states: o,
44
38
  presetStyle: {
45
- button: [p, i].flat()
39
+ button: [s, p].flat()
46
40
  }
47
- }, q = {
48
- type: "container",
49
- icon: a,
50
- constraints: {
51
- relation: "ancestor",
52
- component: { $eq: o.RadioGroupItem }
41
+ }, h = {
42
+ icon: r,
43
+ contentModel: {
44
+ category: "none",
45
+ children: ["instance"]
53
46
  },
54
- states: t,
47
+ states: o,
55
48
  presetStyle: {
56
- span: s
49
+ span: c
57
50
  }
58
- }, g = {
59
- props: c,
51
+ }, M = {
52
+ props: i,
60
53
  initialProps: ["id", "className", "name", "value", "required"]
61
- }, h = {
54
+ }, b = {
62
55
  props: d,
63
56
  initialProps: ["value"]
64
57
  }, k = {
@@ -66,9 +59,9 @@ const y = {
66
59
  };
67
60
  export {
68
61
  y as metaRadioGroup,
69
- q as metaRadioGroupIndicator,
70
- b as metaRadioGroupItem,
71
- g as propsMetaRadioGroup,
62
+ h as metaRadioGroupIndicator,
63
+ g as metaRadioGroupItem,
64
+ M as propsMetaRadioGroup,
72
65
  k as propsMetaRadioGroupIndicator,
73
- h as propsMetaRadioGroupItem
66
+ b as propsMetaRadioGroupItem
74
67
  };