@aizu-chat/react 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-KLPKNMIP.mjs +15 -0
- package/dist/chunk-R4SQBMHN.mjs +55 -0
- package/dist/components.js +5 -2
- package/dist/components.mjs +3 -47
- package/dist/hooks.mjs +3 -10
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +92 -0
- package/dist/index.mjs +11 -0
- package/package.json +19 -10
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
// src/hooks/use-custom.ts
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
var useCustom = () => {
|
|
6
|
+
const [count, setCount] = useState(0);
|
|
7
|
+
const increment = () => {
|
|
8
|
+
setCount(count + 1);
|
|
9
|
+
};
|
|
10
|
+
return { count, increment };
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
useCustom
|
|
15
|
+
};
|
|
@@ -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
|
+
};
|
package/dist/components.js
CHANGED
|
@@ -48,7 +48,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// src/global.css
|
|
51
|
-
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 --
|
|
51
|
+
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');
|
|
52
52
|
|
|
53
53
|
// src/utils/cn.ts
|
|
54
54
|
var import_clsx = require("clsx");
|
|
@@ -65,7 +65,10 @@ function Button(props) {
|
|
|
65
65
|
{
|
|
66
66
|
type: "button",
|
|
67
67
|
onClick: props.onClick,
|
|
68
|
-
className: cn(
|
|
68
|
+
className: cn(
|
|
69
|
+
"p-3 border border-red-500 hover:bg-red-500",
|
|
70
|
+
props.className
|
|
71
|
+
),
|
|
69
72
|
children: props.children
|
|
70
73
|
}
|
|
71
74
|
);
|
package/dist/components.mjs
CHANGED
|
@@ -1,51 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 --color-blue-500: oklch(62.3% 0.214 259.815);\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 .bg-blue-500 {\n background-color: var(--color-blue-500);\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("border border-red-500 bg-blue-500", props.className),
|
|
44
|
-
children: props.children
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
Button.displayName = "Button";
|
|
2
|
+
import {
|
|
3
|
+
Button
|
|
4
|
+
} from "./chunk-R4SQBMHN.mjs";
|
|
49
5
|
export {
|
|
50
6
|
Button
|
|
51
7
|
};
|
package/dist/hooks.mjs
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var useCustom = () => {
|
|
6
|
-
const [count, setCount] = useState(0);
|
|
7
|
-
const increment = () => {
|
|
8
|
-
setCount(count + 1);
|
|
9
|
-
};
|
|
10
|
-
return { count, increment };
|
|
11
|
-
};
|
|
2
|
+
import {
|
|
3
|
+
useCustom
|
|
4
|
+
} from "./chunk-KLPKNMIP.mjs";
|
|
12
5
|
export {
|
|
13
6
|
useCustom
|
|
14
7
|
};
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
Button: () => Button,
|
|
25
|
+
useCustom: () => useCustom
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(src_exports);
|
|
28
|
+
|
|
29
|
+
// #style-inject:#style-inject
|
|
30
|
+
function styleInject(css, { insertAt } = {}) {
|
|
31
|
+
if (!css || typeof document === "undefined") return;
|
|
32
|
+
const head = document.head || document.getElementsByTagName("head")[0];
|
|
33
|
+
const style = document.createElement("style");
|
|
34
|
+
style.type = "text/css";
|
|
35
|
+
if (insertAt === "top") {
|
|
36
|
+
if (head.firstChild) {
|
|
37
|
+
head.insertBefore(style, head.firstChild);
|
|
38
|
+
} else {
|
|
39
|
+
head.appendChild(style);
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
head.appendChild(style);
|
|
43
|
+
}
|
|
44
|
+
if (style.styleSheet) {
|
|
45
|
+
style.styleSheet.cssText = css;
|
|
46
|
+
} else {
|
|
47
|
+
style.appendChild(document.createTextNode(css));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/global.css
|
|
52
|
+
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');
|
|
53
|
+
|
|
54
|
+
// src/utils/cn.ts
|
|
55
|
+
var import_clsx = require("clsx");
|
|
56
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
57
|
+
function cn(...args) {
|
|
58
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(args));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/components/Button.tsx
|
|
62
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
63
|
+
function Button(props) {
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
+
"button",
|
|
66
|
+
{
|
|
67
|
+
type: "button",
|
|
68
|
+
onClick: props.onClick,
|
|
69
|
+
className: cn(
|
|
70
|
+
"p-3 border border-red-500 hover:bg-red-500",
|
|
71
|
+
props.className
|
|
72
|
+
),
|
|
73
|
+
children: props.children
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
Button.displayName = "Button";
|
|
78
|
+
|
|
79
|
+
// src/hooks/use-custom.ts
|
|
80
|
+
var import_react = require("react");
|
|
81
|
+
var useCustom = () => {
|
|
82
|
+
const [count, setCount] = (0, import_react.useState)(0);
|
|
83
|
+
const increment = () => {
|
|
84
|
+
setCount(count + 1);
|
|
85
|
+
};
|
|
86
|
+
return { count, increment };
|
|
87
|
+
};
|
|
88
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
+
0 && (module.exports = {
|
|
90
|
+
Button,
|
|
91
|
+
useCustom
|
|
92
|
+
});
|
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aizu-chat/react",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"sideEffects": [
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"sideEffects": [
|
|
5
|
+
"*.css",
|
|
6
|
+
"dist/**/*.css"
|
|
7
|
+
],
|
|
5
8
|
"license": "MIT",
|
|
6
|
-
"files": [
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
7
12
|
"exports": {
|
|
8
13
|
".": {
|
|
9
14
|
"types": "./dist/index.d.ts",
|
|
@@ -23,9 +28,15 @@
|
|
|
23
28
|
},
|
|
24
29
|
"typesVersions": {
|
|
25
30
|
"*": {
|
|
26
|
-
"*": [
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
"*": [
|
|
32
|
+
"./dist/index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"components": [
|
|
35
|
+
"./dist/components.d.ts"
|
|
36
|
+
],
|
|
37
|
+
"hooks": [
|
|
38
|
+
"./dist/hooks.d.ts"
|
|
39
|
+
]
|
|
29
40
|
}
|
|
30
41
|
},
|
|
31
42
|
"scripts": {
|
|
@@ -49,11 +60,9 @@
|
|
|
49
60
|
"typescript": "5.5.4"
|
|
50
61
|
},
|
|
51
62
|
"peerDependencies": {
|
|
52
|
-
"@tailwindcss/postcss": "^4.1.18",
|
|
53
|
-
"postcss": "^8.5.6",
|
|
54
63
|
"react": "^19.2.3",
|
|
55
64
|
"react-dom": "^19.2.3",
|
|
56
|
-
"tailwindcss": "^4
|
|
65
|
+
"tailwindcss": "^4 || ^3"
|
|
57
66
|
},
|
|
58
67
|
"publishConfig": {
|
|
59
68
|
"access": "public",
|
|
@@ -67,4 +76,4 @@
|
|
|
67
76
|
"clsx": "^2.1.1",
|
|
68
77
|
"tailwind-merge": "^3.4.0"
|
|
69
78
|
}
|
|
70
|
-
}
|
|
79
|
+
}
|