@safestrong/ppa-component-library 1.6.1 → 1.6.3
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.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +25 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -12
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +35 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -15,10 +15,11 @@ declare namespace Button {
|
|
|
15
15
|
}) => React.JSX.Element;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
declare function TextInput({ label, labelFor, icon, ...attr }: Readonly<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
18
|
+
declare function TextInput({ label, labelFor, icon, outerclass, ...attr }: Readonly<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
19
19
|
label?: string;
|
|
20
20
|
labelFor?: string;
|
|
21
21
|
icon?: IconProp;
|
|
22
|
+
outerclass?: string;
|
|
22
23
|
}>): React.JSX.Element;
|
|
23
24
|
|
|
24
25
|
declare function Slider(attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>): React.JSX.Element;
|
|
@@ -27,7 +28,7 @@ type SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
27
28
|
label?: string;
|
|
28
29
|
labelHtml?: string;
|
|
29
30
|
placeholder?: string;
|
|
30
|
-
|
|
31
|
+
outerclass?: string;
|
|
31
32
|
options?: {
|
|
32
33
|
label: string;
|
|
33
34
|
value: string;
|
|
@@ -106,7 +107,7 @@ type Option = {
|
|
|
106
107
|
type MultiSelect = {
|
|
107
108
|
label?: string;
|
|
108
109
|
labelHtml?: string;
|
|
109
|
-
|
|
110
|
+
outerclass?: string;
|
|
110
111
|
options?: Option[];
|
|
111
112
|
stringOptions?: string[];
|
|
112
113
|
state: {
|
|
@@ -138,7 +139,7 @@ declare namespace Navigation {
|
|
|
138
139
|
href: string;
|
|
139
140
|
}[];
|
|
140
141
|
activeUrl: string;
|
|
141
|
-
|
|
142
|
+
outerclass?: string;
|
|
142
143
|
CustomComponent?: React.ElementType;
|
|
143
144
|
}) => React.JSX.Element;
|
|
144
145
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,10 +15,11 @@ declare namespace Button {
|
|
|
15
15
|
}) => React.JSX.Element;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
declare function TextInput({ label, labelFor, icon, ...attr }: Readonly<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
18
|
+
declare function TextInput({ label, labelFor, icon, outerclass, ...attr }: Readonly<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
19
19
|
label?: string;
|
|
20
20
|
labelFor?: string;
|
|
21
21
|
icon?: IconProp;
|
|
22
|
+
outerclass?: string;
|
|
22
23
|
}>): React.JSX.Element;
|
|
23
24
|
|
|
24
25
|
declare function Slider(attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>): React.JSX.Element;
|
|
@@ -27,7 +28,7 @@ type SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
27
28
|
label?: string;
|
|
28
29
|
labelHtml?: string;
|
|
29
30
|
placeholder?: string;
|
|
30
|
-
|
|
31
|
+
outerclass?: string;
|
|
31
32
|
options?: {
|
|
32
33
|
label: string;
|
|
33
34
|
value: string;
|
|
@@ -106,7 +107,7 @@ type Option = {
|
|
|
106
107
|
type MultiSelect = {
|
|
107
108
|
label?: string;
|
|
108
109
|
labelHtml?: string;
|
|
109
|
-
|
|
110
|
+
outerclass?: string;
|
|
110
111
|
options?: Option[];
|
|
111
112
|
stringOptions?: string[];
|
|
112
113
|
state: {
|
|
@@ -138,7 +139,7 @@ declare namespace Navigation {
|
|
|
138
139
|
href: string;
|
|
139
140
|
}[];
|
|
140
141
|
activeUrl: string;
|
|
141
|
-
|
|
142
|
+
outerclass?: string;
|
|
142
143
|
CustomComponent?: React.ElementType;
|
|
143
144
|
}) => React.JSX.Element;
|
|
144
145
|
}
|
package/dist/index.js
CHANGED
|
@@ -97,6 +97,7 @@ function Button(_a) {
|
|
|
97
97
|
"className"
|
|
98
98
|
]);
|
|
99
99
|
const buttonIcon = isLoading ? import_free_solid_svg_icons.faCircleNotch : icon;
|
|
100
|
+
const loadingLabel = label && isLoading ? "Memproses ..." : "";
|
|
100
101
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
101
102
|
"button",
|
|
102
103
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -106,14 +107,21 @@ function Button(_a) {
|
|
|
106
107
|
import_react_fontawesome.FontAwesomeIcon,
|
|
107
108
|
{
|
|
108
109
|
icon: buttonIcon,
|
|
109
|
-
className: `text-[1.2rem] mr-[0.3rem] ${isLoading && "animate-spin"}`
|
|
110
|
+
className: `text-[1.2rem] ${label && "mr-[0.3rem]"} ${isLoading && "animate-spin"}`
|
|
110
111
|
}
|
|
111
112
|
),
|
|
112
|
-
isLoading ?
|
|
113
|
+
isLoading ? loadingLabel : label
|
|
113
114
|
);
|
|
114
115
|
}
|
|
115
116
|
var IconButton = (props) => {
|
|
116
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
117
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
118
|
+
"button",
|
|
119
|
+
__spreadProps(__spreadValues({}, props), {
|
|
120
|
+
className: `${props.className} ${props.title ? "max-w-[content] px-[0.8rem]" : ""} icon__button`
|
|
121
|
+
}),
|
|
122
|
+
props.icon && /* @__PURE__ */ import_react.default.createElement(import_react_fontawesome.FontAwesomeIcon, { icon: props.icon }),
|
|
123
|
+
props.title && /* @__PURE__ */ import_react.default.createElement("span", { className: "inline-block ml-[0.8rem] text-[1rem]" }, props.title)
|
|
124
|
+
);
|
|
117
125
|
};
|
|
118
126
|
var IconButtonGroup = ({ list: list2 }) => {
|
|
119
127
|
function getBtnClass(idx) {
|
|
@@ -132,13 +140,15 @@ function TextInput(_a) {
|
|
|
132
140
|
var _b = _a, {
|
|
133
141
|
label,
|
|
134
142
|
labelFor,
|
|
135
|
-
icon
|
|
143
|
+
icon,
|
|
144
|
+
outerclass
|
|
136
145
|
} = _b, attr = __objRest(_b, [
|
|
137
146
|
"label",
|
|
138
147
|
"labelFor",
|
|
139
|
-
"icon"
|
|
148
|
+
"icon",
|
|
149
|
+
"outerclass"
|
|
140
150
|
]);
|
|
141
|
-
return /* @__PURE__ */ import_react2.default.createElement("div", { className:
|
|
151
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { className: `group ${outerclass} w-full` }, label && /* @__PURE__ */ import_react2.default.createElement("label", { htmlFor: labelFor, className: "text-input__label" }, label), /* @__PURE__ */ import_react2.default.createElement("div", { className: "text-input__wrapper overflow-hidden" }, icon && /* @__PURE__ */ import_react2.default.createElement(import_react_fontawesome2.FontAwesomeIcon, { icon, className: input__icon }), /* @__PURE__ */ import_react2.default.createElement(
|
|
142
152
|
"input",
|
|
143
153
|
__spreadProps(__spreadValues({}, attr), {
|
|
144
154
|
className: `text-input w-full ${attr.className} ${icon && "!pl-[0.3rem]"}`
|
|
@@ -174,7 +184,7 @@ function SingleSelect(attr) {
|
|
|
174
184
|
value: ""
|
|
175
185
|
});
|
|
176
186
|
const inputKeyword = (0, import_react4.useDeferredValue)(keyword);
|
|
177
|
-
function selectItem({ label, value }) {
|
|
187
|
+
function selectItem({ label, value }, e) {
|
|
178
188
|
const triggerManual = attrInput.onChange;
|
|
179
189
|
if (triggerManual) {
|
|
180
190
|
triggerManual == null ? void 0 : triggerManual({
|
|
@@ -183,6 +193,9 @@ function SingleSelect(attr) {
|
|
|
183
193
|
}
|
|
184
194
|
setSelected({ label, value });
|
|
185
195
|
setKeyword("");
|
|
196
|
+
setTimeout(() => {
|
|
197
|
+
e.target.blur();
|
|
198
|
+
}, 250);
|
|
186
199
|
}
|
|
187
200
|
function autoUpdateValue(updatedValue) {
|
|
188
201
|
if (updatedValue) {
|
|
@@ -206,7 +219,7 @@ function SingleSelect(attr) {
|
|
|
206
219
|
(0, import_react4.useEffect)(() => {
|
|
207
220
|
attrInput.value && autoUpdateValue(attrInput.value);
|
|
208
221
|
}, [attrInput.value]);
|
|
209
|
-
return /* @__PURE__ */ import_react4.default.createElement("div", { className: `w-full group ${attr.
|
|
222
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: `w-full group ${attr.outerclass}` }, attrInput.label && /* @__PURE__ */ import_react4.default.createElement("label", { className: "text-input__label", htmlFor: attrInput.labelHtml }, attrInput.label), /* @__PURE__ */ import_react4.default.createElement("div", { className: `${attrInput.className} text-input__wrapper relative` }, /* @__PURE__ */ import_react4.default.createElement(
|
|
210
223
|
"input",
|
|
211
224
|
__spreadProps(__spreadValues(__spreadValues({}, attrInput), attrInput.onChange ? { onChange: attrInput.onChange } : {}), {
|
|
212
225
|
value: (_b = attrInput.value) != null ? _b : selected.value,
|
|
@@ -225,7 +238,7 @@ function SingleSelect(attr) {
|
|
|
225
238
|
"button",
|
|
226
239
|
{
|
|
227
240
|
type: "button",
|
|
228
|
-
onClick: () => selectItem({ label, value }),
|
|
241
|
+
onClick: (e) => selectItem({ label, value }, e),
|
|
229
242
|
key: value,
|
|
230
243
|
className: "select-item"
|
|
231
244
|
},
|
|
@@ -424,7 +437,7 @@ function MultiSelect(_a) {
|
|
|
424
437
|
const isAllSelected = state.value.length == availableOptions.length;
|
|
425
438
|
state.select(isAllSelected ? [] : availableOptions);
|
|
426
439
|
}, [state.value]);
|
|
427
|
-
return /* @__PURE__ */ import_react10.default.createElement("div", { className: `group w-full ${attr.
|
|
440
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { className: `group w-full ${attr.outerclass}` }, label && /* @__PURE__ */ import_react10.default.createElement("label", { className: "text-input__label", htmlFor: labelHtml }, label), /* @__PURE__ */ import_react10.default.createElement("div", { className: "text-input__wrapper relative" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
428
441
|
"input",
|
|
429
442
|
{
|
|
430
443
|
value: keyword,
|
|
@@ -553,7 +566,7 @@ var URLNavigation = (props) => {
|
|
|
553
566
|
function getAnchorClass(href) {
|
|
554
567
|
return href === props.activeUrl ? "bg-[var(--color-primary-soft)] text-[var(--color-primary)]" : "text-[var(--color-text-secondary)]/70 hover:bg-[var(--color-border)]/40";
|
|
555
568
|
}
|
|
556
|
-
return /* @__PURE__ */ import_react15.default.createElement("nav", { className: `nav__wrapper ${props.
|
|
569
|
+
return /* @__PURE__ */ import_react15.default.createElement("nav", { className: `nav__wrapper ${props.outerclass}` }, props.list.map((prop) => /* @__PURE__ */ import_react15.default.createElement(
|
|
557
570
|
Component,
|
|
558
571
|
__spreadValues({
|
|
559
572
|
key: prop.href,
|
|
@@ -563,7 +576,7 @@ var URLNavigation = (props) => {
|
|
|
563
576
|
)));
|
|
564
577
|
};
|
|
565
578
|
Navigation.URL = URLNavigation;
|
|
566
|
-
var base__anchor = "p-[0.8rem] transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]";
|
|
579
|
+
var base__anchor = "p-[0.8rem] h-full grid items-center transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]";
|
|
567
580
|
|
|
568
581
|
// src/components/Confirmation.tsx
|
|
569
582
|
var import_react16 = __toESM(require("react"));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/Button.tsx","../src/components/TextInput.tsx","../src/components/Slider.tsx","../src/components/SingleSelect.tsx","../src/components/Tooltip.tsx","../src/components/NavTabClient.tsx","../src/components/Card.tsx","../src/components/Toast.tsx","../src/components/Expandable.tsx","../src/components/MultiSelect.tsx","../src/components/ThemeToggle.tsx","../src/components/Dashboard.tsx","../src/components/Badge.tsx","../src/components/Skeleton.tsx","../src/components/Navigation.tsx","../src/components/Confirmation.tsx"],"sourcesContent":["export { default as Button } from \"./components/Button\";\nexport { default as TextInput } from \"./components/TextInput\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as SingleSelect } from \"./components/SingleSelect\";\nexport { default as Tooltip } from \"./components/Tooltip\";\nexport { default as NavTabClient } from \"./components/NavTabClient\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Toast } from \"./components/Toast\";\nexport { default as Expandable } from \"./components/Expandable\";\nexport { default as MultiSelect } from \"./components/MultiSelect\";\nexport { default as ThemeToggle } from \"./components/ThemeToggle\";\nexport { default as Dashboard } from \"./components/Dashboard\";\nexport { default as Badge } from \"./components/Badge\";\nexport { default as Skeleton } from \"./components/Skeleton\";\nexport { default as Navigation } from \"./components/Navigation\";\nexport { default as Confirmation } from \"./components/Confirmation\";\n","import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCircleNotch } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Button = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n icon?: IconProp;\n label?: string;\n btnType?: \"primary\" | \"secondary\" | \"tertiary\";\n isLoading?: boolean;\n};\n\nexport default function Button({\n label,\n icon,\n isLoading,\n btnType,\n className,\n ...rest\n}: Readonly<Button>) {\n const buttonIcon = isLoading ? faCircleNotch : icon;\n return (\n <button\n {...rest}\n className={`${!icon && \"py-[0.84rem]\"} ${className} ${\n btnType == \"secondary\" && \"btn__secondary\"\n } btn__primary`}\n >\n {buttonIcon && icon && (\n <FontAwesomeIcon\n icon={buttonIcon}\n className={`text-[1.2rem] mr-[0.3rem] ${isLoading && \"animate-spin\"}`}\n />\n )}\n {isLoading ? \"Memproses ...\" : label}\n </button>\n );\n}\n\nconst IconButton = (props: Readonly<Button>) => {\n return (\n <button {...props} className={`${props.className} icon__button`}>\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n </button>\n );\n};\n\nconst IconButtonGroup = ({ list }: { list: Button[] }) => {\n function getBtnClass(idx: number) {\n return `icon__button !rounded-[0] border-[0] ${\n idx !== 0 ? \"border-l border-l-[var(--color-border)]\" : \"\"\n }`;\n }\n return (\n <div className=\"icon__button_group\">\n {list.map((props, idx) => (\n <button key={idx} className={getBtnClass(idx)} {...props}>\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n </button>\n ))}\n </div>\n );\n};\n\nButton.IconButton = IconButton;\nButton.IconButtonGroup = IconButtonGroup;\n","import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nconst input__icon =\n \"w-[2rem] p-[0.9rem] px-[0.7rem] text-[1.2rem] bg-[var(--color-background-icon)] text-[var(--color-icon-input)] mr-2 group-focus-within:text-[var(--color-primary)]\";\n\nexport default function TextInput({\n label,\n labelFor,\n icon,\n ...attr\n}: Readonly<\n React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelFor?: string;\n icon?: IconProp;\n }\n>) {\n return (\n <div className=\"group ... w-full\">\n {label && (\n <label htmlFor={labelFor} className=\"text-input__label\">\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper overflow-hidden\">\n {icon && <FontAwesomeIcon icon={icon} className={input__icon} />}\n <input\n {...attr}\n className={`text-input w-full ${attr.className} ${\n icon && \"!pl-[0.3rem]\"\n }`}\n />\n </div>\n </div>\n );\n}\n","import React from \"react\";\nimport { faCheck } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport default function Slider(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <div className=\"slider__wrapper group\">\n <input {...attr} id=\"slider\" type=\"checkbox\" className={input} />\n <label htmlFor=\"slider\" className=\"slider\">\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[0.7rem] translate-x-[0.2px]\"\n />\n </label>\n </div>\n </div>\n );\n}\n\nconst input = \"peer ... w-[3rem] h-[1.6rem] opacity-[0] cursor-pointer\";\n","\"use client\";\nimport React, { useDeferredValue, useEffect, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faChevronDown } from \"@fortawesome/free-solid-svg-icons\";\n\ntype SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelHtml?: string;\n placeholder?: string;\n outerClass?: string;\n options?: {\n label: string;\n value: string;\n }[];\n stringOptions?: string[];\n};\n\nexport default function SingleSelect(attr: Readonly<SingleSelect>) {\n const { options = [], stringOptions = [], ...attrInput } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const [selected, setSelected] = useState<{ label: string; value: any }>({\n label: \"\",\n value: \"\",\n });\n const inputKeyword = useDeferredValue(keyword);\n\n function selectItem({ label, value }: { label: string; value: any }) {\n const triggerManual = attrInput.onChange;\n if (triggerManual) {\n triggerManual?.({\n target: { value, name: attrInput.name },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n setSelected({ label, value });\n setKeyword(\"\");\n }\n\n function autoUpdateValue(updatedValue: string) {\n if (updatedValue) {\n const filtered = availableOptions.find(\n ({ value }) => value == updatedValue\n );\n if (filtered) setSelected(filtered);\n }\n }\n\n const availableOptions = useMemo(() => {\n let defaultOptions = options && options.length > 0;\n if (!defaultOptions)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n const filteredOptions = useMemo(() => {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }, [inputKeyword, availableOptions]);\n\n useEffect(() => {\n attrInput.value && autoUpdateValue(attrInput.value as string);\n }, [attrInput.value]);\n\n return (\n <div className={`w-full group ${attr.outerClass}`}>\n {attrInput.label && (\n <label className=\"text-input__label\" htmlFor={attrInput.labelHtml}>\n {attrInput.label}\n </label>\n )}\n <div className={`${attrInput.className} text-input__wrapper relative`}>\n <input\n {...attrInput}\n {...(attrInput.onChange ? { onChange: attrInput.onChange } : {})}\n value={attrInput.value ?? selected.value}\n type=\"hidden\"\n />\n <input\n value={keyword}\n type=\"search\"\n onChange={(e) => setKeyword(e.target.value)}\n className={`${attrInput.name}-keyword ${input} ${\n selected.value && \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n placeholder={selected.value ? selected.label : attrInput.placeholder}\n />\n <div className=\"select-item__wrapper\">\n {filteredOptions.length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {filteredOptions.map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={() => selectItem({ label, value })}\n key={value}\n className=\"select-item\"\n >\n {label}\n {selected.value == value && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <FontAwesomeIcon icon={faChevronDown} className={input__icon} />\n </div>\n </div>\n );\n}\n\nSingleSelect.autoFill = autoFillInput;\n\nfunction autoFillInput(\n value: string,\n elName: string,\n list: { label: string; value: string }[]\n) {\n const inp = document.querySelector(`[name=\"${elName}\"]`) as HTMLInputElement;\n inp.value = `${value}`;\n const filtered = list.find((item) => item.value == value);\n const el = document.querySelector(`.${elName}-keyword`);\n el?.setAttribute(\"placeholder\", `${filtered?.label}`);\n}\n\nconst input__icon = \"pr-[0.7rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","import React from \"react\";\n\ntype Tooltip = {\n children: React.ReactNode;\n text: string;\n position: \"top\" | \"bottom\" | \"right\" | \"left\";\n};\n\nexport default function Tooltip({\n children,\n text,\n position = \"top\",\n}: Readonly<Tooltip>) {\n function getAccent() {\n const mapping = {\n top,\n bottom,\n left,\n right,\n };\n return mapping[position];\n }\n return (\n <div className=\"relative\">\n <div className=\"peer\">{children}</div>\n <span className={`tooltip-text ${getAccent()}`}>{text}</span>\n </div>\n );\n}\n\nconst top =\n \"bottom-full translate-y-[-0.3rem] right-0 after:bottom-0 after:translate-y-[0.25rem] \";\nconst bottom =\n \"right-0 top-full translate-y-[0.3rem] after:top-[-0.4rem] after:translate-y-[0.2rem] \";\nconst right =\n \"left-full w-[max-content] translate-x-[0.6rem] after:left-[-0.2rem] top-[-0.2rem] after:top-[0.6rem]\";\nconst left =\n \"right-full w-[max-content] translate-x-[-0.6rem] top-[-0.2rem] after:right-[-0.2rem] after:top-[0.6rem]\";\n","import React from \"react\";\n\ntype Option = {\n label: string;\n value: string;\n};\n\nexport default function NavTabClient({\n items,\n state,\n}: Readonly<{\n items: Option[];\n state: {\n active: string;\n setActive: (val: string) => void;\n };\n}>) {\n return (\n <nav className=\"navtab__wrapper\">\n {items.map(({ label, value }) => (\n <button\n key={value}\n className={`navtab__item ${\n state.active == value\n ? \"navtab__item__active\"\n : \"hover:bg-[var(--color-border)]/50\"\n }`}\n onClick={() => state.setActive(value)}\n >\n {label}\n </button>\n ))}\n </nav>\n );\n}\n","import React from \"react\";\n\ntype Card = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport default function Card({ children, className }: Readonly<Card>) {\n return <div className={`card ${className}`}>{children}</div>;\n}\n\nconst Footer = ({\n className,\n children,\n}: {\n className?: string;\n children?: React.ReactNode;\n}) => {\n return (\n <div className={`${className} border-t border-t-[var(--color-border)]`}>\n {children}\n </div>\n );\n};\n\nCard.Footer = Footer;\n","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faCheckCircle,\n faInfoCircle,\n faQuestionCircle,\n faXmarkCircle,\n} from \"@fortawesome/free-solid-svg-icons\";\n\ntype ToastType = \"warning\" | \"success\" | \"info\" | \"danger\";\ntype Toast = {\n title: string;\n className?: string;\n description: string;\n type: ToastType;\n};\n\nexport default function Toast({\n title,\n description,\n type = \"info\",\n className,\n}: Readonly<Toast>) {\n return (\n <div className={`toast__wrapper group ${className}`}>\n <div className=\"toast__body\">\n <div style={{ background: getColor(type) }} className={bullet}></div>\n <div>\n <p className=\"toast__title\">{title}</p>\n <p className=\"toast__description\">{description}</p>\n </div>\n <div className={`toast__icon toast__icon__${type}`}></div>\n </div>\n <p\n className=\"toast__bar toast-bar-animate\"\n style={{ background: getColor(type) }}\n ></p>\n </div>\n );\n}\n\nconst Inline = ({\n className,\n text,\n type,\n}: {\n className?: string;\n text: string;\n type: ToastType;\n}) => {\n return (\n <div\n className={`toast__inline ${className}`}\n style={{ background: `var(--color-${type}-soft)`, opacity: 0.9 }}\n >\n <FontAwesomeIcon\n icon={getIcon(type)}\n className=\"text-[1.2rem]\"\n style={{ color: getColor(type) }}\n />\n <p>{text}</p>\n </div>\n );\n};\n\nToast.Inline = Inline;\n\nfunction getColor(type: string) {\n return `var(--color-${type})`;\n}\n\nfunction getIcon(type: string) {\n const mapping = {\n warning: faQuestionCircle,\n info: faInfoCircle,\n danger: faXmarkCircle,\n success: faCheckCircle,\n };\n //@ts-expect-error call object using array index\n return mapping[type];\n}\n\nconst bullet =\n \"w-[2rem] h-[2rem] absolute top-[-0.7rem] left-[-0.7rem] rounded-[50%]\";\n","import React from \"react\";\nimport { faCaretRight } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\ntype Expandable = {\n children: React.ReactNode;\n title: string;\n className?: string;\n isOpen?: boolean;\n};\n\nexport default function Expandable({\n children,\n title,\n className,\n isOpen,\n}: Readonly<Expandable>) {\n const name = title.replace(\" \", \"\");\n return (\n <div className={`expandable ${className}`}>\n <input\n id={name}\n type=\"checkbox\"\n defaultChecked={isOpen}\n className=\"opacity-[0] peer absolute top-0 ex-title\"\n />\n <FontAwesomeIcon icon={faCaretRight} className=\"expandable__icon\" />\n <label htmlFor={name} className=\"expandable__title\">\n {title}\n </label>\n <div className=\"expandable__body\">\n <div className=\"p-[0.75rem] px-[1rem]\">{children}</div>\n </div>\n </div>\n );\n}\n","import React, { useCallback, useDeferredValue, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faListCheck } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Option = {\n value: string;\n label: string;\n};\n\ntype MultiSelect = {\n label?: string;\n labelHtml?: string;\n outerClass?: string;\n options?: Option[];\n stringOptions?: string[];\n state: { value: Option[]; select: (newVal: Option[]) => void };\n};\n\nexport default function MultiSelect({\n state,\n label,\n labelHtml,\n ...attr\n}: Readonly<MultiSelect>) {\n const { options = [], stringOptions = [] } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const inputKeyword = useDeferredValue(keyword);\n\n const availableOptions = useMemo(() => {\n const isDefaultOption = options && options.length > 0;\n if (!isDefaultOption)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n function getFiltered() {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }\n\n function selectItem({ label, value }: { label: string; value: string }) {\n //@ts-expect-error: avoid check\n state.select((prev) => {\n const isItemExist = prev.find((item: any) => item.value == value);\n if (isItemExist) {\n return prev.filter((item: any) => item.value != value);\n }\n return [...prev, { label, value }];\n });\n }\n\n function isItemExist(value: string) {\n return state.value.find((item: any) => item.value == value);\n }\n\n const selectUnSelectAll = useCallback(() => {\n const isAllSelected = state.value.length == availableOptions.length;\n state.select(isAllSelected ? [] : availableOptions);\n }, [state.value]);\n\n return (\n <div className={`group w-full ${attr.outerClass}`}>\n {label && (\n <label className=\"text-input__label\" htmlFor={labelHtml}>\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper relative\">\n <input\n value={keyword}\n type=\"search\"\n placeholder={`${state.value.length} Dipilih`}\n className={`${input} ${\n state.value.length > 0 &&\n \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n onChange={(e) => setKeyword(e.target.value)}\n />\n <div className=\"select-item__wrapper select-multiple__wrapper\">\n {getFiltered().length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {getFiltered().map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={() => selectItem({ label, value })}\n key={value}\n className=\"select-item\"\n >\n {label}\n {isItemExist(value) && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <button\n type=\"button\"\n className=\"cursor-pointer\"\n onClick={selectUnSelectAll}\n >\n <FontAwesomeIcon icon={faListCheck} className={input__icon} />\n </button>\n </div>\n </div>\n );\n}\nconst input__icon = \"pr-[0.7rem] text-[1.2rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","\"use client\";\nimport React from \"react\";\n\nexport default function ThemeToggle(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <label\n htmlFor={`${attr.id || \"theme-toggle\"}`}\n className=\"slider__wrapper slider-theme slider-theme-light\"\n >\n <input\n id=\"theme-toggle\"\n {...attr}\n type=\"checkbox\"\n className=\"peer ... w-[2rem] opacity-[0] cursor-pointer\"\n />\n <span className=\"slider-theme__bullet\"></span>\n </label>\n </div>\n );\n}\n","import React, { useState } from \"react\";\nimport MultiSelect from \"./MultiSelect\";\nimport SingleSelect from \"./SingleSelect\";\n\nconst list = [\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n];\nconst stringList = [\"option1\", \"option2\", \"option3\"];\n\nexport default function Dashboard() {\n const [selectedItem, setSelectedItem] = useState<\n { label: string; value: string }[]\n >([]);\n const [sel, setSel] = useState({ label: \"\", value: \"\" });\n\n function updateState(item: string) {\n const filtered = list.find(({ value }) => value == item);\n filtered && setSel(filtered);\n }\n\n return (\n <div className=\"flex items-center gap-[1rem]\">\n <MultiSelect\n label=\"Multi Select\"\n stringOptions={stringList}\n state={{ value: selectedItem, select: setSelectedItem }}\n />\n <SingleSelect\n label=\"Single Select\"\n name=\"newinput\"\n stringOptions={stringList}\n placeholder=\"-- Pilih Status --\"\n value={sel.value}\n />\n </div>\n );\n}\n","import React from \"react\";\nexport default function Badge({\n text,\n type,\n className,\n}: {\n text: string;\n type: \"success\" | \"danger\" | \"warning\" | \"info\";\n className?: string;\n}) {\n return (\n <div className=\"badge__wrapper\">\n <span\n style={{\n background: `var(--color-${type})`,\n }}\n className={`badge ${className}`}\n >\n {text}\n </span>\n </div>\n );\n}\n","import React from \"react\";\nexport default function Skeleton({ className }: { className?: string }) {\n return (\n <div className={`${className} skeleton`}>\n <span className=\"skeleton__item skeleton-slide\"></span>\n </div>\n );\n}\n","import React from \"react\";\n\nexport default function Navigation() {\n return <nav></nav>;\n}\n\nconst URLNavigation = (props: {\n list: { label: string; href: string }[];\n activeUrl: string;\n outerClass?: string;\n CustomComponent?: React.ElementType;\n}) => {\n const Component = props.CustomComponent || \"a\";\n function getAnchorClass(href: string) {\n return href === props.activeUrl\n ? \"bg-[var(--color-primary-soft)] text-[var(--color-primary)]\"\n : \"text-[var(--color-text-secondary)]/70 hover:bg-[var(--color-border)]/40\";\n }\n\n return (\n <nav className={`nav__wrapper ${props.outerClass}`}>\n {props.list.map((prop) => (\n <Component\n key={prop.href}\n className={`${base__anchor} ${getAnchorClass(prop.href)}`}\n {...prop}\n >\n {prop.label}\n </Component>\n ))}\n </nav>\n );\n};\n\nNavigation.URL = URLNavigation;\n\nconst base__anchor =\n \"p-[0.8rem] transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]\";\n","import React from \"react\";\n\nexport default function Confirmation({\n type = \"warning\",\n text,\n title,\n secondaryAction,\n secondaryLabel = \"Tidak\",\n mainAction,\n mainLabel = \"Ya\",\n}: {\n mainAction: () => void;\n secondaryAction?: () => void;\n mainLabel?: string;\n secondaryLabel?: string;\n title: string;\n text: string;\n type?: \"info\" | \"warning\" | \"danger\" | \"success\";\n}) {\n return (\n <div className=\"confirmation__outer\">\n <div className=\"confirmation__card\">\n <div className={wrapper}>\n <div className={`baloon__${type} baloon`}></div>\n <div>\n <h3 className=\"font-semibold\">{title}</h3>\n <p className={confirmation__text}>{text}</p>\n </div>\n </div>\n <div className=\"confirmation__footer\">\n {secondaryAction && (\n <button\n onClick={secondaryAction}\n type=\"button\"\n className=\"cursor-pointer\"\n style={{ color: `var(--color-${type})` }}\n >\n {secondaryLabel}\n </button>\n )}\n <button\n onClick={() => {\n mainAction();\n secondaryAction && secondaryAction();\n }}\n className=\"cursor-pointer btn__primary min-w-[8rem]\"\n style={{\n background: `var(--color-${type})`,\n border: `1px solid var(--color-${type})`,\n }}\n >\n {mainLabel}\n </button>\n </div>\n </div>\n </div>\n );\n}\n\nconst wrapper =\n \"pt-[0.5rem] pb-[1rem] px-[1.8rem] grid items-center gap-[1.5rem]\";\nconst confirmation__text =\n \"mt-[0.7rem] w-[90%] text-[var(--color-text-secondary)]\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAElB,+BAAgC;AAChC,kCAA8B;AASf,SAAR,OAAwB,IAOV;AAPU,eAC7B;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAjBF,IAY+B,IAM1B,iBAN0B,IAM1B;AAAA,IALH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,aAAa,YAAY,4CAAgB;AAC/C,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA,qCACK,OADL;AAAA,MAEC,WAAW,GAAG,CAAC,QAAQ,cAAc,IAAI,SAAS,IAChD,WAAW,eAAe,gBAC5B;AAAA;AAAA,IAEC,cAAc,QACb,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAW,6BAA6B,aAAa,cAAc;AAAA;AAAA,IACrE;AAAA,IAED,YAAY,kBAAkB;AAAA,EACjC;AAEJ;AAEA,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EACR,CACD,CACH;AAEJ;AAEA,WAAW,MAAM;AAEjB,IAAM,eACJ;;;ACrCF,IAAAC,iBAAkB;AAEH,SAAR,aAA8B;AAAA,EACnC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,YAAY;AACd,GAQG;AACD,SACE,+BAAAC,QAAA,cAAC,SAAI,WAAU,yBACb,+BAAAA,QAAA,cAAC,SAAI,WAAU,wBACb,+BAAAA,QAAA,cAAC,SAAI,WAAW,WACd,+BAAAA,QAAA,cAAC,SAAI,WAAW,WAAW,IAAI,WAAW,GAC1C,+BAAAA,QAAA,cAAC,aACC,+BAAAA,QAAA,cAAC,QAAG,WAAU,mBAAiB,KAAM,GACrC,+BAAAA,QAAA,cAAC,OAAE,WAAW,sBAAqB,IAAK,CAC1C,CACF,GACA,+BAAAA,QAAA,cAAC,SAAI,WAAU,0BACZ,mBACC,+BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,MAAK;AAAA,MACL,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,eAAe,IAAI,IAAI;AAAA;AAAA,IAEtC;AAAA,EACH,GAEF,+BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM;AACb,mBAAW;AACX,2BAAmB,gBAAgB;AAAA,MACrC;AAAA,MACA,WAAU;AAAA,MACV,OAAO;AAAA,QACL,YAAY,eAAe,IAAI;AAAA,QAC/B,QAAQ,yBAAyB,IAAI;AAAA,MACvC;AAAA;AAAA,IAEC;AAAA,EACH,CACF,CACF,CACF;AAEJ;AAEA,IAAM,UACJ;AACF,IAAM,qBACJ;","names":["React","list","import_react","import_react_fontawesome","React","import_react","import_free_solid_svg_icons","import_react_fontawesome","React","import_react","import_react_fontawesome","import_free_solid_svg_icons","React","input","input__icon","list","import_react","React","import_react","React","import_react","React","import_react","import_react_fontawesome","import_free_solid_svg_icons","React","import_react","import_free_solid_svg_icons","import_react_fontawesome","React","import_react","import_react_fontawesome","import_free_solid_svg_icons","label","isItemExist","React","input","input__icon","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/Button.tsx","../src/components/TextInput.tsx","../src/components/Slider.tsx","../src/components/SingleSelect.tsx","../src/components/Tooltip.tsx","../src/components/NavTabClient.tsx","../src/components/Card.tsx","../src/components/Toast.tsx","../src/components/Expandable.tsx","../src/components/MultiSelect.tsx","../src/components/ThemeToggle.tsx","../src/components/Dashboard.tsx","../src/components/Badge.tsx","../src/components/Skeleton.tsx","../src/components/Navigation.tsx","../src/components/Confirmation.tsx"],"sourcesContent":["export { default as Button } from \"./components/Button\";\nexport { default as TextInput } from \"./components/TextInput\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as SingleSelect } from \"./components/SingleSelect\";\nexport { default as Tooltip } from \"./components/Tooltip\";\nexport { default as NavTabClient } from \"./components/NavTabClient\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Toast } from \"./components/Toast\";\nexport { default as Expandable } from \"./components/Expandable\";\nexport { default as MultiSelect } from \"./components/MultiSelect\";\nexport { default as ThemeToggle } from \"./components/ThemeToggle\";\nexport { default as Dashboard } from \"./components/Dashboard\";\nexport { default as Badge } from \"./components/Badge\";\nexport { default as Skeleton } from \"./components/Skeleton\";\nexport { default as Navigation } from \"./components/Navigation\";\nexport { default as Confirmation } from \"./components/Confirmation\";\n","import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCircleNotch } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Button = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n icon?: IconProp;\n label?: string;\n btnType?: \"primary\" | \"secondary\" | \"tertiary\";\n isLoading?: boolean;\n};\n\nexport default function Button({\n label,\n icon,\n isLoading,\n btnType,\n className,\n ...rest\n}: Readonly<Button>) {\n const buttonIcon = isLoading ? faCircleNotch : icon;\n const loadingLabel = label && isLoading ? \"Memproses ...\" : \"\";\n return (\n <button\n {...rest}\n className={`${!icon && \"py-[0.84rem]\"} ${className} ${\n btnType == \"secondary\" && \"btn__secondary\"\n } btn__primary`}\n >\n {buttonIcon && icon && (\n <FontAwesomeIcon\n icon={buttonIcon}\n className={`text-[1.2rem] ${label && \"mr-[0.3rem]\"} ${\n isLoading && \"animate-spin\"\n }`}\n />\n )}\n {isLoading ? loadingLabel : label}\n </button>\n );\n}\n\nconst IconButton = (props: Readonly<Button>) => {\n return (\n <button\n {...props}\n className={`${props.className} ${\n props.title ? \"max-w-[content] px-[0.8rem]\" : \"\"\n } icon__button`}\n >\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n {props.title && (\n <span className=\"inline-block ml-[0.8rem] text-[1rem]\">\n {props.title}\n </span>\n )}\n </button>\n );\n};\n\nconst IconButtonGroup = ({ list }: { list: Button[] }) => {\n function getBtnClass(idx: number) {\n return `icon__button !rounded-[0] border-[0] ${\n idx !== 0 ? \"border-l border-l-[var(--color-border)]\" : \"\"\n }`;\n }\n return (\n <div className=\"icon__button_group\">\n {list.map((props, idx) => (\n <button key={idx} className={getBtnClass(idx)} {...props}>\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n </button>\n ))}\n </div>\n );\n};\n\nButton.IconButton = IconButton;\nButton.IconButtonGroup = IconButtonGroup;\n","import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nconst input__icon =\n \"w-[2rem] p-[0.9rem] px-[0.7rem] text-[1.2rem] bg-[var(--color-background-icon)] text-[var(--color-icon-input)] mr-2 group-focus-within:text-[var(--color-primary)]\";\n\nexport default function TextInput({\n label,\n labelFor,\n icon,\n outerclass,\n ...attr\n}: Readonly<\n React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelFor?: string;\n icon?: IconProp;\n outerclass?: string;\n }\n>) {\n return (\n <div className={`group ${outerclass} w-full`}>\n {label && (\n <label htmlFor={labelFor} className=\"text-input__label\">\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper overflow-hidden\">\n {icon && <FontAwesomeIcon icon={icon} className={input__icon} />}\n <input\n {...attr}\n className={`text-input w-full ${attr.className} ${\n icon && \"!pl-[0.3rem]\"\n }`}\n />\n </div>\n </div>\n );\n}\n","import React from \"react\";\nimport { faCheck } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport default function Slider(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <div className=\"slider__wrapper group\">\n <input {...attr} id=\"slider\" type=\"checkbox\" className={input} />\n <label htmlFor=\"slider\" className=\"slider\">\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[0.7rem] translate-x-[0.2px]\"\n />\n </label>\n </div>\n </div>\n );\n}\n\nconst input = \"peer ... w-[3rem] h-[1.6rem] opacity-[0] cursor-pointer\";\n","\"use client\";\nimport React, { useDeferredValue, useEffect, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faChevronDown } from \"@fortawesome/free-solid-svg-icons\";\n\ntype SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelHtml?: string;\n placeholder?: string;\n outerclass?: string;\n options?: {\n label: string;\n value: string;\n }[];\n stringOptions?: string[];\n};\n\nexport default function SingleSelect(attr: Readonly<SingleSelect>) {\n const { options = [], stringOptions = [], ...attrInput } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const [selected, setSelected] = useState<{ label: string; value: any }>({\n label: \"\",\n value: \"\",\n });\n const inputKeyword = useDeferredValue(keyword);\n\n function selectItem(\n { label, value }: { label: string; value: any },\n e: React.MouseEvent<HTMLButtonElement>\n ) {\n const triggerManual = attrInput.onChange;\n if (triggerManual) {\n triggerManual?.({\n target: { value, name: attrInput.name },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n setSelected({ label, value });\n setKeyword(\"\");\n setTimeout(() => {\n (e.target as HTMLButtonElement).blur();\n }, 250);\n }\n\n function autoUpdateValue(updatedValue: string) {\n if (updatedValue) {\n const filtered = availableOptions.find(\n ({ value }) => value == updatedValue\n );\n if (filtered) setSelected(filtered);\n }\n }\n\n const availableOptions = useMemo(() => {\n let defaultOptions = options && options.length > 0;\n if (!defaultOptions)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n const filteredOptions = useMemo(() => {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }, [inputKeyword, availableOptions]);\n\n useEffect(() => {\n attrInput.value && autoUpdateValue(attrInput.value as string);\n }, [attrInput.value]);\n\n return (\n <div className={`w-full group ${attr.outerclass}`}>\n {attrInput.label && (\n <label className=\"text-input__label\" htmlFor={attrInput.labelHtml}>\n {attrInput.label}\n </label>\n )}\n <div className={`${attrInput.className} text-input__wrapper relative`}>\n <input\n {...attrInput}\n {...(attrInput.onChange ? { onChange: attrInput.onChange } : {})}\n value={attrInput.value ?? selected.value}\n type=\"hidden\"\n />\n <input\n value={keyword}\n type=\"search\"\n onChange={(e) => setKeyword(e.target.value)}\n className={`${attrInput.name}-keyword ${input} ${\n selected.value && \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n placeholder={selected.value ? selected.label : attrInput.placeholder}\n />\n <div className=\"select-item__wrapper\">\n {filteredOptions.length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {filteredOptions.map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={(e) => selectItem({ label, value }, e)}\n key={value}\n className=\"select-item\"\n >\n {label}\n {selected.value == value && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <FontAwesomeIcon icon={faChevronDown} className={input__icon} />\n </div>\n </div>\n );\n}\n\nSingleSelect.autoFill = autoFillInput;\n\nfunction autoFillInput(\n value: string,\n elName: string,\n list: { label: string; value: string }[]\n) {\n const inp = document.querySelector(`[name=\"${elName}\"]`) as HTMLInputElement;\n inp.value = `${value}`;\n const filtered = list.find((item) => item.value == value);\n const el = document.querySelector(`.${elName}-keyword`);\n el?.setAttribute(\"placeholder\", `${filtered?.label}`);\n}\n\nconst input__icon = \"pr-[0.7rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","import React from \"react\";\n\ntype Tooltip = {\n children: React.ReactNode;\n text: string;\n position: \"top\" | \"bottom\" | \"right\" | \"left\";\n};\n\nexport default function Tooltip({\n children,\n text,\n position = \"top\",\n}: Readonly<Tooltip>) {\n function getAccent() {\n const mapping = {\n top,\n bottom,\n left,\n right,\n };\n return mapping[position];\n }\n return (\n <div className=\"relative\">\n <div className=\"peer\">{children}</div>\n <span className={`tooltip-text ${getAccent()}`}>{text}</span>\n </div>\n );\n}\n\nconst top =\n \"bottom-full translate-y-[-0.3rem] right-0 after:bottom-0 after:translate-y-[0.25rem] \";\nconst bottom =\n \"right-0 top-full translate-y-[0.3rem] after:top-[-0.4rem] after:translate-y-[0.2rem] \";\nconst right =\n \"left-full w-[max-content] translate-x-[0.6rem] after:left-[-0.2rem] top-[-0.2rem] after:top-[0.6rem]\";\nconst left =\n \"right-full w-[max-content] translate-x-[-0.6rem] top-[-0.2rem] after:right-[-0.2rem] after:top-[0.6rem]\";\n","import React from \"react\";\n\ntype Option = {\n label: string;\n value: string;\n};\n\nexport default function NavTabClient({\n items,\n state,\n}: Readonly<{\n items: Option[];\n state: {\n active: string;\n setActive: (val: string) => void;\n };\n}>) {\n return (\n <nav className=\"navtab__wrapper\">\n {items.map(({ label, value }) => (\n <button\n key={value}\n className={`navtab__item ${\n state.active == value\n ? \"navtab__item__active\"\n : \"hover:bg-[var(--color-border)]/50\"\n }`}\n onClick={() => state.setActive(value)}\n >\n {label}\n </button>\n ))}\n </nav>\n );\n}\n","import React from \"react\";\n\ntype Card = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport default function Card({ children, className }: Readonly<Card>) {\n return <div className={`card ${className}`}>{children}</div>;\n}\n\nconst Footer = ({\n className,\n children,\n}: {\n className?: string;\n children?: React.ReactNode;\n}) => {\n return (\n <div className={`${className} border-t border-t-[var(--color-border)]`}>\n {children}\n </div>\n );\n};\n\nCard.Footer = Footer;\n","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faCheckCircle,\n faInfoCircle,\n faQuestionCircle,\n faXmarkCircle,\n} from \"@fortawesome/free-solid-svg-icons\";\n\ntype ToastType = \"warning\" | \"success\" | \"info\" | \"danger\";\ntype Toast = {\n title: string;\n className?: string;\n description: string;\n type: ToastType;\n};\n\nexport default function Toast({\n title,\n description,\n type = \"info\",\n className,\n}: Readonly<Toast>) {\n return (\n <div className={`toast__wrapper group ${className}`}>\n <div className=\"toast__body\">\n <div style={{ background: getColor(type) }} className={bullet}></div>\n <div>\n <p className=\"toast__title\">{title}</p>\n <p className=\"toast__description\">{description}</p>\n </div>\n <div className={`toast__icon toast__icon__${type}`}></div>\n </div>\n <p\n className=\"toast__bar toast-bar-animate\"\n style={{ background: getColor(type) }}\n ></p>\n </div>\n );\n}\n\nconst Inline = ({\n className,\n text,\n type,\n}: {\n className?: string;\n text: string;\n type: ToastType;\n}) => {\n return (\n <div\n className={`toast__inline ${className}`}\n style={{ background: `var(--color-${type}-soft)`, opacity: 0.9 }}\n >\n <FontAwesomeIcon\n icon={getIcon(type)}\n className=\"text-[1.2rem]\"\n style={{ color: getColor(type) }}\n />\n <p>{text}</p>\n </div>\n );\n};\n\nToast.Inline = Inline;\n\nfunction getColor(type: string) {\n return `var(--color-${type})`;\n}\n\nfunction getIcon(type: string) {\n const mapping = {\n warning: faQuestionCircle,\n info: faInfoCircle,\n danger: faXmarkCircle,\n success: faCheckCircle,\n };\n //@ts-expect-error call object using array index\n return mapping[type];\n}\n\nconst bullet =\n \"w-[2rem] h-[2rem] absolute top-[-0.7rem] left-[-0.7rem] rounded-[50%]\";\n","import React from \"react\";\nimport { faCaretRight } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\ntype Expandable = {\n children: React.ReactNode;\n title: string;\n className?: string;\n isOpen?: boolean;\n};\n\nexport default function Expandable({\n children,\n title,\n className,\n isOpen,\n}: Readonly<Expandable>) {\n const name = title.replace(\" \", \"\");\n return (\n <div className={`expandable ${className}`}>\n <input\n id={name}\n type=\"checkbox\"\n defaultChecked={isOpen}\n className=\"opacity-[0] peer absolute top-0 ex-title\"\n />\n <FontAwesomeIcon icon={faCaretRight} className=\"expandable__icon\" />\n <label htmlFor={name} className=\"expandable__title\">\n {title}\n </label>\n <div className=\"expandable__body\">\n <div className=\"p-[0.75rem] px-[1rem]\">{children}</div>\n </div>\n </div>\n );\n}\n","import React, { useCallback, useDeferredValue, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faListCheck } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Option = {\n value: string;\n label: string;\n};\n\ntype MultiSelect = {\n label?: string;\n labelHtml?: string;\n outerclass?: string;\n options?: Option[];\n stringOptions?: string[];\n state: { value: Option[]; select: (newVal: Option[]) => void };\n};\n\nexport default function MultiSelect({\n state,\n label,\n labelHtml,\n ...attr\n}: Readonly<MultiSelect>) {\n const { options = [], stringOptions = [] } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const inputKeyword = useDeferredValue(keyword);\n\n const availableOptions = useMemo(() => {\n const isDefaultOption = options && options.length > 0;\n if (!isDefaultOption)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n function getFiltered() {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }\n\n function selectItem({ label, value }: { label: string; value: string }) {\n //@ts-expect-error: avoid check\n state.select((prev) => {\n const isItemExist = prev.find((item: any) => item.value == value);\n if (isItemExist) {\n return prev.filter((item: any) => item.value != value);\n }\n return [...prev, { label, value }];\n });\n }\n\n function isItemExist(value: string) {\n return state.value.find((item: any) => item.value == value);\n }\n\n const selectUnSelectAll = useCallback(() => {\n const isAllSelected = state.value.length == availableOptions.length;\n state.select(isAllSelected ? [] : availableOptions);\n }, [state.value]);\n\n return (\n <div className={`group w-full ${attr.outerclass}`}>\n {label && (\n <label className=\"text-input__label\" htmlFor={labelHtml}>\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper relative\">\n <input\n value={keyword}\n type=\"search\"\n placeholder={`${state.value.length} Dipilih`}\n className={`${input} ${\n state.value.length > 0 &&\n \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n onChange={(e) => setKeyword(e.target.value)}\n />\n <div className=\"select-item__wrapper select-multiple__wrapper\">\n {getFiltered().length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {getFiltered().map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={() => selectItem({ label, value })}\n key={value}\n className=\"select-item\"\n >\n {label}\n {isItemExist(value) && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <button\n type=\"button\"\n className=\"cursor-pointer\"\n onClick={selectUnSelectAll}\n >\n <FontAwesomeIcon icon={faListCheck} className={input__icon} />\n </button>\n </div>\n </div>\n );\n}\nconst input__icon = \"pr-[0.7rem] text-[1.2rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","\"use client\";\nimport React from \"react\";\n\nexport default function ThemeToggle(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <label\n htmlFor={`${attr.id || \"theme-toggle\"}`}\n className=\"slider__wrapper slider-theme slider-theme-light\"\n >\n <input\n id=\"theme-toggle\"\n {...attr}\n type=\"checkbox\"\n className=\"peer ... w-[2rem] opacity-[0] cursor-pointer\"\n />\n <span className=\"slider-theme__bullet\"></span>\n </label>\n </div>\n );\n}\n","import React, { useState } from \"react\";\nimport MultiSelect from \"./MultiSelect\";\nimport SingleSelect from \"./SingleSelect\";\n\nconst list = [\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n];\nconst stringList = [\"option1\", \"option2\", \"option3\"];\n\nexport default function Dashboard() {\n const [selectedItem, setSelectedItem] = useState<\n { label: string; value: string }[]\n >([]);\n const [sel, setSel] = useState({ label: \"\", value: \"\" });\n\n function updateState(item: string) {\n const filtered = list.find(({ value }) => value == item);\n filtered && setSel(filtered);\n }\n\n return (\n <div className=\"flex items-center gap-[1rem]\">\n <MultiSelect\n label=\"Multi Select\"\n stringOptions={stringList}\n state={{ value: selectedItem, select: setSelectedItem }}\n />\n <SingleSelect\n label=\"Single Select\"\n name=\"newinput\"\n stringOptions={stringList}\n placeholder=\"-- Pilih Status --\"\n value={sel.value}\n />\n </div>\n );\n}\n","import React from \"react\";\nexport default function Badge({\n text,\n type,\n className,\n}: {\n text: string;\n type: \"success\" | \"danger\" | \"warning\" | \"info\";\n className?: string;\n}) {\n return (\n <div className=\"badge__wrapper\">\n <span\n style={{\n background: `var(--color-${type})`,\n }}\n className={`badge ${className}`}\n >\n {text}\n </span>\n </div>\n );\n}\n","import React from \"react\";\nexport default function Skeleton({ className }: { className?: string }) {\n return (\n <div className={`${className} skeleton`}>\n <span className=\"skeleton__item skeleton-slide\"></span>\n </div>\n );\n}\n","import React from \"react\";\n\nexport default function Navigation() {\n return <nav></nav>;\n}\n\nconst URLNavigation = (props: {\n list: { label: string; href: string }[];\n activeUrl: string;\n outerclass?: string;\n CustomComponent?: React.ElementType;\n}) => {\n const Component = props.CustomComponent || \"a\";\n function getAnchorClass(href: string) {\n return href === props.activeUrl\n ? \"bg-[var(--color-primary-soft)] text-[var(--color-primary)]\"\n : \"text-[var(--color-text-secondary)]/70 hover:bg-[var(--color-border)]/40\";\n }\n\n return (\n <nav className={`nav__wrapper ${props.outerclass}`}>\n {props.list.map((prop) => (\n <Component\n key={prop.href}\n className={`${base__anchor} ${getAnchorClass(prop.href)}`}\n {...prop}\n >\n {prop.label}\n </Component>\n ))}\n </nav>\n );\n};\n\nNavigation.URL = URLNavigation;\n\nconst base__anchor =\n \"p-[0.8rem] h-full grid items-center transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]\";\n","import React from \"react\";\n\nexport default function Confirmation({\n type = \"warning\",\n text,\n title,\n secondaryAction,\n secondaryLabel = \"Tidak\",\n mainAction,\n mainLabel = \"Ya\",\n}: {\n mainAction: () => void;\n secondaryAction?: () => void;\n mainLabel?: string;\n secondaryLabel?: string;\n title: string;\n text: string;\n type?: \"info\" | \"warning\" | \"danger\" | \"success\";\n}) {\n return (\n <div className=\"confirmation__outer\">\n <div className=\"confirmation__card\">\n <div className={wrapper}>\n <div className={`baloon__${type} baloon`}></div>\n <div>\n <h3 className=\"font-semibold\">{title}</h3>\n <p className={confirmation__text}>{text}</p>\n </div>\n </div>\n <div className=\"confirmation__footer\">\n {secondaryAction && (\n <button\n onClick={secondaryAction}\n type=\"button\"\n className=\"cursor-pointer\"\n style={{ color: `var(--color-${type})` }}\n >\n {secondaryLabel}\n </button>\n )}\n <button\n onClick={() => {\n mainAction();\n secondaryAction && secondaryAction();\n }}\n className=\"cursor-pointer btn__primary min-w-[8rem]\"\n style={{\n background: `var(--color-${type})`,\n border: `1px solid var(--color-${type})`,\n }}\n >\n {mainLabel}\n </button>\n </div>\n </div>\n </div>\n );\n}\n\nconst wrapper =\n \"pt-[0.5rem] pb-[1rem] px-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jB,IAAM,eACJ;;;ACrCF,IAAAC,iBAAkB;AAEH,SAAR,aAA8B;AAAA,EACnC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,YAAY;AACd,GAQG;AACD,SACE,+BAAAC,QAAA,cAAC,SAAI,WAAU,yBACb,+BAAAA,QAAA,cAAC,SAAI,WAAU,wBACb,+BAAAA,QAAA,cAAC,SAAI,WAAW,WACd,+BAAAA,QAAA,cAAC,SAAI,WAAW,WAAW,IAAI,WAAW,GAC1C,+BAAAA,QAAA,cAAC,aACC,+BAAAA,QAAA,cAAC,QAAG,WAAU,mBAAiB,KAAM,GACrC,+BAAAA,QAAA,cAAC,OAAE,WAAW,sBAAqB,IAAK,CAC1C,CACF,GACA,+BAAAA,QAAA,cAAC,SAAI,WAAU,0BACZ,mBACC,+BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,MAAK;AAAA,MACL,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,eAAe,IAAI,IAAI;AAAA;AAAA,IAEtC;AAAA,EACH,GAEF,+BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM;AACb,mBAAW;AACX,2BAAmB,gBAAgB;AAAA,MACrC;AAAA,MACA,WAAU;AAAA,MACV,OAAO;AAAA,QACL,YAAY,eAAe,IAAI;AAAA,QAC/B,QAAQ,yBAAyB,IAAI;AAAA,MACvC;AAAA;AAAA,IAEC;AAAA,EACH,CACF,CACF,CACF;AAEJ;AAEA,IAAM,UACJ;AACF,IAAM,qBACJ;","names":["React","list","import_react","import_react_fontawesome","React","import_react","import_free_solid_svg_icons","import_react_fontawesome","React","import_react","import_react_fontawesome","import_free_solid_svg_icons","React","input","input__icon","list","import_react","React","import_react","React","import_react","React","import_react","import_react_fontawesome","import_free_solid_svg_icons","React","import_react","import_free_solid_svg_icons","import_react_fontawesome","React","import_react","import_react_fontawesome","import_free_solid_svg_icons","label","isItemExist","React","input","input__icon","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React"]}
|
package/dist/index.mjs
CHANGED
|
@@ -49,6 +49,7 @@ function Button(_a) {
|
|
|
49
49
|
"className"
|
|
50
50
|
]);
|
|
51
51
|
const buttonIcon = isLoading ? faCircleNotch : icon;
|
|
52
|
+
const loadingLabel = label && isLoading ? "Memproses ..." : "";
|
|
52
53
|
return /* @__PURE__ */ React.createElement(
|
|
53
54
|
"button",
|
|
54
55
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -58,14 +59,21 @@ function Button(_a) {
|
|
|
58
59
|
FontAwesomeIcon,
|
|
59
60
|
{
|
|
60
61
|
icon: buttonIcon,
|
|
61
|
-
className: `text-[1.2rem] mr-[0.3rem] ${isLoading && "animate-spin"}`
|
|
62
|
+
className: `text-[1.2rem] ${label && "mr-[0.3rem]"} ${isLoading && "animate-spin"}`
|
|
62
63
|
}
|
|
63
64
|
),
|
|
64
|
-
isLoading ?
|
|
65
|
+
isLoading ? loadingLabel : label
|
|
65
66
|
);
|
|
66
67
|
}
|
|
67
68
|
var IconButton = (props) => {
|
|
68
|
-
return /* @__PURE__ */ React.createElement(
|
|
69
|
+
return /* @__PURE__ */ React.createElement(
|
|
70
|
+
"button",
|
|
71
|
+
__spreadProps(__spreadValues({}, props), {
|
|
72
|
+
className: `${props.className} ${props.title ? "max-w-[content] px-[0.8rem]" : ""} icon__button`
|
|
73
|
+
}),
|
|
74
|
+
props.icon && /* @__PURE__ */ React.createElement(FontAwesomeIcon, { icon: props.icon }),
|
|
75
|
+
props.title && /* @__PURE__ */ React.createElement("span", { className: "inline-block ml-[0.8rem] text-[1rem]" }, props.title)
|
|
76
|
+
);
|
|
69
77
|
};
|
|
70
78
|
var IconButtonGroup = ({ list: list2 }) => {
|
|
71
79
|
function getBtnClass(idx) {
|
|
@@ -84,13 +92,15 @@ function TextInput(_a) {
|
|
|
84
92
|
var _b = _a, {
|
|
85
93
|
label,
|
|
86
94
|
labelFor,
|
|
87
|
-
icon
|
|
95
|
+
icon,
|
|
96
|
+
outerclass
|
|
88
97
|
} = _b, attr = __objRest(_b, [
|
|
89
98
|
"label",
|
|
90
99
|
"labelFor",
|
|
91
|
-
"icon"
|
|
100
|
+
"icon",
|
|
101
|
+
"outerclass"
|
|
92
102
|
]);
|
|
93
|
-
return /* @__PURE__ */ React2.createElement("div", { className:
|
|
103
|
+
return /* @__PURE__ */ React2.createElement("div", { className: `group ${outerclass} w-full` }, label && /* @__PURE__ */ React2.createElement("label", { htmlFor: labelFor, className: "text-input__label" }, label), /* @__PURE__ */ React2.createElement("div", { className: "text-input__wrapper overflow-hidden" }, icon && /* @__PURE__ */ React2.createElement(FontAwesomeIcon2, { icon, className: input__icon }), /* @__PURE__ */ React2.createElement(
|
|
94
104
|
"input",
|
|
95
105
|
__spreadProps(__spreadValues({}, attr), {
|
|
96
106
|
className: `text-input w-full ${attr.className} ${icon && "!pl-[0.3rem]"}`
|
|
@@ -126,7 +136,7 @@ function SingleSelect(attr) {
|
|
|
126
136
|
value: ""
|
|
127
137
|
});
|
|
128
138
|
const inputKeyword = useDeferredValue(keyword);
|
|
129
|
-
function selectItem({ label, value }) {
|
|
139
|
+
function selectItem({ label, value }, e) {
|
|
130
140
|
const triggerManual = attrInput.onChange;
|
|
131
141
|
if (triggerManual) {
|
|
132
142
|
triggerManual == null ? void 0 : triggerManual({
|
|
@@ -135,6 +145,9 @@ function SingleSelect(attr) {
|
|
|
135
145
|
}
|
|
136
146
|
setSelected({ label, value });
|
|
137
147
|
setKeyword("");
|
|
148
|
+
setTimeout(() => {
|
|
149
|
+
e.target.blur();
|
|
150
|
+
}, 250);
|
|
138
151
|
}
|
|
139
152
|
function autoUpdateValue(updatedValue) {
|
|
140
153
|
if (updatedValue) {
|
|
@@ -158,7 +171,7 @@ function SingleSelect(attr) {
|
|
|
158
171
|
useEffect(() => {
|
|
159
172
|
attrInput.value && autoUpdateValue(attrInput.value);
|
|
160
173
|
}, [attrInput.value]);
|
|
161
|
-
return /* @__PURE__ */ React4.createElement("div", { className: `w-full group ${attr.
|
|
174
|
+
return /* @__PURE__ */ React4.createElement("div", { className: `w-full group ${attr.outerclass}` }, attrInput.label && /* @__PURE__ */ React4.createElement("label", { className: "text-input__label", htmlFor: attrInput.labelHtml }, attrInput.label), /* @__PURE__ */ React4.createElement("div", { className: `${attrInput.className} text-input__wrapper relative` }, /* @__PURE__ */ React4.createElement(
|
|
162
175
|
"input",
|
|
163
176
|
__spreadProps(__spreadValues(__spreadValues({}, attrInput), attrInput.onChange ? { onChange: attrInput.onChange } : {}), {
|
|
164
177
|
value: (_b = attrInput.value) != null ? _b : selected.value,
|
|
@@ -177,7 +190,7 @@ function SingleSelect(attr) {
|
|
|
177
190
|
"button",
|
|
178
191
|
{
|
|
179
192
|
type: "button",
|
|
180
|
-
onClick: () => selectItem({ label, value }),
|
|
193
|
+
onClick: (e) => selectItem({ label, value }, e),
|
|
181
194
|
key: value,
|
|
182
195
|
className: "select-item"
|
|
183
196
|
},
|
|
@@ -381,7 +394,7 @@ function MultiSelect(_a) {
|
|
|
381
394
|
const isAllSelected = state.value.length == availableOptions.length;
|
|
382
395
|
state.select(isAllSelected ? [] : availableOptions);
|
|
383
396
|
}, [state.value]);
|
|
384
|
-
return /* @__PURE__ */ React10.createElement("div", { className: `group w-full ${attr.
|
|
397
|
+
return /* @__PURE__ */ React10.createElement("div", { className: `group w-full ${attr.outerclass}` }, label && /* @__PURE__ */ React10.createElement("label", { className: "text-input__label", htmlFor: labelHtml }, label), /* @__PURE__ */ React10.createElement("div", { className: "text-input__wrapper relative" }, /* @__PURE__ */ React10.createElement(
|
|
385
398
|
"input",
|
|
386
399
|
{
|
|
387
400
|
value: keyword,
|
|
@@ -510,7 +523,7 @@ var URLNavigation = (props) => {
|
|
|
510
523
|
function getAnchorClass(href) {
|
|
511
524
|
return href === props.activeUrl ? "bg-[var(--color-primary-soft)] text-[var(--color-primary)]" : "text-[var(--color-text-secondary)]/70 hover:bg-[var(--color-border)]/40";
|
|
512
525
|
}
|
|
513
|
-
return /* @__PURE__ */ React15.createElement("nav", { className: `nav__wrapper ${props.
|
|
526
|
+
return /* @__PURE__ */ React15.createElement("nav", { className: `nav__wrapper ${props.outerclass}` }, props.list.map((prop) => /* @__PURE__ */ React15.createElement(
|
|
514
527
|
Component,
|
|
515
528
|
__spreadValues({
|
|
516
529
|
key: prop.href,
|
|
@@ -520,7 +533,7 @@ var URLNavigation = (props) => {
|
|
|
520
533
|
)));
|
|
521
534
|
};
|
|
522
535
|
Navigation.URL = URLNavigation;
|
|
523
|
-
var base__anchor = "p-[0.8rem] transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]";
|
|
536
|
+
var base__anchor = "p-[0.8rem] h-full grid items-center transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]";
|
|
524
537
|
|
|
525
538
|
// src/components/Confirmation.tsx
|
|
526
539
|
import React16 from "react";
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button.tsx","../src/components/TextInput.tsx","../src/components/Slider.tsx","../src/components/SingleSelect.tsx","../src/components/Tooltip.tsx","../src/components/NavTabClient.tsx","../src/components/Card.tsx","../src/components/Toast.tsx","../src/components/Expandable.tsx","../src/components/MultiSelect.tsx","../src/components/ThemeToggle.tsx","../src/components/Dashboard.tsx","../src/components/Badge.tsx","../src/components/Skeleton.tsx","../src/components/Navigation.tsx","../src/components/Confirmation.tsx"],"sourcesContent":["import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCircleNotch } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Button = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n icon?: IconProp;\n label?: string;\n btnType?: \"primary\" | \"secondary\" | \"tertiary\";\n isLoading?: boolean;\n};\n\nexport default function Button({\n label,\n icon,\n isLoading,\n btnType,\n className,\n ...rest\n}: Readonly<Button>) {\n const buttonIcon = isLoading ? faCircleNotch : icon;\n return (\n <button\n {...rest}\n className={`${!icon && \"py-[0.84rem]\"} ${className} ${\n btnType == \"secondary\" && \"btn__secondary\"\n } btn__primary`}\n >\n {buttonIcon && icon && (\n <FontAwesomeIcon\n icon={buttonIcon}\n className={`text-[1.2rem] mr-[0.3rem] ${isLoading && \"animate-spin\"}`}\n />\n )}\n {isLoading ? \"Memproses ...\" : label}\n </button>\n );\n}\n\nconst IconButton = (props: Readonly<Button>) => {\n return (\n <button {...props} className={`${props.className} icon__button`}>\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n </button>\n );\n};\n\nconst IconButtonGroup = ({ list }: { list: Button[] }) => {\n function getBtnClass(idx: number) {\n return `icon__button !rounded-[0] border-[0] ${\n idx !== 0 ? \"border-l border-l-[var(--color-border)]\" : \"\"\n }`;\n }\n return (\n <div className=\"icon__button_group\">\n {list.map((props, idx) => (\n <button key={idx} className={getBtnClass(idx)} {...props}>\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n </button>\n ))}\n </div>\n );\n};\n\nButton.IconButton = IconButton;\nButton.IconButtonGroup = IconButtonGroup;\n","import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nconst input__icon =\n \"w-[2rem] p-[0.9rem] px-[0.7rem] text-[1.2rem] bg-[var(--color-background-icon)] text-[var(--color-icon-input)] mr-2 group-focus-within:text-[var(--color-primary)]\";\n\nexport default function TextInput({\n label,\n labelFor,\n icon,\n ...attr\n}: Readonly<\n React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelFor?: string;\n icon?: IconProp;\n }\n>) {\n return (\n <div className=\"group ... w-full\">\n {label && (\n <label htmlFor={labelFor} className=\"text-input__label\">\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper overflow-hidden\">\n {icon && <FontAwesomeIcon icon={icon} className={input__icon} />}\n <input\n {...attr}\n className={`text-input w-full ${attr.className} ${\n icon && \"!pl-[0.3rem]\"\n }`}\n />\n </div>\n </div>\n );\n}\n","import React from \"react\";\nimport { faCheck } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport default function Slider(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <div className=\"slider__wrapper group\">\n <input {...attr} id=\"slider\" type=\"checkbox\" className={input} />\n <label htmlFor=\"slider\" className=\"slider\">\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[0.7rem] translate-x-[0.2px]\"\n />\n </label>\n </div>\n </div>\n );\n}\n\nconst input = \"peer ... w-[3rem] h-[1.6rem] opacity-[0] cursor-pointer\";\n","\"use client\";\nimport React, { useDeferredValue, useEffect, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faChevronDown } from \"@fortawesome/free-solid-svg-icons\";\n\ntype SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelHtml?: string;\n placeholder?: string;\n outerClass?: string;\n options?: {\n label: string;\n value: string;\n }[];\n stringOptions?: string[];\n};\n\nexport default function SingleSelect(attr: Readonly<SingleSelect>) {\n const { options = [], stringOptions = [], ...attrInput } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const [selected, setSelected] = useState<{ label: string; value: any }>({\n label: \"\",\n value: \"\",\n });\n const inputKeyword = useDeferredValue(keyword);\n\n function selectItem({ label, value }: { label: string; value: any }) {\n const triggerManual = attrInput.onChange;\n if (triggerManual) {\n triggerManual?.({\n target: { value, name: attrInput.name },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n setSelected({ label, value });\n setKeyword(\"\");\n }\n\n function autoUpdateValue(updatedValue: string) {\n if (updatedValue) {\n const filtered = availableOptions.find(\n ({ value }) => value == updatedValue\n );\n if (filtered) setSelected(filtered);\n }\n }\n\n const availableOptions = useMemo(() => {\n let defaultOptions = options && options.length > 0;\n if (!defaultOptions)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n const filteredOptions = useMemo(() => {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }, [inputKeyword, availableOptions]);\n\n useEffect(() => {\n attrInput.value && autoUpdateValue(attrInput.value as string);\n }, [attrInput.value]);\n\n return (\n <div className={`w-full group ${attr.outerClass}`}>\n {attrInput.label && (\n <label className=\"text-input__label\" htmlFor={attrInput.labelHtml}>\n {attrInput.label}\n </label>\n )}\n <div className={`${attrInput.className} text-input__wrapper relative`}>\n <input\n {...attrInput}\n {...(attrInput.onChange ? { onChange: attrInput.onChange } : {})}\n value={attrInput.value ?? selected.value}\n type=\"hidden\"\n />\n <input\n value={keyword}\n type=\"search\"\n onChange={(e) => setKeyword(e.target.value)}\n className={`${attrInput.name}-keyword ${input} ${\n selected.value && \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n placeholder={selected.value ? selected.label : attrInput.placeholder}\n />\n <div className=\"select-item__wrapper\">\n {filteredOptions.length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {filteredOptions.map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={() => selectItem({ label, value })}\n key={value}\n className=\"select-item\"\n >\n {label}\n {selected.value == value && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <FontAwesomeIcon icon={faChevronDown} className={input__icon} />\n </div>\n </div>\n );\n}\n\nSingleSelect.autoFill = autoFillInput;\n\nfunction autoFillInput(\n value: string,\n elName: string,\n list: { label: string; value: string }[]\n) {\n const inp = document.querySelector(`[name=\"${elName}\"]`) as HTMLInputElement;\n inp.value = `${value}`;\n const filtered = list.find((item) => item.value == value);\n const el = document.querySelector(`.${elName}-keyword`);\n el?.setAttribute(\"placeholder\", `${filtered?.label}`);\n}\n\nconst input__icon = \"pr-[0.7rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","import React from \"react\";\n\ntype Tooltip = {\n children: React.ReactNode;\n text: string;\n position: \"top\" | \"bottom\" | \"right\" | \"left\";\n};\n\nexport default function Tooltip({\n children,\n text,\n position = \"top\",\n}: Readonly<Tooltip>) {\n function getAccent() {\n const mapping = {\n top,\n bottom,\n left,\n right,\n };\n return mapping[position];\n }\n return (\n <div className=\"relative\">\n <div className=\"peer\">{children}</div>\n <span className={`tooltip-text ${getAccent()}`}>{text}</span>\n </div>\n );\n}\n\nconst top =\n \"bottom-full translate-y-[-0.3rem] right-0 after:bottom-0 after:translate-y-[0.25rem] \";\nconst bottom =\n \"right-0 top-full translate-y-[0.3rem] after:top-[-0.4rem] after:translate-y-[0.2rem] \";\nconst right =\n \"left-full w-[max-content] translate-x-[0.6rem] after:left-[-0.2rem] top-[-0.2rem] after:top-[0.6rem]\";\nconst left =\n \"right-full w-[max-content] translate-x-[-0.6rem] top-[-0.2rem] after:right-[-0.2rem] after:top-[0.6rem]\";\n","import React from \"react\";\n\ntype Option = {\n label: string;\n value: string;\n};\n\nexport default function NavTabClient({\n items,\n state,\n}: Readonly<{\n items: Option[];\n state: {\n active: string;\n setActive: (val: string) => void;\n };\n}>) {\n return (\n <nav className=\"navtab__wrapper\">\n {items.map(({ label, value }) => (\n <button\n key={value}\n className={`navtab__item ${\n state.active == value\n ? \"navtab__item__active\"\n : \"hover:bg-[var(--color-border)]/50\"\n }`}\n onClick={() => state.setActive(value)}\n >\n {label}\n </button>\n ))}\n </nav>\n );\n}\n","import React from \"react\";\n\ntype Card = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport default function Card({ children, className }: Readonly<Card>) {\n return <div className={`card ${className}`}>{children}</div>;\n}\n\nconst Footer = ({\n className,\n children,\n}: {\n className?: string;\n children?: React.ReactNode;\n}) => {\n return (\n <div className={`${className} border-t border-t-[var(--color-border)]`}>\n {children}\n </div>\n );\n};\n\nCard.Footer = Footer;\n","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faCheckCircle,\n faInfoCircle,\n faQuestionCircle,\n faXmarkCircle,\n} from \"@fortawesome/free-solid-svg-icons\";\n\ntype ToastType = \"warning\" | \"success\" | \"info\" | \"danger\";\ntype Toast = {\n title: string;\n className?: string;\n description: string;\n type: ToastType;\n};\n\nexport default function Toast({\n title,\n description,\n type = \"info\",\n className,\n}: Readonly<Toast>) {\n return (\n <div className={`toast__wrapper group ${className}`}>\n <div className=\"toast__body\">\n <div style={{ background: getColor(type) }} className={bullet}></div>\n <div>\n <p className=\"toast__title\">{title}</p>\n <p className=\"toast__description\">{description}</p>\n </div>\n <div className={`toast__icon toast__icon__${type}`}></div>\n </div>\n <p\n className=\"toast__bar toast-bar-animate\"\n style={{ background: getColor(type) }}\n ></p>\n </div>\n );\n}\n\nconst Inline = ({\n className,\n text,\n type,\n}: {\n className?: string;\n text: string;\n type: ToastType;\n}) => {\n return (\n <div\n className={`toast__inline ${className}`}\n style={{ background: `var(--color-${type}-soft)`, opacity: 0.9 }}\n >\n <FontAwesomeIcon\n icon={getIcon(type)}\n className=\"text-[1.2rem]\"\n style={{ color: getColor(type) }}\n />\n <p>{text}</p>\n </div>\n );\n};\n\nToast.Inline = Inline;\n\nfunction getColor(type: string) {\n return `var(--color-${type})`;\n}\n\nfunction getIcon(type: string) {\n const mapping = {\n warning: faQuestionCircle,\n info: faInfoCircle,\n danger: faXmarkCircle,\n success: faCheckCircle,\n };\n //@ts-expect-error call object using array index\n return mapping[type];\n}\n\nconst bullet =\n \"w-[2rem] h-[2rem] absolute top-[-0.7rem] left-[-0.7rem] rounded-[50%]\";\n","import React from \"react\";\nimport { faCaretRight } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\ntype Expandable = {\n children: React.ReactNode;\n title: string;\n className?: string;\n isOpen?: boolean;\n};\n\nexport default function Expandable({\n children,\n title,\n className,\n isOpen,\n}: Readonly<Expandable>) {\n const name = title.replace(\" \", \"\");\n return (\n <div className={`expandable ${className}`}>\n <input\n id={name}\n type=\"checkbox\"\n defaultChecked={isOpen}\n className=\"opacity-[0] peer absolute top-0 ex-title\"\n />\n <FontAwesomeIcon icon={faCaretRight} className=\"expandable__icon\" />\n <label htmlFor={name} className=\"expandable__title\">\n {title}\n </label>\n <div className=\"expandable__body\">\n <div className=\"p-[0.75rem] px-[1rem]\">{children}</div>\n </div>\n </div>\n );\n}\n","import React, { useCallback, useDeferredValue, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faListCheck } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Option = {\n value: string;\n label: string;\n};\n\ntype MultiSelect = {\n label?: string;\n labelHtml?: string;\n outerClass?: string;\n options?: Option[];\n stringOptions?: string[];\n state: { value: Option[]; select: (newVal: Option[]) => void };\n};\n\nexport default function MultiSelect({\n state,\n label,\n labelHtml,\n ...attr\n}: Readonly<MultiSelect>) {\n const { options = [], stringOptions = [] } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const inputKeyword = useDeferredValue(keyword);\n\n const availableOptions = useMemo(() => {\n const isDefaultOption = options && options.length > 0;\n if (!isDefaultOption)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n function getFiltered() {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }\n\n function selectItem({ label, value }: { label: string; value: string }) {\n //@ts-expect-error: avoid check\n state.select((prev) => {\n const isItemExist = prev.find((item: any) => item.value == value);\n if (isItemExist) {\n return prev.filter((item: any) => item.value != value);\n }\n return [...prev, { label, value }];\n });\n }\n\n function isItemExist(value: string) {\n return state.value.find((item: any) => item.value == value);\n }\n\n const selectUnSelectAll = useCallback(() => {\n const isAllSelected = state.value.length == availableOptions.length;\n state.select(isAllSelected ? [] : availableOptions);\n }, [state.value]);\n\n return (\n <div className={`group w-full ${attr.outerClass}`}>\n {label && (\n <label className=\"text-input__label\" htmlFor={labelHtml}>\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper relative\">\n <input\n value={keyword}\n type=\"search\"\n placeholder={`${state.value.length} Dipilih`}\n className={`${input} ${\n state.value.length > 0 &&\n \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n onChange={(e) => setKeyword(e.target.value)}\n />\n <div className=\"select-item__wrapper select-multiple__wrapper\">\n {getFiltered().length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {getFiltered().map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={() => selectItem({ label, value })}\n key={value}\n className=\"select-item\"\n >\n {label}\n {isItemExist(value) && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <button\n type=\"button\"\n className=\"cursor-pointer\"\n onClick={selectUnSelectAll}\n >\n <FontAwesomeIcon icon={faListCheck} className={input__icon} />\n </button>\n </div>\n </div>\n );\n}\nconst input__icon = \"pr-[0.7rem] text-[1.2rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","\"use client\";\nimport React from \"react\";\n\nexport default function ThemeToggle(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <label\n htmlFor={`${attr.id || \"theme-toggle\"}`}\n className=\"slider__wrapper slider-theme slider-theme-light\"\n >\n <input\n id=\"theme-toggle\"\n {...attr}\n type=\"checkbox\"\n className=\"peer ... w-[2rem] opacity-[0] cursor-pointer\"\n />\n <span className=\"slider-theme__bullet\"></span>\n </label>\n </div>\n );\n}\n","import React, { useState } from \"react\";\nimport MultiSelect from \"./MultiSelect\";\nimport SingleSelect from \"./SingleSelect\";\n\nconst list = [\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n];\nconst stringList = [\"option1\", \"option2\", \"option3\"];\n\nexport default function Dashboard() {\n const [selectedItem, setSelectedItem] = useState<\n { label: string; value: string }[]\n >([]);\n const [sel, setSel] = useState({ label: \"\", value: \"\" });\n\n function updateState(item: string) {\n const filtered = list.find(({ value }) => value == item);\n filtered && setSel(filtered);\n }\n\n return (\n <div className=\"flex items-center gap-[1rem]\">\n <MultiSelect\n label=\"Multi Select\"\n stringOptions={stringList}\n state={{ value: selectedItem, select: setSelectedItem }}\n />\n <SingleSelect\n label=\"Single Select\"\n name=\"newinput\"\n stringOptions={stringList}\n placeholder=\"-- Pilih Status --\"\n value={sel.value}\n />\n </div>\n );\n}\n","import React from \"react\";\nexport default function Badge({\n text,\n type,\n className,\n}: {\n text: string;\n type: \"success\" | \"danger\" | \"warning\" | \"info\";\n className?: string;\n}) {\n return (\n <div className=\"badge__wrapper\">\n <span\n style={{\n background: `var(--color-${type})`,\n }}\n className={`badge ${className}`}\n >\n {text}\n </span>\n </div>\n );\n}\n","import React from \"react\";\nexport default function Skeleton({ className }: { className?: string }) {\n return (\n <div className={`${className} skeleton`}>\n <span className=\"skeleton__item skeleton-slide\"></span>\n </div>\n );\n}\n","import React from \"react\";\n\nexport default function Navigation() {\n return <nav></nav>;\n}\n\nconst URLNavigation = (props: {\n list: { label: string; href: string }[];\n activeUrl: string;\n outerClass?: string;\n CustomComponent?: React.ElementType;\n}) => {\n const Component = props.CustomComponent || \"a\";\n function getAnchorClass(href: string) {\n return href === props.activeUrl\n ? \"bg-[var(--color-primary-soft)] text-[var(--color-primary)]\"\n : \"text-[var(--color-text-secondary)]/70 hover:bg-[var(--color-border)]/40\";\n }\n\n return (\n <nav className={`nav__wrapper ${props.outerClass}`}>\n {props.list.map((prop) => (\n <Component\n key={prop.href}\n className={`${base__anchor} ${getAnchorClass(prop.href)}`}\n {...prop}\n >\n {prop.label}\n </Component>\n ))}\n </nav>\n );\n};\n\nNavigation.URL = URLNavigation;\n\nconst base__anchor =\n \"p-[0.8rem] transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]\";\n","import React from \"react\";\n\nexport default function Confirmation({\n type = \"warning\",\n text,\n title,\n secondaryAction,\n secondaryLabel = \"Tidak\",\n mainAction,\n mainLabel = \"Ya\",\n}: {\n mainAction: () => void;\n secondaryAction?: () => void;\n mainLabel?: string;\n secondaryLabel?: string;\n title: string;\n text: string;\n type?: \"info\" | \"warning\" | \"danger\" | \"success\";\n}) {\n return (\n <div className=\"confirmation__outer\">\n <div className=\"confirmation__card\">\n <div className={wrapper}>\n <div className={`baloon__${type} baloon`}></div>\n <div>\n <h3 className=\"font-semibold\">{title}</h3>\n <p className={confirmation__text}>{text}</p>\n </div>\n </div>\n <div className=\"confirmation__footer\">\n {secondaryAction && (\n <button\n onClick={secondaryAction}\n type=\"button\"\n className=\"cursor-pointer\"\n style={{ color: `var(--color-${type})` }}\n >\n {secondaryLabel}\n </button>\n )}\n <button\n onClick={() => {\n mainAction();\n secondaryAction && secondaryAction();\n }}\n className=\"cursor-pointer btn__primary min-w-[8rem]\"\n style={{\n background: `var(--color-${type})`,\n border: `1px solid var(--color-${type})`,\n }}\n >\n {mainLabel}\n </button>\n </div>\n </div>\n </div>\n );\n}\n\nconst wrapper =\n \"pt-[0.5rem] pb-[1rem] px-[1.8rem] grid items-center gap-[1.5rem]\";\nconst confirmation__text =\n \"mt-[0.7rem] w-[90%] text-[var(--color-text-secondary)]\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAElB,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AASf,SAAR,OAAwB,IAOV;AAPU,eAC7B;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IAC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ACL,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,eAAe,IAAI,IAAI;AAAA;AAAA,IAEtC;AAAA,EACH,GAEF,gBAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM;AACb,mBAAW;AACX,2BAAmB,gBAAgB;AAAA,MACrC;AAAA,MACA,WAAU;AAAA,MACV,OAAO;AAAA,QACL,YAAY,eAAe,IAAI;AAAA,QAC/B,QAAQ,yBAAyB,IAAI;AAAA,MACvC;AAAA;AAAA,IAEC;AAAA,EACH,CACF,CACF,CACF;AAEJ;AAEA,IAAM,UACJ;AACF,IAAM,qBACJ;","names":["list","React","FontAwesomeIcon","React","FontAwesomeIcon","React","FontAwesomeIcon","React","FontAwesomeIcon","React","FontAwesomeIcon","faCheck","React","input","FontAwesomeIcon","faCheck","input__icon","list","React","React","React","React","FontAwesomeIcon","React","FontAwesomeIcon","React","useDeferredValue","useMemo","useState","FontAwesomeIcon","faCheck","useState","useDeferredValue","useMemo","label","isItemExist","React","input","FontAwesomeIcon","faCheck","input__icon","React","React","React","useState","useState","React","React","React","React","React","React"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Button.tsx","../src/components/TextInput.tsx","../src/components/Slider.tsx","../src/components/SingleSelect.tsx","../src/components/Tooltip.tsx","../src/components/NavTabClient.tsx","../src/components/Card.tsx","../src/components/Toast.tsx","../src/components/Expandable.tsx","../src/components/MultiSelect.tsx","../src/components/ThemeToggle.tsx","../src/components/Dashboard.tsx","../src/components/Badge.tsx","../src/components/Skeleton.tsx","../src/components/Navigation.tsx","../src/components/Confirmation.tsx"],"sourcesContent":["import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCircleNotch } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Button = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n icon?: IconProp;\n label?: string;\n btnType?: \"primary\" | \"secondary\" | \"tertiary\";\n isLoading?: boolean;\n};\n\nexport default function Button({\n label,\n icon,\n isLoading,\n btnType,\n className,\n ...rest\n}: Readonly<Button>) {\n const buttonIcon = isLoading ? faCircleNotch : icon;\n const loadingLabel = label && isLoading ? \"Memproses ...\" : \"\";\n return (\n <button\n {...rest}\n className={`${!icon && \"py-[0.84rem]\"} ${className} ${\n btnType == \"secondary\" && \"btn__secondary\"\n } btn__primary`}\n >\n {buttonIcon && icon && (\n <FontAwesomeIcon\n icon={buttonIcon}\n className={`text-[1.2rem] ${label && \"mr-[0.3rem]\"} ${\n isLoading && \"animate-spin\"\n }`}\n />\n )}\n {isLoading ? loadingLabel : label}\n </button>\n );\n}\n\nconst IconButton = (props: Readonly<Button>) => {\n return (\n <button\n {...props}\n className={`${props.className} ${\n props.title ? \"max-w-[content] px-[0.8rem]\" : \"\"\n } icon__button`}\n >\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n {props.title && (\n <span className=\"inline-block ml-[0.8rem] text-[1rem]\">\n {props.title}\n </span>\n )}\n </button>\n );\n};\n\nconst IconButtonGroup = ({ list }: { list: Button[] }) => {\n function getBtnClass(idx: number) {\n return `icon__button !rounded-[0] border-[0] ${\n idx !== 0 ? \"border-l border-l-[var(--color-border)]\" : \"\"\n }`;\n }\n return (\n <div className=\"icon__button_group\">\n {list.map((props, idx) => (\n <button key={idx} className={getBtnClass(idx)} {...props}>\n {props.icon && <FontAwesomeIcon icon={props.icon} />}\n </button>\n ))}\n </div>\n );\n};\n\nButton.IconButton = IconButton;\nButton.IconButtonGroup = IconButtonGroup;\n","import React from \"react\";\nimport { IconProp } from \"@fortawesome/fontawesome-svg-core\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nconst input__icon =\n \"w-[2rem] p-[0.9rem] px-[0.7rem] text-[1.2rem] bg-[var(--color-background-icon)] text-[var(--color-icon-input)] mr-2 group-focus-within:text-[var(--color-primary)]\";\n\nexport default function TextInput({\n label,\n labelFor,\n icon,\n outerclass,\n ...attr\n}: Readonly<\n React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelFor?: string;\n icon?: IconProp;\n outerclass?: string;\n }\n>) {\n return (\n <div className={`group ${outerclass} w-full`}>\n {label && (\n <label htmlFor={labelFor} className=\"text-input__label\">\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper overflow-hidden\">\n {icon && <FontAwesomeIcon icon={icon} className={input__icon} />}\n <input\n {...attr}\n className={`text-input w-full ${attr.className} ${\n icon && \"!pl-[0.3rem]\"\n }`}\n />\n </div>\n </div>\n );\n}\n","import React from \"react\";\nimport { faCheck } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport default function Slider(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <div className=\"slider__wrapper group\">\n <input {...attr} id=\"slider\" type=\"checkbox\" className={input} />\n <label htmlFor=\"slider\" className=\"slider\">\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[0.7rem] translate-x-[0.2px]\"\n />\n </label>\n </div>\n </div>\n );\n}\n\nconst input = \"peer ... w-[3rem] h-[1.6rem] opacity-[0] cursor-pointer\";\n","\"use client\";\nimport React, { useDeferredValue, useEffect, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faChevronDown } from \"@fortawesome/free-solid-svg-icons\";\n\ntype SingleSelect = React.InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n labelHtml?: string;\n placeholder?: string;\n outerclass?: string;\n options?: {\n label: string;\n value: string;\n }[];\n stringOptions?: string[];\n};\n\nexport default function SingleSelect(attr: Readonly<SingleSelect>) {\n const { options = [], stringOptions = [], ...attrInput } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const [selected, setSelected] = useState<{ label: string; value: any }>({\n label: \"\",\n value: \"\",\n });\n const inputKeyword = useDeferredValue(keyword);\n\n function selectItem(\n { label, value }: { label: string; value: any },\n e: React.MouseEvent<HTMLButtonElement>\n ) {\n const triggerManual = attrInput.onChange;\n if (triggerManual) {\n triggerManual?.({\n target: { value, name: attrInput.name },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n setSelected({ label, value });\n setKeyword(\"\");\n setTimeout(() => {\n (e.target as HTMLButtonElement).blur();\n }, 250);\n }\n\n function autoUpdateValue(updatedValue: string) {\n if (updatedValue) {\n const filtered = availableOptions.find(\n ({ value }) => value == updatedValue\n );\n if (filtered) setSelected(filtered);\n }\n }\n\n const availableOptions = useMemo(() => {\n let defaultOptions = options && options.length > 0;\n if (!defaultOptions)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n const filteredOptions = useMemo(() => {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }, [inputKeyword, availableOptions]);\n\n useEffect(() => {\n attrInput.value && autoUpdateValue(attrInput.value as string);\n }, [attrInput.value]);\n\n return (\n <div className={`w-full group ${attr.outerclass}`}>\n {attrInput.label && (\n <label className=\"text-input__label\" htmlFor={attrInput.labelHtml}>\n {attrInput.label}\n </label>\n )}\n <div className={`${attrInput.className} text-input__wrapper relative`}>\n <input\n {...attrInput}\n {...(attrInput.onChange ? { onChange: attrInput.onChange } : {})}\n value={attrInput.value ?? selected.value}\n type=\"hidden\"\n />\n <input\n value={keyword}\n type=\"search\"\n onChange={(e) => setKeyword(e.target.value)}\n className={`${attrInput.name}-keyword ${input} ${\n selected.value && \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n placeholder={selected.value ? selected.label : attrInput.placeholder}\n />\n <div className=\"select-item__wrapper\">\n {filteredOptions.length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {filteredOptions.map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={(e) => selectItem({ label, value }, e)}\n key={value}\n className=\"select-item\"\n >\n {label}\n {selected.value == value && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <FontAwesomeIcon icon={faChevronDown} className={input__icon} />\n </div>\n </div>\n );\n}\n\nSingleSelect.autoFill = autoFillInput;\n\nfunction autoFillInput(\n value: string,\n elName: string,\n list: { label: string; value: string }[]\n) {\n const inp = document.querySelector(`[name=\"${elName}\"]`) as HTMLInputElement;\n inp.value = `${value}`;\n const filtered = list.find((item) => item.value == value);\n const el = document.querySelector(`.${elName}-keyword`);\n el?.setAttribute(\"placeholder\", `${filtered?.label}`);\n}\n\nconst input__icon = \"pr-[0.7rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","import React from \"react\";\n\ntype Tooltip = {\n children: React.ReactNode;\n text: string;\n position: \"top\" | \"bottom\" | \"right\" | \"left\";\n};\n\nexport default function Tooltip({\n children,\n text,\n position = \"top\",\n}: Readonly<Tooltip>) {\n function getAccent() {\n const mapping = {\n top,\n bottom,\n left,\n right,\n };\n return mapping[position];\n }\n return (\n <div className=\"relative\">\n <div className=\"peer\">{children}</div>\n <span className={`tooltip-text ${getAccent()}`}>{text}</span>\n </div>\n );\n}\n\nconst top =\n \"bottom-full translate-y-[-0.3rem] right-0 after:bottom-0 after:translate-y-[0.25rem] \";\nconst bottom =\n \"right-0 top-full translate-y-[0.3rem] after:top-[-0.4rem] after:translate-y-[0.2rem] \";\nconst right =\n \"left-full w-[max-content] translate-x-[0.6rem] after:left-[-0.2rem] top-[-0.2rem] after:top-[0.6rem]\";\nconst left =\n \"right-full w-[max-content] translate-x-[-0.6rem] top-[-0.2rem] after:right-[-0.2rem] after:top-[0.6rem]\";\n","import React from \"react\";\n\ntype Option = {\n label: string;\n value: string;\n};\n\nexport default function NavTabClient({\n items,\n state,\n}: Readonly<{\n items: Option[];\n state: {\n active: string;\n setActive: (val: string) => void;\n };\n}>) {\n return (\n <nav className=\"navtab__wrapper\">\n {items.map(({ label, value }) => (\n <button\n key={value}\n className={`navtab__item ${\n state.active == value\n ? \"navtab__item__active\"\n : \"hover:bg-[var(--color-border)]/50\"\n }`}\n onClick={() => state.setActive(value)}\n >\n {label}\n </button>\n ))}\n </nav>\n );\n}\n","import React from \"react\";\n\ntype Card = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport default function Card({ children, className }: Readonly<Card>) {\n return <div className={`card ${className}`}>{children}</div>;\n}\n\nconst Footer = ({\n className,\n children,\n}: {\n className?: string;\n children?: React.ReactNode;\n}) => {\n return (\n <div className={`${className} border-t border-t-[var(--color-border)]`}>\n {children}\n </div>\n );\n};\n\nCard.Footer = Footer;\n","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport {\n faCheckCircle,\n faInfoCircle,\n faQuestionCircle,\n faXmarkCircle,\n} from \"@fortawesome/free-solid-svg-icons\";\n\ntype ToastType = \"warning\" | \"success\" | \"info\" | \"danger\";\ntype Toast = {\n title: string;\n className?: string;\n description: string;\n type: ToastType;\n};\n\nexport default function Toast({\n title,\n description,\n type = \"info\",\n className,\n}: Readonly<Toast>) {\n return (\n <div className={`toast__wrapper group ${className}`}>\n <div className=\"toast__body\">\n <div style={{ background: getColor(type) }} className={bullet}></div>\n <div>\n <p className=\"toast__title\">{title}</p>\n <p className=\"toast__description\">{description}</p>\n </div>\n <div className={`toast__icon toast__icon__${type}`}></div>\n </div>\n <p\n className=\"toast__bar toast-bar-animate\"\n style={{ background: getColor(type) }}\n ></p>\n </div>\n );\n}\n\nconst Inline = ({\n className,\n text,\n type,\n}: {\n className?: string;\n text: string;\n type: ToastType;\n}) => {\n return (\n <div\n className={`toast__inline ${className}`}\n style={{ background: `var(--color-${type}-soft)`, opacity: 0.9 }}\n >\n <FontAwesomeIcon\n icon={getIcon(type)}\n className=\"text-[1.2rem]\"\n style={{ color: getColor(type) }}\n />\n <p>{text}</p>\n </div>\n );\n};\n\nToast.Inline = Inline;\n\nfunction getColor(type: string) {\n return `var(--color-${type})`;\n}\n\nfunction getIcon(type: string) {\n const mapping = {\n warning: faQuestionCircle,\n info: faInfoCircle,\n danger: faXmarkCircle,\n success: faCheckCircle,\n };\n //@ts-expect-error call object using array index\n return mapping[type];\n}\n\nconst bullet =\n \"w-[2rem] h-[2rem] absolute top-[-0.7rem] left-[-0.7rem] rounded-[50%]\";\n","import React from \"react\";\nimport { faCaretRight } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\ntype Expandable = {\n children: React.ReactNode;\n title: string;\n className?: string;\n isOpen?: boolean;\n};\n\nexport default function Expandable({\n children,\n title,\n className,\n isOpen,\n}: Readonly<Expandable>) {\n const name = title.replace(\" \", \"\");\n return (\n <div className={`expandable ${className}`}>\n <input\n id={name}\n type=\"checkbox\"\n defaultChecked={isOpen}\n className=\"opacity-[0] peer absolute top-0 ex-title\"\n />\n <FontAwesomeIcon icon={faCaretRight} className=\"expandable__icon\" />\n <label htmlFor={name} className=\"expandable__title\">\n {title}\n </label>\n <div className=\"expandable__body\">\n <div className=\"p-[0.75rem] px-[1rem]\">{children}</div>\n </div>\n </div>\n );\n}\n","import React, { useCallback, useDeferredValue, useMemo, useState } from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faCheck, faListCheck } from \"@fortawesome/free-solid-svg-icons\";\n\ntype Option = {\n value: string;\n label: string;\n};\n\ntype MultiSelect = {\n label?: string;\n labelHtml?: string;\n outerclass?: string;\n options?: Option[];\n stringOptions?: string[];\n state: { value: Option[]; select: (newVal: Option[]) => void };\n};\n\nexport default function MultiSelect({\n state,\n label,\n labelHtml,\n ...attr\n}: Readonly<MultiSelect>) {\n const { options = [], stringOptions = [] } = attr;\n const [keyword, setKeyword] = useState(\"\");\n const inputKeyword = useDeferredValue(keyword);\n\n const availableOptions = useMemo(() => {\n const isDefaultOption = options && options.length > 0;\n if (!isDefaultOption)\n return stringOptions.map((opt) => ({ label: opt, value: opt }));\n return options;\n }, [options, stringOptions]);\n\n function getFiltered() {\n return availableOptions.filter(\n ({ label, value }) =>\n label.toLowerCase().includes(inputKeyword.toLowerCase()) ||\n value.toLowerCase().includes(inputKeyword.toLowerCase())\n );\n }\n\n function selectItem({ label, value }: { label: string; value: string }) {\n //@ts-expect-error: avoid check\n state.select((prev) => {\n const isItemExist = prev.find((item: any) => item.value == value);\n if (isItemExist) {\n return prev.filter((item: any) => item.value != value);\n }\n return [...prev, { label, value }];\n });\n }\n\n function isItemExist(value: string) {\n return state.value.find((item: any) => item.value == value);\n }\n\n const selectUnSelectAll = useCallback(() => {\n const isAllSelected = state.value.length == availableOptions.length;\n state.select(isAllSelected ? [] : availableOptions);\n }, [state.value]);\n\n return (\n <div className={`group w-full ${attr.outerclass}`}>\n {label && (\n <label className=\"text-input__label\" htmlFor={labelHtml}>\n {label}\n </label>\n )}\n <div className=\"text-input__wrapper relative\">\n <input\n value={keyword}\n type=\"search\"\n placeholder={`${state.value.length} Dipilih`}\n className={`${input} ${\n state.value.length > 0 &&\n \"placeholder:text-[var(--color-text-primary)]\"\n }`}\n onChange={(e) => setKeyword(e.target.value)}\n />\n <div className=\"select-item__wrapper select-multiple__wrapper\">\n {getFiltered().length == 0 && keyword != \"\" && (\n <button disabled className=\"select-item text-[var(--color-danger)]\">\n Tidak ada Item\n </button>\n )}\n {getFiltered().map(({ label, value }) => (\n <button\n type=\"button\"\n onClick={() => selectItem({ label, value })}\n key={value}\n className=\"select-item\"\n >\n {label}\n {isItemExist(value) && (\n <FontAwesomeIcon\n icon={faCheck}\n className=\"text-[var(--color-primary)]\"\n />\n )}\n </button>\n ))}\n </div>\n <button\n type=\"button\"\n className=\"cursor-pointer\"\n onClick={selectUnSelectAll}\n >\n <FontAwesomeIcon icon={faListCheck} className={input__icon} />\n </button>\n </div>\n </div>\n );\n}\nconst input__icon = \"pr-[0.7rem] text-[1.2rem] text-[var(--color-icon-input)]\";\nconst input = \"text-input peer ... w-full\";\n","\"use client\";\nimport React from \"react\";\n\nexport default function ThemeToggle(\n attr: Readonly<React.InputHTMLAttributes<HTMLInputElement>>\n) {\n return (\n <div className=\"flex items-center h-[3rem]\">\n <label\n htmlFor={`${attr.id || \"theme-toggle\"}`}\n className=\"slider__wrapper slider-theme slider-theme-light\"\n >\n <input\n id=\"theme-toggle\"\n {...attr}\n type=\"checkbox\"\n className=\"peer ... w-[2rem] opacity-[0] cursor-pointer\"\n />\n <span className=\"slider-theme__bullet\"></span>\n </label>\n </div>\n );\n}\n","import React, { useState } from \"react\";\nimport MultiSelect from \"./MultiSelect\";\nimport SingleSelect from \"./SingleSelect\";\n\nconst list = [\n { label: \"Option 1\", value: \"option1\" },\n { label: \"Option 2\", value: \"option2\" },\n { label: \"Option 3\", value: \"option3\" },\n];\nconst stringList = [\"option1\", \"option2\", \"option3\"];\n\nexport default function Dashboard() {\n const [selectedItem, setSelectedItem] = useState<\n { label: string; value: string }[]\n >([]);\n const [sel, setSel] = useState({ label: \"\", value: \"\" });\n\n function updateState(item: string) {\n const filtered = list.find(({ value }) => value == item);\n filtered && setSel(filtered);\n }\n\n return (\n <div className=\"flex items-center gap-[1rem]\">\n <MultiSelect\n label=\"Multi Select\"\n stringOptions={stringList}\n state={{ value: selectedItem, select: setSelectedItem }}\n />\n <SingleSelect\n label=\"Single Select\"\n name=\"newinput\"\n stringOptions={stringList}\n placeholder=\"-- Pilih Status --\"\n value={sel.value}\n />\n </div>\n );\n}\n","import React from \"react\";\nexport default function Badge({\n text,\n type,\n className,\n}: {\n text: string;\n type: \"success\" | \"danger\" | \"warning\" | \"info\";\n className?: string;\n}) {\n return (\n <div className=\"badge__wrapper\">\n <span\n style={{\n background: `var(--color-${type})`,\n }}\n className={`badge ${className}`}\n >\n {text}\n </span>\n </div>\n );\n}\n","import React from \"react\";\nexport default function Skeleton({ className }: { className?: string }) {\n return (\n <div className={`${className} skeleton`}>\n <span className=\"skeleton__item skeleton-slide\"></span>\n </div>\n );\n}\n","import React from \"react\";\n\nexport default function Navigation() {\n return <nav></nav>;\n}\n\nconst URLNavigation = (props: {\n list: { label: string; href: string }[];\n activeUrl: string;\n outerclass?: string;\n CustomComponent?: React.ElementType;\n}) => {\n const Component = props.CustomComponent || \"a\";\n function getAnchorClass(href: string) {\n return href === props.activeUrl\n ? \"bg-[var(--color-primary-soft)] text-[var(--color-primary)]\"\n : \"text-[var(--color-text-secondary)]/70 hover:bg-[var(--color-border)]/40\";\n }\n\n return (\n <nav className={`nav__wrapper ${props.outerclass}`}>\n {props.list.map((prop) => (\n <Component\n key={prop.href}\n className={`${base__anchor} ${getAnchorClass(prop.href)}`}\n {...prop}\n >\n {prop.label}\n </Component>\n ))}\n </nav>\n );\n};\n\nNavigation.URL = URLNavigation;\n\nconst base__anchor =\n \"p-[0.8rem] h-full grid items-center transition-all leading-[1] px-[1.2rem] rounded-[0.4rem]\";\n","import React from \"react\";\n\nexport default function Confirmation({\n type = \"warning\",\n text,\n title,\n secondaryAction,\n secondaryLabel = \"Tidak\",\n mainAction,\n mainLabel = \"Ya\",\n}: {\n mainAction: () => void;\n secondaryAction?: () => void;\n mainLabel?: string;\n secondaryLabel?: string;\n title: string;\n text: string;\n type?: \"info\" | \"warning\" | \"danger\" | \"success\";\n}) {\n return (\n <div className=\"confirmation__outer\">\n <div className=\"confirmation__card\">\n <div className={wrapper}>\n <div className={`baloon__${type} baloon`}></div>\n <div>\n <h3 className=\"font-semibold\">{title}</h3>\n <p className={confirmation__text}>{text}</p>\n </div>\n </div>\n <div className=\"confirmation__footer\">\n {secondaryAction && (\n <button\n onClick={secondaryAction}\n type=\"button\"\n className=\"cursor-pointer\"\n style={{ color: `var(--color-${type})` }}\n >\n {secondaryLabel}\n </button>\n )}\n <button\n onClick={() => {\n mainAction();\n secondaryAction && secondaryAction();\n }}\n className=\"cursor-pointer btn__primary min-w-[8rem]\"\n style={{\n background: `var(--color-${type})`,\n border: `1px solid var(--color-${type})`,\n }}\n >\n {mainLabel}\n </button>\n </div>\n </div>\n </div>\n );\n}\n\nconst wrapper =\n \"pt-[0.5rem] pb-[1rem] px-[1.8rem] grid items-center gap-[1.5rem]\";\nconst confirmation__text =\n \"mt-[0.7rem] w-[90%] text-[var(--color-text-secondary)]\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAElB,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AASf,SAAR,OAAwB,IAOV;AAPU,eAC7B;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAjBF,IAY+B,IAM1B,iBAN0B,IAM1B;AAAA,IALH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,aAAa,YAAY,gBAAgB;AAC/C,QAAM,eAAe,SAAS,YAAY,kBAAkB;AAC5D,SACE;AAAA,IAAC;AAAA,qCACK,OADL;AAAA,MAEC,WAAW,GAAG,CAAC,QAAQ,cAAc,IAAI,SAAS,IAChD,WAAW,eAAe,gBAC5B;AAAA;AAAA,IAEC,cAAc,QACb;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,WAAW,iBAAiB,SAAS,aAAa,IAChD,aAAa,cACf;AAAA;AAAA,IACF;AAAA,IAED,YAAY,eAAe;AAAA,EAC9B;AAEJ;AAEA,IAAM,aAAa,CAAC,UAA4B;AAC9C,SACE;AAAA,IAAC;AAAA,qCACK,QADL;AAAA,MAEC,WAAW,GAAG,MAAM,SAAS,IAC3B,MAAM,QAAQ,gCAAgC,EAChD;AAAA;AAAA,IAEC,MAAM,QAAQ,oCAAC,mBAAgB,MAAM,MAAM,MAAM;AAAA,IACjD,MAAM,SACL,oCAAC,UAAK,WAAU,0CACb,MAAM,KACT;AAAA,EAEJ;AAEJ;AAEA,IAAM,kBAAkB,CAAC,EAAE,MAAAA,MAAK,MAA0B;AACxD,WAAS,YAAY,KAAa;AAChC,WAAO,wCACL,QAAQ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,CACD,CACH;AAEJ;AAEA,WAAW,MAAM;AAEjB,IAAM,eACJ;;;ACrCF,OAAOC,aAAW;AAEH,SAAR,aAA8B;AAAA,EACnC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,YAAY;AACd,GAQG;AACD,SACE,gBAAAA,QAAA,cAAC,SAAI,WAAU,yBACb,gBAAAA,QAAA,cAAC,SAAI,WAAU,wBACb,gBAAAA,QAAA,cAAC,SAAI,WAAW,WACd,gBAAAA,QAAA,cAAC,SAAI,WAAW,WAAW,IAAI,WAAW,GAC1C,gBAAAA,QAAA,cAAC,aACC,gBAAAA,QAAA,cAAC,QAAG,WAAU,mBAAiB,KAAM,GACrC,gBAAAA,QAAA,cAAC,OAAE,WAAW,sBAAqB,IAAK,CAC1C,CACF,GACA,gBAAAA,QAAA,cAAC,SAAI,WAAU,0BACZ,mBACC,gBAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,MAAK;AAAA,MACL,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,eAAe,IAAI,IAAI;AAAA;AAAA,IAEtC;AAAA,EACH,GAEF,gBAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM;AACb,mBAAW;AACX,2BAAmB,gBAAgB;AAAA,MACrC;AAAA,MACA,WAAU;AAAA,MACV,OAAO;AAAA,QACL,YAAY,eAAe,IAAI;AAAA,QAC/B,QAAQ,yBAAyB,IAAI;AAAA,MACvC;AAAA;AAAA,IAEC;AAAA,EACH,CACF,CACF,CACF;AAEJ;AAEA,IAAM,UACJ;AACF,IAAM,qBACJ;","names":["list","React","FontAwesomeIcon","React","FontAwesomeIcon","React","FontAwesomeIcon","React","FontAwesomeIcon","React","FontAwesomeIcon","faCheck","React","input","FontAwesomeIcon","faCheck","input__icon","list","React","React","React","React","FontAwesomeIcon","React","FontAwesomeIcon","React","useDeferredValue","useMemo","useState","FontAwesomeIcon","faCheck","useState","useDeferredValue","useMemo","label","isItemExist","React","input","FontAwesomeIcon","faCheck","input__icon","React","React","React","useState","useState","React","React","React","React","React","React"]}
|
package/dist/styles.css
CHANGED
|
@@ -242,6 +242,9 @@
|
|
|
242
242
|
.mb-\[1rem\] {
|
|
243
243
|
margin-bottom: 1rem;
|
|
244
244
|
}
|
|
245
|
+
.ml-\[0\.8rem\] {
|
|
246
|
+
margin-left: 0.8rem;
|
|
247
|
+
}
|
|
245
248
|
.ml-\[5rem\] {
|
|
246
249
|
margin-left: 5rem;
|
|
247
250
|
}
|
|
@@ -275,6 +278,9 @@
|
|
|
275
278
|
.h-\[17rem\] {
|
|
276
279
|
height: 17rem;
|
|
277
280
|
}
|
|
281
|
+
.h-full {
|
|
282
|
+
height: 100%;
|
|
283
|
+
}
|
|
278
284
|
.\!w-\[30rem\] {
|
|
279
285
|
width: 30rem !important;
|
|
280
286
|
}
|
|
@@ -303,6 +309,9 @@
|
|
|
303
309
|
.w-full {
|
|
304
310
|
width: 100%;
|
|
305
311
|
}
|
|
312
|
+
.max-w-\[content\] {
|
|
313
|
+
max-width: content;
|
|
314
|
+
}
|
|
306
315
|
.min-w-\[8rem\] {
|
|
307
316
|
min-width: 8rem;
|
|
308
317
|
}
|
|
@@ -362,6 +371,9 @@
|
|
|
362
371
|
.gap-\[4rem\] {
|
|
363
372
|
gap: 4rem;
|
|
364
373
|
}
|
|
374
|
+
.overflow-auto {
|
|
375
|
+
overflow: auto;
|
|
376
|
+
}
|
|
365
377
|
.overflow-hidden {
|
|
366
378
|
overflow: hidden;
|
|
367
379
|
}
|
|
@@ -420,6 +432,9 @@
|
|
|
420
432
|
.px-\[0\.7rem\] {
|
|
421
433
|
padding-inline: 0.7rem;
|
|
422
434
|
}
|
|
435
|
+
.px-\[0\.8rem\] {
|
|
436
|
+
padding-inline: 0.8rem;
|
|
437
|
+
}
|
|
423
438
|
.px-\[1\.2rem\] {
|
|
424
439
|
padding-inline: 1.2rem;
|
|
425
440
|
}
|
|
@@ -459,6 +474,9 @@
|
|
|
459
474
|
.text-\[1\.4rem\] {
|
|
460
475
|
font-size: 1.4rem;
|
|
461
476
|
}
|
|
477
|
+
.text-\[1rem\] {
|
|
478
|
+
font-size: 1rem;
|
|
479
|
+
}
|
|
462
480
|
.leading-\[1\] {
|
|
463
481
|
--tw-leading: 1;
|
|
464
482
|
line-height: 1;
|
|
@@ -777,8 +795,8 @@ h3 {
|
|
|
777
795
|
}
|
|
778
796
|
.icon__button {
|
|
779
797
|
display: flex;
|
|
780
|
-
height:
|
|
781
|
-
width:
|
|
798
|
+
height: 3.1rem;
|
|
799
|
+
min-width: 3rem;
|
|
782
800
|
cursor: pointer;
|
|
783
801
|
align-items: center;
|
|
784
802
|
justify-content: center;
|
|
@@ -787,8 +805,7 @@ h3 {
|
|
|
787
805
|
border-width: 1px;
|
|
788
806
|
border-color: var(--color-border);
|
|
789
807
|
background-color: var(--color-bg-surface);
|
|
790
|
-
|
|
791
|
-
font-size: 1rem;
|
|
808
|
+
font-size: 1.2rem;
|
|
792
809
|
color: var(--color-icon-input);
|
|
793
810
|
&:hover {
|
|
794
811
|
@media (hover: hover) {
|
|
@@ -917,6 +934,19 @@ h3 {
|
|
|
917
934
|
&:is(:where(.peer):focus ~ *) {
|
|
918
935
|
opacity: 1;
|
|
919
936
|
}
|
|
937
|
+
&:focus-within {
|
|
938
|
+
visibility: visible;
|
|
939
|
+
}
|
|
940
|
+
&:focus-within {
|
|
941
|
+
z-index: 10000;
|
|
942
|
+
}
|
|
943
|
+
&:focus-within {
|
|
944
|
+
--tw-translate-y: 1.9rem;
|
|
945
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
946
|
+
}
|
|
947
|
+
&:focus-within {
|
|
948
|
+
opacity: 1;
|
|
949
|
+
}
|
|
920
950
|
}
|
|
921
951
|
.select-item {
|
|
922
952
|
display: flex;
|
|
@@ -995,6 +1025,7 @@ h3 {
|
|
|
995
1025
|
display: flex;
|
|
996
1026
|
width: -moz-max-content;
|
|
997
1027
|
width: max-content;
|
|
1028
|
+
align-items: center;
|
|
998
1029
|
gap: 0.2rem;
|
|
999
1030
|
border-radius: 0.5rem;
|
|
1000
1031
|
border-style: var(--tw-border-style);
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
36
36
|
},
|
|
37
37
|
"name": "@safestrong/ppa-component-library",
|
|
38
|
-
"version": "1.6.
|
|
38
|
+
"version": "1.6.3",
|
|
39
39
|
"description": "Collection of reusable components for any PPA web applications",
|
|
40
40
|
"main": "dist/index.cjs",
|
|
41
41
|
"module": "dist/index.js",
|