@sikka/hawa 0.8.3-next → 0.8.4-next
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.css +7 -0
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +16 -10
- package/dist/index.mjs +23 -8
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1506,6 +1506,10 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1506
1506
|
.hawa-gap-6 {
|
|
1507
1507
|
gap: 1.5rem;
|
|
1508
1508
|
}
|
|
1509
|
+
.hawa-gap-x-10 {
|
|
1510
|
+
-moz-column-gap: 2.5rem;
|
|
1511
|
+
column-gap: 2.5rem;
|
|
1512
|
+
}
|
|
1509
1513
|
.hawa-gap-x-16 {
|
|
1510
1514
|
-moz-column-gap: 4rem;
|
|
1511
1515
|
column-gap: 4rem;
|
|
@@ -1676,6 +1680,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1676
1680
|
.hawa-border-l-0 {
|
|
1677
1681
|
border-left-width: 0px;
|
|
1678
1682
|
}
|
|
1683
|
+
.hawa-border-r {
|
|
1684
|
+
border-right-width: 1px;
|
|
1685
|
+
}
|
|
1679
1686
|
.hawa-border-t {
|
|
1680
1687
|
border-top-width: 1px;
|
|
1681
1688
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { FC, ReactNode, ChangeEvent, RefObject, PropsWithRef } from 'react';
|
|
2
|
+
import React__default, { FC, ReactNode, ChangeEvent, InputHTMLAttributes, RefObject, PropsWithRef } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -102,6 +102,7 @@ declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttribute
|
|
|
102
102
|
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
103
103
|
declare const CardContent: React$1.ForwardRefExoticComponent<{
|
|
104
104
|
headless?: boolean | undefined;
|
|
105
|
+
noPadding?: boolean | undefined;
|
|
105
106
|
} & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
106
107
|
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
107
108
|
|
|
@@ -334,6 +335,11 @@ type ColorPickerTypes = {
|
|
|
334
335
|
color?: any;
|
|
335
336
|
/** Fires everytime the color changes */
|
|
336
337
|
handleChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
338
|
+
colorPickerClassNames?: string;
|
|
339
|
+
colorTextClassNames?: string;
|
|
340
|
+
colorPickerProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
341
|
+
textInputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
342
|
+
containerProps?: InputHTMLAttributes<HTMLDivElement>;
|
|
337
343
|
};
|
|
338
344
|
declare const ColorPicker: FC<ColorPickerTypes>;
|
|
339
345
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { FC, ReactNode, ChangeEvent, RefObject, PropsWithRef } from 'react';
|
|
2
|
+
import React__default, { FC, ReactNode, ChangeEvent, InputHTMLAttributes, RefObject, PropsWithRef } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -102,6 +102,7 @@ declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttribute
|
|
|
102
102
|
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
103
103
|
declare const CardContent: React$1.ForwardRefExoticComponent<{
|
|
104
104
|
headless?: boolean | undefined;
|
|
105
|
+
noPadding?: boolean | undefined;
|
|
105
106
|
} & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
106
107
|
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
107
108
|
|
|
@@ -334,6 +335,11 @@ type ColorPickerTypes = {
|
|
|
334
335
|
color?: any;
|
|
335
336
|
/** Fires everytime the color changes */
|
|
336
337
|
handleChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
338
|
+
colorPickerClassNames?: string;
|
|
339
|
+
colorTextClassNames?: string;
|
|
340
|
+
colorPickerProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
341
|
+
textInputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
342
|
+
containerProps?: InputHTMLAttributes<HTMLDivElement>;
|
|
337
343
|
};
|
|
338
344
|
declare const ColorPicker: FC<ColorPickerTypes>;
|
|
339
345
|
|
package/dist/index.js
CHANGED
|
@@ -1028,13 +1028,14 @@ var CardDescription = React5.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
|
1028
1028
|
});
|
|
1029
1029
|
CardDescription.displayName = "CardDescription";
|
|
1030
1030
|
var CardContent = React5.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
1031
|
-
var headless = _param.headless, className = _param.className, props = _object_without_properties(_param, [
|
|
1031
|
+
var headless = _param.headless, noPadding = _param.noPadding, className = _param.className, props = _object_without_properties(_param, [
|
|
1032
1032
|
"headless",
|
|
1033
|
+
"noPadding",
|
|
1033
1034
|
"className"
|
|
1034
1035
|
]);
|
|
1035
1036
|
return React5.createElement("div", _object_spread({
|
|
1036
1037
|
ref: ref,
|
|
1037
|
-
className: cn("hawa-p-6", headless ? "hawa-pt-6" : "hawa-pt-0", className)
|
|
1038
|
+
className: cn(noPadding ? "hawa-p-0" : "hawa-p-6", headless ? "hawa-pt-6" : "hawa-pt-0", className)
|
|
1038
1039
|
}, props));
|
|
1039
1040
|
});
|
|
1040
1041
|
CardContent.displayName = "CardContent";
|
|
@@ -2336,16 +2337,21 @@ var DropdownMenu = function(param) {
|
|
|
2336
2337
|
};
|
|
2337
2338
|
// components/elements/ColorPicker.tsx
|
|
2338
2339
|
var import_react14 = __toESM(require("react"));
|
|
2339
|
-
var ColorPicker = function(
|
|
2340
|
+
var ColorPicker = function(_param) {
|
|
2341
|
+
var containerProps = _param.containerProps, colorPickerProps = _param.colorPickerProps, textInputProps = _param.textInputProps, props = _object_without_properties(_param, [
|
|
2342
|
+
"containerProps",
|
|
2343
|
+
"colorPickerProps",
|
|
2344
|
+
"textInputProps"
|
|
2345
|
+
]);
|
|
2340
2346
|
var _ref = _sliced_to_array((0, import_react14.useState)(props.color), 2), selectedColor = _ref[0], setSelectedColor = _ref[1];
|
|
2341
2347
|
return /* @__PURE__ */ import_react14.default.createElement("div", {
|
|
2342
|
-
className: "hawa-flex hawa-w-fit hawa-flex-row hawa-rounded hawa-border hawa-p-0"
|
|
2348
|
+
className: cn("hawa-flex hawa-w-fit hawa-flex-row hawa-rounded hawa-border hawa-p-0", containerProps === null || containerProps === void 0 ? void 0 : containerProps.className)
|
|
2343
2349
|
}, /* @__PURE__ */ import_react14.default.createElement("div", {
|
|
2344
2350
|
style: {
|
|
2345
2351
|
backgroundColor: selectedColor
|
|
2346
2352
|
},
|
|
2347
|
-
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg"
|
|
2348
|
-
}, /* @__PURE__ */ import_react14.default.createElement("input", {
|
|
2353
|
+
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border-r"
|
|
2354
|
+
}, /* @__PURE__ */ import_react14.default.createElement("input", _object_spread({
|
|
2349
2355
|
type: "color",
|
|
2350
2356
|
value: selectedColor,
|
|
2351
2357
|
onChange: function(e) {
|
|
@@ -2354,8 +2360,8 @@ var ColorPicker = function(props) {
|
|
|
2354
2360
|
props.handleChange(e);
|
|
2355
2361
|
}
|
|
2356
2362
|
},
|
|
2357
|
-
className: "hawa-opacity-0"
|
|
2358
|
-
})), /* @__PURE__ */ import_react14.default.createElement("input", {
|
|
2363
|
+
className: cn("hawa-opacity-0", props.colorPickerClassNames)
|
|
2364
|
+
}, colorPickerProps))), /* @__PURE__ */ import_react14.default.createElement("input", _object_spread({
|
|
2359
2365
|
type: "text",
|
|
2360
2366
|
onChange: function(e) {
|
|
2361
2367
|
setSelectedColor(e.target.value);
|
|
@@ -2364,8 +2370,8 @@ var ColorPicker = function(props) {
|
|
|
2364
2370
|
}
|
|
2365
2371
|
},
|
|
2366
2372
|
value: selectedColor,
|
|
2367
|
-
className: "hawa-w-24 hawa-bg-background hawa-rounded-br-lg hawa-rounded-tr-lg hawa-pl-2 hawa-pr-2"
|
|
2368
|
-
}));
|
|
2373
|
+
className: cn("hawa-w-24 hawa-bg-background hawa-rounded-br-lg hawa-rounded-tr-lg hawa-pl-2 hawa-pr-2", props.colorTextClassNames)
|
|
2374
|
+
}, textInputProps)));
|
|
2369
2375
|
};
|
|
2370
2376
|
// components/elements/PinInput.tsx
|
|
2371
2377
|
var import_react15 = __toESM(require("react"));
|
package/dist/index.mjs
CHANGED
|
@@ -319,12 +319,12 @@ var CardDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
319
319
|
));
|
|
320
320
|
CardDescription.displayName = "CardDescription";
|
|
321
321
|
var CardContent = React5.forwardRef(
|
|
322
|
-
({ headless, className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
322
|
+
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
323
323
|
"div",
|
|
324
324
|
{
|
|
325
325
|
ref,
|
|
326
326
|
className: cn(
|
|
327
|
-
"hawa-p-6",
|
|
327
|
+
noPadding ? "hawa-p-0" : "hawa-p-6",
|
|
328
328
|
headless ? "hawa-pt-6" : "hawa-pt-0",
|
|
329
329
|
className
|
|
330
330
|
),
|
|
@@ -1880,19 +1880,29 @@ var DropdownMenu = ({
|
|
|
1880
1880
|
};
|
|
1881
1881
|
|
|
1882
1882
|
// components/elements/ColorPicker.tsx
|
|
1883
|
-
import React25, {
|
|
1884
|
-
|
|
1883
|
+
import React25, {
|
|
1884
|
+
useState as useState9
|
|
1885
|
+
} from "react";
|
|
1886
|
+
var ColorPicker = ({
|
|
1887
|
+
containerProps,
|
|
1888
|
+
colorPickerProps,
|
|
1889
|
+
textInputProps,
|
|
1890
|
+
...props
|
|
1891
|
+
}) => {
|
|
1885
1892
|
const [selectedColor, setSelectedColor] = useState9(props.color);
|
|
1886
1893
|
return /* @__PURE__ */ React25.createElement(
|
|
1887
1894
|
"div",
|
|
1888
1895
|
{
|
|
1889
|
-
className:
|
|
1896
|
+
className: cn(
|
|
1897
|
+
`hawa-flex hawa-w-fit hawa-flex-row hawa-rounded hawa-border hawa-p-0`,
|
|
1898
|
+
containerProps?.className
|
|
1899
|
+
)
|
|
1890
1900
|
},
|
|
1891
1901
|
/* @__PURE__ */ React25.createElement(
|
|
1892
1902
|
"div",
|
|
1893
1903
|
{
|
|
1894
1904
|
style: { backgroundColor: selectedColor },
|
|
1895
|
-
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg"
|
|
1905
|
+
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border-r"
|
|
1896
1906
|
},
|
|
1897
1907
|
/* @__PURE__ */ React25.createElement(
|
|
1898
1908
|
"input",
|
|
@@ -1905,7 +1915,8 @@ var ColorPicker = (props) => {
|
|
|
1905
1915
|
props.handleChange(e);
|
|
1906
1916
|
}
|
|
1907
1917
|
},
|
|
1908
|
-
className: "hawa-opacity-0"
|
|
1918
|
+
className: cn("hawa-opacity-0", props.colorPickerClassNames),
|
|
1919
|
+
...colorPickerProps
|
|
1909
1920
|
}
|
|
1910
1921
|
)
|
|
1911
1922
|
),
|
|
@@ -1920,7 +1931,11 @@ var ColorPicker = (props) => {
|
|
|
1920
1931
|
}
|
|
1921
1932
|
},
|
|
1922
1933
|
value: selectedColor,
|
|
1923
|
-
className:
|
|
1934
|
+
className: cn(
|
|
1935
|
+
"hawa-w-24 hawa-bg-background hawa-rounded-br-lg hawa-rounded-tr-lg hawa-pl-2 hawa-pr-2",
|
|
1936
|
+
props.colorTextClassNames
|
|
1937
|
+
),
|
|
1938
|
+
...textInputProps
|
|
1924
1939
|
}
|
|
1925
1940
|
)
|
|
1926
1941
|
);
|