@raketa-builder/ui 0.3.0 → 0.5.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.
- package/dist/index.js +5 -15
- package/package.json +1 -1
- package/src/Button.jsx +17 -14
- package/src/Stack.jsx +2 -10
- package/src/styles.css +37 -0
package/dist/index.js
CHANGED
|
@@ -173,11 +173,11 @@ var P_default = P;
|
|
|
173
173
|
var import_react3 = __toESM(require("react"));
|
|
174
174
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
175
175
|
var Button = (_a) => {
|
|
176
|
-
var _b = _a, {
|
|
176
|
+
var _b = _a, { as = "button", size, variant, className } = _b, props = __objRest(_b, ["as", "size", "variant", "className"]);
|
|
177
|
+
const Component = as;
|
|
177
178
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
178
|
-
|
|
179
|
+
Component,
|
|
179
180
|
__spreadValues({
|
|
180
|
-
type,
|
|
181
181
|
className: cn(
|
|
182
182
|
"r-reset",
|
|
183
183
|
"r-reset-button",
|
|
@@ -370,18 +370,8 @@ var Toolbar_default = Toolbar;
|
|
|
370
370
|
var import_react13 = __toESM(require("react"));
|
|
371
371
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
372
372
|
var Stack = (_a) => {
|
|
373
|
-
var _b = _a, {
|
|
374
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
375
|
-
"div",
|
|
376
|
-
__spreadValues({
|
|
377
|
-
style: {
|
|
378
|
-
justifyContent: h || "flex-start",
|
|
379
|
-
alignItems: v || "flex-start",
|
|
380
|
-
gap: g || "1em"
|
|
381
|
-
},
|
|
382
|
-
className: cn("r-stack", className)
|
|
383
|
-
}, props)
|
|
384
|
-
);
|
|
373
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", __spreadValues({ className: cn("r-stack", className) }, props));
|
|
385
375
|
};
|
|
386
376
|
var Stack_default = Stack;
|
|
387
377
|
|
package/package.json
CHANGED
package/src/Button.jsx
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import cn from "./cn";
|
|
3
3
|
|
|
4
|
-
const Button = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
const Button = ({ as = "button", size, variant, className, ...props }) => {
|
|
5
|
+
const Component = as;
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<Component
|
|
9
|
+
className={cn(
|
|
10
|
+
"r-reset",
|
|
11
|
+
"r-reset-button",
|
|
12
|
+
"r-button",
|
|
13
|
+
`r-button-${size}`,
|
|
14
|
+
`r-button-${variant}`,
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
18
21
|
|
|
19
22
|
Button.defaultProps = {
|
|
20
23
|
type: "button",
|
package/src/Stack.jsx
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import cn from "./cn";
|
|
3
3
|
|
|
4
|
-
const Stack = ({
|
|
5
|
-
<div
|
|
6
|
-
style={{
|
|
7
|
-
justifyContent: h || "flex-start",
|
|
8
|
-
alignItems: v || "flex-start",
|
|
9
|
-
gap: g || "1em",
|
|
10
|
-
}}
|
|
11
|
-
className={cn("r-stack", className)}
|
|
12
|
-
{...props}
|
|
13
|
-
></div>
|
|
4
|
+
const Stack = ({ className, ...props }) => (
|
|
5
|
+
<div className={cn("r-stack", className)} {...props}></div>
|
|
14
6
|
);
|
|
15
7
|
|
|
16
8
|
export default Stack;
|
package/src/styles.css
CHANGED
|
@@ -387,6 +387,43 @@
|
|
|
387
387
|
|
|
388
388
|
.r-stack {
|
|
389
389
|
display: flex;
|
|
390
|
+
gap: 1rem;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.r-stack-justify-beteen {
|
|
394
|
+
justify-content: space-between;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.r-stack-justify-start {
|
|
398
|
+
justify-content: flex-start;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.r-stack-justify-end {
|
|
402
|
+
justify-content: flex-end;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.r-stack-justify-center {
|
|
406
|
+
justify-content: center;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.r-stack-justify-around {
|
|
410
|
+
justify-content: space-around;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.r-stack-align-start {
|
|
414
|
+
align-items: flex-start;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.r-stack-align-center {
|
|
418
|
+
align-items: center;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.r-stack-align-end {
|
|
422
|
+
align-items: flex-end;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.r-stack-direction-col {
|
|
426
|
+
flex-direction: column;
|
|
390
427
|
}
|
|
391
428
|
|
|
392
429
|
.r-heading {
|