@aizu-chat/react 0.0.4 → 0.0.6

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.
@@ -0,0 +1,55 @@
1
+ 'use client'
2
+
3
+ // #style-inject:#style-inject
4
+ function styleInject(css, { insertAt } = {}) {
5
+ if (!css || typeof document === "undefined") return;
6
+ const head = document.head || document.getElementsByTagName("head")[0];
7
+ const style = document.createElement("style");
8
+ style.type = "text/css";
9
+ if (insertAt === "top") {
10
+ if (head.firstChild) {
11
+ head.insertBefore(style, head.firstChild);
12
+ } else {
13
+ head.appendChild(style);
14
+ }
15
+ } else {
16
+ head.appendChild(style);
17
+ }
18
+ if (style.styleSheet) {
19
+ style.styleSheet.cssText = css;
20
+ } else {
21
+ style.appendChild(document.createTextNode(css));
22
+ }
23
+ }
24
+
25
+ // src/global.css
26
+ styleInject('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root,\n :host {\n --font-sans:\n ui-sans-serif,\n system-ui,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol",\n "Noto Color Emoji";\n --font-mono:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --spacing: 0.25rem;\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *,\n ::after,\n ::before,\n ::backdrop,\n ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html,\n :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp,\n pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol,\n ul,\n menu {\n list-style: none;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n vertical-align: middle;\n }\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n button,\n input,\n select,\n optgroup,\n textarea,\n ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit,\n ::-webkit-datetime-edit-year-field,\n ::-webkit-datetime-edit-month-field,\n ::-webkit-datetime-edit-day-field,\n ::-webkit-datetime-edit-hour-field,\n ::-webkit-datetime-edit-minute-field,\n ::-webkit-datetime-edit-second-field,\n ::-webkit-datetime-edit-millisecond-field,\n ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button,\n input:where([type=button], [type=reset], [type=submit]),\n ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button,\n ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=until-found])) {\n display: none !important;\n }\n}\n@layer utilities {\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .hover\\:bg-red-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-red-500);\n }\n }\n }\n}\n@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *,\n ::before,\n ::after,\n ::backdrop {\n --tw-border-style: solid;\n }\n }\n}\n');
27
+
28
+ // src/utils/cn.ts
29
+ import { clsx } from "clsx";
30
+ import { twMerge } from "tailwind-merge";
31
+ function cn(...args) {
32
+ return twMerge(clsx(args));
33
+ }
34
+
35
+ // src/components/Button.tsx
36
+ import { jsx } from "react/jsx-runtime";
37
+ function Button(props) {
38
+ return /* @__PURE__ */ jsx(
39
+ "button",
40
+ {
41
+ type: "button",
42
+ onClick: props.onClick,
43
+ className: cn(
44
+ "p-3 border border-red-500 hover:bg-red-500",
45
+ props.className
46
+ ),
47
+ children: props.children
48
+ }
49
+ );
50
+ }
51
+ Button.displayName = "Button";
52
+
53
+ export {
54
+ Button
55
+ };
@@ -1,13 +1,51 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentProps } from 'react';
2
3
 
3
- interface ButtonProps {
4
- children: React.ReactNode;
5
- className?: string;
6
- onClick?: () => void;
7
- }
8
- declare function Button(props: ButtonProps): react_jsx_runtime.JSX.Element;
9
- declare namespace Button {
10
- var displayName: string;
4
+ declare const AizuChat: () => react_jsx_runtime.JSX.Element;
5
+
6
+ type ButtonProps = ComponentProps<"button">;
7
+ declare const Button: ({ children, className, onClick, ref, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
8
+
9
+ type LoadingProps = {
10
+ message?: string;
11
+ };
12
+ declare const Loading: ({ message }: LoadingProps) => react_jsx_runtime.JSX.Element;
13
+
14
+ declare enum MockResponseENUM {
15
+ CATEGORY_SMARTPHONE = "CATEGORY_SMARTPHONE",
16
+ CATEGORY_NOTEBOOK = "CATEGORY_NOTEBOOK",
17
+ QUICK_MENU_SHOP = "QUICK_MENU_SHOP",
18
+ ERROR = "ERROR",
19
+ CODE_CANT_USE = "CODE_CANT_USE",
20
+ BUDGET_INQUIRY = "BUDGET_INQUIRY",
21
+ PRODUCT_FOUND_LESS_10000 = "PRODUCT_FOUND_LESS_10000",
22
+ PRODUCT_FOUND_RANGE_10000_20000 = "PRODUCT_FOUND_RANGE_10000_20000",
23
+ PRODUCT_FOUND_RANGE_20000_30000 = "PRODUCT_FOUND_RANGE_20000_30000",
24
+ PRODUCT_FOUND_MORE_30000 = "PRODUCT_FOUND_MORE_30000",
25
+ SHIPPING_INFO = "SHIPPING_INFO",
26
+ PAYMENT_METHODS = "PAYMENT_METHODS",
27
+ WARRANTY_INFO = "WARRANTY_INFO",
28
+ RETURN_POLICY = "RETURN_POLICY",
29
+ PROMOTION_INFO = "PROMOTION_INFO",
30
+ STOCK_AVAILABLE = "STOCK_AVAILABLE",
31
+ OUT_OF_STOCK = "OUT_OF_STOCK",
32
+ SPEC_INQUIRY = "SPEC_INQUIRY"
11
33
  }
12
34
 
13
- export { Button, type ButtonProps };
35
+ type Menu = {
36
+ id: string;
37
+ title: string;
38
+ mockResponse: MockResponseENUM;
39
+ value?: string;
40
+ phoneNumber?: string;
41
+ imageUrl?: string;
42
+ };
43
+ type QuickMenusProps = {
44
+ bannerSrc?: string;
45
+ message?: string;
46
+ menus: Menu[];
47
+ handleClick: (menu: Menu) => Promise<void>;
48
+ };
49
+ declare const QuickMenus: ({ bannerSrc, message, menus, handleClick }: QuickMenusProps) => react_jsx_runtime.JSX.Element;
50
+
51
+ export { AizuChat, Button, type ButtonProps, Loading, type Menu, QuickMenus, type QuickMenusProps };
@@ -1,13 +1,51 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentProps } from 'react';
2
3
 
3
- interface ButtonProps {
4
- children: React.ReactNode;
5
- className?: string;
6
- onClick?: () => void;
7
- }
8
- declare function Button(props: ButtonProps): react_jsx_runtime.JSX.Element;
9
- declare namespace Button {
10
- var displayName: string;
4
+ declare const AizuChat: () => react_jsx_runtime.JSX.Element;
5
+
6
+ type ButtonProps = ComponentProps<"button">;
7
+ declare const Button: ({ children, className, onClick, ref, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
8
+
9
+ type LoadingProps = {
10
+ message?: string;
11
+ };
12
+ declare const Loading: ({ message }: LoadingProps) => react_jsx_runtime.JSX.Element;
13
+
14
+ declare enum MockResponseENUM {
15
+ CATEGORY_SMARTPHONE = "CATEGORY_SMARTPHONE",
16
+ CATEGORY_NOTEBOOK = "CATEGORY_NOTEBOOK",
17
+ QUICK_MENU_SHOP = "QUICK_MENU_SHOP",
18
+ ERROR = "ERROR",
19
+ CODE_CANT_USE = "CODE_CANT_USE",
20
+ BUDGET_INQUIRY = "BUDGET_INQUIRY",
21
+ PRODUCT_FOUND_LESS_10000 = "PRODUCT_FOUND_LESS_10000",
22
+ PRODUCT_FOUND_RANGE_10000_20000 = "PRODUCT_FOUND_RANGE_10000_20000",
23
+ PRODUCT_FOUND_RANGE_20000_30000 = "PRODUCT_FOUND_RANGE_20000_30000",
24
+ PRODUCT_FOUND_MORE_30000 = "PRODUCT_FOUND_MORE_30000",
25
+ SHIPPING_INFO = "SHIPPING_INFO",
26
+ PAYMENT_METHODS = "PAYMENT_METHODS",
27
+ WARRANTY_INFO = "WARRANTY_INFO",
28
+ RETURN_POLICY = "RETURN_POLICY",
29
+ PROMOTION_INFO = "PROMOTION_INFO",
30
+ STOCK_AVAILABLE = "STOCK_AVAILABLE",
31
+ OUT_OF_STOCK = "OUT_OF_STOCK",
32
+ SPEC_INQUIRY = "SPEC_INQUIRY"
11
33
  }
12
34
 
13
- export { Button, type ButtonProps };
35
+ type Menu = {
36
+ id: string;
37
+ title: string;
38
+ mockResponse: MockResponseENUM;
39
+ value?: string;
40
+ phoneNumber?: string;
41
+ imageUrl?: string;
42
+ };
43
+ type QuickMenusProps = {
44
+ bannerSrc?: string;
45
+ message?: string;
46
+ menus: Menu[];
47
+ handleClick: (menu: Menu) => Promise<void>;
48
+ };
49
+ declare const QuickMenus: ({ bannerSrc, message, menus, handleClick }: QuickMenusProps) => react_jsx_runtime.JSX.Element;
50
+
51
+ export { AizuChat, Button, type ButtonProps, Loading, type Menu, QuickMenus, type QuickMenusProps };