@serendie/ui 2.1.3 → 2.2.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 (122) hide show
  1. package/dist/client.js +79 -74
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Avatar/Avatar.d.ts +1 -1
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
  6. package/dist/components/Button/Button.d.ts +2 -2
  7. package/dist/components/Button/Button.js +22 -21
  8. package/dist/components/DatePicker/DatePicker.d.ts +13 -0
  9. package/dist/components/DatePicker/DatePicker.js +203 -0
  10. package/dist/components/DatePicker/index.d.ts +2 -0
  11. package/dist/components/DatePicker/index.js +6 -0
  12. package/dist/components/DatePicker/parseDate.d.ts +1 -0
  13. package/dist/components/DatePicker/styles.d.ts +1 -0
  14. package/dist/components/DatePicker/styles.js +224 -0
  15. package/dist/components/IconButton/IconButton.d.ts +3 -3
  16. package/dist/components/List/ListItem.d.ts +1 -1
  17. package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
  18. package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
  19. package/dist/components/Pagination/Pagination.d.ts +1 -1
  20. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
  21. package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
  22. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
  23. package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
  24. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
  25. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
  26. package/dist/components/ProgressIndicator/index.d.ts +4 -1
  27. package/dist/components/ProgressIndicator/index.js +3 -2
  28. package/dist/components/ProgressIndicator/util.d.ts +1 -0
  29. package/dist/components/ProgressIndicator/util.js +13 -0
  30. package/dist/components/Search/Search.d.ts +1 -1
  31. package/dist/components/Select/Select.d.ts +1 -1
  32. package/dist/components/Switch/Switch.d.ts +1 -1
  33. package/dist/components/Tabs/Tabs.d.ts +1 -1
  34. package/dist/components/TextField/TextField.js +59 -156
  35. package/dist/components/Toast/Toast.d.ts +1 -1
  36. package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +80 -75
  39. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
  40. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
  41. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
  42. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
  43. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
  44. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
  45. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
  47. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
  48. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
  49. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
  50. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
  51. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
  52. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
  53. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
  54. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
  55. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
  56. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
  57. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
  58. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
  59. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
  60. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
  61. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
  62. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
  63. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
  64. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
  65. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
  66. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
  67. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
  68. package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
  69. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
  70. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
  71. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
  72. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
  73. package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
  74. package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
  75. package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
  76. package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
  77. package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
  78. package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
  79. package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
  80. package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
  81. package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
  82. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
  83. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
  84. package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
  85. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
  86. package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
  87. package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
  88. package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
  89. package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
  90. package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
  91. package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
  92. package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
  93. package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
  94. package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
  98. package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
  99. package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
  100. package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
  101. package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
  102. package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
  103. package/dist/preset.d.ts +11 -1
  104. package/dist/recipes/index.d.ts +3 -2
  105. package/dist/recipes/index.js +5 -2
  106. package/dist/recipes/textFieldRecipe.d.ts +6 -0
  107. package/dist/recipes/textFieldRecipe.js +107 -0
  108. package/dist/styled-system/css/cva.js +43 -38
  109. package/dist/styled-system/recipes/create-recipe.js +37 -0
  110. package/dist/styled-system/recipes/text-field-recipe.js +61 -0
  111. package/dist/styles.css +1 -1
  112. package/dist/tokens/keyframes/index.d.ts +8 -0
  113. package/dist/tokens/keyframes/index.js +6 -2
  114. package/package.json +3 -3
  115. package/styled-system/recipes/create-recipe.js +82 -0
  116. package/styled-system/recipes/index.d.ts +2 -0
  117. package/styled-system/recipes/index.js +1 -0
  118. package/styled-system/recipes/text-field-recipe.d.ts +28 -0
  119. package/styled-system/recipes/text-field-recipe.js +72 -0
  120. package/styled-system/types/prop-type.d.ts +1 -1
  121. package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
  122. package/dist/node_modules/proxy-compare/dist/index.js +0 -7
@@ -0,0 +1,215 @@
1
+ import { jsx as i, jsxs as p } from "react/jsx-runtime";
2
+ import { AnimatedArc as h } from "./AnimatedArc.js";
3
+ import { cx as c } from "../../styled-system/css/cx.js";
4
+ import { cva as o } from "../../styled-system/css/cva.js";
5
+ const m = o({
6
+ base: {
7
+ position: "relative",
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ overflow: "hidden"
12
+ },
13
+ variants: {
14
+ type: {
15
+ linear: {
16
+ width: "100%",
17
+ borderRadius: "sd.system.dimension.radius.full"
18
+ },
19
+ circular: {}
20
+ },
21
+ size: {
22
+ small: {},
23
+ medium: {},
24
+ large: {}
25
+ },
26
+ color: {
27
+ primary: {},
28
+ subtle: {}
29
+ }
30
+ },
31
+ compoundVariants: [
32
+ {
33
+ type: "linear",
34
+ size: "small",
35
+ css: {
36
+ height: "2px"
37
+ }
38
+ },
39
+ {
40
+ type: "linear",
41
+ size: "medium",
42
+ css: {
43
+ height: "4px"
44
+ }
45
+ },
46
+ {
47
+ type: "linear",
48
+ size: "large",
49
+ css: {
50
+ height: "8px"
51
+ }
52
+ },
53
+ {
54
+ type: "circular",
55
+ size: "small",
56
+ css: {
57
+ width: "12px",
58
+ height: "12px"
59
+ }
60
+ },
61
+ {
62
+ type: "circular",
63
+ size: "medium",
64
+ css: {
65
+ width: "16px",
66
+ height: "16px"
67
+ }
68
+ },
69
+ {
70
+ type: "circular",
71
+ size: "large",
72
+ css: {
73
+ width: "40px",
74
+ height: "40px"
75
+ }
76
+ }
77
+ ],
78
+ defaultVariants: {
79
+ type: "linear",
80
+ size: "medium",
81
+ color: "primary"
82
+ }
83
+ }), g = o({
84
+ base: {
85
+ position: "absolute",
86
+ backgroundColor: "sd.reference.color.scale.gray.100"
87
+ },
88
+ variants: {
89
+ type: {
90
+ linear: {
91
+ width: "calc(100% - 4px)",
92
+ height: "100%",
93
+ borderRadius: "sd.system.dimension.radius.full"
94
+ },
95
+ circular: {
96
+ width: "100%",
97
+ height: "100%",
98
+ borderRadius: "50%",
99
+ fill: "none"
100
+ }
101
+ },
102
+ size: {
103
+ small: {},
104
+ medium: {},
105
+ large: {}
106
+ }
107
+ },
108
+ compoundVariants: []
109
+ }), u = o({
110
+ base: {
111
+ position: "absolute"
112
+ },
113
+ variants: {
114
+ type: {
115
+ linear: {
116
+ width: "50%",
117
+ height: "100%",
118
+ animation: "progressIndicatorSlide 1.7s cubic-bezier(0.65, 0.05, 0.36, 1) infinite"
119
+ },
120
+ circular: {
121
+ fill: "none",
122
+ strokeLinecap: "butt",
123
+ transformOrigin: "center"
124
+ }
125
+ },
126
+ size: {
127
+ small: {},
128
+ medium: {},
129
+ large: {}
130
+ },
131
+ color: {
132
+ primary: {
133
+ backgroundColor: "sd.system.color.impression.primary",
134
+ stroke: "sd.system.color.impression.primary"
135
+ },
136
+ subtle: {
137
+ backgroundColor: "sd.reference.color.scale.gray.300",
138
+ stroke: "sd.reference.color.scale.gray.300"
139
+ }
140
+ }
141
+ },
142
+ compoundVariants: []
143
+ }), y = (e) => ({
144
+ small: {
145
+ radius: 6,
146
+ strokeWidth: 2
147
+ },
148
+ medium: {
149
+ radius: 8,
150
+ strokeWidth: 6
151
+ },
152
+ large: {
153
+ radius: 20,
154
+ strokeWidth: 8
155
+ }
156
+ })[e], f = ({
157
+ type: e = "linear",
158
+ size: r = "medium",
159
+ color: s = "primary",
160
+ className: l,
161
+ style: n,
162
+ ...d
163
+ }) => {
164
+ if (e === "circular") {
165
+ const { radius: a, strokeWidth: t } = y(r);
166
+ return /* @__PURE__ */ i(
167
+ "div",
168
+ {
169
+ className: c(
170
+ m({ type: e, size: r, color: s }),
171
+ l
172
+ ),
173
+ role: "progressbar",
174
+ "aria-valuetext": "Loading",
175
+ style: n,
176
+ ...d,
177
+ children: /* @__PURE__ */ i(
178
+ "svg",
179
+ {
180
+ viewBox: `0 0 ${a * 2 + t * 2} ${a * 2 + t * 2}`,
181
+ children: /* @__PURE__ */ i(
182
+ h,
183
+ {
184
+ className: u({ type: e, size: r, color: s }),
185
+ radius: a,
186
+ width: t
187
+ }
188
+ )
189
+ }
190
+ )
191
+ }
192
+ );
193
+ }
194
+ return /* @__PURE__ */ p(
195
+ "div",
196
+ {
197
+ className: c(
198
+ m({ type: e, size: r, color: s }),
199
+ l
200
+ ),
201
+ role: "progressbar",
202
+ "aria-valuetext": "Loading",
203
+ style: n,
204
+ ...d,
205
+ children: [
206
+ /* @__PURE__ */ i("div", { className: g({ type: e, size: r }) }),
207
+ /* @__PURE__ */ i("div", { className: u({ type: e, size: r, color: s }) })
208
+ ]
209
+ }
210
+ );
211
+ };
212
+ f.displayName = "ProgressIndicatorIndeterminate";
213
+ export {
214
+ f as ProgressIndicatorIndeterminate
215
+ };
@@ -1 +1,4 @@
1
- export * from './ProgressIndicator.tsx';
1
+ export { ProgressIndicator } from './ProgressIndicator';
2
+ export type { ProgressIndicatorProps } from './ProgressIndicator';
3
+ export { ProgressIndicatorIndeterminate } from './ProgressIndicatorIndeterminate';
4
+ export type { ProgressIndicatorIndeterminateProps } from './ProgressIndicatorIndeterminate';
@@ -1,5 +1,6 @@
1
- import { ProgressIndicator as e, ProgressIndicatorStyle as s } from "./ProgressIndicator.js";
1
+ import { ProgressIndicator as e } from "./ProgressIndicator.js";
2
+ import { ProgressIndicatorIndeterminate as n } from "./ProgressIndicatorIndeterminate.js";
2
3
  export {
3
4
  e as ProgressIndicator,
4
- s as ProgressIndicatorStyle
5
+ n as ProgressIndicatorIndeterminate
5
6
  };
@@ -0,0 +1 @@
1
+ export declare const describeArc: (cx: number, cy: number, radius: number, startAngle: number, endAngle: number) => string;
@@ -0,0 +1,13 @@
1
+ const A = (n, e, t, o, s) => {
2
+ const a = (l, p, $, g) => {
3
+ const M = (g - 90) * Math.PI / 180;
4
+ return {
5
+ x: l + $ * Math.cos(M),
6
+ y: p + $ * Math.sin(M)
7
+ };
8
+ }, c = a(n, e, t, s), r = a(n, e, t, o), h = Math.abs((s - o) % 360) <= 180 ? "0" : "1";
9
+ return `M ${c.x} ${c.y} A ${t} ${t} 0 ${h} 0 ${r.x} ${r.y}`;
10
+ };
11
+ export {
12
+ A as describeArc
13
+ };
@@ -1,6 +1,6 @@
1
1
  import { ComboboxRootProps } from '@ark-ui/react';
2
2
  import { RecipeVariantProps } from '../../../styled-system/css';
3
- export declare const SearchStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"icon" | "input" | "combobox" | "control" | "comboboxItem" | "iconBox" | "closeIcon", {
3
+ export declare const SearchStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"input" | "icon" | "combobox" | "control" | "comboboxItem" | "iconBox" | "closeIcon", {
4
4
  size: {
5
5
  medium: {
6
6
  iconBox: {
@@ -1,6 +1,6 @@
1
1
  import { SelectRootProps } from '@ark-ui/react';
2
2
  import { RecipeVariantProps } from '../../../styled-system/css';
3
- export declare const SelectStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"content" | "item" | "root" | "valueText" | "iconBox" | "trigger", {
3
+ export declare const SelectStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"content" | "root" | "item" | "valueText" | "iconBox" | "trigger", {
4
4
  size: {
5
5
  medium: {
6
6
  root: {
@@ -1,6 +1,6 @@
1
1
  import { Switch as ArkSwitch, SwitchRootProps } from '@ark-ui/react';
2
2
  import { RecipeVariantProps } from '../../../styled-system/css';
3
- export declare const SwitchStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"label" | "root" | "helperText" | "textGroup" | "control" | "thumb", import('../../../styled-system/types').SlotRecipeVariantRecord<"label" | "root" | "helperText" | "textGroup" | "control" | "thumb">>;
3
+ export declare const SwitchStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"root" | "label" | "helperText" | "textGroup" | "control" | "thumb", import('../../../styled-system/types').SlotRecipeVariantRecord<"root" | "label" | "helperText" | "textGroup" | "control" | "thumb">>;
4
4
  type SwitchItemProps = {
5
5
  label: string;
6
6
  helperText?: string;
@@ -1,3 +1,3 @@
1
1
  import { Tabs as ArkTabs } from '@ark-ui/react';
2
- export declare const TabsStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"list" | "root", import('../../../styled-system/types').SlotRecipeVariantRecord<"list" | "root">>;
2
+ export declare const TabsStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"root" | "list", import('../../../styled-system/types').SlotRecipeVariantRecord<"root" | "list">>;
3
3
  export declare const Tabs: ({ children, className, ...props }: ArkTabs.RootProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,189 +1,92 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { SerendieSymbolAlertCircle as P, SerendieSymbolClose as j } from "@serendie/symbols";
3
- import q from "../../node_modules/merge-refs/dist/esm/index.js";
4
- import m, { forwardRef as L } from "react";
5
- import { sva as M } from "../../styled-system/css/sva.js";
6
- import { cx as A } from "../../styled-system/css/cx.js";
7
- import { css as v } from "../../styled-system/css/css.js";
8
- const S = M({
9
- slots: [
10
- "root",
11
- "label",
12
- "required",
13
- "inputWrapper",
14
- "leftContent",
15
- "rightContent",
16
- "input",
17
- "icon",
18
- "messageField",
19
- "description",
20
- "invalidMessage"
21
- ],
22
- base: {
23
- root: {
24
- display: "inline-grid",
25
- // 後から指定したCSSからwidthが上書きできないため、@layer componentsを指定
26
- "@layer components": {
27
- width: "min(100%, 300px)"
28
- },
29
- gridTemplateColumns: "auto",
30
- rowGap: "sd.system.dimension.spacing.extraSmall",
31
- textStyle: {
32
- base: "sd.system.typography.body.medium_compact",
33
- expanded: "sd.system.typography.body.medium_expanded"
34
- }
35
- },
36
- label: {
37
- textStyle: {
38
- base: "sd.system.typography.label.medium_compact",
39
- expanded: "sd.system.typography.label.medium_expanded"
40
- }
41
- },
42
- inputWrapper: {
43
- height: 48,
44
- display: "grid",
45
- gridTemplateColumns: "auto 1fr auto auto",
46
- alignItems: "center",
47
- outlineStyle: "solid",
48
- outlineWidth: "sd.system.dimension.border.medium",
49
- outlineColor: "sd.system.color.component.outline",
50
- borderRadius: "sd.system.dimension.radius.medium",
51
- backgroundColor: "sd.system.color.component.surface",
52
- '&:has([data-focus="true"])': {
53
- outlineWidth: "sd.system.dimension.border.thick",
54
- outlineColor: "sd.system.color.impression.primary"
55
- },
56
- _focusWithin: {
57
- outlineWidth: "sd.system.dimension.border.thick",
58
- outlineColor: "sd.system.color.impression.primary"
59
- },
60
- _disabled: {
61
- backgroundColor: "sd.system.color.interaction.disabled",
62
- cursor: "not-allowed"
63
- },
64
- _invalid: {
65
- outlineColor: "sd.system.color.impression.negative"
66
- }
67
- },
68
- leftContent: {
69
- paddingLeft: "sd.system.dimension.spacing.medium"
70
- },
71
- rightContent: {
72
- paddingRight: "sd.system.dimension.spacing.medium"
73
- },
74
- input: {
75
- outline: "none",
76
- paddingTop: "sd.system.dimension.spacing.extraSmall",
77
- paddingRight: "sd.system.dimension.spacing.twoExtraSmall",
78
- paddingBottom: "sd.system.dimension.spacing.extraSmall",
79
- paddingLeft: "sd.system.dimension.spacing.medium"
80
- },
81
- icon: {
82
- display: "grid",
83
- placeItems: "center",
84
- w: "48px",
85
- h: "48px",
86
- expanded: {
87
- w: "44px",
88
- h: "44px"
89
- }
90
- },
91
- required: {
92
- pl: "sd.system.dimension.spacing.extraSmall",
93
- color: "sd.system.color.impression.negative"
94
- },
95
- messageField: {
96
- textStyle: {
97
- base: "sd.system.typography.body.extraSmall_compact",
98
- expanded: "sd.system.typography.body.extraSmall_expanded"
99
- }
100
- },
101
- invalidMessage: {
102
- color: "sd.system.color.impression.negative"
103
- }
104
- }
105
- }), K = L(
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { SerendieSymbolAlertCircle as A, SerendieSymbolClose as T } from "@serendie/symbols";
3
+ import W from "../../node_modules/merge-refs/dist/esm/index.js";
4
+ import m, { forwardRef as q } from "react";
5
+ import { textFieldRecipe as x } from "../../styled-system/recipes/text-field-recipe.js";
6
+ import { cx as z } from "../../styled-system/css/cx.js";
7
+ import { css as b } from "../../styled-system/css/css.js";
8
+ const L = q(
106
9
  ({
107
- placeholder: C,
108
- label: c,
109
- description: a,
110
- required: p,
111
- invalidMessage: d,
112
- invalid: o,
113
- type: N = "text",
114
- disabled: l,
115
- onChange: u,
116
- value: y,
117
- className: _,
118
- leftContent: g,
119
- rightContent: h,
120
- ...t
10
+ placeholder: F,
11
+ label: d,
12
+ description: i,
13
+ required: u,
14
+ invalidMessage: c,
15
+ invalid: a,
16
+ type: S = "text",
17
+ disabled: n,
18
+ onChange: h,
19
+ value: f,
20
+ className: V,
21
+ leftContent: N,
22
+ rightContent: p,
23
+ ...l
121
24
  }, w) => {
122
- const r = m.useRef(null), R = q(r, w), [F, W] = S.splitVariantProps(t), s = S(F), k = a || o && d, [T, V] = m.useState(t.defaultValue || y), x = t.id || m.useId(), I = () => {
123
- var b;
124
- const i = {
25
+ const o = m.useRef(null), y = W(o, w), [C, P] = x.splitVariantProps(l), t = x(C), _ = i || a && c, [j, I] = m.useState(l.defaultValue || f), v = l.id || m.useId(), k = () => {
26
+ var R;
27
+ const s = {
125
28
  target: { value: "" }
126
29
  };
127
- f(i), (b = t.onReset) == null || b.call(t, i), r.current && (r.current.value = "");
128
- }, f = (i) => {
129
- V(i.target.value), u && u(i);
30
+ g(s), (R = l.onReset) == null || R.call(l, s), o.current && (o.current.value = "");
31
+ }, g = (s) => {
32
+ I(s.target.value), h && h(s);
130
33
  };
131
- return /* @__PURE__ */ n("div", { className: A(s.root, _), children: [
132
- c ? /* @__PURE__ */ n("label", { className: s.label, htmlFor: x, children: [
133
- c,
134
- p && /* @__PURE__ */ e("span", { className: s.required, children: "必須" })
34
+ return /* @__PURE__ */ r("div", { className: z(t.root, V), children: [
35
+ d ? /* @__PURE__ */ r("label", { className: t.label, htmlFor: v, children: [
36
+ d,
37
+ u && /* @__PURE__ */ e("span", { className: t.labelRequired, children: "必須" })
135
38
  ] }) : null,
136
- /* @__PURE__ */ n(
39
+ /* @__PURE__ */ r(
137
40
  "div",
138
41
  {
139
- className: s.inputWrapper,
140
- "data-invalid": o ? !0 : void 0,
141
- "data-disabled": l ? !0 : void 0,
42
+ className: t.inputWrapper,
43
+ "data-invalid": a ? !0 : void 0,
44
+ "data-disabled": n ? !0 : void 0,
142
45
  children: [
143
- g ? /* @__PURE__ */ e("div", { className: s.leftContent, children: g }) : /* @__PURE__ */ e("div", {}),
46
+ N ? /* @__PURE__ */ e("div", { className: t.leftContent, children: N }) : /* @__PURE__ */ e("div", {}),
144
47
  /* @__PURE__ */ e(
145
48
  "input",
146
49
  {
147
- ref: R,
148
- id: x,
149
- placeholder: C,
150
- required: p,
151
- disabled: l,
152
- value: y,
153
- type: N,
154
- className: s.input,
155
- onChange: f,
156
- ...W
50
+ ref: y,
51
+ id: v,
52
+ placeholder: F,
53
+ required: u,
54
+ disabled: n,
55
+ value: f,
56
+ type: S,
57
+ className: t.input,
58
+ onChange: g,
59
+ ...P
157
60
  }
158
61
  ),
159
- h ? /* @__PURE__ */ e("div", { className: s.rightContent, children: h }) : /* @__PURE__ */ e("div", { className: s.icon, children: !l && /* disabledの場合はアイコンを表示しない */
160
- (o ? /* @__PURE__ */ e(
62
+ p ? /* @__PURE__ */ e("div", { className: t.rightContent, children: p }) : /* @__PURE__ */ e("div", { className: t.icon, children: !n && /* disabledの場合はアイコンを表示しない */
63
+ (a ? /* @__PURE__ */ e(
161
64
  "span",
162
65
  {
163
- className: v({
66
+ className: b({
164
67
  color: "sd.system.color.impression.negative"
165
68
  }),
166
- children: /* @__PURE__ */ e(P, { width: 20, height: 20 })
69
+ children: /* @__PURE__ */ e(A, { width: 20, height: 20 })
167
70
  }
168
- ) : T ? /* @__PURE__ */ e(
71
+ ) : j ? /* @__PURE__ */ e(
169
72
  "button",
170
73
  {
171
- className: v({ cursor: "pointer" }),
172
- onClick: I,
74
+ className: b({ cursor: "pointer" }),
75
+ onClick: k,
173
76
  "aria-label": "値をクリア",
174
- children: /* @__PURE__ */ e(j, { width: 20, height: 20 })
77
+ children: /* @__PURE__ */ e(T, { width: 20, height: 20 })
175
78
  }
176
79
  ) : null) })
177
80
  ]
178
81
  }
179
82
  ),
180
- k && /* @__PURE__ */ n("div", { className: s.messageField, children: [
181
- a && /* @__PURE__ */ e("p", { className: s.description, children: a }),
182
- o && d && /* @__PURE__ */ e("p", { className: s.invalidMessage, children: d })
83
+ _ && /* @__PURE__ */ r("div", { className: t.messageField, children: [
84
+ i && /* @__PURE__ */ e("p", { className: t.description, children: i }),
85
+ a && c && /* @__PURE__ */ e("p", { className: t.invalidMessage, children: c })
183
86
  ] })
184
87
  ] });
185
88
  }
186
89
  );
187
90
  export {
188
- K as TextField
91
+ L as TextField
189
92
  };
@@ -1,5 +1,5 @@
1
1
  import { createToaster } from '@ark-ui/react';
2
- export declare const ToastStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"icon" | "text" | "root" | "textGroup", {
2
+ export declare const ToastStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"root" | "icon" | "text" | "textGroup", {
3
3
  variant: {
4
4
  default: {
5
5
  root: {
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { RecipeVariantProps } from '../../../styled-system/css';
3
3
  import { NotificationBadgeProps } from '../NotificationBadge';
4
- declare const topAppBarStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"container" | "left" | "title" | "root" | "buttonContainer", {
4
+ declare const topAppBarStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"container" | "left" | "root" | "title" | "buttonContainer", {
5
5
  type: {
6
6
  navbar: {};
7
7
  titleBar: {};
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './components/CheckBox/index.ts';
10
10
  export * from './components/ChoiceBox/index.ts';
11
11
  export * from './components/DashboardWidget/index.ts';
12
12
  export * from './components/DataTable/index.ts';
13
+ export * from './components/DatePicker/index.ts';
13
14
  export * from './components/Divider/index.ts';
14
15
  export * from './components/Drawer/index.ts';
15
16
  export * from './components/DropdownMenu/index.ts';