@nagiyu/ui 0.0.0-stage → 0.1.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 (178) hide show
  1. package/dist/src/components/Button/Button.d.ts +82 -0
  2. package/dist/src/components/Button/Button.d.ts.map +1 -0
  3. package/dist/src/components/Button/Button.jsx +68 -0
  4. package/dist/src/components/Button/Button.jsx.map +1 -0
  5. package/dist/src/components/Button/Button.module.css +238 -0
  6. package/dist/src/components/Button/index.d.ts +3 -0
  7. package/dist/src/components/Button/index.d.ts.map +1 -0
  8. package/dist/src/components/Button/index.js +2 -0
  9. package/dist/src/components/Button/index.js.map +1 -0
  10. package/dist/src/components/Checkbox/Checkbox.d.ts +59 -0
  11. package/dist/src/components/Checkbox/Checkbox.d.ts.map +1 -0
  12. package/dist/src/components/Checkbox/Checkbox.jsx +75 -0
  13. package/dist/src/components/Checkbox/Checkbox.jsx.map +1 -0
  14. package/dist/src/components/Checkbox/Checkbox.module.css +166 -0
  15. package/dist/src/components/Checkbox/index.d.ts +3 -0
  16. package/dist/src/components/Checkbox/index.d.ts.map +1 -0
  17. package/dist/src/components/Checkbox/index.js +2 -0
  18. package/dist/src/components/Checkbox/index.js.map +1 -0
  19. package/dist/src/components/Chip/Chip.d.ts +60 -0
  20. package/dist/src/components/Chip/Chip.d.ts.map +1 -0
  21. package/dist/src/components/Chip/Chip.jsx +39 -0
  22. package/dist/src/components/Chip/Chip.jsx.map +1 -0
  23. package/dist/src/components/Chip/Chip.module.css +144 -0
  24. package/dist/src/components/Chip/index.d.ts +3 -0
  25. package/dist/src/components/Chip/index.d.ts.map +1 -0
  26. package/dist/src/components/Chip/index.js +2 -0
  27. package/dist/src/components/Chip/index.js.map +1 -0
  28. package/dist/src/components/Link/Link.d.ts +52 -0
  29. package/dist/src/components/Link/Link.d.ts.map +1 -0
  30. package/dist/src/components/Link/Link.jsx +29 -0
  31. package/dist/src/components/Link/Link.jsx.map +1 -0
  32. package/dist/src/components/Link/Link.module.css +100 -0
  33. package/dist/src/components/Link/index.d.ts +3 -0
  34. package/dist/src/components/Link/index.d.ts.map +1 -0
  35. package/dist/src/components/Link/index.js +2 -0
  36. package/dist/src/components/Link/index.js.map +1 -0
  37. package/dist/src/components/Select/Select.d.ts +71 -0
  38. package/dist/src/components/Select/Select.d.ts.map +1 -0
  39. package/dist/src/components/Select/Select.jsx +55 -0
  40. package/dist/src/components/Select/Select.jsx.map +1 -0
  41. package/dist/src/components/Select/Select.module.css +150 -0
  42. package/dist/src/components/Select/index.d.ts +3 -0
  43. package/dist/src/components/Select/index.d.ts.map +1 -0
  44. package/dist/src/components/Select/index.js +2 -0
  45. package/dist/src/components/Select/index.js.map +1 -0
  46. package/dist/src/components/TextField/TextField.d.ts +96 -0
  47. package/dist/src/components/TextField/TextField.d.ts.map +1 -0
  48. package/dist/src/components/TextField/TextField.jsx +68 -0
  49. package/dist/src/components/TextField/TextField.jsx.map +1 -0
  50. package/dist/src/components/TextField/TextField.module.css +139 -0
  51. package/dist/src/components/TextField/index.d.ts +3 -0
  52. package/dist/src/components/TextField/index.d.ts.map +1 -0
  53. package/dist/src/components/TextField/index.js +2 -0
  54. package/dist/src/components/TextField/index.js.map +1 -0
  55. package/dist/src/components/dialogs/ConfirmDialog.d.ts +29 -0
  56. package/dist/src/components/dialogs/ConfirmDialog.d.ts.map +1 -0
  57. package/dist/src/components/dialogs/ConfirmDialog.jsx +34 -0
  58. package/dist/src/components/dialogs/ConfirmDialog.jsx.map +1 -0
  59. package/dist/src/components/dialogs/LegalDialog.d.ts +14 -0
  60. package/dist/src/components/dialogs/LegalDialog.d.ts.map +1 -0
  61. package/dist/src/components/dialogs/LegalDialog.jsx +34 -0
  62. package/dist/src/components/dialogs/LegalDialog.jsx.map +1 -0
  63. package/dist/src/components/dialogs/PrivacyPolicyDialog.d.ts +17 -0
  64. package/dist/src/components/dialogs/PrivacyPolicyDialog.d.ts.map +1 -0
  65. package/dist/src/components/dialogs/PrivacyPolicyDialog.jsx +7 -0
  66. package/dist/src/components/dialogs/PrivacyPolicyDialog.jsx.map +1 -0
  67. package/dist/src/components/dialogs/TermsOfServiceDialog.d.ts +17 -0
  68. package/dist/src/components/dialogs/TermsOfServiceDialog.d.ts.map +1 -0
  69. package/dist/src/components/dialogs/TermsOfServiceDialog.jsx +7 -0
  70. package/dist/src/components/dialogs/TermsOfServiceDialog.jsx.map +1 -0
  71. package/dist/src/components/error/ErrorAlert.d.ts +58 -0
  72. package/dist/src/components/error/ErrorAlert.d.ts.map +1 -0
  73. package/dist/src/components/error/ErrorAlert.jsx +68 -0
  74. package/dist/src/components/error/ErrorAlert.jsx.map +1 -0
  75. package/dist/src/components/feedback/AccessDeniedView.d.ts +59 -0
  76. package/dist/src/components/feedback/AccessDeniedView.d.ts.map +1 -0
  77. package/dist/src/components/feedback/AccessDeniedView.jsx +83 -0
  78. package/dist/src/components/feedback/AccessDeniedView.jsx.map +1 -0
  79. package/dist/src/components/feedback/ErrorView.d.ts +47 -0
  80. package/dist/src/components/feedback/ErrorView.d.ts.map +1 -0
  81. package/dist/src/components/feedback/ErrorView.jsx +63 -0
  82. package/dist/src/components/feedback/ErrorView.jsx.map +1 -0
  83. package/dist/src/components/feedback/GlobalErrorView.d.ts +18 -0
  84. package/dist/src/components/feedback/GlobalErrorView.d.ts.map +1 -0
  85. package/dist/src/components/feedback/GlobalErrorView.jsx +27 -0
  86. package/dist/src/components/feedback/GlobalErrorView.jsx.map +1 -0
  87. package/dist/src/components/feedback/NotFoundView.d.ts +37 -0
  88. package/dist/src/components/feedback/NotFoundView.d.ts.map +1 -0
  89. package/dist/src/components/feedback/NotFoundView.jsx +54 -0
  90. package/dist/src/components/feedback/NotFoundView.jsx.map +1 -0
  91. package/dist/src/components/layout/AppLayout.d.ts +8 -0
  92. package/dist/src/components/layout/AppLayout.d.ts.map +1 -0
  93. package/dist/src/components/layout/AppLayout.jsx +14 -0
  94. package/dist/src/components/layout/AppLayout.jsx.map +1 -0
  95. package/dist/src/components/layout/Footer.d.ts +66 -0
  96. package/dist/src/components/layout/Footer.d.ts.map +1 -0
  97. package/dist/src/components/layout/Footer.jsx +107 -0
  98. package/dist/src/components/layout/Footer.jsx.map +1 -0
  99. package/dist/src/components/layout/Header.d.ts +89 -0
  100. package/dist/src/components/layout/Header.d.ts.map +1 -0
  101. package/dist/src/components/layout/Header.jsx +227 -0
  102. package/dist/src/components/layout/Header.jsx.map +1 -0
  103. package/dist/src/components/layout/ServiceLayout.d.ts +20 -0
  104. package/dist/src/components/layout/ServiceLayout.d.ts.map +1 -0
  105. package/dist/src/components/layout/ServiceLayout.jsx +17 -0
  106. package/dist/src/components/layout/ServiceLayout.jsx.map +1 -0
  107. package/dist/src/components/layout/SessionHeader.d.ts +25 -0
  108. package/dist/src/components/layout/SessionHeader.d.ts.map +1 -0
  109. package/dist/src/components/layout/SessionHeader.jsx +46 -0
  110. package/dist/src/components/layout/SessionHeader.jsx.map +1 -0
  111. package/dist/src/components/legal/CommercialTransactionsTable.d.ts +13 -0
  112. package/dist/src/components/legal/CommercialTransactionsTable.d.ts.map +1 -0
  113. package/dist/src/components/legal/CommercialTransactionsTable.jsx +56 -0
  114. package/dist/src/components/legal/CommercialTransactionsTable.jsx.map +1 -0
  115. package/dist/src/components/legal/LegalSections.d.ts +13 -0
  116. package/dist/src/components/legal/LegalSections.d.ts.map +1 -0
  117. package/dist/src/components/legal/LegalSections.jsx +38 -0
  118. package/dist/src/components/legal/LegalSections.jsx.map +1 -0
  119. package/dist/src/components/legal/index.d.ts +5 -0
  120. package/dist/src/components/legal/index.d.ts.map +1 -0
  121. package/dist/src/components/legal/index.js +3 -0
  122. package/dist/src/components/legal/index.js.map +1 -0
  123. package/dist/src/components/loading/LoadingState.d.ts +41 -0
  124. package/dist/src/components/loading/LoadingState.d.ts.map +1 -0
  125. package/dist/src/components/loading/LoadingState.jsx +29 -0
  126. package/dist/src/components/loading/LoadingState.jsx.map +1 -0
  127. package/dist/src/components/providers/AppThemeProvider.d.ts +6 -0
  128. package/dist/src/components/providers/AppThemeProvider.d.ts.map +1 -0
  129. package/dist/src/components/providers/AppThemeProvider.jsx +14 -0
  130. package/dist/src/components/providers/AppThemeProvider.jsx.map +1 -0
  131. package/dist/src/components/providers/SessionProviderWrapper.d.ts +11 -0
  132. package/dist/src/components/providers/SessionProviderWrapper.d.ts.map +1 -0
  133. package/dist/src/components/providers/SessionProviderWrapper.jsx +11 -0
  134. package/dist/src/components/providers/SessionProviderWrapper.jsx.map +1 -0
  135. package/dist/src/data/commercialTransactionsData.d.ts +9 -0
  136. package/dist/src/data/commercialTransactionsData.d.ts.map +1 -0
  137. package/dist/src/data/commercialTransactionsData.js +46 -0
  138. package/dist/src/data/commercialTransactionsData.js.map +1 -0
  139. package/dist/src/data/privacyPolicyData.d.ts +7 -0
  140. package/dist/src/data/privacyPolicyData.d.ts.map +1 -0
  141. package/dist/src/data/privacyPolicyData.js +247 -0
  142. package/dist/src/data/privacyPolicyData.js.map +1 -0
  143. package/dist/src/data/termsOfServiceData.d.ts +7 -0
  144. package/dist/src/data/termsOfServiceData.d.ts.map +1 -0
  145. package/dist/src/data/termsOfServiceData.js +227 -0
  146. package/dist/src/data/termsOfServiceData.js.map +1 -0
  147. package/dist/src/index.d.ts +52 -0
  148. package/dist/src/index.d.ts.map +1 -0
  149. package/dist/src/index.js +35 -0
  150. package/dist/src/index.js.map +1 -0
  151. package/dist/src/session-provider.d.ts +5 -0
  152. package/dist/src/session-provider.d.ts.map +1 -0
  153. package/dist/src/session-provider.js +7 -0
  154. package/dist/src/session-provider.js.map +1 -0
  155. package/dist/src/styles/base.css +14 -0
  156. package/dist/src/styles/theme.d.ts +22 -0
  157. package/dist/src/styles/theme.d.ts.map +1 -0
  158. package/dist/src/styles/theme.js +169 -0
  159. package/dist/src/styles/theme.js.map +1 -0
  160. package/dist/src/styles/tokens.css +361 -0
  161. package/dist/src/styles/tokens.d.ts +167 -0
  162. package/dist/src/styles/tokens.d.ts.map +1 -0
  163. package/dist/src/styles/tokens.js +151 -0
  164. package/dist/src/styles/tokens.js.map +1 -0
  165. package/dist/src/types/legal.d.ts +36 -0
  166. package/dist/src/types/legal.d.ts.map +1 -0
  167. package/dist/src/types/legal.js +7 -0
  168. package/dist/src/types/legal.js.map +1 -0
  169. package/dist/src/utils/auth.d.ts +53 -0
  170. package/dist/src/utils/auth.d.ts.map +1 -0
  171. package/dist/src/utils/auth.js +78 -0
  172. package/dist/src/utils/auth.js.map +1 -0
  173. package/dist/src/utils/navigation.d.ts +16 -0
  174. package/dist/src/utils/navigation.d.ts.map +1 -0
  175. package/dist/src/utils/navigation.js +54 -0
  176. package/dist/src/utils/navigation.js.map +1 -0
  177. package/package.json +64 -4
  178. package/README.md +0 -3
@@ -0,0 +1,71 @@
1
+ import * as React from 'react';
2
+ export type SelectSize = 'sm' | 'md' | 'lg';
3
+ export interface SelectOption {
4
+ value: string;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ /**
9
+ * Select のプロパティ。
10
+ *
11
+ * 100% ライブラリ非依存の独自定義。MUI / Radix 等の Props 型は extends しない。
12
+ * エスケープハッチは `className` のみ。`value` と `onChange` は必須(uncontrolled は非対応)。
13
+ */
14
+ export interface SelectProps {
15
+ /**
16
+ * 選択中の value。未選択を表現したい場合は空文字を渡し、`placeholder` を指定する。
17
+ */
18
+ value: string;
19
+ /**
20
+ * 値が変化したときのコールバック。MUI 等のイベントオブジェクトではなく、選択された
21
+ * `value` を直接受け取るシグネチャ。
22
+ */
23
+ onChange: (value: string) => void;
24
+ onBlur?: (event: React.FocusEvent<HTMLSelectElement>) => void;
25
+ onFocus?: (event: React.FocusEvent<HTMLSelectElement>) => void;
26
+ /**
27
+ * 選択肢の配列。`MenuItem` のネスト記述ではなく設定駆動 API。
28
+ */
29
+ options: ReadonlyArray<SelectOption>;
30
+ /**
31
+ * フォームラベル。`<label htmlFor>` で select と関連付ける(内部 `useId` で自動生成)。
32
+ */
33
+ label?: React.ReactNode;
34
+ /**
35
+ * 未選択(空文字)状態に表示する案内テキスト。指定すると先頭に空 option を挿入する。
36
+ */
37
+ placeholder?: string;
38
+ /**
39
+ * 入力欄の下に表示される補助テキスト。`error` が true なら危険色で描画される。
40
+ */
41
+ helperText?: React.ReactNode;
42
+ disabled?: boolean;
43
+ required?: boolean;
44
+ /**
45
+ * エラー状態。境界線・helperText が危険色になり、`aria-invalid` が付与される。
46
+ */
47
+ error?: boolean;
48
+ fullWidth?: boolean;
49
+ /**
50
+ * サイズ。既定: `md`
51
+ */
52
+ size?: SelectSize;
53
+ id?: string;
54
+ name?: string;
55
+ autoFocus?: boolean;
56
+ 'aria-label'?: string;
57
+ className?: string;
58
+ }
59
+ /**
60
+ * 単一選択 dropdown コンポーネント。
61
+ *
62
+ * - ネイティブ `<select>` をラップしているため、ARIA / キーボード操作 / モバイル UI は OS 標準に追従
63
+ * - `label` と select は `useId` 経由で自動関連付け(a11y 必須対応)
64
+ * - `placeholder` 指定時は先頭に空 option を挿入(未選択を明示)
65
+ * - `error` で危険色の境界線・helperText、`aria-invalid` 自動付与
66
+ *
67
+ * @see docs/development/shared-ui-components.md
68
+ */
69
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
70
+ export default Select;
71
+ //# sourceMappingURL=Select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAE1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAG/D;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAGrC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAG7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAGhB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAGlB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,MAAM,oFAyFV,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,55 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import styles from './Select.module.css';
4
+ /**
5
+ * 単一選択 dropdown コンポーネント。
6
+ *
7
+ * - ネイティブ `<select>` をラップしているため、ARIA / キーボード操作 / モバイル UI は OS 標準に追従
8
+ * - `label` と select は `useId` 経由で自動関連付け(a11y 必須対応)
9
+ * - `placeholder` 指定時は先頭に空 option を挿入(未選択を明示)
10
+ * - `error` で危険色の境界線・helperText、`aria-invalid` 自動付与
11
+ *
12
+ * @see docs/development/shared-ui-components.md
13
+ */
14
+ const Select = React.forwardRef(function Select({ value, onChange, onBlur, onFocus, options, label, placeholder, helperText, disabled = false, required = false, error = false, fullWidth = false, size = 'md', id, name, autoFocus, 'aria-label': ariaLabel, className, }, ref) {
15
+ const generatedId = React.useId();
16
+ const selectId = id ?? generatedId;
17
+ const helperTextId = `${selectId}-helper-text`;
18
+ const wrapperClasses = [
19
+ styles.wrapper,
20
+ fullWidth ? styles.fullWidth : null,
21
+ disabled ? styles.disabled : null,
22
+ error ? styles.error : null,
23
+ styles[`size-${size}`],
24
+ className,
25
+ ]
26
+ .filter(Boolean)
27
+ .join(' ');
28
+ return (<div ref={ref} className={wrapperClasses}>
29
+ {label ? (<label htmlFor={selectId} className={styles.label}>
30
+ {label}
31
+ {required ? (<span aria-hidden="true" className={styles.requiredMark}>
32
+ {' '}
33
+ *
34
+ </span>) : null}
35
+ </label>) : null}
36
+ <div className={styles.selectWrapper}>
37
+ <select id={selectId} name={name} value={value} onChange={(event) => onChange(event.target.value)} onBlur={onBlur} onFocus={onFocus} disabled={disabled} required={required} autoFocus={autoFocus} aria-label={ariaLabel} aria-invalid={error || undefined} aria-describedby={helperText ? helperTextId : undefined} className={styles.select}>
38
+ {placeholder !== undefined ? (<option value="" disabled={required}>
39
+ {placeholder}
40
+ </option>) : null}
41
+ {options.map((option) => (<option key={option.value} value={option.value} disabled={option.disabled}>
42
+ {option.label}
43
+ </option>))}
44
+ </select>
45
+ <span aria-hidden="true" className={styles.chevron}>
46
+ ▾
47
+ </span>
48
+ </div>
49
+ {helperText ? (<p id={helperTextId} className={styles.helperText}>
50
+ {helperText}
51
+ </p>) : null}
52
+ </div>);
53
+ });
54
+ export default Select;
55
+ //# sourceMappingURL=Select.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.jsx","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":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AM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CACxE;cAAA,CAAC,MAAM,CAAC,KAAK,CACf;YAAA,EAAE,MAAM,CAAC,CACV,CAAC,CACJ;QAAA,EAAE,MAAM,CACR;QAAA,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACjD;;QACF,EAAE,IAAI,CACR;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,UAAU,CAAC,CAAC,CAAC,CACZ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAChD;UAAA,CAAC,UAAU,CACb;QAAA,EAAE,CAAC,CAAC,CACL,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,150 @@
1
+ /*
2
+ * Select コンポーネントのスタイル定義。
3
+ *
4
+ * - すべての色・余白・角丸は tokens.css の Semantic 変数を参照する。
5
+ * - MUI 等の特定ライブラリへの依存は持たない。
6
+ * - 状態は `:hover` / `:focus-visible` / `[aria-invalid='true']` / `:disabled` で表現。
7
+ * - ネイティブ `<select>` をベースにしつつ、`appearance: none` で見た目を統一。
8
+ */
9
+
10
+ .wrapper {
11
+ display: inline-flex;
12
+ flex-direction: column;
13
+ gap: var(--spacing-xs);
14
+ font-family: var(--font-family-sans);
15
+ }
16
+
17
+ .fullWidth {
18
+ display: flex;
19
+ width: 100%;
20
+ }
21
+
22
+ .label {
23
+ font-size: var(--font-size-sm);
24
+ font-weight: var(--font-weight-medium);
25
+ color: var(--color-fg-default);
26
+ line-height: var(--line-height-normal);
27
+ }
28
+
29
+ .requiredMark {
30
+ color: var(--color-action-danger);
31
+ }
32
+
33
+ .selectWrapper {
34
+ position: relative;
35
+ display: flex;
36
+ align-items: stretch;
37
+ width: 100%;
38
+ }
39
+
40
+ .select {
41
+ appearance: none;
42
+ -webkit-appearance: none;
43
+ width: 100%;
44
+ border: 1px solid var(--color-border-default);
45
+ border-radius: var(--radius-md);
46
+ background-color: var(--color-bg-surface);
47
+ color: var(--color-fg-default);
48
+
49
+ font-family: inherit;
50
+ font-size: var(--font-size-md);
51
+ line-height: var(--line-height-normal);
52
+
53
+ /* chevron 用のスペースを右側に確保 */
54
+ padding-right: calc(var(--spacing-md) + 1.25rem);
55
+
56
+ transition:
57
+ border-color var(--duration-fast) var(--easing-out),
58
+ box-shadow var(--duration-fast) var(--easing-out);
59
+ }
60
+
61
+ .select:hover:not(:disabled) {
62
+ border-color: var(--color-border-strong);
63
+ }
64
+
65
+ .select:focus-visible {
66
+ outline: none;
67
+ border-color: var(--color-action-primary);
68
+ box-shadow: 0 0 0 3px var(--color-action-primary-subtle);
69
+ }
70
+
71
+ .select:disabled {
72
+ background-color: var(--color-bg-subtle);
73
+ color: var(--color-fg-disabled);
74
+ cursor: not-allowed;
75
+ }
76
+
77
+ .chevron {
78
+ position: absolute;
79
+ right: var(--spacing-sm);
80
+ top: 50%;
81
+ transform: translateY(-50%);
82
+ pointer-events: none;
83
+ color: var(--color-fg-muted);
84
+ font-size: var(--font-size-sm);
85
+ }
86
+
87
+ .disabled .chevron {
88
+ color: var(--color-fg-disabled);
89
+ }
90
+
91
+ .helperText {
92
+ margin: 0;
93
+ font-size: var(--font-size-xs);
94
+ color: var(--color-fg-muted);
95
+ line-height: var(--line-height-normal);
96
+ }
97
+
98
+ /* =========================================================================
99
+ * Size
100
+ * ========================================================================= */
101
+
102
+ .size-sm .select {
103
+ padding: var(--spacing-xs) var(--spacing-sm);
104
+ padding-right: calc(var(--spacing-sm) + 1.25rem);
105
+ font-size: var(--font-size-sm);
106
+ min-height: 32px;
107
+ }
108
+
109
+ .size-md .select {
110
+ padding: var(--spacing-sm) var(--spacing-md);
111
+ padding-right: calc(var(--spacing-md) + 1.25rem);
112
+ font-size: var(--font-size-md);
113
+ min-height: 40px;
114
+ }
115
+
116
+ .size-lg .select {
117
+ padding: var(--spacing-sm) var(--spacing-md);
118
+ padding-right: calc(var(--spacing-md) + 1.25rem);
119
+ font-size: var(--font-size-lg);
120
+ min-height: 48px;
121
+ }
122
+
123
+ /* =========================================================================
124
+ * Error state
125
+ * ========================================================================= */
126
+
127
+ .error .select {
128
+ border-color: var(--color-action-danger);
129
+ }
130
+
131
+ .error .select:hover:not(:disabled) {
132
+ border-color: var(--color-action-danger-hover);
133
+ }
134
+
135
+ .error .select:focus-visible {
136
+ border-color: var(--color-action-danger);
137
+ box-shadow: 0 0 0 3px var(--color-action-danger-subtle);
138
+ }
139
+
140
+ .error .helperText {
141
+ color: var(--color-action-danger);
142
+ }
143
+
144
+ /* =========================================================================
145
+ * Disabled wrapper(label もディム化)
146
+ * ========================================================================= */
147
+
148
+ .disabled .label {
149
+ color: var(--color-fg-disabled);
150
+ }
@@ -0,0 +1,3 @@
1
+ export { default } from './Select';
2
+ export type { SelectProps, SelectSize, SelectOption } from './Select';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Select';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,96 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * TextField のサイズ。
4
+ */
5
+ export type TextFieldSize = 'sm' | 'md' | 'lg';
6
+ /**
7
+ * TextField の入力種別。HTML `type` 属性のうち、テキスト入力として意味のある値に絞る。
8
+ */
9
+ export type TextFieldType = 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
10
+ /**
11
+ * TextField のプロパティ。
12
+ *
13
+ * 100% ライブラリ非依存の独自定義。MUI / Radix 等の Props 型は extends しない。
14
+ * エスケープハッチは `className` のみ。
15
+ */
16
+ export interface TextFieldProps {
17
+ value?: string;
18
+ defaultValue?: string;
19
+ onChange?: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
20
+ onBlur?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
21
+ onFocus?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
22
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
23
+ /**
24
+ * フォームラベル。`<label htmlFor>` で input/textarea と関連付ける。
25
+ * 関連付けは内部で `useId` により自動生成(`id` を渡せばそれを尊重)。
26
+ */
27
+ label?: React.ReactNode;
28
+ /**
29
+ * プレースホルダー。
30
+ */
31
+ placeholder?: string;
32
+ /**
33
+ * 入力欄の下に表示される補助テキスト。`error` が true なら危険色で描画される。
34
+ */
35
+ helperText?: React.ReactNode;
36
+ /**
37
+ * 入力種別。既定: `text`
38
+ */
39
+ type?: TextFieldType;
40
+ disabled?: boolean;
41
+ required?: boolean;
42
+ /**
43
+ * MUI の `slotProps.input.readOnly` 相当。読み取り専用フィールド。
44
+ */
45
+ readOnly?: boolean;
46
+ /**
47
+ * エラー状態。境界線・helperText が危険色になり、`aria-invalid` が付与される。
48
+ */
49
+ error?: boolean;
50
+ /**
51
+ * 親要素の幅いっぱいに広げる。既定: `false`
52
+ */
53
+ fullWidth?: boolean;
54
+ /**
55
+ * サイズ。既定: `md`
56
+ */
57
+ size?: TextFieldSize;
58
+ /**
59
+ * `true` の場合、`<textarea>` として描画する。
60
+ */
61
+ multiline?: boolean;
62
+ rows?: number;
63
+ minRows?: number;
64
+ maxRows?: number;
65
+ /**
66
+ * MUI の `slotProps.htmlInput.maxLength` 相当。HTML `maxlength` 属性を付与。
67
+ */
68
+ maxLength?: number;
69
+ id?: string;
70
+ name?: string;
71
+ autoFocus?: boolean;
72
+ autoComplete?: string;
73
+ inputMode?: 'text' | 'numeric' | 'decimal' | 'tel' | 'email' | 'search' | 'url' | 'none';
74
+ /**
75
+ * `label` 以外で名前を提供する場合に使用する。`label` が指定されている場合は不要。
76
+ */
77
+ 'aria-label'?: string;
78
+ className?: string;
79
+ /**
80
+ * 内部の `<input>` または `<textarea>` 要素への ref。
81
+ */
82
+ inputRef?: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
83
+ }
84
+ /**
85
+ * テキスト入力コンポーネント。
86
+ *
87
+ * - `label` と入力要素を `useId` 経由で自動関連付け(a11y 必須対応)
88
+ * - `multiline` で `<textarea>` に切替
89
+ * - `error` で危険色の境界線・helperText、`aria-invalid` 自動付与
90
+ * - `readOnly` / `maxLength` を top-level Props として提供(MUI の slotProps を直接露出しない)
91
+ *
92
+ * @see docs/development/shared-ui-components.md
93
+ */
94
+ declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLDivElement>>;
95
+ export default TextField;
96
+ //# sourceMappingURL=TextField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAA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,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAGzF;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;CAC9D;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,SAAS,uFAyGb,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -0,0 +1,68 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import styles from './TextField.module.css';
4
+ /**
5
+ * テキスト入力コンポーネント。
6
+ *
7
+ * - `label` と入力要素を `useId` 経由で自動関連付け(a11y 必須対応)
8
+ * - `multiline` で `<textarea>` に切替
9
+ * - `error` で危険色の境界線・helperText、`aria-invalid` 自動付与
10
+ * - `readOnly` / `maxLength` を top-level Props として提供(MUI の slotProps を直接露出しない)
11
+ *
12
+ * @see docs/development/shared-ui-components.md
13
+ */
14
+ const TextField = React.forwardRef(function TextField({ value, defaultValue, onChange, onBlur, onFocus, onKeyDown, label, placeholder, helperText, type = 'text', disabled = false, required = false, readOnly = false, error = false, fullWidth = false, size = 'md', multiline = false, rows, minRows, maxRows, maxLength, id, name, autoFocus, autoComplete, inputMode, 'aria-label': ariaLabel, className, inputRef, }, ref) {
15
+ const generatedId = React.useId();
16
+ const inputId = id ?? generatedId;
17
+ const helperTextId = `${inputId}-helper-text`;
18
+ const wrapperClasses = [
19
+ styles.wrapper,
20
+ fullWidth ? styles.fullWidth : null,
21
+ disabled ? styles.disabled : null,
22
+ error ? styles.error : null,
23
+ styles[`size-${size}`],
24
+ className,
25
+ ]
26
+ .filter(Boolean)
27
+ .join(' ');
28
+ const sharedProps = {
29
+ id: inputId,
30
+ name,
31
+ value,
32
+ defaultValue,
33
+ onChange,
34
+ onBlur,
35
+ onFocus,
36
+ onKeyDown,
37
+ placeholder,
38
+ disabled,
39
+ required,
40
+ readOnly,
41
+ autoFocus,
42
+ autoComplete,
43
+ inputMode,
44
+ maxLength,
45
+ 'aria-label': ariaLabel,
46
+ 'aria-invalid': error || undefined,
47
+ 'aria-describedby': helperText ? helperTextId : undefined,
48
+ className: styles.input,
49
+ };
50
+ return (<div ref={ref} className={wrapperClasses}>
51
+ {label ? (<label htmlFor={inputId} className={styles.label}>
52
+ {label}
53
+ {required ? (<span aria-hidden="true" className={styles.requiredMark}>
54
+ {' '}
55
+ *
56
+ </span>) : null}
57
+ </label>) : null}
58
+ {multiline ? (<textarea {...sharedProps} ref={inputRef} rows={rows}
59
+ // HTML の textarea は minRows/maxRows を直接サポートしないため、rows のみ反映する。
60
+ // より高度な auto-resize は将来必要になれば追加する。
61
+ {...(minRows && !rows ? { rows: minRows } : {})} {...(maxRows ? { 'data-max-rows': maxRows } : {})}/>) : (<input {...sharedProps} ref={inputRef} type={type}/>)}
62
+ {helperText ? (<p id={helperTextId} className={styles.helperText}>
63
+ {helperText}
64
+ </p>) : null}
65
+ </div>);
66
+ });
67
+ export default TextField;
68
+ //# sourceMappingURL=TextField.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.jsx","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,KAAK,MAAM,OAA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C,CAAC,CAAC,EAAE,CAAC,CAAC,EAClD,CACH,CAAC,CAAC,CAAC,CACF,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,QAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAG,CACrF,CACD;MAAA,CAAC,UAAU,CAAC,CAAC,CAAC,CACZ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAChD;UAAA,CAAC,UAAU,CACb;QAAA,EAAE,CAAC,CAAC,CACL,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -0,0 +1,139 @@
1
+ /*
2
+ * TextField コンポーネントのスタイル定義。
3
+ *
4
+ * - すべての色・余白・角丸は tokens.css の Semantic 変数を参照する。
5
+ * - MUI 等の特定ライブラリへの依存は持たない。
6
+ * - 状態は `:hover` / `:focus-visible` / `[aria-invalid='true']` / `:disabled` で表現。
7
+ */
8
+
9
+ .wrapper {
10
+ display: inline-flex;
11
+ flex-direction: column;
12
+ gap: var(--spacing-xs);
13
+ font-family: var(--font-family-sans);
14
+ /* デフォルトは内容に応じた幅。fullWidth で 100% に */
15
+ }
16
+
17
+ .fullWidth {
18
+ display: flex;
19
+ width: 100%;
20
+ }
21
+
22
+ .label {
23
+ font-size: var(--font-size-sm);
24
+ font-weight: var(--font-weight-medium);
25
+ color: var(--color-fg-default);
26
+ line-height: var(--line-height-normal);
27
+ }
28
+
29
+ .requiredMark {
30
+ color: var(--color-action-danger);
31
+ }
32
+
33
+ .input {
34
+ /* Box */
35
+ appearance: none;
36
+ width: 100%;
37
+ border: 1px solid var(--color-border-default);
38
+ border-radius: var(--radius-md);
39
+ background-color: var(--color-bg-surface);
40
+ color: var(--color-fg-default);
41
+
42
+ /* Typography */
43
+ font-family: inherit;
44
+ font-size: var(--font-size-md);
45
+ line-height: var(--line-height-normal);
46
+
47
+ /* Transition */
48
+ transition:
49
+ border-color var(--duration-fast) var(--easing-out),
50
+ box-shadow var(--duration-fast) var(--easing-out);
51
+ }
52
+
53
+ .input::placeholder {
54
+ color: var(--color-fg-muted);
55
+ }
56
+
57
+ .input:hover:not(:disabled):not(:read-only) {
58
+ border-color: var(--color-border-strong);
59
+ }
60
+
61
+ .input:focus-visible {
62
+ outline: none;
63
+ border-color: var(--color-action-primary);
64
+ box-shadow: 0 0 0 3px var(--color-action-primary-subtle);
65
+ }
66
+
67
+ .input:disabled {
68
+ background-color: var(--color-bg-subtle);
69
+ color: var(--color-fg-disabled);
70
+ cursor: not-allowed;
71
+ }
72
+
73
+ .input:read-only {
74
+ background-color: var(--color-bg-subtle);
75
+ cursor: default;
76
+ }
77
+
78
+ textarea.input {
79
+ resize: vertical;
80
+ min-height: 4rem;
81
+ }
82
+
83
+ .helperText {
84
+ margin: 0;
85
+ font-size: var(--font-size-xs);
86
+ color: var(--color-fg-muted);
87
+ line-height: var(--line-height-normal);
88
+ }
89
+
90
+ /* =========================================================================
91
+ * Size
92
+ * ========================================================================= */
93
+
94
+ .size-sm .input {
95
+ padding: var(--spacing-xs) var(--spacing-sm);
96
+ font-size: var(--font-size-sm);
97
+ min-height: 32px;
98
+ }
99
+
100
+ .size-md .input {
101
+ padding: var(--spacing-sm) var(--spacing-md);
102
+ font-size: var(--font-size-md);
103
+ min-height: 40px;
104
+ }
105
+
106
+ .size-lg .input {
107
+ padding: var(--spacing-sm) var(--spacing-md);
108
+ font-size: var(--font-size-lg);
109
+ min-height: 48px;
110
+ }
111
+
112
+ /* =========================================================================
113
+ * Error state
114
+ * ========================================================================= */
115
+
116
+ .error .input {
117
+ border-color: var(--color-action-danger);
118
+ }
119
+
120
+ .error .input:hover:not(:disabled):not(:read-only) {
121
+ border-color: var(--color-action-danger-hover);
122
+ }
123
+
124
+ .error .input:focus-visible {
125
+ border-color: var(--color-action-danger);
126
+ box-shadow: 0 0 0 3px var(--color-action-danger-subtle);
127
+ }
128
+
129
+ .error .helperText {
130
+ color: var(--color-action-danger);
131
+ }
132
+
133
+ /* =========================================================================
134
+ * Disabled wrapper(label もディム化)
135
+ * ========================================================================= */
136
+
137
+ .disabled .label {
138
+ color: var(--color-fg-disabled);
139
+ }
@@ -0,0 +1,3 @@
1
+ export { default } from './TextField';
2
+ export type { TextFieldProps, TextFieldSize, TextFieldType } from './TextField';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './TextField';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/TextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ButtonColor } from '../Button';
3
+ export interface ConfirmDialogProps {
4
+ open: boolean;
5
+ title: string;
6
+ /** 本文の説明文。省略した場合は children のみを表示する。 */
7
+ description?: string;
8
+ /** description の下に表示する任意の本文 (対象の詳細、注意書き、同意チェックなど)。 */
9
+ children?: ReactNode;
10
+ confirmLabel?: string;
11
+ cancelLabel?: string;
12
+ /** 確定ボタンの色。既定: `danger` */
13
+ confirmColor?: ButtonColor;
14
+ /** 確定ボタンだけを無効化する (同意チェック待ちなど)。 */
15
+ confirmDisabled?: boolean;
16
+ /** 確定ボタンの `data-testid`。 */
17
+ confirmTestId?: string;
18
+ /** 処理中。ボタンの無効化に加え、背景クリック・Escape での閉じる操作も抑止する。 */
19
+ loading?: boolean;
20
+ onConfirm: () => void;
21
+ onCancel: () => void;
22
+ }
23
+ /**
24
+ * 確認ダイアログ。
25
+ *
26
+ * 幅を揃えるため `maxWidth="sm" fullWidth` に固定している。
27
+ */
28
+ export default function ConfirmDialog({ open, title, description, children, confirmLabel, cancelLabel, confirmColor, confirmDisabled, confirmTestId, loading, onConfirm, onCancel, }: ConfirmDialogProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=ConfirmDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/dialogs/ConfirmDialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,kCAAkC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,YAAmB,EACnB,WAAqB,EACrB,YAAuB,EACvB,eAAuB,EACvB,aAAa,EACb,OAAe,EACf,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,+BAmCpB"}