azeriand-library 1.5.0 → 1.7.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/components/input/input.d.ts +16 -0
- package/dist/components/section-name/section-name.d.ts +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +19 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +18 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CardProps } from '../card/card';
|
|
2
|
+
export type InputProps = CardProps & {
|
|
3
|
+
type?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
iconPosition?: 'left' | 'right';
|
|
11
|
+
centerText?: boolean;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
};
|
|
16
|
+
export declare function Input({ type, value, disabled, placeholder, size, maxLength, onChange, iconPosition, centerText, icon, className, ...cardProps }: InputProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export { Card } from './components/card/card';
|
|
|
3
3
|
export { Button } from './components/button/button';
|
|
4
4
|
export { Badge } from './components/badge/badge';
|
|
5
5
|
export { Checkbox } from './components/checkbox/checkbox';
|
|
6
|
+
export { SectionName } from './components/section-name/section-name';
|
|
7
|
+
export { Input } from './components/input/input';
|
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(".card{\n /* border-radius: 20px; */\n color: var(--card-text-color, white);\n}\n\n.card.glass{\n background-color: color-mix(in oklch, var(--glass-color), transparent 80%);\n border: 1px solid color-mix(in oklch, var(--glass-color), transparent 40%);\n -webkit-backface-visibility: hidden;\n -webkit-perspective: 1000;\n -webkit-transform: translate3d(0,0,0);\n -webkit-transform: translateZ(0);\n backface-visibility: hidden;\n perspective: 1000;\n transform: translate3d(0,0,0);\n transform: translateZ(0);\n}\n\n.card.mate{\n background-color: var(--glass-color);\n}\n\n.card.outlined{\n border: solid white 2px;\n}\n\nbutton .card.ghost:hover, button .card.outlined:hover{\n background: color-mix(in oklch, var(--glass-color), transparent 80%);\n}\n\nbutton .card.glass:hover{\n box-shadow: 0 4px 10px color-mix(in oklch, var(--glass-color), transparent 85%);\n}\n\nbutton .card.mate:hover{\n background-color: color-mix(in oklch, var(--glass-color), white 10%) \n}\nbutton{\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n font-weight: bold;\n}\n\nbutton:focus {\n outline: revert;\n}"));
|
|
6
|
+
elementStyle.appendChild(document.createTextNode(".card{\n /* border-radius: 20px; */\n color: var(--card-text-color, white);\n}\n\n.card.glass{\n background-color: color-mix(in oklch, var(--glass-color), transparent 80%);\n border: 1px solid color-mix(in oklch, var(--glass-color), transparent 40%);\n -webkit-backface-visibility: hidden;\n -webkit-perspective: 1000;\n -webkit-transform: translate3d(0,0,0);\n -webkit-transform: translateZ(0);\n backface-visibility: hidden;\n perspective: 1000;\n transform: translate3d(0,0,0);\n transform: translateZ(0);\n}\n\n.card.mate{\n background-color: var(--glass-color);\n}\n\n.card.outlined{\n border: solid white 2px;\n}\n\nbutton .card.ghost:hover, button .card.outlined:hover{\n background: color-mix(in oklch, var(--glass-color), transparent 80%);\n}\n\nbutton .card.glass:hover{\n box-shadow: 0 4px 10px color-mix(in oklch, var(--glass-color), transparent 85%);\n}\n\nbutton .card.mate:hover{\n background-color: color-mix(in oklch, var(--glass-color), white 10%) \n}\nbutton{\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n font-weight: bold;\n}\n\nbutton:focus {\n outline: revert;\n}\n.section-name{\n color: hsla(0, 0%, 100%, 0.7);\n}input:disabled{\n color: hsla(0, 0%, 100%, 0.5);\n font-weight: bold;\n}\n\ninput::-moz-placeholder{\n color: hsla(0, 0%, 100%, 0.5);\n \n}\n\ninput::placeholder{\n color: hsla(0, 0%, 100%, 0.5);\n \n}\n\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput:focus{\n outline: none;\n}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -225,11 +225,28 @@ function Checkbox({ label, checkedDefault = false, onChange }) {
|
|
|
225
225
|
label
|
|
226
226
|
] });
|
|
227
227
|
}
|
|
228
|
+
function SectionName({ section, className }) {
|
|
229
|
+
return /* @__PURE__ */ jsx("div", { className: `uppercase font-bold tracking-[0.15rem] w-fit section-name ${className}`, children: section });
|
|
230
|
+
}
|
|
231
|
+
function Input({ type, value, disabled, placeholder, size, maxLength, onChange, iconPosition = "left", centerText = false, icon, className, ...cardProps }) {
|
|
232
|
+
function inputUpdated(ev) {
|
|
233
|
+
onChange == null ? void 0 : onChange(ev.target.value);
|
|
234
|
+
}
|
|
235
|
+
const classnames = `flex`;
|
|
236
|
+
const inputClassName = `flex justify-center items-center border-none bg-none py-[0.5rem] px-[1rem] m-0 w-full ${centerText ? "text-center" : ""}`;
|
|
237
|
+
const directionClassName = iconPosition === "left" ? "pl-2" : "flex-row-reverse pr-2";
|
|
238
|
+
return /* @__PURE__ */ jsx("div", { className: classnames, children: /* @__PURE__ */ jsxs(Card, { className: `flex justify-center items-center rounded-md ${className} ${icon ? directionClassName : ""}`, noBlur: true, noPadding: true, ...cardProps, style: cardProps.style, children: [
|
|
239
|
+
icon && /* @__PURE__ */ jsx("div", { className: "flex items-center", children: icon }),
|
|
240
|
+
/* @__PURE__ */ jsx("input", { className: inputClassName, onChange: inputUpdated, placeholder, value, disabled, type, size, maxLength, style: cardProps.style })
|
|
241
|
+
] }) });
|
|
242
|
+
}
|
|
228
243
|
export {
|
|
229
244
|
Avatar,
|
|
230
245
|
Badge,
|
|
231
246
|
Button,
|
|
232
247
|
Card,
|
|
233
|
-
Checkbox
|
|
248
|
+
Checkbox,
|
|
249
|
+
Input,
|
|
250
|
+
SectionName
|
|
234
251
|
};
|
|
235
252
|
//# sourceMappingURL=index.esm.js.map
|