@lumiastream/ui 0.0.1 → 0.0.2-alpha.10
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/README.md +81 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.js +58 -3
- package/package.json +12 -8
- package/dist/index.cjs +0 -55
- package/dist/index.d.cts +0 -18
- package/dist/index.d.mts +0 -18
- package/dist/index.mjs +0 -28
- package/dist/tailwind.css +0 -2
package/README.md
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Lumia UI Kit
|
|
2
|
+
|
|
3
|
+
A modern, Tailwind‑powered component library used across the Lumia Stream ecosystem. It provides production‑ready React components, design tokens, and Storybook documentation—all published as `@lumiastream/ui`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ✨ Features
|
|
8
|
+
|
|
9
|
+
| Feature | Details |
|
|
10
|
+
| --------------------- | ----------------------------------------------------- |
|
|
11
|
+
| **React 18 → 19** | Built and typed for the latest React majors. |
|
|
12
|
+
| **Tailwind CSS 4** | Utility‑first styling with full theme access. |
|
|
13
|
+
| **TypeScript first** | 100 % typed public API (`.d.ts` included). |
|
|
14
|
+
| **Storybook 9** | Live docs with interactive playgrounds & a11y checks. |
|
|
15
|
+
| **ESM + CJS bundles** | Works in every modern build tool. |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🔧 Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm i @lumiastream/ui
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> **Peer dependencies**
|
|
26
|
+
>
|
|
27
|
+
> - React ≥ 18.0 < 20 (`^18 || ^19`)
|
|
28
|
+
> - Tailwind CSS is _already compiled_—you do **not** need Tailwind in the host app unless you want to extend the theme.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🚀 Quick Start
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
// App.tsx
|
|
36
|
+
import { LSButton } from "@lumiastream/ui";
|
|
37
|
+
|
|
38
|
+
export default function App() {
|
|
39
|
+
return <LSButton variant="primary" label="Click Me" />;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 📚 Storybook Docs
|
|
46
|
+
|
|
47
|
+
Run a fully interactive playground locally:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pnpm storybook
|
|
51
|
+
open http://localhost:6006
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The public Storybook for the latest release lives at [https://ui.lumiastream.com](https://ui.lumiastream.com).
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 🏗️ Building from source
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# clone & bootstrap
|
|
62
|
+
pnpm install
|
|
63
|
+
|
|
64
|
+
# compile library (ESM + CJS + types) and Tailwind sheet
|
|
65
|
+
pnpm build
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Artifacts land in `dist/` and are what gets published to npm.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 🤝 Running live
|
|
73
|
+
|
|
74
|
+
1. Run `pnpm storybook` for hot‑reloading Storybook and `pnpm watch` for the library bundle.
|
|
75
|
+
2. Commit with Conventional Commits (`feat:`, `fix:` …) so the release pipeline can auto‑generate changelogs.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 🪪 License
|
|
80
|
+
|
|
81
|
+
ISC © Lumia Stream LLC
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CompletionContext } from '@codemirror/autocomplete';
|
|
2
3
|
|
|
3
4
|
interface LSButtonProps {
|
|
4
5
|
/** Is this the principal call to action on the page? */
|
|
@@ -15,4 +16,21 @@ interface LSButtonProps {
|
|
|
15
16
|
/** Primary UI component for user interaction */
|
|
16
17
|
declare const LSButton: ({ primary, size, backgroundColor, label, ...props }: LSButtonProps) => react_jsx_runtime.JSX.Element;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
declare function allowedVariableCompletion(context: CompletionContext, variables: {
|
|
20
|
+
label: string;
|
|
21
|
+
displayLabel: string;
|
|
22
|
+
type: string;
|
|
23
|
+
info: string;
|
|
24
|
+
shouldWrap?: boolean;
|
|
25
|
+
}[]): {
|
|
26
|
+
from: number;
|
|
27
|
+
options: {
|
|
28
|
+
label: string;
|
|
29
|
+
displayLabel: string;
|
|
30
|
+
type: string;
|
|
31
|
+
info: string;
|
|
32
|
+
}[];
|
|
33
|
+
validFor: RegExp;
|
|
34
|
+
} | null;
|
|
35
|
+
|
|
36
|
+
export { LSButton, type LSButtonProps, allowedVariableCompletion };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
// #style-inject:#style-inject
|
|
2
|
+
function styleInject(css, { insertAt } = {}) {
|
|
3
|
+
if (!css || typeof document === "undefined") return;
|
|
4
|
+
const head = document.head || document.getElementsByTagName("head")[0];
|
|
5
|
+
const style = document.createElement("style");
|
|
6
|
+
style.type = "text/css";
|
|
7
|
+
if (insertAt === "top") {
|
|
8
|
+
if (head.firstChild) {
|
|
9
|
+
head.insertBefore(style, head.firstChild);
|
|
10
|
+
} else {
|
|
11
|
+
head.appendChild(style);
|
|
12
|
+
}
|
|
13
|
+
} else {
|
|
14
|
+
head.appendChild(style);
|
|
15
|
+
}
|
|
16
|
+
if (style.styleSheet) {
|
|
17
|
+
style.styleSheet.cssText = css;
|
|
18
|
+
} else {
|
|
19
|
+
style.appendChild(document.createTextNode(css));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/tailwind.css
|
|
24
|
+
styleInject('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */\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-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --spacing: 0.25rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-base: 1rem;\n --text-base--line-height: calc(1.5 / 1);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\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 :-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 .static {\n position: static;\n }\n .contents {\n display: contents;\n }\n .bg-blue-500 {\n background-color: var(--color-blue-500);\n }\n .bg-gray-500 {\n background-color: var(--color-gray-500);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .text-base {\n font-size: var(--text-base);\n line-height: var(--tw-leading, var(--text-base--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n}\n');
|
|
25
|
+
|
|
1
26
|
// src/components/LSButton/LSButton.tsx
|
|
2
27
|
import { jsx } from "react/jsx-runtime";
|
|
3
28
|
var LSButton = ({
|
|
@@ -15,14 +40,44 @@ var LSButton = ({
|
|
|
15
40
|
className: [
|
|
16
41
|
"bg-blue-500",
|
|
17
42
|
size === "small" ? "px-3 py-1 text-sm" : size === "large" ? "px-6 py-3 text-lg" : "px-4 py-2 text-base",
|
|
18
|
-
mode
|
|
43
|
+
mode,
|
|
44
|
+
backgroundColor ? `bg-[${backgroundColor}]` : ""
|
|
19
45
|
].join(" "),
|
|
20
|
-
style: { backgroundColor },
|
|
21
46
|
...props,
|
|
22
47
|
children: label
|
|
23
48
|
}
|
|
24
49
|
);
|
|
25
50
|
};
|
|
51
|
+
|
|
52
|
+
// src/utils/allowedVariableCompletion.ts
|
|
53
|
+
function allowedVariableCompletion(context, variables) {
|
|
54
|
+
const before = context.state.sliceDoc(0, context.pos);
|
|
55
|
+
const after = context.state.sliceDoc(context.pos, context.pos + 2);
|
|
56
|
+
const wordMatch = /(\w*)$/.exec(before);
|
|
57
|
+
if (!wordMatch) return null;
|
|
58
|
+
const word = wordMatch[1];
|
|
59
|
+
const from = context.pos - word.length;
|
|
60
|
+
const openCount = before.match(/({+)\s*\w*$/)?.[1].length ?? 0;
|
|
61
|
+
const closeCount = after.startsWith("}}") ? 2 : after.startsWith("}") ? 1 : 0;
|
|
62
|
+
const openNeeded = Math.max(0, 2 - openCount);
|
|
63
|
+
const closeNeeded = Math.max(0, 2 - closeCount);
|
|
64
|
+
const braceWrap = (v) => `${"{".repeat(openNeeded)}${v}${"}".repeat(closeNeeded)}`;
|
|
65
|
+
const options = [
|
|
66
|
+
...variables.map((variable) => ({
|
|
67
|
+
label: variable.shouldWrap ? braceWrap(variable.label) : variable.label,
|
|
68
|
+
displayLabel: variable.displayLabel,
|
|
69
|
+
type: variable.type,
|
|
70
|
+
info: variable.info
|
|
71
|
+
}))
|
|
72
|
+
];
|
|
73
|
+
return {
|
|
74
|
+
from,
|
|
75
|
+
options,
|
|
76
|
+
validFor: /^[\w$]*$/
|
|
77
|
+
// keep list open while typing identifiers
|
|
78
|
+
};
|
|
79
|
+
}
|
|
26
80
|
export {
|
|
27
|
-
LSButton
|
|
81
|
+
LSButton,
|
|
82
|
+
allowedVariableCompletion
|
|
28
83
|
};
|
package/package.json
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-alpha.10",
|
|
4
4
|
"author": "Lumia Stream",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "Lumia UI Kit",
|
|
7
7
|
"packageManager": "pnpm@10.12.4",
|
|
8
8
|
"type": "module",
|
|
9
|
-
"main": "dist/index.
|
|
10
|
-
"module": "dist/index.
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
11
|
"types": "dist/types/index.d.ts",
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
-
"import": "./dist/index.
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"start": "storybook dev -p 6006",
|
|
22
|
-
"build": "tsup src/index.ts
|
|
22
|
+
"build": "tsup src/index.ts",
|
|
23
23
|
"build-storybook": "storybook build",
|
|
24
|
-
"
|
|
24
|
+
"watch": "tsup src/index.ts --watch",
|
|
25
|
+
"release": "changeset && changeset tag && pnpm build && pnpm publish",
|
|
26
|
+
"prepublishOnly": "pnpm build"
|
|
25
27
|
},
|
|
26
28
|
"peerDependencies": {
|
|
27
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
28
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
29
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
30
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
31
|
+
"@codemirror/autocomplete": "^6.0.0"
|
|
29
32
|
},
|
|
30
33
|
"devDependencies": {
|
|
34
|
+
"@codemirror/autocomplete": "^6.0.0",
|
|
31
35
|
"@storybook/builder-vite": "^9.0.15",
|
|
32
36
|
"@storybook/react-vite": "^9.0.15",
|
|
33
37
|
"@tailwindcss/vite": "^4.1.11",
|
package/dist/index.cjs
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
LSButton: () => LSButton
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(index_exports);
|
|
26
|
-
|
|
27
|
-
// src/components/LSButton/LSButton.tsx
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
var LSButton = ({
|
|
30
|
-
primary = false,
|
|
31
|
-
size = "medium",
|
|
32
|
-
backgroundColor,
|
|
33
|
-
label,
|
|
34
|
-
...props
|
|
35
|
-
}) => {
|
|
36
|
-
const mode = primary ? "bg-blue-500" : "bg-gray-500";
|
|
37
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
|
-
"button",
|
|
39
|
-
{
|
|
40
|
-
type: "button",
|
|
41
|
-
className: [
|
|
42
|
-
"bg-blue-500",
|
|
43
|
-
size === "small" ? "px-3 py-1 text-sm" : size === "large" ? "px-6 py-3 text-lg" : "px-4 py-2 text-base",
|
|
44
|
-
mode
|
|
45
|
-
].join(" "),
|
|
46
|
-
style: { backgroundColor },
|
|
47
|
-
...props,
|
|
48
|
-
children: label
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
-
0 && (module.exports = {
|
|
54
|
-
LSButton
|
|
55
|
-
});
|
package/dist/index.d.cts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface LSButtonProps {
|
|
4
|
-
/** Is this the principal call to action on the page? */
|
|
5
|
-
primary?: boolean;
|
|
6
|
-
/** What background color to use */
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
/** How large should the button be? */
|
|
9
|
-
size?: 'small' | 'medium' | 'large';
|
|
10
|
-
/** Button contents */
|
|
11
|
-
label: string;
|
|
12
|
-
/** Optional click handler */
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
}
|
|
15
|
-
/** Primary UI component for user interaction */
|
|
16
|
-
declare const LSButton: ({ primary, size, backgroundColor, label, ...props }: LSButtonProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
export { LSButton, type LSButtonProps };
|
package/dist/index.d.mts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface LSButtonProps {
|
|
4
|
-
/** Is this the principal call to action on the page? */
|
|
5
|
-
primary?: boolean;
|
|
6
|
-
/** What background color to use */
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
/** How large should the button be? */
|
|
9
|
-
size?: 'small' | 'medium' | 'large';
|
|
10
|
-
/** Button contents */
|
|
11
|
-
label: string;
|
|
12
|
-
/** Optional click handler */
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
}
|
|
15
|
-
/** Primary UI component for user interaction */
|
|
16
|
-
declare const LSButton: ({ primary, size, backgroundColor, label, ...props }: LSButtonProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
export { LSButton, type LSButtonProps };
|
package/dist/index.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// src/components/LSButton/LSButton.tsx
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
var LSButton = ({
|
|
4
|
-
primary = false,
|
|
5
|
-
size = "medium",
|
|
6
|
-
backgroundColor,
|
|
7
|
-
label,
|
|
8
|
-
...props
|
|
9
|
-
}) => {
|
|
10
|
-
const mode = primary ? "bg-blue-500" : "bg-gray-500";
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
"button",
|
|
13
|
-
{
|
|
14
|
-
type: "button",
|
|
15
|
-
className: [
|
|
16
|
-
"bg-blue-500",
|
|
17
|
-
size === "small" ? "px-3 py-1 text-sm" : size === "large" ? "px-6 py-3 text-lg" : "px-4 py-2 text-base",
|
|
18
|
-
mode
|
|
19
|
-
].join(" "),
|
|
20
|
-
style: { backgroundColor },
|
|
21
|
-
...props,
|
|
22
|
-
children: label
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
LSButton
|
|
28
|
-
};
|
package/dist/tailwind.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-500:oklch(62.3% .214 259.815);--color-gray-500:oklch(55.1% .027 264.364);--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;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");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.static{position:static}.contents{display:contents}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-500{background-color:var(--color-gray-500)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}
|