@serendie/ui 0.1.13 → 0.1.14

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 (31) hide show
  1. package/dist/components/AccordionGroup.d.ts +1 -1
  2. package/dist/components/DropdownMenu.js +67 -55
  3. package/dist/components/IconButton.d.ts +35 -5
  4. package/dist/components/Search.js +44 -29
  5. package/dist/components/Select.d.ts +3 -1
  6. package/dist/components/Select.js +29 -19
  7. package/dist/components/TextArea.js +5 -4
  8. package/dist/preset.d.ts +1 -1
  9. package/dist/styles.css +1 -1
  10. package/dist/ui/styled-system/css/conditions.js +13 -13
  11. package/dist/ui/styled-system/helpers.js +104 -101
  12. package/dist/ui/styled-system/jsx/is-valid-prop.js +1 -1
  13. package/package.json +2 -2
  14. package/styled-system/css/conditions.js +4 -2
  15. package/styled-system/helpers.js +15 -5
  16. package/styled-system/jsx/is-valid-prop.js +2 -2
  17. package/styled-system/themes/index.js +1 -1
  18. package/styled-system/tokens/tokens.d.ts +1 -1
  19. package/styled-system/types/composition.d.ts +26 -0
  20. package/styled-system/types/conditions.d.ts +35 -3
  21. package/styled-system/types/global.d.ts +1 -0
  22. package/styled-system/types/jsx.d.ts +1 -1
  23. package/styled-system/types/prop-type.d.ts +3 -8
  24. package/styled-system/types/selectors.d.ts +1 -1
  25. package/styled-system/types/static-css.d.ts +9 -4
  26. package/styled-system/types/style-props.d.ts +229 -205
  27. package/styled-system/types/system-types.d.ts +108 -3
  28. /package/styled-system/themes/{asagi.json → theme-asagi.json} +0 -0
  29. /package/styled-system/themes/{kurikawa.json → theme-kurikawa.json} +0 -0
  30. /package/styled-system/themes/{sumire.json → theme-sumire.json} +0 -0
  31. /package/styled-system/themes/{tsutsuji.json → theme-tsutsuji.json} +0 -0
@@ -1,2 +1,2 @@
1
1
  import { Accordion } from '@ark-ui/react';
2
- export declare const AccordionGroup: import('../../styled-system/jsx').StyledComponent<import('react').ForwardRefExoticComponent<Accordion.RootProps & import('react').RefAttributes<HTMLDivElement>>, {}>;
2
+ export declare const AccordionGroup: import('../../styled-system/types').StyledComponent<import('react').ForwardRefExoticComponent<Accordion.RootProps & import('react').RefAttributes<HTMLDivElement>>, {}>;
@@ -1,4 +1,4 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
2
  import "../preset.js";
3
3
  import "./Accordion.js";
4
4
  import "./AccordionGroup.js";
@@ -7,9 +7,9 @@ import "./Badge.js";
7
7
  import "./Banner.js";
8
8
  import "../ui/styled-system/css/css.js";
9
9
  import "../ui/styled-system/helpers.js";
10
- import { sva as l } from "../ui/styled-system/css/sva.js";
10
+ import { sva as c } from "../ui/styled-system/css/sva.js";
11
11
  import "./BottomNavigationItem.js";
12
- import { Button as c } from "./Button.js";
12
+ import { Button as l } from "./Button.js";
13
13
  import "./CheckBox.js";
14
14
  import "./ChoiceBox.js";
15
15
  import "./DashboardWidget.js";
@@ -31,15 +31,15 @@ import "./TextArea.js";
31
31
  import "./TextField.js";
32
32
  import "./Toast.js";
33
33
  import "./TopAppBar.js";
34
- import { SerendieSymbol as s } from "../node_modules/@serendie/symbols/dist/symbols2.js";
34
+ import { SerendieSymbol as m } from "../node_modules/@serendie/symbols/dist/symbols2.js";
35
35
  import { Portal as u } from "../node_modules/@ark-ui/react/dist/components/portal/portal.js";
36
36
  import { MenuRoot as g } from "../node_modules/@ark-ui/react/dist/components/menu/menu-root.js";
37
37
  import { MenuTrigger as h } from "../node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js";
38
38
  import { MenuPositioner as f } from "../node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js";
39
- import { MenuContent as b } from "../node_modules/@ark-ui/react/dist/components/menu/menu-content.js";
40
- import { MenuItemGroup as x } from "../node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js";
39
+ import { MenuContent as x } from "../node_modules/@ark-ui/react/dist/components/menu/menu-content.js";
40
+ import { MenuItemGroup as b } from "../node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js";
41
41
  import { MenuItem as S } from "../node_modules/@ark-ui/react/dist/components/menu/menu-item.js";
42
- const v = l({
42
+ const v = c({
43
43
  slots: ["content", "itemGroup", "item", "itemIcon", "button", "buttonIcon"],
44
44
  base: {
45
45
  content: {
@@ -110,65 +110,77 @@ const v = l({
110
110
  transition: "transform 0.2s"
111
111
  }
112
112
  }
113
- }), pe = ({
113
+ }), ao = ({
114
114
  styleType: r = "default",
115
115
  title: i,
116
116
  items: d,
117
- disabled: m,
117
+ disabled: s,
118
118
  icon: p,
119
119
  ...a
120
120
  }) => {
121
- const o = v();
122
- return /* @__PURE__ */ n(g, { ...a, children: [
123
- /* @__PURE__ */ e(h, { asChild: !0, children: r === "iconButton" ? /* @__PURE__ */ e(
124
- y,
125
- {
126
- icon: p || /* @__PURE__ */ e(
127
- s,
121
+ const e = v();
122
+ return /* @__PURE__ */ n(
123
+ g,
124
+ {
125
+ positioning: {
126
+ offset: {
127
+ mainAxis: 1,
128
+ crossAxis: 0
129
+ }
130
+ },
131
+ ...a,
132
+ children: [
133
+ /* @__PURE__ */ o(h, { asChild: !0, children: r === "iconButton" ? /* @__PURE__ */ o(
134
+ y,
128
135
  {
129
- name: "menu",
130
- size: 24,
131
- className: o.buttonIcon
136
+ icon: p || /* @__PURE__ */ o(
137
+ m,
138
+ {
139
+ name: "menu",
140
+ size: 24,
141
+ className: e.buttonIcon
142
+ }
143
+ ),
144
+ shape: "rectangle",
145
+ disabled: s,
146
+ styleType: "outlined",
147
+ title: i
132
148
  }
133
- ),
134
- shape: "rectangle",
135
- disabled: m,
136
- styleType: "outlined",
137
- title: i
138
- }
139
- ) : /* @__PURE__ */ e(
140
- c,
141
- {
142
- styleType: "rectangle",
143
- size: "medium",
144
- disabled: m,
145
- rightIcon: /* @__PURE__ */ e(
146
- s,
149
+ ) : /* @__PURE__ */ o(
150
+ l,
147
151
  {
148
- name: "chevron-down",
149
- size: 24,
150
- className: o.buttonIcon
152
+ styleType: "rectangle",
153
+ size: "medium",
154
+ disabled: s,
155
+ rightIcon: /* @__PURE__ */ o(
156
+ m,
157
+ {
158
+ name: "chevron-down",
159
+ size: 24,
160
+ className: e.buttonIcon
161
+ }
162
+ ),
163
+ className: e.button,
164
+ children: i
151
165
  }
152
- ),
153
- className: o.button,
154
- children: i
155
- }
156
- ) }),
157
- /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(b, { className: o.content, children: /* @__PURE__ */ e(x, { className: o.itemGroup, children: d.map((t) => /* @__PURE__ */ n(
158
- S,
159
- {
160
- value: t.value,
161
- className: o.item,
162
- children: [
163
- t.icon && /* @__PURE__ */ e("div", { className: o.itemIcon, children: t.icon }),
164
- t.label
165
- ]
166
- },
167
- t.value
168
- )) }) }) }) })
169
- ] });
166
+ ) }),
167
+ /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(x, { className: e.content, children: /* @__PURE__ */ o(b, { className: e.itemGroup, children: d.map((t) => /* @__PURE__ */ n(
168
+ S,
169
+ {
170
+ value: t.value,
171
+ className: e.item,
172
+ children: [
173
+ t.icon && /* @__PURE__ */ o("div", { className: e.itemIcon, children: t.icon }),
174
+ t.label
175
+ ]
176
+ },
177
+ t.value
178
+ )) }) }) }) })
179
+ ]
180
+ }
181
+ );
170
182
  };
171
183
  export {
172
- pe as DropdownMenu,
184
+ ao as DropdownMenu,
173
185
  v as DropdownMenuStyle
174
186
  };
@@ -1,5 +1,4 @@
1
- import { default as React, ComponentProps } from 'react';
2
- import { RecipeVariantProps } from '../../styled-system/types';
1
+ import { default as React } from 'react';
3
2
  export declare const IconButtonStyle: import('../../styled-system/types').RecipeRuntimeFn<{
4
3
  shape: {
5
4
  rectangle: {
@@ -74,8 +73,39 @@ export declare const IconButtonStyle: import('../../styled-system/types').Recipe
74
73
  };
75
74
  };
76
75
  }>;
77
- type ButtonProps = RecipeVariantProps<typeof IconButtonStyle> & ComponentProps<"button"> & {
78
- icon: React.ReactElement;
76
+ type StyleType = "filled" | "outlined" | "ghost";
77
+ type Size = "large" | "medium" | "small";
78
+ type RectangleProps = {
79
+ shape: "rectangle";
80
+ size?: Exclude<Size, "large">;
81
+ };
82
+ type CircleProps = {
83
+ shape: "circle";
84
+ size?: Exclude<Size, "large">;
85
+ styleType?: StyleType;
86
+ };
87
+ type CircleLargeProps = {
88
+ shape: "circle";
89
+ size: "large";
90
+ styleType?: Exclude<StyleType, "ghost">;
79
91
  };
80
- export declare const IconButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
92
+ export declare const IconButton: React.ForwardRefExoticComponent<(Omit<{
93
+ shape?: "circle" | "rectangle" | undefined;
94
+ styleType?: "filled" | "outlined" | "ghost" | undefined;
95
+ size?: "small" | "large" | "medium" | undefined;
96
+ } & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
97
+ icon: React.ReactElement;
98
+ } & RectangleProps, "ref"> | Omit<{
99
+ shape?: "circle" | "rectangle" | undefined;
100
+ styleType?: "filled" | "outlined" | "ghost" | undefined;
101
+ size?: "small" | "large" | "medium" | undefined;
102
+ } & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
103
+ icon: React.ReactElement;
104
+ } & CircleProps, "ref"> | Omit<{
105
+ shape?: "circle" | "rectangle" | undefined;
106
+ styleType?: "filled" | "outlined" | "ghost" | undefined;
107
+ size?: "small" | "large" | "medium" | undefined;
108
+ } & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
109
+ icon: React.ReactElement;
110
+ } & CircleLargeProps, "ref">) & React.RefAttributes<HTMLButtonElement>>;
81
111
  export {};
@@ -1,4 +1,4 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
2
  import "../ui/styled-system/css/css.js";
3
3
  import { cx as c } from "../ui/styled-system/css/cx.js";
4
4
  import "../ui/styled-system/helpers.js";
@@ -146,38 +146,53 @@ const a = p({
146
146
  defaultVariants: {
147
147
  size: "medium"
148
148
  }
149
- }), A = ({
150
- items: e = [],
149
+ }), q = ({
150
+ items: i = [],
151
151
  ...d
152
152
  }) => {
153
- const [r, t] = a.splitVariantProps(d), s = a(r);
154
- return /* @__PURE__ */ i(x, { items: e, lazyMount: !0, unmountOnExit: !0, ...t, children: [
155
- /* @__PURE__ */ i(b, { className: c(s.control, t.className), children: [
156
- /* @__PURE__ */ o("div", { className: s.iconBox, children: /* @__PURE__ */ o(m, { name: "magnifying-glass", className: s.icon }) }),
157
- /* @__PURE__ */ o(u, { className: s.input }),
158
- e.length > 0 && /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o("div", { className: s.closeIcon, children: /* @__PURE__ */ o(m, { name: "close", className: s.icon }) }) })
159
- ] }),
160
- e.length > 0 && /* @__PURE__ */ o(y, { children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(S, { className: s.combobox, children: /* @__PURE__ */ o(w, { id: "framework", children: e.map((n, l) => /* @__PURE__ */ i(
161
- C,
162
- {
163
- item: n,
164
- className: s.comboboxItem,
165
- children: [
166
- /* @__PURE__ */ o(
167
- g,
168
- {
169
- w: "sd.system.dimension.spacing.large",
170
- h: "sd.system.dimension.spacing.large"
171
- }
172
- ),
173
- /* @__PURE__ */ o(I, { children: n })
174
- ]
153
+ const [r, n] = a.splitVariantProps(d), s = a(r);
154
+ return /* @__PURE__ */ e(
155
+ x,
156
+ {
157
+ items: i,
158
+ lazyMount: !0,
159
+ unmountOnExit: !0,
160
+ positioning: {
161
+ offset: {
162
+ mainAxis: 2,
163
+ crossAxis: 0
164
+ }
175
165
  },
176
- l
177
- )) }) }) }) })
178
- ] });
166
+ ...n,
167
+ children: [
168
+ /* @__PURE__ */ e(b, { className: c(s.control, n.className), children: [
169
+ /* @__PURE__ */ o("div", { className: s.iconBox, children: /* @__PURE__ */ o(m, { name: "magnifying-glass", className: s.icon }) }),
170
+ /* @__PURE__ */ o(u, { className: s.input }),
171
+ i.length > 0 && /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o("div", { className: s.closeIcon, children: /* @__PURE__ */ o(m, { name: "close", className: s.icon }) }) })
172
+ ] }),
173
+ i.length > 0 && /* @__PURE__ */ o(y, { children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(S, { className: s.combobox, children: /* @__PURE__ */ o(w, { id: "framework", children: i.map((t, l) => /* @__PURE__ */ e(
174
+ C,
175
+ {
176
+ item: t,
177
+ className: s.comboboxItem,
178
+ children: [
179
+ /* @__PURE__ */ o(
180
+ g,
181
+ {
182
+ w: "sd.system.dimension.spacing.large",
183
+ h: "sd.system.dimension.spacing.large"
184
+ }
185
+ ),
186
+ /* @__PURE__ */ o(I, { children: t })
187
+ ]
188
+ },
189
+ l
190
+ )) }) }) }) })
191
+ ]
192
+ }
193
+ );
179
194
  };
180
195
  export {
181
- A as Search,
196
+ q as Search,
182
197
  a as SearchStyle
183
198
  };
@@ -22,7 +22,9 @@ export declare const SelectStyle: import('../../styled-system/types').SlotRecipe
22
22
  };
23
23
  small: {
24
24
  root: {
25
- gridTemplateColumns: "minmax(auto, 150px)";
25
+ "@layer components": {
26
+ width: "min(100%, 150px)";
27
+ };
26
28
  textStyle: {
27
29
  base: "sd.system.typography.body.small_compact";
28
30
  };
@@ -3,8 +3,8 @@ import { css as d } from "../ui/styled-system/css/css.js";
3
3
  import { cx as h } from "../ui/styled-system/css/cx.js";
4
4
  import "../ui/styled-system/helpers.js";
5
5
  import { sva as b } from "../ui/styled-system/css/sva.js";
6
- import { useId as S } from "react";
7
- import { ListItem as f } from "./ListItem.js";
6
+ import { useId as f } from "react";
7
+ import { ListItem as S } from "./ListItem.js";
8
8
  import { List as v } from "./List.js";
9
9
  import { SerendieSymbol as w } from "../node_modules/@serendie/symbols/dist/symbols2.js";
10
10
  import { Portal as _ } from "../node_modules/@ark-ui/react/dist/components/portal/portal.js";
@@ -16,12 +16,14 @@ import { SelectValueText as R } from "../node_modules/@ark-ui/react/dist/compone
16
16
  import { SelectPositioner as I } from "../node_modules/@ark-ui/react/dist/components/select/select-positioner.js";
17
17
  import { SelectContent as V } from "../node_modules/@ark-ui/react/dist/components/select/select-content.js";
18
18
  import { SelectItem as B } from "../node_modules/@ark-ui/react/dist/components/select/select-item.js";
19
- const n = b({
19
+ const l = b({
20
20
  slots: ["root", "valueText", "trigger", "content", "item", "iconBox"],
21
21
  base: {
22
22
  root: {
23
23
  display: "inline-grid",
24
- gridTemplateColumns: "minmax(auto, 300px)",
24
+ "@layer components": {
25
+ width: "min(100%, 300px)"
26
+ },
25
27
  rowGap: "sd.system.dimension.spacing.extraSmall"
26
28
  },
27
29
  trigger: {
@@ -120,7 +122,9 @@ const n = b({
120
122
  },
121
123
  small: {
122
124
  root: {
123
- gridTemplateColumns: "minmax(auto, 150px)",
125
+ "@layer components": {
126
+ width: "min(100%, 150px)"
127
+ },
124
128
  textStyle: {
125
129
  base: "sd.system.typography.body.small_compact"
126
130
  }
@@ -151,23 +155,29 @@ const n = b({
151
155
  }
152
156
  }), Y = ({
153
157
  placeholder: c = "",
154
- label: m,
158
+ label: r,
155
159
  required: p,
156
- invalid: a,
157
- invalidMessage: r,
160
+ invalid: m,
161
+ invalidMessage: a,
158
162
  className: y,
159
- ...l
163
+ ...n
160
164
  }) => {
161
- const [o, g] = n.splitVariantProps(l), s = n(o), u = S();
165
+ const [o, g] = l.splitVariantProps(n), s = l(o), u = f();
162
166
  return /* @__PURE__ */ i(
163
167
  C,
164
168
  {
165
169
  ...g,
166
- invalid: a,
170
+ invalid: m,
167
171
  className: h(s.root, y),
168
- positioning: { sameWidth: !0 },
172
+ positioning: {
173
+ sameWidth: !0,
174
+ offset: {
175
+ mainAxis: 1,
176
+ crossAxis: 0
177
+ }
178
+ },
169
179
  children: [
170
- m && o.size != "small" && // smallの場合はラベルを表示しない
180
+ r && o.size != "small" && // smallの場合はラベルを表示しない
171
181
  /* @__PURE__ */ i(
172
182
  T,
173
183
  {
@@ -178,7 +188,7 @@ const n = b({
178
188
  }
179
189
  }),
180
190
  children: [
181
- m,
191
+ r,
182
192
  p && // とりあえず必須メッセージはハードコード
183
193
  /* @__PURE__ */ e(
184
194
  "span",
@@ -210,7 +220,7 @@ const n = b({
210
220
  }
211
221
  )
212
222
  ] }) }),
213
- a && r && /* @__PURE__ */ e(
223
+ m && a && /* @__PURE__ */ e(
214
224
  "div",
215
225
  {
216
226
  className: d({
@@ -220,11 +230,11 @@ const n = b({
220
230
  },
221
231
  color: "sd.system.color.impression.negative"
222
232
  }),
223
- children: r
233
+ children: a
224
234
  }
225
235
  ),
226
- /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(V, { className: s.content, children: /* @__PURE__ */ e(v, { id: u, children: l.items.map((t, x) => /* @__PURE__ */ e(B, { item: t, children: /* @__PURE__ */ e(
227
- f,
236
+ /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(V, { className: s.content, children: /* @__PURE__ */ e(v, { id: u, children: n.items.map((t, x) => /* @__PURE__ */ e(B, { item: t, children: /* @__PURE__ */ e(
237
+ S,
228
238
  {
229
239
  title: t.label,
230
240
  value: t.value,
@@ -238,5 +248,5 @@ const n = b({
238
248
  };
239
249
  export {
240
250
  Y as Select,
241
- n as SelectStyle
251
+ l as SelectStyle
242
252
  };
@@ -4,8 +4,8 @@ import _ from "../node_modules/merge-refs/dist/esm/index.js";
4
4
  import "../ui/styled-system/css/css.js";
5
5
  import { cx as w } from "../ui/styled-system/css/cx.js";
6
6
  import "../ui/styled-system/helpers.js";
7
- import { sva as N } from "../ui/styled-system/css/sva.js";
8
- const c = N({
7
+ import { sva as C } from "../ui/styled-system/css/sva.js";
8
+ const c = C({
9
9
  slots: [
10
10
  "root",
11
11
  "label",
@@ -44,6 +44,7 @@ const c = N({
44
44
  outlineWidth: "sd.system.dimension.border.medium",
45
45
  outlineColor: "sd.system.color.component.outline",
46
46
  borderRadius: "sd.system.dimension.radius.medium",
47
+ backgroundColor: "sd.system.color.component.surface",
47
48
  _focusWithin: {
48
49
  outlineWidth: "sd.system.dimension.border.thick",
49
50
  outlineColor: "sd.system.color.impression.primary"
@@ -96,7 +97,7 @@ const c = N({
96
97
  }
97
98
  }
98
99
  }
99
- }), k = v(
100
+ }), j = v(
100
101
  ({
101
102
  placeholder: y,
102
103
  label: r,
@@ -142,5 +143,5 @@ const c = N({
142
143
  }
143
144
  );
144
145
  export {
145
- k as TextArea
146
+ j as TextArea
146
147
  };
package/dist/preset.d.ts CHANGED
@@ -537,7 +537,7 @@ export declare const SerendiePreset: {
537
537
  breakpoints: {
538
538
  expanded: string;
539
539
  };
540
- recipes: import('@pandacss/types').RecipeVariantRecord;
540
+ recipes: import('@pandacss/dev').RecipeVariantRecord;
541
541
  tokens: {
542
542
  sizes: {
543
543
  sd: {